After reading an object, READ should skip whitespaces until it fints the

beginning of a new line, the EOF, or a new token. This way (READ-LINE)
at the prompt, produces the expected result instead of an empty line.
This commit is contained in:
jjgarcia 2002-11-23 15:42:09 +00:00
parent 6a653a966a
commit a6fea4e63e
8 changed files with 35 additions and 49 deletions

View file

@ -1037,7 +1037,6 @@ extern bool detect_eos_flag;
#endif
extern cl_object read_char(cl_object in);
extern void unread_char(cl_object c, cl_object in);
extern cl_object peek_char(bool pt, cl_object in);
extern cl_object read_object_non_recursive(cl_object in);
extern cl_object read_object(cl_object in);
extern cl_object parse_number(const char *s, cl_index end, cl_index *ep, int radix);

View file

@ -34,6 +34,21 @@ extern const struct {
short type;
} all_functions[];
/* file.d */
/*
* POSIX specifies that the "b" flag is ignored. This is good, because
* under MSDOS and Apple's OS we need to open text files in binary mode,
* so that we get both the carriage return and the linefeed characters.
* Otherwise, it would be complicated to implement file-position and
* seek operations.
*/
#define OPEN_R "rb"
#define OPEN_W "wb"
#define OPEN_RW "w+b"
#define OPEN_A "ab"
#define OPEN_RA "a+b"
#define CRLF
/* print.d */

View file

@ -47,22 +47,6 @@
# define PATH_SEPARATOR ':'
#endif /* MSDOS */
#if defined(MSDOS) || defined(cygwin) || defined(darwin)
# define OPEN_R "rb"
# define OPEN_W "wb"
# define OPEN_RW "w+b"
# define OPEN_A "ab"
# define OPEN_RA "a+b"
# define CRLF
#else
# define OPEN_R "r"
# define OPEN_W "w"
# define OPEN_RW "w+"
# define OPEN_A "a"
# define OPEN_RA "a+"
#endif /* MSDOS */
/***********************************************************************
Architectural features: