summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* * lisp.h (DEFINE_FUNC): Make sname 'static'.Paul Eggert2011-04-102-1/+4
|
* Make Emacs functions such as Fatom 'static' by default.Paul Eggert2011-04-1057-411/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier for human readers (and static analyzers) to see whether these functions can be called from other modules. DEFUN now defines a static function. To make the function external so that it can be used in other C modules, use the new macro DEFUE. * lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN. (DEFUN): Rewrite in terms of DEFINE_FUNC. It now generates a static function definition. Use DEFUE if you want an extern one. (DEFUE, INFUN): New macros. (Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library): (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer): (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute): (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes): Remove decls, since these functions are now static. (Funintern, Fget_internal_run_time): New decls, since these functions were already external. * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c: * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c: * fns.c, font.c, fontset.c, frame.c, image.c, indent.c: * keyboard.c, keymap.c, lread.c: * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c: * syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c: Mark functions with DEFUE instead of DEFUN, if they are used in other modules. * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward decls for now-static functions. * buffer.h (Fdelete_overlay): Remove decl. * callproc.c (Fgetenv_internal): Mark as internal. * composite.c (Fremove_list_of_text_properties): Remove decl. (Fcomposition_get_gstring): New forward static decl. * composite.h (Fcomposite_get_gstring): Remove decl. * dired.c (Ffile_attributes): New forward static decl. * doc.c (Fdocumntation_property): New forward static decl. * eval.c (Ffetch_bytecode): New forward static decl. (Funintern): Remove extern decl; now in .h file where it belongs. * fileio.c (Fmake_symbolic_link): New forward static decl. * image.c (Finit_image_library): New forward static decl. * insdel.c (Fcombine_after_change_execute): Make forward decl static. * intervals.h (Fprevious_property_change): (Fremove_list_of_text_properties): Remove decls. * keyboard.c (Fthis_command_keys): Remove decl. (Fcommand_execute): New forward static decl. * keymap.c (Flookup_key): New forward static decl. (Fcopy_keymap): Now static. * keymap.h (Flookup_key): Remove decl. * process.c (Fget_process): New forward static decl. (Fprocess_datagram_address): Mark as internal. * syntax.c (Fsyntax_table_p): New forward static decl. (skip_chars): Remove duplicate decl. * textprop.c (Fprevious_property_change): New forward static decl. * window.c (Fset_window_fringes, Fset_window_scroll_bars): Now internal. (Fset_window_margins, Fset_window_vscroll): New forward static decls. * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
* * editfns.c (Fformat): Remove unreachable code.Paul Eggert2011-04-102-7/+5
| | | | 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
* Fix more problems found by GCC 4.6.0's static checks.Paul Eggert2011-04-1029-141/+278
|\
| * Keep doprnt.c around for now, as we might revamp and reuse it.Paul Eggert2011-04-102-2/+282
| |
| * Merge from mainline.Paul Eggert2011-04-104-16/+27
| |\ | |/ |/|
* | use ssize_t and size_t for read- and write-like emacs_gnutls_* functionsJim Meyering2011-04-104-15/+26
| | | | | | | | | | | | | | | | | | * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like: return ssize_t not "int", and use size_t as the buffer length. (emacs_gnutls_write): Likewise, and make the buffer pointer "const". * gnutls.h: Update declarations. * process.c (read_process_output): Use ssize_t, to match. (send_process): Likewise.
| * Merge from mainline.Paul Eggert2011-04-092-37/+31
| |\ | |/ |/|
* | Cleanups to the ImageMagick code and docstrings.Chong Yidong2011-04-092-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/image-mode.el (image-toggle-display-image): Signal an error if not in Image mode. (image-transform-mode, image-transform-resize) (image-transform-set-rotation): Doc fix. (image-transform-set-resize): Deleted. (image-transform-set-scale, image-transform-fit-to-height) (image-transform-fit-to-width): Handle image-toggle-display-image and image-transform-resize directly. * src/image.c (Fimagemagick_types): Doc fix, and comment cleanup.
| * * xdisp.c (message_nolog): Bring this back, inside "#if 0".Paul Eggert2011-04-091-0/+18
| | | | | | | | See <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8435#26>.
| * * xdisp.c (vmessage): Use a better test for character truncation.Paul Eggert2011-04-092-6/+9
| |
| * * syntax.c (skip_chars): Likewise.Paul Eggert2011-04-092-4/+7
| |
| * * editfns.c (Fformat): Likewise.Paul Eggert2011-04-092-1/+2
| |
| * Mention potential integer overflow problems.Paul Eggert2011-04-091-1/+2
| |
| * * chartab.c: Use similar style as for other recent patches.Paul Eggert2011-04-091-2/+1
| |
| * * casetab.c (set_identity, shuffle): Likewise.Paul Eggert2011-04-092-4/+7
| |
| * * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.Paul Eggert2011-04-092-7/+10
| |
| * * charset.c (load_charset_map): <, not <=, for optimization.Paul Eggert2011-04-092-7/+10
| |
| * * xmenu.c (set_frame_menubar): Allocate smaller local vectors.Paul Eggert2011-04-092-10/+14
| | | | | | | | This also lets GCC 4.6.0 generate slightly better loop code.
| * * callint.c (Fcall_interactively): <, not <=, for optimization.Paul Eggert2011-04-092-18/+22
| | | | | | | | | | | | (Fcall_interactively): Count the number of arguments produced, not the number of arguments given. This is simpler and lets GCC 4.6.0 generate slightly better code.
| * * ftfont.c: Distingish more carefully between FcChar8 and char.Paul Eggert2011-04-092-10/+27
| | | | | | | | | | | | | | | | | | The previous code passed unsigned char * to a functions like strlen and xstrcasecmp that expect char *, which does not conform to the C standard. (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for arguments to FcPatternGetString, and explicitly cast FcChar8 * to char * when the C standard requires it.
| * * keyboard.c (read_char): Remove unused var.Paul Eggert2011-04-092-1/+2
| |
| * Merge from mainline.Paul Eggert2011-04-0919-564/+302
| |\ | |/ |/|
* | Merge from emacs-23; up to 2010-06-08T03:06:47Z!dann@ics.uci.edu.Glenn Morris2011-04-095-61/+72
|\ \
| * | Fix ChangeLog attribution.Glenn Morris2011-04-091-1/+1
| | | | | | | | | | | | | | | See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8450 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610576
| * | Fix more GCC strict-aliasing warnings.Chong Yidong2011-04-084-58/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use unsigned char, to match FcChar8 type definition. * src/xmenu.c (create_and_show_popup_menu): * src/xselect.c (x_decline_selection_request) (x_reply_selection_request): Avoid type-punned deref of X events.
| * | * xterm.c (handle_one_xevent): Avoid type-punned derefencing of X events.Chong Yidong2011-04-082-4/+8
| | |
* | | Replace some uses of `int' with EMACS_INT.Eli Zaretskii2011-04-099-79/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/search.c (string_match_1, fast_string_match) (fast_c_string_match_ignore_case, fast_string_match_ignore_case) (scan_buffer, find_next_newline_no_quit) (find_before_next_newline, search_command, Freplace_match) (Fmatch_data): Make some `int' variables be EMACS_INT. src/xdisp.c (display_count_lines): 3rd argument and return value now EMACS_INT. All callers changed. (pint2hrstr): Last argument is now EMACS_INT. src/coding.c (detect_coding_utf_8, detect_coding_emacs_mule) (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5) (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8) (decode_coding_utf_16, decode_coding_emacs_mule) (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5) (decode_coding_ccl, decode_coding_charset) <consumed_chars, consumed_chars_base>: Declare EMACS_INT. (decode_coding_iso_2022, decode_coding_emacs_mule) (decode_coding_sjis, decode_coding_big5, decode_coding_charset) <char_offset, last_offset>: Declare EMACS_INT. (encode_coding_utf_8, encode_coding_utf_16) (encode_coding_emacs_mule, encode_invocation_designation) (encode_designation_at_bol, encode_coding_iso_2022) (encode_coding_sjis, encode_coding_big5, encode_coding_ccl) (encode_coding_raw_text, encode_coding_charset) <produced_chars>: Declare EMACS_INT. (ASSURE_DESTINATION): Declare more_bytes EMACS_INT. (encode_invocation_designation): Last argument P_NCHARS is now EMACS_INT. (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT. (produce_chars): from_nchars and to_nchars are now EMACS_INT. src/coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT. All users changed. src/ccl.c (Fccl_execute_on_string): Declare some variables EMACS_INT.
* | | Merge changes from emacs-23 branchChong Yidong2011-04-083-5/+12
|\ \ \ | |/ /
| * | * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).Svante Signell2011-04-082-2/+5
| | |
| * | * process.c (Fformat_network_address): Doc fix.Christoph Scholtes2011-03-192-3/+7
| | |
* | | * src/xml.c (parse_region): Avoid creating spurious whiespace nodes.T.V. Raman2011-04-082-1/+5
| | | | | | | | | | | | See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00200.html
* | | * keyboard.c (syms_of_keyboard): Use DEFSYM macro.Chong Yidong2011-04-082-148/+72
| | |
* | | Remove internal_with_output_to_temp_buffer, replacing sole user with Lisp.Chong Yidong2011-04-085-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (help-form-show): New function, to be called from C. Put help-form output in a buffer named differently than *Help*. * src/keyboard.c (read_char): Call Lisp function help-form-show, instead of using internal_with_output_to_temp_buffer. (Qhelp_form_show): New var. * src/lisp.h (internal_with_output_to_temp_buffer): Remove prototype. * src/print.c (internal_with_output_to_temp_buffer): Function deleted.
* | | Remove list-processes C function; misc fixes to last change.Chong Yidong2011-04-062-239/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/process.c (Flist_processes): Removed to Lisp. (list_processes_1): Deleted. * lisp/emacs-lisp/cconv.el (cconv--analyse-use): Ignore "ignored" when issuing unused warnings. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Use lambda macro directly.
| | * * eval.c: Port to Windows vsnprintf (Bug#8435).Paul Eggert2011-04-082-17/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include <limits.h>. (SIZE_MAX): Define if the headers do not. (verror): Do not give up if vsnprintf returns a negative count. Instead, grow the buffer. This ports to Windows vsnprintf, which does not conform to C99. Problem reported by Eli Zaretskii. Also, simplify the allocation scheme, by avoiding the need for calling realloc, and removing the ALLOCATED variable.
| | * * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.Paul Eggert2011-04-062-1/+3
| | |
| | * Remove the doprnt implementation, as Emacs now uses vsnprintf.Paul Eggert2011-04-065-284/+8
| | |
| | * error: Print 32- and 64-bit integers portably (Bug#8435).Paul Eggert2011-04-0617-60/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change, on typical 64-bit hosts error ("...%d...", N) was used to print both 32- and 64-bit integers N, which relied on undefined behavior. * lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd): New macro. * lisp.h (error, verror): Mark as printf-like functions. * eval.c (verror): Use vsnprintf, not doprnt, to do the real work. Report overflow in size calculations when allocating printf buffer. Do not truncate output string at its first null byte. * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work. Truncate the output at a character boundary, since vsnprintf does not do that. * charset.c (check_iso_charset_parameter): Convert internal character to string before calling 'error', since %c now has the printf meaning. * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int overflow when computing char to be passed to 'error'. Do not pass Lisp_Object to 'error'; pass the integer instead. * nsfns.m (Fns_do_applescript): Use int, not long, since it's formatted with plain %d.
| | * * eval.c (internal_lisp_condition_case): Don't pass spurious arg.Paul Eggert2011-04-062-1/+3
| | |
| | * * keyboard.c (access_keymap_keyremap): Print func name, not garbage.Paul Eggert2011-04-062-1/+6
| | |
| | * * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.Paul Eggert2011-04-062-2/+5
| | |
| | * * xterm.c (x_catch_errors): Remove duplicate declaration.Paul Eggert2011-04-062-2/+2
| | |
| | * * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.Paul Eggert2011-04-062-1/+3
| | |
| | * * xdisp.c, lisp.h (message_nolog): Remove; unused.Paul Eggert2011-04-063-17/+4
| |/ |/|
* | Adapt the MS-DOS build to changes in gnulib.Eli Zaretskii2011-04-062-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | msdos/sedlibmk.inp: Update checklist. (am_libgnu_a_OBJECTS): Remove careadlinkat.$(OBJEXT). ($(top_builddir)/config.status): Edit away, both as target and in prerequisites. (@am__fastdepCC_FALSE@): Fix editing. (@GL_GENERATE_STDBOOL_H_TRUE@, @GL_GENERATE_STDBOOL_H_FALSE@) (@GL_GENERATE_STDDEF_H_TRUE@, @GL_GENERATE_STDDEF_H_FALSE@) (@GL_GENERATE_STDINT_H_TRUE@, @GL_GENERATE_STDINT_H_FALSE@): Edit to either nothing or "#". src/msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
* | Don't call gnulib's careadlinkat on Windows.Eli Zaretskii2011-04-062-2/+27
| | | | | | | | | | | | src/w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs. lib/makefile.w32-in ($(BLD)/careadlinkat.$(O), GNULIBOBJS): Revert last change.
* | Update and split ChangeLogs.Juanma Barranquero2011-04-062-31378/+31404
| |
* | Fix more problems found by GCC 4.6.0's static checks.Paul Eggert2011-04-0540-375/+453
|\ \
| * | doprnt, error, and verror are not printf-compatible.Paul Eggert2011-04-053-8/+5
| | |