[net.unix] Newlines

bellas@ttidcb.UUCP (Pete Bellas) (10/24/85)

There was recently a discussion concerning text files not ending
with a newline.  I don't have an opinion on this, one way or the
other, but thought I should add a few more warnings.  Someone
mentioned that some utilities do not work correctly if the file
does not end in a newline (ex. diff will not compare the last line).

For those out there who use RCS, files that do not end in a newline
can cause a variety of errors.  These range from incorrect rebuilding
of previous revisions to RCS locking up in an infinite loop.  The
easiest way to prevent this is to make sure all files end in a newline
(this is only practicle if you have a set of scripts or programs that
do the RCS interface or hack RCS itself).  

There are some other RCS things to watch for, like zero length files.
These were all observed on pre-3.0 RCS (".v" files not ",v" files).
Anyone interested in a more detailed view of these drop me a line
and I will send you a list of what we have found.

				-Pete-

ps: We discovered these while developing an Automated Configuration
Management System using RCS as a delta creating utility.  We
currently have over 5000 files checked in to RCS with an average
of 30 revisions each.  On a smaller system these problems may
never be seen.

/<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>\
^									   ^
v   Pete Bellas		    "When it is not necessary to make a decision,  v
^   Citicorp TTI	     it	is necessary to	not make a decision."      ^
v   Santa Monica, CA		    Lord Faukland			   v
^									   ^
v   Path: ...!{randvax | trwrb | philabs | vortex}!ttidca!ttidcb!bellas	   v
\<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>/

mikes@3comvax.UUCP (Mike Shannon) (10/29/85)

sccs also barfs out when the file you admin/delta has no \n on
the last line.  but you don't find out until you try to 'get'!
-- 
			Michael Shannon {ihnp4,hplabs}!oliveb!3comvax!mikes