[comp.text] BibTeX in C

ender@mtuxo.UUCP (01218-E.AYANOGLU) (11/16/87)

If someone has implemented or translated BibTeX in C,
I would like to get a copy.

Thanks in advance...

Ender Ayanoglu
ihnp4!mtdcb!ender		(via UUCP)
mtune!mtdcb!ender@rutgers.edu	(via Internet)
(201) 957-3734

rokicki@rocky.UUCP (11/17/87)

> If someone has implemented or translated BibTeX in C,
> I would like to get a copy.

A fully functional and freely redistributable BibTeX in C
is available from labrea.stanford.edu ([36.8.0.47]) in
pub/bibtex.c.Z.  Enjoy!

-tom

little@sdcsvax.UCSD.EDU (Glenn Little) (11/20/87)

  I replied personally to some queries about where I got bibtex in c.
  Some of the mail bounced on me.  For those people, and anyone else
  wondering, I got C bibtex via anonymous ftp from labrea.stanford.edu.
  The file was pub/bibtex.c.Z

			Glenn Little
			little@sdcsvax.ucsd.eduy

rokicki@rocky.STANFORD.EDU (Tomas Rokicki) (01/23/88)

Well, so much for beta testers.  Everyone who got bibtex.c from me
or anywhere else, get the latest, via anonymous ftp, from:

	labrea.stanford.edu:~ftp/pub/bibtex.c.Z

There was a rather serious bug, which somehow didn't show up in the
test cases that were run.  (I don't use bibtex, so how was I to know?)
Anyway, the diffs are here, for those who don't have access to ftp:

3134,3135c3134,3135
<       if ( ( ( poplit1 <= 0 ) || ( poplit2 == 0 ) || ( poplit2 > exbuflength 
<       ) || ( poplit2 + (int) exbuflength < 0 ) ) ) exbuflength = 0 ; 
---
>       if ( ( ( poplit1 <= 0 ) || ( poplit2 == 0 ) || ( (int) exbuflength - poplit2
>       < 0 ) || ( poplit2 + (int) exbuflength < 0 ) ) ) exbuflength = 0 ; 
5626c5626
<   tputs ( cnull , "This is BibTeX, C Version 0.98i\n" ) ;
---
>   tputs ( cnull , "This is BibTeX, C Version 0.98ib\n" ) ;

Note the renaming to 0.98ib.  As an aside, the bug illustrated by the
following code still exists in the VAX bsd 4.3 pcc compiler:

main() {
   int i = -1 ;
   unsigned short t = 44 ;

   if (i > (int)t)
      printf("Say what?\n") ;
}

-tom