diff options
| author | Paul Eggert | 2011-07-13 23:41:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-13 23:41:47 -0700 |
| commit | cf950e6bbdeec3f6aab3e119f26f9cd5d962ac2e (patch) | |
| tree | 1bdb0fd052770b8c3b0c6ea83fb7c6a9bfdd5b85 /src | |
| parent | ca4aa9359160557f8103639fc3c0ccb16c6ba8d2 (diff) | |
| parent | 27fa387ad10e6a5639de1ab08e7559c06e9d802d (diff) | |
| download | emacs-cf950e6bbdeec3f6aab3e119f26f9cd5d962ac2e.tar.gz emacs-cf950e6bbdeec3f6aab3e119f26f9cd5d962ac2e.zip | |
Merge from trunk.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/ChangeLog.6 | 2 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/editfns.c | 8 | ||||
| -rw-r--r-- | src/gnutls.c | 9 |
5 files changed, 37 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e07b906b56d..2b6fc837b62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-07-14 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Integer signedness and overflow and related fixes. | ||
| 4 | |||
| 3 | * image.c: Improve checking for integer overflow. | 5 | * image.c: Improve checking for integer overflow. |
| 4 | (check_image_size): Assume that f is nonnull, since | 6 | (check_image_size): Assume that f is nonnull, since |
| 5 | it is always nonnull in practice. This is one less thing to | 7 | it is always nonnull in practice. This is one less thing to |
| @@ -19,8 +21,6 @@ | |||
| 19 | x_create_x_image_and_pixmap failed, not as malloc failures. | 21 | x_create_x_image_and_pixmap failed, not as malloc failures. |
| 20 | (gs_load): Use x_check_image_size. | 22 | (gs_load): Use x_check_image_size. |
| 21 | 23 | ||
| 22 | 2011-07-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 23 | |||
| 24 | * gtkutil.c: Omit integer casts. | 24 | * gtkutil.c: Omit integer casts. |
| 25 | (xg_get_pixbuf_from_pixmap): Remove unnecessary cast. | 25 | (xg_get_pixbuf_from_pixmap): Remove unnecessary cast. |
| 26 | (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast. | 26 | (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast. |
| @@ -115,7 +115,7 @@ | |||
| 115 | * bidi.c: Integer signedness and overflow fixes. | 115 | * bidi.c: Integer signedness and overflow fixes. |
| 116 | (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state) | 116 | (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state) |
| 117 | (bidi_cache_search, bidi_cache_find_level_change) | 117 | (bidi_cache_search, bidi_cache_find_level_change) |
| 118 | (bidi_cache_iterator_state, bidi_cache_find) | 118 | p (bidi_cache_iterator_state, bidi_cache_find) |
| 119 | (bidi_find_other_level_edge, bidi_dump_cached_states): | 119 | (bidi_find_other_level_edge, bidi_dump_cached_states): |
| 120 | Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead. | 120 | Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead. |
| 121 | (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer | 121 | (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer |
| @@ -185,10 +185,23 @@ | |||
| 185 | * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now. | 185 | * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now. |
| 186 | (__malloc_safe_bcopy): Remove; no longer needed. | 186 | (__malloc_safe_bcopy): Remove; no longer needed. |
| 187 | 187 | ||
| 188 | * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. | 188 | * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. |
| 189 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally | 189 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally |
| 190 | well either way, and we prefer signed to unsigned. | 190 | well either way, and we prefer signed to unsigned. |
| 191 | 191 | ||
| 192 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 193 | |||
| 194 | * editfns.c (Fstring_to_char): Clarify just what is returned | ||
| 195 | (bug#6576). Text by Eli Zaretskii. | ||
| 196 | |||
| 197 | 2011-07-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 198 | |||
| 199 | * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059). | ||
| 200 | |||
| 201 | 2011-07-13 Eli Zaretskii <eliz@gnu.org> | ||
| 202 | |||
| 203 | * buffer.c (mmap_find): Fix a typo. | ||
| 204 | |||
| 192 | 2011-07-13 Johan Bockgård <bojohan@gnu.org> | 205 | 2011-07-13 Johan Bockgård <bojohan@gnu.org> |
| 193 | 206 | ||
| 194 | Fix execution of x selection hooks. | 207 | Fix execution of x selection hooks. |
| @@ -203,7 +216,7 @@ | |||
| 203 | 216 | ||
| 204 | 2011-07-13 Paul Eggert <eggert@cs.ucla.edu> | 217 | 2011-07-13 Paul Eggert <eggert@cs.ucla.edu> |
| 205 | 218 | ||
| 206 | * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking. | 219 | * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking. |
| 207 | The old code sometimes used this field without initializing it. | 220 | The old code sometimes used this field without initializing it. |
| 208 | 221 | ||
| 209 | * alloc.c (gc_sweep): Don't read past end of array. | 222 | * alloc.c (gc_sweep): Don't read past end of array. |
| @@ -213,7 +226,7 @@ | |||
| 213 | 2011-07-12 Andreas Schwab <schwab@linux-m68k.org> | 226 | 2011-07-12 Andreas Schwab <schwab@linux-m68k.org> |
| 214 | 227 | ||
| 215 | * character.c (Fcharacterp): Don't advertise optional ignored | 228 | * character.c (Fcharacterp): Don't advertise optional ignored |
| 216 | argument. (Bug#4026) | 229 | argument. (Bug#4026) |
| 217 | 230 | ||
| 218 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | 231 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 219 | 232 | ||
| @@ -427,7 +440,7 @@ | |||
| 427 | (char_table_ascii): Uncompress the compressed values. | 440 | (char_table_ascii): Uncompress the compressed values. |
| 428 | (sub_char_table_ref): New arg is_uniprop. Callers changed. | 441 | (sub_char_table_ref): New arg is_uniprop. Callers changed. |
| 429 | Uncompress the compressed values. | 442 | Uncompress the compressed values. |
| 430 | (sub_char_table_ref_and_range): Likewise. | 443 | (sub_char_table_ref_and_range): Likewise. |
| 431 | (char_table_ref_and_range): Uncompress the compressed values. | 444 | (char_table_ref_and_range): Uncompress the compressed values. |
| 432 | (sub_char_table_set): New arg is_uniprop. Callers changed. | 445 | (sub_char_table_set): New arg is_uniprop. Callers changed. |
| 433 | Uncompress the compressed values. | 446 | Uncompress the compressed values. |
| @@ -2105,7 +2118,7 @@ | |||
| 2105 | (xpm_put_color_table_h): | 2118 | (xpm_put_color_table_h): |
| 2106 | * lisp.h (struct Lisp_Hash_Table): | 2119 | * lisp.h (struct Lisp_Hash_Table): |
| 2107 | * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion): | 2120 | * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion): |
| 2108 | * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT' | 2121 | * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT' |
| 2109 | for hashes and hash indexes, instead of 'unsigned' and 'int'. | 2122 | for hashes and hash indexes, instead of 'unsigned' and 'int'. |
| 2110 | * alloc.c (allocate_vectorlike): | 2123 | * alloc.c (allocate_vectorlike): |
| 2111 | Check for overflow in vector size calculations. | 2124 | Check for overflow in vector size calculations. |
| @@ -2402,7 +2415,7 @@ | |||
| 2402 | 2415 | ||
| 2403 | * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row | 2416 | * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row |
| 2404 | for fringe update if it has periodic bitmap. | 2417 | for fringe update if it has periodic bitmap. |
| 2405 | (row_equal_p): Also compare left_fringe_offset, right_fringe_offset, | 2418 | (row_equal_p): Also compare left_fringe_offset, right_fringe_offset, |
| 2406 | and fringe_bitmap_periodic_p. | 2419 | and fringe_bitmap_periodic_p. |
| 2407 | 2420 | ||
| 2408 | * fringe.c (get_fringe_bitmap_data): New function. | 2421 | * fringe.c (get_fringe_bitmap_data): New function. |
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6 index d7903568102..f9372aa666a 100644 --- a/src/ChangeLog.6 +++ b/src/ChangeLog.6 | |||
| @@ -4599,7 +4599,7 @@ | |||
| 4599 | 4599 | ||
| 4600 | 1995-08-14 Erik Naggum <erik@naggum.no> | 4600 | 1995-08-14 Erik Naggum <erik@naggum.no> |
| 4601 | 4601 | ||
| 4602 | * emacs.c (standard_args): Add option --eval to evalute an | 4602 | * emacs.c (standard_args): Add option --eval to evaluate an |
| 4603 | expression on the command line and print the result. | 4603 | expression on the command line and print the result. |
| 4604 | 4604 | ||
| 4605 | 1995-08-14 Richard Stallman <rms@mole.gnu.ai.mit.edu> | 4605 | 1995-08-14 Richard Stallman <rms@mole.gnu.ai.mit.edu> |
diff --git a/src/buffer.c b/src/buffer.c index 7a94bc79be0..a40275db8de 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -4500,7 +4500,7 @@ mmap_init (void) | |||
| 4500 | is at END - 1. */ | 4500 | is at END - 1. */ |
| 4501 | 4501 | ||
| 4502 | static struct mmap_region * | 4502 | static struct mmap_region * |
| 4503 | mmap_find (POINTER_TYPE *start, POINTER_TYPE *end); | 4503 | mmap_find (POINTER_TYPE *start, POINTER_TYPE *end) |
| 4504 | { | 4504 | { |
| 4505 | struct mmap_region *r; | 4505 | struct mmap_region *r; |
| 4506 | char *s = (char *) start, *e = (char *) end; | 4506 | char *s = (char *) start, *e = (char *) end; |
diff --git a/src/editfns.c b/src/editfns.c index e3a7d1f7fa1..6aba319d5b2 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -194,8 +194,12 @@ DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, | |||
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, | 196 | DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, |
| 197 | doc: /* Convert arg STRING to a character, the first character of that string. | 197 | doc: /* Return the first character in STRING. |
| 198 | A multibyte character is handled correctly. */) | 198 | A multibyte character is handled correctly. |
| 199 | The value returned is a Unicode codepoint if it is below #x110000 (in | ||
| 200 | hex). Codepoints beyond that are Emacs extensions of Unicode. In | ||
| 201 | particular, eight-bit characters are returned as codepoints in the | ||
| 202 | range #x3FFF80 through #x3FFFFF, inclusive. */) | ||
| 199 | (register Lisp_Object string) | 203 | (register Lisp_Object string) |
| 200 | { | 204 | { |
| 201 | register Lisp_Object val; | 205 | register Lisp_Object val; |
diff --git a/src/gnutls.c b/src/gnutls.c index 76cfa5dcc98..3761951b866 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -143,10 +143,12 @@ static int | |||
| 143 | init_gnutls_functions (Lisp_Object libraries) | 143 | init_gnutls_functions (Lisp_Object libraries) |
| 144 | { | 144 | { |
| 145 | HMODULE library; | 145 | HMODULE library; |
| 146 | Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level); | ||
| 147 | int max_log_level = 1; | ||
| 146 | 148 | ||
| 147 | if (!(library = w32_delayed_load (libraries, Qgnutls_dll))) | 149 | if (!(library = w32_delayed_load (libraries, Qgnutls_dll))) |
| 148 | { | 150 | { |
| 149 | GNUTLS_LOG (1, 1, "GnuTLS library not found"); | 151 | GNUTLS_LOG (1, max_log_level, "GnuTLS library not found"); |
| 150 | return 0; | 152 | return 0; |
| 151 | } | 153 | } |
| 152 | 154 | ||
| @@ -189,7 +191,10 @@ init_gnutls_functions (Lisp_Object libraries) | |||
| 189 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); | 191 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); |
| 190 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); | 192 | LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); |
| 191 | 193 | ||
| 192 | GNUTLS_LOG2 (1, 1, "GnuTLS library loaded:", | 194 | if (NUMBERP (gnutls_log_level)) |
| 195 | max_log_level = XINT (gnutls_log_level); | ||
| 196 | |||
| 197 | GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", | ||
| 193 | SDATA (Fget (Qgnutls_dll, QCloaded_from))); | 198 | SDATA (Fget (Qgnutls_dll, QCloaded_from))); |
| 194 | return 1; | 199 | return 1; |
| 195 | } | 200 | } |