Mercurial > hg > octave-lyh
diff src/ls-oct-ascii.h @ 8087:7d19f4f70c61
ls-oct-ascii.{h,cc} (extract_keyword): accept \r as line ending character
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 08 Sep 2008 12:45:53 -0400 |
parents | a1dbe9d80eee |
children | ebf6f6a0f9a7 278afaecddd4 |
line wrap: on
line diff
--- a/src/ls-oct-ascii.h +++ b/src/ls-oct-ascii.h @@ -99,11 +99,11 @@ ; // Skip whitespace and the colon. is.putback (c); - if (c != '\n') + if (c != '\n' && c != '\r') is >> value; if (is) status = true; - while (is.get (c) && c != '\n') + while (is.get (c) && c != '\n' && c != '\r') ; // Skip to beginning of next line; break; } @@ -161,11 +161,11 @@ ; // Skip whitespace and the colon. is.putback (c); - if (c != '\n') + if (c != '\n' && c != '\r') is >> value; if (is) status = true; - while (is.get (c) && c != '\n') + while (is.get (c) && c != '\n' && c != '\r') ; // Skip to beginning of next line; return status; }