113111Srrh /* 2*15904Srrh * @(#)bib.h 2.3 01/29/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 1812917Sgarrison 1912917Sgarrison /* file names */ 2012917Sgarrison 2112917Sgarrison /* output of invert, input file for references */ 2212917Sgarrison # define INDXFILE "INDEX" 2312917Sgarrison /* pass1 reference collection file */ 24*15904Srrh # define TMPREFFILE "/tmp/bibrXXXXXX" 2512917Sgarrison /* pass2 text collection file */ 26*15904Srrh # define TMPTEXTFILE "/tmp/bibpXXXXXX" 2712917Sgarrison /* temp file used in invert */ 28*15904Srrh # define INVTEMPFILE "/tmp/invertXXXXXX" 2912917Sgarrison /* common words */ 3012917Sgarrison # define COMFILE "/usr/lib/bmac/common" 3112917Sgarrison /* default system dictionary */ 3212917Sgarrison # define SYSINDEX "/usr/dict/papers/INDEX" 3312917Sgarrison /* where macro libraries live */ 3412917Sgarrison # define BMACLIB "/usr/lib/bmac" 3512917Sgarrison /* default style of references */ 3612917Sgarrison # define DEFSTYLE "/usr/lib/bmac/bib.stdsn" 3712917Sgarrison 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 52*15904Srrh /* 53*15904Srrh * Reference information 54*15904Srrh */ 55*15904Srrh struct refinfo{ 56*15904Srrh char *ri_ref; /* actual value */ 57*15904Srrh char *ri_cite; /* citation string */ 58*15904Srrh int ri_length; /* length of reference string, plus null */ 59*15904Srrh long int ri_pos; /* reference seek position */ 60*15904Srrh int ri_n; /* number of citation in pass1 */ 61*15904Srrh struct refinfo *ri_hp; /* hash chain */ 62*15904Srrh }; 63*15904Srrh struct wordinfo{ 64*15904Srrh char *wi_word; /* actual word */ 65*15904Srrh char *wi_def; /* actual definition */ 66*15904Srrh int wi_length; /* word length */ 67*15904Srrh struct wordinfo *wi_hp; /* hash chain */ 68*15904Srrh }; 69*15904Srrh int strhash(); 70*15904Srrh #define HASHSIZE 509 71*15904Srrh 72*15904Srrh #define reg register 73