diff options
| author | Paul Eggert | 2017-07-07 18:12:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-07-07 18:54:42 -0700 |
| commit | b8ead34f5df92b771520f4d090ff6cde49ca5705 (patch) | |
| tree | dcd9a862148a1814ba6598f635b22d1e35ec82da /lib-src | |
| parent | 1628305811247bd652099dad92f6498fc244d8dc (diff) | |
| download | emacs-b8ead34f5df92b771520f4d090ff6cde49ca5705.tar.gz emacs-b8ead34f5df92b771520f4d090ff6cde49ca5705.zip | |
Fix more ungetc bugs with encoding errors
* src/lread.c (infile): New variable, replacing ...
(instream): ... this. All uses changed.
(readbyte_from_stdio): New function, which deals with lookahead.
(readbyte_from_file, Fget_file_char): Use it.
(Fget_file_char): When misused, signal an error instead of
relying on undefined behavior.
(close_infile_unwind): New function.
(Fload): Use it.
(readevalloop): 2nd arg is now struct infile *, not FILE *.
All callers changed.
(read1): Handle lookahead when copying doc strings with
encoding errors.
Diffstat (limited to 'lib-src')
0 files changed, 0 insertions, 0 deletions