diff options
author | Paul Smith <psmith@gnu.org> | 1999-03-31 23:25:13 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-03-31 23:25:13 +0000 |
commit | 7052a5715236b84ebe0b3011c4de75ce19c4ab5d (patch) | |
tree | 5b401afcb479f81fee107132c12ef745991f6579 | |
parent | 47922a5a659bfe49976bae8f9ce1e11a23006d29 (diff) | |
download | gunmake-7052a5715236b84ebe0b3011c4de75ce19c4ab5d.tar.gz |
* Ignore CR in CRLF line terminators for compatibility with DOSsy
makefiles.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | read.c | 11 |
3 files changed, 20 insertions, 5 deletions
@@ -1,3 +1,8 @@ +1999-03-31 Paul D. Smith <psmith@gnu.org> + + * read.c (readline): Ignore carriage returns at the end of the + line, to allow Windows-y CRLF line terminators. + 1999-03-30 Paul D. Smith <psmith@gnu.org> * configure.in: Don't put build.sh here, since build.sh.in doesn't @@ -1,6 +1,6 @@ GNU make NEWS -*-indented-text-*- History of user-visible changes. - 22 Mar 1999 + 31 Mar 1999 Copyright (C) 1992,93,94,95,96,97,98,1999 Free Software Foundation, Inc. See the end for copying conditions. @@ -21,6 +21,9 @@ Version 3.78 * Make defines a new variable, .LIBPATTERNS. This variable controls how the link library dependency expansion (dependencies like ``-lfoo'') is performed. + +* Make allows CRLF sequences as well as traditional LF, in makefiles for + UNIX. Version 3.77 @@ -682,7 +685,3 @@ Copyright information: Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. - -Local variables: -version-control: never -end: @@ -2129,6 +2129,17 @@ readline (linebuffer, stream, flocp) ++nlines; +#if !defined(WINDOWS32) && !defined(__MSDOS__) + /* Check to see if the line was really ended with CRLF; if so ignore + the CR. */ + if (len > 1 && p[-2] == '\r') + { + --len; + --p; + p[-1] = '\n'; + } +#endif + if (len == 1 && p > buffer) /* P is pointing at a newline and it's the beginning of the buffer returned by the last fgets call. However, |