aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog280
1 files changed, 280 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dd25d155c66..6039a54c559 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,283 @@
12011-07-29 Paul Eggert <eggert@cs.ucla.edu>
2
3 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
4 This is needed if max-image-size is a floating-point number.
5
62011-07-28 Andreas Schwab <schwab@linux-m68k.org>
7
8 * print.c (print_object): Print empty symbol as ##.
9
10 * lread.c (read1): Read ## as empty symbol.
11
122011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13
14 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
15 setting frame foreground color (Bug#9175).
16 (x_set_background_color): Likewise.
17
18 * nsmenu.m (-setText): Size tooltip dimensions precisely to
19 contents (Bug#9176).
20 (EmacsTooltip -init): Remove bezels and add shadows to
21 tooltip windows.
22
23 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
24 or scroll bar (Bug#8470).
25
26 * nsfont.m (nsfont_open): Remove assignment to voffset and
27 unnecessary vars hshink, expand, hd, full_height, min_height.
28 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
29
30 * nsterm.h (nsfont_info): Remove voffset field.
31
322011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
33
34 Implement strike-through and overline on NextStep (Bug#8863).
35
36 * nsfont.m (nsfont_open): Use underline position provided by font,
37 instead of hard-coded value of 2.
38 (nsfont_draw): Call ns_draw_text_decoration instead.
39
40 * nsterm.h: Add declaration for ns_draw_text_decoration.
41
42 * nsterm.m (ns_draw_text_decoration): New function for drawing
43 underline, overline, and strike-through.
44 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
45 ns_draw_text_decoration. Change treatment of cursor drawing to
46 accomodate underlining, etc.
47
482011-07-28 Eli Zaretskii <eliz@gnu.org>
49
50 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
51 default.
52
532011-07-28 Paul Eggert <eggert@cs.ucla.edu>
54
55 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
56 Without this fix, if a signal arrives just after memory fills up,
57 'malloc' might be invoked reentrantly.
58
59 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
60 In other words, assume that every image size is allowed, on non-X
61 hosts. This assumption is probably wrong, but it lets Emacs compile.
62
632011-07-28 Andreas Schwab <schwab@linux-m68k.org>
64
65 * regex.c (re_iswctype): Convert return values to boolean.
66
672011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
68
69 * xdisp.c (compute_display_string_pos): Don't use cached display
70 string position if the buffer had its restriction changed.
71 (Bug#9184)
72
732011-07-28 Paul Eggert <eggert@cs.ucla.edu>
74
75 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
76
772011-07-28 Paul Eggert <eggert@cs.ucla.edu>
78
79 Integer signedness and overflow and related fixes. (Bug#9079)
80
81 * bidi.c: Integer size and overflow fixes.
82 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
83 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
84 (bidi_cache_find_level_change, bidi_cache_ensure_space)
85 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
86 (bidi_find_other_level_edge):
87 Use ptrdiff_t instead of EMACS_INT where either will do.
88 This works better on 32-bit hosts configured --with-wide-int.
89 (bidi_cache_ensure_space): Check for size-calculation overflow.
90 Use % rather than repeated addition, for better worst-case speed.
91 Don't set bidi_cache_size until after xrealloc returns, because it
92 might not return.
93 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
94 (bidi_cache_ensure_space): Also check that the bidi cache size
95 does not exceed that of the largest Lisp string or buffer. See Eli
96 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
97
98 * alloc.c (__malloc_size_t): Remove.
99 All uses replaced by size_t. See Andreas Schwab's note
100 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
101
102 * image.c: Improve checking for integer overflow.
103 (check_image_size): Assume that f is nonnull, since
104 it is always nonnull in practice. This is one less thing to
105 worry about when checking for integer overflow later.
106 (x_check_image_size): New function, which checks for integer
107 overflow issues inside X.
108 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
109 This removes the need for a memory_full check.
110 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
111 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
112 (xbm_read_bitmap_data): Change locals back to 'int', since
113 their values must fit in 'int'.
114 (xpm_load_image, png_load, tiff_load):
115 Invoke x_create_x_image_and_pixmap earlier,
116 to avoid much needless work if the image is too large.
117 (tiff_load): Treat overly large images as if
118 x_create_x_image_and_pixmap failed, not as malloc failures.
119 (gs_load): Use x_check_image_size.
120
121 * gtkutil.c: Omit integer casts.
122 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
123 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
124
125 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
126
127 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
128 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
129 would wrongly return t on a 64-bit host.
130
131 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
132 The plain *_OVERFLOW macros run afoul of GCC bug 49705
133 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
134 and therefore cause GCC to emit a bogus diagnostic in some cases.
135
136 * image.c: Integer signedness and overflow and related fixes.
137 This is not an exhaustive set of fixes, but it's time to
138 record what I've got.
139 (lookup_pixel_color, check_image_size): Remove redundant decls.
140 (check_image_size): Don't assume that arbitrary EMACS_INT values
141 fit in 'int', or that arbitrary 'double' values fit in 'int'.
142 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
143 (tiff_load, imagemagick_load_image):
144 Check for overflow in size calculations.
145 (x_create_x_image_and_pixmap): Remove unnecessary test for
146 xmalloc returning NULL; that can't happen.
147 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
148 (xpm_color_bucket): Use better integer hashing function.
149 (xpm_cache_color): Don't possibly over-allocate memory.
150 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
151 (gif_memory_source):
152 Use ptrdiff_t, not int or size_t, to record sizes.
153 (png_load): Don't assume values greater than 2**31 fit in 'int'.
154 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
155 either works, as we prefer signed integers.
156 (tiff_read_from_memory, tiff_write_from_memory):
157 Return tsize_t, not size_t, since that's what the TIFF API wants.
158 (tiff_read_from_memory): Don't fail simply because the read would
159 go past EOF; instead, return a short read.
160 (tiff_load): Omit no-longer-needed casts.
161 (Fimagemagick_types): Don't assume size fits into 'int'.
162
163 Improve hashing quality when configured --with-wide-int.
164 * fns.c (hash_string): New function, taken from sxhash_string.
165 Do not discard information about ASCII character case; this
166 discarding is no longer needed.
167 (sxhash-string): Use it. Change sig to match it. Caller changed.
168 * lisp.h: Declare it.
169 * lread.c (hash_string): Remove, since we now use fns.c's version.
170 The fns.c version returns a wider integer if --with-wide-int is
171 specified, so this should help the quality of the hashing a bit.
172
173 * emacs.c: Integer overflow minor fix.
174 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
175 Define only if GNU_LINUX.
176 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
177
178 * dispnew.c: Integer signedness and overflow fixes.
179 Remove unnecessary forward decls, that were a maintenance hassle.
180 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
181 All uses changed.
182 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
183 (scrolling_window): Use ptrdiff_t, not int, for byte count.
184 (prepare_desired_row, line_draw_cost):
185 Use int, not unsigned, where either works.
186 (save_current_matrix, restore_current_matrix):
187 Use ptrdiff_t, not size_t, where either works.
188 (init_display): Check for overflow more accurately, and without
189 relying on undefined behavior.
190
191 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
192 Remove, replacing with the new symbols in lisp.h. All uses changed.
193 * fileio.c (make_temp_name):
194 * filelock.c (lock_file_1, lock_file):
195 * xdisp.c (message_dolog):
196 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
197 Use pMd etc. instead.
198 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
199 replacing the pWIDE etc. symbols removed from editfns.c.
200
201 * keyboard.h (num_input_events): Now uintmax_t.
202 This is (very slightly) less likely to mess up due to wraparound.
203 All uses changed.
204
205 * buffer.c: Integer signedness fixes.
206 (alloc_buffer_text, enlarge_buffer_text):
207 Use ptrdiff_t rather than size_t when either will do, as we prefer
208 signed integers.
209
210 * alloc.c: Integer signedness and overflow fixes.
211 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
212 (__malloc_size_t): Default to size_t, not to int.
213 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
214 (Fgarbage_collect, mark_object_loop_halt, mark_object):
215 Prefer ptrdiff_t to size_t when either would do, as we prefer
216 signed integers.
217 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
218 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
219 Now const. Initialize with values that are in range even if char
220 is signed.
221 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
222 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
223 These functions do the right thing with sizes > 2**32.
224 (check_depth): Now ptrdiff_t, not int.
225 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
226 Adjust to new way of storing sizes. Check for size overflow bugs
227 in rest of code.
228 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
229 slightly wrong anyway, as it missed one instance of
230 XMALLOC_OVERRUN_CHECK_OVERHEAD.
231 (refill_memory_reserve): Omit needless cast to size_t.
232 (mark_object_loop_halt): Mark as externally visible.
233
234 * xselect.c: Integer signedness and overflow fixes.
235 (Fx_register_dnd_atom, x_handle_dnd_message):
236 Use ptrdiff_t, not size_t, since we prefer signed.
237 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
238 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
239 x_dnd_atoms_size and x_dnd_atoms_length.
240
241 * doprnt.c: Prefer signed to unsigned when either works.
242 * eval.c (verror):
243 * doprnt.c (doprnt):
244 * lisp.h (doprnt):
245 * xdisp.c (vmessage):
246 Use ptrdiff_t, not size_t, when using or implementing doprnt,
247 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
248 prefer signed arithmetic to avoid comparison confusion.
249 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
250 but is a bit tricky.
251
252 Assume freestanding C89 headers, string.h, stdlib.h.
253 * data.c, doprnt.c, floatfns.c, print.c:
254 Include float.h unconditionally.
255 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
256 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
257 * regex.c: Likewise for stddef.h, string.h.
258 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
259 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
260 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
261 (STDC_HEADERS): Remove obsolete defines.
262 * sysdep.c: Include limits.h unconditionally.
263
264 Assume support for memcmp, memcpy, memmove, memset.
265 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
266 * regex.c (memcmp, memcpy):
267 Remove; we assume C89 now.
268
269 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
270 (__malloc_safe_bcopy): Remove; no longer needed.
271
272 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
273 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
274 well either way, and we prefer signed to unsigned.
275
2762011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
277
278 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
279 closes the connection while we're reading (bug#9182).
280
12011-07-25 Jan Djärv <jan.h.d@swipnet.se> 2812011-07-25 Jan Djärv <jan.h.d@swipnet.se>
2 282
3 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons 283 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons