Paul Eggert
eb4d412de8
* syntax.c (scan_sexps_forward): Avoid pointer wraparound.
2011-03-27 01:21:49 -07:00
Paul Eggert
1658b4014f
Merge from atest branch.
2011-03-27 01:15:26 -07:00
Paul Eggert
fe75f92609
* chartab.c (sub_char_table_ref_and_range): Redo for slight
...
efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
2011-03-27 01:10:27 -07:00
Paul Eggert
4a843dd730
Merge from mainline.
2011-03-26 19:32:40 -07:00
Glenn Morris
9af30bdf17
Remove (RET)SIGTYPE; it is identical to void on all supported systems.
...
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html
* configure.in (AC_TYPE_SIGNAL): Remove obsolete macro.
(AH_BOTTOM): Do not define SIGTYPE.
* lib-src/emacsclient.c: Replace SIGTYPE with void.
* nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void).
* src/syssignal.h: Replace RETSIGTYPE with void.
* src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c:
* src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c:
* src/xterm.c: Replace SIGTYPE with void everywhere.
* src/s/template.h (SIGTYPE): Remove commented out definition.
* src/s/usg5-4-common.h (SIGTYPE): Remove definition.
* admin/CPP-DEFINES: Remove SIGTYPE.
2011-03-26 19:27:11 -07:00
Paul Eggert
ffa8c828c6
* keyboard.c, keyboard.h (num_input_events): Now size_t.
...
This avoids undefined behavior on integer overflow, and is a bit
more convenient anyway since it is compared to a size_t variable.
2011-03-26 19:20:34 -07:00
Paul Eggert
c5101a77a4
Variadic C functions now count arguments with size_t, not int.
2011-03-26 19:12:36 -07:00
Eli Zaretskii
6653704919
Call try_scrolling even if buffer's clip_changed flag is set.
...
src/xdisp.c (redisplay_window): Don't check buffer's clip_changed
flag as a prerequisite for invoking try_scrolling. (Bug#6671)
2011-03-26 14:20:20 +02:00
Paul Eggert
dd3f25f792
* alloc.c (garbage_collect): Don't assume stack size fits in int.
...
(stack_copy_size): Now size_t, not int.
(stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
2011-03-25 21:17:38 -07:00
Juanma Barranquero
59eb0929f7
src/*.c: Fix more warnings about unused parameters.
...
* keymap.c (describe_vector): Remove parameters `indices' and
`char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
(describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
* w32.c (read_unc_volume): Use parameter `henum', instead of
global variable `wget_enum_handle'.
2011-03-26 03:48:03 +01:00
Juanma Barranquero
f868cd8a71
src/*.h: Remove unused parameters and functions.
...
* keyboard.h (timer_check, show_help_echo): Remove unused parameters.
* keyboard.c (timer_check): Remove parameter `do_it_now',
unused since 1996-04-12T06:01:29Z!rms@gnu.org.
(show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
* keyboard.c (read_char):
* w32menu.c (w32_menu_display_help):
* xmenu.c (show_help_event, menu_help_callback):
Adjust calls to `show_help_echo'.
* gtkutil.c (xg_maybe_add_timer):
* keyboard.c (readable_events):
* process.c (wait_reading_process_output):
* xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
* insdel.c (adjust_markers_gap_motion):
Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
(gap_left, gap_right): Don't call it.
2011-03-26 02:23:15 +01:00
Chong Yidong
2ecf6fdb28
Discard changes to buffer->clip_changed incurred during fontification.
...
* src/xdisp.c (handle_fontified_prop): Discard changes to clip_changed
incurred during fontification.
2011-03-25 16:00:25 -04:00
Juanma Barranquero
6b1f9ba477
src/*.c: Remove unused function parameters.
...
* buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
(DEFVAR_PER_BUFFER): Don't pass it.
* dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
(scrolling_window): Don't pass it.
2011-03-25 19:06:33 +01:00
Juanma Barranquero
a9b53ad377
src/fileio.c: Move computation of encoded_absname inside `if'.
2011-03-25 18:37:15 +01:00
Juanma Barranquero
0f4a96b5d7
nt/*.c, src/*.c: Remove unused variables.
...
* nt/addpm.c (main): Remove unused variable `retval'.
* nt/preprep.c (main): Remove unused variable `ptr'.
* src/dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
* src/fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
and `suffix'.
(Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
of variables specific to SELinux and computation of `encoded_absname'.
* src/image.c (XPutPixel): Remove unused variable `height'.
* src/keyboard.c (make_lispy_event): Remove unused variable `hpos'.
* src/unexw32.c (get_section_info): Remove unused variable `section'.
* src/w32.c (stat): Remove unused variables `drive_root' and `devtype'.
(system_process_attributes): Remove unused variable `sess'.
(sys_read): Remove unused variable `err'.
* src/w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
(w32_wnd_proc): Remove unused variable `isdead'.
(unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
(Fx_server_max_request_size): Remove unused variable `dpyinfo'.
(x_create_tip_frame): Remove unused variable `tem'.
* src/w32inevt.c (w32_console_read_socket): Remove unused variable `no_events'.
* src/w32term.c (x_draw_composite_glyph_string_foreground):
Remove unused variable `width'.
2011-03-25 16:39:59 +01:00
Paul Eggert
9a2c6e0545
* keyboard.c (syms_of_keyboard): Use the same style as later
...
in this function when indexing through an array. This also
works around GCC bug 48267.
2011-03-24 01:03:03 -07:00
Paul Eggert
03d0a10961
* image.c (tiff_load): Fix off-by-one image count (Bug#8336).
2011-03-24 00:36:32 -07:00
Paul Eggert
44f730c85e
* xselect.c (x_check_property_data): Return correct size (Bug#8335).
2011-03-23 21:17:44 -07:00
Juanma Barranquero
1149507c7f
src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to CombineRgn.
2011-03-24 03:30:26 +01:00
Juanma Barranquero
9c88f33949
w32: Fix some warnings reported by -Wall -Wextra.
...
* lib-src/ntlib.c: Include <ctype.h>.
* nt/cmdproxy.c: Include <ctype.h>.
(make_absolute): Remove unused variable `i'.
* src/w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
(w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
(Fx_close_connection): Remove unused variable `i'.
* src/w32font.c (w32font_draw): Return number of glyphs.
(w32font_open_internal): Remove unused variable `i'.
(w32font_driver): Add missing initializer.
* src/w32menu.c (utf8to16): Remove unused variable `utf16'.
(fill_in_menu): Remove unused variable `items_added'.
* src/w32term.c (last_mouse_press_frame): Remove static global variable.
(w32_clip_to_row): Remove unused variable `f'.
(x_delete_terminal): Remove unused variable `i'.
* src/w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
(NOTHING): Remove unused static global variable.
(uniscribe_check_otf): Remove unused variable `table'.
(uniscribe_font_driver): Add missing initializers.
2011-03-23 17:25:38 +01:00
Julien Danjou
dee091a37f
Use Frun_hooks rather than calling Vrun_hooks manually
2011-03-23 11:06:57 +01:00
Paul Eggert
f86c98305d
* xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
...
concerns.
2011-03-23 01:15:28 -07:00
Paul Eggert
6ae5284811
* chartab.c (sub_char_table_ref_and_range): Redo to avoid overflow
...
concerns.
2011-03-23 01:13:33 -07:00
Paul Eggert
d284567f96
* term.c (produce_glyphless_glyph): Remove unnecessary test.
2011-03-23 01:09:13 -07:00
Paul Eggert
12ea59a297
* cm.c (calccost): Turn while-do into do-while, for clarity.
2011-03-23 01:06:21 -07:00
Glenn Morris
fe7be2210f
Fix ChangeLog typo.
2011-03-22 20:32:55 -07:00
Paul Eggert
c9c49752e1
Fix more problems found by GCC 4.5.2's static checks.
2011-03-22 18:01:59 -07:00
Paul Eggert
b9b4b7cb4c
Merge removals from trunk.
2011-03-22 17:53:37 -07:00
Paul Eggert
2c520ab5fb
Merge from mainline.
2011-03-22 17:24:09 -07:00
Chong Yidong
c59da222fa
Remove an apparently unnecessary XClearWindow call.
...
* src/xterm.c (x_clear_frame): Remove XClearWindow call. This appears
not to be necessary, and produces flickering.
2011-03-22 14:15:52 -04:00
Paul Eggert
b12ef41167
Add Bug#
2011-03-22 09:43:12 -07:00
Paul Eggert
8abc3f1295
* coding.c (encode_coding_raw_text): Avoid unnecessary test
...
the first time through the loop, since we know p0 < p1 then.
This also avoids a gcc -Wstrict-overflow warning.
2011-03-22 09:20:45 -07:00
Paul Eggert
a2d2666036
* lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
...
leading to a memory leak, possible in functions like
load_charset_map_from_file that can allocate an unbounded number
of objects.
2011-03-22 02:08:11 -07:00
Paul Eggert
916c72e97a
* xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
...
that could (at least in theory) be that large.
2011-03-22 01:59:50 -07:00
Paul Eggert
b7cbbd6f01
* xdisp.c (pint2hrstr): Simplify and tune code slightly.
...
This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
2011-03-22 01:15:43 -07:00
Paul Eggert
19ab8a188a
* xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
...
This is less likely to overflow, and avoids undefined behavior if
overflow does occur. All callers changed. Use strtoul to scan
for the unsigned long integer.
2011-03-22 01:10:11 -07:00
Paul Eggert
f0641eff4f
* scroll.c (do_scrolling): Work around GCC bug 48228.
...
See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228 >.
2011-03-22 00:48:10 -07:00
Paul Eggert
39f5e5198f
* frame.c (validate_x_resource_name): Simplify count usage.
...
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:12:38 -07:00
Paul Eggert
5ffe6683c3
Better version of previous patch.
2011-03-21 11:11:03 -07:00
Paul Eggert
7f650bb9a8
* frame.c (Fmodify_frame_parameters): Simplify loop counter.
...
This also avoids a warning with gcc -Wstrict-overflow.
2011-03-21 11:09:45 -07:00
Paul Eggert
37dd57d1e5
Add Bug#.
2011-03-20 22:50:24 -07:00
Paul Eggert
6e5fa6bfce
Merge from trunk and from gnulib stdio.
2011-03-20 22:34:48 -07:00
Paul Eggert
81e56e612d
* fileio.c (Fcopy_file): Report error if fchown or fchmod fail.
2011-03-20 19:40:27 -07:00
Glenn Morris
66b874939b
(Re)move autotools generated files from the repository.
...
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00225.html
* autogen/: New directory, to be excluded from releases.
* autogen/copy_autogen, autogen/update_autogen: New scripts.
* autogen/README: New file.
* autogen/aclocal.m4, autogen/config.in, autogen/configure:
* autogen/Makefile.in: Add auto-updated generated files.
* autogen.sh: No longer a no-op, now it tests for autotools
and runs them as necessary.
* configure.in: Defaule maintainer-mode to on.
* aclocal.m4, configure, lib/Makefile.in: Remove files.
* src/config.in: Remove file.
* INSTALL.BZR, admin/make-tarball.txt: Update instructions.
2011-03-20 16:58:23 -07:00
Paul Eggert
699979fc4c
Add Bug#.
2011-03-20 16:56:23 -07:00
Paul Eggert
dc1ca6a87f
* emacs.c (Fdaemon_initialized): Do not ignore I/O errors.
2011-03-20 14:03:44 -07:00
Paul Eggert
c184bbfdfd
Merge: Use socklen_t, not int, for socket lengths.
2011-03-20 09:55:33 -07:00
Paul Eggert
6a90a4f198
Merge from gnulib, for socklen_t.
2011-03-20 09:28:22 -07:00
Juanma Barranquero
45b6f6d5cb
src/minibuf.c: Fix previous change.
...
* minibuf.c (Vcompleting_read_function): Don't declare, global variables
are now in src/globals.h.
(syms_of_minibuf): Remove spurious & from previous change.
2011-03-20 14:57:22 +01:00
Leo Liu
3ec03f7e46
New variable completing-read-function to customize completing-read
2011-03-20 18:35:27 +08:00