🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4361

BibTeX in C

#4361
From: Tomas Rokicki
Date: Fri, 22 Jan 1988 18:00
32 lines
1458 bytes
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
Technical Details
Message-ID: <981@rocky.STANFORD.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!decvax!decwrl!labrea!rocky!rokicki

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!decvax!decwrl!labrea!rocky!rokicki
From: rokicki@rocky.STANFORD.EDU (Tomas Rokicki)
Newsgroups: comp.text
Subject: BibTeX in C
Message-ID: <981@rocky.STANFORD.EDU>
Date: 22 Jan 88 18:00:54 GMT
Organization: Stanford University Computer Science Department
Lines: 32