* syntax.c (syntax_temp): Define only if !__GNUC__.
[bpt/emacs.git] / src / ChangeLog
1 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 * syntax.c (syntax_temp): Define only if !__GNUC__.
4
5 * sound.c (current_sound_device, current_sound): Now static.
6
7 * search.c (searchbufs, searchbuf_head): Now static.
8
9 * scroll.c (scroll_cost): Remove; unused.
10 * dispextern.h (scroll_cost): Remove decl.
11
12 * region-cache.h (pp_cache): Mark as externally visible.
13
14 * process.c: Make symbols static if they're not exported.
15 (process_tick, update_tick, create_process, chan_process):
16 (Vprocess_alist, proc_buffered_char, datagram_access):
17 (fd_callback_data, send_process_frame, process_sent_to): Now static.
18 (deactivate_process): Mark defn as static, as well as decl.
19 * lisp.h (create_process): Remove decl.
20 * process.h (chan_process, Vprocess_alist): Remove decls.
21
22 * print.c: Make symbols static if they're not exported.
23 (print_depth, new_backquote_output, being_printed, print_buffer):
24 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
25 (print_interval, print_number_index, initial_stderr_stream):
26 Now static.
27 * lisp.h (Fprinc): Remove decl.
28 (debug_output_compilation_hack): Mark as externally visible.
29
30 * sysdep.c (croak): Move decl from here to syssignal.h.
31 * syssignal.h (croak): Put it here, so the API can be checked when
32 'croak' is called from dissociate_if_controlling_tty.
33
34 * minibuf.c: Make symbols static if they're not exported.
35 (minibuf_save_list, choose_minibuf_frame): Now static.
36 * lisp.h (choose_minibuf_frame): Remove decl.
37
38 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
39
40 * lread.c: Make symbols static if they're not exported.
41 (read_objects, initial_obarray, oblookup_last_bucket_number):
42 Now static.
43 (make_symbol): Remove; unused.
44 * lisp.h (initial_obarray, make_symbol): Remove decls.
45
46 * keyboard.c: Make symbols static if they're not exported.
47 (single_kboard, recent_keys_index, total_keys, recent_keys):
48 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
49 (this_single_command_key_start, echoing, last_auto_save):
50 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
51 (command_loop, echo_now, keyboard_init_hook, help_char_p):
52 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
53 (Vlispy_mouse_stem, double_click_count):
54 Now static.
55 (force_auto_save_soon): Define only if SIGDANGER.
56 (ignore_mouse_drag_p): Now static if
57 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
58 (print_help): Remove; unused.
59 (stop_character, last_timer_event): Mark as externally visible.
60 * keyboard.h (ignore_mouse_drag_p): Declare only if
61 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
62 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
63 * lisp.h (echoing): Remove decl.
64 (force_auto_save_soon): Declare only if SIGDANGER.
65 * xdisp.c (redisplay_window): Simplify code, to make it more
66 obvious that ignore_mouse_drag_p is not accessed if !defined
67 USE_GTK && !defined HAVE_NS.
68
69 * intervals.c: Make symbols static if they're not exported.
70 (merge_properties_sticky, merge_interval_right, delete_interval):
71 Now static.
72 * intervals.h (merge_interval_right, delete_interval): Remove decls.
73
74 2011-04-13 Paul Eggert <eggert@cs.ucla.edu>
75
76 * insdel.c: Make symbols static if they're not exported.
77 However, leave prepare_to_modify_buffer alone. It's never
78 called from outside this function, but that appears to be a bug.
79 (combine_after_change_list, combine_after_change_buffer):
80 (adjust_after_replace, signal_before_change): Now static.
81 (adjust_after_replace_noundo): Remove; unused.
82 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
83 (signal_before_change): Remove decls.
84
85 * indent.c (val_compute_motion, val_vmotion): Now static.
86
87 * image.c: Make symbols static if they're not exported.
88 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
89 if USE_GTK.
90 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
91 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
92
93 * fringe.c (standard_bitmaps): Now static.
94 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
95
96 * frame.c: Make symbols static if they're not exported.
97 (x_report_frame_params, make_terminal_frame): Now static.
98 (get_frame_param): Now static, unless HAVE_NS.
99 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
100 (x_get_resource_string): Remove; not used.
101 * frame.h (make_terminal_frame, x_report_frame_params):
102 (x_get_resource_string); Remove decls.
103 (x_fullscreen_adjust): Declare only if WINDOWSNT.
104 * lisp.h (get_frame_param): Declare only if HAVE_NS.
105
106 * font.c, fontset.c: Make symbols static if they're not exported.
107 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
108 (FACE_SUITABLE_FOR_CHAR_P): Use it.
109 * font.c (font_close_object): Now static.
110 * font.h (font_close_object): Remove.
111 * fontset.c (FONTSET_OBJLIST): Remove.
112 (free_realized_fontset) #if-0 the body, which does nothing.
113 (face_suitable_for_char_p): #if-0, as it's never called.
114 * fontset.h (face_suitable_for_char_p): Remove decl.
115 * xfaces.c (face_at_string_position): Use
116 FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
117 since 0 is always ASCII.
118
119 * fns.c (weak_hash_tables): Now static.
120
121 * fileio.c: Make symbols static if they're not exported.
122 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
123 (Vwrite_region_annotation_buffers): Now static.
124
125 * eval.c: Make symbols static if they're not exported.
126 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
127 * lisp.h (backtrace_list): Remove decl.
128
129 * emacs.c: Make symbols static if they're not exported.
130 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
131 (fatal_error_code, fatal_error_signal_hook, standard_args):
132 Now static.
133 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
134 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
135 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
136 * lisp.h (fatal_error_signal_hook): Remove decl.
137 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
138
139 * editfns.c: Move a (normally-unused) function to its only use.
140 * editfns.c, lisp.h (get_operating_system_release): Remove.
141 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
142 worth the hassle of breaking this out.
143
144 * xterm.c: Make symbols static if they're not exported.
145 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
146 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
147 (x_destroy_window, x_delete_display):
148 Now static.
149 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
150 (x_mouse_leave): Remove; unused.
151 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
152 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
153 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
154 Remove decls.
155 (x_mouse_leave): Declare only if WINDOWSNT.
156 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
157 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
158 USE_X_TOOLKIT.
159
160 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
161
162 * ftxfont.c: Make symbols static if they're not exported.
163 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
164 HAVE_FREETYPE.
165 * font.h (ftxfont_driver): Likewise.
166
167 * xfns.c: Make symbols static if they're not exported.
168 (x_last_font_name, x_display_info_for_name):
169 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
170 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
171 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
172 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
173 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
174 (last_show_tip_args): Now static.
175 (xic_defaut_fontset, xic_create_fontsetname): Define only if
176 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
177 (x_screen_planes): Remove; unused.
178 * dispextern.h (x_screen_planes): Remove decl.
179
180 * dispnew.c: Make symbols static if they're not exported.
181 * dispextern.h (redraw_garbaged_frames, scrolling):
182 (increment_row_positions): Remove.
183 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
184 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
185 Now static.
186 (redraw_garbaged_frames): Remove; unused.
187
188 * xfaces.c: Make symbols static if they're not exported.
189 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
190 Remove decls.
191 * xterm.h (defined_color): Remove decls.
192 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
193 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
194 (menu_face_changed_default, defined_color, free_realized_face):
195 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
196 (ascii_face_of_lisp_face): Remove; unused.
197
198 * xdisp.c: Make symbols static if they're not exported.
199 * dispextern.h (scratch_glyph_row, window_box_edges):
200 (glyph_to_pixel_coords, set_cursor_from_row):
201 (get_next_display_element, set_iterator_to_next):
202 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
203 (show_mouse_face): Remove decls
204 * frame.h (message_buf_print): Likewise.
205 * lisp.h (pop_message, set_message, check_point_in_composition):
206 Likewise.
207 * xterm.h (set_vertical_scroll_bar): Likewise.
208 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
209 (message_buf_print, scratch_glyph_row, displayed_buffer):
210 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
211 (get_next_display_element, show_mouse_face, window_box_edges):
212 (frame_to_window_pixel_xy, check_point_in_composition):
213 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
214 (glyph_to_pixel_coords): Remove; unused.
215
216 * dired.c (file_name_completion): Now static.
217
218 * dbusbind.c (xd_in_read_queued_messages): Now static.
219
220 * lisp.h (circular_list_error, FOREACH): Remove; unused.
221 * data.c (circular_list_error): Remove.
222
223 2011-04-11 Paul Eggert <eggert@cs.ucla.edu>
224
225 * commands.h (last_point_position, last_point_position_buffer):
226 (last_point_position_window): Remove decls.
227 * keyboard.c: Make these variables static.
228
229 * coding.h (coding, code_convert_region, encode_coding_gap): Remove
230 decls.
231 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
232 (iso_code_class, detect_coding, code_convert_region): Now static.
233 (encode_coding_gap): Remove; unused.
234
235 * chartab.c (chartab_chars, chartab_bits): Now static.
236
237 * charset.h (charset_iso_8859_1): Remove decl.
238 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
239 Now static.
240
241 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
242 * ccl.c (Vccl_program_table): Now static.
243 (check_ccl_update): Remove; unused.
244
245 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
246 * category.h: ... from here.
247 * category.c (check_category_table, set_category_set): Now static.
248
249 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
250 * lisp.h: Remove these decls.
251
252 * buffer.c (buffer_count): Remove unused var.
253
254 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
255 so that it's not optimized away.
256 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
257 * dispextern.h (bidi_dump_cached_states): Remove, since it's
258 exported only to the debugger.
259
260 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
261 * atimer.h (run_all_atimers): Removed; not exported.
262
263 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
264 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
265 was inaccessible from Lisp.
266 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
267 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
268
269 alloc.c: Import and export fewer symbols, and remove unused items.
270 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
271 is defined.
272 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
273 it's not optimized away by whole-program optimization.
274 (message_enable_multibyte, free_misc): Remove.
275 (catchlist, handlerlist, mark_backtrace):
276 Declare only if BYTE_MARK_STACK.
277 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
278 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
279 (message_enable_multibyte): Remove decl.
280 (free_misc, interval_free_list, float_block, float_block_index):
281 (n_float_blocks, float_free_list, cons_block, cons_block_index):
282 (cons_free_list, last_marked_index):
283 Now static.
284 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
285 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
286 (mark_backtrace): Define only if BYTE_MARK_STACK.
287 * xdisp.c (message_enable_multibyte): Now static.
288
289 Declare Lisp_Object Q* variables to be 'static' if not exproted.
290 This makes it easier for human readers (and static analyzers)
291 to see whether these variables are used from other modules.
292 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
293 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
294 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
295 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
296 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
297 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
298 * xmenu.c, xselect.c:
299 Declare Q* vars static if they are not used in other modules.
300 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
301 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
302 Remove decls of unexported vars.
303 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
304
305 * lisp.h (DEFINE_FUNC): Make sname 'static'.
306
307 Make Emacs functions such as Fatom 'static' by default.
308 This makes it easier for human readers (and static analyzers)
309 to see whether these functions can be called from other modules.
310 DEFUN now defines a static function. To make the function external
311 so that it can be used in other C modules, use the new macro DEFUE.
312 * lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN.
313 (DEFUN): Rewrite in terms of DEFINE_FUNC. It now generates a
314 static function definition. Use DEFUE if you want an extern one.
315 (DEFUE, INFUN): New macros.
316 (Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library):
317 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
318 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
319 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
320 Remove decls, since these functions are now static.
321 (Funintern, Fget_internal_run_time): New decls, since these functions
322 were already external.
323
324 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
325 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
326 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
327 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
328 * keyboard.c, keymap.c, lread.c:
329 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
330 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
331 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
332 Mark functions with DEFUE instead of DEFUN,
333 if they are used in other modules.
334 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
335 decls for now-static functions.
336 * buffer.h (Fdelete_overlay): Remove decl.
337 * callproc.c (Fgetenv_internal): Mark as internal.
338 * composite.c (Fremove_list_of_text_properties): Remove decl.
339 (Fcomposition_get_gstring): New forward static decl.
340 * composite.h (Fcomposite_get_gstring): Remove decl.
341 * dired.c (Ffile_attributes): New forward static decl.
342 * doc.c (Fdocumntation_property): New forward static decl.
343 * eval.c (Ffetch_bytecode): New forward static decl.
344 (Funintern): Remove extern decl; now in .h file where it belongs.
345 * fileio.c (Fmake_symbolic_link): New forward static decl.
346 * image.c (Finit_image_library): New forward static decl.
347 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
348 * intervals.h (Fprevious_property_change):
349 (Fremove_list_of_text_properties): Remove decls.
350 * keyboard.c (Fthis_command_keys): Remove decl.
351 (Fcommand_execute): New forward static decl.
352 * keymap.c (Flookup_key): New forward static decl.
353 (Fcopy_keymap): Now static.
354 * keymap.h (Flookup_key): Remove decl.
355 * process.c (Fget_process): New forward static decl.
356 (Fprocess_datagram_address): Mark as internal.
357 * syntax.c (Fsyntax_table_p): New forward static decl.
358 (skip_chars): Remove duplicate decl.
359 * textprop.c (Fprevious_property_change): New forward static decl.
360 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
361 Now internal.
362 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
363 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
364
365 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
366
367 * editfns.c (Fformat): Remove unreachable code.
368
369 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
370
371 Fix more problems found by GCC 4.6.0's static checks.
372
373 * xdisp.c (vmessage): Use a better test for character truncation.
374
375 * charset.c (load_charset_map): <, not <=, for optimization,
376 and to avoid potential problems with integer overflow.
377 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
378 * casetab.c (set_identity, shuffle): Likewise.
379 * editfns.c (Fformat): Likewise.
380 * syntax.c (skip_chars): Likewise.
381
382 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
383 This also lets GCC 4.6.0 generate slightly better loop code.
384
385 * callint.c (Fcall_interactively): <, not <=, for optimization.
386 (Fcall_interactively): Count the number of arguments produced,
387 not the number of arguments given. This is simpler and lets GCC
388 4.6.0 generate slightly better code.
389
390 * ftfont.c: Distingish more carefully between FcChar8 and char.
391 The previous code passed unsigned char * to a functions like
392 strlen and xstrcasecmp that expect char *, which does not
393 conform to the C standard.
394 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
395 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
396 char * when the C standard requires it.
397
398 * keyboard.c (read_char): Remove unused var.
399
400 * eval.c: Port to Windows vsnprintf (Bug#8435).
401 Include <limits.h>.
402 (SIZE_MAX): Define if the headers do not.
403 (verror): Do not give up if vsnprintf returns a negative count.
404 Instead, grow the buffer. This ports to Windows vsnprintf, which
405 does not conform to C99. Problem reported by Eli Zaretskii.
406 Also, simplify the allocation scheme, by avoiding the need for
407 calling realloc, and removing the ALLOCATED variable.
408
409 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
410
411 Remove invocations of doprnt, as Emacs now uses vsnprintf.
412 But keep the doprint source code for now, as we might revamp it
413 and use it again (Bug#8435).
414 * lisp.h (doprnt): Remove.
415 * Makefile.in (base_obj): Remove doprnt.o.
416 * deps.mk (doprnt.o): Remove.
417
418 error: Print 32- and 64-bit integers portably (Bug#8435).
419 Without this change, on typical 64-bit hosts error ("...%d...", N)
420 was used to print both 32- and 64-bit integers N, which relied on
421 undefined behavior.
422 * lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd):
423 New macro.
424 * lisp.h (error, verror): Mark as printf-like functions.
425 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
426 Report overflow in size calculations when allocating printf buffer.
427 Do not truncate output string at its first null byte.
428 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
429 Truncate the output at a character boundary, since vsnprintf does not
430 do that.
431 * charset.c (check_iso_charset_parameter): Convert internal
432 character to string before calling 'error', since %c now has the
433 printf meaning.
434 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
435 overflow when computing char to be passed to 'error'. Do not
436 pass Lisp_Object to 'error'; pass the integer instead.
437 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
438 formatted with plain %d.
439
440 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
441
442 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
443
444 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
445
446 * xterm.c (x_catch_errors): Remove duplicate declaration.
447
448 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
449
450 * xdisp.c, lisp.h (message_nolog): Remove; unused.
451
452 2011-04-10 Jim Meyering <meyering@redhat.com>
453
454 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
455 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
456 return ssize_t not "int", and use size_t as the buffer length.
457 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
458 * gnutls.h: Update declarations.
459 * process.c (read_process_output): Use ssize_t, to match.
460 (send_process): Likewise.
461
462 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
463
464 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
465
466 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
467
468 * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
469 unsigned char, to match FcChar8 type definition.
470
471 * xterm.c (handle_one_xevent):
472 * xmenu.c (create_and_show_popup_menu):
473 * xselect.c (x_decline_selection_request)
474 (x_reply_selection_request): Avoid type-punned deref of X events.
475
476 2011-04-09 Eli Zaretskii <eliz@emacstest.gnu.org>
477
478 Fix some uses of `int' instead of EMACS_INT.
479 * search.c (string_match_1, fast_string_match)
480 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
481 (scan_buffer, find_next_newline_no_quit)
482 (find_before_next_newline, search_command, Freplace_match)
483 (Fmatch_data): Make some `int' variables be EMACS_INT.
484
485 * xdisp.c (display_count_lines): 3rd argument and return value now
486 EMACS_INT. All callers changed.
487 (pint2hrstr): Last argument is now EMACS_INT.
488
489 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
490 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
491 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
492 (decode_coding_utf_16, decode_coding_emacs_mule)
493 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
494 (decode_coding_ccl, decode_coding_charset)
495 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
496 (decode_coding_iso_2022, decode_coding_emacs_mule)
497 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
498 <char_offset, last_offset>: Declare EMACS_INT.
499 (encode_coding_utf_8, encode_coding_utf_16)
500 (encode_coding_emacs_mule, encode_invocation_designation)
501 (encode_designation_at_bol, encode_coding_iso_2022)
502 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
503 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
504 Declare EMACS_INT.
505 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
506 (encode_invocation_designation): Last argument P_NCHARS is now
507 EMACS_INT.
508 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
509 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
510
511 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
512 All users changed.
513
514 * ccl.c (Fccl_execute_on_string): Declare some variables
515 EMACS_INT.
516
517 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
518
519 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
520
521 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
522
523 * process.c (Fformat_network_address): Doc fix.
524
525 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
526
527 * xml.c (parse_region): Avoid creating spurious whiespace nodes.
528
529 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
530
531 * keyboard.c (read_char): Call Lisp function help-form-show,
532 instead of using internal_with_output_to_temp_buffer.
533 (Qhelp_form_show): New var.
534 (syms_of_keyboard): Use DEFSYM macro.
535
536 * print.c (internal_with_output_to_temp_buffer): Function deleted.
537
538 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
539
540 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
541
542 * process.c (Flist_processes): Removed to Lisp.
543 (list_processes_1): Deleted.
544
545 2011-04-06 Eli Zaretskii <eliz@gnu.org>
546
547 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
548
549 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
550
551 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
552
553 Fix more problems found by GCC 4.6.0's static checks.
554
555 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
556
557 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
558
559 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
560
561 * xdisp.c (vmessage): Mark as a printf-like function.
562
563 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
564
565 * sound.c (sound_warning): Don't crash if arg contains a printf format.
566
567 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
568 printf-like functions.
569 (tiff_load): Add casts to remove these marks before passing them
570 to system-supplied API.
571
572 * eval.c (Fsignal): Remove excess argument to 'fatal'.
573
574 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
575 This avoids several warnings with gcc -Wstrict-overflow.
576 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
577 directly, rather than having caller test rule sign. This avoids
578 some unnecessary tests.
579 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
580 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
581 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
582
583 * xfont.c (xfont_text_extents): Remove var that was set but not used.
584 (xfont_open): Avoid unnecessary tests.
585
586 * composite.c (composition_gstring_put_cache): Use unsigned integer.
587
588 * composite.h, composite.c (composition_gstring_put_cache):
589 Use EMACS_INT, not int, for length.
590
591 * composite.h (COMPOSITION_DECODE_REFS): New macro,
592 breaking out part of COMPOSITION_DECODE_RULE.
593 (COMPOSITION_DECODE_RULE): Use it.
594 * composite.c (get_composition_id): Remove unused local vars,
595 by using the new macro.
596
597 * textprop.c (set_text_properties_1): Change while to do-while,
598 since the condition is always true at first.
599
600 * intervals.c (graft_intervals_into_buffer): Mark var as used.
601 (interval_deletion_adjustment): Return unsigned value.
602 All uses changed.
603
604 * process.c (list_processes_1, create_pty, read_process_output):
605 (exec_sentinel): Remove vars that were set but not used.
606 (create_pty): Remove unnecessary "volatile"s.
607 (Fnetwork_interface_info): Avoid possibility of int overflow.
608 (read_process_output): Do adaptive read buffering even if carryover.
609 (read_process_output): Simplify nbytes computation if buffered.
610
611 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
612
613 * syntax.c (scan_words): Remove var that was set but not used.
614 (update_syntax_table): Use unsigned instead of int.
615
616 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
617 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
618 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
619
620 * print.c (print_error_message): Avoid int overflow.
621
622 * font.c (font_list_entities): Redo for clarity,
623 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
624
625 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
626 (font_score): Avoid potential overflow in diff calculation.
627
628 * fns.c (substring_both): Remove var that is set but not used.
629 (sxhash): Redo loop for clarity and to avoid wraparound warning.
630
631 * eval.c (funcall_lambda): Rename local to avoid shadowing.
632
633 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
634 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
635 can always succeed if overflow has undefined behavior.
636
637 * search.c (boyer_moore, wordify): Remove vars set but not used.
638 (wordify): Omit three unnecessary tests.
639
640 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
641 All callers changed. This avoids the need for an unused var.
642
643 * casefiddle.c (casify_region): Remove var that is set but not used.
644
645 * dired.c (file_name_completion): Remove var that is set but not used.
646
647 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
648
649 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
650 (Finsert_file_contents): Remove unnecessary code checking fd.
651
652 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
653 Check for integer overflow on size calculations.
654
655 * buffer.c (Fprevious_overlay_change): Remove var that is set
656 but not used.
657
658 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
659 Remove vars that are set but not used.
660 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
661 (timer_check_2): Mark vars as initialized.
662
663 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
664
665 * image.c (lookup_image): Remove var that is set but not used.
666 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
667
668 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
669 that are set but not used.
670
671 * xfns.c (make_invisible_cursor): Don't return garbage
672 if XCreateBitmapFromData fails (Bug#8410).
673
674 * xselect.c (x_get_local_selection, x_handle_property_notify):
675 Remove vars that are set but not used.
676
677 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
678 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
679
680 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
681 Remove var that is set but not used.
682 (scroll_bar_windows_size): Now size_t, not int.
683 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
684 Check for overflow.
685
686 * xfaces.c (realize_named_face): Remove vars that are set but not used.
687 (map_tty_color) [!defined MSDOS]: Likewise.
688
689 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
690
691 * coding.c: Remove vars that are set but not used.
692 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
693 All callers changed.
694 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
695 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
696 (decode_coding_charset): Remove vars that are set but not used.
697
698 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
699 that is set but not used.
700
701 * print.c (print_object): Remove var that is set but not used.
702
703 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
704 The gnulib version avoids calling malloc in the usual case,
705 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
706 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
707 * filelock.c (current_lock_owner): Likewise.
708 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
709 * sysdep.c: Include allocator.h, careadlinkat.h.
710 (emacs_no_realloc_allocator): New static constant.
711 (emacs_readlink): New function.
712 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
713 ../lib/careadlinkat.h.
714
715 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
716
717 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
718 first non-nil return value).
719
720 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
721
722 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
723 if not defined (Bug#8403).
724
725 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
726
727 * xdisp.c (display_count_lines): Remove parameter `start',
728 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
729 (get_char_face_and_encoding): Remove parameter `multibyte_p',
730 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
731 (fill_stretch_glyph_string): Remove parameters `row' and `area',
732 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
733 and thereabouts. All callers changed.
734 (get_per_char_metric): Remove parameter `f', unused since
735 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
736
737 2011-04-02 Jim Meyering <meyering@redhat.com>
738
739 do not dereference NULL upon failed strdup
740 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
741 (ns_get_family): Likewise.
742
743 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
744
745 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
746
747 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
748
749 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
750 later (Bug#8403).
751
752 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
753
754 Add lexical binding.
755
756 * window.c (Ftemp_output_buffer_show): New fun.
757 (Fsave_window_excursion):
758 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
759
760 * lread.c (lisp_file_lexically_bound_p): New function.
761 (Fload): Bind Qlexical_binding.
762 (readevalloop): Remove `evalfun' arg.
763 Bind Qinternal_interpreter_environment.
764 (Feval_buffer): Bind Qlexical_binding.
765 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
766 Mark as dynamic.
767 (syms_of_lread): Declare `lexical-binding'.
768
769 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
770
771 * keyboard.c (eval_dyn): New fun.
772 (menu_item_eval_property): Use it.
773
774 * image.c (parse_image_spec): Use Ffunctionp.
775
776 * fns.c (concat, mapcar1): Accept byte-code-functions.
777
778 * eval.c (Fsetq): Handle lexical vars.
779 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
780 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
781 (FletX, Flet): Obey lexical binding.
782 (Fcommandp): Handle closures.
783 (Feval): New `lexical' arg.
784 (eval_sub): New function extracted from Feval. Use it almost
785 everywhere where Feval was used. Look up vars in lexical env.
786 Handle closures.
787 (Ffunctionp): Move from subr.el.
788 (Ffuncall): Handle closures.
789 (apply_lambda): Remove `eval_flags'.
790 (funcall_lambda): Handle closures and new byte-code-functions.
791 (Fspecial_variable_p): New function.
792 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
793 but without exporting it to Lisp.
794
795 * doc.c (Fdocumentation, store_function_docstring):
796 * data.c (Finteractive_form): Handle closures.
797
798 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
799 interactive spec.
800
801 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN): New
802 byte-codes.
803 (exec_byte_code): New function extracted from Fbyte_code to handle new
804 calling convention for byte-code-functions. Add new byte-codes.
805
806 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
807
808 * alloc.c (Fmake_symbol): Init new `declared_special' field.
809
810 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
811
812 * xdisp.c (redisplay_internal): Fix prototype.
813
814 2011-03-31 Eli Zaretskii <eliz@gnu.org>
815
816 * xdisp.c (SCROLL_LIMIT): New macro.
817 (try_scrolling): Use it when setting scroll_limit. Limit
818 scrolling to 100 screen lines.
819 (redisplay_window): Even when falling back on "recentering",
820 position point in the window according to scroll-conservatively,
821 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
822
823 (try_scrolling): When point is above the window, allow searching
824 as far as scroll_max, or one screenful, to compute vertical
825 distance from PT to the scroll margin position. This prevents
826 try_scrolling from unnecessarily failing when
827 scroll-conservatively is set to a value slightly larger than the
828 window height. Clean up the case of PT below the margin at bottom
829 of window: scroll_max can no longer be INT_MAX. When aggressive
830 scrolling is in use, don't let point enter the opposite scroll
831 margin as result of the scroll.
832 (syms_of_xdisp) <scroll-conservatively>: Document the
833 threshold of 100 lines for never-recentering scrolling.
834
835 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
836
837 * dispextern.h (move_it_by_lines):
838 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
839 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
840 (message_log_check_duplicate): Remove parameters `prev_bol' and
841 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
842 (redisplay_internal): Remove parameter `preserve_echo_area',
843 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
844
845 * indent.c (Fvertical_motion):
846 * window.c (window_scroll_pixel_based, Frecenter):
847 Don't pass `need_y_p' to `move_it_by_lines'.
848
849 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
850
851 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
852 steal a few bits to be more compact.
853 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
854 Remove unneeded casts.
855
856 * bytecode.c (Fbyte_code): CAR and CDR can GC.
857
858 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
859
860 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
861 binding" message (bug#7967).
862
863 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
864
865 Fix more problems found by GCC 4.6.0's static checks.
866
867 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
868 Remove unused local var.
869
870 * editfns.c (Fmessage_box): Remove unused local var.
871
872 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
873 (note_mode_line_or_margin_highlight, note_mouse_highlight):
874 Omit unused local vars.
875 * window.c (shrink_windows): Omit unused local var.
876 * menu.c (digest_single_submenu): Omit unused local var.
877 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
878 Omit unused local var.
879
880 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
881 Don't assume string length fits in int.
882 (keyremap_step, read_key_sequence): Use size_t for sizes.
883 (read_key_sequence): Don't check last_real_key_start redundantly.
884
885 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
886 instead of alloca (Bug#8344).
887
888 * eval.c (Fbacktrace): Don't assume nargs fits in int.
889 (Fbacktrace_frame): Don't assume nframes fits in int.
890
891 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
892
893 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
894 concerns.
895
896 * term.c (produce_glyphless_glyph): Remove unnecessary test.
897
898 * cm.c (calccost): Turn while-do into do-while, for clarity.
899
900 * keyboard.c (syms_of_keyboard): Use the same style as later
901 in this function when indexing through an array. This also
902 works around GCC bug 48267.
903
904 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
905
906 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
907
908 * chartab.c (sub_char_table_ref_and_range): Redo for slight
909 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
910
911 * keyboard.c, keyboard.h (num_input_events): Now size_t.
912 This avoids undefined behavior on integer overflow, and is a bit
913 more convenient anyway since it is compared to a size_t variable.
914
915 Variadic C functions now count arguments with size_t, not int.
916 This avoids an unnecessary limitation on 64-bit machines, which
917 caused (substring ...) to crash on large vectors (Bug#8344).
918 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
919 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
920 All variadic functions and their callers changed accordingly.
921 (struct gcpro.nvars): Now size_t, not int. All uses changed.
922 * data.c (arith_driver, float_arith_driver): Likewise.
923 * editfns.c (general_insert_function): Likewise.
924 * eval.c (struct backtrace.nargs, interactive_p)
925 (internal_condition_case_n, run_hook_with_args, apply_lambda)
926 (funcall_lambda, mark_backtrace): Likewise.
927 * fns.c (concat): Likewise.
928 * frame.c (x_set_frame_parameters): Likewise.
929 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
930 0 if not found, not -1. All callers changed.
931
932 * alloc.c (garbage_collect): Don't assume stack size fits in int.
933 (stack_copy_size): Now size_t, not int.
934 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
935
936 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
937
938 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
939 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
940 All callers changed.
941
942 * lisp.h (multibyte_char_to_unibyte):
943 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
944 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
945 * character.h (CHAR_TO_BYTE8):
946 * cmds.c (internal_self_insert):
947 * editfns.c (general_insert_function):
948 * keymap.c (push_key_description):
949 * search.c (Freplace_match):
950 * xdisp.c (message_dolog, set_message_1): All callers changed.
951
952 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
953
954 * keyboard.c (safe_run_hook_funcall): New function.
955 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
956 don't set the hook to nil, but remove the offending function instead.
957 (Qcommand_hook_internal): Remove, unused.
958 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
959 Vcommand_hook_internal.
960
961 * eval.c (enum run_hooks_condition): Remove.
962 (funcall_nil, funcall_not): New functions.
963 (run_hook_with_args): Call each function through a `funcall' argument.
964 Remove `cond' argument, now redundant.
965 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
966 (Frun_hook_with_args_until_failure): Adjust accordingly.
967 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
968
969 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
970
971 * dispextern.h (string_buffer_position): Remove declaration.
972
973 * print.c (strout): Remove parameter `multibyte', unused since
974 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
975
976 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
977 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
978 All callers changed.
979
980 * w32.c (_wsa_errlist): Use braces for struct initializers.
981
982 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
983 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
984 All callers changed.
985 (string_buffer_position): Likewise. Also, make static (it's never
986 used outside xdisp.c).
987 (cursor_row_p): Remove parameter `w', unused since
988 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
989 (decode_mode_spec): Remove parameter `precision', introduced during
990 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
991 All callers changed.
992
993 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
994
995 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
996
997 2011-03-27 Anders Lindgren <andlind@gmail.com>
998
999 * nsterm.m (ns_menu_bar_is_hidden): New variable.
1000 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
1001 (ns_update_auto_hide_menu_bar): New functions.
1002 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
1003 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
1004 ns_constrain_all_frames.
1005 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
1006 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
1007
1008 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
1009
1010 * nsmenu.m (runDialogAt): Remove argument to timer_check.
1011
1012 2011-03-27 Glenn Morris <rgm@gnu.org>
1013
1014 * syssignal.h: Replace RETSIGTYPE with void.
1015 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
1016 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
1017 Replace SIGTYPE with void everywhere.
1018 * s/usg5-4-common.h (SIGTYPE): Remove definition.
1019 * s/template.h (SIGTYPE): Remove commented out definition.
1020
1021 2011-03-26 Eli Zaretskii <eliz@gnu.org>
1022
1023 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
1024 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
1025
1026 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
1027
1028 * w32.c (read_unc_volume): Use parameter `henum', instead of
1029 global variable `wget_enum_handle'.
1030
1031 * keymap.c (describe_vector): Remove parameters `indices' and
1032 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
1033 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
1034
1035 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
1036
1037 * keyboard.c (timer_check): Remove parameter `do_it_now',
1038 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
1039 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
1040 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
1041
1042 * keyboard.c (read_char):
1043 * w32menu.c (w32_menu_display_help):
1044 * xmenu.c (show_help_event, menu_help_callback):
1045 Adjust calls to `show_help_echo'.
1046
1047 * gtkutil.c (xg_maybe_add_timer):
1048 * keyboard.c (readable_events):
1049 * process.c (wait_reading_process_output):
1050 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
1051
1052 * insdel.c (adjust_markers_gap_motion):
1053 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
1054 (gap_left, gap_right): Don't call it.
1055
1056 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
1057
1058 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
1059 incurred during fontification.
1060
1061 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
1062
1063 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
1064 (DEFVAR_PER_BUFFER): Don't pass it.
1065
1066 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
1067 (scrolling_window): Don't pass it.
1068
1069 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
1070
1071 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
1072
1073 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
1074 and `suffix'.
1075 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
1076 of variables specific to SELinux and computation of `encoded_absname'.
1077
1078 * image.c (XPutPixel): Remove unused variable `height'.
1079
1080 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
1081
1082 * unexw32.c (get_section_info): Remove unused variable `section'.
1083
1084 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
1085 (system_process_attributes): Remove unused variable `sess'.
1086 (sys_read): Remove unused variable `err'.
1087
1088 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
1089 (w32_wnd_proc): Remove unused variable `isdead'.
1090 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
1091 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
1092 (x_create_tip_frame): Remove unused variable `tem'.
1093
1094 * w32inevt.c (w32_console_read_socket):
1095 Remove unused variable `no_events'.
1096
1097 * w32term.c (x_draw_composite_glyph_string_foreground):
1098 Remove unused variable `width'.
1099
1100 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
1101
1102 * w32term.c (x_set_glyph_string_clipping):
1103 Don't pass uninitialized region to CombineRgn.
1104
1105 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
1106
1107 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
1108 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
1109 (Fx_close_connection): Remove unused variable `i'.
1110
1111 * w32font.c (w32font_draw): Return number of glyphs.
1112 (w32font_open_internal): Remove unused variable `i'.
1113 (w32font_driver): Add missing initializer.
1114
1115 * w32menu.c (utf8to16): Remove unused variable `utf16'.
1116 (fill_in_menu): Remove unused variable `items_added'.
1117
1118 * w32term.c (last_mouse_press_frame): Remove static global variable.
1119 (w32_clip_to_row): Remove unused variable `f'.
1120 (x_delete_terminal): Remove unused variable `i'.
1121
1122 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
1123 (NOTHING): Remove unused static global variable.
1124 (uniscribe_check_otf): Remove unused variable `table'.
1125 (uniscribe_font_driver): Add missing initializers.
1126
1127 2011-03-23 Julien Danjou <julien@danjou.info>
1128
1129 * term.c (Fsuspend_tty, Fresume_tty):
1130 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
1131 * window.c (temp_output_buffer_show):
1132 * insdel.c (signal_before_change):
1133 * frame.c (Fhandle_switch_frame):
1134 * fileio.c (Fdo_auto_save):
1135 * emacs.c (Fkill_emacs):
1136 * editfns.c (save_excursion_restore):
1137 * cmds.c (internal_self_insert):
1138 * callint.c (Fcall_interactively):
1139 * buffer.c (Fkill_all_local_variables):
1140 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
1141 Use Frun_hooks.
1142 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
1143 unconditionnaly since it does the check itself.
1144
1145 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
1146
1147 Fix more problems found by GCC 4.5.2's static checks.
1148
1149 * coding.c (encode_coding_raw_text): Avoid unnecessary test
1150 the first time through the loop, since we know p0 < p1 then.
1151 This also avoids a gcc -Wstrict-overflow warning.
1152
1153 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
1154 leading to a memory leak, possible in functions like
1155 load_charset_map_from_file that can allocate an unbounded number
1156 of objects (Bug#8318).
1157
1158 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
1159 that could (at least in theory) be that large.
1160
1161 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
1162 This is less likely to overflow, and avoids undefined behavior if
1163 overflow does occur. All callers changed. Use strtoul to scan
1164 for the unsigned long integer.
1165 (pint2hrstr): Simplify and tune code slightly.
1166 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
1167
1168 * scroll.c (do_scrolling): Work around GCC bug 48228.
1169 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
1170
1171 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
1172 This also avoids a warning with gcc -Wstrict-overflow.
1173 (validate_x_resource_name): Simplify count usage.
1174 This also avoids a warning with gcc -Wstrict-overflow.
1175
1176 * fileio.c (Fcopy_file): Report error if fchown or fchmod
1177 fail (Bug#8306).
1178
1179 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
1180
1181 * process.c (Fmake_network_process): Use socklen_t, not int,
1182 where POSIX says socklen_t is required in portable programs.
1183 This fixes a porting bug on hosts like 64-bit HP-UX, where
1184 socklen_t is wider than int (Bug#8277).
1185 (Fmake_network_process, server_accept_connection):
1186 (wait_reading_process_output, read_process_output):
1187 Likewise.
1188
1189 * process.c: Rename or move locals to avoid shadowing.
1190 (list_processes_1, Fmake_network_process):
1191 (read_process_output_error_handler, exec_sentinel_error_handler):
1192 Rename or move locals.
1193 (Fmake_network_process): Define label "retry_connect" only if needed.
1194 (Fnetwork_interface_info): Fix pointer signedness.
1195 (process_send_signal): Add cast to avoid pointer signedness problem.
1196 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
1197 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
1198
1199 Make tparam.h and terminfo.c consistent.
1200 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
1201 Include tparam.h instead, since it declares them.
1202 * cm.h (PC): Remove extern decl; tparam.h now does this.
1203 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
1204 * terminfo.c: Include tparam.h, to check interfaces.
1205 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
1206 (tparam): Adjust signature to match interface in tparam.h;
1207 this removes some undefined behavior. Check that outstring and len
1208 are zero, which they always are with Emacs.
1209 * tparam.h (PC, BC, UP): New extern decls.
1210
1211 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
1212 (xftfont_open): Rename locals to avoid shadowing.
1213
1214 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
1215 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
1216 (OTF_TAG_SYM): Omit macro if not needed.
1217 (ftfont_list): Remove unused local.
1218 (get_adstyle_property, ftfont_pattern_entity):
1219 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
1220 Rename locals to avoid shadowing.
1221
1222 * xfont.c (xfont_list_family): Mark var as initialized.
1223
1224 * xml.c (make_dom): Now static.
1225
1226 * composite.c (composition_compute_stop_pos): Rename local to
1227 avoid shadowing.
1228 (composition_reseat_it): Remove unused locals.
1229 (find_automatic_composition, composition_adjust_point): Likewise.
1230 (composition_update_it): Mark var as initialized.
1231 (find_automatic_composition): Mark vars as initialized,
1232 with a FIXME (Bug#8290).
1233
1234 character.h: Rename locals to avoid shadowing.
1235 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
1236 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
1237 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
1238 (BUF_DEC_POS): Be more systematic about renaming local temporaries
1239 to avoid shadowing.
1240
1241 * textprop.c (property_change_between_p): Remove; unused.
1242
1243 * intervals.c (interval_start_pos): Now static.
1244
1245 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
1246
1247 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
1248 Rename locals to avoid shadowing.
1249
1250 * sound.c (wav_play, au_play, Fplay_sound_internal):
1251 Fix pointer signedness.
1252 (alsa_choose_format): Remove unused local var.
1253 (wav_play): Initialize a variable to 0, to prevent undefined
1254 behavior (Bug#8278).
1255
1256 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
1257
1258 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
1259
1260 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
1261 clobbering (Bug#8298).
1262 * sysdep.c (sys_subshell): Likewise.
1263 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
1264
1265 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
1266 This should get cleaned up, so that child_setup has the
1267 same signature on all platforms.
1268
1269 * callproc.c (call_process_cleanup): Now static.
1270 (relocate_fd): Rename locals to avoid shadowing.
1271
1272 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
1273
1274 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
1275 not to be necessary, and produces flickering.
1276
1277 2011-03-20 Glenn Morris <rgm@gnu.org>
1278
1279 * config.in: Remove file.
1280
1281 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
1282
1283 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
1284 are now in src/globals.h.
1285 (syms_of_minibuf): Remove spurious & from previous change.
1286
1287 2011-03-20 Leo <sdl.web@gmail.com>
1288
1289 * minibuf.c (completing-read-function): New variable.
1290 (completing-read-default): Rename from completing-read.
1291 (completing-read): Call completing-read-function.
1292
1293 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
1294
1295 * xfaces.c (Fx_load_color_file):
1296 Read color file from absolute filename (bug#8250).
1297
1298 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
1299
1300 * makefile.w32-in: Update dependencies.
1301
1302 2011-03-17 Eli Zaretskii <eliz@gnu.org>
1303
1304 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
1305
1306 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
1307
1308 Fix more problems found by GCC 4.5.2's static checks.
1309
1310 * process.c (make_serial_process_unwind, send_process_trap):
1311 (sigchld_handler): Now static.
1312
1313 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
1314 That way, the code declares only the vars that it needs.
1315 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
1316 * s/cygwin.h (PTY_ITERATION): Likewise.
1317 * s/darwin.h (PTY_ITERATION): Likewise.
1318 * s/gnu-linux.h (PTY_ITERATION): Likewise.
1319
1320 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
1321 * process.c (allocate_pty): Don't declare stb unless it's needed.
1322
1323 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
1324 (CONSTANTLIM): Remove; unused.
1325 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
1326 Define only if needed.
1327
1328 * unexelf.c (unexec): Name an expression,
1329 to avoid gcc -Wbad-function-cast warning.
1330 Use a different way to cause a compilation error if anyone uses
1331 n rather than nn, a way that does not involve shadowing.
1332 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
1333
1334 * deps.mk (unexalpha.o): Remove; unused.
1335
1336 New file unexec.h, the (simple) interface for unexec (Bug#8267).
1337 * unexec.h: New file.
1338 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
1339 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
1340 Depend on unexec.h.
1341 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
1342 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
1343 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
1344 Change as necessary to match prototype in unexec.h.
1345
1346 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
1347 shadowing.
1348 (back_comment, skip_chars): Mark vars as initialized.
1349
1350 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
1351 Rename locals to avoid shadowing.
1352
1353 * lread.c (read1): Rewrite so as not to use empty "else".
1354 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
1355
1356 * print.c (Fredirect_debugging_output): Fix pointer signedess.
1357
1358 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
1359 warning when compiling print.c.
1360
1361 * font.c (font_unparse_fcname): Abort in an "impossible" situation
1362 instead of using an uninitialized var.
1363 (font_sort_entities): Mark var as initialized.
1364
1365 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
1366
1367 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
1368 pointers to constants.
1369 (font_parse_fcname): Remove unused vars.
1370 (font_delete_unmatched): Now static.
1371 (font_get_spec): Remove; unused.
1372 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
1373 (font_update_drivers, Ffont_get_glyphs, font_add_log):
1374 Rename or move locals to avoid shadowing.
1375
1376 * fns.c (require_nesting_list, require_unwind): Now static.
1377 (Ffillarray): Rename locals to avoid shadowing.
1378
1379 * floatfns.c (domain_error2): Define only if needed.
1380 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1381
1382 * alloc.c (mark_backtrace): Move decl from here ...
1383 * lisp.h: ... to here, so that it can be checked.
1384
1385 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
1386 (Fdefvar): Rewrite so as not to use empty "else".
1387 (lisp_indirect_variable): Name an expression,
1388 to avoid gcc -Wbad-function-cast warning.
1389 (Fdefvar): Rename locals to avoid shadowing.
1390
1391 * callint.c (quotify_arg, quotify_args): Now static.
1392 (Fcall_interactively): Rename locals to avoid shadowing.
1393 Use const pointer when appropriate.
1394
1395 * lisp.h (get_system_name, get_operating_system_release):
1396 Move decls here, to check interfaces.
1397 * process.c (get_operating_system_release): Move decl to lisp.h.
1398 * xrdb.c (get_system_name): Likewise.
1399 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
1400 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
1401 some of which prompt warnings from gcc -Wbad-function-cast.
1402 (Fformat_time_string, Fencode_time, Finsert_char):
1403 (Ftranslate_region_internal, Fformat):
1404 Rename or remove local vars to avoid shadowing.
1405 (Ftranslate_region_internal): Mark var as initialized.
1406
1407 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
1408 avoid shadowing.
1409
1410 * lisp.h (eassert): Check that the argument compiles, even if
1411 ENABLE_CHECKING is not defined.
1412
1413 * data.c (Findirect_variable): Name an expression, to avoid
1414 gcc -Wbad-function-cast warning.
1415 (default_value, arithcompare, arith_driver, arith_error): Now static.
1416 (store_symval_forwarding): Rename local to avoid shadowing.
1417 (Fmake_variable_buffer_local, Fmake_local_variable):
1418 Mark variables as initialized.
1419 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
1420
1421 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
1422 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
1423 Rename locals to avoid shadowing.
1424 (mark_stack): Move local variables into the #ifdef region where
1425 they're used.
1426 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
1427 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
1428 needed otherwise.
1429 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
1430 (GC_STRING_CHARS): Remove; not used.
1431 (Fmemory_limit): Cast sbrk's returned value to char *.
1432
1433 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
1434 avoids undefined behavior in theory.
1435
1436 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
1437
1438 Use functions, not macros, for up- and down-casing (Bug#8254).
1439 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
1440 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
1441 to use the following functions instead of these macros.
1442 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
1443 EMACS_INT, since callers assume the returned value fits in int.
1444 (upcase1): Likewise, for UPCASE_TABLE.
1445 (uppercasep, lowercasep, upcase): New static inline functions.
1446 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
1447 the race-condition problem in the old DOWNCASE.
1448
1449 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
1450 Rename locals to avoid shadowing.
1451 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
1452 (regex_compile, re_search_2, re_match_2_internal):
1453 Remove unused local vars.
1454 (FREE_VAR): Rewrite so as not to use empty "else",
1455 which gcc can warn about.
1456 (regex_compile, re_match_2_internal): Mark locals as initialized.
1457 (RETALLOC_IF): Define only if needed.
1458 (WORDCHAR_P): Likewise. This one is never needed, but is used
1459 only in a comment talking about a compiler bug, so put inside
1460 the #if 0 of that comment.
1461 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
1462 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
1463 Remove; unused.
1464
1465 * search.c (boyer_moore): Rename locals to avoid shadowing.
1466 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
1467 (PREV_CHAR_BOUNDARY): Likewise.
1468
1469 * search.c (simple_search): Remove unused var.
1470
1471 * dired.c (compile_pattern): Move decl from here ...
1472 * lisp.h: ... to here, so that it can be checked.
1473 (struct re_registers): New forward decl.
1474
1475 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
1476
1477 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
1478 All uses changed.
1479 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
1480 Rename locals to avoid shadowing.
1481 (Fvertical_motion): Mark locals as initialized.
1482
1483 * casefiddle.c (casify_object, casify_region): Now static.
1484 (casify_region): Mark local as initialized.
1485
1486 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
1487
1488 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
1489 New macros, so that the caller can use some names other than
1490 gcpro1, gcpro2, etc.
1491 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
1492 of the new macros.
1493 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
1494 argument, for consistency with GCPRO2_VAR, etc: it is now the
1495 prefix of the variable, not the variable itself. All uses
1496 changed.
1497 * dired.c (directory_files_internal, file_name_completion):
1498 Rename locals to avoid shadowing.
1499
1500 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
1501 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
1502 dired.c's scmp function, had undefined behavior.
1503 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
1504 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
1505 * buffer.h: ... to here, because these macros use current_buffer,
1506 and the new implementation with inline functions needs to have
1507 current_buffer in scope now, rather than later when the macros
1508 are used.
1509 (downcase, upcase1): New static inline functions.
1510 (DOWNCASE, UPCASE1): Reimplement using these functions.
1511 This avoids undefined behavior in expressions like
1512 DOWNCASE (x) == DOWNCASE (y), which previously suffered
1513 from race conditions in accessing the global variables
1514 case_temp1 and case_temp2.
1515 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
1516 * lisp.h (case_temp1, case_temp2): Remove their decls.
1517 * character.h (ASCII_CHAR_P): Move from here ...
1518 * lisp.h: ... to here, so that the inline functions mentioned
1519 above can use them.
1520
1521 * dired.c (directory_files_internal_unwind): Now static.
1522
1523 * fileio.c (file_name_as_directory, directory_file_name):
1524 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
1525 Now static.
1526 (file_name_as_directory): Use const pointers when appropriate.
1527 (Fexpand_file_name): Likewise. In particular, newdir might
1528 point at constant storage, so make it a const pointer.
1529 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
1530 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
1531 signedness issues.
1532 (Fset_file_times, Finsert_file_contents, auto_save_error):
1533 Rename locals to avoid shadowing.
1534
1535 * minibuf.c (choose_minibuf_frame_1): Now static.
1536 (Ftry_completion, Fall_completions): Rename or remove locals
1537 to avoid shadowing.
1538
1539 * marker.c (bytepos_to_charpos): Remove; unused.
1540
1541 * lisp.h (verify_bytepos, count_markers): New decls,
1542 so that gcc does not warn that these functions aren't declared.
1543
1544 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
1545 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
1546 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
1547 (copy_text): Remove unused local var.
1548
1549 * filelock.c (within_one_second): Now static.
1550 (lock_file_1): Rename local to avoid shadowing.
1551
1552 * buffer.c (fix_overlays_before): Mark locals as initialized.
1553 (fix_start_end_in_overlays): Likewise. This function should be
1554 simplified by using pointers-to-pointers, but that's a different
1555 matter.
1556 (switch_to_buffer_1): Now static.
1557 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
1558 (report_overlay_modification): Rename locals to avoid shadowing.
1559
1560 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
1561 Fix pointer signedness issue.
1562 (sys_subshell): Mark local as volatile if checking for lint,
1563 to suppress a gcc -Wclobbered warning that does not seem to be right.
1564 (MAXPATHLEN): Define only if needed.
1565
1566 * process.c (serial_open, serial_configure): Move decls from here ...
1567 * systty.h: ... to here, so that they can be checked.
1568
1569 * fns.c (get_random, seed_random): Move extern decls from here ...
1570 * lisp.h: ... to here, so that they can be checked.
1571
1572 * sysdep.c (reset_io): Now static.
1573 (wait_for_termination_signal): Remove; unused.
1574
1575 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
1576 (copy_keymap_item, append_key, push_text_char_description):
1577 Now static.
1578 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
1579 (DENSE_TABLE_SIZE): Remove; unused.
1580 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
1581 (describe_map_tree):
1582 Rename locals to avoid shadowing.
1583
1584 * keyboard.c: Declare functions static if they are not used elsewhere.
1585 (echo_char, echo_dash, cmd_error, top_level_2):
1586 (poll_for_input, handle_async_input): Now static.
1587 (read_char, kbd_buffer_get_event, make_lispy_position):
1588 (make_lispy_event, make_lispy_movement, apply_modifiers):
1589 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
1590 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
1591 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
1592 (read_key_sequence, read_char): Mark locals as initialized.
1593 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
1594
1595 * keyboard.h (make_ctrl_char): New decl.
1596 (mark_kboards): Move decl here ...
1597 * alloc.c (mark_kboards): ... from here.
1598
1599 * lisp.h (force_auto_save_soon): New decl.
1600
1601 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
1602 (DEFINE_DUMMY_FUNCTION): New macro.
1603 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
1604 Use it.
1605 (main): Add casts to avoid warnings
1606 if GCC considers string literals to be constants.
1607
1608 * lisp.h (fatal_error_signal): Add decl, since it's exported.
1609
1610 * dbusbind.c: Pointer signedness fixes.
1611 (xd_signature, xd_append_arg, xd_initialize):
1612 (Fdbus_call_method, Fdbus_call_method_asynchronously):
1613 (Fdbus_method_return_internal, Fdbus_method_error_internal):
1614 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
1615 (Fdbus_register_signal): Use SSDATA when the context wants char *.
1616
1617 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
1618 if GCC considers string literals to be constants.
1619 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
1620
1621 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
1622
1623 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
1624 (print_preprocess, print_object): New macro to fix last change.
1625
1626 * print.c (print_preprocess): Don't forget font objects.
1627
1628 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
1629
1630 * emacs.c (USAGE3): Doc fixes.
1631
1632 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
1633
1634 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
1635 structure.
1636
1637 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
1638
1639 * lisp.h (VWindow_system, Qfile_name_history):
1640 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
1641 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
1642 (w32_system_caret_x, w32_system_caret_y): Declare extern.
1643
1644 * w32select.c: Don't #include "keyboard.h".
1645 (run_protected): Add extern declaration for waiting_for_input.
1646
1647 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
1648 * w32console.c (detect_input_pending, read_input_pending)
1649 (encode_terminal_code):
1650 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
1651 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
1652 (w32_system_caret_y, Qfile_name_history):
1653 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
1654 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
1655 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
1656 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
1657 * w32proc.c (Qlocal, report_file_error):
1658 * w32term.c (Vwindow_system, updating_frame):
1659 * w32uniscribe.c (initialized, uniscribe_font_driver):
1660 Remove unneeded extern declarations.
1661
1662 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
1663
1664 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
1665
1666 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
1667
1668 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
1669 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
1670 These macros can no longer be used for assignment.
1671
1672 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
1673 Assign struct members directly, instead of using BUF_BEGV etc.
1674 (record_buffer_markers, fetch_buffer_markers): New functions for
1675 recording and fetching special buffer markers.
1676 (set_buffer_internal_1, set_buffer_temp): Use them.
1677
1678 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
1679
1680 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
1681
1682 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
1683 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
1684
1685 * xdisp.c (hscroll_window_tree):
1686 (reconsider_clip_changes): Use PT instead of BUF_PT.
1687
1688 2011-03-13 Eli Zaretskii <eliz@gnu.org>
1689
1690 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
1691 $(EMACS_ROOT)/lib/intprops.h.
1692
1693 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
1694
1695 Fix more problems found by GCC 4.5.2's static checks.
1696
1697 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
1698 to unsigned char * to avoid compiler diagnostic.
1699 (xg_free_frame_widgets): Make it clear that a local variable is
1700 needed only if USE_GTK_TOOLTIP.
1701 (gdk_window_get_screen): Make it clear that this macro is needed
1702 only if USE_GTK_TOOLTIP.
1703 (int_gtk_range_get_value): New function, which avoids a diagnostic
1704 from gcc -Wbad-function-cast.
1705 (xg_set_toolkit_scroll_bar_thumb): Use it.
1706 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
1707 diagnostic from gcc -Wbad-function-cast.
1708 (get_utf8_string, xg_get_file_with_chooser):
1709 Rename locals to avoid shadowing.
1710 (create_dialog): Move locals to avoid shadowing.
1711
1712 * xgselect.c (xg_select): Remove unused var.
1713
1714 * image.c (four_corners_best): Mark locals as initialized.
1715 (gif_load): Initialize transparent_p to zero (Bug#8238).
1716 Mark another local as initialized.
1717 (my_png_error, my_error_exit): Mark with NO_RETURN.
1718
1719 * image.c (clear_image_cache): Now static.
1720 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
1721 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
1722 (x_edge_detection): Remove unnecessary cast that
1723 gcc -Wbad-function-cast diagnoses.
1724 (gif_load): Fix pointer signedness.
1725 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
1726 (jpeg_load, gif_load): Rename locals to avoid shadowing.
1727
1728 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
1729
1730 Improve quality of tests for time stamp overflow.
1731 For example, without this patch (encode-time 0 0 0 1 1
1732 1152921504606846976) returns the obviously-bogus value (-948597
1733 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
1734 reports time overflow. See
1735 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
1736 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
1737 * editfns.c: Include limits.h and intprops.h.
1738 (TIME_T_MIN, TIME_T_MAX): New macros.
1739 (time_overflow): Move earlier, to before first use.
1740 (hi_time, lo_time): New functions, for an accurate test for
1741 out-of-range times.
1742 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
1743 (Fget_internal_run_time): Don't assume time_t fits in int.
1744 (make_time): Use list2 instead of Fcons twice.
1745 (Fdecode_time): More accurate test for out-of-range times.
1746 (check_tm_member): New function.
1747 (Fencode_time): Use it, to test for out-of-range times.
1748 (lisp_time_argument): Don't rely on undefined left-shift and
1749 right-shift behavior when checking for time stamp overflow.
1750
1751 * editfns.c (time_overflow): New function, refactoring common code.
1752 (Fformat_time_string, Fdecode_time, Fencode_time):
1753 (Fcurrent_time_string): Use it.
1754
1755 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
1756 * dired.c (make_time): Move to ...
1757 * editfns.c (make_time): ... here.
1758 * systime.h: Note the move.
1759
1760 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1761
1762 * fringe.c (update_window_fringes): Remove unused variables.
1763
1764 * unexmacosx.c (copy_data_segment): Also copy __got section.
1765 (Bug#8223)
1766
1767 2011-03-12 Eli Zaretskii <eliz@gnu.org>
1768
1769 * termcap.c [MSDOS]: Include "msdos.h".
1770 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
1771 Constify `char *' arguments and their references according to
1772 prototypes in tparam.h.
1773
1774 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
1775
1776 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
1777 Adapt all references accordingly.
1778
1779 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
1780
1781 2011-03-11 Tom Tromey <tromey@redhat.com>
1782
1783 * buffer.c (syms_of_buffer): Remove obsolete comment.
1784
1785 2011-03-11 Eli Zaretskii <eliz@gnu.org>
1786
1787 * termhooks.h (encode_terminal_code): Declare prototype.
1788
1789 * msdos.c (encode_terminal_code): Don't declare prototype.
1790
1791 * term.c (encode_terminal_code): Now external again, used by
1792 w32console.c and msdos.c.
1793
1794 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
1795 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
1796
1797 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
1798
1799 Fix some minor problems found by GCC 4.5.2's static checks.
1800
1801 * fringe.c (update_window_fringes): Mark locals as initialized
1802 (Bug#8227).
1803 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
1804
1805 * alloc.c (mark_fringe_data): Move decl from here ...
1806 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
1807 to check its interface.
1808 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
1809
1810 * fontset.c (free_realized_fontset): Now static.
1811 (Fset_fontset_font): Rename local to avoid shadowing.
1812 (fontset_font): Mark local as initialized.
1813 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
1814
1815 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
1816
1817 * xselect.c (x_disown_buffer_selections): Remove; not used.
1818 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
1819 (x_own_selection, Fx_disown_selection_internal): Rename locals
1820 to avoid shadowing.
1821 (x_handle_dnd_message): Remove local to avoid shadowing.
1822
1823 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
1824 so that the caller can use some name other than gcpro1.
1825 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
1826 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
1827 (Fx_backspace_delete_keys_p):
1828 Use them to avoid shadowing, and rename vars to avoid shadowing.
1829 (x_decode_color, x_set_name, x_window): Now static.
1830 (Fx_create_frame): Add braces to silence GCC warning.
1831 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
1832 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
1833 Remove unused locals.
1834 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
1835 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
1836 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
1837 macros.
1838
1839 * xterm.h (x_mouse_leave): New decl.
1840
1841 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
1842 Remove unused functions.
1843 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
1844 (x_calc_absolute_position): Now static.
1845 (XTread_socket): Don't define label "out" unless it's used.
1846 Don't declare local "event" unless it's used.
1847 (x_iconify_frame, x_free_frame_resources): Don't declare locals
1848 unless they are used.
1849 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
1850 (x_fatal_error_signal): Remove; not used.
1851 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
1852 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
1853 (x_error_catcher, x_connection_closed, x_error_handler):
1854 (x_error_quitter, xembed_send_message, x_iconify_frame):
1855 (my_log_handler): Rename locals to avoid shadowing.
1856 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
1857 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
1858
1859 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
1860 Rename or move locals to avoid shadowing.
1861 (tty_defined_color, merge_face_heights): Now static.
1862 (free_realized_faces_for_fontset): Remove; not used.
1863 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
1864 does not deduce is never used uninitialized.
1865 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
1866 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
1867
1868 * terminal.c (store_terminal_param): Now static.
1869
1870 * xmenu.c (menu_highlight_callback): Now static.
1871 (set_frame_menubar): Remove unused local.
1872 (xmenu_show): Rename parameter to avoid shadowing.
1873 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
1874 since they might point to immutable storage.
1875 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
1876 since it's unused otherwise.
1877
1878 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
1879 Add a FIXME, since the code still doesn't look right. (Bug#8215)
1880 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
1881 avoids a gcc -Wuninitialized diagnostic.
1882 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
1883 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
1884 does not deduce are never used uninitialized.
1885
1886 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
1887
1888 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
1889 * window.c (window_loop, size_window):
1890 (run_window_configuration_change_hook, enlarge_window): Likewise.
1891
1892 * window.c (display_buffer): Now static.
1893 (size_window): Mark variables that gcc -Wuninitialized
1894 does not deduce are never used uninitialized.
1895 * window.h (check_all_windows): New decl, to forestall
1896 gcc -Wmissing-prototypes diagnostic.
1897 * dispextern.h (bidi_dump_cached_states): Likewise.
1898
1899 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
1900 shadowing.
1901 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
1902 Include <limits.h>.
1903 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
1904 and to avoid gcc -Wuninitialized warning.
1905 (load_charset_map): Mark variables that gcc -Wuninitialized
1906 does not deduce are never used uninitialized.
1907 (load_charset): Abort instead of using uninitialized var (Bug#8229).
1908
1909 * coding.c (coding_set_source, coding_set_destination):
1910 Use "else { /* comment */ }" rather than "else /* comment */;"
1911 for clarity, and to avoid gcc -Wempty-body warning.
1912 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
1913 a block, when the outer 'i' will do.
1914 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
1915 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
1916 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
1917 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
1918 (Fdecode_sjis_char, Fdefine_coding_system_internal):
1919 Rename locals to avoid shadowing.
1920 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
1921 * coding.c (emacs_mule_char, encode_invocation_designation):
1922 Now static, since they're not used elsewhere.
1923 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
1924 (decode_coding_object, encode_coding_object, detect_coding_system):
1925 (decode_coding_emacs_mule): Mark variables that gcc
1926 -Wuninitialized does not deduce are never used uninitialized.
1927 (detect_coding_iso_2022): Initialize a local variable that might
1928 be used uninitialized. Leave a FIXME because it's not clear that
1929 this initialization is needed. (Bug#8211)
1930 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
1931 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
1932 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
1933 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
1934 Remove unused macros.
1935
1936 * category.c (hash_get_category_set): Remove unused local var.
1937 (copy_category_table): Now static, since it's not used elsewhere.
1938 * character.c (string_count_byte8): Likewise.
1939
1940 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
1941 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
1942
1943 * chartab.c (copy_sub_char_table): Now static, since it's not used
1944 elsewhere.
1945 (sub_char_table_ref_and_range, char_table_ref_and_range):
1946 Rename locals to avoid shadowing.
1947 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
1948
1949 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
1950 (BIDI_BOB): Remove unused macro.
1951
1952 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
1953 deduce are never used uninitialized.
1954 * term.c (encode_terminal_code): Likewise.
1955
1956 * term.c (encode_terminal_code): Now static. Remove unused local.
1957
1958 * tparam.h: New file.
1959 * term.c, tparam.h: Include it.
1960 * deps.mk (term.o, tparam.o): Depend on tparam.h.
1961 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
1962 Move these decls to tparam.h, and make them agree with what
1963 is actually in tparam.c. The previous trick of using incompatible
1964 decls in different modules does not conform to the C standard.
1965 All callers of tparam changed to use tparam's actual API.
1966 * tparam.c (tparam1, tparam, tgoto):
1967 Use const pointers where appropriate.
1968
1969 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
1970 * cm.h (struct cm): Likewise.
1971 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
1972 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
1973 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
1974 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
1975 (turn_on_face, init_tty): Likewise.
1976 * termchar.h (struct tty_display_info): Likewise.
1977
1978 * term.c (term_mouse_position): Rename local to avoid shadowing.
1979
1980 * alloc.c (mark_ttys): Move decl from here ...
1981 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
1982
1983 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
1984
1985 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
1986
1987 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
1988
1989 * search.c (compile_pattern_1): Remove argument regp, unused since
1990 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
1991 (compile_pattern): Don't pass it.
1992
1993 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
1994
1995 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
1996 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
1997 for ! HAVE_GTK3.
1998 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
1999
2000 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
2001
2002 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
2003 gdk_window_get_screen, gdk_window_get_geometry,
2004 gdk_x11_window_lookup_for_display and GDK_KEY_g.
2005 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
2006 (xg_get_pixbuf_from_pixmap): New function.
2007 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
2008 to Pixmap, take frame as parameter, remove GdkColormap parameter.
2009 Call xg_get_pixbuf_from_pixmap instead of
2010 gdk_pixbuf_get_from_drawable.
2011 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
2012 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
2013 (xg_check_special_colors): Use GtkStyleContext and its functions
2014 for HAVE_GTK3.
2015 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
2016 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
2017 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
2018 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
2019 Call gtk_widget_get_preferred_size.
2020 (xg_frame_resized): gdk_window_get_geometry only takes 5
2021 parameters.
2022 (xg_win_to_widget, xg_event_is_for_menubar):
2023 Call gdk_x11_window_lookup_for_display.
2024 (xg_set_widget_bg): New function.
2025 (delete_cb): New function.
2026 (xg_create_frame_widgets): connect delete-event to delete_cb.
2027 Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3
2028 (xg_set_background_color): Call xg_set_widget_bg.
2029 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
2030 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
2031 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
2032 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
2033 if ! HAVE_GTK3.
2034 (update_frame_tool_bar): Call gtk_widget_hide.
2035 (xg_initialize): Use GDK_KEY_g.
2036
2037 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
2038 if ! HAVE_GTK3
2039 (x_session_initialize): Call gdk_x11_set_sm_client_id.
2040
2041 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
2042 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
2043 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
2044
2045 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
2046
2047 * w32xfns.c (select_palette): Check success of RealizePalette against
2048 GDI_ERROR, not zero.
2049
2050 See ChangeLog.11 for earlier changes.
2051
2052 ;; Local Variables:
2053 ;; coding: utf-8
2054 ;; End:
2055
2056 Copyright (C) 2011 Free Software Foundation, Inc.
2057
2058 This file is part of GNU Emacs.
2059
2060 GNU Emacs is free software: you can redistribute it and/or modify
2061 it under the terms of the GNU General Public License as published by
2062 the Free Software Foundation, either version 3 of the License, or
2063 (at your option) any later version.
2064
2065 GNU Emacs is distributed in the hope that it will be useful,
2066 but WITHOUT ANY WARRANTY; without even the implied warranty of
2067 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2068 GNU General Public License for more details.
2069
2070 You should have received a copy of the GNU General Public License
2071 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.