1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

100028 commits

Author SHA1 Message Date
Paul Eggert
e50d64ebfa Remove blank line. 2011-04-18 18:15:59 -07:00
Paul Eggert
9b821a2194 * fns.c (internal_equal): Don't assume size_t fits in int. 2011-04-18 18:11:43 -07:00
Paul Eggert
3c616cfa13 * alloc.c (compact_small_strings): Tighten assertion a little. 2011-04-18 17:42:41 -07:00
Paul Eggert
c2982e87d3 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.
2011-04-18 17:34:42 -07:00
Paul Eggert
5e073ec738 * 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.
2011-04-18 16:32:38 -07:00
Paul Eggert
d0f4e1f5ac * alloc.c (check_sblock, check_string_bytes, check_string_free_list): Protoize. 2011-04-17 21:45:15 -07:00
Paul Eggert
36372bf93f * 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.
2011-04-17 21:41:29 -07:00
Paul Eggert
c7bda33cad * 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).
2011-04-17 21:25:27 -07:00
Paul Eggert
000098c135 * alloc.c (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
can cause Emacs to crash when string overrun checking is enabled.
2011-04-17 21:16:47 -07:00
Paul Eggert
bfd1c7811d * alloc.c (string_overrun_cookie): Now const. Use initializers that
don't formally overflow signed char, to avoid warnings.
2011-04-17 21:13:51 -07:00
Paul Eggert
83998b7a92 Fix typo in comment. 2011-04-17 21:11:56 -07:00
Paul Eggert
0b432f213c * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
This doesn't fix a bug but makes the code clearer.
2011-04-17 21:08:35 -07:00
Paul Eggert
cc2e7b46b8 Merge from gnulib. 2011-04-17 21:03:18 -07:00
Chong Yidong
4581706e27 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.
2011-04-17 14:40:55 -04:00
Glenn Morris
14964899b3 * etc/CONTRIBUTE: Recommend bug-gnu-emacs for patches. 2011-04-16 19:30:56 -07:00
Glenn Morris
4d2d1ccdbb 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.
2011-04-16 19:11:49 -07:00
Glenn Morris
61c2b50edd ChangeLog fix. 2011-04-16 16:31:57 -07:00
Glenn Morris
239da61d98 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'.
2011-04-16 16:30:15 -07:00
Paul Eggert
fd35b6f967 Static checks with GCC 4.6.0 and non-default toolkits. 2011-04-16 16:11:35 -07:00
Paul Eggert
399c71d323 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512). 2011-04-16 15:48:31 -07:00
Paul Eggert
68afa9ca47 * pop.c: Undo previous change. 2011-04-16 15:32:35 -07:00
Paul Eggert
c7b7425e22 Merge from mainline. 2011-04-16 15:30:01 -07:00
Paul Eggert
5c1ccb0154 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl. 2011-04-16 15:06:00 -07:00
Paul Eggert
006c5daa68 * 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.
2011-04-16 15:04:41 -07:00
Paul Eggert
efc736d319 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'. 2011-04-16 14:57:28 -07:00
Paul Eggert
4e2fe2e61d * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts. 2011-04-16 14:50:01 -07:00
Paul Eggert
f97334a26e * data.c (arith_error): Mark with NO_RETURN if it doesn't return. 2011-04-16 14:48:36 -07:00
Paul Eggert
4e75f29d3a * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
Define only if needed.
2011-04-16 14:47:57 -07:00
Paul Eggert
761383f4ec * xterm.c (xembed_send_message): Likewise. 2011-04-16 14:29:00 -07:00
Paul Eggert
875975e94d * xfaces.c (USG, __TIMEVAL__): Likewise. 2011-04-16 14:28:14 -07:00
Paul Eggert
e264f2620b * termhooks.h (struct terminal): Likewise. 2011-04-16 14:27:29 -07:00
Paul Eggert
90efadd1f6 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
by pacifying GCC about it.  Maybe it's time to retire it?
2011-04-16 14:26:33 -07:00
Paul Eggert
3c647824ce * dispextern.h (struct redisplay_interface): Rename param
to avoid shadowing.
2011-04-16 14:24:54 -07:00
Paul Eggert
b165261a47 * lwlib-utils.c (XtCompositeChildren): Likewise. 2011-04-16 14:23:30 -07:00
Paul Eggert
5c5e6a401e * lwlib-Xm.c (make_dialog): Rename local to avoid shadowing.
(make_menu_in_widget): Add cast to avoid warning.
2011-04-16 14:22:40 -07:00
Paul Eggert
fe3bfdde8d * pop.c (socket_connection): Double-cast to avoid GCC warning
about alignment.
2011-04-16 14:21:24 -07:00
Paul Eggert
5a9c1e26a7 * 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.
2011-04-16 14:20:25 -07:00
Paul Eggert
cd52b2441e * fakemail.c (xmalloc, xreallc): Use standard C prototypes
with void *.  This avoids warnings about pointer casts.
2011-04-16 14:13:07 -07:00
Paul Eggert
c5443aa547 * emacsclient.c (main): Don't use uninitialized var.
(IS_ANY_SEP): Remove; unused.
(get_current_dir_name): Add an extern decl.
2011-04-16 14:11:28 -07:00
Paul Eggert
b58c5c4af7 * insdel.c (make_gap_smaller): Define only if
USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
2011-04-16 13:32:18 -07:00
Paul Eggert
cad5903248 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
it.
2011-04-16 13:27:04 -07:00
Paul Eggert
c339dc2e7e * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
so that we aren't warned about unused symbols.
2011-04-16 13:21:26 -07:00
Paul Eggert
94578f9cc2 Add bug#. 2011-04-16 13:09:28 -07:00
Paul Eggert
91a3e27bb7 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing. 2011-04-16 13:07:17 -07:00
Paul Eggert
7a3fb1252c * xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized var. 2011-04-16 12:42:09 -07:00
Eli Zaretskii
c4354cb4f4 Fix argument to error' in gnutls-boot'.
src/gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
2011-04-16 15:16:40 -04:00
Eli Zaretskii
d1dfb56cc8 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.
2011-04-16 21:26:30 +03:00
Paul Eggert
dda3aeddcb * xterm.c (x_dispatch_event): More accurate ifdefs. 2011-04-16 09:44:58 -07:00
Paul Eggert
748945cc8b * lwlib.c (first_child) [USE_MOTIF]: Protoize. 2011-04-16 09:42:58 -07:00
Paul Eggert
8ffc96f571 * xfns.c (x_real_positions): Mark locals as initialized. 2011-04-16 08:39:35 -07:00