aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2012-06-14 23:05:43 -0300
committerFabián Ezequiel Gallina2012-06-14 23:05:43 -0300
commit315f675857250c2204d024748e9eafa57c68410f (patch)
tree101bfee7ff075c2eb02fd4bd80af02ed1da979b5 /src/ChangeLog
parentc6a506fefd22cb1efde1935154e79b471b943c45 (diff)
parent4302f5ba6e853d3f42ca21c536afd5a69b9e1774 (diff)
downloademacs-315f675857250c2204d024748e9eafa57c68410f.tar.gz
emacs-315f675857250c2204d024748e9eafa57c68410f.zip
Merge from trunk
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog1433
1 files changed, 1430 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c72c8ae4d65..416b74c9f68 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,1430 @@
12012-06-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 * .gdbinit (xgetint): Fix recently-introduced paren typo.
4 Assume USE_2_TAGS_FOR_INTS.
5 (xreload): Adjust $tagmask width to match recent lisp.h change.
6
7 Simplify lisp.h in minor ways that should not affect code.
8 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
9 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
10 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
11 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
12 (INTTYPEBITS): New macro, for clarity.
13 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
14 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P): Simplify
15 now that USE_LSB_TAG is always defined.
16 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
17 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
18
192012-06-13 Juanma Barranquero <lekktu@gmail.com>
20
21 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
22
232012-06-13 Glenn Morris <rgm@gnu.org>
24
25 * s/bsd-common.h (BSD4_3):
26 * s/usg5-4-common.h (USG5_4): No longer define; unused.
27
282012-06-13 Andreas Schwab <schwab@linux-m68k.org>
29
30 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
31 instead of union.
32 (XLI, XIL): Define.
33 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use
34 them.
35 * emacs.c (gdb_use_struct): Renamed from gdb_use_union.
36 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
37 * alloc.c (widen_to_Lisp_Object): Removed.
38 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
39 * frame.c (delete_frame): Remove outdated comment.
40 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
41 USE_LISP_UNION_TYPE.
42 (Fw32_unregister_hot_key): Likewise.
43 (Fw32_toggle_lock_key): Likewise.
44 * w32menu.c (add_menu_item): Likewise.
45 (w32_menu_display_help): Use XIL instead of checking
46 USE_LISP_UNION_TYPE.
47 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
48 (init_heap): Likewise.
49 * w32term.c (w32_read_socket): Update comment.
50
512012-06-13 Glenn Morris <rgm@gnu.org>
52
53 * s/usg5-4-common.h, src/s/unixware.h:
54 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
55
56 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
57
582012-06-13 Paul Eggert <eggert@cs.ucla.edu>
59
60 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
61 * alloc.c (make_number) [!defined make_number]:
62 Remove, as lisp.h always defines this now.
63 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
64 (roundup_size): Verify that it is a power of 2.
65 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
66 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
67 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
68 -DUSE_LSB_TAG=0, to override the automatically-selected default.
69 USE_LSB_TAG now is always defined to be either 0 or 1.
70 All uses changed.
71 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
72 code works fine either way, and efficiency is not a concern here,
73 as the union type is for debugging, not for production.
74 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
75 Use an inline function on all platforms when using the union type,
76 since this is simpler and 'static inline' can be used portably
77 within Emacs now.
78 (LISP_INITIALLY_ZERO): New macro.
79 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
80 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
81
822012-06-12 Glenn Morris <rgm@gnu.org>
83
84 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
85
86 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
87
88 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
89 Move BROKEN_SIGIO to configure.
90
91 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
92 Move NO_TERMIO to configure.
93
942012-06-12 Chong Yidong <cyd@gnu.org>
95
96 * image.c (imagemagick_load_image): Use MagickFlattenImage if
97 MagickMergeImageLayers is undefined. Use pixel pusher loop if
98 MagickExportImagePixels is undefined.
99
1002012-06-12 Paul Eggert <eggert@cs.ucla.edu>
101
102 * image.c (imagemagick_load_image): Remove unused label.
103
1042012-06-11 Glenn Morris <rgm@gnu.org>
105
106 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
107 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
108 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
109 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
110
1112012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
112
113 * alloc.c (make_byte_code): New function.
114 (Fmake_byte_code): Use it. Don't purify here.
115 * lread.c (read1): Use it as well to avoid extra allocation.
116
1172012-06-11 Chong Yidong <cyd@gnu.org>
118
119 * image.c (imagemagick_load_image): Implement transparency.
120
1212012-06-10 Andreas Schwab <schwab@linux-m68k.org>
122
123 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
124 account for preceding backslashes. (Bug#11663)
125
1262012-06-09 Chong Yidong <cyd@gnu.org>
127
128 * term.c: Support italics in capable terminals (Bug#9652).
129 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
130 (turn_on_face): Output using TS_enter_italic_mode if available.
131 Don't handle unused blinking and alt-charset cases.
132 (turn_off_face): Handle italic case; discard unused tty_blinking_p
133 and tty_alt_charset_p cases.
134 (tty_capable_p, init_tty): Support italics.
135
136 * termchar.h (struct tty_display_info): Add field for italics.
137 Remove unused blink field.
138
139 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
140 Handle slant.
141
142 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
143 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
144 tty_alt_charset_p. Add tty_italic_p.
145
1462012-06-09 Michael Albinus <michael.albinus@gmx.de>
147
148 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
149 dbus_type_is_basic if available.
150 (xd_extract_signed, xd_extract_unsigned): Rename from
151 extract_signed and extract_unsigned, respectively. Adapt callers.
152
1532012-06-09 Chong Yidong <cyd@gnu.org>
154
155 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
156
157 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
158 case (Bug#9752).
159
1602012-06-08 Paul Eggert <eggert@cs.ucla.edu>
161
162 * xdisp.c (vmessage): Treat frame message as multibyte.
163 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
164 would generate the diagnostic "Making \302\247 buffer-local while
165 let-bound!".
166
1672012-06-08 Eli Zaretskii <eliz@gnu.org>
168
169 * dispnew.c (showing_window_margins_p): Undo last change, which
170 was done due to an inadvertent commit.
171 (adjust_frame_glyphs_for_frame_redisplay): Do call
172 showing_window_margins_p.
173
1742012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
175
176 * eval.c (Fmake_var_non_special): New primitive.
177 (syms_of_eval): Defsubr it.
178 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
179
1802012-06-08 Juanma Barranquero <lekktu@gmail.com>
181
182 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
183 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
184
1852012-06-08 Eli Zaretskii <eliz@gnu.org>
186
187 * alloc.c (allocate_vectorlike): Fix last change.
188
1892012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
190
191 Block-based vector allocation of small vectors.
192 * lisp.h (struct vectorlike_header): New field `nbytes',
193 adjust comment accordingly.
194 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
195 to denote vector blocks. Adjust users (live_vector_p,
196 mark_maybe_pointer, valid_lisp_object_p) accordingly.
197 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
198 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
199 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
200 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
201 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
202 (roundup_size): New constant.
203 (struct vector_block): New data type.
204 (vector_blocks, vector_free_lists, zero_vector): New variables.
205 (all_vectors): Rename to `large_vectors'.
206 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
207 (sweep_vectors): New functions.
208 (allocate_vectorlike): Return `zero_vector' as the only vector of
209 0 items. Allocate new vector from block if vector size is less than
210 or equal to VBLOCK_BYTES_MAX.
211 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
212 (init_alloc_once): Add call to init_vectors.
213
2142012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
215
216 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
217
2182012-06-07 Paul Eggert <eggert@cs.ucla.edu>
219
220 * doprnt.c (doprnt): Truncate multibyte char correctly.
221 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
222 would mishandle a string argument "Xc" if X was a multibyte
223 character of length 2: it would truncate after X's first byte
224 rather than including all of X.
225
2262012-06-06 Chong Yidong <cyd@gnu.org>
227
228 * buffer.c (word_wrap): Doc fix.
229
2302012-06-04 Paul Eggert <eggert@cs.ucla.edu>
231
232 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
233
2342012-06-03 Glenn Morris <rgm@gnu.org>
235
236 * xdisp.c (tool-bar-style): Doc fix.
237
2382012-06-03 Ulrich Müller <ulm@gentoo.org>
239
240 * Makefile.in (PAXCTL): Define.
241 (temacs$(EXEEXT)): Disable memory randomization for the temacs
242 binary via PaX flags if the paxctl utility is available.
243 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
244 Restore PaX flags to their default. (Bug#11398)
245
2462012-06-03 Chong Yidong <cyd@gnu.org>
247
248 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
249 buffer (Bug#11226).
250
2512012-06-03 Chong Yidong <cyd@gnu.org>
252
253 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
254 (note_mode_line_or_margin_highlight): If there is no help echo,
255 use mode-line-default-help-echo. Handle the case where the mouse
256 position is past the end of the mode line string.
257
258 * buffer.c (buffer_local_value_1): New function, split from
259 Fbuffer_local_value; can return Qunbound.
260 (Fbuffer_local_value): Use it.
261 (Vmode_line_format): Docstring tweaks.
262
2632012-06-02 Paul Eggert <eggert@cs.ucla.edu>
264
265 * sysdep.c (system_process_attributes): Improve comment.
266
2672012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
268
269 * keyboard.c: Export real-this-command to Elisp.
270 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
271 and DEFVAR it. Update all users.
272
2732012-06-02 Paul Eggert <eggert@cs.ucla.edu>
274
275 * minibuf.c (Fassoc_string): Remove duplicate declaration.
276
277 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
278 Convert pctcpu and pctmem to Lisp float properly.
279 Let the compiler fold better, as 100.0/0x8000 is exact.
280
2812012-06-02 Andreas Schwab <schwab@linux-m68k.org>
282
283 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
284 cons_block.
285
2862012-06-01 Paul Eggert <eggert@cs.ucla.edu>
287
288 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
289
2902012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
291
292 For a 'struct window', replace some Lisp_Object fields to
293 bitfields where appropriate, remove unused fields.
294 * window.h (struct window): Remove unused 'last_mark_x' and
295 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
296 change it's type from Lisp_Object to bitfield.
297 Change type of 'force_start', 'optional_new_start',
298 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
299 fields from Lisp_Object to bitfield. Adjust users accordingly.
300
3012012-05-31 Paul Eggert <eggert@cs.ucla.edu>
302
303 Pacify gcc -Wdouble-precision when using Xaw.
304 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
305 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
306 Use 'float' consistently, rather than 'float' in most places
307 and 'double' in a couple of places.
308
3092012-05-31 Eli Zaretskii <eliz@gnu.org>
310
311 * xdisp.c (handle_stop): Detect whether we have overlay strings
312 loaded by testing it->current.overlay_string_index to be
313 non-negative, instead of checking whether n_overlay_strings is
314 positive. (Bug#11587)
315
3162012-05-31 Chong Yidong <cyd@gnu.org>
317
318 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
319
320 * doc.c (Fsubstitute_command_keys): Doc fix.
321
3222012-05-31 Eli Zaretskii <eliz@gnu.org>
323
324 * search.c (search_buffer): Remove calls to
325 r_alloc_inhibit_buffer_relocation, as it is now called by
326 maybe_unify_char, which was the cause of relocation of buffer text
327 in bug#11519.
328
3292012-05-31 Eli Zaretskii <eliz@gnu.org>
330
331 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
332 for the duration of call to load_charset, to avoid problems with
333 callers of maybe_unify_char that access buffer text through C
334 pointers.
335
336 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
337 decrement the inhibition flag, instead of just setting or
338 resetting it.
339
3402012-05-31 Paul Eggert <eggert@cs.ucla.edu>
341
342 Remove obsolete '#define static' cruft.
343 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
344 This #undef was "temporary" in 2000; it is no longer needed
345 now that '#define static' has gone away.
346 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
347 (gray_bitmap_bits): Remove; no longer needed.
348 All uses replaced with definiens.
349 * xterm.c: Include "bitmaps/gray.xbm".
350
3512012-05-30 Paul Eggert <eggert@cs.ucla.edu>
352
353 Clean up __executable_start, monstartup when --enable-profiling.
354 The following changes affect the code only when profiling.
355 * dispnew.c (__executable_start): Rename from safe_bcopy.
356 Define only on platforms that need it.
357 * emacs.c: Include <sys/gmon.h> when profiling.
358 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
359 (__executable_start): Remove decl, since lisp.h does it now.
360 (safe_bcopy): Remove decl; no longer has that name.
361 (main): Coalesce #if into single bit of code, for simplicity.
362 Cast pointers to uintptr_t, since standard libraries want integers
363 and not pointers.
364 * lisp.h (__executable_start): New decl.
365
3662012-05-31 Glenn Morris <rgm@gnu.org>
367
368 * image.c (Fimagemagick_types): Doc fix.
369
3702012-05-30 Jim Meyering <meyering@redhat.com>
371
372 * callproc.c (Fcall_process_region): Include directory component
373 in mkstemp error message (Bug#11586).
374
3752012-05-30 Paul Eggert <eggert@cs.ucla.edu>
376
377 * alloc.c, lisp.h (make_pure_vector): Now static.
378
3792012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
380
381 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
382 Move to byte-run.el.
383 (Fautoload): Do the hash-doc more carefully.
384 * data.c (Fdefalias): Purify definition, except for keymaps.
385 (Qdefun): Move from eval.c.
386 * lisp.h (Qdefun): Remove.
387 * lread.c (read1): Tiny simplification.
388
3892012-05-29 Troels Nielsen <bn.troels@gmail.com>
390
391 Do not create empty overlays with the evaporate property (Bug#9642).
392 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
393 Bug#9642, but explicitly check that the buffer the overlay would
394 be moved to is live and rearrange lines to make sure that errors
395 will not put the overlay in an inconsistent state.
396 (Fdelete_overlay): Cosmetics.
397
3982012-05-28 Eli Zaretskii <eliz@gnu.org>
399
400 * w32term.c (my_bring_window_to_top): New function.
401 (x_raise_frame): Use handle returned by DeferWindowPos, which
402 could be different from the original one.
403 Call my_bring_window_to_top instead of my_set_foreground_window.
404 (Bug#11513)
405
406 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
407 by calling BringWindowToTop.
408
409 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
410 (WM_EMACS_END): Increase by one.
411
4122012-05-28 Paul Eggert <eggert@cs.ucla.edu>
413
414 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
415 This avoids undefined behavior that might cause the eassert
416 to not catch an out-of-range value.
417
4182012-05-28 Juanma Barranquero <lekktu@gmail.com>
419
420 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
421 Update dependencies.
422
4232012-05-27 Eli Zaretskii <eliz@gnu.org>
424
425 * bidi.c (bidi_mirror_char): Fix last change.
426
4272012-05-27 Andreas Schwab <schwab@linux-m68k.org>
428
429 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
430 when referring to sectname field in printf format.
431
4322012-05-27 Paul Eggert <eggert@cs.ucla.edu>
433
434 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
435 Only r_alloc_inhibit_buffer_relocation needed to be added;
436 the others were already declared.
437
438 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
439 before checking whether it's out of range. Put the check inside
440 eassert. See
441 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
442
4432012-05-27 Ken Brown <kbrown@cornell.edu>
444
445 * callproc.c (Fcall_process): Restore a line that was accidentally
446 commented out in the 2011-02-13 change (bug#11547).
447
4482012-05-27 Eli Zaretskii <eliz@gnu.org>
449
450 * lisp.h [REL_ALLOC]: Add prototypes for external functions
451 defined on ralloc.c.
452
453 * buffer.c [REL_ALLOC]: Remove prototypes of
454 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
455 they are now on lisp.h.
456
457 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
458
459 * search.c (search_buffer): Use it to inhibit relocation of buffer
460 text while re_search_2 is doing its job, because re_search_2 is
461 passed C pointers to buffer text. (Bug#11519)
462
463 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
464 Update value to 24.
465
466 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
467 state after an additional call to move_it_in_display_line_to, keep
468 the values of it->max_ascent and it->max_descent found for the
469 entire line.
470 (pos_visible_p): Revert the comparison against bottom_y to what it
471 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
472 (Bug#11464)
473
4742012-05-26 Paul Eggert <eggert@cs.ucla.edu>
475
476 Fix coding-related core dumps with gcc -ftrapv.
477 The code was computing A - B, where A and B are pointers, and B is
478 random garbage. This can lead to core dumps on platforms that
479 have special pointer registers, and it also leads to core dumps on
480 x86-64 when compiled with gcc -ftrapv. The fix is to compute
481 A - B only when B is initialized properly.
482 * coding.c (coding_set_source, coding_set_destination): Return void.
483 (coding_change_source, coding_change_destinations): New functions,
484 with the old behaviors of coding_set_source and coding_set_destination.
485 All callers that need an offset changed to use these new functions.
486
4872012-05-26 Glenn Morris <rgm@gnu.org>
488
489 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
490
4912012-05-26 Eli Zaretskii <eliz@gnu.org>
492
493 Extend mouse support on W32 text-mode console.
494 * xdisp.c (draw_row_with_mouse_face):
495 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
496
497 * w32console.c: Include window.h.
498 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
499 New functions.
500 (initialize_w32_display): Initialize mouse-highlight data.
501
502 * w32inevt.c: Include termchar.h and window.h.
503 (do_mouse_event): Support mouse-autoselect-window. When the mouse
504 moves, call note_mouse_highlight. If help_echo changed, call
505 gen_help_event to produce help-echo message in the echo area.
506 Call clear_mouse_face if mouse_face_hidden is set in the mouse
507 highlight info.
508
5092012-05-26 Paul Eggert <eggert@cs.ucla.edu>
510
511 * lread.c (read1): Simplify slightly to avoid an overflow warning
512 with GCC 4.7.0 on x86-64.
513
5142012-05-26 Eli Zaretskii <eliz@gnu.org>
515
516 * bidi.c (bidi_mirror_char): Revert last change: an int is
517 definitely wide enough here.
518
5192012-05-25 Paul Eggert <eggert@cs.ucla.edu>
520
521 Fix integer width and related bugs (Bug#9874).
522 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
523 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
524 (string_bytes, check_sblock, allocate_string_data):
525 (compact_small_strings, Fmake_bool_vector, make_string)
526 (make_unibyte_string, make_multibyte_string)
527 (make_string_from_bytes, make_specified_string)
528 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
529 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
530 (mark_vectorlike):
531 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
532 (allocate_pseudovector):
533 Use int, not EMACS_INT, where int is wide enough.
534 (inhibit_garbage_collection, Fgarbage_collect):
535 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
536 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
537 int might not be wide enough.
538 (bidi_cache_search, bidi_cache_find, bidi_init_it)
539 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
540 (bidi_at_paragraph_end, bidi_find_paragraph_start)
541 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
542 (bidi_level_of_next_char, bidi_move_to_visually_next):
543 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
544 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
545 (Fkill_buffer, Fset_buffer_major_mode)
546 (advance_to_char_boundary, Fbuffer_swap_text)
547 (Fset_buffer_multibyte, overlays_at, overlays_in)
548 (overlay_touches_p, struct sortvec, record_overlay_string)
549 (overlay_strings, recenter_overlay_lists)
550 (adjust_overlays_for_insert, adjust_overlays_for_delete)
551 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
552 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
553 (Foverlay_recenter, last_overlay_modification_hooks_used)
554 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
555 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
556 (validate_region): Omit unnecessary test for b <= e,
557 since that's guaranteed by the previous test.
558 (adjust_overlays_for_delete): Avoid pos + length overflow.
559 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
560 (report_overlay_modification):
561 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
562 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
563 Omit pointer cast, which isn't needed anyway, and doesn't work
564 after the EMACS_INT -> ptrdiff_t change.
565 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
566 * buffer.h: Adjust decls to match defn changes elsewhere.
567 (struct buffer_text, struct buffer):
568 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
569 Use EMACS_INT, not int, where int might not be wide enough.
570 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
571 not int, to avoid needless 32-bit limit on 64-bit hosts.
572 (exec_byte_code): Use tighter memory-full test, one that checks
573 for alloca overflow. Don't compute the address of the object just
574 before an array, as that's not portable. Use EMACS_INT, not
575 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
576 * callint.c (Fcall_interactively):
577 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
578 * callproc.c (call_process_kill, Fcall_process):
579 Don't assume pid_t fits into an Emacs fixnum.
580 (call_process_cleanup, Fcall_process, child_setup):
581 Don't assume pid_t fits into int.
582 (call_process_cleanup, Fcall_process, delete_temp_file)
583 (Fcall_process_region):
584 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
585 (Fcall_process): Simplify handling of volatile integers.
586 Use int, not EMACS_INT, where int will do.
587 * casefiddle.c (casify_object, casify_region, operate_on_word)
588 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
589 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
590 (casify_object): Avoid integer overflow when overallocating buffer.
591 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
592 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
593 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
594 * category.h (CATEGORYP): Don't assume arg is nonnegative.
595 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
596 integers are now checked earlier. All uses replaced with XINT.
597 (ccl_driver):
598 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
599 For CCL_MapSingle, check that content and value are in int range.
600 (ccl_driver, Fregister_code_conversion_map):
601 Check that Vcode_version_map_vector is a vector.
602 (resolve_symbol_ccl_program): Check that vector header is in range.
603 Always copy the vector, so that we can check its contents reliably
604 now rather than having to recheck each instruction as it's being
605 executed. Check that vector words fit in 'int'.
606 (ccl_get_compiled_code, Fregister_ccl_program)
607 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
608 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
609 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
610 contents are in range.
611 (Fccl_execute_on_string): Check that status is in range.
612 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
613 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
614 Accept and return EMACS_INT, not int, because callers can pass values
615 out of 'int' range.
616 (c_string_width, strwidth, lisp_string_width, chars_in_text)
617 (multibyte_chars_in_text, parse_str_as_multibyte)
618 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
619 (str_as_unibyte, str_to_unibyte, string_count_byte8)
620 (string_escape_byte8, Fget_byte):
621 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
622 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
623 avoid mishandling large integers.
624 * character.h: Adjust decls to match defn changes elsewhere.
625 * charset.c (load_charset_map_from_file, find_charsets_in_text)
626 (Ffind_charset_region):
627 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
628 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
629 (load_charset_map_from_vector, Fdefine_charset_internal):
630 Don't assume fixnum fits in int.
631 (load_charset_map_from_vector, Fmap_charset_chars):
632 Remove now-unnecessary CHECK_NATNUMs.
633 (Fdefine_charset_internal): Check ranges here, more carefully.
634 Don't rely on undefined behavior with signed left shift overflow.
635 Don't assume unsigned int fits into fixnum, or that fixnum fits
636 into unsigned int. Don't require max_code to be a valid fixnum;
637 that's not true for gb10830 4-byte on a 32-bit host. Allow
638 invalid_code to be a cons, for the same reason. Require code_offset
639 to be a character. Avoid int overflow if max_char is close
640 to INT_MAX.
641 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
642 this is intended anyway and avoids some undefined behavior.
643 (load_charset_map): Pass unsigned, not int, as 2nd arg of
644 INDEX_TO_CODE_POINT, as that's what it expects.
645 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
646 * charset.h (DECODE_CHAR): Return int, not unsigned;
647 this is what was intended anyway, and it avoids undefined behavior.
648 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
649 integer-overflow issues.
650 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
651 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
652 where the argument is EMACS_INT, and this behavior is not intended.
653 * chartab.c (Fmake_char_table, Fset_char_table_range)
654 (uniprop_get_decoder, uniprop_get_encoder):
655 Don't assume fixnum fits in int.
656 * cmds.c (move_point): New function, that does the gist of
657 Fforward_char and Fbackward_char, but does so while checking
658 for integer overflow more accurately.
659 (Fforward_char, Fbackward_char): Use it.
660 (Fforward_line, Fend_of_line, internal_self_insert)
661 (internal_self_insert):
662 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
663 Fix a FIXME, by checking for integer overflow when calculating
664 target_clm and actual_clm.
665 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
666 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
667 (ASSURE_DESTINATION, coding_alloc_by_realloc)
668 (coding_alloc_by_making_gap, alloc_destination)
669 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
670 (encode_coding_utf_16, detect_coding_emacs_mule)
671 (decode_coding_emacs_mule, encode_coding_emacs_mule)
672 (detect_coding_iso_2022, decode_coding_iso_2022)
673 (encode_invocation_designation, encode_designation_at_bol)
674 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
675 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
676 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
677 (encode_coding_ccl, encode_coding_raw_text)
678 (detect_coding_charset, decode_coding_charset)
679 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
680 (produce_composition, produce_charset, produce_annotation)
681 (decode_coding, handle_composition_annotation)
682 (handle_charset_annotation, consume_chars, decode_coding_gap)
683 (decode_coding_object, encode_coding_object, detect_coding_system)
684 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
685 (code_convert_region, code_convert_string)
686 (Fdefine_coding_system_internal)
687 (coding_set_source, coding_set_destination):
688 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
689 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
690 (Fdefine_coding_system_internal):
691 Don't assume fixnums fit in int.
692 (decode_coding_gap, decode_coding_object, encode_coding_object)
693 (Fread_coding_system, Fdetect_coding_region)
694 (Funencodable_char_position, Fcheck_coding_systems_region)
695 (get_translation, handle_composition_annotation, consume_chars):
696 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
697 (consume_chars): Rewrite to not calculate an address outside buffer.
698 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
699 Don't access memory outside of the args array.
700 (Fdefine_coding_system_internal): Check for charset-id overflow.
701 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
702 result of ENCODE_CHAR.
703 * coding.h: Adjust decls to match defn changes elsewhere.
704 (struct coding_system):
705 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
706 * composite.c (get_composition_id, find_composition)
707 (run_composition_function, update_compositions)
708 (compose_text, composition_gstring_put_cache)
709 (composition_gstring_p, composition_gstring_width)
710 (fill_gstring_header, fill_gstring_body, autocmp_chars)
711 (composition_compute_stop_pos, composition_reseat_it)
712 (composition_update_it, struct position_record)
713 (find_automatic_composition, composition_adjust_point)
714 (Fcomposition_get_gstring, Ffind_composition_internal):
715 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
716 (update_compositions):
717 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
718 * composite.h: Adjust decls to match defn changes elsewhere.
719 (struct composition):
720 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
721 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
722 Do not attempt to compute the address of the object just before a
723 buffer; this is not portable.
724 (Faref, Faset):
725 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
726 (Faset): Use int, not EMACS_INT, where int is wide enough.
727 (Fstring_to_number): Don't assume fixnums fit in int.
728 (Frem): Don't assume arg is nonnegative.
729 * dbusbind.c (xd_append_arg): Check for integers out of range.
730 (Fdbus_call_method): Don't overflow the timeout int.
731 (extract_signed, extract_unsigned): New functions.
732 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
733 (xd_get_connection_references): Return ptrdiff_t, not int.
734 All uses changed.
735 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
736 (xd_read_message_1):
737 Use int, not unsigned, where the dbus API uses int.
738 (Fdbus_message_internal): Don't overflow mtype.
739 (syms_of_dbusbind): Allocate right-sized buffer for integers.
740 * dired.c (directory_files_internal, file_name_completion, scmp)
741 (file_name_completion_stat):
742 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
743 (file_name_completion): Don't overflow matchcount.
744 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
745 * dispextern.h: Adjust decls to match defn changes elsewhere.
746 (struct text_pos, struct glyph, struct bidi_saved_info)
747 (struct bidi_string_data, struct bidi_it, struct composition_it)
748 (struct it):
749 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
750 (struct display_pos, struct composition_it, struct it):
751 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
752 * dispnew.c (increment_matrix_positions)
753 (increment_row_positions, mode_line_string)
754 (marginal_area_string):
755 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
756 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
757 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
758 (duration_to_sec_usec): New function, to check for overflow better.
759 (Fsleep_for, sit_for): Use it.
760 * doc.c (get_doc_string, store_function_docstring):
761 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
762 (get_doc_string, Fsnarf_documentation):
763 Use int, not EMACS_INT, where int is wide enough.
764 (get_doc_string):
765 Use SAFE_ALLOCA, not alloca.
766 Check for overflow when converting EMACS_INT to off_t.
767 * doprnt.c (doprnt):
768 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
769 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
770 Don't assume uid_t fits into fixnum.
771 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
772 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
773 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
774 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
775 (general_insert_function)
776 (Finsert_char, make_buffer_string, make_buffer_string_both)
777 (update_buffer_properties, Fbuffer_substring)
778 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
779 (Fsubst_char_in_region, check_translation)
780 (Ftranslate_region_internal, save_restriction_restore, Fformat)
781 (transpose_markers, Ftranspose_regions):
782 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
783 (clip_to_bounds): Move to lisp.h as an inline function).
784 (Fconstrain_to_field): Don't assume integers are nonnegative.
785 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
786 (Fsubst_char_in_region, Fsave_restriction):
787 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
788 (Femacs_pid): Don't assume pid_t fits into fixnum.
789 (lo_time): Use int, not EMACS_INT, when int suffices.
790 (lisp_time_argument): Check for usec out of range.
791 (Fencode_time): Don't assume fixnum fits in int.
792 (Fuser_login_name, Fuser_full_name): Signal an error
793 if a uid argument is out of range, rather than relying on
794 undefined behavior.
795 (Fformat_time_string): Remove now-unnecessary check.
796 lisp_time_argument checks for out-of-range usec now.
797 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
798 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
799 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
800 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
801 (init_cmdargs, Fdump_emacs):
802 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
803 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
804 the bottom (typically) 32 bits of the fixnum.
805 * eval.c (specpdl_size, call_debugger):
806 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
807 (when_entered_debugger, Fbacktrace_debug):
808 Don't assume fixnum can fit in int.
809 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
810 the object just before a buffer; this is not portable.
811 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
812 (grow_specpdl, unbind_to):
813 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
814 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
815 (grow_specpdl): Simplify allocation by using xpalloc.
816 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
817 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
818 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
819 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
820 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
821 (a_write, e_write):
822 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
823 (Fcopy_file, non_regular_nbytes, read_non_regular)
824 (Finsert_file_contents):
825 Use int, not EMACS_INT, where int is wide enough.
826 (READ_BUF_SIZE): Verify that it fits in int.
827 (Finsert_file_contents): Check that counts are in proper range,
828 rather than assuming fixnums fit into ptrdiff_t etc.
829 Don't assume fixnums fit into int.
830 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
831 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
832 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
833 (string_char_to_byte, string_byte_to_char)
834 (string_make_multibyte, string_to_multibyte)
835 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
836 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
837 (substring_both, Fdelete, internal_equal, Ffillarray)
838 (Fclear_string, mapcar1)
839 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
840 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
841 (larger_vector, make_hash_table, maybe_resize_hash_table)
842 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
843 (Fmaphash, secure_hash):
844 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
845 (concat): Check for string index and length overflow.
846 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
847 (Frequire):
848 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
849 (larger_vector): New API (vec, incr_min, size_max) replaces old
850 one (vec, new_size, init). This catches size overflow.
851 INIT was removed because it was always Qnil.
852 All callers changed.
853 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
854 the upper bound on a hash table index size.
855 (make_hash_table, maybe_resize_hash_table): Use it.
856 (secure_hash): Computer start_byte and end_byte only after
857 they're known to be in ptrdiff_t range.
858 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
859 (Ffont_get_glyphs, Ffont_at):
860 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
861 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
862 (Flist_fonts, Fopen_font):
863 Don't assume fixnum can fit in int.
864 (check_gstring): Don't assume index can fit in int.
865 (font_match_p): Check that fixnum is a character, not a nonnegative
866 fixnum, since the later code needs to stuff it into an int.
867 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
868 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
869 conversion overflow issues.
870 (Fopen_font): Check for integer out of range.
871 (Ffont_get_glyphs): Don't assume index can fit in int.
872 * font.h: Adjust decls to match defn changes elsewhere.
873 * fontset.c (reorder_font_vector): Redo score calculation to avoid
874 integer overflow.
875 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
876 printmax_t, where ptrdiff_t is wide enough.
877 (Finternal_char_font):
878 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
879 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
880 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
881 (Fset_frame_position, x_set_frame_parameters)
882 (x_set_line_spacing, x_set_border_width)
883 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
884 Check that fixnums are in proper range for system types.
885 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
886 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
887 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
888 Use SAFE_ALLOCA_LISP, not alloca.
889 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
890 intptr_t is wide enough.
891 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
892 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
893 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
894 Check for fixnum out of range.
895 * ftfont.c (ftfont_list): Don't assume index fits in int.
896 Check that fixnums are in proper range for system types.
897 (ftfont_shape_by_flt):
898 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
899 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
900 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
901 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
902 Check that fixnums are in proper range for system types.
903 * gnutls.h: Adjust decls to match defn changes elsewhere.
904 * gtkutil.c (xg_dialog_run):
905 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
906 (update_frame_tool_bar):
907 Check that fixnums are in proper range for system types.
908 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
909 (lookup_image): Check that fixnums are in range for system types.
910 * indent.c (last_known_column, last_known_column_point):
911 (current_column_bol_cache):
912 (skip_invisible, current_column, check_display_width):
913 (check_display_width, scan_for_column, current_column_1)
914 (Findent_to, Fcurrent_indentation, position_indentation)
915 (indented_beyond_p, Fmove_to_column, compute_motion):
916 (Fcompute_motion, Fvertical_motion):
917 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
918 (last_known_column_modified): Use EMACS_INT, not int.
919 (check_display_width):
920 (Fcompute_motion):
921 Check that fixnums and floats are in proper range for system types.
922 (compute_motion): Don't assume index or fixnum fits in int.
923 (compute_motion, Fcompute_motion):
924 Use int, not EMACS_INT, when it is wide enough.
925 (vmotion): Omit local var start_hpos that is always 0; that way
926 we don't need to worry about overflow in expressions involving it.
927 * indent.h: Adjust decls to match defn changes elsewhere.
928 (struct position):
929 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
930 Use int, not EMACS_INT, where int is wide enough.
931 Remove unused members ovstring_chars_done and tab_offset;
932 all uses removed.
933 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
934 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
935 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
936 (make_gap, copy_text, insert, insert_and_inherit)
937 (insert_before_markers, insert_before_markers_and_inherit)
938 (insert_1, count_combining_before, count_combining_after)
939 (insert_1_both, insert_from_string)
940 (insert_from_string_before_markers, insert_from_string_1)
941 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
942 (adjust_after_replace, adjust_after_insert, replace_range)
943 (replace_range_2, del_range, del_range_1, del_range_byte)
944 (del_range_both, del_range_2, modify_region)
945 (prepare_to_modify_buffer, signal_before_change)
946 (signal_after_change, Fcombine_after_change_execute):
947 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
948 * intervals.c (traverse_intervals, rotate_right, rotate_left)
949 (balance_an_interval, split_interval_right, split_interval_left)
950 (find_interval, next_interval, update_interval)
951 (adjust_intervals_for_insertion, delete_node, delete_interval)
952 (interval_deletion_adjustment, adjust_intervals_for_deletion)
953 (static_offset_intervals, offset_intervals)
954 (merge_interval_right, merge_interval_left, make_new_interval)
955 (graft_intervals_into_buffer, temp_set_point_both)
956 (temp_set_point, set_point, adjust_for_invis_intang)
957 (set_point_both, move_if_not_intangible, get_property_and_range)
958 (get_local_map, copy_intervals, copy_intervals_to_string)
959 (compare_string_intervals, set_intervals_multibyte_1):
960 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
961 * intervals.h: Adjust decls to match defn changes elsewhere.
962 (struct interval):
963 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
964 * keyboard.c (this_command_key_count, this_single_command_key_start)
965 (before_command_key_count, before_command_echo_length, echo_now)
966 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
967 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
968 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
969 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
970 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
971 (last_non_minibuf_size, last_point_position, echo_truncate)
972 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
973 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
974 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
975 (stuff_buffered_input):
976 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977 (last_auto_save, command_loop_1, read_char):
978 Use EMACS_INT, not int, to avoid integer overflow.
979 (record_char): Avoid overflow in total_keys computation.
980 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
981 * keyboard.h: Adjust decls to match defn changes elsewhere.
982 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
983 (Fkey_description, Fdescribe_vector, Flookup_key):
984 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
985 (click_position): New function, to check that positions are in range.
986 (Fcurrent_active_maps):
987 (describe_command):
988 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
989 (Faccessible_keymaps, Fkey_description):
990 (preferred_sequence_p):
991 Don't assume fixnum can fit into int.
992 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
993 Check for integer overflow in size calculations.
994 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
995 avoid mishandling large integers.
996 * lisp.h: Adjust decls to match defn changes elsewhere.
997 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
998 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
999 (struct Lisp_Marker):
1000 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1001 (clip_to_bounds): Now an inline function, moved here from editfns.c.
1002 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
1003 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
1004 All callers changed.
1005 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
1006 Assume the arg has valid form, since it always does.
1007 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
1008 unsigned integer system type.
1009 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
1010 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
1011 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1012 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
1013 (duration_to_sec_usec): New decl.
1014 * lread.c (read_from_string_index, read_from_string_index_byte)
1015 (read_from_string_limit, readchar, unreadchar, openp)
1016 (read_internal_start, read1, oblookup):
1017 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1018 (Fload, readevalloop, Feval_buffer, Feval_region):
1019 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1020 (openp): Check for out-of-range argument to 'access'.
1021 (read1): Use int, not EMACS_INT, where int is wide enough.
1022 Don't assume fixnum fits into int.
1023 Fix off-by-one error that can read outside a buffer.
1024 (read_filtered_event): Use duration_to_sec_usec
1025 to do proper overflow checking on durations.
1026 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
1027 in size calculation.
1028 (Fexecute_kbd_macro):
1029 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1030 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
1031 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
1032 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
1033 (set_marker_both, set_marker_restricted_both, marker_position)
1034 (marker_byte_position, Fbuffer_has_markers_at):
1035 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1036 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
1037 * menu.c (ensure_menu_items): Rename from grow_menu_items.
1038 It now merely ensures that the menu is large enough, without
1039 necessarily growing it, as this avoids some integer overflow issues.
1040 All callers changed.
1041 (keymap_panes, parse_single_submenu, Fx_popup_menu):
1042 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1043 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
1044 Use SAFE_ALLOCA_LISP, not alloca.
1045 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
1046 to EMACS_INT. Check that fixnums are in proper range for system types.
1047 * minibuf.c (minibuf_prompt_width, string_to_object)
1048 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
1049 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
1050 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1051 (get_minibuffer, read_minibuf_unwind):
1052 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1053 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
1054 this simplifies overflow checking. All callers changed.
1055 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
1056 (Ftest_completion):
1057 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1058 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
1059 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
1060 Check that fixnums are in proper range for system types.
1061 (Fx_create_frame, Fx_show_tip):
1062 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1063 * nsfont.m (ns_findfonts, nsfont_list_family):
1064 Don't assume fixnum fits in long.
1065 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
1066 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1067 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
1068 wide enough.
1069 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
1070 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1071 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
1072 (PRINTDECLARE, PRINTPREPARE):
1073 (strout, print_string):
1074 (print, print_preprocess, print_check_string_charset_prop)
1075 (print_object):
1076 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1077 (PRINTDECLARE):
1078 (temp_output_buffer_setup, Fprin1_to_string, print_object):
1079 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1080 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
1081 (printchar, strout): Use xpalloc to catch size calculation overflow.
1082 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
1083 (print_error_message): Use SAFE_ALLOCA, not alloca.
1084 (print_object): Use int, not EMACS_INT, where int is wide enough.
1085 (print_depth, new_backquote_output, print_number_index):
1086 Use ptrdiff_t, not int, where int might not be wide enough.
1087 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
1088 (Fset_process_window_size, Fformat_network_address)
1089 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
1090 (sigchld_handler):
1091 Check that fixnums are in proper range for system types.
1092 (Fsignal_process): Simplify by avoiding a goto.
1093 Check for process-ids out of pid_t range rather than relying on
1094 undefined behavior.
1095 (process_tick, update_tick): Use EMACS_INT, not int.
1096 (Fformat_network_address, read_process_output, send_process)
1097 (Fprocess_send_region, status_notify):
1098 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1099 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
1100 (wait_reading_process_output, read_process_output, exec_sentinel):
1101 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1102 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
1103 (Faccept_process_output): Use duration_to_sec_usec to do proper
1104 overflow checking on durations.
1105 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
1106 Don't assume pid_t fits in int.
1107 * process.h (struct Lisp_Process): Members tick and update_tick
1108 are now of type EMACS_INT, not int.
1109 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
1110 configured --with-wide-int.
1111 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
1112 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
1113 * search.c (looking_at_1, string_match_1):
1114 (fast_string_match, fast_c_string_match_ignore_case)
1115 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
1116 (scan_newline, find_before_next_newline, search_command)
1117 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
1118 (set_search_regs, wordify):
1119 (Freplace_match):
1120 (Fmatch_data):
1121 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1122 (string_match_1, search_buffer, set_search_regs):
1123 (Fmatch_data):
1124 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1125 (wordify): Check for overflow in size calculation.
1126 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
1127 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
1128 Check that fixnums are in proper range for system types.
1129 * sound.c (struct sound_device)
1130 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
1131 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1132 (Fplay_sound_internal):
1133 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1134 * syntax.c (struct lisp_parse_state, find_start_modiff)
1135 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
1136 (Fparse_partial_sexp):
1137 Don't assume fixnums can fit in int.
1138 (struct lisp_parse_state, find_start_pos, find_start_value)
1139 (find_start_value_byte, find_start_begv)
1140 (update_syntax_table, char_quoted, dec_bytepos)
1141 (find_defun_start, prev_char_comend_first, back_comment):
1142 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
1143 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
1144 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1145 (Finternal_describe_syntax_value): Check that match_lisp is a
1146 character, not an integer, since the code stuffs it into int.
1147 (scan_words, scan_sexps_forward):
1148 Check that fixnums are in proper range for system types.
1149 (Fforward_word):
1150 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1151 (scan_sexps_forward):
1152 Use CHARACTERP, not INTEGERP, since the value must fit into int.
1153 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
1154 * syntax.h: Adjust decls to match defn changes elsewhere.
1155 (struct gl_state_s):
1156 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1157 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
1158 MOST_POSITIVE_FIXNUM.
1159 * sysdep.c (wait_for_termination_1, wait_for_termination)
1160 (interruptible_wait_for_termination, mkdir):
1161 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
1162 (emacs_read, emacs_write):
1163 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1164 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
1165 and double all fit in int.
1166 * term.c (set_tty_color_mode):
1167 Check that fixnums are in proper range for system types.
1168 * termhooks.h (struct input_event):
1169 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1170 * textprop.c (validate_interval_range, interval_of)
1171 (Fadd_text_properties, set_text_properties_1)
1172 (Fremove_text_properties, Fremove_list_of_text_properties)
1173 (Ftext_property_any, Ftext_property_not_all)
1174 (copy_text_properties, text_property_list, extend_property_ranges)
1175 (verify_interval_modification):
1176 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1177 (Fnext_single_char_property_change)
1178 (Fprevious_single_char_property_change):
1179 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1180 (copy_text_properties):
1181 Check for integer overflow in index calculation.
1182 * undo.c (last_boundary_position, record_point, record_insert)
1183 (record_delete, record_marker_adjustment, record_change)
1184 (record_property_change):
1185 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1186 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
1187 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1188 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
1189 (Fx_hide_tip, Fx_file_dialog):
1190 * w32menu.c (set_frame_menubar):
1191 Use ptrdiff_t, not int, for consistency with rest of code.
1192 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
1193 (select_window, Fdelete_other_windows_internal)
1194 (window_scroll_pixel_based, window_scroll_line_based)
1195 (Frecenter, Fset_window_configuration):
1196 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1197 (Fset_window_hscroll, run_window_configuration_change_hook)
1198 (set_window_buffer, temp_output_buffer_show, scroll_command)
1199 (Fscroll_other_window, Frecenter):
1200 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1201 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
1202 Don't assume fixnum fits in int.
1203 (Fset_window_scroll_bars):
1204 Check that fixnums are in proper range for system types.
1205 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
1206 (string_pos, c_string_pos, number_of_chars, init_iterator)
1207 (in_ellipses_for_invisible_text_p, init_from_display_pos)
1208 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
1209 (compute_display_string_end, handle_face_prop)
1210 (face_before_or_after_it_pos, handle_invisible_prop)
1211 (handle_display_prop, handle_display_spec, handle_single_display_spec)
1212 (display_prop_intangible_p, string_buffer_position_lim)
1213 (string_buffer_position, handle_composition_prop, load_overlay_strings)
1214 (get_overlay_strings_1, get_overlay_strings)
1215 (iterate_out_of_display_property, forward_to_next_line_start)
1216 (back_to_previous_visible_line_start, reseat, reseat_to_string)
1217 (get_next_display_element, set_iterator_to_next)
1218 (get_visually_first_element, compute_stop_pos_backwards)
1219 (handle_stop_backwards, next_element_from_buffer)
1220 (move_it_in_display_line_to, move_it_in_display_line)
1221 (move_it_to, move_it_vertically_backward, move_it_by_lines)
1222 (add_to_log, message_dolog, message_log_check_duplicate)
1223 (message2, message2_nolog, message3, message3_nolog
1224 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
1225 (current_message_1, truncate_echo_area, truncate_message_1)
1226 (set_message, set_message_1, store_mode_line_noprop)
1227 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
1228 (text_outside_line_unchanged_p, check_point_in_composition)
1229 (reconsider_clip_changes)
1230 (redisplay_internal, set_cursor_from_row, try_scrolling)
1231 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
1232 (redisplay_window, find_last_unchanged_at_beg_row)
1233 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
1234 (trailing_whitespace_p, find_row_edges, display_line)
1235 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
1236 (display_mode_element, store_mode_line_string)
1237 (pint2str, pint2hrstr, decode_mode_spec)
1238 (display_count_lines, display_string, draw_glyphs)
1239 (x_produce_glyphs, x_insert_glyphs)
1240 (rows_from_pos_range, mouse_face_from_buffer_pos)
1241 (fast_find_string_pos, mouse_face_from_string_pos)
1242 (note_mode_line_or_margin_highlight, note_mouse_highlight):
1243 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1244 (safe_call, init_from_display_pos, handle_fontified_prop)
1245 (handle_single_display_spec, load_overlay_strings)
1246 (with_echo_area_buffer, setup_echo_area_for_printing)
1247 (display_echo_area, echo_area_display)
1248 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
1249 (update_tool_bar, hscroll_window_tree, redisplay_internal)
1250 (redisplay_window, dump_glyph_row, display_mode_line)
1251 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
1252 (handle_display_spec, display_prop_string_p):
1253 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1254 (handle_single_display_spec, build_desired_tool_bar_string)
1255 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
1256 (get_specified_cursor_type):
1257 Check that fixnums are in proper range for system types.
1258 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
1259 (Flookup_image_map):
1260 Don't assume fixnums fit in int.
1261 (compare_overlay_entries):
1262 Avoid mishandling comparisons due to subtraction overflow.
1263 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
1264 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
1265 (handle_tool_bar_click):
1266 Use int, not unsigned, since we prefer signed and the signedness
1267 doesn't matter here.
1268 (get_next_display_element, next_element_from_display_vector):
1269 Use int, not EMACS_INT, when int is wide enough.
1270 (start_hourglass): Use duration_to_sec_usec to do proper
1271 overflow checking on durations.
1272 * xfaces.c (Fbitmap_spec_p):
1273 Check that fixnums are in proper range for system types.
1274 (compare_fonts_by_sort_order):
1275 Avoid mishandling comparisons due to subtraction overflow.
1276 (Fx_family_fonts, realize_basic_faces):
1277 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1278 (Fx_family_fonts):
1279 Don't assume fixnum fits in int.
1280 Use SAFE_ALLOCA_LISP, not alloca.
1281 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
1282 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
1283 (face_at_buffer_position, face_for_overlay_string)
1284 (face_at_string_position):
1285 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1286 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
1287 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
1288 (Fx_show_tip):
1289 Check that fixnums are in proper range for system types.
1290 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
1291 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
1292 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1293 (Fx_change_window_property): Don't assume fixnums fit in int.
1294 * xfont.c (xfont_chars_supported):
1295 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1296 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
1297 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
1298 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1299 * xml.c (parse_region):
1300 * xrdb.c (magic_file_p):
1301 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
1302 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
1303 (x_get_local_selection, x_reply_selection_request)
1304 (x_handle_selection_request, wait_for_property_change):
1305 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1306 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
1307 short is wide enough.
1308 (x_send_client_event): Don't assume fixnum fits in int.
1309 * xterm.c (x_x_to_emacs_modifiers):
1310 Don't assume EMACS_INT overflows nicely into int.
1311 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
1312 may come from Lisp.
1313 (handle_one_xevent): NATNUMP can eval its arg twice.
1314 (x_connection_closed):
1315 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
1316 * xterm.h: Adjust decls to match defn changes elsewhere.
1317 (struct scroll_bar): Use struct vectorlike_header
1318 rather than rolling our own approximation.
1319 (SCROLL_BAR_VEC_SIZE): Remove; not used.
1320
13212012-05-25 Glenn Morris <rgm@gnu.org>
1322
1323 * lisp.mk (lisp): Update for more files being compiled now.
1324
13252012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
1326
1327 * lread.c: Remove `read_pure' which makes no difference.
1328 (read_pure): Remove var.
1329 (unreadpure): Remove function.
1330 (readevalloop): Don't call read_list with -1 flag.
1331 (read1, read_vector): Don't test read_pure any more.
1332 (read_list): Simplify.
1333
1334 * fileio.c, character.h: Minor style tweaks.
1335
13362012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
1337
1338 * window.h (clip_changed): Remove useless declaration.
1339
13402012-05-22 Juanma Barranquero <lekktu@gmail.com>
1341
1342 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
1343 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
1344
13452012-05-22 Paul Eggert <eggert@cs.ucla.edu>
1346
1347 Remove src/m/*.
1348 This directory predates autoconf and is no longer needed nowadays.
1349 Move its few remaining bits of functionality to where they're needed.
1350 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
1351 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
1352 * m/template.h: Remove.
1353 * Makefile.in (M_FILE): Remove. All uses removed.
1354 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
1355 * lisp.h (USE_LSB_TAG):
1356 * mem-limits.h (EXCEEDS_LISP_PTR):
1357 Use VAL_MAX, not VALBITS, in #if.
1358 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
1359 (EMACS_UINT): Define unconditionally now.
1360 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
1361 (BITS_PER_EMACS_INT): New constants, replacing
1362 what used to be in config.h, but not useful in #if.
1363 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
1364 define them any more.
1365 (VAL_MAX): New macro.
1366 (VALMASK): Use it.
1367 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
1368 BITS_PER_EMACS_INT, in #if.
1369 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
1370 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
1371 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
1372 * s/ms-w32.h (DATA_START):
1373 Move here from removed file m/intel386.h.
1374 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
1375 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
1376
13772012-05-21 Paul Eggert <eggert@cs.ucla.edu>
1378
1379 Assume C89 or later.
1380 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
1381 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
1382 (xrealloc):
1383 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
1384 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
1385 * textprop.c, tparam.c (NULL): Remove.
1386 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
1387 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
1388 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
1389 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
1390 * xterm.c (input_signal_count): Assume volatile works.
1391
13922012-05-21 Ken Brown <kbrown@cornell.edu>
1393
1394 * xgselect.c (xg_select): Fix first argument in call to 'select'
1395 (bug#11508).
1396
13972012-05-20 Ken Brown <kbrown@cornell.edu>
1398
1399 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
1400 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1401
14022012-05-19 Ken Brown <kbrown@cornell.edu>
1403
1404 * xfns.c (x_in_use): Remove `static' qualifier.
1405 * xterm.h (x_in_use): Declare.
1406 * xgselect.c: Include xterm.h.
1407 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
1408 and `display_arg' (bug#9754).
1409
14102012-05-19 Paul Eggert <eggert@cs.ucla.edu>
1411
1412 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
1413
1414 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
1415 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
1416
14172012-05-18 Eli Zaretskii <eliz@gnu.org>
1418
1419 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
1420
1421 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
1422 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c
1423
1424 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
1425 reference to image_cache->refcount.
1426 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
1427
12012-05-17 Juri Linkov <juri@jurta.org> 14282012-05-17 Juri Linkov <juri@jurta.org>
2 1429
3 * search.c (Fword_search_regexp, Fword_search_backward) 1430 * search.c (Fword_search_regexp, Fword_search_backward)
@@ -52,8 +1479,8 @@
52 1479
53 * xdisp.c (handle_single_display_spec): Return 1 for left-margin 1480 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
54 and right-margin display specs even if the spec is invalid or we 1481 and right-margin display specs even if the spec is invalid or we
55 are on a TTY, and thus unable to display on the fringes. That's 1482 are on a TTY, and thus unable to display on the fringes.
56 because the text with the property will not be displayed anyway, 1483 That's because the text with the property will not be displayed anyway,
57 so we need to signal to the caller that this is a "replacing" 1484 so we need to signal to the caller that this is a "replacing"
58 display spec. This fixes display when the spec is invalid or we 1485 display spec. This fixes display when the spec is invalid or we
59 are on a TTY. 1486 are on a TTY.
@@ -347,7 +1774,7 @@
3472012-04-22 Paul Eggert <eggert@cs.ucla.edu> 17742012-04-22 Paul Eggert <eggert@cs.ucla.edu>
348 1775
349 Modernize and clean up gmalloc.c to assume C89 (Bug#9119). 1776 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
350 * gmalloc.c: (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t) 1777 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
351 (__malloc_size_t, __malloc_ptrdiff_t): 1778 (__malloc_size_t, __malloc_ptrdiff_t):
352 Remove. All uses removed, replaced by the definiens if needed, 1779 Remove. All uses removed, replaced by the definiens if needed,
353 since we can assume C89 or better now. 1780 since we can assume C89 or better now.