static char *sccsid
= "@(#)refer6.c 4.1 (Berkeley) %G%";
#define dsde (macro? "de" : "ds")
#define ifnl (macro? sep : ' ')
char buf1
[BUFSIZ
], buf2
[50];
int nauth
= 0, i
, lastype
= 0, cch
, macro
= 0, la
;
int lauth
= 0, ltitle
= 0, lother
= 0;
fprintf(fo
, ".]-%c", sep
);
for (i
= 0; i
< n
; i
++) {
fprintf(fo
, "..%c", sep
);
fprintf(stderr
, "smallcaps %s cch %c\n",smallcaps
, cch
);
if (mindex(smallcaps
, cch
))
fprintf(stderr
, " s %o tx %o %s\n",s
,tx
,tx
);
if (!control(s
[0])) { /* append to previous item */
fprintf(fo
, "%s%c", tx
, sep
);
fprintf(fo
, ".as [%c \" %s%c",lastype
,tx
,sep
);
ltitle
= (mindex(".;,?", last(tx
))!=0);
if (mindex("XYZ[]", cch
)) { /* skip these */
".de [%c%c%s%c",cch
,sep
,tx
,sep
);
".ds [%c%s%c", cch
,tx
,sep
);
la
= (tvec
[i
+1][1]!='A');
fprintf(fo
, ".as [A \"");
if (la
== 0 || nauth
!= 2)
mindex(smallcaps
, 'A') ? " \\s-2AND\\s+2" : " and");
fprintf(fo
, "%s%c", tx
, sep
);
".de [%c%c%s%c",cch
,sep
,tx
,sep
);
fprintf(fo
, ".ds [%c%s%c",cch
,tx
, sep
);
fprintf(fo
, ".nr [P %d%c", mindex(s
, '-')!=0, sep
);
ltitle
= (mindex(".;,?", last(tx
)) != 0);
lother
= (mindex(".;,?", last(tx
)) != 0);
fprintf(fo
, "..%c", sep
);
fprintf(fo
, ".nr [T %d%c", ltitle
, sep
);
fprintf(fo
, ".nr [A %d%c", lauth
, sep
);
fprintf(fo
, ".nr [O %d%c", lother
, sep
);
fprintf(fo
, ".][ %s%c", class(n
, tvec
), '\n');
for (p
= line
; *p
; p
++) {
if (hastype (nt
, tv
, 'J'))
return("1 journal-article");
if (hastype (nt
, tv
, 'B'))
return("3 article-in-book");
if (hastype (nt
, tv
, 'R'))
return ("4 tech-report");
if (hastype (nt
, tv
, 'G'))
return ("4 tech-report");
if (hastype (nt
, tv
, 'I'))
if (hastype (nt
, tv
,'M'))
if (control(tv
[i
][0]) && tv
[i
][1]==c
)
alph
= this ? alph
+1 : 0;
char *init
, *name
, *jr
, *p
, *bcop
;
while (name
> init
&& *name
!= ' ')
if (name
[-1] == ',' || name
[-1]== '(' ) {
while (name
>init
&& *name
!= ' ')