bug fixes for anybody still using 8.1

mathog at seqaxp.bio.caltech.edu mathog at seqaxp.bio.caltech.edu
Wed Mar 1 13:13:45 EST 2000

For any of you who still have GCG 8.1 around, here are the fixes for two
bugs which I recently uncovered.  After making the changes shown below
rebuild the object modules and then the shared libraries after making the
changes.  The VMS commands were:

$ gcgsupport
$ cc 'gencflags' formoutput
$ cc 'gencflats' specialfileio
$ lib/object genoblib:genlib.olb formatout.obj,specialfileio.obj
$ makeshare

The GCG programs did not need to be relinked for the changes to take

1.  formoutput.c has a Y2K bug resulting in the year 2000 coming out as
"19100".  Change:

 sprintf(string, "%s %2d, 19%02d %02d:%02d:%02d.%02d"
  months[(int)tmP->tm_mon], (int)tmP->tm_mday, (int)tmP->tm_year,


 sprintf(string, "%s %2d, %04d %02d:%02d:%02d.%02d",
  months[(int)tmP->tm_mon], (int)tmP->tm_mday, 1900+(int)tmP->tm_year,

2. The mark file examples all use "!" as a comment delimiter, but
the application code is actually looking for "*".  This results in
the following two lines from a mark file generating marks from 100 to 200
when no marks are expected: 

!50  100
!150 200

The GCG supplied examples all worked not because they were syntactically 
correct, but because none had integers following the "!". Since it's
possible that some function somewhere depends upon "*" working as a comment
the fix adds "!" as a second comment delimiter.  That is, if no comment
delimiter is found the code continues to process tokens and emits integers
when found, ignoring everything else. 

Change both instances of the following in specialfileio.c:

  if (token[0] != '*') {


  if (token[0] != '*' && token[0] != '!') {


David Mathog
mathog at seqaxp.bio.caltech.edu
Manager, sequence analysis facility, biology division, Caltech 

More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net