summaryrefslogtreecommitdiff
path: root/lib-src/make-docfile.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* * lib-src/make-docfile.c (search_lisp_doc_at_eol): Use int rather than charGlenn Morris2013-10-091-1/+1
| | | | | | with getc. Fixes: debbugs:15481
* Port to C89.Paul Eggert2013-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/ebrowse.c (USAGE): Remove macro with too-long string literal ... (usage_message): ... and replace it with this new static constant containing multiple literals. All uses changed. * lib-src/emacsclient.c (print_help_and_exit): Rewrite to avoid string literals longer than the C89 limits. (start_daemon_and_retry_set_socket): Rewrite to avoid non-constant array initializer. * lib-src/make-docfile.c (enum global_type): Omit trailing comma. * src/bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__. (B__dummy__): New dummy symbol, to pacify C89. * src/dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since they can't grok varargs macros. * src/dispnew.c (add_window_display_history) (add_frame_display_history): * src/print.c (print_object): * src/xdisp.c (debug_method_add): Use %p printf format only for void pointers. * src/emacs.c (usage_message): New constant, replacing ... (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89. (main): Adjust to usage reorg. * src/fns.c (syms_of_fns): * src/profiler.c (syms_of_profiler): Don't use non-constant struct initializers. * src/gnutls.h (gnutls_initstage_t): * src/lisp.h (enum Lisp_Fwd_Type): * src/lread.c (lisp_file_lexically_bound_p): * src/xsettings.c (anonymous enum): Remove trailing comma. * src/xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism. * src/lisp.h (ENUM_BF): Use unsigned if pedantic. (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99. (DEFUN): Use it. * src/regex.c (const_re_char): New type, to pacify strict C89. All uses of 'const re_char' replaced to use it. * src/regex.h (_Restrict_): Rename from __restrict, to avoid clash with glibc when strict C89. This change is imported from gnulib. All uses changed. (_Restrict_arr_): Rename from __restrict_arr, similarly. * src/sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]: Omit GNU_LINUX implementation, since it requires long long. * src/xterm.c (x_draw_underwave): Do not assume the traditional order of struct's members. (x_term_init): Rewrite to avoid the need for non-constant structure initializers.
* Prefer plain 'static' to 'static inline'.Paul Eggert2013-07-011-1/+1
| | | | | | | | | | I missed these instances of 'static inline' in an earlier sweep. * ebrowse.c (putstr): * etags.c (hash): * make-docfile.c (put_char): No longer inline. * etags.c (hash): Prefer int to unsigned when either will do. Fixes: debbugs:12541
* * make-docfile.c (search_lisp_doc_at_eol) [DEBUG]: Fix typo,Paul Eggert2013-05-051-2/+1
| | | | by removing references to no-longer-existing locals.
* * make-docfile.c (write_globals): Make it a bit clearer.Paul Eggert2013-01-151-2/+2
| | | | | | | This pacifies GCC 4.7.2 when Emacs is configured with --enable-link-time-optimization and --enable-gcc-warnings. Fixes: debbugs:13448
* Update copyright notices for 2013.Paul Eggert2013-01-011-2/+2
|
* Recognize that cp51932.el and eucjp-ms.el are loaded during dumpingGlenn Morris2012-10-201-1/+3
| | | | | | * src/lisp.mk (lisp): Add cp51932.el and eucjp-ms.el. * lib-src/make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el.
* Fix last changes in make-docfile.c.Eli Zaretskii2012-10-201-9/+16
| | | | | | lib-src/make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros. (scan_lisp_file): Only pass a .el file if its basename matches a known file in its entirety. Use IS_SLASH and DEF_ELISP_FILE.
* * make-docfile.c (scan_lisp_file): Add bounds checking.Andreas Schwab2012-10-201-11/+12
|
* Fix bug #12395 with doc strings silently omitted from DOC on MS-Windows.Eli Zaretskii2012-10-201-3/+30
| | | | | | | | | lib-src/make-docfile.c (scan_lisp_file): Barf if called with a .el file other than one of a small list of supported un-compiled files. lib-src/makefile.w32-in (lisp1, lisp2): Name .elc files wherever they exist. lisp/loadup.el: Update comment about uncompiled Lisp files.
* Make make-docfile.c consistent with src/keyboard.c.Fabrice Popineau2012-10-011-1/+3
| | | | | | | lib-src/make-docfile.c (write_globals): Special-case Fexit_recursive_edit and Fabort_recursive_edit as well, as functions that are _Noreturn, to be consistent with src/keyboard.c.
* Use bool for Emacs Lisp booleans.Paul Eggert2012-08-141-12/+8
| | | | | | | | | | | | | | | | | This is more natural, and on my platform (GCC 4.7.1 x86-64) it makes Emacs's text size .03% smaller and presumably a bit faster. * admin/merge-gnulib (GNULIB_MODULES): Add stdbool. This documents a new direct dependency; stdbool was already being used indirectly via other gnulib modules. * lib-src/make-docfile.c (enum global_type): Sort values roughly in decreasing alignment, except put functions last. (compare_globals): Use this new property of enum global_type. (write_globals): Use bool, not int, for booleans. * src/lisp.h: Include <stdbool.h>. (struct Lisp_Boolfwd, defvar_bool): * src/lread.c (defvar_bool): Use bool, not int, for Lisp booleans. * src/regex.c [!emacs]: Include <stdbool.h>. (false, true): Remove; <stdbool.h> does this for us now.
* Move IF_LINT from lisp.h to conf_post.hGlenn Morris2012-08-101-7/+0
| | | | | | | | * src/conf_post.h (IF_LINT, lint_assume): Move here from lisp.h. * src/lisp.h (IF_LINT, lint_assume): Move to conf_post.h. * lib-src/make-docfile.c (IF_LINT): * lib-src/emacsclient.c (IF_LINT): Remove (in config.h now).
* Remove some make-docfile.c undes that are no longer neededGlenn Morris2012-08-091-15/+10
| | | | | | * lib-src/make-docfile.c (main): (fopen) [!WINDOWSNT]: (chdir) [!DOS_NT]: No more need to undef.
* Move DIRECTORY_SEP from lisp.h to config.hGlenn Morris2012-08-091-11/+7
| | | | | | | | | | | | | * configure.ac (DIRECTORY_SEP): Move here from src/lisp.h. * src/lisp.h (DIRECTORY_SEP): Let configure set it. * nt/config.nt (DIRECTORY_SEP): Move here from src/lisp.h. * lib-src/movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): * lib-src/make-docfile.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): * lib-src/emacsclient.c (DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP): Remove (they are in config.h now).
* Simplify by avoiding confusing use of strncpy etc.Paul Eggert2012-07-101-1/+1
|
* * make-docfile.c (write_globals): Warn about duplicate functionAndreas Schwab2012-07-061-1/+7
| | | | definitions with differing signatures.
* * make-docfile.c (scan_c_file): Suppress GCC warning.Paul Eggert2012-07-031-1/+1
|
* Auto-generate EXFUN using make-docfileTom Tromey2012-07-031-14/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src * window.c (Fset_window_margins, Fset_window_fringes) (Fset_window_scroll_bars, Fset_window_vscroll): No longer static. * textprop.c (Fprevious_property_change): No longer static. * syntax.c (Fsyntax_table_p): No longer static. * process.c (Fget_process, Fprocess_datagram_address): No longer static. * keymap.c (Flookup_key, Fcopy_keymap): No longer static. * keyboard.c (Fcommand_execute): No longer static. Remove EXFUN. * insdel.c (Fcombine_after_change_execute): No longer static. * image.c (Finit_image_library): No longer static. * fileio.c (Fmake_symbolic_link): No longer static. * eval.c (Ffetch_bytecode): No longer static. * editfns.c (Fuser_full_name): No longer static. * doc.c: (Fdocumentation_property, Fsnarf_documentation): No longer static. * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer static. * dired.c (Ffile_attributes): No longer static. * composite.c (Fcomposition_get_gstring): No longer static. * callproc.c (Fgetenv_internal): No longer static. * ccl.h: Remove EXFUNs. * buffer.h: Remove EXFUNs. * dispextern.h: Remove EXFUNs. * intervals.h: Remove EXFUNs. * fontset.h: Remove EXFUN. * font.h: Remove EXFUNs. * dosfns.c (system_process_attributes): Remove EXFUN. * keymap.h: Remove EXFUNs. * lisp.h: Remove EXFUNs. * w32term.h: Remove EXFUNs. * window.h: Remove EXFUNs. * xsettings.h: Remove EXFUN. * xterm.h: Remove EXFUN. lib-src * make-docfile.c (enum global_type) <FUNCTION>: New constant. (struct global) <value>: New field. (add_global): Add 'value' argument. (compare_globals): Sort functions at the end. (close_emacs_globals): New function. (write_globals): Handle functions. (scan_c_file): Call add_global for DEFUN.
* Switch from NO_RETURN to C11's _Noreturn.Paul Eggert2012-06-241-2/+1
| | | | Fixes: debbugs:11750
* * make-docfile.c (search_lisp_doc_at_eol): Unget last readAndreas Schwab2012-06-081-1/+3
| | | | character.
* * lisp/emacs-lisp/byte-run.el (defmacro, defun): Move from C.Stefan Monnier2012-05-291-100/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (macro-declaration-function): Move var from C code. (macro-declaration-function): Define function with defalias. * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't handle defun/defmacro any more. * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature): Provide fallback for unknown arglist. (byte-compile-arglist-warn): Change calling convention. (byte-compile-output-file-form): Move print-vars binding. (byte-compile-output-docform): Simplify accordingly. (byte-compile-file-form-defun, byte-compile-file-form-defmacro) (byte-compile-defmacro-declaration): Remove. (byte-compile-file-form-defmumble): Generalize to defalias. (byte-compile-output-as-comment): Return byte-positions. Simplify callers accordingly. (byte-compile-lambda): Use `assert'. (byte-compile-defun, byte-compile-defmacro): Remove. (byte-compile-file-form-defalias): Use byte-compile-file-form-defmumble. (byte-compile-defalias-warn): Remove. * src/eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function): Move to byte-run.el. (Fautoload): Do the hash-doc more carefully. * src/data.c (Fdefalias): Purify definition, except for keymaps. (Qdefun): Move from eval.c. * src/lisp.h (Qdefun): Remove. * src/lread.c (read1): Tiny simplification. * lib-src/make-docfile.c: Improve comment style. (search_lisp_doc_at_eol): New function. (scan_lisp_file): Use it.
* Fixes: debbugs:11380Andreas Schwab2012-04-291-1/+1
| | | | | * make-docfile.c (scan_lisp_file) [DEBUG]: Also skip if and byte-code forms.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-12-301-1/+1
|
* * lib-src/make-docfile.c (scan_lisp_file): Treat defcustom like defvar.Glenn Morris2011-11-231-1/+3
| | | | * lisp/paths.el (rmail-file-name): Format doc-string for make-docfile.
* [ChangeLog]Paul Eggert2011-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | Use 'inline', not 'INLINE'. * configure.in, autogen/config.in (INLINE): Remove. [lib-src/ChangeLog] Use 'inline', not 'INLINE'. * etags.c (hash): Now inline unconditionally. * make-docfile.c (put_char): inline, not INLINE. [nt/ChangeLog] Use 'inline', not 'INLINE'. * config.nt (INLINE): Remove. [src/ChangeLog] Use 'inline', not 'INLINE'. * alloc.c, fontset.c (INLINE): Remove. * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c: * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c: * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline. * gmalloc.c (register_heapinfo): Use inline unconditionally. * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
* * make-docfile.c (IF_LINT): New macro, copied from emacsclient.c.Paul Eggert2011-04-011-1/+8
| | | | (write_c_args): Use it to suppress GCC warning.
* * make-docfile.c (scan_c_file): Refactor local variable decls to make their ↵Paul Eggert2011-02-251-9/+4
| | | | | | scope more accurate and to avoid a GCC -Wuninitialized diagnostic.
* * make-docfile.c (write_globals): Change char * to char const *Paul Eggert2011-02-251-1/+1
| | | | | to avoid a GCC "assignment discards qualifiers" diagnostic in some configurations.
* * make-docfile.c (input_buffer): Rename variables to avoid shadowing.Paul Eggert2011-02-211-8/+9
|
* Merge from mainline.Paul Eggert2011-02-211-1/+1
|\
| * * make-docfile.c (scan_c_file): Adapt to the new BVAR macro.Ben Key2011-02-211-1/+1
| |
* | Declare file-scope functions and variables static if not exported.Paul Eggert2011-02-211-21/+21
|/ | | | | | | | This is more consistent, and is nicer with gcc -Wstrict-prototypes. * ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c: * profile.c, test-distrib.c, update-game-score.c: Declare non-'main' functions and variables to be static. * ebrowse.c: Omit redundant function prototypes.
* * make-docfile.c (EMACS_INTEGER): Rename from EMACS_INT.Paul Eggert2011-02-081-3/+3
|
* Make globals.h a generated headerTom Tromey2011-02-081-2/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: Rebuild. * configure.in (NS_OBJC_OBJ): New subst. lib-src * make-docfile.c: Unconditionally include stdlib.h. (generate_globals): New global. (xrealloc): New function. (main): Handle '-g'. Call start_globals, write_globals. (scan_file): Conditionally call put_filename. (start_globals): New function. (struct global): New. (num_globals, globals): New globals. (add_global, compare_globals, write_globals): New functions. (scan_c_file): Update for "-g". (scan_lisp_file): Fail if "-g". (enum global_type): New. src * Makefile.in (NS_OBJC_OBJ): New variable. (base_obj): Rename from 'obj'. (obj): New variable. (globals.h, gl-stamp, $(obj)): New targets. (GLOBAL_SOURCES): New variable. * globals.h: Remove. * nsselect.m (Vselection_alist): Define. Reverts part of 2011-01-19T22:11:33Z!jan.h.d@swipnet.se. * buffer.c: Don't use "no_cell" for name of kill-buffer-hook's variable. * xselect.c (Vselection_alist): Define. Reverts part of 2011-01-19T23:32:42Z!eggert@cs.ucla.edu.
* make-docfile: don't corrupt heap for an invalid .elc fileJim Meyering2011-01-301-3/+9
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Check return values of some library calls.Paul Eggert2011-01-221-3/+10
|
* Merge from mainline.Paul Eggert2011-01-171-2/+0
|\
| * Nuke arch-tags.Glenn Morris2011-01-151-2/+0
| |
* | Merge from mainline.Paul Eggert2011-01-141-1/+1
|\|
| * Merge from emacs-23Stefan Monnier2011-01-141-1/+1
| |\
| | * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| | |
* | | Include <unistd.h> unilaterally.Paul Eggert2011-01-091-2/+0
|/ /
* | Fix compilation warnings.Dan Nicolaescu2010-10-031-2/+3
| | | | | | | | | | | | | | | | | | | | * lib-src/test-distrib.c (cool_read): * lib-src/movemail.c (main, concat): * lib-src/make-docfile.c (scan_file, write_c_args): * emacsclient.c (get_server_config): Fix -Wconversion warning. (egetenv): Move conditional definition earlier. (progname): Use const. * lib-src/sorted-doc.c (xstrdup): Use const.
* | Fix warnings produced by compiling with -Wwrite_strings (i.e. use const char *).Jan D2010-08-111-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * b2m.c (concat, fatal): Use const char*. (main): Don't assign labels a string literal. * ebrowse.c (struct member): filename, def_filename is const. (struct sym): filename, sfilename is const. (struct kw): name is const. (add_sym, yyerror, token_string, insert_keyword, main): Use const char*. * emacsclient.c (message, sock_err_message, send_to_emacs) (quote_argument, set_local_socket) (start_daemon_and_retry_set_socket): Use const char*. * etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes) (Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes) (Cplusplus_help, Cjava_suffixes, Cobol_suffixes, Cstar_suffixes) (Erlang_suffixes, Erlang_help, Forth_suffixes, Forth_help) (Fortran_suffixes, Fortran_help, HTML_suffixes, HTML_help) (Lisp_suffixes, Lisp_help, Lua_suffixes, Lua_help) (Makefile_filenames, Makefile_help, Objc_suffixes, Objc_help) (Pascal_suffixes, Pascal_help, Perl_suffixes, Perl_interpreters) (Perl_help, PHP_suffixes, PHP_help, plain_C_suffixses, PS_suffixes) (PS_help, Prolog_suffixes, Prolog_help, Python_suffixes, Python_help) (Scheme_suffixes, Scheme_help, TeX_suffixes, TeX_help, Texinfo_suffixes) (Texinfo_help, Yacc_suffixes, Yacc_help, auto_help, none_help) (no_lang_help, print_language_names) (get_language_from_interpreter, get_language_from_filename) (init, make_tag, struct C_stab_entry, write_classname, TEX_defenv) (TEX_decode_env, nocase_tail, savestr, savenstr, fatal, pfatal) (concat): Use const char*. * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use const char *. * movemail.c (fatal, error, concat): Use const char *. * pop.c (pop_multi_first, socket_connection, sendline): Use conat char*. * pop.h (pop_multi_first): Use const char *. (_ARGS): Remove. * sorted-doc.c (error, fatal, states): Use const char *. * update-game-score.c (get_prefix, write_scores, main): Use const char*.
* | * make-docfile.c (write_c_args): Warn for old-style empty arglist ().Juanma Barranquero2010-07-291-1/+7
| |
* | Add NO_RETURN specifiers to functions in lib-src.Dan Nicolaescu2010-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | * lib-src/update-game-score.c (usage): Add NO_RETURN specifier. * lib-src/movemail.c (fatal, pfatal_with_name, pfatal_and_delete): * lib-src/make-docfile.c (fatal): * lib-src/hexl.c (usage): * lib-src/fakemail.c (fatal): * lib-src/etags.c (fatal, suggest_asking_for_help, pfatal): * lib-src/emacsclient.c (fatal): * lib-src/b2m.c (fatal): Likewise.