+2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dispnew.c: Make symbols static if they're not exported.
+ * dispextern.h (redraw_garbaged_frames, scrolling):
+ (increment_row_positions): Remove.
+ * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
+ (delayed_size_change, glyph_matrix_count, glyph_pool_count):
+ Now static.
+ (redraw_garbaged_frames): Remove; unused.
+
+ * xfaces.c: Make symbols static if they're not exported.
+ * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
+ Remove decls.
+ * xterm.h (defined_color): Remove decls.
+ (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
+ * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
+ (menu_face_changed_default, defined_color, free_realized_face):
+ (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
+ (ascii_face_of_lisp_face): Remove; unused.
+
+ * xdisp.c: Make symbols static if they're not exported.
+ * dispextern.h (scratch_glyph_row, window_box_edges):
+ (glyph_to_pixel_coords, set_cursor_from_row):
+ (get_next_display_element, set_iterator_to_next):
+ (highlight_trailing_whitespace, frame_to_window_pixel_xy):
+ (show_mouse_face): Remove decls
+ * frame.h (message_buf_print): Likewise.
+ * lisp.h (pop_message, set_message, check_point_in_composition):
+ Likewise.
+ * xterm.h (set_vertical_scroll_bar): Likewise.
+ * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
+ (message_buf_print, scratch_glyph_row, displayed_buffer):
+ (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
+ (get_next_display_element, show_mouse_face, window_box_edges):
+ (frame_to_window_pixel_xy, check_point_in_composition):
+ (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
+ (glyph_to_pixel_coords): Remove; unused.
+
+ * dired.c (file_name_completion): Now static.
+
+ * dbusbind.c (xd_in_read_queued_messages): Now static.
+
+ * lisp.h (circular_list_error, FOREACH): Remove; unused.
+ * data.c (circular_list_error): Remove.
+
+2011-04-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * commands.h (last_point_position, last_point_position_buffer):
+ (last_point_position_window): Remove decls.
+ * keyboard.c: Make these variables static.
+
+ * coding.h (coding, code_convert_region, encode_coding_gap): Remove
+ decls.
+ * coding.c (Vsjis_coding_system, Vbig5_coding_system):
+ (iso_code_class, detect_coding, code_convert_region): Now static.
+ (encode_coding_gap): Remove; unused.
+
+ * chartab.c (chartab_chars, chartab_bits): Now static.
+
+ * charset.h (charset_iso_8859_1): Remove decl.
+ * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
+ Now static.
+
+ * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
+ * ccl.c (Vccl_program_table): Now static.
+ (check_ccl_update): Remove; unused.
+
+ * category.c (SET_CATEGORY_SET, set_category_set): Move here.
+ * category.h: ... from here.
+ * category.c (check_category_table, set_category_set): Now static.
+
+ * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
+ * lisp.h: Remove these decls.
+
+ * buffer.c (buffer_count): Remove unused var.
+
+ * bidi.c (bidi_dump_cached_states): Mark as externally visible,
+ so that it's not optimized away.
+ (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
+ * dispextern.h (bidi_dump_cached_states): Remove, since it's
+ exported only to the debugger.
+
+ * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
+ * atimer.h (run_all_atimers): Removed; not exported.
+
+ font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
+ * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
+ was inaccessible from Lisp.
+ (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
+ * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
+
+ alloc.c: Import and export fewer symbols, and remove unused items.
+ * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
+ is defined.
+ (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
+ it's not optimized away by whole-program optimization.
+ (message_enable_multibyte, free_misc): Remove.
+ (catchlist, handlerlist, mark_backtrace):
+ Declare only if BYTE_MARK_STACK.
+ (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
+ * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
+ (message_enable_multibyte): Remove decl.
+ (free_misc, interval_free_list, float_block, float_block_index):
+ (n_float_blocks, float_free_list, cons_block, cons_block_index):
+ (cons_free_list, last_marked_index):
+ Now static.
+ (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
+ * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
+ (mark_backtrace): Define only if BYTE_MARK_STACK.
+ * xdisp.c (message_enable_multibyte): Now static.
+
+ Declare Lisp_Object Q* variables to be 'static' if not exproted.
+ This makes it easier for human readers (and static analyzers)
+ to see whether these variables are used from other modules.
+ * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
+ * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
+ * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
+ * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
+ * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
+ * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
+ * xmenu.c, xselect.c:
+ Declare Q* vars static if they are not used in other modules.
+ * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
+ * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
+ Remove decls of unexported vars.
+ * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
+
+ * lisp.h (DEFINE_FUNC): Make sname 'static'.
+
+ Make Emacs functions such as Fatom 'static' by default.
+ 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.
+
+2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * editfns.c (Fformat): Remove unreachable code.
+
+2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix more problems found by GCC 4.6.0's static checks.
+
+ * xdisp.c (vmessage): Use a better test for character truncation.
+
+ * charset.c (load_charset_map): <, not <=, for optimization,
+ and to avoid potential problems with integer overflow.
+ * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
+ * casetab.c (set_identity, shuffle): Likewise.
+ * editfns.c (Fformat): Likewise.
+ * syntax.c (skip_chars): Likewise.
+
+ * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
+ This also lets GCC 4.6.0 generate slightly better loop code.
+
+ * callint.c (Fcall_interactively): <, not <=, for optimization.
+ (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.
+ 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.
+
+ * eval.c: Port to Windows vsnprintf (Bug#8435).
+ 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.
+
+ Remove invocations of doprnt, as Emacs now uses vsnprintf.
+ But keep the doprint source code for now, as we might revamp it
+ and use it again (Bug#8435).
+ * lisp.h (doprnt): Remove.
+ * Makefile.in (base_obj): Remove doprnt.o.
+ * deps.mk (doprnt.o): Remove.
+
+ error: Print 32- and 64-bit integers portably (Bug#8435).
+ 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.
+
+ * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
+
+ * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
+
+ * xterm.c (x_catch_errors): Remove duplicate declaration.
+
+ * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
+
+ * xdisp.c, lisp.h (message_nolog): Remove; unused.
+
+2011-04-10 Jim Meyering <meyering@redhat.com>
+
+ use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
+ * 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.
+
+2011-04-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
+
+2011-04-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
+ unsigned char, to match FcChar8 type definition.
+
+ * xterm.c (handle_one_xevent):
+ * xmenu.c (create_and_show_popup_menu):
+ * xselect.c (x_decline_selection_request)
+ (x_reply_selection_request): Avoid type-punned deref of X events.
+
+2011-04-09 Eli Zaretskii <eliz@emacstest.gnu.org>
+
+ Fix some uses of `int' instead of EMACS_INT.
+ * 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.
+
+ * xdisp.c (display_count_lines): 3rd argument and return value now
+ EMACS_INT. All callers changed.
+ (pint2hrstr): Last argument is now EMACS_INT.
+
+ * 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.
+
+ * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
+ All users changed.
+
+ * ccl.c (Fccl_execute_on_string): Declare some variables
+ EMACS_INT.
+
+2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
+
+ * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
+
+2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
+
+ * process.c (Fformat_network_address): Doc fix.
+
+2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
+
+ * xml.c (parse_region): Avoid creating spurious whiespace nodes.
+
+2011-04-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * keyboard.c (read_char): Call Lisp function help-form-show,
+ instead of using internal_with_output_to_temp_buffer.
+ (Qhelp_form_show): New var.
+ (syms_of_keyboard): Use DEFSYM macro.
+
+ * print.c (internal_with_output_to_temp_buffer): Function deleted.
+
+ * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
+
2011-04-06 Chong Yidong <cyd@stupidchicken.com>
* process.c (Flist_processes): Removed to Lisp.