[comp.os.vms] Big bug in RCS on Fall 90 Decus Tape

rtg2t@krebs.acc.Virginia.EDU (Richard T. Gregory) (03/03/91)

I have discovered a major bug in the RCS software that I contributed
to the Fall 90 DECUS tape.

The program GNUDIFF.EXE compares the incoming file to the text in the
RCS reference file and creates a special difference listing.  GNUDIFF
is only called from the CI program.  CI spawns RCS_DIFF.COM which
invokes GNUDIFF.EXE.

GNUDIFF is similar to VMS Difference's /SLP option but it uses a
slightly different syntax.  I discovered that GNUDIFF behaves
erratically when reading text files created with EDT or EVE (an "EDT"
file).  GNUDIFF works fine with stream-linefeed files which are the
text files created by the text editor microEmacs.  I use microEmacs so
I ddn't catch this bug till last week.  

Stream line feed files are the type of file that is created with the C
statement:

filepointer = fopen( filename, "w");

An "EDT" format file is created with this fopen statement

filepointer = fopen( filename, "w", "rat=cr", "rfm=var");

The behavior of the RCS system will be normal UNTIL the user tries to
retrieve an older version of a file.  The delta information will be
flawed in the RCS reference file and the user will be unable to
retrieve the correct version.  I also discovered that fwrite() behaves
erratically when writing to an "EDT" file.

The most recent version of the source stored in the RCS reference file
will be stored correctly.

I have no predictions for when I will have time to adapt GNUDIFF to
handle "EDT" text files.  It would also be possible to teach CO.EXE to
read VMS/Diff's "SLP" format.  I would welcome anyone else to contact
me when they have this problem solved.  GNUDIFF was not distributed
with the RCS source because there were so few changes needed to go from
the unix version to the VMS version.  I obtained the source by
anonymous ftp from prep.ai.mit.edu

rich gregory
rtg2t@krebs.acc.virginia.edu