136 |
return(code_char(readc_stream(in))); |
return(code_char(readc_stream(in))); |
137 |
} |
} |
138 |
|
|
139 |
|
|
140 |
|
static object |
141 |
|
read_char_no_echo(object in) { |
142 |
|
|
143 |
|
int c; |
144 |
|
|
145 |
|
if (type_of(in)==t_stream && in->sm.sm_mode==smm_echo) { |
146 |
|
c = readc_stream(STREAM_INPUT_STREAM(in)); |
147 |
|
if (ECHO_STREAM_N_UNREAD(in) != 0) |
148 |
|
--(ECHO_STREAM_N_UNREAD(in)); |
149 |
|
return(code_char(c)); |
150 |
|
} else |
151 |
|
return(code_char(readc_stream(in))); |
152 |
|
|
153 |
|
} |
154 |
|
|
155 |
#define read_char(in) code_char(readc_stream(in)) |
#define read_char(in) code_char(readc_stream(in)) |
156 |
|
|
157 |
static void |
static void |
700 |
if (x == OBJNULL) |
if (x == OBJNULL) |
701 |
goto ENDUP; |
goto ENDUP; |
702 |
if (dot_flag) { |
if (dot_flag) { |
703 |
if (p == &vs_head) |
if (p == &vs_head) |
704 |
FEerror("A dot appeared after a left parenthesis.", 0); |
READER_ERROR(in,"A dot appeared after a left parenthesis."); |
705 |
in_list_flag = TRUE; |
delimiting_char = code_char(')'); |
706 |
*p = read_object(in); |
in_list_flag = TRUE; |
707 |
if (dot_flag) |
*p = read_object(in); |
708 |
FEerror("Two dots appeared consecutively.", 0); |
if (dot_flag) |
709 |
c = read_char(in); |
READER_ERROR(in,"Two dots appeared consecutively."); |
710 |
while (cat(c) == cat_whitespace) |
if (*p==OBJNULL) |
711 |
c = read_char(in); |
READER_ERROR(in,"Object missing after dot."); |
712 |
if (char_code(c) != ')') |
else { |
713 |
FEerror("A dot appeared before a right parenthesis.", 0); |
c = read_char(in); |
714 |
goto ENDUP; |
while (cat(c) == cat_whitespace) |
715 |
|
c = read_char(in); |
716 |
|
if (char_code(c) != ')') |
717 |
|
READER_ERROR(in,"Expecting right parenthesis after dot and object."); |
718 |
|
} |
719 |
|
goto ENDUP; |
720 |
} |
} |
721 |
vs_push(x); |
vs_push(x); |
722 |
*p = make_cons(x, Cnil); |
*p = make_cons(x, Cnil); |
2273 |
else |
else |
2274 |
end_of_stream(strm); |
end_of_stream(strm); |
2275 |
} |
} |
2276 |
c = read_char(strm); |
c = read_char_no_echo(strm); |
2277 |
unread_char(c, strm); |
unread_char(c, strm); |
2278 |
@(return c) |
@(return c) |
2279 |
} |
} |
2399 |
1, strng); |
1, strng); |
2400 |
@) |
@) |
2401 |
|
|
2402 |
@(defun read_byte (binary_input_stream |
/* @(defun read_byte (binary_input_stream */ |
2403 |
&optional (eof_errorp Ct) eof_value) |
/* &optional (eof_errorp Ct) eof_value) */ |
2404 |
int c; |
/* int c; */ |
2405 |
@ |
/* @ */ |
2406 |
check_type_stream(&binary_input_stream); |
/* check_type_stream(&binary_input_stream); */ |
2407 |
if (stream_at_end(binary_input_stream)) { |
/* if (stream_at_end(binary_input_stream)) { */ |
2408 |
if (eof_errorp == Cnil) |
/* if (eof_errorp == Cnil) */ |
2409 |
@(return eof_value) |
/* @(return eof_value) */ |
2410 |
else |
/* else */ |
2411 |
end_of_stream(binary_input_stream); |
/* end_of_stream(binary_input_stream); */ |
2412 |
} |
/* } */ |
2413 |
c = readc_stream(binary_input_stream); |
/* c = readc_stream(binary_input_stream); */ |
2414 |
@(return `make_fixnum(c)`) |
/* @(return `make_fixnum(c)`) */ |
2415 |
@) |
/* @) */ |
2416 |
|
|
2417 |
object |
object |
2418 |
read_byte1(strm,eof) |
read_byte1(strm,eof) |
2874 |
|
|
2875 |
make_function("PARSE-INTEGER", Lparse_integer); |
make_function("PARSE-INTEGER", Lparse_integer); |
2876 |
|
|
2877 |
make_function("READ-BYTE", Lread_byte); |
/* make_function("READ-BYTE", Lread_byte); */ |
2878 |
|
|
2879 |
make_function("COPY-READTABLE", Lcopy_readtable); |
make_function("COPY-READTABLE", Lcopy_readtable); |
2880 |
make_function("READTABLEP", Lreadtablep); |
make_function("READTABLEP", Lreadtablep); |