* charset.c: Fix file descriptor leaks and errno issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 02:12:59 +0000 (19:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Jul 2013 02:12:59 +0000 (19:12 -0700)
commitf4b1eb36186a2f873d84d4c089292f9fb0394d31
treeea6a4d904679b9f50026abb6dfab00f9b693eb6a
parenta0931322f6c257bb4a4a678f62dcb4ae3b253221
* charset.c: Fix file descriptor leaks and errno issues.

Include <errno.h>.
(load_charset_map_from_file): Don't leak file descriptor on error.
Use plain record_xmalloc since the allocation is larger than
MAX_ALLOCA; that's simpler here.  Simplify test for exhaustion
of entries.
* eval.c (record_unwind_protect_nothing):
* fileio.c (fclose_unwind):
New functions.
* lread.c (load_unwind): Remove.  All uses replaced by fclose_unwind.
The replacement doesn't block input, but that no longer seems
necessary.
src/ChangeLog
src/charset.c
src/eval.c
src/fileio.c
src/lisp.h
src/lread.c