(mlvdv)
SCCS-vsn: contrib/bib/src/bib.c 2.10
SCCS-vsn: contrib/bib/src/invert.c 2.6
-static char sccsid[] = "@(#)bib.c 2.9 %G%";
+static char sccsid[] = "@(#)bib.c 2.10 %G%";
#endif not lint
/*
Bib - bibliographic formatter
#endif not lint
/*
Bib - bibliographic formatter
long int rend = 1; /* last position in rfd (first char unused)*/
int numrefs = 0; /* number of references generated so far */
FILE *tfd; /* output of pass 1 of file(s) */
long int rend = 1; /* last position in rfd (first char unused)*/
int numrefs = 0; /* number of references generated so far */
FILE *tfd; /* output of pass 1 of file(s) */
- char tmpfile[] = TMPTEXTFILE ; /* output of pass 1 */
+ char bibtmpfile[] = TMPTEXTFILE ; /* output of pass 1 */
char *common = COMFILE; /* common word file */
int findex = false; /* can we read the file INDEX ? */
char *common = COMFILE; /* common word file */
int findex = false; /* can we read the file INDEX ? */
#ifndef INCORE
/* open temporaries, reffile will contain references collected in
#ifndef INCORE
/* open temporaries, reffile will contain references collected in
- pass 1, and tmpfile will contain text.
+ pass 1, and bibtmpfile will contain text.
*/
mktemp(reffile);
rfd = fopen(reffile,"w+");
*/
mktemp(reffile);
rfd = fopen(reffile,"w+");
error("can't open temporary reference file, %s", reffile);
putc('x', rfd); /* put garbage in first position (not used) */
#endif not INCORE
error("can't open temporary reference file, %s", reffile);
putc('x', rfd); /* put garbage in first position (not used) */
#endif not INCORE
- mktemp(tmpfile);
- tfd = fopen(tmpfile,"w");
+ mktemp(bibtmpfile);
+ tfd = fopen(bibtmpfile,"w");
- error("can't open temporary output file, %s", tmpfile);
+ error("can't open temporary output file, %s", bibtmpfile);
/*
pass1 - read files, looking for citations
/*
pass1 - read files, looking for citations
- tfd = fopen(tmpfile,"r");
+ tfd = fopen(bibtmpfile,"r");
- error("can't open temporary output file %s for reading", tmpfile);
+ error("can't open temporary output file %s for reading", bibtmpfile);
/*
pass 2 - reread files, replacing references
*/
/*
pass 2 - reread files, replacing references
*/
unlink(reffile);
#endif INCORE
#ifndef DEBUG
unlink(reffile);
#endif INCORE
#ifndef DEBUG
#endif DEBUG
exit(val);
}
#endif DEBUG
exit(val);
}
-static char sccsid[] = "@(#)invert.c 2.5 %G%";
+static char sccsid[] = "@(#)invert.c 2.6 %G%";
#endif not lint
#
/* input: records of lines, separated by blank lines
#endif not lint
#
/* input: records of lines, separated by blank lines
char *INDEX= /* name of output file */
INDXFILE;
char *INDEX= /* name of output file */
INDXFILE;
-char *tmpfile = /* name of temporary file */
+char *bibtmpfile = /* name of temporary file */
INVTEMPFILE;
int silent = 0; /* 0 => statistics printed */
INVTEMPFILE;
int silent = 0; /* 0 => statistics printed */
argc= argcount-1;
argv= arglist+1;
argc= argcount-1;
argv= arglist+1;
- mktemp(tmpfile);
- output= fopen(tmpfile,"w");
+ mktemp(bibtmpfile);
+ output= fopen(bibtmpfile,"w");
for ( flags() ; argc>0 ; argc--, argv++ ,flags() )
{ /* open input file */
for ( flags() ; argc>0 ; argc--, argv++ ,flags() )
{ /* open input file */
- sprintf(sortcmd, sort_it, tmpfile, tmpfile);
+ sprintf(sortcmd, sort_it, bibtmpfile, bibtmpfile);
- distinct = shorten(tmpfile,INDEX);
+ distinct = shorten(bibtmpfile,INDEX);
if( silent == 0 )
fprintf(stderr,
"%d documents %d distinct keys %d key occurrences\n",
if( silent == 0 )
fprintf(stderr,
"%d documents %d distinct keys %d key occurrences\n",