bpt/emacs.git
13 years agoTreat large integers as floats in the Lisp reader and in string-to-number.
Paul Eggert [Thu, 21 Apr 2011 06:03:09 +0000 (23:03 -0700)]
Treat large integers as floats in the Lisp reader and in string-to-number.

13 years agoRemove stray comment.
Paul Eggert [Wed, 20 Apr 2011 09:22:06 +0000 (02:22 -0700)]
Remove stray comment.

13 years ago* textprop.c (set_text_properties_1): Rewrite for clarity,
Paul Eggert [Wed, 20 Apr 2011 08:38:11 +0000 (01:38 -0700)]
* textprop.c (set_text_properties_1): Rewrite for clarity,

and to avoid GCC warning about integer overflow.

13 years ago* intervals.c (offset_intervals): Tell GCC not to worry about length overflow
Paul Eggert [Wed, 20 Apr 2011 08:30:52 +0000 (01:30 -0700)]
* intervals.c (offset_intervals): Tell GCC not to worry about length overflow

when negating a negative length.

13 years ago* intervals.h (struct interval): Use EMACS_INT for members
Paul Eggert [Wed, 20 Apr 2011 08:04:17 +0000 (01:04 -0700)]
* intervals.h (struct interval): Use EMACS_INT for members

where EMACS_UINT might cause problems.  See
<http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
(CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
* intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
All uses changed.

13 years ago* alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
Paul Eggert [Wed, 20 Apr 2011 07:11:43 +0000 (00:11 -0700)]
* alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.

(overrun_check_free): Likewise.

13 years agoMerge from mainline.
Paul Eggert [Wed, 20 Apr 2011 06:27:19 +0000 (23:27 -0700)]
Merge from mainline.

13 years agoMerge: Make the Lisp reader and string-to-float more consistent.
Paul Eggert [Wed, 20 Apr 2011 06:26:24 +0000 (23:26 -0700)]
Merge: Make the Lisp reader and string-to-float more consistent.

13 years agoMake the Lisp reader and string-to-float more consistent.
Paul Eggert [Wed, 20 Apr 2011 06:24:51 +0000 (23:24 -0700)]
Make the Lisp reader and string-to-float more consistent.

* data.c (atof): Remove decl; no longer used or needed.
(Fstring_to_number): Use new string_to_float function, to be
consistent with how the Lisp reader treats infinities and NaNs.
Do not assume that floating-point numbers represent EMACS_INT
without losing information; this is not true on most 64-bit hosts.
Avoid double-rounding errors, by insisting on integers when
parsing non-base-10 numbers, as the documentation specifies.
Report integer overflow instead of silently converting to
integers.
* lisp.h (string_to_float): New decl, replacing ...
(isfloat_string): Remove.
* lread.c (read1): Do not accept +. and -. as integers; this
appears to have been a coding error.  Similarly, do not accept
strings like +-1e0 as floating point numbers.  Do not report
overflow for some integer overflows and not others; instead,
report them all.  Break out the floating-point parsing into a new
function string_to_float, so that Fstring_to_number parses
floating point numbers consistently with the Lisp reader.
(string_to_float): New function, replacing isfloat_string.
This function checks for valid syntax and produces the resulting
Lisp float number too.

13 years ago* configure.in (use_mmap_for_buffers): Set to yes on Cygwin.
Ken Brown [Wed, 20 Apr 2011 02:18:13 +0000 (22:18 -0400)]
* configure.in (use_mmap_for_buffers): Set to yes on Cygwin.

13 years agosolar.el fixes.
Glenn Morris [Wed, 20 Apr 2011 02:09:06 +0000 (19:09 -0700)]
solar.el fixes.

* lisp/calendar/solar.el (solar-horizontal-coordinates):
Use the longitude argument rather than `calendar-longitude' (15yr old bug).
(solar-date-next-longitude): Remove unused locals.

13 years agognus-registry.el (gnus-registry-action, gnus-registry-fetch-header-fast):
Katsumi Yamaoka [Wed, 20 Apr 2011 00:43:48 +0000 (00:43 +0000)]
gnus-registry.el (gnus-registry-action, gnus-registry-fetch-header-fast):
 Don't use mail-header that looks an internal function of mailheader.el.

13 years ago* alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
Paul Eggert [Tue, 19 Apr 2011 19:10:31 +0000 (12:10 -0700)]
* alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check

in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
word size.

13 years ago* lisp/progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)
Stefan Monnier [Tue, 19 Apr 2011 15:33:34 +0000 (12:33 -0300)]
* lisp/progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)
(octave-not-in-string-or-comment-p): Use syntax-ppss so it works with
multi-line comments as well.

13 years agoMerge from mainline.
Paul Eggert [Tue, 19 Apr 2011 14:46:13 +0000 (07:46 -0700)]
Merge from mainline.

13 years agolisp/*.el: Lexical-binding cleanup.
Juanma Barranquero [Tue, 19 Apr 2011 13:44:55 +0000 (15:44 +0200)]
lisp/*.el: Lexical-binding cleanup.

13 years agoSupport buffers > 2GB on 64-bit hosts.
Eli Zaretskii [Tue, 19 Apr 2011 10:48:30 +0000 (13:48 +0300)]
Support buffers > 2GB on 64-bit hosts.

 src/insdel.c (make_gap_larger): Remove limitation of buffer size
 to <= INT_MAX.
 src/syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
 gl_state.e_property when gl_state.object is Qt.

13 years ago* gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
Paul Eggert [Tue, 19 Apr 2011 07:45:48 +0000 (00:45 -0700)]
* gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.

(gnutls_make_error): Rename local to avoid shadowing.
(gnutls_emacs_global_deinit): ifdef out; not used.
(Fgnutls_boot): Use const for pointer to readonly storage.
Comment out unused local.  Fix pointer signedness problems.

13 years ago* lread.c (openp): Don't stuff size_t into an 'int'.
Paul Eggert [Tue, 19 Apr 2011 07:22:13 +0000 (00:22 -0700)]
* lread.c (openp): Don't stuff size_t into an 'int'.

Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
about possible signed overflow.

13 years ago* gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
Paul Eggert [Tue, 19 Apr 2011 07:10:55 +0000 (00:10 -0700)]
* gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.

(GDK_KEY_g): Don't define if already defined.
(xg_prepare_tooltip): Avoid pointer signedness problem.
(xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.

13 years agoAvoid 0 flag with %p printf format.
Paul Eggert [Tue, 19 Apr 2011 06:52:00 +0000 (23:52 -0700)]
Avoid 0 flag with %p printf format.

13 years agoMerge from mainline.
Paul Eggert [Tue, 19 Apr 2011 06:44:06 +0000 (23:44 -0700)]
Merge from mainline.

13 years ago* process.c (Fnetwork_interface_info): Avoid left-shift undefined
Paul Eggert [Tue, 19 Apr 2011 06:42:12 +0000 (23:42 -0700)]
* process.c (Fnetwork_interface_info): Avoid left-shift undefined

behavior with 1 << 31.  GCC 4.6.0 warns about this on 32-bit hosts.

13 years ago* xfns.c (Fx_window_property): Simplify a bit,
Paul Eggert [Tue, 19 Apr 2011 06:34:43 +0000 (23:34 -0700)]
* xfns.c (Fx_window_property): Simplify a bit,

to make a bit faster and to avoid GCC 4.6.0 warning.
* xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.

13 years agocalendar housekeeping prompted by lexical-binding.
Glenn Morris [Tue, 19 Apr 2011 04:11:01 +0000 (21:11 -0700)]
calendar housekeeping prompted by lexical-binding.

* lisp/calendar/appt.el (appt-make-list):
* lisp/calendar/cal-china.el (calendar-chinese-date-string):
* lisp/calendar/cal-hebrew.el (calendar-hebrew-list-yahrzeits)
(diary-hebrew-yahrzeit):
* lisp/calendar/cal-tex.el (cal-tex-last-blank-p, cal-tex-cursor-week2):
* lisp/calendar/calendar.el (calendar-generate-window):
* lisp/calendar/time-date.el (time-to-days):
Remove unused local variables.

* lisp/calendar/cal-dst.el (dst-adjust-time): Remove never-implemented
optional argument `style'.

* lisp/calendar/cal-tex.el (cal-tex-list-holidays, cal-tex-cursor-month)
(cal-tex-cursor-week, cal-tex-cursor-week2, cal-tex-cursor-week-iso)
(cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
(cal-tex-cursor-filofax-daily, cal-tex-mini-calendar)
* lisp/calendar/cal-html.el (cal-html-insert-minical):
* lisp/calendar/diary-lib.el (diary-list-entries-1, diary-list-entries)
(calendar-mark-date-pattern):
Prefix "unused" locals.

13 years agoRemove blank line.
Paul Eggert [Tue, 19 Apr 2011 01:15:59 +0000 (18:15 -0700)]
Remove blank line.

13 years ago* fns.c (internal_equal): Don't assume size_t fits in int.
Paul Eggert [Tue, 19 Apr 2011 01:11:43 +0000 (18:11 -0700)]
* fns.c (internal_equal): Don't assume size_t fits in int.

13 years ago* alloc.c (compact_small_strings): Tighten assertion a little.
Paul Eggert [Tue, 19 Apr 2011 00:42:41 +0000 (17:42 -0700)]
* alloc.c (compact_small_strings): Tighten assertion a little.

13 years agoReplace pEd with more-general pI, and fix some printf arg casts.
Paul Eggert [Tue, 19 Apr 2011 00:34:42 +0000 (17:34 -0700)]
Replace pEd with more-general pI, and fix some printf arg casts.
* lisp.h (pI): New macro, generalizing old pEd macro to other
conversion specifiers.  For example, use "...%"pI"d..." rather
than "...%"pEd"...".
(pEd): Remove.  All uses replaced with similar uses of pI.
* src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h: Likewise.
* alloc.c (check_pure_size): Don't overflow by converting size to int.
* bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
* data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
* dbusbind.c (xd_append_arg): Use pI to avoid cast.
(Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
* font.c (font_unparse_xlfd): Avoid potential buffer overrun on
64-bit hosts.
(font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
* keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
* print.c (safe_debug_print, print_object): Likewise.
(print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
to int.
Use pI instead of if-then-else-abort.  Use %p to avoid casts.
* process.c (Fmake_network_process): Use pI to avoid cast.
* region-cache.c (pp_cache): Likewise.
* xdisp.c (decode_mode_spec): Likewise.
* xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
behavior on 64-bit hosts with printf arg.
* xselect.c (x_queue_event): Use %p to avoid casts.
(x_stop_queuing_selection_requests): Likewise.
(x_get_window_property): Don't truncate byte count to an 'int'
when tracing.

13 years ago* frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
Paul Eggert [Mon, 18 Apr 2011 23:32:38 +0000 (16:32 -0700)]
* frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right

here, since it parses constructs like leading '-' and spaces,
which are not wanted; and it overflows with large numbers.
Instead, simply match F[0-9]+, which is what is wanted anyway.

13 years agoAllow glyphless-char-display to distinguish between X and text terminals.
Chong Yidong [Mon, 18 Apr 2011 23:21:31 +0000 (19:21 -0400)]
Allow glyphless-char-display to distinguish between X and text terminals.
Use this for Tabulated List mode.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
glyphless-char-display table.
(tabulated-list-glyphless-char-display): New var.

* src/term.c (produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.

* src/xdisp.c (lookup_glyphless_char_display)
(produce_glyphless_glyph): Handle cons cell entry in
glyphless-char-display.
(Vglyphless_char_display): Document it.

13 years agognus-registry.el, registry.el: Silence the byte compiler.
Katsumi Yamaoka [Mon, 18 Apr 2011 22:59:02 +0000 (22:59 +0000)]
gnus-registry.el, registry.el: Silence the byte compiler.

gnus-registry.el: Eliminate cl functions.
 (gnus-registry-sort-addresses): New function that replaces mapcan.
 (gnus-registry-action, gnus-registry-spool-action)
 (gnus-registry-split-fancy-with-parent)
 (gnus-registry-fetch-recipients-fast): Use it.
 (gnus-registry-import-eld): Replace delete* with dolist + delq.
registry.el (initialize-instance, registry-lookup)
 (registry-lookup-breaks-before-lexbind, registry-lookup-secondary)
 (registry-lookup-secondary-value, registry-search, registry-delete)
 (registry-insert, registry-reindex, registry-size, registry-prune):
 Use eval-and-compile.

13 years ago* lisp/vc/add-log.el (change-log-font-lock-keywords): Add "Thanks to" to acknowledgments.
Sam Steingold [Mon, 18 Apr 2011 20:35:18 +0000 (16:35 -0400)]
* lisp/vc/add-log.el (change-log-font-lock-keywords): Add "Thanks to" to acknowledgments.

13 years agoAuto-commit of generated files.
Glenn Morris [Mon, 18 Apr 2011 10:17:49 +0000 (06:17 -0400)]
Auto-commit of generated files.

13 years ago* alloc.c (check_sblock, check_string_bytes, check_string_free_list): Protoize.
Paul Eggert [Mon, 18 Apr 2011 04:45:15 +0000 (21:45 -0700)]
* alloc.c (check_sblock, check_string_bytes, check_string_free_list): Protoize.

13 years ago* alloc.c: Remove unportable assumptions about struct layout.
Paul Eggert [Mon, 18 Apr 2011 04:41:29 +0000 (21:41 -0700)]
* alloc.c: Remove unportable assumptions about struct layout.

(SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
(SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
(allocate_vectorlike, make_pure_vector): Use the new macros,
plus offsetof, to remove unportable assumptions about struct layout.
These assumptions hold on all porting targets that I know of, but
they are not guaranteed, they're easy to remove, and removing them
makes further changes easier.

13 years ago* alloc.c (allocate_buffer): Don't assume sizeof (struct buffer) is a
Paul Eggert [Mon, 18 Apr 2011 04:25:27 +0000 (21:25 -0700)]
* alloc.c (allocate_buffer): Don't assume sizeof (struct buffer) is a

multiple of sizeof (EMACS_INT); it need not be, if
alignof(EMACS_INT) < sizeof (EMACS_INT).

13 years ago* alloc.c (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
Paul Eggert [Mon, 18 Apr 2011 04:16:47 +0000 (21:16 -0700)]
* alloc.c (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that

can cause Emacs to crash when string overrun checking is enabled.

13 years ago* alloc.c (string_overrun_cookie): Now const. Use initializers that
Paul Eggert [Mon, 18 Apr 2011 04:13:51 +0000 (21:13 -0700)]
* alloc.c (string_overrun_cookie): Now const.  Use initializers that

don't formally overflow signed char, to avoid warnings.

13 years agoFix typo in comment.
Paul Eggert [Mon, 18 Apr 2011 04:11:56 +0000 (21:11 -0700)]
Fix typo in comment.

13 years ago* alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
Paul Eggert [Mon, 18 Apr 2011 04:08:35 +0000 (21:08 -0700)]
* alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".

This doesn't fix a bug but makes the code clearer.

13 years agoMerge from gnulib.
Paul Eggert [Mon, 18 Apr 2011 04:03:18 +0000 (21:03 -0700)]
Merge from gnulib.

13 years agoMinor redisplay cleanups.
Chong Yidong [Sun, 17 Apr 2011 18:40:55 +0000 (14:40 -0400)]
Minor redisplay cleanups.

* src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
definition for no-X builds.

* src/termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.

* src/xdisp.c (get_next_display_element): Remove unnecessary ifdefs.

13 years ago* etc/CONTRIBUTE: Recommend bug-gnu-emacs for patches.
Glenn Morris [Sun, 17 Apr 2011 02:30:56 +0000 (19:30 -0700)]
* etc/CONTRIBUTE: Recommend bug-gnu-emacs for patches.

13 years agoReplace stack-trace-on-error usage in calendar.
Glenn Morris [Sun, 17 Apr 2011 02:11:49 +0000 (19:11 -0700)]
Replace stack-trace-on-error usage in calendar.

* lisp/calendar/diary-lib.el (diary-sexp-entry):
* lisp/calendar/holidays.el (holiday-sexp):
Set debug-on-error rather than the removed stack-trace-on-error.

13 years agoChangeLog fix.
Glenn Morris [Sat, 16 Apr 2011 23:31:57 +0000 (16:31 -0700)]
ChangeLog fix.

13 years agoUse lexcical-binding in f90.el.
Glenn Morris [Sat, 16 Apr 2011 23:30:15 +0000 (16:30 -0700)]
Use lexcical-binding in f90.el.

* lisp/progmodes/f90.el: Use lexical-binding.  Use utf-8 coding.
(f90-get-correct-indent): Remove unnecessary local variable `cont'.

13 years agoStatic checks with GCC 4.6.0 and non-default toolkits.
Paul Eggert [Sat, 16 Apr 2011 23:11:35 +0000 (16:11 -0700)]
Static checks with GCC 4.6.0 and non-default toolkits.

13 years ago* xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
Paul Eggert [Sat, 16 Apr 2011 22:48:31 +0000 (15:48 -0700)]
* xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).

13 years ago* pop.c: Undo previous change.
Paul Eggert [Sat, 16 Apr 2011 22:32:35 +0000 (15:32 -0700)]
* pop.c: Undo previous change.

13 years agoMerge from mainline.
Paul Eggert [Sat, 16 Apr 2011 22:30:01 +0000 (15:30 -0700)]
Merge from mainline.

13 years ago* s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
Paul Eggert [Sat, 16 Apr 2011 22:06:00 +0000 (15:06 -0700)]
* s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.

13 years ago* process.c (keyboard_bit_set): Define only if SIGIO.
Paul Eggert [Sat, 16 Apr 2011 22:04:41 +0000 (15:04 -0700)]
* process.c (keyboard_bit_set): Define only if SIGIO.

(send_process_trap): Mark it with NO_RETURN if it doesn't return.
(send_process): Repair possible setjmp clobbering.

13 years ago* s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
Paul Eggert [Sat, 16 Apr 2011 21:57:28 +0000 (14:57 -0700)]
* s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.

13 years ago* eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
Paul Eggert [Sat, 16 Apr 2011 21:50:01 +0000 (14:50 -0700)]
* eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.

13 years ago* data.c (arith_error): Mark with NO_RETURN if it doesn't return.
Paul Eggert [Sat, 16 Apr 2011 21:48:36 +0000 (14:48 -0700)]
* data.c (arith_error): Mark with NO_RETURN if it doesn't return.

13 years ago* alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
Paul Eggert [Sat, 16 Apr 2011 21:47:57 +0000 (14:47 -0700)]
* alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):

Define only if needed.

13 years ago* xterm.c (xembed_send_message): Likewise.
Paul Eggert [Sat, 16 Apr 2011 21:29:00 +0000 (14:29 -0700)]
* xterm.c (xembed_send_message): Likewise.

13 years ago* xfaces.c (USG, __TIMEVAL__): Likewise.
Paul Eggert [Sat, 16 Apr 2011 21:28:14 +0000 (14:28 -0700)]
* xfaces.c (USG, __TIMEVAL__): Likewise.

13 years ago* termhooks.h (struct terminal): Likewise.
Paul Eggert [Sat, 16 Apr 2011 21:27:29 +0000 (14:27 -0700)]
* termhooks.h (struct terminal): Likewise.

13 years ago* sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
Paul Eggert [Sat, 16 Apr 2011 21:26:33 +0000 (14:26 -0700)]
* sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier

by pacifying GCC about it.  Maybe it's time to retire it?

13 years ago* dispextern.h (struct redisplay_interface): Rename param
Paul Eggert [Sat, 16 Apr 2011 21:24:54 +0000 (14:24 -0700)]
* dispextern.h (struct redisplay_interface): Rename param

to avoid shadowing.

13 years ago* lwlib-utils.c (XtCompositeChildren): Likewise.
Paul Eggert [Sat, 16 Apr 2011 21:23:30 +0000 (14:23 -0700)]
* lwlib-utils.c (XtCompositeChildren): Likewise.

13 years ago* lwlib-Xm.c (make_dialog): Rename local to avoid shadowing.
Paul Eggert [Sat, 16 Apr 2011 21:22:40 +0000 (14:22 -0700)]
* lwlib-Xm.c (make_dialog): Rename local to avoid shadowing.

(make_menu_in_widget): Add cast to avoid warning.

13 years ago* pop.c (socket_connection): Double-cast to avoid GCC warning
Paul Eggert [Sat, 16 Apr 2011 21:21:24 +0000 (14:21 -0700)]
* pop.c (socket_connection): Double-cast to avoid GCC warning

about alignment.

13 years ago* movemail.c (mail_spool_name): Protoize.
Paul Eggert [Sat, 16 Apr 2011 21:20:25 +0000 (14:20 -0700)]
* movemail.c (mail_spool_name): Protoize.

(main): Remove unused var.  Mark var as initialized.
Move locals to avoid shadowing, and use time_t for times.

13 years ago* fakemail.c (xmalloc, xreallc): Use standard C prototypes
Paul Eggert [Sat, 16 Apr 2011 21:13:07 +0000 (14:13 -0700)]
* fakemail.c (xmalloc, xreallc): Use standard C prototypes

with void *.  This avoids warnings about pointer casts.

13 years ago* emacsclient.c (main): Don't use uninitialized var.
Paul Eggert [Sat, 16 Apr 2011 21:11:28 +0000 (14:11 -0700)]
* emacsclient.c (main): Don't use uninitialized var.

(IS_ANY_SEP): Remove; unused.
(get_current_dir_name): Add an extern decl.

13 years ago* insdel.c (make_gap_smaller): Define only if
Paul Eggert [Sat, 16 Apr 2011 20:32:18 +0000 (13:32 -0700)]
* insdel.c (make_gap_smaller): Define only if

USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.

13 years ago* keyboard.c (read_char): Make a var volatile so longjmp won't clobber
Paul Eggert [Sat, 16 Apr 2011 20:27:04 +0000 (13:27 -0700)]
* keyboard.c (read_char): Make a var volatile so longjmp won't clobber

it.

13 years ago* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
Paul Eggert [Sat, 16 Apr 2011 20:21:26 +0000 (13:21 -0700)]
* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,

so that we aren't warned about unused symbols.

13 years agoAdd bug#.
Paul Eggert [Sat, 16 Apr 2011 20:09:28 +0000 (13:09 -0700)]
Add bug#.

13 years ago* xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
Paul Eggert [Sat, 16 Apr 2011 20:07:17 +0000 (13:07 -0700)]
* xfns.c (Fx_file_dialog): Rename local to avoid shadowing.

13 years ago* xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized var.
Paul Eggert [Sat, 16 Apr 2011 19:42:09 +0000 (12:42 -0700)]
* xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized var.

13 years agoFix argument to `error' in `gnutls-boot'.
Eli Zaretskii [Sat, 16 Apr 2011 19:16:40 +0000 (15:16 -0400)]
Fix argument to `error' in `gnutls-boot'.

 src/gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.

13 years agoFix regex.c, syntax.c and friends for buffers > 2GB.
Eli Zaretskii [Sat, 16 Apr 2011 18:26:30 +0000 (21:26 +0300)]
Fix regex.c, syntax.c and friends for buffers > 2GB.

 src/syntax.h (struct gl_state_s): Declare character position members
 EMACS_INT.
 src/syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
 src/textprop.c (verify_interval_modification, interval_of): Declare
 arguments EMACS_INT.
 src/intervals.c (adjust_intervals_for_insertion): Declare arguments
 EMACS_INT.
 src/intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
 src/indent.c (Fvertical_motion): Local variable it_start is now
 EMACS_INT.
 src/regex.c (re_match, re_match_2, re_match_2_internal)
 (bcmp_translate, regcomp, regexec, print_double_string)
 (group_in_compile_stack, re_search, re_search_2, regex_compile)
 (re_compile_pattern, re_exec): Declare arguments and local
 variables `size_t' and `ssize_t' and return values `regoff_t', as
 appropriate.
 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
 <compile_stack_type>: `size' and `avail' are now `size_t'.
 src/regex.h <regoff_t>: Use ssize_t, not int.
 (re_search, re_search_2, re_match, re_match_2): Arguments that
 specify buffer/string position and length are now ssize_t and
 size_t.  Return type is regoff_t.

13 years ago* xterm.c (x_dispatch_event): More accurate ifdefs.
Paul Eggert [Sat, 16 Apr 2011 16:44:58 +0000 (09:44 -0700)]
* xterm.c (x_dispatch_event): More accurate ifdefs.

13 years ago* lwlib.c (first_child) [USE_MOTIF]: Protoize.
Paul Eggert [Sat, 16 Apr 2011 16:42:58 +0000 (09:42 -0700)]
* lwlib.c (first_child) [USE_MOTIF]: Protoize.

13 years ago* xfns.c (x_real_positions): Mark locals as initialized.
Paul Eggert [Sat, 16 Apr 2011 15:39:35 +0000 (08:39 -0700)]
* xfns.c (x_real_positions): Mark locals as initialized.

13 years ago* xmenu.c (xmenu_show): Don't use uninitialized vars.
Paul Eggert [Sat, 16 Apr 2011 15:38:15 +0000 (08:38 -0700)]
* xmenu.c (xmenu_show): Don't use uninitialized vars.

13 years ago* xterm.c: Fix problems found by static analysis with other toolkits.
Paul Eggert [Sat, 16 Apr 2011 15:24:20 +0000 (08:24 -0700)]
* xterm.c: Fix problems found by static analysis with other toolkits.

(toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
(x_dispatch_event): Declare static only if !USE_GTK && USE_X_TOOLKIT.
Define if USE_GTK || (HAVE_MENUS && USE_X_TOOLKIT); USE_MOTIF need
not be part of this test.
(SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
* xterm.h (x_dispatch_event): Use USE_GTK, not USE_MOTIF, when testing
whether to declare.
* xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only if
defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.

13 years ago* xmenu.c (menu_help_callback): Pointer type fixes.
Paul Eggert [Sat, 16 Apr 2011 15:15:17 +0000 (08:15 -0700)]
* xmenu.c (menu_help_callback): Pointer type fixes.

Use const pointers when pointing at readonly data.  Avoid pointer
signedness clashes.
(FALSE): Remove unused macro.
(update_frame_menubar): Remove unused decl.

13 years ago* xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
Paul Eggert [Sat, 16 Apr 2011 15:12:29 +0000 (08:12 -0700)]
* xfns.c (Fx_hide_tip): Move locals to avoid shadowing.

13 years ago* menu.c (push_submenu_start, push_submenu_end): Do not define unless
Paul Eggert [Sat, 16 Apr 2011 15:11:41 +0000 (08:11 -0700)]
* menu.c (push_submenu_start, push_submenu_end): Do not define unless

USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
(single_menu_item): Rename local to avoid shadowing.

13 years ago(url-http-wait-for-headers-change-function): Protect against malformed headerless...
Lars Magne Ingebrigtsen [Sat, 16 Apr 2011 13:59:54 +0000 (15:59 +0200)]
(url-http-wait-for-headers-change-function): Protect against malformed headerless responses from servers.

13 years ago* keyboard.c (make_lispy_event): Remove unused local var.
Paul Eggert [Sat, 16 Apr 2011 08:37:21 +0000 (01:37 -0700)]
* keyboard.c (make_lispy_event): Remove unused local var.

13 years ago* frame.c, frame.h (x_get_resource_string): Bring this back, but
Paul Eggert [Sat, 16 Apr 2011 08:36:41 +0000 (01:36 -0700)]
* frame.c, frame.h (x_get_resource_string): Bring this back, but

only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.

13 years agoChange bitmaps back to X11-compatible types.
Paul Eggert [Sat, 16 Apr 2011 08:30:05 +0000 (01:30 -0700)]
Change bitmaps back to X11-compatible types.

13 years agoModernize to C89, for better static checking.
Paul Eggert [Sat, 16 Apr 2011 08:25:42 +0000 (01:25 -0700)]
Modernize to C89, for better static checking.

* Activate.c (XMenuActivate): Callback's first arg is readonly.
* AddPane.c (XMenuAddPane): Label is readonly.  Rename local
to avoid shadowing.
* AddSel.c (XMenuAddSelection): Help arg is readonly.  Rename local.
* Create.c (atoi, atof): Remove decls; include <stdlib.h>.
(MAX_INACT_PNUM, TILE_BUF_SIZE): Remove; unused.
(x_get_resource_string): Args are readonly.
(XAllocDisplayColor): colorName is readonly.
(XMenuCreate): def_env is readonly.  Remove unused locals.  Avoid
"else;".
* Destroy.c (XMenuDestroy): Return void.
* Error.c (XMenuError): Remove const pointer.
* EvHand.c (XMenuEventHandler): Return void.
* FindPane.c, FindSel.c: Include <string.h>.
* InsPane.c (XMenuInsertPane): Rename local to avoid shadowing.
* InsSel.c (XMenuInsertSelection): Likewise.
* Internal.c (toggle_color, BUFFER_SIZE): Remove; unused.
(_XMErrorList): Now const.
(_XMWinQueInit, _XMRecomputeGlobals, _XMTransToOrigin, _XMRefreshPane):
(_XMRefreshSelection): Return void.
(_XMWinQueFlush, _XMRefreshSelection): Rename locals to avoid
shadowing.
(_XMWinQueFlush): Use stack, not heap.  Don't use uninitialized var.
* SetAEQ.c (XMenuSetAEQ): Now returns void.
* SetFrz.c (XMenuSetFreeze): Likewise.
* X10.h (XAssoc): Use void * for generic pointer.
* XDelAssoc.c: Include XMenuInt.h rather than duplicating part of it.
* XDestAssoc.c, XMakeAssoc.c: Likewise.
* XDestAssoc.c (XDestroyAssocTable): Return void.
* XMakeAssoc.c (XMakeAssoc): Use void * for generic pointer.
* XMenu.h, XMenuInt.h: Adjust to signature changes.  Use const
for pointers to readonly storage.
* insque.c: Include XMenuInt.h, to check our own signature.
(emacs_insque, emacs_remque): Use void * for generic pointers.

13 years ago* xgselect.c (xgselect_initialize): Check vs interface
Paul Eggert [Sat, 16 Apr 2011 07:57:31 +0000 (00:57 -0700)]
* xgselect.c (xgselect_initialize): Check vs interface

even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).

13 years agoregistry.el (registry-reindex): New method to recreate the secondary registry indices.
Teodor Zlatanov [Sat, 16 Apr 2011 06:56:17 +0000 (06:56 +0000)]
registry.el (registry-reindex): New method to recreate the secondary registry indices.
gnus-registry.el (gnus-registry-fixup-registry): Use it if the tracked field changes.
 (gnus-registry-unfollowed-addresses, gnus-registry-track-extra)
 (gnus-registry-action, gnus-registry-spool-action)
 (gnus-registry-handle-action)
 (gnus-registry--split-fancy-with-parent-internal)
 (gnus-registry-split-fancy-with-parent)
 (gnus-registry-register-message-ids): Add recipient tracking on spool, move, and delete actions, and for fancy splitting with parent.
 (gnus-registry-extract-addresses)
 (gnus-registry-fetch-recipients-fast)
 (gnus-registry-fetch-header-fast): Convenience functions.
 (gnus-registry-misc-test): ERT test of `gnus-registry-extract-addresses'.

13 years ago* xmenu.c (xmenu_show): Rename parm to avoid shadowing.
Paul Eggert [Sat, 16 Apr 2011 05:01:04 +0000 (22:01 -0700)]
* xmenu.c (xmenu_show): Rename parm to avoid shadowing.

13 years ago* xrdb.c (x_load_resources): Omit unused local.
Paul Eggert [Sat, 16 Apr 2011 04:37:14 +0000 (21:37 -0700)]
* xrdb.c (x_load_resources): Omit unused local.

13 years ago* xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
Paul Eggert [Sat, 16 Apr 2011 04:13:47 +0000 (21:13 -0700)]
* xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers

to read-only memory.

13 years agolisp/ChangeLog, src/ChangeLog: Fix typos.
Juanma Barranquero [Sat, 16 Apr 2011 03:44:06 +0000 (05:44 +0200)]
lisp/ChangeLog, src/ChangeLog: Fix typos.

13 years agoFixed bugs in ns_get_family and ns_descriptor_to_entity that were caused by using...
Ben Key [Sat, 16 Apr 2011 03:14:08 +0000 (22:14 -0500)]
Fixed bugs in ns_get_family and ns_descriptor_to_entity that were caused by using free to deallocate memory blocks that were allocated by xmalloc (via xstrdup).

13 years ago* fns.c (vector): Remove; this old hack is no longer needed.
Paul Eggert [Sat, 16 Apr 2011 03:13:28 +0000 (20:13 -0700)]
* fns.c (vector): Remove; this old hack is no longer needed.

13 years ago* xsmfns.c (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
Paul Eggert [Sat, 16 Apr 2011 03:06:07 +0000 (20:06 -0700)]
* xsmfns.c (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.

13 years ago* xsmfns.c: Remove unused var.
Paul Eggert [Sat, 16 Apr 2011 03:04:03 +0000 (20:04 -0700)]
* xsmfns.c: Remove unused var.

13 years ago* xsmfns.c (create_client_leader_window): Rename shadowing arg.
Paul Eggert [Sat, 16 Apr 2011 03:03:01 +0000 (20:03 -0700)]
* xsmfns.c (create_client_leader_window): Rename shadowing arg.