--- ray/src/common/fgetline.c 1990/03/22 20:43:32 1.3 +++ ray/src/common/fgetline.c 2003/02/25 02:47:21 2.3 @@ -1,15 +1,14 @@ -/* Copyright (c) 1989 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: fgetline.c,v 2.3 2003/02/25 02:47:21 greg Exp $"; #endif - /* * fgetline.c - read line with escaped newlines. * - * 10/4/89 + * External symbols declared in standard.h */ +#include "copyright.h" + #include @@ -23,6 +22,8 @@ register FILE *fp; register int c = EOF; while (--n > 0 && (c = getc(fp)) != EOF) { + if (c == '\r') + continue; if (c == '\n' && (cp == s || cp[-1] != '\\')) break; *cp++ = c;