From e241cfec556578be1d4cb17118cbe0f4d9e11497 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Sat, 23 Nov 2002 17:52:43 +0000 Subject: [PATCH] Fix a typo. In comma_reader, PEEK-CHAR should be called with the stream to be read. --- src/c/backq.d | 3 ++- src/c/read.d | 5 ++++- src/h/config.h.in | 4 ++++ src/h/internal.h | 1 - 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/c/backq.d b/src/c/backq.d index deede61d3..0fdbeaba5 100644 --- a/src/c/backq.d +++ b/src/c/backq.d @@ -257,7 +257,8 @@ cl_object comma_reader(cl_object in, cl_object c) if (backq_level <= 0) FEerror("A comma has appeared out of a backquote.", 0); - c = cl_peek_char(0); /* Read character but skip spaces & complain at EOF */ + /* Read character but skip spaces & complain at EOF */ + c = cl_peek_char(2,Ct,in); if (c == CODE_CHAR('@@')) { x = @'si::,@'; read_char(in); diff --git a/src/c/read.d b/src/c/read.d index a8f0ac1df..f99bd8657 100644 --- a/src/c/read.d +++ b/src/c/read.d @@ -1407,10 +1407,13 @@ do_read_delimited_list(cl_object d, cl_object strm) break; } } -#ifdef CRLF +#ifdef ECL_NEWLINE_IS_CRLF /* From \r\n, ignore \r */ if (cl_token->string.fillp > 0 && cl_token->string.self[cl_token->string.fillp-1] == '\r') cl_token->string.fillp--; +#endif +#ifdef ECL_NEWLINE_IS_LFCR /* From \n\r, ignore \r */ + cl_read_char(strm); #endif @(return copy_simple_string(cl_token) eof) @) diff --git a/src/h/config.h.in b/src/h/config.h.in index 8d1f2a274..c042b0a4a 100644 --- a/src/h/config.h.in +++ b/src/h/config.h.in @@ -129,6 +129,10 @@ typedef unsigned @CL_FIXNUM_TYPE@ cl_hashkey; /* float.h for epsilons, maximum real numbers, etc */ #undef HAVE_FLOAT_H +/* what characters are used to mark beginning of new line */ +#undef ECL_NEWLINE_IS_CRLF +#undef ECL_NEWLINE_IS_LFCR + /* * PARAMETERS: */ diff --git a/src/h/internal.h b/src/h/internal.h index f99228cce..e56136ca4 100644 --- a/src/h/internal.h +++ b/src/h/internal.h @@ -48,7 +48,6 @@ extern const struct { #define OPEN_RW "w+b" #define OPEN_A "ab" #define OPEN_RA "a+b" -#define CRLF /* print.d */