#include "libc.h" #include # include "ctype.h" # include "assert.h" #include "mkey.h" extern FILE *in; extern int endpush, labels, sort, bare, keywant, nobracket, yearonly, headers; extern int order; extern int preserve; extern int newr[]; extern char *referlib; extern char *smallcaps; extern char *appfld, *ignfld; extern char *keystr, *labsepstr; extern int authrev; extern int nocomma; extern int nmlen, dtlen; extern char *labblkflg; extern char *rdata[], **search; extern int refnum; extern char *reftable[]; extern char *rtp, reftext[]; extern int sep, hsep; extern int sqbrack; extern char tfile[]; extern char tdfile[]; extern char gfile[]; extern char ofile[]; extern char hidenam[]; extern char *Ifile; extern int Iline; extern FILE *fo, *ftemp; extern char *input(), *lookat(); extern char *class(), *caps(), *revauth(); extern char *artskp(), *fpar(); extern int biblio; // , science, postpunct; extern char *convert; # define INF_LENGTH (-1) # define FLAG 003 # define NRFTXT 9000 /* was 7000 */ # define NTFILE 50 # define NRFTBL 900 /* was 400 */ # define LLINE 4096 /* was 1024 */ # define QLEN 4000 # define ANSLEN 4096 /* was 1000 */ # define TAGLEN 400 # define NSEARCH 20 # define SAME 0 /* hunt2 */ extern List *doquery(Index *, FILE *, int, char **); /* hunt3 */ extern int getq(char **, int); extern int keycomp(char **, int); /* hunt5 */ extern void result(List *, int, FILE *); extern long int gdate(FILE *); /* hunt6 */ extern void dropout(List *, FILE *, int, char **, char *, int); extern int rdkeyfile(char *, char *, unsigned); /* hunt7 */ extern int findline(char *, char *, int, Fpos); extern char **fgnamp; extern char *fgnames[10]; extern char *fgp; extern char fgspace[150]; extern int keepold; /* hunt8 */ extern void runbib(char *); extern int ckexist(char *, char *); extern FILE *iopen(char *, char *); /* refer2 */ extern void doref(char *); extern int control(int); extern int onelen; extern char one[]; /* refer4 */ extern void output(char *); extern void append(char *); extern void flout(void); extern void trimnl(char *); /* refer5 */ extern void putsig(int, char **, int, char *, char *); extern char *fpar(int, char **, char *, int, int, int); extern void putkey(int, char **, int, char *); extern int keylet(char *, int); extern void mycpy(char *, char *); extern void mycpy2(char *, char *, int); extern void initadd(char *, char *, char *); extern char *artskp(char *); extern void expkey(int, int, FILE *); extern int lfirst(char *); extern void biglab(char *); extern void widelab(void); /* refer6 */ extern void putref(int, char **); extern int tabs(char **, char *, int); extern char *class(int, char **); extern int hastype(int, char **, int); extern char *caps(char *, char *); extern char *revname(char *, char *); extern int last(char *); /* refer7 */ extern int chkdup(char *); extern void dumpold(void); extern void recopy(char *); extern void lim512(char *); /* refer8 */ extern char *input(char *); extern char *lookat(void); extern void addch(char *, int); /* shell */ extern void shell(int, int (*)(int, int), void (*)(int, int));