[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system/3557: ci(1) throws error when it sees "\ No newline at end of file" from diff



The following reply was made to PR system/3557; it has been noted by GNATS.

From: Ted Unangst <tedu@zeitbombe.org>
To: David Corlette <corlette@ishi.arp.harvard.edu>
Cc: gnats@openbsd.org, GNATS Filer <gnats@cvs.openbsd.org>,
        bugs@cvs.openbsd.org
Subject: Re: system/3557: ci(1) throws error when it sees "\ No newline at
 end of file" from diff
Date: Thu, 6 Nov 2003 17:01:23 -0500 (EST)

 how's this work?
 
 Index: diffreg.c
 ===================================================================
 RCS file: /cvs/src/usr.bin/diff/diffreg.c,v
 retrieving revision 1.50
 diff -u -r1.50 diffreg.c
 --- diffreg.c	2003/09/07 07:53:01	1.50
 +++ diffreg.c	2003/11/06 22:00:23
 @@ -1119,8 +1119,8 @@
  		col = 0;
  		for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
  			if ((c = getc(lb)) == EOF) {
 -				puts("\n\\ No newline at end of file");
 -				return (0);;
 +				warnx("\n\\ No newline at end of file");
 +				return (0);
  			}
  			if (c == '\t' && tflag) {
  				do {
 
 -- 
 let's stop saying "don't quote me"
 because if no one quotes you
 you probably haven't said a thing worth saying