]> code.delx.au - gnu-emacs/commit
make-docfile cleanup for I/O, etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Feb 2016 19:40:09 +0000 (11:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Feb 2016 19:41:10 +0000 (11:41 -0800)
commit456c0a3137bf58ee61a8e442cff0ca5d808e8d32
tree398587e97c202c638ce360e5bba1ba636955e097
parent25ec995c064d4e658fe3f9af084f120ae21a021a
make-docfile cleanup for I/O, etc.

* lib-src/make-docfile.c (progname, generate_globals, num_globals)
(num_globals_allocated, globals): Now static.
(generate_globals, struct rcsoc_state, read_c_string_or_comment):
(write_c_args, scan_c_stream, search_lisp_doc_at_eol, scan_lisp_file):
Use bool for boolean.
(verror): New function.
(fatal, error): Use it.  API is now like printf.  All callers changed.
(main): Remove err_count local that was always 0.
(main, scan_c_stream, scan_lisp_file): Check for I/O error.
(scan_file, scan_c_file, scan_c_stream, scan_lisp_file):
Return void, not 0.
(put_char, scan_keyword_or_put_char, scan_c_file): Use char for byte.
(scan_keyword_or_put_char): Check for missing ( and unexpected EOF.
(close_emacs_globals): Use ptrdiff_t for index, not int.
(scan_c_file, scan_lisp_file): Exit with failure if file cannot be
opened, rather than diagnosing but exiting with status 0.
(search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's
portable now.
lib-src/make-docfile.c