summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-13 23:41:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-13 23:41:47 -0700
commitcf950e6bbdeec3f6aab3e119f26f9cd5d962ac2e (patch)
tree1bdb0fd052770b8c3b0c6ea83fb7c6a9bfdd5b85 /src
parentca4aa9359160557f8103639fc3c0ccb16c6ba8d2 (diff)
parent27fa387ad10e6a5639de1ab08e7559c06e9d802d (diff)
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog31
-rw-r--r--src/ChangeLog.62
-rw-r--r--src/buffer.c2
-rw-r--r--src/editfns.c8
-rw-r--r--src/gnutls.c9
5 files changed, 37 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e07b906b56..2b6fc837b6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
+ Integer signedness and overflow and related fixes.
+
* image.c: Improve checking for integer overflow.
(check_image_size): Assume that f is nonnull, since
it is always nonnull in practice. This is one less thing to
@@ -19,8 +21,6 @@
x_create_x_image_and_pixmap failed, not as malloc failures.
(gs_load): Use x_check_image_size.
-2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
-
* gtkutil.c: Omit integer casts.
(xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
(xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
@@ -115,7 +115,7 @@
* bidi.c: Integer signedness and overflow fixes.
(bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state)
(bidi_cache_search, bidi_cache_find_level_change)
- (bidi_cache_iterator_state, bidi_cache_find)
+p (bidi_cache_iterator_state, bidi_cache_find)
(bidi_find_other_level_edge, bidi_dump_cached_states):
Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead.
(bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer
@@ -185,10 +185,23 @@
* gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
(__malloc_safe_bcopy): Remove; no longer needed.
- * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
+ * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
well either way, and we prefer signed to unsigned.
+2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * editfns.c (Fstring_to_char): Clarify just what is returned
+ (bug#6576). Text by Eli Zaretskii.
+
+2011-07-13 Juanma Barranquero <lekktu@gmail.com>
+
+ * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
+
+2011-07-13 Eli Zaretskii <eliz@gnu.org>
+
+ * buffer.c (mmap_find): Fix a typo.
+
2011-07-13 Johan Bockgård <bojohan@gnu.org>
Fix execution of x selection hooks.
@@ -203,7 +216,7 @@
2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
- * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
+ * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
The old code sometimes used this field without initializing it.
* alloc.c (gc_sweep): Don't read past end of array.
@@ -213,7 +226,7 @@
2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
* character.c (Fcharacterp): Don't advertise optional ignored
- argument. (Bug#4026)
+ argument. (Bug#4026)
2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -427,7 +440,7 @@
(char_table_ascii): Uncompress the compressed values.
(sub_char_table_ref): New arg is_uniprop. Callers changed.
Uncompress the compressed values.
- (sub_char_table_ref_and_range): Likewise.
+ (sub_char_table_ref_and_range): Likewise.
(char_table_ref_and_range): Uncompress the compressed values.
(sub_char_table_set): New arg is_uniprop. Callers changed.
Uncompress the compressed values.
@@ -2105,7 +2118,7 @@
(xpm_put_color_table_h):
* lisp.h (struct Lisp_Hash_Table):
* minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
- * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
+ * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
for hashes and hash indexes, instead of 'unsigned' and 'int'.
* alloc.c (allocate_vectorlike):
Check for overflow in vector size calculations.
@@ -2402,7 +2415,7 @@
* dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
for fringe update if it has periodic bitmap.
- (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
+ (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
and fringe_bitmap_periodic_p.
* fringe.c (get_fringe_bitmap_data): New function.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index d790356810..f9372aa666 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -4599,7 +4599,7 @@
1995-08-14 Erik Naggum <erik@naggum.no>
- * emacs.c (standard_args): Add option --eval to evalute an
+ * emacs.c (standard_args): Add option --eval to evaluate an
expression on the command line and print the result.
1995-08-14 Richard Stallman <rms@mole.gnu.ai.mit.edu>
diff --git a/src/buffer.c b/src/buffer.c
index 7a94bc79be..a40275db8d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4500,7 +4500,7 @@ mmap_init (void)
is at END - 1. */
static struct mmap_region *
-mmap_find (POINTER_TYPE *start, POINTER_TYPE *end);
+mmap_find (POINTER_TYPE *start, POINTER_TYPE *end)
{
struct mmap_region *r;
char *s = (char *) start, *e = (char *) end;
diff --git a/src/editfns.c b/src/editfns.c
index e3a7d1f7fa..6aba319d5b 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,
}
DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0,
- doc: /* Convert arg STRING to a character, the first character of that string.
-A multibyte character is handled correctly. */)
+ doc: /* Return the first character in STRING.
+A multibyte character is handled correctly.
+The value returned is a Unicode codepoint if it is below #x110000 (in
+hex). Codepoints beyond that are Emacs extensions of Unicode. In
+particular, eight-bit characters are returned as codepoints in the
+range #x3FFF80 through #x3FFFFF, inclusive. */)
(register Lisp_Object string)
{
register Lisp_Object val;
diff --git a/src/gnutls.c b/src/gnutls.c
index 76cfa5dcc9..3761951b86 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -143,10 +143,12 @@ static int
init_gnutls_functions (Lisp_Object libraries)
{
HMODULE library;
+ Lisp_Object gnutls_log_level = Fsymbol_value (Qgnutls_log_level);
+ int max_log_level = 1;
if (!(library = w32_delayed_load (libraries, Qgnutls_dll)))
{
- GNUTLS_LOG (1, 1, "GnuTLS library not found");
+ GNUTLS_LOG (1, max_log_level, "GnuTLS library not found");
return 0;
}
@@ -189,7 +191,10 @@ init_gnutls_functions (Lisp_Object libraries)
LOAD_GNUTLS_FN (library, gnutls_x509_crt_import);
LOAD_GNUTLS_FN (library, gnutls_x509_crt_init);
- GNUTLS_LOG2 (1, 1, "GnuTLS library loaded:",
+ if (NUMBERP (gnutls_log_level))
+ max_log_level = XINT (gnutls_log_level);
+
+ GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
SDATA (Fget (Qgnutls_dll, QCloaded_from)));
return 1;
}