static char *sccsid
= "@(#)annobib.c 4.1 (Berkeley) %G%";
* This program has been replaced by "refer -B" (bibliography mode),
* but is included here for backward compatiblity.
int noanno
= 0; /* option to suppress .AP from %X field */
main(argc
, argv
) /* format (annotated) bibliography for n/troff */
if (argv
[1][0] == '-' && argv
[1][1] == 'x')
if ((fp
= fopen(*++argv
, "r")) == NULL
)
annobib(fp
) /* prepare bibliography for refer bare mode */
while (fgets(line
, BUFSIZ
, fp
))
if (line
[0] == '%' && line
[1] == 'X' && !noanno
)
printf(".]\n.AP\n%s", line
);
else if (line
[0] == '\n')
zap_x(line
) /* take %X annotation flag out of line */
for (i
= 3, j
= 0; line
[i
] != NULL
; i
++, j
++)