xref: /illumos-gate/usr/src/cmd/refer/refer..c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
3*7c478bd9Sstevel@tonic-gate 
4*7c478bd9Sstevel@tonic-gate 
5*7c478bd9Sstevel@tonic-gate /*
6*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1980 Regents of the University of California.
7*7c478bd9Sstevel@tonic-gate  * All rights reserved. The Berkeley software License Agreement
8*7c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
9*7c478bd9Sstevel@tonic-gate  */
10*7c478bd9Sstevel@tonic-gate 
11*7c478bd9Sstevel@tonic-gate /*
12*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
13*7c478bd9Sstevel@tonic-gate  * All Rights Reserved.
14*7c478bd9Sstevel@tonic-gate  */
15*7c478bd9Sstevel@tonic-gate 
16*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
17*7c478bd9Sstevel@tonic-gate 
18*7c478bd9Sstevel@tonic-gate #include <stdio.h>
19*7c478bd9Sstevel@tonic-gate #include <ctype.h>
20*7c478bd9Sstevel@tonic-gate #include <assert.h>
21*7c478bd9Sstevel@tonic-gate 
22*7c478bd9Sstevel@tonic-gate #define FLAG 003
23*7c478bd9Sstevel@tonic-gate #define AFLAG 007
24*7c478bd9Sstevel@tonic-gate #define NRFTXT 10000
25*7c478bd9Sstevel@tonic-gate #define NRFTBL 500
26*7c478bd9Sstevel@tonic-gate #define NTFILE 20
27*7c478bd9Sstevel@tonic-gate #define QLEN 512
28*7c478bd9Sstevel@tonic-gate #define ANSLEN 4000
29*7c478bd9Sstevel@tonic-gate #define TAGLEN 400
30*7c478bd9Sstevel@tonic-gate #define NSERCH 20
31*7c478bd9Sstevel@tonic-gate #define MXSIG 200		/* max bytes in aggregate signal */
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate extern FILE *in;
34*7c478bd9Sstevel@tonic-gate extern int endpush, sort, labels, keywant, bare;
35*7c478bd9Sstevel@tonic-gate extern int biblio, science, postpunct;
36*7c478bd9Sstevel@tonic-gate extern char *smallcaps;
37*7c478bd9Sstevel@tonic-gate extern char comname;
38*7c478bd9Sstevel@tonic-gate extern char *keystr;
39*7c478bd9Sstevel@tonic-gate extern char *convert;
40*7c478bd9Sstevel@tonic-gate extern int authrev;
41*7c478bd9Sstevel@tonic-gate extern int nmlen, dtlen;
42*7c478bd9Sstevel@tonic-gate extern char *rdata[], **search;
43*7c478bd9Sstevel@tonic-gate extern int refnum;
44*7c478bd9Sstevel@tonic-gate extern char *reftable[];
45*7c478bd9Sstevel@tonic-gate extern char *rtp, reftext[];
46*7c478bd9Sstevel@tonic-gate extern int sep;
47*7c478bd9Sstevel@tonic-gate extern char tfile[];
48*7c478bd9Sstevel@tonic-gate extern char gfile[];
49*7c478bd9Sstevel@tonic-gate extern char ofile[];
50*7c478bd9Sstevel@tonic-gate extern char hidenam[];
51*7c478bd9Sstevel@tonic-gate extern char *Ifile; extern int Iline;
52*7c478bd9Sstevel@tonic-gate extern FILE *fo, *ftemp;
53*7c478bd9Sstevel@tonic-gate extern char *input(),*lookat();
54*7c478bd9Sstevel@tonic-gate extern char *class(),*caps(),*revauth();
55*7c478bd9Sstevel@tonic-gate extern char *artskp(),*fpar();
56*7c478bd9Sstevel@tonic-gate extern char *trimnl();
57*7c478bd9Sstevel@tonic-gate 
58*7c478bd9Sstevel@tonic-gate extern char *getenv(), *strcpy(), *strcat();
59