aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-20 17:59:02 -0700
committerPaul Eggert2011-06-20 17:59:02 -0700
commit51cab52b054aaf178743aa7775ae29e934eeba9c (patch)
tree0160ac7e20237f3a337fc35c9ba368762ef9203c /src
parent171e2a582e4c7d6bfd6d6ff0373720b59568bcb2 (diff)
parentca5307394f6861fc825434c268e0a44adf8a3252 (diff)
downloademacs-51cab52b054aaf178743aa7775ae29e934eeba9c.tar.gz
emacs-51cab52b054aaf178743aa7775ae29e934eeba9c.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog42
-rw-r--r--src/dispnew.c4
-rw-r--r--src/fns.c2
-rw-r--r--src/process.c3
-rw-r--r--src/xdisp.c23
-rw-r--r--src/xfaces.c27
-rw-r--r--src/xfns.c18
7 files changed, 54 insertions, 65 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 21daa1c8e3b..210f4f6bd60 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12011-06-20 Paul Eggert <eggert@cs.ucla.edu> 12011-06-21 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * termcap.c: Don't assume sizes fit in int and never overflow. 3 * termcap.c: Don't assume sizes fit in int and never overflow.
4 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes. 4 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
@@ -20,7 +20,7 @@
20 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int. 20 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
21 21
22 * filelock.c: Fix some buffer overrun and integer overflow issues. 22 * filelock.c: Fix some buffer overrun and integer overflow issues.
23 (get_boot_time): Don't assume that gzip command string fits in 100 bytes. 23 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
24 Reformulate so as not to need the command string. 24 Reformulate so as not to need the command string.
25 Invoke gzip -cd rather than gunzip, as it's more portable. 25 Invoke gzip -cd rather than gunzip, as it's more portable.
26 (lock_info_type, lock_file_1, lock_file): 26 (lock_info_type, lock_file_1, lock_file):
@@ -32,8 +32,6 @@
32 Check for time_t and/or pid_t out of range, e.g., via a network share. 32 Check for time_t and/or pid_t out of range, e.g., via a network share.
33 Don't alloca where an auto var works fine. 33 Don't alloca where an auto var works fine.
34 34
352011-06-19 Paul Eggert <eggert@cs.ucla.edu>
36
37 * fileio.c: Fix some integer overflow issues. 35 * fileio.c: Fix some integer overflow issues.
38 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name): 36 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
39 Don't assume string length fits in int. 37 Don't assume string length fits in int.
@@ -65,7 +63,7 @@
65 All uses changed. This doesn't fix a bug, but it simplifies the 63 All uses changed. This doesn't fix a bug, but it simplifies the
66 code away from its former Hollerith-constant appearance, and it's 64 code away from its former Hollerith-constant appearance, and it's
67 one less 'int' to worry about when looking at integer-overflow issues. 65 one less 'int' to worry about when looking at integer-overflow issues.
68 (string_to_number): Simplify the 2011-04-26 change by invoking xsignal1. 66 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
69 67
70 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr). 68 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
71 This didn't break anything, but it didn't help either. 69 This didn't break anything, but it didn't help either.
@@ -74,8 +72,6 @@
74 (LIST_END_P): Remove unused macro and its bogus comment. 72 (LIST_END_P): Remove unused macro and its bogus comment.
75 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT. 73 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
76 74
772011-06-18 Paul Eggert <eggert@cs.ucla.edu>
78
79 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT. 75 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
80 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE, 76 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
81 implementation. 77 implementation.
@@ -91,7 +87,7 @@
91 (compute_motion): Use it. This is just for clarity. 87 (compute_motion): Use it. This is just for clarity.
92 (Fcompute_motion): Don't assume hscroll and tab offset fit in int. 88 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
93 89
94 * image.c (xbm_image_p): Don't assume stated width and height fit in int. 90 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
95 91
96 * lisp.h (lint_assume): New macro. 92 * lisp.h (lint_assume): New macro.
97 * composite.c (composition_gstring_put_cache): 93 * composite.c (composition_gstring_put_cache):
@@ -115,11 +111,8 @@
115 * fns.c (concat): Catch string overflow earlier. 111 * fns.c (concat): Catch string overflow earlier.
116 Do not rely on integer wraparound. 112 Do not rely on integer wraparound.
117 113
118 * dispextern.h (struct it.overlay_strings_charpos): EMACS_INT, not int. 114 * dispextern.h (struct it.overlay_strings_charpos)
119 115 (struct it.selective): Now EMACS_INT, not int.
1202011-06-17 Paul Eggert <eggert@cs.ucla.edu>
121
122 * dispextern.h (struct it.selective): Now EMACS_INT, not int.
123 * xdisp.c (forward_to_next_line_start) 116 * xdisp.c (forward_to_next_line_start)
124 (back_to_previous_visible_line_start) 117 (back_to_previous_visible_line_start)
125 (reseat_at_next_visible_line_start, next_element_from_buffer): 118 (reseat_at_next_visible_line_start, next_element_from_buffer):
@@ -145,6 +138,29 @@
145 (record_overlay_string): Check for size-calculation overflow. 138 (record_overlay_string): Check for size-calculation overflow.
146 (init_buffer_once): Check at compile-time, not run-time. 139 (init_buffer_once): Check at compile-time, not run-time.
147 140
1412011-06-20 Deniz Dogan <deniz@dogan.se>
142
143 * process.c (Fset_process_buffer): Clarify return value in
144 docstring.
145
1462011-06-18 Chong Yidong <cyd@stupidchicken.com>
147
148 * dispnew.c (add_window_display_history): Use BVAR.
149
150 * xdisp.c (debug_method_add): Use BVAR.
151 (check_window_end, dump_glyph_matrix, dump_glyph)
152 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
153
154 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
155 Likewise.
156
157 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
158 check till after the cache is created in init_frame_faces.
159
1602011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
161
162 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
163
1482011-06-16 Paul Eggert <eggert@cs.ucla.edu> 1642011-06-16 Paul Eggert <eggert@cs.ucla.edu>
149 165
150 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX. 166 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
diff --git a/src/dispnew.c b/src/dispnew.c
index 2dffc0dce25..dbf052dd099 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -310,8 +310,8 @@ add_window_display_history (struct window *w, const char *msg, int paused_p)
310 history_tick++, 310 history_tick++,
311 w, 311 w,
312 ((BUFFERP (w->buffer) 312 ((BUFFERP (w->buffer)
313 && STRINGP (XBUFFER (w->buffer)->name)) 313 && STRINGP (BVAR (XBUFFER (w->buffer), name)))
314 ? SSDATA (XBUFFER (w->buffer)->name) 314 ? SSDATA (BVAR (XBUFFER (w->buffer), name))
315 : "???"), 315 : "???"),
316 paused_p ? " ***paused***" : ""); 316 paused_p ? " ***paused***" : "");
317 strcat (buf, msg); 317 strcat (buf, msg);
diff --git a/src/fns.c b/src/fns.c
index 6c9e05655f6..da86d91b2b5 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -170,7 +170,7 @@ which is at least the number of distinct elements. */)
170 uintmax_t lolen = 1; 170 uintmax_t lolen = 1;
171 171
172 if (! CONSP (list)) 172 if (! CONSP (list))
173 return 0; 173 return make_number (0);
174 174
175 /* halftail is used to detect circular lists. */ 175 /* halftail is used to detect circular lists. */
176 for (tail = halftail = list; ; ) 176 for (tail = halftail = list; ; )
diff --git a/src/process.c b/src/process.c
index 4151c8aeae6..0040d14a0f6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -892,7 +892,8 @@ not the name of the pty that Emacs uses to talk with that terminal. */)
892 892
893DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer, 893DEFUN ("set-process-buffer", Fset_process_buffer, Sset_process_buffer,
894 2, 2, 0, 894 2, 2, 0,
895 doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil). */) 895 doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil).
896Return BUFFER. */)
896 (register Lisp_Object process, Lisp_Object buffer) 897 (register Lisp_Object process, Lisp_Object buffer)
897{ 898{
898 struct Lisp_Process *p; 899 struct Lisp_Process *p;
diff --git a/src/xdisp.c b/src/xdisp.c
index c71acf88719..e985ef9ae4e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2248,8 +2248,7 @@ check_it (it)
2248 to be---the last row in the current matrix displaying text. */ 2248 to be---the last row in the current matrix displaying text. */
2249 2249
2250static void 2250static void
2251check_window_end (w) 2251check_window_end (struct window *w)
2252 struct window *w;
2253{ 2252{
2254 if (!MINI_WINDOW_P (w) 2253 if (!MINI_WINDOW_P (w)
2255 && !NILP (w->window_end_valid)) 2254 && !NILP (w->window_end_valid))
@@ -11148,8 +11147,8 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
11148 fprintf (stderr, "%p (%s): %s\n", 11147 fprintf (stderr, "%p (%s): %s\n",
11149 w, 11148 w,
11150 ((BUFFERP (w->buffer) 11149 ((BUFFERP (w->buffer)
11151 && STRINGP (XBUFFER (w->buffer)->name)) 11150 && STRINGP (BVAR (XBUFFER (w->buffer), name)))
11152 ? SSDATA (XBUFFER (w->buffer)->name) 11151 ? SSDATA (BVAR (XBUFFER (w->buffer), name))
11153 : "no buffer"), 11152 : "no buffer"),
11154 buffer); 11153 buffer);
11155} 11154}
@@ -16278,9 +16277,7 @@ void dump_glyph (struct glyph_row *, struct glyph *, int);
16278 GLYPHS > 1 means show glyphs in long form. */ 16277 GLYPHS > 1 means show glyphs in long form. */
16279 16278
16280void 16279void
16281dump_glyph_matrix (matrix, glyphs) 16280dump_glyph_matrix (struct glyph_matrix *matrix, int glyphs)
16282 struct glyph_matrix *matrix;
16283 int glyphs;
16284{ 16281{
16285 int i; 16282 int i;
16286 for (i = 0; i < matrix->nrows; ++i) 16283 for (i = 0; i < matrix->nrows; ++i)
@@ -16292,10 +16289,7 @@ dump_glyph_matrix (matrix, glyphs)
16292 the glyph row and area where the glyph comes from. */ 16289 the glyph row and area where the glyph comes from. */
16293 16290
16294void 16291void
16295dump_glyph (row, glyph, area) 16292dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16296 struct glyph_row *row;
16297 struct glyph *glyph;
16298 int area;
16299{ 16293{
16300 if (glyph->type == CHAR_GLYPH) 16294 if (glyph->type == CHAR_GLYPH)
16301 { 16295 {
@@ -16388,9 +16382,7 @@ dump_glyph (row, glyph, area)
16388 GLYPHS > 1 means show glyphs in long form. */ 16382 GLYPHS > 1 means show glyphs in long form. */
16389 16383
16390void 16384void
16391dump_glyph_row (row, vpos, glyphs) 16385dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
16392 struct glyph_row *row;
16393 int vpos, glyphs;
16394{ 16386{
16395 if (glyphs != 1) 16387 if (glyphs != 1)
16396 { 16388 {
@@ -20471,8 +20463,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
20471#if GLYPH_DEBUG 20463#if GLYPH_DEBUG
20472 20464
20473void 20465void
20474dump_glyph_string (s) 20466dump_glyph_string (struct glyph_string *s)
20475 struct glyph_string *s;
20476{ 20467{
20477 fprintf (stderr, "glyph string\n"); 20468 fprintf (stderr, "glyph string\n");
20478 fprintf (stderr, " x, y, w, h = %d, %d, %d, %d\n", 20469 fprintf (stderr, " x, y, w, h = %d, %d, %d, %d\n",
diff --git a/src/xfaces.c b/src/xfaces.c
index a56e54c90cd..78ea913526e 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1858,8 +1858,7 @@ the WIDTH times as wide as FACE on FRAME. */)
1858/* Check consistency of Lisp face attribute vector ATTRS. */ 1858/* Check consistency of Lisp face attribute vector ATTRS. */
1859 1859
1860static void 1860static void
1861check_lface_attrs (attrs) 1861check_lface_attrs (Lisp_Object *attrs)
1862 Lisp_Object *attrs;
1863{ 1862{
1864 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) 1863 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
1865 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) 1864 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
@@ -1930,8 +1929,7 @@ check_lface_attrs (attrs)
1930/* Check consistency of attributes of Lisp face LFACE (a Lisp vector). */ 1929/* Check consistency of attributes of Lisp face LFACE (a Lisp vector). */
1931 1930
1932static void 1931static void
1933check_lface (lface) 1932check_lface (Lisp_Object lface)
1934 Lisp_Object lface;
1935{ 1933{
1936 if (!NILP (lface)) 1934 if (!NILP (lface))
1937 { 1935 {
@@ -2008,24 +2006,6 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point,
2008} 2006}
2009 2007
2010 2008
2011
2012#if 0 /* Seems to be unused. */
2013static Lisp_Object
2014internal_resolve_face_name (nargs, args)
2015 int nargs;
2016 Lisp_Object *args;
2017{
2018 return Fget (args[0], args[1]);
2019}
2020
2021static Lisp_Object
2022resolve_face_name_error (ignore)
2023 Lisp_Object ignore;
2024{
2025 return Qnil;
2026}
2027#endif
2028
2029/* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it 2009/* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it
2030 to make it a symbol. If FACE_NAME is an alias for another face, 2010 to make it a symbol. If FACE_NAME is an alias for another face,
2031 return that face's name. 2011 return that face's name.
@@ -6331,8 +6311,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */)
6331/* Print the contents of the realized face FACE to stderr. */ 6311/* Print the contents of the realized face FACE to stderr. */
6332 6312
6333static void 6313static void
6334dump_realized_face (face) 6314dump_realized_face (struct face *face)
6335 struct face *face;
6336{ 6315{
6337 fprintf (stderr, "ID: %d\n", face->id); 6316 fprintf (stderr, "ID: %d\n", face->id);
6338#ifdef HAVE_X_WINDOWS 6317#ifdef HAVE_X_WINDOWS
diff --git a/src/xfns.c b/src/xfns.c
index abc273c2bdf..20bfa1df3f0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3156,10 +3156,6 @@ This function is an internal primitive--use `make-frame' instead. */)
3156 3156
3157 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */ 3157 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
3158 record_unwind_protect (unwind_create_frame, frame); 3158 record_unwind_protect (unwind_create_frame, frame);
3159#if GLYPH_DEBUG
3160 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
3161 dpyinfo_refcount = dpyinfo->reference_count;
3162#endif /* GLYPH_DEBUG */
3163 3159
3164 /* These colors will be set anyway later, but it's important 3160 /* These colors will be set anyway later, but it's important
3165 to get the color reference counts right, so initialize them! */ 3161 to get the color reference counts right, so initialize them! */
@@ -3314,6 +3310,11 @@ This function is an internal primitive--use `make-frame' instead. */)
3314 happen. */ 3310 happen. */
3315 init_frame_faces (f); 3311 init_frame_faces (f);
3316 3312
3313#if GLYPH_DEBUG
3314 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
3315 dpyinfo_refcount = dpyinfo->reference_count;
3316#endif /* GLYPH_DEBUG */
3317
3317 /* The X resources controlling the menu-bar and tool-bar are 3318 /* The X resources controlling the menu-bar and tool-bar are
3318 processed specially at startup, and reflected in the mode 3319 processed specially at startup, and reflected in the mode
3319 variables; ignore them here. */ 3320 variables; ignore them here. */
@@ -4606,10 +4607,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4606#endif /* USE_TOOLKIT_SCROLL_BARS */ 4607#endif /* USE_TOOLKIT_SCROLL_BARS */
4607 f->icon_name = Qnil; 4608 f->icon_name = Qnil;
4608 FRAME_X_DISPLAY_INFO (f) = dpyinfo; 4609 FRAME_X_DISPLAY_INFO (f) = dpyinfo;
4609#if GLYPH_DEBUG
4610 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
4611 dpyinfo_refcount = dpyinfo->reference_count;
4612#endif /* GLYPH_DEBUG */
4613 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; 4610 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
4614 f->output_data.x->explicit_parent = 0; 4611 f->output_data.x->explicit_parent = 0;
4615 4612
@@ -4721,6 +4718,11 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4721 happen. */ 4718 happen. */
4722 init_frame_faces (f); 4719 init_frame_faces (f);
4723 4720
4721#if GLYPH_DEBUG
4722 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
4723 dpyinfo_refcount = dpyinfo->reference_count;
4724#endif /* GLYPH_DEBUG */
4725
4724 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; 4726 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
4725 4727
4726 x_figure_window_size (f, parms, 0); 4728 x_figure_window_size (f, parms, 0);