113111Srrh /* 2*17249Srrh * @(#)bib.h 2.5 10/12/84 313111Srrh */ 412917Sgarrison /* various arguments for bib and listrefs processors */ 512917Sgarrison 612917Sgarrison /* constants */ 712917Sgarrison 812917Sgarrison # define true 1 912917Sgarrison # define false 0 1012917Sgarrison # define err -1 1112917Sgarrison # define REFSIZE 1024 /* maximum size of reference string */ 1215060Sgarrison # define MAXFIELD 512 /* maximum size of any field in referece*/ 1312917Sgarrison 1412917Sgarrison /* reference citation marker genrated in pass 1 */ 1512917Sgarrison 1612917Sgarrison # define CITEMARK (char) 02 1712917Sgarrison # define CITEEND (char) 03 1816244Srrh # define FMTSTART (char) 04 1916244Srrh # define FMTEND (char) 05 2012917Sgarrison 2112917Sgarrison /* file names */ 2212917Sgarrison 2312917Sgarrison /* output of invert, input file for references */ 2412917Sgarrison # define INDXFILE "INDEX" 2512917Sgarrison /* pass1 reference collection file */ 2615904Srrh # define TMPREFFILE "/tmp/bibrXXXXXX" 2712917Sgarrison /* pass2 text collection file */ 2815904Srrh # define TMPTEXTFILE "/tmp/bibpXXXXXX" 2912917Sgarrison /* temp file used in invert */ 3015904Srrh # define INVTEMPFILE "/tmp/invertXXXXXX" 31*17249Srrh # define SYSINDEX "/usr/dict/papers/INDEX" /* default system dictionary */ 3212917Sgarrison 33*17249Srrh # define N_BMACLIB "/usr/lib/bmac" /* where macro libraries live */ 34*17249Srrh # define N_COMFILE "/usr/lib/bmac/common" /* common words */ 35*17249Srrh # define N_DEFSTYLE "/usr/lib/bmac/bib.stdsn" /* default style of refs */ 36*17249Srrh char BMACLIB[64], COMFILE[64], DEFSTYLE[64]; 37*17249Srrh 3812917Sgarrison /* size limits */ 3912917Sgarrison 4012917Sgarrison /* maximum number of characters in common file */ 4115060Sgarrison # define MAXCOMM 1000 4212917Sgarrison 4312917Sgarrison char *malloc(); 4415060Sgarrison 4515060Sgarrison /* fix needed for systems where open [w]+ doesn't work */ 4615060Sgarrison # ifdef READWRITE 4715060Sgarrison 4815060Sgarrison # define READ 1 4915060Sgarrison # define WRITE 0 5015060Sgarrison 5115060Sgarrison #endif 5215904Srrh /* 5315904Srrh * Reference information 5415904Srrh */ 5515904Srrh struct refinfo{ 5616244Srrh char *ri_ref; /* actual value, base value */ 5715904Srrh char *ri_cite; /* citation string */ 5816244Srrh char ri_disambig[2]; /* disambiguation string */ 5915904Srrh int ri_length; /* length of reference string, plus null */ 6015904Srrh long int ri_pos; /* reference seek position */ 6115904Srrh int ri_n; /* number of citation in pass1 */ 6215904Srrh struct refinfo *ri_hp; /* hash chain */ 6315904Srrh }; 6415904Srrh struct wordinfo{ 6515904Srrh char *wi_word; /* actual word */ 6615904Srrh char *wi_def; /* actual definition */ 6715904Srrh int wi_length; /* word length */ 6815904Srrh struct wordinfo *wi_hp; /* hash chain */ 6915904Srrh }; 7015904Srrh int strhash(); 7115904Srrh #define HASHSIZE 509 7215904Srrh 7315904Srrh #define reg register 74