aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-05 12:36:06 +0200
committerJuanma Barranquero2010-07-05 12:36:06 +0200
commitd3da34e0dab1404e80dba5413b3c449a6ea8fa0c (patch)
treec24d736f75b63d4abb1b8ddd49b088632ccd8aee /src
parent00be444c737e95c7455aa1808d9da75d4affd51f (diff)
downloademacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.tar.gz
emacs-d3da34e0dab1404e80dba5413b3c449a6ea8fa0c.zip
Convert most remaining function definitions to standard C.
* buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c, * xdisp.c: Convert function definitions to standard C. * cm.c (cmputc): Arg C is now int, not char. * process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/buffer.c178
-rw-r--r--src/cm.c10
-rw-r--r--src/eval.c160
-rw-r--r--src/image.c495
-rw-r--r--src/keyboard.c427
-rw-r--r--src/process.c156
-rw-r--r--src/term.c65
-rw-r--r--src/vm-limit.c10
-rw-r--r--src/xdisp.c1128
10 files changed, 811 insertions, 1827 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 643708d85c0..5c8db880e6a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12010-07-05 Dan Nicolaescu <dann@ics.uci.edu>
2 Juanma Barranquero <lekktu@gmail.com>
3
4 * buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
5 * xdisp.c: Convert function definitions to standard C.
6
7 * cm.c (cmputc): Arg C is now int, not char.
8 * process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
9
12010-07-05 James Cloos <cloos@jhcloos.com> 102010-07-05 James Cloos <cloos@jhcloos.com>
2 11
3 * xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New. 12 * xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New.
diff --git a/src/buffer.c b/src/buffer.c
index 0dfad93b3e7..57e4986a0bb 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -180,8 +180,7 @@ extern char * emacs_strerror (int);
180/* Lisp_Object Qlisp_mode, Vcheck_symbol; */ 180/* Lisp_Object Qlisp_mode, Vcheck_symbol; */
181 181
182void 182void
183nsberror (spec) 183nsberror (Lisp_Object spec)
184 Lisp_Object spec;
185{ 184{
186 if (STRINGP (spec)) 185 if (STRINGP (spec))
187 error ("No buffer named %s", SDATA (spec)); 186 error ("No buffer named %s", SDATA (spec));
@@ -248,9 +247,7 @@ frame parameter come first, followed by the rest of the buffers. */)
248 and don't ever QUIT. */ 247 and don't ever QUIT. */
249 248
250static Lisp_Object 249static Lisp_Object
251assoc_ignore_text_properties (key, list) 250assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list)
252 register Lisp_Object key;
253 Lisp_Object list;
254{ 251{
255 register Lisp_Object tail; 252 register Lisp_Object tail;
256 for (tail = list; CONSP (tail); tail = XCDR (tail)) 253 for (tail = list; CONSP (tail); tail = XCDR (tail))
@@ -312,8 +309,7 @@ See also `find-buffer-visiting'. */)
312} 309}
313 310
314Lisp_Object 311Lisp_Object
315get_truename_buffer (filename) 312get_truename_buffer (register Lisp_Object filename)
316 register Lisp_Object filename;
317{ 313{
318 register Lisp_Object tail, buf, tem; 314 register Lisp_Object tail, buf, tem;
319 315
@@ -437,9 +433,7 @@ even if it is dead. The return value is never nil. */)
437 LIST, but for buffer B. */ 433 LIST, but for buffer B. */
438 434
439static struct Lisp_Overlay * 435static struct Lisp_Overlay *
440copy_overlays (b, list) 436copy_overlays (struct buffer *b, struct Lisp_Overlay *list)
441 struct buffer *b;
442 struct Lisp_Overlay *list;
443{ 437{
444 Lisp_Object buffer; 438 Lisp_Object buffer;
445 struct Lisp_Overlay *result = NULL, *tail = NULL; 439 struct Lisp_Overlay *result = NULL, *tail = NULL;
@@ -489,8 +483,7 @@ copy_overlays (b, list)
489 copied. */ 483 copied. */
490 484
491static void 485static void
492clone_per_buffer_values (from, to) 486clone_per_buffer_values (struct buffer *from, struct buffer *to)
493 struct buffer *from, *to;
494{ 487{
495 Lisp_Object to_buffer; 488 Lisp_Object to_buffer;
496 int offset; 489 int offset;
@@ -658,8 +651,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
658} 651}
659 652
660void 653void
661delete_all_overlays (b) 654delete_all_overlays (struct buffer *b)
662 struct buffer *b;
663{ 655{
664 Lisp_Object overlay; 656 Lisp_Object overlay;
665 657
@@ -689,8 +681,7 @@ delete_all_overlays (b)
689 claims it doesn't belong to it. */ 681 claims it doesn't belong to it. */
690 682
691void 683void
692reset_buffer (b) 684reset_buffer (register struct buffer *b)
693 register struct buffer *b;
694{ 685{
695 b->filename = Qnil; 686 b->filename = Qnil;
696 b->file_truename = Qnil; 687 b->file_truename = Qnil;
@@ -734,9 +725,7 @@ reset_buffer (b)
734 we preserve those. */ 725 we preserve those. */
735 726
736static void 727static void
737reset_buffer_local_variables (b, permanent_too) 728reset_buffer_local_variables (register struct buffer *b, int permanent_too)
738 register struct buffer *b;
739 int permanent_too;
740{ 729{
741 register int offset; 730 register int offset;
742 int i; 731 int i;
@@ -993,8 +982,7 @@ is the default binding of the variable. */)
993 in special slots in the buffer object. */ 982 in special slots in the buffer object. */
994 983
995static Lisp_Object 984static Lisp_Object
996buffer_lisp_local_variables (buf) 985buffer_lisp_local_variables (struct buffer *buf)
997 struct buffer *buf;
998{ 986{
999 Lisp_Object result = Qnil; 987 Lisp_Object result = Qnil;
1000 register Lisp_Object tail; 988 register Lisp_Object tail;
@@ -1293,7 +1281,7 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */)
1293 (buffer, visible_ok, frame) 1281 (buffer, visible_ok, frame)
1294 register Lisp_Object buffer, visible_ok, frame; 1282 register Lisp_Object buffer, visible_ok, frame;
1295{ 1283{
1296 Lisp_Object Fset_buffer_major_mode (); 1284 Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer);
1297 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons; 1285 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons;
1298 notsogood = Qnil; 1286 notsogood = Qnil;
1299 1287
@@ -1618,8 +1606,7 @@ with SIGHUP. */)
1618 means that other_buffer is more likely to choose a relevant buffer. */ 1606 means that other_buffer is more likely to choose a relevant buffer. */
1619 1607
1620void 1608void
1621record_buffer (buf) 1609record_buffer (Lisp_Object buf)
1622 Lisp_Object buf;
1623{ 1610{
1624 register Lisp_Object link, prev; 1611 register Lisp_Object link, prev;
1625 Lisp_Object frame; 1612 Lisp_Object frame;
@@ -1734,8 +1721,7 @@ the current buffer's major mode. */)
1734 If NORECORD is non-nil, don't call record_buffer. */ 1721 If NORECORD is non-nil, don't call record_buffer. */
1735 1722
1736Lisp_Object 1723Lisp_Object
1737switch_to_buffer_1 (buffer_or_name, norecord) 1724switch_to_buffer_1 (Lisp_Object buffer_or_name, Lisp_Object norecord)
1738 Lisp_Object buffer_or_name, norecord;
1739{ 1725{
1740 register Lisp_Object buffer; 1726 register Lisp_Object buffer;
1741 1727
@@ -1831,8 +1817,7 @@ DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0,
1831 time, and that increments windows_or_buffers_changed. */ 1817 time, and that increments windows_or_buffers_changed. */
1832 1818
1833void 1819void
1834set_buffer_internal (b) 1820set_buffer_internal (register struct buffer *b)
1835 register struct buffer *b;
1836{ 1821{
1837 if (current_buffer != b) 1822 if (current_buffer != b)
1838 set_buffer_internal_1 (b); 1823 set_buffer_internal_1 (b);
@@ -1842,8 +1827,7 @@ set_buffer_internal (b)
1842 This is used by redisplay. */ 1827 This is used by redisplay. */
1843 1828
1844void 1829void
1845set_buffer_internal_1 (b) 1830set_buffer_internal_1 (register struct buffer *b)
1846 register struct buffer *b;
1847{ 1831{
1848 register struct buffer *old_buf; 1832 register struct buffer *old_buf;
1849 register Lisp_Object tail; 1833 register Lisp_Object tail;
@@ -1939,8 +1923,7 @@ set_buffer_internal_1 (b)
1939 This avoids certain things that don't need to be done within redisplay. */ 1923 This avoids certain things that don't need to be done within redisplay. */
1940 1924
1941void 1925void
1942set_buffer_temp (b) 1926set_buffer_temp (struct buffer *b)
1943 struct buffer *b;
1944{ 1927{
1945 register struct buffer *old_buf; 1928 register struct buffer *old_buf;
1946 1929
@@ -2019,8 +2002,7 @@ ends when the current command terminates. Use `switch-to-buffer' or
2019/* Set the current buffer to BUFFER provided it is alive. */ 2002/* Set the current buffer to BUFFER provided it is alive. */
2020 2003
2021Lisp_Object 2004Lisp_Object
2022set_buffer_if_live (buffer) 2005set_buffer_if_live (Lisp_Object buffer)
2023 Lisp_Object buffer;
2024{ 2006{
2025 if (! NILP (XBUFFER (buffer)->name)) 2007 if (! NILP (XBUFFER (buffer)->name))
2026 Fset_buffer (buffer); 2008 Fset_buffer (buffer);
@@ -2120,8 +2102,7 @@ so the buffer is truly empty after this. */)
2120} 2102}
2121 2103
2122void 2104void
2123validate_region (b, e) 2105validate_region (register Lisp_Object *b, register Lisp_Object *e)
2124 register Lisp_Object *b, *e;
2125{ 2106{
2126 CHECK_NUMBER_COERCE_MARKER (*b); 2107 CHECK_NUMBER_COERCE_MARKER (*b);
2127 CHECK_NUMBER_COERCE_MARKER (*e); 2108 CHECK_NUMBER_COERCE_MARKER (*e);
@@ -2141,8 +2122,7 @@ validate_region (b, e)
2141 and return the adjusted position. */ 2122 and return the adjusted position. */
2142 2123
2143static int 2124static int
2144advance_to_char_boundary (byte_pos) 2125advance_to_char_boundary (int byte_pos)
2145 int byte_pos;
2146{ 2126{
2147 int c; 2127 int c;
2148 2128
@@ -2644,8 +2624,7 @@ the normal hook `change-major-mode-hook'. */)
2644 for their current values. */ 2624 for their current values. */
2645 2625
2646static void 2626static void
2647swap_out_buffer_local_variables (b) 2627swap_out_buffer_local_variables (struct buffer *b)
2648 struct buffer *b;
2649{ 2628{
2650 Lisp_Object oalist, alist, buffer; 2629 Lisp_Object oalist, alist, buffer;
2651 2630
@@ -2690,14 +2669,8 @@ swap_out_buffer_local_variables (b)
2690 default (BEGV or ZV). */ 2669 default (BEGV or ZV). */
2691 2670
2692int 2671int
2693overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr, change_req) 2672overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr,
2694 EMACS_INT pos; 2673 EMACS_INT *next_ptr, EMACS_INT *prev_ptr, int change_req)
2695 int extend;
2696 Lisp_Object **vec_ptr;
2697 int *len_ptr;
2698 EMACS_INT *next_ptr;
2699 EMACS_INT *prev_ptr;
2700 int change_req;
2701{ 2674{
2702 Lisp_Object overlay, start, end; 2675 Lisp_Object overlay, start, end;
2703 struct Lisp_Overlay *tail; 2676 struct Lisp_Overlay *tail;
@@ -2835,13 +2808,8 @@ overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr, change_req)
2835 But we still return the total number of overlays. */ 2808 But we still return the total number of overlays. */
2836 2809
2837static int 2810static int
2838overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr) 2811overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr,
2839 int beg, end; 2812 int *next_ptr, int *prev_ptr)
2840 int extend;
2841 Lisp_Object **vec_ptr;
2842 int *len_ptr;
2843 int *next_ptr;
2844 int *prev_ptr;
2845{ 2813{
2846 Lisp_Object overlay, ostart, oend; 2814 Lisp_Object overlay, ostart, oend;
2847 struct Lisp_Overlay *tail; 2815 struct Lisp_Overlay *tail;
@@ -2962,8 +2930,7 @@ overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
2962 `mouse-face' property overlapping OVERLAY. */ 2930 `mouse-face' property overlapping OVERLAY. */
2963 2931
2964int 2932int
2965mouse_face_overlay_overlaps (overlay) 2933mouse_face_overlay_overlaps (Lisp_Object overlay)
2966 Lisp_Object overlay;
2967{ 2934{
2968 int start = OVERLAY_POSITION (OVERLAY_START (overlay)); 2935 int start = OVERLAY_POSITION (OVERLAY_START (overlay));
2969 int end = OVERLAY_POSITION (OVERLAY_END (overlay)); 2936 int end = OVERLAY_POSITION (OVERLAY_END (overlay));
@@ -2992,8 +2959,7 @@ mouse_face_overlay_overlaps (overlay)
2992 2959
2993/* Fast function to just test if we're at an overlay boundary. */ 2960/* Fast function to just test if we're at an overlay boundary. */
2994int 2961int
2995overlay_touches_p (pos) 2962overlay_touches_p (int pos)
2996 int pos;
2997{ 2963{
2998 Lisp_Object overlay; 2964 Lisp_Object overlay;
2999 struct Lisp_Overlay *tail; 2965 struct Lisp_Overlay *tail;
@@ -3038,8 +3004,7 @@ struct sortvec
3038}; 3004};
3039 3005
3040static int 3006static int
3041compare_overlays (v1, v2) 3007compare_overlays (const void *v1, const void *v2)
3042 const void *v1, *v2;
3043{ 3008{
3044 const struct sortvec *s1 = (const struct sortvec *) v1; 3009 const struct sortvec *s1 = (const struct sortvec *) v1;
3045 const struct sortvec *s2 = (const struct sortvec *) v2; 3010 const struct sortvec *s2 = (const struct sortvec *) v2;
@@ -3056,10 +3021,7 @@ compare_overlays (v1, v2)
3056 The return value is the new size; this may be smaller than the original 3021 The return value is the new size; this may be smaller than the original
3057 size if some of the overlays were invalid or were window-specific. */ 3022 size if some of the overlays were invalid or were window-specific. */
3058int 3023int
3059sort_overlays (overlay_vec, noverlays, w) 3024sort_overlays (Lisp_Object *overlay_vec, int noverlays, struct window *w)
3060 Lisp_Object *overlay_vec;
3061 int noverlays;
3062 struct window *w;
3063{ 3025{
3064 int i, j; 3026 int i, j;
3065 struct sortvec *sortvec; 3027 struct sortvec *sortvec;
@@ -3139,8 +3101,7 @@ static int overlay_str_len;
3139 3101
3140/* A comparison function suitable for passing to qsort. */ 3102/* A comparison function suitable for passing to qsort. */
3141static int 3103static int
3142cmp_for_strings (as1, as2) 3104cmp_for_strings (const void *as1, const void *as2)
3143 char *as1, *as2;
3144{ 3105{
3145 struct sortstr *s1 = (struct sortstr *)as1; 3106 struct sortstr *s1 = (struct sortstr *)as1;
3146 struct sortstr *s2 = (struct sortstr *)as2; 3107 struct sortstr *s2 = (struct sortstr *)as2;
@@ -3152,10 +3113,7 @@ cmp_for_strings (as1, as2)
3152} 3113}
3153 3114
3154static void 3115static void
3155record_overlay_string (ssl, str, str2, pri, size) 3116record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size)
3156 struct sortstrlist *ssl;
3157 Lisp_Object str, str2, pri;
3158 int size;
3159{ 3117{
3160 int nbytes; 3118 int nbytes;
3161 3119
@@ -3211,10 +3169,7 @@ record_overlay_string (ssl, str, str2, pri, size)
3211 subsequent calls. */ 3169 subsequent calls. */
3212 3170
3213int 3171int
3214overlay_strings (pos, w, pstr) 3172overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3215 EMACS_INT pos;
3216 struct window *w;
3217 unsigned char **pstr;
3218{ 3173{
3219 Lisp_Object overlay, window, str; 3174 Lisp_Object overlay, window, str;
3220 struct Lisp_Overlay *ov; 3175 struct Lisp_Overlay *ov;
@@ -3337,9 +3292,7 @@ overlay_strings (pos, w, pstr)
3337/* Shift overlays in BUF's overlay lists, to center the lists at POS. */ 3292/* Shift overlays in BUF's overlay lists, to center the lists at POS. */
3338 3293
3339void 3294void
3340recenter_overlay_lists (buf, pos) 3295recenter_overlay_lists (struct buffer *buf, EMACS_INT pos)
3341 struct buffer *buf;
3342 EMACS_INT pos;
3343{ 3296{
3344 Lisp_Object overlay, beg, end; 3297 Lisp_Object overlay, beg, end;
3345 struct Lisp_Overlay *prev, *tail, *next; 3298 struct Lisp_Overlay *prev, *tail, *next;
@@ -3488,9 +3441,7 @@ recenter_overlay_lists (buf, pos)
3488} 3441}
3489 3442
3490void 3443void
3491adjust_overlays_for_insert (pos, length) 3444adjust_overlays_for_insert (EMACS_INT pos, EMACS_INT length)
3492 EMACS_INT pos;
3493 EMACS_INT length;
3494{ 3445{
3495 /* After an insertion, the lists are still sorted properly, 3446 /* After an insertion, the lists are still sorted properly,
3496 but we may need to update the value of the overlay center. */ 3447 but we may need to update the value of the overlay center. */
@@ -3499,9 +3450,7 @@ adjust_overlays_for_insert (pos, length)
3499} 3450}
3500 3451
3501void 3452void
3502adjust_overlays_for_delete (pos, length) 3453adjust_overlays_for_delete (EMACS_INT pos, EMACS_INT length)
3503 EMACS_INT pos;
3504 EMACS_INT length;
3505{ 3454{
3506 if (current_buffer->overlay_center < pos) 3455 if (current_buffer->overlay_center < pos)
3507 /* The deletion was to our right. No change needed; the before- and 3456 /* The deletion was to our right. No change needed; the before- and
@@ -3526,8 +3475,7 @@ adjust_overlays_for_delete (pos, length)
3526 Such an overlay might even have negative size at this point. 3475 Such an overlay might even have negative size at this point.
3527 If so, we'll make the overlay empty. */ 3476 If so, we'll make the overlay empty. */
3528void 3477void
3529fix_start_end_in_overlays (start, end) 3478fix_start_end_in_overlays (register int start, register int end)
3530 register int start, end;
3531{ 3479{
3532 Lisp_Object overlay; 3480 Lisp_Object overlay;
3533 struct Lisp_Overlay *before_list, *after_list; 3481 struct Lisp_Overlay *before_list, *after_list;
@@ -3673,9 +3621,7 @@ fix_start_end_in_overlays (start, end)
3673 was at PREV, and now is at POS. */ 3621 was at PREV, and now is at POS. */
3674 3622
3675void 3623void
3676fix_overlays_before (bp, prev, pos) 3624fix_overlays_before (struct buffer *bp, EMACS_INT prev, EMACS_INT pos)
3677 struct buffer *bp;
3678 EMACS_INT prev, pos;
3679{ 3625{
3680 /* If parent is nil, replace overlays_before; otherwise, parent->next. */ 3626 /* If parent is nil, replace overlays_before; otherwise, parent->next. */
3681 struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair; 3627 struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair;
@@ -3841,9 +3787,7 @@ for the rear of the overlay advance when text is inserted there
3841/* Mark a section of BUF as needing redisplay because of overlays changes. */ 3787/* Mark a section of BUF as needing redisplay because of overlays changes. */
3842 3788
3843static void 3789static void
3844modify_overlay (buf, start, end) 3790modify_overlay (struct buffer *buf, EMACS_INT start, EMACS_INT end)
3845 struct buffer *buf;
3846 EMACS_INT start, end;
3847{ 3791{
3848 if (start > end) 3792 if (start > end)
3849 { 3793 {
@@ -3870,11 +3814,10 @@ modify_overlay (buf, start, end)
3870} 3814}
3871 3815
3872 3816
3873Lisp_Object Fdelete_overlay (); 3817Lisp_Object Fdelete_overlay (Lisp_Object overlay);
3874 3818
3875static struct Lisp_Overlay * 3819static struct Lisp_Overlay *
3876unchain_overlay (list, overlay) 3820unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay)
3877 struct Lisp_Overlay *list, *overlay;
3878{ 3821{
3879 struct Lisp_Overlay *tmp, *prev; 3822 struct Lisp_Overlay *tmp, *prev;
3880 for (tmp = list, prev = NULL; tmp; prev = tmp, tmp = tmp->next) 3823 for (tmp = list, prev = NULL; tmp; prev = tmp, tmp = tmp->next)
@@ -4333,8 +4276,7 @@ static int last_overlay_modification_hooks_used;
4333 to the end of last_overlay_modification_hooks. */ 4276 to the end of last_overlay_modification_hooks. */
4334 4277
4335static void 4278static void
4336add_overlay_mod_hooklist (functionlist, overlay) 4279add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay)
4337 Lisp_Object functionlist, overlay;
4338{ 4280{
4339 int oldsize = XVECTOR (last_overlay_modification_hooks)->size; 4281 int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
4340 4282
@@ -4362,10 +4304,8 @@ add_overlay_mod_hooklist (functionlist, overlay)
4362 and the length of deleted or replaced old text. */ 4304 and the length of deleted or replaced old text. */
4363 4305
4364void 4306void
4365report_overlay_modification (start, end, after, arg1, arg2, arg3) 4307report_overlay_modification (Lisp_Object start, Lisp_Object end, int after,
4366 Lisp_Object start, end; 4308 Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
4367 int after;
4368 Lisp_Object arg1, arg2, arg3;
4369{ 4309{
4370 Lisp_Object prop, overlay; 4310 Lisp_Object prop, overlay;
4371 struct Lisp_Overlay *tail; 4311 struct Lisp_Overlay *tail;
@@ -4490,10 +4430,8 @@ report_overlay_modification (start, end, after, arg1, arg2, arg3)
4490} 4430}
4491 4431
4492static void 4432static void
4493call_overlay_mod_hooks (list, overlay, after, arg1, arg2, arg3) 4433call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after,
4494 Lisp_Object list, overlay; 4434 Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
4495 int after;
4496 Lisp_Object arg1, arg2, arg3;
4497{ 4435{
4498 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 4436 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
4499 4437
@@ -4513,8 +4451,7 @@ call_overlay_mod_hooks (list, overlay, after, arg1, arg2, arg3)
4513/* Delete any zero-sized overlays at position POS, if the `evaporate' 4451/* Delete any zero-sized overlays at position POS, if the `evaporate'
4514 property is set. */ 4452 property is set. */
4515void 4453void
4516evaporate_overlays (pos) 4454evaporate_overlays (EMACS_INT pos)
4517 EMACS_INT pos;
4518{ 4455{
4519 Lisp_Object overlay, hit_list; 4456 Lisp_Object overlay, hit_list;
4520 struct Lisp_Overlay *tail; 4457 struct Lisp_Overlay *tail;
@@ -4552,9 +4489,7 @@ evaporate_overlays (pos)
4552 in the slot with offset OFFSET. */ 4489 in the slot with offset OFFSET. */
4553 4490
4554void 4491void
4555buffer_slot_type_mismatch (newval, type) 4492buffer_slot_type_mismatch (Lisp_Object newval, int type)
4556 Lisp_Object newval;
4557 int type;
4558{ 4493{
4559 Lisp_Object predicate; 4494 Lisp_Object predicate;
4560 4495
@@ -5041,9 +4976,7 @@ extern void r_alloc_free (POINTER_TYPE **ptr);
5041/* Allocate NBYTES bytes for buffer B's text buffer. */ 4976/* Allocate NBYTES bytes for buffer B's text buffer. */
5042 4977
5043static void 4978static void
5044alloc_buffer_text (b, nbytes) 4979alloc_buffer_text (struct buffer *b, size_t nbytes)
5045 struct buffer *b;
5046 size_t nbytes;
5047{ 4980{
5048 POINTER_TYPE *p; 4981 POINTER_TYPE *p;
5049 4982
@@ -5098,8 +5031,7 @@ enlarge_buffer_text (struct buffer *b, EMACS_INT delta)
5098/* Free buffer B's text buffer. */ 5031/* Free buffer B's text buffer. */
5099 5032
5100static void 5033static void
5101free_buffer_text (b) 5034free_buffer_text (struct buffer *b)
5102 struct buffer *b;
5103{ 5035{
5104 BLOCK_INPUT; 5036 BLOCK_INPUT;
5105 5037
@@ -5122,7 +5054,7 @@ free_buffer_text (b)
5122 ***********************************************************************/ 5054 ***********************************************************************/
5123 5055
5124void 5056void
5125init_buffer_once () 5057init_buffer_once (void)
5126{ 5058{
5127 int idx; 5059 int idx;
5128 5060
@@ -5318,7 +5250,7 @@ init_buffer_once ()
5318} 5250}
5319 5251
5320void 5252void
5321init_buffer () 5253init_buffer (void)
5322{ 5254{
5323 char *pwd; 5255 char *pwd;
5324 Lisp_Object temp; 5256 Lisp_Object temp;
@@ -5402,12 +5334,8 @@ init_buffer ()
5402 } while (0) 5334 } while (0)
5403 5335
5404static void 5336static void
5405defvar_per_buffer (bo_fwd, namestring, address, type, doc) 5337defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, char *namestring,
5406 struct Lisp_Buffer_Objfwd *bo_fwd; 5338 Lisp_Object *address, Lisp_Object type, char *doc)
5407 char *namestring;
5408 Lisp_Object *address;
5409 Lisp_Object type;
5410 char *doc;
5411{ 5339{
5412 struct Lisp_Symbol *sym; 5340 struct Lisp_Symbol *sym;
5413 int offset; 5341 int offset;
@@ -5435,7 +5363,7 @@ defvar_per_buffer (bo_fwd, namestring, address, type, doc)
5435 5363
5436/* initialize the buffer routines */ 5364/* initialize the buffer routines */
5437void 5365void
5438syms_of_buffer () 5366syms_of_buffer (void)
5439{ 5367{
5440 staticpro (&last_overlay_modification_hooks); 5368 staticpro (&last_overlay_modification_hooks);
5441 last_overlay_modification_hooks 5369 last_overlay_modification_hooks
@@ -6338,7 +6266,7 @@ The function `kill-all-local-variables' runs this before doing anything else. *
6338} 6266}
6339 6267
6340void 6268void
6341keys_of_buffer () 6269keys_of_buffer (void)
6342{ 6270{
6343 initial_define_key (control_x_map, 'b', "switch-to-buffer"); 6271 initial_define_key (control_x_map, 'b', "switch-to-buffer");
6344 initial_define_key (control_x_map, 'k', "kill-buffer"); 6272 initial_define_key (control_x_map, 'k', "kill-buffer");
diff --git a/src/cm.c b/src/cm.c
index d083c8a1be9..c2a68ed7015 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -45,8 +45,7 @@ int cost; /* sums up costs */
45 45
46/* ARGSUSED */ 46/* ARGSUSED */
47int 47int
48evalcost (c) 48evalcost (int c)
49 int c;
50{ 49{
51 cost++; 50 cost++;
52 return c; 51 return c;
@@ -56,8 +55,7 @@ evalcost (c)
56struct tty_display_info *current_tty; 55struct tty_display_info *current_tty;
57 56
58int 57int
59cmputc (c) 58cmputc (int c)
60 char c;
61{ 59{
62 if (current_tty->termscript) 60 if (current_tty->termscript)
63 putc (c & 0177, current_tty->termscript); 61 putc (c & 0177, current_tty->termscript);
@@ -326,9 +324,7 @@ losecursor ()
326#define USECR 3 324#define USECR 3
327 325
328void 326void
329cmgoto (tty, row, col) 327cmgoto (struct tty_display_info *tty, int row, int col)
330 struct tty_display_info *tty;
331 int row, col;
332{ 328{
333 int homecost, 329 int homecost,
334 crcost, 330 crcost,
diff --git a/src/eval.c b/src/eval.c
index 239ee40ab95..84f98c8b22c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -177,12 +177,12 @@ static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
177/* "gcc -O3" enables automatic function inlining, which optimizes out 177/* "gcc -O3" enables automatic function inlining, which optimizes out
178 the arguments for the invocations of these functions, whereas they 178 the arguments for the invocations of these functions, whereas they
179 expect these values on the stack. */ 179 expect these values on the stack. */
180Lisp_Object apply1 () __attribute__((noinline)); 180Lisp_Object apply1 (Lisp_Object fn, Lisp_Object arg) __attribute__((noinline));
181Lisp_Object call2 () __attribute__((noinline)); 181Lisp_Object call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) __attribute__((noinline));
182#endif 182#endif
183 183
184void 184void
185init_eval_once () 185init_eval_once (void)
186{ 186{
187 specpdl_size = 50; 187 specpdl_size = 50;
188 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); 188 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
@@ -195,7 +195,7 @@ init_eval_once ()
195} 195}
196 196
197void 197void
198init_eval () 198init_eval (void)
199{ 199{
200 specpdl_ptr = specpdl; 200 specpdl_ptr = specpdl;
201 catchlist = 0; 201 catchlist = 0;
@@ -214,8 +214,7 @@ init_eval ()
214/* unwind-protect function used by call_debugger. */ 214/* unwind-protect function used by call_debugger. */
215 215
216static Lisp_Object 216static Lisp_Object
217restore_stack_limits (data) 217restore_stack_limits (Lisp_Object data)
218 Lisp_Object data;
219{ 218{
220 max_specpdl_size = XINT (XCAR (data)); 219 max_specpdl_size = XINT (XCAR (data));
221 max_lisp_eval_depth = XINT (XCDR (data)); 220 max_lisp_eval_depth = XINT (XCDR (data));
@@ -225,8 +224,7 @@ restore_stack_limits (data)
225/* Call the Lisp debugger, giving it argument ARG. */ 224/* Call the Lisp debugger, giving it argument ARG. */
226 225
227Lisp_Object 226Lisp_Object
228call_debugger (arg) 227call_debugger (Lisp_Object arg)
229 Lisp_Object arg;
230{ 228{
231 int debug_while_redisplaying; 229 int debug_while_redisplaying;
232 int count = SPECPDL_INDEX (); 230 int count = SPECPDL_INDEX ();
@@ -282,8 +280,7 @@ call_debugger (arg)
282} 280}
283 281
284void 282void
285do_debug_on_call (code) 283do_debug_on_call (Lisp_Object code)
286 Lisp_Object code;
287{ 284{
288 debug_on_next_call = 0; 285 debug_on_next_call = 0;
289 backtrace_list->debug_on_exit = 1; 286 backtrace_list->debug_on_exit = 1;
@@ -609,8 +606,7 @@ way to do this), or via (not (or executing-kbd-macro noninteractive)). */)
609 called is a built-in. */ 606 called is a built-in. */
610 607
611int 608int
612interactive_p (exclude_subrs_p) 609interactive_p (int exclude_subrs_p)
613 int exclude_subrs_p;
614{ 610{
615 struct backtrace *btp; 611 struct backtrace *btp;
616 Lisp_Object fun; 612 Lisp_Object fun;
@@ -932,8 +928,7 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */)
932 928
933/* Error handler used in Fuser_variable_p. */ 929/* Error handler used in Fuser_variable_p. */
934static Lisp_Object 930static Lisp_Object
935user_variable_p_eh (ignore) 931user_variable_p_eh (Lisp_Object ignore)
936 Lisp_Object ignore;
937{ 932{
938 return Qnil; 933 return Qnil;
939} 934}
@@ -1219,10 +1214,7 @@ usage: (catch TAG BODY...) */)
1219 This is how catches are done from within C code. */ 1214 This is how catches are done from within C code. */
1220 1215
1221Lisp_Object 1216Lisp_Object
1222internal_catch (tag, func, arg) 1217internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object arg)
1223 Lisp_Object tag;
1224 Lisp_Object (*func) ();
1225 Lisp_Object arg;
1226{ 1218{
1227 /* This structure is made part of the chain `catchlist'. */ 1219 /* This structure is made part of the chain `catchlist'. */
1228 struct catchtag c; 1220 struct catchtag c;
@@ -1267,9 +1259,7 @@ internal_catch (tag, func, arg)
1267 This is used for correct unwinding in Fthrow and Fsignal. */ 1259 This is used for correct unwinding in Fthrow and Fsignal. */
1268 1260
1269static void 1261static void
1270unwind_to_catch (catch, value) 1262unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1271 struct catchtag *catch;
1272 Lisp_Object value;
1273{ 1263{
1274 register int last_time; 1264 register int last_time;
1275 1265
@@ -1400,9 +1390,8 @@ usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
1400 rather than passed in a list. Used by Fbyte_code. */ 1390 rather than passed in a list. Used by Fbyte_code. */
1401 1391
1402Lisp_Object 1392Lisp_Object
1403internal_lisp_condition_case (var, bodyform, handlers) 1393internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
1404 volatile Lisp_Object var; 1394 Lisp_Object handlers)
1405 Lisp_Object bodyform, handlers;
1406{ 1395{
1407 Lisp_Object val; 1396 Lisp_Object val;
1408 struct catchtag c; 1397 struct catchtag c;
@@ -1469,10 +1458,8 @@ internal_lisp_condition_case (var, bodyform, handlers)
1469 but allow the debugger to run if that is enabled. */ 1458 but allow the debugger to run if that is enabled. */
1470 1459
1471Lisp_Object 1460Lisp_Object
1472internal_condition_case (bfun, handlers, hfun) 1461internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers,
1473 Lisp_Object (*bfun) (); 1462 Lisp_Object (*hfun) (Lisp_Object))
1474 Lisp_Object handlers;
1475 Lisp_Object (*hfun) ();
1476{ 1463{
1477 Lisp_Object val; 1464 Lisp_Object val;
1478 struct catchtag c; 1465 struct catchtag c;
@@ -1516,11 +1503,8 @@ internal_condition_case (bfun, handlers, hfun)
1516/* Like internal_condition_case but call BFUN with ARG as its argument. */ 1503/* Like internal_condition_case but call BFUN with ARG as its argument. */
1517 1504
1518Lisp_Object 1505Lisp_Object
1519internal_condition_case_1 (bfun, arg, handlers, hfun) 1506internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg,
1520 Lisp_Object (*bfun) (); 1507 Lisp_Object handlers, Lisp_Object (*hfun) (Lisp_Object))
1521 Lisp_Object arg;
1522 Lisp_Object handlers;
1523 Lisp_Object (*hfun) ();
1524{ 1508{
1525 Lisp_Object val; 1509 Lisp_Object val;
1526 struct catchtag c; 1510 struct catchtag c;
@@ -1790,8 +1774,7 @@ See also the function `condition-case'. */)
1790 Used for anything but Qquit (which can return from Fsignal). */ 1774 Used for anything but Qquit (which can return from Fsignal). */
1791 1775
1792void 1776void
1793xsignal (error_symbol, data) 1777xsignal (Lisp_Object error_symbol, Lisp_Object data)
1794 Lisp_Object error_symbol, data;
1795{ 1778{
1796 Fsignal (error_symbol, data); 1779 Fsignal (error_symbol, data);
1797 abort (); 1780 abort ();
@@ -1800,29 +1783,25 @@ xsignal (error_symbol, data)
1800/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ 1783/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */
1801 1784
1802void 1785void
1803xsignal0 (error_symbol) 1786xsignal0 (Lisp_Object error_symbol)
1804 Lisp_Object error_symbol;
1805{ 1787{
1806 xsignal (error_symbol, Qnil); 1788 xsignal (error_symbol, Qnil);
1807} 1789}
1808 1790
1809void 1791void
1810xsignal1 (error_symbol, arg) 1792xsignal1 (Lisp_Object error_symbol, Lisp_Object arg)
1811 Lisp_Object error_symbol, arg;
1812{ 1793{
1813 xsignal (error_symbol, list1 (arg)); 1794 xsignal (error_symbol, list1 (arg));
1814} 1795}
1815 1796
1816void 1797void
1817xsignal2 (error_symbol, arg1, arg2) 1798xsignal2 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2)
1818 Lisp_Object error_symbol, arg1, arg2;
1819{ 1799{
1820 xsignal (error_symbol, list2 (arg1, arg2)); 1800 xsignal (error_symbol, list2 (arg1, arg2));
1821} 1801}
1822 1802
1823void 1803void
1824xsignal3 (error_symbol, arg1, arg2, arg3) 1804xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
1825 Lisp_Object error_symbol, arg1, arg2, arg3;
1826{ 1805{
1827 xsignal (error_symbol, list3 (arg1, arg2, arg3)); 1806 xsignal (error_symbol, list3 (arg1, arg2, arg3));
1828} 1807}
@@ -1831,9 +1810,7 @@ xsignal3 (error_symbol, arg1, arg2, arg3)
1831 If ARG is not a genuine list, make it a one-element list. */ 1810 If ARG is not a genuine list, make it a one-element list. */
1832 1811
1833void 1812void
1834signal_error (s, arg) 1813signal_error (char *s, Lisp_Object arg)
1835 char *s;
1836 Lisp_Object arg;
1837{ 1814{
1838 Lisp_Object tortoise, hare; 1815 Lisp_Object tortoise, hare;
1839 1816
@@ -1862,8 +1839,7 @@ signal_error (s, arg)
1862 a list containing one of CONDITIONS. */ 1839 a list containing one of CONDITIONS. */
1863 1840
1864static int 1841static int
1865wants_debugger (list, conditions) 1842wants_debugger (Lisp_Object list, Lisp_Object conditions)
1866 Lisp_Object list, conditions;
1867{ 1843{
1868 if (NILP (list)) 1844 if (NILP (list))
1869 return 0; 1845 return 0;
@@ -1887,8 +1863,7 @@ wants_debugger (list, conditions)
1887 according to debugger-ignored-errors. */ 1863 according to debugger-ignored-errors. */
1888 1864
1889static int 1865static int
1890skip_debugger (conditions, data) 1866skip_debugger (Lisp_Object conditions, Lisp_Object data)
1891 Lisp_Object conditions, data;
1892{ 1867{
1893 Lisp_Object tail; 1868 Lisp_Object tail;
1894 int first_string = 1; 1869 int first_string = 1;
@@ -1925,8 +1900,7 @@ skip_debugger (conditions, data)
1925 SIG and DATA describe the signal, as in find_handler_clause. */ 1900 SIG and DATA describe the signal, as in find_handler_clause. */
1926 1901
1927static int 1902static int
1928maybe_call_debugger (conditions, sig, data) 1903maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data)
1929 Lisp_Object conditions, sig, data;
1930{ 1904{
1931 Lisp_Object combined_data; 1905 Lisp_Object combined_data;
1932 1906
@@ -1962,8 +1936,8 @@ maybe_call_debugger (conditions, sig, data)
1962 a second error here in case we're handling specpdl overflow. */ 1936 a second error here in case we're handling specpdl overflow. */
1963 1937
1964static Lisp_Object 1938static Lisp_Object
1965find_handler_clause (handlers, conditions, sig, data) 1939find_handler_clause (Lisp_Object handlers, Lisp_Object conditions,
1966 Lisp_Object handlers, conditions, sig, data; 1940 Lisp_Object sig, Lisp_Object data)
1967{ 1941{
1968 register Lisp_Object h; 1942 register Lisp_Object h;
1969 register Lisp_Object tem; 1943 register Lisp_Object tem;
@@ -2205,8 +2179,7 @@ this does nothing and returns nil. */)
2205} 2179}
2206 2180
2207Lisp_Object 2181Lisp_Object
2208un_autoload (oldqueue) 2182un_autoload (Lisp_Object oldqueue)
2209 Lisp_Object oldqueue;
2210{ 2183{
2211 register Lisp_Object queue, first, second; 2184 register Lisp_Object queue, first, second;
2212 2185
@@ -2233,8 +2206,7 @@ un_autoload (oldqueue)
2233 FUNDEF is the autoload definition (a list). */ 2206 FUNDEF is the autoload definition (a list). */
2234 2207
2235void 2208void
2236do_autoload (fundef, funname) 2209do_autoload (Lisp_Object fundef, Lisp_Object funname)
2237 Lisp_Object fundef, funname;
2238{ 2210{
2239 int count = SPECPDL_INDEX (); 2211 int count = SPECPDL_INDEX ();
2240 Lisp_Object fun; 2212 Lisp_Object fun;
@@ -2259,7 +2231,7 @@ do_autoload (fundef, funname)
2259 the function. We do this in the specific case of autoloading 2231 the function. We do this in the specific case of autoloading
2260 because autoloading is not an explicit request "load this file", 2232 because autoloading is not an explicit request "load this file",
2261 but rather a request to "call this function". 2233 but rather a request to "call this function".
2262 2234
2263 The value saved here is to be restored into Vautoload_queue. */ 2235 The value saved here is to be restored into Vautoload_queue. */
2264 record_unwind_protect (un_autoload, Vautoload_queue); 2236 record_unwind_protect (un_autoload, Vautoload_queue);
2265 Vautoload_queue = Qt; 2237 Vautoload_queue = Qt;
@@ -2682,10 +2654,7 @@ usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */)
2682 except that it isn't necessary to gcpro ARGS[0]. */ 2654 except that it isn't necessary to gcpro ARGS[0]. */
2683 2655
2684static Lisp_Object 2656static Lisp_Object
2685run_hook_with_args (nargs, args, cond) 2657run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond)
2686 int nargs;
2687 Lisp_Object *args;
2688 enum run_hooks_condition cond;
2689{ 2658{
2690 Lisp_Object sym, val, ret; 2659 Lisp_Object sym, val, ret;
2691 struct gcpro gcpro1, gcpro2, gcpro3; 2660 struct gcpro gcpro1, gcpro2, gcpro3;
@@ -2765,10 +2734,7 @@ run_hook_with_args (nargs, args, cond)
2765 except that it isn't necessary to gcpro ARGS[0]. */ 2734 except that it isn't necessary to gcpro ARGS[0]. */
2766 2735
2767Lisp_Object 2736Lisp_Object
2768run_hook_list_with_args (funlist, nargs, args) 2737run_hook_list_with_args (Lisp_Object funlist, int nargs, Lisp_Object *args)
2769 Lisp_Object funlist;
2770 int nargs;
2771 Lisp_Object *args;
2772{ 2738{
2773 Lisp_Object sym; 2739 Lisp_Object sym;
2774 Lisp_Object val; 2740 Lisp_Object val;
@@ -2810,8 +2776,7 @@ run_hook_list_with_args (funlist, nargs, args)
2810/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ 2776/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */
2811 2777
2812void 2778void
2813run_hook_with_args_2 (hook, arg1, arg2) 2779run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
2814 Lisp_Object hook, arg1, arg2;
2815{ 2780{
2816 Lisp_Object temp[3]; 2781 Lisp_Object temp[3];
2817 temp[0] = hook; 2782 temp[0] = hook;
@@ -2823,8 +2788,7 @@ run_hook_with_args_2 (hook, arg1, arg2)
2823 2788
2824/* Apply fn to arg */ 2789/* Apply fn to arg */
2825Lisp_Object 2790Lisp_Object
2826apply1 (fn, arg) 2791apply1 (Lisp_Object fn, Lisp_Object arg)
2827 Lisp_Object fn, arg;
2828{ 2792{
2829 struct gcpro gcpro1; 2793 struct gcpro gcpro1;
2830 2794
@@ -2843,8 +2807,7 @@ apply1 (fn, arg)
2843 2807
2844/* Call function fn on no arguments */ 2808/* Call function fn on no arguments */
2845Lisp_Object 2809Lisp_Object
2846call0 (fn) 2810call0 (Lisp_Object fn)
2847 Lisp_Object fn;
2848{ 2811{
2849 struct gcpro gcpro1; 2812 struct gcpro gcpro1;
2850 2813
@@ -2855,8 +2818,7 @@ call0 (fn)
2855/* Call function fn with 1 argument arg1 */ 2818/* Call function fn with 1 argument arg1 */
2856/* ARGSUSED */ 2819/* ARGSUSED */
2857Lisp_Object 2820Lisp_Object
2858call1 (fn, arg1) 2821call1 (Lisp_Object fn, Lisp_Object arg1)
2859 Lisp_Object fn, arg1;
2860{ 2822{
2861 struct gcpro gcpro1; 2823 struct gcpro gcpro1;
2862 Lisp_Object args[2]; 2824 Lisp_Object args[2];
@@ -2871,8 +2833,7 @@ call1 (fn, arg1)
2871/* Call function fn with 2 arguments arg1, arg2 */ 2833/* Call function fn with 2 arguments arg1, arg2 */
2872/* ARGSUSED */ 2834/* ARGSUSED */
2873Lisp_Object 2835Lisp_Object
2874call2 (fn, arg1, arg2) 2836call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
2875 Lisp_Object fn, arg1, arg2;
2876{ 2837{
2877 struct gcpro gcpro1; 2838 struct gcpro gcpro1;
2878 Lisp_Object args[3]; 2839 Lisp_Object args[3];
@@ -2887,8 +2848,7 @@ call2 (fn, arg1, arg2)
2887/* Call function fn with 3 arguments arg1, arg2, arg3 */ 2848/* Call function fn with 3 arguments arg1, arg2, arg3 */
2888/* ARGSUSED */ 2849/* ARGSUSED */
2889Lisp_Object 2850Lisp_Object
2890call3 (fn, arg1, arg2, arg3) 2851call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
2891 Lisp_Object fn, arg1, arg2, arg3;
2892{ 2852{
2893 struct gcpro gcpro1; 2853 struct gcpro gcpro1;
2894 Lisp_Object args[4]; 2854 Lisp_Object args[4];
@@ -2904,8 +2864,8 @@ call3 (fn, arg1, arg2, arg3)
2904/* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ 2864/* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */
2905/* ARGSUSED */ 2865/* ARGSUSED */
2906Lisp_Object 2866Lisp_Object
2907call4 (fn, arg1, arg2, arg3, arg4) 2867call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
2908 Lisp_Object fn, arg1, arg2, arg3, arg4; 2868 Lisp_Object arg4)
2909{ 2869{
2910 struct gcpro gcpro1; 2870 struct gcpro gcpro1;
2911 Lisp_Object args[5]; 2871 Lisp_Object args[5];
@@ -2922,8 +2882,8 @@ call4 (fn, arg1, arg2, arg3, arg4)
2922/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ 2882/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */
2923/* ARGSUSED */ 2883/* ARGSUSED */
2924Lisp_Object 2884Lisp_Object
2925call5 (fn, arg1, arg2, arg3, arg4, arg5) 2885call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
2926 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5; 2886 Lisp_Object arg4, Lisp_Object arg5)
2927{ 2887{
2928 struct gcpro gcpro1; 2888 struct gcpro gcpro1;
2929 Lisp_Object args[6]; 2889 Lisp_Object args[6];
@@ -2941,8 +2901,8 @@ call5 (fn, arg1, arg2, arg3, arg4, arg5)
2941/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ 2901/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */
2942/* ARGSUSED */ 2902/* ARGSUSED */
2943Lisp_Object 2903Lisp_Object
2944call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) 2904call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
2945 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6; 2905 Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6)
2946{ 2906{
2947 struct gcpro gcpro1; 2907 struct gcpro gcpro1;
2948 Lisp_Object args[7]; 2908 Lisp_Object args[7];
@@ -2961,8 +2921,8 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6)
2961/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ 2921/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */
2962/* ARGSUSED */ 2922/* ARGSUSED */
2963Lisp_Object 2923Lisp_Object
2964call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7) 2924call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
2965 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7; 2925 Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6, Lisp_Object arg7)
2966{ 2926{
2967 struct gcpro gcpro1; 2927 struct gcpro gcpro1;
2968 Lisp_Object args[8]; 2928 Lisp_Object args[8];
@@ -3147,9 +3107,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
3147} 3107}
3148 3108
3149Lisp_Object 3109Lisp_Object
3150apply_lambda (fun, args, eval_flag) 3110apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag)
3151 Lisp_Object fun, args;
3152 int eval_flag;
3153{ 3111{
3154 Lisp_Object args_left; 3112 Lisp_Object args_left;
3155 Lisp_Object numargs; 3113 Lisp_Object numargs;
@@ -3196,10 +3154,7 @@ apply_lambda (fun, args, eval_flag)
3196 FUN must be either a lambda-expression or a compiled-code object. */ 3154 FUN must be either a lambda-expression or a compiled-code object. */
3197 3155
3198static Lisp_Object 3156static Lisp_Object
3199funcall_lambda (fun, nargs, arg_vector) 3157funcall_lambda (Lisp_Object fun, int nargs, register Lisp_Object *arg_vector)
3200 Lisp_Object fun;
3201 int nargs;
3202 register Lisp_Object *arg_vector;
3203{ 3158{
3204 Lisp_Object val, syms_left, next; 3159 Lisp_Object val, syms_left, next;
3205 int count = SPECPDL_INDEX (); 3160 int count = SPECPDL_INDEX ();
@@ -3291,7 +3246,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
3291} 3246}
3292 3247
3293void 3248void
3294grow_specpdl () 3249grow_specpdl (void)
3295{ 3250{
3296 register int count = SPECPDL_INDEX (); 3251 register int count = SPECPDL_INDEX ();
3297 if (specpdl_size >= max_specpdl_size) 3252 if (specpdl_size >= max_specpdl_size)
@@ -3324,8 +3279,7 @@ grow_specpdl ()
3324 BUFFER did not yet have a buffer-local value). */ 3279 BUFFER did not yet have a buffer-local value). */
3325 3280
3326void 3281void
3327specbind (symbol, value) 3282specbind (Lisp_Object symbol, Lisp_Object value)
3328 Lisp_Object symbol, value;
3329{ 3283{
3330 struct Lisp_Symbol *sym; 3284 struct Lisp_Symbol *sym;
3331 3285
@@ -3423,9 +3377,7 @@ specbind (symbol, value)
3423} 3377}
3424 3378
3425void 3379void
3426record_unwind_protect (function, arg) 3380record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
3427 Lisp_Object (*function) (Lisp_Object);
3428 Lisp_Object arg;
3429{ 3381{
3430 eassert (!handling_signal); 3382 eassert (!handling_signal);
3431 3383
@@ -3438,9 +3390,7 @@ record_unwind_protect (function, arg)
3438} 3390}
3439 3391
3440Lisp_Object 3392Lisp_Object
3441unbind_to (count, value) 3393unbind_to (int count, Lisp_Object value)
3442 int count;
3443 Lisp_Object value;
3444{ 3394{
3445 Lisp_Object quitf = Vquit_flag; 3395 Lisp_Object quitf = Vquit_flag;
3446 struct gcpro gcpro1, gcpro2; 3396 struct gcpro gcpro1, gcpro2;
@@ -3623,7 +3573,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
3623 3573
3624 3574
3625void 3575void
3626mark_backtrace () 3576mark_backtrace (void)
3627{ 3577{
3628 register struct backtrace *backlist; 3578 register struct backtrace *backlist;
3629 register int i; 3579 register int i;
@@ -3642,7 +3592,7 @@ mark_backtrace ()
3642} 3592}
3643 3593
3644void 3594void
3645syms_of_eval () 3595syms_of_eval (void)
3646{ 3596{
3647 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, 3597 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
3648 doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. 3598 doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.
diff --git a/src/image.c b/src/image.c
index 821246eac03..adc28ba8d38 100644
--- a/src/image.c
+++ b/src/image.c
@@ -181,26 +181,20 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
181/* Functions to access the contents of a bitmap, given an id. */ 181/* Functions to access the contents of a bitmap, given an id. */
182 182
183int 183int
184x_bitmap_height (f, id) 184x_bitmap_height (FRAME_PTR f, int id)
185 FRAME_PTR f;
186 int id;
187{ 185{
188 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; 186 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
189} 187}
190 188
191int 189int
192x_bitmap_width (f, id) 190x_bitmap_width (FRAME_PTR f, int id)
193 FRAME_PTR f;
194 int id;
195{ 191{
196 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; 192 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
197} 193}
198 194
199#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) 195#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
200int 196int
201x_bitmap_pixmap (f, id) 197x_bitmap_pixmap (FRAME_PTR f, int id)
202 FRAME_PTR f;
203 int id;
204{ 198{
205 return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; 199 return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
206} 200}
@@ -208,9 +202,7 @@ x_bitmap_pixmap (f, id)
208 202
209#ifdef HAVE_X_WINDOWS 203#ifdef HAVE_X_WINDOWS
210int 204int
211x_bitmap_mask (f, id) 205x_bitmap_mask (FRAME_PTR f, int id)
212 FRAME_PTR f;
213 int id;
214{ 206{
215 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; 207 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
216} 208}
@@ -219,8 +211,7 @@ x_bitmap_mask (f, id)
219/* Allocate a new bitmap record. Returns index of new record. */ 211/* Allocate a new bitmap record. Returns index of new record. */
220 212
221static int 213static int
222x_allocate_bitmap_record (f) 214x_allocate_bitmap_record (FRAME_PTR f)
223 FRAME_PTR f;
224{ 215{
225 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 216 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
226 int i; 217 int i;
@@ -251,9 +242,7 @@ x_allocate_bitmap_record (f)
251/* Add one reference to the reference count of the bitmap with id ID. */ 242/* Add one reference to the reference count of the bitmap with id ID. */
252 243
253void 244void
254x_reference_bitmap (f, id) 245x_reference_bitmap (FRAME_PTR f, int id)
255 FRAME_PTR f;
256 int id;
257{ 246{
258 ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; 247 ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
259} 248}
@@ -261,10 +250,7 @@ x_reference_bitmap (f, id)
261/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ 250/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */
262 251
263int 252int
264x_create_bitmap_from_data (f, bits, width, height) 253x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
265 struct frame *f;
266 char *bits;
267 unsigned int width, height;
268{ 254{
269 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 255 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
270 int id; 256 int id;
@@ -323,9 +309,7 @@ x_create_bitmap_from_data (f, bits, width, height)
323/* Create bitmap from file FILE for frame F. */ 309/* Create bitmap from file FILE for frame F. */
324 310
325int 311int
326x_create_bitmap_from_file (f, file) 312x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
327 struct frame *f;
328 Lisp_Object file;
329{ 313{
330 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 314 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
331 315
@@ -402,9 +386,7 @@ x_create_bitmap_from_file (f, file)
402/* Free bitmap B. */ 386/* Free bitmap B. */
403 387
404static void 388static void
405free_bitmap_record (dpyinfo, bm) 389free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
406 Display_Info *dpyinfo;
407 Bitmap_Record *bm;
408{ 390{
409#ifdef HAVE_X_WINDOWS 391#ifdef HAVE_X_WINDOWS
410 XFreePixmap (dpyinfo->display, bm->pixmap); 392 XFreePixmap (dpyinfo->display, bm->pixmap);
@@ -430,9 +412,7 @@ free_bitmap_record (dpyinfo, bm)
430/* Remove reference to bitmap with id number ID. */ 412/* Remove reference to bitmap with id number ID. */
431 413
432void 414void
433x_destroy_bitmap (f, id) 415x_destroy_bitmap (FRAME_PTR f, int id)
434 FRAME_PTR f;
435 int id;
436{ 416{
437 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 417 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
438 418
@@ -452,8 +432,7 @@ x_destroy_bitmap (f, id)
452/* Free all the bitmaps for the display specified by DPYINFO. */ 432/* Free all the bitmaps for the display specified by DPYINFO. */
453 433
454void 434void
455x_destroy_all_bitmaps (dpyinfo) 435x_destroy_all_bitmaps (Display_Info *dpyinfo)
456 Display_Info *dpyinfo;
457{ 436{
458 int i; 437 int i;
459 Bitmap_Record *bm = dpyinfo->bitmaps; 438 Bitmap_Record *bm = dpyinfo->bitmaps;
@@ -487,9 +466,7 @@ static void x_destroy_x_image (XImagePtr ximg);
487 It's nicer with some borders in this context */ 466 It's nicer with some borders in this context */
488 467
489int 468int
490x_create_bitmap_mask (f, id) 469x_create_bitmap_mask (struct frame *f, int id)
491 struct frame *f;
492 int id;
493{ 470{
494 Pixmap pixmap, mask; 471 Pixmap pixmap, mask;
495 XImagePtr ximg, mask_img; 472 XImagePtr ximg, mask_img;
@@ -637,9 +614,7 @@ static int x_build_heuristic_mask (struct frame *, struct image *,
637 image_types and caches the loading status of TYPE. */ 614 image_types and caches the loading status of TYPE. */
638 615
639static Lisp_Object 616static Lisp_Object
640define_image_type (type, loaded) 617define_image_type (struct image_type *type, int loaded)
641 struct image_type *type;
642 int loaded;
643{ 618{
644 Lisp_Object success; 619 Lisp_Object success;
645 620
@@ -665,8 +640,7 @@ define_image_type (type, loaded)
665 structure. Value is null if SYMBOL is not a known image type. */ 640 structure. Value is null if SYMBOL is not a known image type. */
666 641
667static INLINE struct image_type * 642static INLINE struct image_type *
668lookup_image_type (symbol) 643lookup_image_type (Lisp_Object symbol)
669 Lisp_Object symbol;
670{ 644{
671 struct image_type *type; 645 struct image_type *type;
672 646
@@ -690,8 +664,7 @@ lookup_image_type (symbol)
690 image type. */ 664 image type. */
691 665
692int 666int
693valid_image_p (object) 667valid_image_p (Lisp_Object object)
694 Lisp_Object object;
695{ 668{
696 int valid_p = 0; 669 int valid_p = 0;
697 670
@@ -726,9 +699,7 @@ valid_image_p (object)
726 therefore simply displays a message. */ 699 therefore simply displays a message. */
727 700
728static void 701static void
729image_error (format, arg1, arg2) 702image_error (char *format, Lisp_Object arg1, Lisp_Object arg2)
730 char *format;
731 Lisp_Object arg1, arg2;
732{ 703{
733 add_to_log (format, arg1, arg2); 704 add_to_log (format, arg1, arg2);
734} 705}
@@ -788,11 +759,8 @@ static Lisp_Object image_spec_value (Lisp_Object, Lisp_Object, int *);
788 allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ 759 allowed keyword/value pairs. Value is non-zero if SPEC is valid. */
789 760
790static int 761static int
791parse_image_spec (spec, keywords, nkeywords, type) 762parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
792 Lisp_Object spec; 763 int nkeywords, Lisp_Object type)
793 struct image_keyword *keywords;
794 int nkeywords;
795 Lisp_Object type;
796{ 764{
797 int i; 765 int i;
798 Lisp_Object plist; 766 Lisp_Object plist;
@@ -928,9 +896,7 @@ parse_image_spec (spec, keywords, nkeywords, type)
928 to 1 if KEY was found in SPEC, set it to 0 otherwise. */ 896 to 1 if KEY was found in SPEC, set it to 0 otherwise. */
929 897
930static Lisp_Object 898static Lisp_Object
931image_spec_value (spec, key, found) 899image_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
932 Lisp_Object spec, key;
933 int *found;
934{ 900{
935 Lisp_Object tail; 901 Lisp_Object tail;
936 902
@@ -1048,9 +1014,7 @@ Lisp_Object Vmax_image_size;
1048 SPEC. SPEC has a hash value of HASH. */ 1014 SPEC. SPEC has a hash value of HASH. */
1049 1015
1050static struct image * 1016static struct image *
1051make_image (spec, hash) 1017make_image (Lisp_Object spec, unsigned int hash)
1052 Lisp_Object spec;
1053 unsigned hash;
1054{ 1018{
1055 struct image *img = (struct image *) xmalloc (sizeof *img); 1019 struct image *img = (struct image *) xmalloc (sizeof *img);
1056 Lisp_Object file = image_spec_value (spec, QCfile, NULL); 1020 Lisp_Object file = image_spec_value (spec, QCfile, NULL);
@@ -1072,9 +1036,7 @@ make_image (spec, hash)
1072/* Free image IMG which was used on frame F, including its resources. */ 1036/* Free image IMG which was used on frame F, including its resources. */
1073 1037
1074static void 1038static void
1075free_image (f, img) 1039free_image (struct frame *f, struct image *img)
1076 struct frame *f;
1077 struct image *img;
1078{ 1040{
1079 if (img) 1041 if (img)
1080 { 1042 {
@@ -1101,10 +1063,7 @@ free_image (f, img)
1101 otherwise, return 0. */ 1063 otherwise, return 0. */
1102 1064
1103int 1065int
1104check_image_size (f, width, height) 1066check_image_size (struct frame *f, int width, int height)
1105 struct frame *f;
1106 int width;
1107 int height;
1108{ 1067{
1109 int w, h; 1068 int w, h;
1110 1069
@@ -1135,9 +1094,7 @@ check_image_size (f, width, height)
1135 drawing an image. */ 1094 drawing an image. */
1136 1095
1137void 1096void
1138prepare_image_for_display (f, img) 1097prepare_image_for_display (struct frame *f, struct image *img)
1139 struct frame *f;
1140 struct image *img;
1141{ 1098{
1142 EMACS_TIME t; 1099 EMACS_TIME t;
1143 1100
@@ -1157,10 +1114,7 @@ prepare_image_for_display (f, img)
1157 drawn in face FACE. */ 1114 drawn in face FACE. */
1158 1115
1159int 1116int
1160image_ascent (img, face, slice) 1117image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
1161 struct image *img;
1162 struct face *face;
1163 struct glyph_slice *slice;
1164{ 1118{
1165 int height; 1119 int height;
1166 int ascent; 1120 int ascent;
@@ -1206,10 +1160,8 @@ image_ascent (img, face, slice)
1206 On W32, XIMG is assumed to a device context with the bitmap selected. */ 1160 On W32, XIMG is assumed to a device context with the bitmap selected. */
1207 1161
1208static RGB_PIXEL_COLOR 1162static RGB_PIXEL_COLOR
1209four_corners_best (ximg, corners, width, height) 1163four_corners_best (XImagePtr_or_DC ximg, int *corners,
1210 XImagePtr_or_DC ximg; 1164 unsigned long width, unsigned long height)
1211 int *corners;
1212 unsigned long width, height;
1213{ 1165{
1214 RGB_PIXEL_COLOR corner_pixels[4], best; 1166 RGB_PIXEL_COLOR corner_pixels[4], best;
1215 int i, best_count; 1167 int i, best_count;
@@ -1281,10 +1233,7 @@ four_corners_best (ximg, corners, width, height)
1281 use for the heuristic. */ 1233 use for the heuristic. */
1282 1234
1283RGB_PIXEL_COLOR 1235RGB_PIXEL_COLOR
1284image_background (img, f, ximg) 1236image_background (struct image *img, struct frame *f, XImagePtr_or_DC ximg)
1285 struct image *img;
1286 struct frame *f;
1287 XImagePtr_or_DC ximg;
1288{ 1237{
1289 if (! img->background_valid) 1238 if (! img->background_valid)
1290 /* IMG doesn't have a background yet, try to guess a reasonable value. */ 1239 /* IMG doesn't have a background yet, try to guess a reasonable value. */
@@ -1323,10 +1272,7 @@ image_background (img, f, ximg)
1323 existing XImage object to use for the heuristic. */ 1272 existing XImage object to use for the heuristic. */
1324 1273
1325int 1274int
1326image_background_transparent (img, f, mask) 1275image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_DC mask)
1327 struct image *img;
1328 struct frame *f;
1329 XImagePtr_or_DC mask;
1330{ 1276{
1331 if (! img->background_transparent_valid) 1277 if (! img->background_transparent_valid)
1332 /* IMG doesn't have a background yet, try to guess a reasonable value. */ 1278 /* IMG doesn't have a background yet, try to guess a reasonable value. */
@@ -1386,10 +1332,8 @@ static unsigned long x_alloc_image_color (struct frame *f,
1386 the image, if any. */ 1332 the image, if any. */
1387 1333
1388static void 1334static void
1389x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p) 1335x_clear_image_1 (struct frame *f, struct image *img, int pixmap_p, int mask_p,
1390 struct frame *f; 1336 int colors_p)
1391 struct image *img;
1392 int pixmap_p, mask_p, colors_p;
1393{ 1337{
1394 if (pixmap_p && img->pixmap) 1338 if (pixmap_p && img->pixmap)
1395 { 1339 {
@@ -1422,9 +1366,7 @@ x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
1422/* Free X resources of image IMG which is used on frame F. */ 1366/* Free X resources of image IMG which is used on frame F. */
1423 1367
1424static void 1368static void
1425x_clear_image (f, img) 1369x_clear_image (struct frame *f, struct image *img)
1426 struct frame *f;
1427 struct image *img;
1428{ 1370{
1429 BLOCK_INPUT; 1371 BLOCK_INPUT;
1430 x_clear_image_1 (f, img, 1, 1, 1); 1372 x_clear_image_1 (f, img, 1, 1, 1);
@@ -1438,11 +1380,8 @@ x_clear_image (f, img)
1438 color. */ 1380 color. */
1439 1381
1440static unsigned long 1382static unsigned long
1441x_alloc_image_color (f, img, color_name, dflt) 1383x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
1442 struct frame *f; 1384 unsigned long dflt)
1443 struct image *img;
1444 Lisp_Object color_name;
1445 unsigned long dflt;
1446{ 1385{
1447 XColor color; 1386 XColor color;
1448 unsigned long result; 1387 unsigned long result;
@@ -1480,7 +1419,7 @@ static void postprocess_image (struct frame *, struct image *);
1480 heap. Call free_image_cache to free an image cache. */ 1419 heap. Call free_image_cache to free an image cache. */
1481 1420
1482struct image_cache * 1421struct image_cache *
1483make_image_cache () 1422make_image_cache (void)
1484{ 1423{
1485 struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c); 1424 struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c);
1486 int size; 1425 int size;
@@ -1498,10 +1437,7 @@ make_image_cache ()
1498/* Find an image matching SPEC in the cache, and return it. If no 1437/* Find an image matching SPEC in the cache, and return it. If no
1499 image is found, return NULL. */ 1438 image is found, return NULL. */
1500static struct image * 1439static struct image *
1501search_image_cache (f, spec, hash) 1440search_image_cache (struct frame *f, Lisp_Object spec, unsigned int hash)
1502 struct frame *f;
1503 Lisp_Object spec;
1504 unsigned hash;
1505{ 1441{
1506 struct image *img; 1442 struct image *img;
1507 struct image_cache *c = FRAME_IMAGE_CACHE (f); 1443 struct image_cache *c = FRAME_IMAGE_CACHE (f);
@@ -1534,9 +1470,7 @@ search_image_cache (f, spec, hash)
1534/* Search frame F for an image with spec SPEC, and free it. */ 1470/* Search frame F for an image with spec SPEC, and free it. */
1535 1471
1536static void 1472static void
1537uncache_image (f, spec) 1473uncache_image (struct frame *f, Lisp_Object spec)
1538 struct frame *f;
1539 Lisp_Object spec;
1540{ 1474{
1541 struct image *img = search_image_cache (f, spec, sxhash (spec, 0)); 1475 struct image *img = search_image_cache (f, spec, sxhash (spec, 0));
1542 if (img) 1476 if (img)
@@ -1548,8 +1482,7 @@ uncache_image (f, spec)
1548 caches. */ 1482 caches. */
1549 1483
1550void 1484void
1551free_image_cache (f) 1485free_image_cache (struct frame *f)
1552 struct frame *f;
1553{ 1486{
1554 struct image_cache *c = FRAME_IMAGE_CACHE (f); 1487 struct image_cache *c = FRAME_IMAGE_CACHE (f);
1555 if (c) 1488 if (c)
@@ -1725,9 +1658,7 @@ FRAME t means refresh the image on all frames. */)
1725 by the image's specification, */ 1658 by the image's specification, */
1726 1659
1727static void 1660static void
1728postprocess_image (f, img) 1661postprocess_image (struct frame *f, struct image *img)
1729 struct frame *f;
1730 struct image *img;
1731{ 1662{
1732 /* Manipulation of the image's mask. */ 1663 /* Manipulation of the image's mask. */
1733 if (img->pixmap) 1664 if (img->pixmap)
@@ -1800,9 +1731,7 @@ postprocess_image (f, img)
1800 SPEC must be a valid Lisp image specification (see valid_image_p). */ 1731 SPEC must be a valid Lisp image specification (see valid_image_p). */
1801 1732
1802int 1733int
1803lookup_image (f, spec) 1734lookup_image (struct frame *f, Lisp_Object spec)
1804 struct frame *f;
1805 Lisp_Object spec;
1806{ 1735{
1807 struct image_cache *c; 1736 struct image_cache *c;
1808 struct image *img; 1737 struct image *img;
@@ -1922,9 +1851,7 @@ lookup_image (f, spec)
1922/* Cache image IMG in the image cache of frame F. */ 1851/* Cache image IMG in the image cache of frame F. */
1923 1852
1924static void 1853static void
1925cache_image (f, img) 1854cache_image (struct frame *f, struct image *img)
1926 struct frame *f;
1927 struct image *img;
1928{ 1855{
1929 struct image_cache *c = FRAME_IMAGE_CACHE (f); 1856 struct image_cache *c = FRAME_IMAGE_CACHE (f);
1930 int i; 1857 int i;
@@ -1964,8 +1891,7 @@ cache_image (f, img)
1964/* Mark Lisp objects in image IMG. */ 1891/* Mark Lisp objects in image IMG. */
1965 1892
1966static void 1893static void
1967mark_image (img) 1894mark_image (struct image *img)
1968 struct image *img;
1969{ 1895{
1970 mark_object (img->spec); 1896 mark_object (img->spec);
1971 mark_object (img->dependencies); 1897 mark_object (img->dependencies);
@@ -2049,11 +1975,8 @@ static void x_put_x_image (struct frame *, XImagePtr, Pixmap, int, int);
2049 should indicate the bit depth of the image. */ 1975 should indicate the bit depth of the image. */
2050 1976
2051static int 1977static int
2052x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) 1978x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
2053 struct frame *f; 1979 XImagePtr *ximg, Pixmap *pixmap)
2054 int width, height, depth;
2055 XImagePtr *ximg;
2056 Pixmap *pixmap;
2057{ 1980{
2058#ifdef HAVE_X_WINDOWS 1981#ifdef HAVE_X_WINDOWS
2059 Display *display = FRAME_X_DISPLAY (f); 1982 Display *display = FRAME_X_DISPLAY (f);
@@ -2192,8 +2115,7 @@ x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap)
2192/* Destroy XImage XIMG. Free XIMG->data. */ 2115/* Destroy XImage XIMG. Free XIMG->data. */
2193 2116
2194static void 2117static void
2195x_destroy_x_image (ximg) 2118x_destroy_x_image (XImagePtr ximg)
2196 XImagePtr ximg;
2197{ 2119{
2198 xassert (interrupt_input_blocked); 2120 xassert (interrupt_input_blocked);
2199 if (ximg) 2121 if (ximg)
@@ -2219,11 +2141,7 @@ x_destroy_x_image (ximg)
2219 are width and height of both the image and pixmap. */ 2141 are width and height of both the image and pixmap. */
2220 2142
2221static void 2143static void
2222x_put_x_image (f, ximg, pixmap, width, height) 2144x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int height)
2223 struct frame *f;
2224 XImagePtr ximg;
2225 Pixmap pixmap;
2226 int width, height;
2227{ 2145{
2228#ifdef HAVE_X_WINDOWS 2146#ifdef HAVE_X_WINDOWS
2229 GC gc; 2147 GC gc;
@@ -2261,8 +2179,7 @@ static unsigned char *slurp_file (char *, int *);
2261 found, or nil if not found. */ 2179 found, or nil if not found. */
2262 2180
2263Lisp_Object 2181Lisp_Object
2264x_find_image_file (file) 2182x_find_image_file (Lisp_Object file)
2265 Lisp_Object file;
2266{ 2183{
2267 Lisp_Object file_found, search_path; 2184 Lisp_Object file_found, search_path;
2268 struct gcpro gcpro1, gcpro2; 2185 struct gcpro gcpro1, gcpro2;
@@ -2297,9 +2214,7 @@ x_find_image_file (file)
2297 occurred. *SIZE is set to the size of the file. */ 2214 occurred. *SIZE is set to the size of the file. */
2298 2215
2299static unsigned char * 2216static unsigned char *
2300slurp_file (file, size) 2217slurp_file (char *file, int *size)
2301 char *file;
2302 int *size;
2303{ 2218{
2304 FILE *fp = NULL; 2219 FILE *fp = NULL;
2305 unsigned char *buf = NULL; 2220 unsigned char *buf = NULL;
@@ -2434,8 +2349,7 @@ enum xbm_token
2434 displayed is used. */ 2349 displayed is used. */
2435 2350
2436static int 2351static int
2437xbm_image_p (object) 2352xbm_image_p (Lisp_Object object)
2438 Lisp_Object object;
2439{ 2353{
2440 struct image_keyword kw[XBM_LAST]; 2354 struct image_keyword kw[XBM_LAST];
2441 2355
@@ -2528,10 +2442,7 @@ xbm_image_p (object)
2528 scanning a number, store its value in *IVAL. */ 2442 scanning a number, store its value in *IVAL. */
2529 2443
2530static int 2444static int
2531xbm_scan (s, end, sval, ival) 2445xbm_scan (unsigned char **s, unsigned char *end, char *sval, int *ival)
2532 unsigned char **s, *end;
2533 char *sval;
2534 int *ival;
2535{ 2446{
2536 unsigned int c; 2447 unsigned int c;
2537 2448
@@ -2695,12 +2606,9 @@ convert_mono_to_color_image (f, img, foreground, background)
2695 2606
2696 2607
2697static void 2608static void
2698Create_Pixmap_From_Bitmap_Data (f, img, data, fg, bg, non_default_colors) 2609Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
2699 struct frame *f; 2610 RGB_PIXEL_COLOR fg, RGB_PIXEL_COLOR bg,
2700 struct image *img; 2611 int non_default_colors)
2701 char *data;
2702 RGB_PIXEL_COLOR fg, bg;
2703 int non_default_colors;
2704{ 2612{
2705#ifdef HAVE_NTGUI 2613#ifdef HAVE_NTGUI
2706 img->pixmap 2614 img->pixmap
@@ -2736,12 +2644,9 @@ Create_Pixmap_From_Bitmap_Data (f, img, data, fg, bg, non_default_colors)
2736 invalid (the bitmap remains unread). */ 2644 invalid (the bitmap remains unread). */
2737 2645
2738static int 2646static int
2739xbm_read_bitmap_data (f, contents, end, width, height, data, inhibit_image_error) 2647xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end,
2740 struct frame *f; 2648 int *width, int *height, unsigned char **data,
2741 unsigned char *contents, *end; 2649 int inhibit_image_error)
2742 int *width, *height;
2743 unsigned char **data;
2744 int inhibit_image_error;
2745{ 2650{
2746 unsigned char *s = contents; 2651 unsigned char *s = contents;
2747 char buffer[BUFSIZ]; 2652 char buffer[BUFSIZ];
@@ -2890,10 +2795,8 @@ xbm_read_bitmap_data (f, contents, end, width, height, data, inhibit_image_error
2890 successful. */ 2795 successful. */
2891 2796
2892static int 2797static int
2893xbm_load_image (f, img, contents, end) 2798xbm_load_image (struct frame *f, struct image *img, unsigned char *contents,
2894 struct frame *f; 2799 unsigned char *end)
2895 struct image *img;
2896 unsigned char *contents, *end;
2897{ 2800{
2898 int rc; 2801 int rc;
2899 unsigned char *data; 2802 unsigned char *data;
@@ -2949,8 +2852,7 @@ xbm_load_image (f, img, contents, end)
2949/* Value is non-zero if DATA looks like an in-memory XBM file. */ 2852/* Value is non-zero if DATA looks like an in-memory XBM file. */
2950 2853
2951static int 2854static int
2952xbm_file_p (data) 2855xbm_file_p (Lisp_Object data)
2953 Lisp_Object data;
2954{ 2856{
2955 int w, h; 2857 int w, h;
2956 return (STRINGP (data) 2858 return (STRINGP (data)
@@ -2964,9 +2866,7 @@ xbm_file_p (data)
2964 non-zero if successful. */ 2866 non-zero if successful. */
2965 2867
2966static int 2868static int
2967xbm_load (f, img) 2869xbm_load (struct frame *f, struct image *img)
2968 struct frame *f;
2969 struct image *img;
2970{ 2870{
2971 int success_p = 0; 2871 int success_p = 0;
2972 Lisp_Object file_name; 2872 Lisp_Object file_name;
@@ -3240,9 +3140,7 @@ struct xpm_cached_color **xpm_color_cache;
3240/* Initialize the color cache. */ 3140/* Initialize the color cache. */
3241 3141
3242static void 3142static void
3243xpm_init_color_cache (f, attrs) 3143xpm_init_color_cache (struct frame *f, XpmAttributes *attrs)
3244 struct frame *f;
3245 XpmAttributes *attrs;
3246{ 3144{
3247 size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache; 3145 size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache;
3248 xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes); 3146 xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes);
@@ -3268,7 +3166,7 @@ xpm_init_color_cache (f, attrs)
3268/* Free the color cache. */ 3166/* Free the color cache. */
3269 3167
3270static void 3168static void
3271xpm_free_color_cache () 3169xpm_free_color_cache (void)
3272{ 3170{
3273 struct xpm_cached_color *p, *next; 3171 struct xpm_cached_color *p, *next;
3274 int i; 3172 int i;
@@ -3289,8 +3187,7 @@ xpm_free_color_cache ()
3289 cache. */ 3187 cache. */
3290 3188
3291static int 3189static int
3292xpm_color_bucket (color_name) 3190xpm_color_bucket (char *color_name)
3293 char *color_name;
3294{ 3191{
3295 unsigned h = 0; 3192 unsigned h = 0;
3296 char *s; 3193 char *s;
@@ -3306,11 +3203,7 @@ xpm_color_bucket (color_name)
3306 entry added. */ 3203 entry added. */
3307 3204
3308static struct xpm_cached_color * 3205static struct xpm_cached_color *
3309xpm_cache_color (f, color_name, color, bucket) 3206xpm_cache_color (struct frame *f, char *color_name, XColor *color, int bucket)
3310 struct frame *f;
3311 char *color_name;
3312 XColor *color;
3313 int bucket;
3314{ 3207{
3315 size_t nbytes; 3208 size_t nbytes;
3316 struct xpm_cached_color *p; 3209 struct xpm_cached_color *p;
@@ -3333,10 +3226,7 @@ xpm_cache_color (f, color_name, color, bucket)
3333 allocation failed. */ 3226 allocation failed. */
3334 3227
3335static int 3228static int
3336xpm_lookup_color (f, color_name, color) 3229xpm_lookup_color (struct frame *f, char *color_name, XColor *color)
3337 struct frame *f;
3338 char *color_name;
3339 XColor *color;
3340{ 3230{
3341 struct xpm_cached_color *p; 3231 struct xpm_cached_color *p;
3342 int h = xpm_color_bucket (color_name); 3232 int h = xpm_color_bucket (color_name);
@@ -3373,12 +3263,8 @@ xpm_lookup_color (f, color_name, color)
3373 if successful. */ 3263 if successful. */
3374 3264
3375static int 3265static int
3376xpm_alloc_color (dpy, cmap, color_name, color, closure) 3266xpm_alloc_color (Display *dpy, Colormap cmap, char *color_name, XColor *color,
3377 Display *dpy; 3267 void *closure)
3378 Colormap cmap;
3379 char *color_name;
3380 XColor *color;
3381 void *closure;
3382{ 3268{
3383 return xpm_lookup_color ((struct frame *) closure, color_name, color); 3269 return xpm_lookup_color ((struct frame *) closure, color_name, color);
3384} 3270}
@@ -3389,12 +3275,7 @@ xpm_alloc_color (dpy, cmap, color_name, color, closure)
3389 non-zero if successful. */ 3275 non-zero if successful. */
3390 3276
3391static int 3277static int
3392xpm_free_colors (dpy, cmap, pixels, npixels, closure) 3278xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void *closure)
3393 Display *dpy;
3394 Colormap cmap;
3395 Pixel *pixels;
3396 int npixels;
3397 void *closure;
3398{ 3279{
3399 return 1; 3280 return 1;
3400} 3281}
@@ -3434,8 +3315,7 @@ init_xpm_functions (Lisp_Object libraries)
3434 cdr are strings. */ 3315 cdr are strings. */
3435 3316
3436static int 3317static int
3437xpm_valid_color_symbols_p (color_symbols) 3318xpm_valid_color_symbols_p (Lisp_Object color_symbols)
3438 Lisp_Object color_symbols;
3439{ 3319{
3440 while (CONSP (color_symbols)) 3320 while (CONSP (color_symbols))
3441 { 3321 {
@@ -3454,8 +3334,7 @@ xpm_valid_color_symbols_p (color_symbols)
3454/* Value is non-zero if OBJECT is a valid XPM image specification. */ 3334/* Value is non-zero if OBJECT is a valid XPM image specification. */
3455 3335
3456static int 3336static int
3457xpm_image_p (object) 3337xpm_image_p (Lisp_Object object)
3458 Lisp_Object object;
3459{ 3338{
3460 struct image_keyword fmt[XPM_LAST]; 3339 struct image_keyword fmt[XPM_LAST];
3461 bcopy (xpm_format, fmt, sizeof fmt); 3340 bcopy (xpm_format, fmt, sizeof fmt);
@@ -3472,9 +3351,7 @@ xpm_image_p (object)
3472 3351
3473#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) 3352#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
3474int 3353int
3475x_create_bitmap_from_xpm_data (f, bits) 3354x_create_bitmap_from_xpm_data (struct frame *f, char **bits)
3476 struct frame *f;
3477 char **bits;
3478{ 3355{
3479 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 3356 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3480 int id, rc; 3357 int id, rc;
@@ -3517,9 +3394,7 @@ x_create_bitmap_from_xpm_data (f, bits)
3517#ifdef HAVE_XPM 3394#ifdef HAVE_XPM
3518 3395
3519static int 3396static int
3520xpm_load (f, img) 3397xpm_load (struct frame *f, struct image *img)
3521 struct frame *f;
3522 struct image *img;
3523{ 3398{
3524 int rc; 3399 int rc;
3525 XpmAttributes attrs; 3400 XpmAttributes attrs;
@@ -4273,7 +4148,7 @@ int ct_colors_allocated;
4273/* Initialize the color table. */ 4148/* Initialize the color table. */
4274 4149
4275static void 4150static void
4276init_color_table () 4151init_color_table (void)
4277{ 4152{
4278 int size = CT_SIZE * sizeof (*ct_table); 4153 int size = CT_SIZE * sizeof (*ct_table);
4279 ct_table = (struct ct_color **) xmalloc (size); 4154 ct_table = (struct ct_color **) xmalloc (size);
@@ -4285,7 +4160,7 @@ init_color_table ()
4285/* Free memory associated with the color table. */ 4160/* Free memory associated with the color table. */
4286 4161
4287static void 4162static void
4288free_color_table () 4163free_color_table (void)
4289{ 4164{
4290 int i; 4165 int i;
4291 struct ct_color *p, *next; 4166 struct ct_color *p, *next;
@@ -4308,9 +4183,7 @@ free_color_table ()
4308 G, B, and make an entry in the color table. */ 4183 G, B, and make an entry in the color table. */
4309 4184
4310static unsigned long 4185static unsigned long
4311lookup_rgb_color (f, r, g, b) 4186lookup_rgb_color (struct frame *f, int r, int g, int b)
4312 struct frame *f;
4313 int r, g, b;
4314{ 4187{
4315 unsigned hash = CT_HASH_RGB (r, g, b); 4188 unsigned hash = CT_HASH_RGB (r, g, b);
4316 int i = hash % CT_SIZE; 4189 int i = hash % CT_SIZE;
@@ -4405,9 +4278,7 @@ lookup_rgb_color (f, r, g, b)
4405 table. If not already present, allocate it. Value is PIXEL. */ 4278 table. If not already present, allocate it. Value is PIXEL. */
4406 4279
4407static unsigned long 4280static unsigned long
4408lookup_pixel_color (f, pixel) 4281lookup_pixel_color (struct frame *f, unsigned long pixel)
4409 struct frame *f;
4410 unsigned long pixel;
4411{ 4282{
4412 int i = pixel % CT_SIZE; 4283 int i = pixel % CT_SIZE;
4413 struct ct_color *p; 4284 struct ct_color *p;
@@ -4459,8 +4330,7 @@ lookup_pixel_color (f, pixel)
4459 allocated via xmalloc. Set *N to the number of colors. */ 4330 allocated via xmalloc. Set *N to the number of colors. */
4460 4331
4461static unsigned long * 4332static unsigned long *
4462colors_in_color_table (n) 4333colors_in_color_table (int *n)
4463 int *n;
4464{ 4334{
4465 int i, j; 4335 int i, j;
4466 struct ct_color *p; 4336 struct ct_color *p;
@@ -4558,10 +4428,7 @@ static int laplace_matrix[9] = {
4558 allocated with xmalloc; it must be freed by the caller. */ 4428 allocated with xmalloc; it must be freed by the caller. */
4559 4429
4560static XColor * 4430static XColor *
4561x_to_xcolors (f, img, rgb_p) 4431x_to_xcolors (struct frame *f, struct image *img, int rgb_p)
4562 struct frame *f;
4563 struct image *img;
4564 int rgb_p;
4565{ 4432{
4566 int x, y; 4433 int x, y;
4567 XColor *colors, *p; 4434 XColor *colors, *p;
@@ -4674,10 +4541,7 @@ XPutPixel (ximg, x, y, color)
4674 COLORS will be freed; an existing IMG->pixmap will be freed, too. */ 4541 COLORS will be freed; an existing IMG->pixmap will be freed, too. */
4675 4542
4676static void 4543static void
4677x_from_xcolors (f, img, colors) 4544x_from_xcolors (struct frame *f, struct image *img, XColor *colors)
4678 struct frame *f;
4679 struct image *img;
4680 XColor *colors;
4681{ 4545{
4682 int x, y; 4546 int x, y;
4683 XImagePtr oimg = NULL; 4547 XImagePtr oimg = NULL;
@@ -4719,10 +4583,7 @@ x_from_xcolors (f, img, colors)
4719 outgoing image. */ 4583 outgoing image. */
4720 4584
4721static void 4585static void
4722x_detect_edges (f, img, matrix, color_adjust) 4586x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjust)
4723 struct frame *f;
4724 struct image *img;
4725 int matrix[9], color_adjust;
4726{ 4587{
4727 XColor *colors = x_to_xcolors (f, img, 1); 4588 XColor *colors = x_to_xcolors (f, img, 1);
4728 XColor *new, *p; 4589 XColor *new, *p;
@@ -4788,9 +4649,7 @@ x_detect_edges (f, img, matrix, color_adjust)
4788 on frame F. */ 4649 on frame F. */
4789 4650
4790static void 4651static void
4791x_emboss (f, img) 4652x_emboss (struct frame *f, struct image *img)
4792 struct frame *f;
4793 struct image *img;
4794{ 4653{
4795 x_detect_edges (f, img, emboss_matrix, 0xffff / 2); 4654 x_detect_edges (f, img, emboss_matrix, 0xffff / 2);
4796} 4655}
@@ -4801,9 +4660,7 @@ x_emboss (f, img)
4801 to draw disabled buttons, for example. */ 4660 to draw disabled buttons, for example. */
4802 4661
4803static void 4662static void
4804x_laplace (f, img) 4663x_laplace (struct frame *f, struct image *img)
4805 struct frame *f;
4806 struct image *img;
4807{ 4664{
4808 x_detect_edges (f, img, laplace_matrix, 45000); 4665 x_detect_edges (f, img, laplace_matrix, 45000);
4809} 4666}
@@ -4821,10 +4678,8 @@ x_laplace (f, img)
4821 number. */ 4678 number. */
4822 4679
4823static void 4680static void
4824x_edge_detection (f, img, matrix, color_adjust) 4681x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix,
4825 struct frame *f; 4682 Lisp_Object color_adjust)
4826 struct image *img;
4827 Lisp_Object matrix, color_adjust;
4828{ 4683{
4829 int i = 0; 4684 int i = 0;
4830 int trans[9]; 4685 int trans[9];
@@ -4853,9 +4708,7 @@ x_edge_detection (f, img, matrix, color_adjust)
4853/* Transform image IMG on frame F so that it looks disabled. */ 4708/* Transform image IMG on frame F so that it looks disabled. */
4854 4709
4855static void 4710static void
4856x_disable_image (f, img) 4711x_disable_image (struct frame *f, struct image *img)
4857 struct frame *f;
4858 struct image *img;
4859{ 4712{
4860 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 4713 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
4861#ifdef HAVE_NTGUI 4714#ifdef HAVE_NTGUI
@@ -4957,10 +4810,7 @@ x_disable_image (f, img)
4957 heuristically. Value is non-zero if successful. */ 4810 heuristically. Value is non-zero if successful. */
4958 4811
4959static int 4812static int
4960x_build_heuristic_mask (f, img, how) 4813x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
4961 struct frame *f;
4962 struct image *img;
4963 Lisp_Object how;
4964{ 4814{
4965 XImagePtr_or_DC ximg; 4815 XImagePtr_or_DC ximg;
4966#ifndef HAVE_NTGUI 4816#ifndef HAVE_NTGUI
@@ -5146,8 +4996,7 @@ static struct image_type pbm_type =
5146/* Return non-zero if OBJECT is a valid PBM image specification. */ 4996/* Return non-zero if OBJECT is a valid PBM image specification. */
5147 4997
5148static int 4998static int
5149pbm_image_p (object) 4999pbm_image_p (Lisp_Object object)
5150 Lisp_Object object;
5151{ 5000{
5152 struct image_keyword fmt[PBM_LAST]; 5001 struct image_keyword fmt[PBM_LAST];
5153 5002
@@ -5166,8 +5015,7 @@ pbm_image_p (object)
5166 end of input. */ 5015 end of input. */
5167 5016
5168static int 5017static int
5169pbm_scan_number (s, end) 5018pbm_scan_number (unsigned char **s, unsigned char *end)
5170 unsigned char **s, *end;
5171{ 5019{
5172 int c = 0, val = -1; 5020 int c = 0, val = -1;
5173 5021
@@ -5242,9 +5090,7 @@ pbm_read_file (file, size)
5242/* Load PBM image IMG for use on frame F. */ 5090/* Load PBM image IMG for use on frame F. */
5243 5091
5244static int 5092static int
5245pbm_load (f, img) 5093pbm_load (struct frame *f, struct image *img)
5246 struct frame *f;
5247 struct image *img;
5248{ 5094{
5249 int raw_p, x, y; 5095 int raw_p, x, y;
5250 int width, height, max_color_idx = 0; 5096 int width, height, max_color_idx = 0;
@@ -5566,8 +5412,7 @@ static struct image_type png_type =
5566/* Return non-zero if OBJECT is a valid PNG image specification. */ 5412/* Return non-zero if OBJECT is a valid PNG image specification. */
5567 5413
5568static int 5414static int
5569png_image_p (object) 5415png_image_p (Lisp_Object object)
5570 Lisp_Object object;
5571{ 5416{
5572 struct image_keyword fmt[PNG_LAST]; 5417 struct image_keyword fmt[PNG_LAST];
5573 bcopy (png_format, fmt, sizeof fmt); 5418 bcopy (png_format, fmt, sizeof fmt);
@@ -5671,9 +5516,7 @@ init_png_functions (Lisp_Object libraries)
5671 is initialized. */ 5516 is initialized. */
5672 5517
5673static void 5518static void
5674my_png_error (png_ptr, msg) 5519my_png_error (png_struct *png_ptr, const char *msg)
5675 png_struct *png_ptr;
5676 char *msg;
5677{ 5520{
5678 xassert (png_ptr != NULL); 5521 xassert (png_ptr != NULL);
5679 image_error ("PNG error: %s", build_string (msg), Qnil); 5522 image_error ("PNG error: %s", build_string (msg), Qnil);
@@ -5682,9 +5525,7 @@ my_png_error (png_ptr, msg)
5682 5525
5683 5526
5684static void 5527static void
5685my_png_warning (png_ptr, msg) 5528my_png_warning (png_struct *png_ptr, const char *msg)
5686 png_struct *png_ptr;
5687 char *msg;
5688{ 5529{
5689 xassert (png_ptr != NULL); 5530 xassert (png_ptr != NULL);
5690 image_error ("PNG warning: %s", build_string (msg), Qnil); 5531 image_error ("PNG warning: %s", build_string (msg), Qnil);
@@ -5705,10 +5546,7 @@ struct png_memory_storage
5705 bytes from the input to DATA. */ 5546 bytes from the input to DATA. */
5706 5547
5707static void 5548static void
5708png_read_from_memory (png_ptr, data, length) 5549png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length)
5709 png_structp png_ptr;
5710 png_bytep data;
5711 png_size_t length;
5712{ 5550{
5713 struct png_memory_storage *tbr 5551 struct png_memory_storage *tbr
5714 = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr); 5552 = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr);
@@ -5726,10 +5564,7 @@ png_read_from_memory (png_ptr, data, length)
5726 bytes from the input to DATA. */ 5564 bytes from the input to DATA. */
5727 5565
5728static void 5566static void
5729png_read_from_file (png_ptr, data, length) 5567png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
5730 png_structp png_ptr;
5731 png_bytep data;
5732 png_size_t length;
5733{ 5568{
5734 FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr); 5569 FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr);
5735 5570
@@ -5742,9 +5577,7 @@ png_read_from_file (png_ptr, data, length)
5742 successful. */ 5577 successful. */
5743 5578
5744static int 5579static int
5745png_load (f, img) 5580png_load (struct frame *f, struct image *img)
5746 struct frame *f;
5747 struct image *img;
5748{ 5581{
5749 Lisp_Object file, specified_file; 5582 Lisp_Object file, specified_file;
5750 Lisp_Object specified_data; 5583 Lisp_Object specified_data;
@@ -6168,8 +6001,7 @@ static struct image_type jpeg_type =
6168/* Return non-zero if OBJECT is a valid JPEG image specification. */ 6001/* Return non-zero if OBJECT is a valid JPEG image specification. */
6169 6002
6170static int 6003static int
6171jpeg_image_p (object) 6004jpeg_image_p (Lisp_Object object)
6172 Lisp_Object object;
6173{ 6005{
6174 struct image_keyword fmt[JPEG_LAST]; 6006 struct image_keyword fmt[JPEG_LAST];
6175 6007
@@ -6268,8 +6100,7 @@ struct my_jpeg_error_mgr
6268 6100
6269 6101
6270static void 6102static void
6271my_error_exit (cinfo) 6103my_error_exit (j_common_ptr cinfo)
6272 j_common_ptr cinfo;
6273{ 6104{
6274 struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; 6105 struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
6275 longjmp (mgr->setjmp_buffer, 1); 6106 longjmp (mgr->setjmp_buffer, 1);
@@ -6281,8 +6112,7 @@ my_error_exit (cinfo)
6281 libjpeg.doc from the JPEG lib distribution. */ 6112 libjpeg.doc from the JPEG lib distribution. */
6282 6113
6283static void 6114static void
6284our_common_init_source (cinfo) 6115our_common_init_source (j_decompress_ptr cinfo)
6285 j_decompress_ptr cinfo;
6286{ 6116{
6287} 6117}
6288 6118
@@ -6291,8 +6121,7 @@ our_common_init_source (cinfo)
6291 jpeg_finish_decompress() after all data has been processed. */ 6121 jpeg_finish_decompress() after all data has been processed. */
6292 6122
6293static void 6123static void
6294our_common_term_source (cinfo) 6124our_common_term_source (j_decompress_ptr cinfo)
6295 j_decompress_ptr cinfo;
6296{ 6125{
6297} 6126}
6298 6127
@@ -6304,8 +6133,7 @@ our_common_term_source (cinfo)
6304static JOCTET our_memory_buffer[2]; 6133static JOCTET our_memory_buffer[2];
6305 6134
6306static boolean 6135static boolean
6307our_memory_fill_input_buffer (cinfo) 6136our_memory_fill_input_buffer (j_decompress_ptr cinfo)
6308 j_decompress_ptr cinfo;
6309{ 6137{
6310 /* Insert a fake EOI marker. */ 6138 /* Insert a fake EOI marker. */
6311 struct jpeg_source_mgr *src = cinfo->src; 6139 struct jpeg_source_mgr *src = cinfo->src;
@@ -6323,9 +6151,7 @@ our_memory_fill_input_buffer (cinfo)
6323 is the JPEG data source manager. */ 6151 is the JPEG data source manager. */
6324 6152
6325static void 6153static void
6326our_memory_skip_input_data (cinfo, num_bytes) 6154our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
6327 j_decompress_ptr cinfo;
6328 long num_bytes;
6329{ 6155{
6330 struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; 6156 struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src;
6331 6157
@@ -6345,10 +6171,7 @@ our_memory_skip_input_data (cinfo, num_bytes)
6345 reading the image. */ 6171 reading the image. */
6346 6172
6347static void 6173static void
6348jpeg_memory_src (cinfo, data, len) 6174jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len)
6349 j_decompress_ptr cinfo;
6350 JOCTET *data;
6351 unsigned int len;
6352{ 6175{
6353 struct jpeg_source_mgr *src; 6176 struct jpeg_source_mgr *src;
6354 6177
@@ -6391,8 +6214,7 @@ struct jpeg_stdio_mgr
6391 whenever more data is needed. The data is read from a FILE *. */ 6214 whenever more data is needed. The data is read from a FILE *. */
6392 6215
6393static boolean 6216static boolean
6394our_stdio_fill_input_buffer (cinfo) 6217our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
6395 j_decompress_ptr cinfo;
6396{ 6218{
6397 struct jpeg_stdio_mgr *src; 6219 struct jpeg_stdio_mgr *src;
6398 6220
@@ -6423,9 +6245,7 @@ our_stdio_fill_input_buffer (cinfo)
6423 is the JPEG data source manager. */ 6245 is the JPEG data source manager. */
6424 6246
6425static void 6247static void
6426our_stdio_skip_input_data (cinfo, num_bytes) 6248our_stdio_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
6427 j_decompress_ptr cinfo;
6428 long num_bytes;
6429{ 6249{
6430 struct jpeg_stdio_mgr *src; 6250 struct jpeg_stdio_mgr *src;
6431 src = (struct jpeg_stdio_mgr *) cinfo->src; 6251 src = (struct jpeg_stdio_mgr *) cinfo->src;
@@ -6455,9 +6275,7 @@ our_stdio_skip_input_data (cinfo, num_bytes)
6455 reading the image. */ 6275 reading the image. */
6456 6276
6457static void 6277static void
6458jpeg_file_src (cinfo, fp) 6278jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
6459 j_decompress_ptr cinfo;
6460 FILE *fp;
6461{ 6279{
6462 struct jpeg_stdio_mgr *src; 6280 struct jpeg_stdio_mgr *src;
6463 6281
@@ -6491,9 +6309,7 @@ jpeg_file_src (cinfo, fp)
6491 from the JPEG lib. */ 6309 from the JPEG lib. */
6492 6310
6493static int 6311static int
6494jpeg_load (f, img) 6312jpeg_load (struct frame *f, struct image *img)
6495 struct frame *f;
6496 struct image *img;
6497{ 6313{
6498 struct jpeg_decompress_struct cinfo; 6314 struct jpeg_decompress_struct cinfo;
6499 struct my_jpeg_error_mgr mgr; 6315 struct my_jpeg_error_mgr mgr;
@@ -6742,8 +6558,7 @@ static struct image_type tiff_type =
6742/* Return non-zero if OBJECT is a valid TIFF image specification. */ 6558/* Return non-zero if OBJECT is a valid TIFF image specification. */
6743 6559
6744static int 6560static int
6745tiff_image_p (object) 6561tiff_image_p (Lisp_Object object)
6746 Lisp_Object object;
6747{ 6562{
6748 struct image_keyword fmt[TIFF_LAST]; 6563 struct image_keyword fmt[TIFF_LAST];
6749 bcopy (tiff_format, fmt, sizeof fmt); 6564 bcopy (tiff_format, fmt, sizeof fmt);
@@ -6823,10 +6638,7 @@ typedef struct
6823tiff_memory_source; 6638tiff_memory_source;
6824 6639
6825static size_t 6640static size_t
6826tiff_read_from_memory (data, buf, size) 6641tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size)
6827 thandle_t data;
6828 tdata_t buf;
6829 tsize_t size;
6830{ 6642{
6831 tiff_memory_source *src = (tiff_memory_source *) data; 6643 tiff_memory_source *src = (tiff_memory_source *) data;
6832 6644
@@ -6838,19 +6650,13 @@ tiff_read_from_memory (data, buf, size)
6838} 6650}
6839 6651
6840static size_t 6652static size_t
6841tiff_write_from_memory (data, buf, size) 6653tiff_write_from_memory (thandle_t data, tdata_t buf, tsize_t size)
6842 thandle_t data;
6843 tdata_t buf;
6844 tsize_t size;
6845{ 6654{
6846 return (size_t) -1; 6655 return (size_t) -1;
6847} 6656}
6848 6657
6849static toff_t 6658static toff_t
6850tiff_seek_in_memory (data, off, whence) 6659tiff_seek_in_memory (thandle_t data, toff_t off, int whence)
6851 thandle_t data;
6852 toff_t off;
6853 int whence;
6854{ 6660{
6855 tiff_memory_source *src = (tiff_memory_source *) data; 6661 tiff_memory_source *src = (tiff_memory_source *) data;
6856 int idx; 6662 int idx;
@@ -6881,44 +6687,34 @@ tiff_seek_in_memory (data, off, whence)
6881} 6687}
6882 6688
6883static int 6689static int
6884tiff_close_memory (data) 6690tiff_close_memory (thandle_t data)
6885 thandle_t data;
6886{ 6691{
6887 /* NOOP */ 6692 /* NOOP */
6888 return 0; 6693 return 0;
6889} 6694}
6890 6695
6891static int 6696static int
6892tiff_mmap_memory (data, pbase, psize) 6697tiff_mmap_memory (thandle_t data, tdata_t *pbase, toff_t *psize)
6893 thandle_t data;
6894 tdata_t *pbase;
6895 toff_t *psize;
6896{ 6698{
6897 /* It is already _IN_ memory. */ 6699 /* It is already _IN_ memory. */
6898 return 0; 6700 return 0;
6899} 6701}
6900 6702
6901static void 6703static void
6902tiff_unmap_memory (data, base, size) 6704tiff_unmap_memory (thandle_t data, tdata_t base, toff_t size)
6903 thandle_t data;
6904 tdata_t base;
6905 toff_t size;
6906{ 6705{
6907 /* We don't need to do this. */ 6706 /* We don't need to do this. */
6908} 6707}
6909 6708
6910static toff_t 6709static toff_t
6911tiff_size_of_memory (data) 6710tiff_size_of_memory (thandle_t data)
6912 thandle_t data;
6913{ 6711{
6914 return ((tiff_memory_source *) data)->len; 6712 return ((tiff_memory_source *) data)->len;
6915} 6713}
6916 6714
6917 6715
6918static void 6716static void
6919tiff_error_handler (title, format, ap) 6717tiff_error_handler (const char *title, const char *format, va_list ap)
6920 const char *title, *format;
6921 va_list ap;
6922{ 6718{
6923 char buf[512]; 6719 char buf[512];
6924 int len; 6720 int len;
@@ -6930,9 +6726,7 @@ tiff_error_handler (title, format, ap)
6930 6726
6931 6727
6932static void 6728static void
6933tiff_warning_handler (title, format, ap) 6729tiff_warning_handler (const char *title, const char *format, va_list ap)
6934 const char *title, *format;
6935 va_list ap;
6936{ 6730{
6937 char buf[512]; 6731 char buf[512];
6938 int len; 6732 int len;
@@ -6947,9 +6741,7 @@ tiff_warning_handler (title, format, ap)
6947 successful. */ 6741 successful. */
6948 6742
6949static int 6743static int
6950tiff_load (f, img) 6744tiff_load (struct frame *f, struct image *img)
6951 struct frame *f;
6952 struct image *img;
6953{ 6745{
6954 Lisp_Object file, specified_file; 6746 Lisp_Object file, specified_file;
6955 Lisp_Object specified_data; 6747 Lisp_Object specified_data;
@@ -7194,9 +6986,7 @@ static struct image_type gif_type =
7194/* Free X resources of GIF image IMG which is used on frame F. */ 6986/* Free X resources of GIF image IMG which is used on frame F. */
7195 6987
7196static void 6988static void
7197gif_clear_image (f, img) 6989gif_clear_image (struct frame *f, struct image *img)
7198 struct frame *f;
7199 struct image *img;
7200{ 6990{
7201 /* IMG->data.ptr_val may contain metadata with extension data. */ 6991 /* IMG->data.ptr_val may contain metadata with extension data. */
7202 img->data.lisp_val = Qnil; 6992 img->data.lisp_val = Qnil;
@@ -7206,8 +6996,7 @@ gif_clear_image (f, img)
7206/* Return non-zero if OBJECT is a valid GIF image specification. */ 6996/* Return non-zero if OBJECT is a valid GIF image specification. */
7207 6997
7208static int 6998static int
7209gif_image_p (object) 6999gif_image_p (Lisp_Object object)
7210 Lisp_Object object;
7211{ 7000{
7212 struct image_keyword fmt[GIF_LAST]; 7001 struct image_keyword fmt[GIF_LAST];
7213 bcopy (gif_format, fmt, sizeof fmt); 7002 bcopy (gif_format, fmt, sizeof fmt);
@@ -7290,10 +7079,7 @@ gif_memory_source;
7290static gif_memory_source *current_gif_memory_src; 7079static gif_memory_source *current_gif_memory_src;
7291 7080
7292static int 7081static int
7293gif_read_from_memory (file, buf, len) 7082gif_read_from_memory (GifFileType *file, GifByteType *buf, int len)
7294 GifFileType *file;
7295 GifByteType *buf;
7296 int len;
7297{ 7083{
7298 gif_memory_source *src = current_gif_memory_src; 7084 gif_memory_source *src = current_gif_memory_src;
7299 7085
@@ -7313,9 +7099,7 @@ static const int interlace_start[] = {0, 4, 2, 1};
7313static const int interlace_increment[] = {8, 8, 4, 2}; 7099static const int interlace_increment[] = {8, 8, 4, 2};
7314 7100
7315static int 7101static int
7316gif_load (f, img) 7102gif_load (struct frame *f, struct image *img)
7317 struct frame *f;
7318 struct image *img;
7319{ 7103{
7320 Lisp_Object file, specified_file; 7104 Lisp_Object file, specified_file;
7321 Lisp_Object specified_data; 7105 Lisp_Object specified_data;
@@ -7645,8 +7429,7 @@ static struct image_type svg_type =
7645 identify the SVG format. */ 7429 identify the SVG format. */
7646 7430
7647static int 7431static int
7648svg_image_p (object) 7432svg_image_p (Lisp_Object object)
7649 Lisp_Object object;
7650{ 7433{
7651 struct image_keyword fmt[SVG_LAST]; 7434 struct image_keyword fmt[SVG_LAST];
7652 bcopy (svg_format, fmt, sizeof fmt); 7435 bcopy (svg_format, fmt, sizeof fmt);
@@ -7748,9 +7531,7 @@ init_svg_functions (Lisp_Object libraries)
7748 the prototype thus needs to be compatible with that structure. */ 7531 the prototype thus needs to be compatible with that structure. */
7749 7532
7750static int 7533static int
7751svg_load (f, img) 7534svg_load (struct frame *f, struct image *img)
7752 struct frame *f;
7753 struct image *img;
7754{ 7535{
7755 int success_p = 0; 7536 int success_p = 0;
7756 Lisp_Object file_name; 7537 Lisp_Object file_name;
@@ -7807,15 +7588,10 @@ svg_load (f, img)
7807 7588
7808 Returns non-zero when successful. */ 7589 Returns non-zero when successful. */
7809static int 7590static int
7810svg_load_image (f, img, contents, size) 7591svg_load_image (struct frame *f, /* Pointer to emacs frame structure. */
7811 /* Pointer to emacs frame structure. */ 7592 struct image *img, /* Pointer to emacs image structure. */
7812 struct frame *f; 7593 unsigned char *contents, /* String containing the SVG XML data to be parsed. */
7813 /* Pointer to emacs image structure. */ 7594 unsigned int size) /* Size of data in bytes. */
7814 struct image *img;
7815 /* String containing the SVG XML data to be parsed. */
7816 unsigned char *contents;
7817 /* Size of data in bytes. */
7818 unsigned int size;
7819{ 7595{
7820 RsvgHandle *rsvg_handle; 7596 RsvgHandle *rsvg_handle;
7821 RsvgDimensionData dimension_data; 7597 RsvgDimensionData dimension_data;
@@ -8045,9 +7821,7 @@ static struct image_type gs_type =
8045/* Free X resources of Ghostscript image IMG which is used on frame F. */ 7821/* Free X resources of Ghostscript image IMG which is used on frame F. */
8046 7822
8047static void 7823static void
8048gs_clear_image (f, img) 7824gs_clear_image (struct frame *f, struct image *img)
8049 struct frame *f;
8050 struct image *img;
8051{ 7825{
8052 /* IMG->data.ptr_val may contain a recorded colormap. */ 7826 /* IMG->data.ptr_val may contain a recorded colormap. */
8053 xfree (img->data.ptr_val); 7827 xfree (img->data.ptr_val);
@@ -8059,8 +7833,7 @@ gs_clear_image (f, img)
8059 specification. */ 7833 specification. */
8060 7834
8061static int 7835static int
8062gs_image_p (object) 7836gs_image_p (Lisp_Object object)
8063 Lisp_Object object;
8064{ 7837{
8065 struct image_keyword fmt[GS_LAST]; 7838 struct image_keyword fmt[GS_LAST];
8066 Lisp_Object tem; 7839 Lisp_Object tem;
@@ -8100,9 +7873,7 @@ gs_image_p (object)
8100 if successful. */ 7873 if successful. */
8101 7874
8102static int 7875static int
8103gs_load (f, img) 7876gs_load (struct frame *f, struct image *img)
8104 struct frame *f;
8105 struct image *img;
8106{ 7877{
8107 char buffer[100]; 7878 char buffer[100];
8108 Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; 7879 Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width;
@@ -8180,9 +7951,7 @@ gs_load (f, img)
8180 telling Emacs that Ghostscript has finished drawing. */ 7951 telling Emacs that Ghostscript has finished drawing. */
8181 7952
8182void 7953void
8183x_kill_gs_process (pixmap, f) 7954x_kill_gs_process (Pixmap pixmap, struct frame *f)
8184 Pixmap pixmap;
8185 struct frame *f;
8186{ 7955{
8187 struct image_cache *c = FRAME_IMAGE_CACHE (f); 7956 struct image_cache *c = FRAME_IMAGE_CACHE (f);
8188 int class, i; 7957 int class, i;
@@ -8375,7 +8144,7 @@ of `image-library-alist', which see). */)
8375} 8144}
8376 8145
8377void 8146void
8378syms_of_image () 8147syms_of_image (void)
8379{ 8148{
8380 extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ 8149 extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */
8381 8150
@@ -8560,7 +8329,7 @@ The function `clear-image-cache' disregards this variable. */);
8560} 8329}
8561 8330
8562void 8331void
8563init_image () 8332init_image (void)
8564{ 8333{
8565} 8334}
8566 8335
diff --git a/src/keyboard.c b/src/keyboard.c
index d7e01af0bc4..069ff4993d9 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -521,17 +521,17 @@ extern Lisp_Object Qleft_margin, Qright_margin;
521extern Lisp_Object Qleft_fringe, Qright_fringe; 521extern Lisp_Object Qleft_fringe, Qright_fringe;
522extern Lisp_Object QCmap; 522extern Lisp_Object QCmap;
523 523
524Lisp_Object recursive_edit_unwind (), command_loop (); 524Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void);
525Lisp_Object Fthis_command_keys (); 525Lisp_Object Fthis_command_keys (void);
526Lisp_Object Qextended_command_history; 526Lisp_Object Qextended_command_history;
527EMACS_TIME timer_check (); 527EMACS_TIME timer_check (int do_it_now);
528 528
529extern Lisp_Object Vhistory_length, Vtranslation_table_for_input; 529extern Lisp_Object Vhistory_length, Vtranslation_table_for_input;
530 530
531extern char *x_get_keysym_name (); 531extern char *x_get_keysym_name ();
532 532
533static void record_menu_key (); 533static void record_menu_key (Lisp_Object c);
534static int echo_length (); 534static int echo_length (void);
535 535
536Lisp_Object Qpolling_period; 536Lisp_Object Qpolling_period;
537 537
@@ -618,7 +618,6 @@ static void get_input_pending (int *, int);
618static int readable_events (int); 618static int readable_events (int);
619static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *, 619static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *,
620 Lisp_Object, int *); 620 Lisp_Object, int *);
621static Lisp_Object read_char_x_menu_prompt ();
622static Lisp_Object read_char_minibuf_menu_prompt (int, int, 621static Lisp_Object read_char_minibuf_menu_prompt (int, int,
623 Lisp_Object *); 622 Lisp_Object *);
624static Lisp_Object make_lispy_event (struct input_event *); 623static Lisp_Object make_lispy_event (struct input_event *);
@@ -633,7 +632,6 @@ static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object,
633 Lisp_Object *, unsigned); 632 Lisp_Object *, unsigned);
634static Lisp_Object make_lispy_switch_frame (Lisp_Object); 633static Lisp_Object make_lispy_switch_frame (Lisp_Object);
635static void save_getcjmp (jmp_buf); 634static void save_getcjmp (jmp_buf);
636static void save_getcjmp ();
637static void restore_getcjmp (jmp_buf); 635static void restore_getcjmp (jmp_buf);
638static Lisp_Object apply_modifiers (int, Lisp_Object); 636static Lisp_Object apply_modifiers (int, Lisp_Object);
639static void clear_event (struct input_event *); 637static void clear_event (struct input_event *);
@@ -658,8 +656,7 @@ extern Lisp_Object Qidentity, Qonly;
658 Also start echoing. */ 656 Also start echoing. */
659 657
660void 658void
661echo_prompt (str) 659echo_prompt (Lisp_Object str)
662 Lisp_Object str;
663{ 660{
664 current_kboard->echo_string = str; 661 current_kboard->echo_string = str;
665 current_kboard->echo_after_prompt = SCHARS (str); 662 current_kboard->echo_after_prompt = SCHARS (str);
@@ -671,8 +668,7 @@ echo_prompt (str)
671 jazz), or a symbol, whose name is printed. */ 668 jazz), or a symbol, whose name is printed. */
672 669
673void 670void
674echo_char (c) 671echo_char (Lisp_Object c)
675 Lisp_Object c;
676{ 672{
677 if (current_kboard->immediate_echo) 673 if (current_kboard->immediate_echo)
678 { 674 {
@@ -759,7 +755,7 @@ echo_char (c)
759 empty, so that it serves as a mini-prompt for the very next character. */ 755 empty, so that it serves as a mini-prompt for the very next character. */
760 756
761void 757void
762echo_dash () 758echo_dash (void)
763{ 759{
764 /* Do nothing if not echoing at all. */ 760 /* Do nothing if not echoing at all. */
765 if (NILP (current_kboard->echo_string)) 761 if (NILP (current_kboard->echo_string))
@@ -800,7 +796,7 @@ echo_dash ()
800 doing so. */ 796 doing so. */
801 797
802void 798void
803echo_now () 799echo_now (void)
804{ 800{
805 if (!current_kboard->immediate_echo) 801 if (!current_kboard->immediate_echo)
806 { 802 {
@@ -850,7 +846,7 @@ echo_now ()
850/* Turn off echoing, for the start of a new command. */ 846/* Turn off echoing, for the start of a new command. */
851 847
852void 848void
853cancel_echoing () 849cancel_echoing (void)
854{ 850{
855 current_kboard->immediate_echo = 0; 851 current_kboard->immediate_echo = 0;
856 current_kboard->echo_after_prompt = -1; 852 current_kboard->echo_after_prompt = -1;
@@ -863,7 +859,7 @@ cancel_echoing ()
863/* Return the length of the current echo string. */ 859/* Return the length of the current echo string. */
864 860
865static int 861static int
866echo_length () 862echo_length (void)
867{ 863{
868 return (STRINGP (current_kboard->echo_string) 864 return (STRINGP (current_kboard->echo_string)
869 ? SCHARS (current_kboard->echo_string) 865 ? SCHARS (current_kboard->echo_string)
@@ -875,8 +871,7 @@ echo_length ()
875 switches frames while entering a key sequence. */ 871 switches frames while entering a key sequence. */
876 872
877static void 873static void
878echo_truncate (nchars) 874echo_truncate (int nchars)
879 int nchars;
880{ 875{
881 if (STRINGP (current_kboard->echo_string)) 876 if (STRINGP (current_kboard->echo_string))
882 current_kboard->echo_string 877 current_kboard->echo_string
@@ -888,8 +883,7 @@ echo_truncate (nchars)
888 883
889/* Functions for manipulating this_command_keys. */ 884/* Functions for manipulating this_command_keys. */
890static void 885static void
891add_command_key (key) 886add_command_key (Lisp_Object key)
892 Lisp_Object key;
893{ 887{
894#if 0 /* Not needed after we made Freset_this_command_lengths 888#if 0 /* Not needed after we made Freset_this_command_lengths
895 do the job immediately. */ 889 do the job immediately. */
@@ -916,7 +910,7 @@ add_command_key (key)
916 910
917 911
918Lisp_Object 912Lisp_Object
919recursive_edit_1 () 913recursive_edit_1 (void)
920{ 914{
921 int count = SPECPDL_INDEX (); 915 int count = SPECPDL_INDEX ();
922 Lisp_Object val; 916 Lisp_Object val;
@@ -961,7 +955,7 @@ recursive_edit_1 ()
961/* When an auto-save happens, record the "time", and don't do again soon. */ 955/* When an auto-save happens, record the "time", and don't do again soon. */
962 956
963void 957void
964record_auto_save () 958record_auto_save (void)
965{ 959{
966 last_auto_save = num_nonmacro_input_events; 960 last_auto_save = num_nonmacro_input_events;
967} 961}
@@ -969,7 +963,7 @@ record_auto_save ()
969/* Make an auto save happen as soon as possible at command level. */ 963/* Make an auto save happen as soon as possible at command level. */
970 964
971void 965void
972force_auto_save_soon () 966force_auto_save_soon (void)
973{ 967{
974 last_auto_save = - auto_save_interval - 1; 968 last_auto_save = - auto_save_interval - 1;
975 969
@@ -1014,8 +1008,7 @@ This function is called by the editor initialization to begin editing. */)
1014} 1008}
1015 1009
1016Lisp_Object 1010Lisp_Object
1017recursive_edit_unwind (buffer) 1011recursive_edit_unwind (Lisp_Object buffer)
1018 Lisp_Object buffer;
1019{ 1012{
1020 if (BUFFERP (buffer)) 1013 if (BUFFERP (buffer))
1021 Fset_buffer (buffer); 1014 Fset_buffer (buffer);
@@ -1060,8 +1053,7 @@ single_kboard_state ()
1060 get out of it. */ 1053 get out of it. */
1061 1054
1062void 1055void
1063not_single_kboard_state (kboard) 1056not_single_kboard_state (KBOARD *kboard)
1064 KBOARD *kboard;
1065{ 1057{
1066 if (kboard == current_kboard) 1058 if (kboard == current_kboard)
1067 single_kboard = 0; 1059 single_kboard = 0;
@@ -1080,8 +1072,7 @@ struct kboard_stack
1080static struct kboard_stack *kboard_stack; 1072static struct kboard_stack *kboard_stack;
1081 1073
1082void 1074void
1083push_kboard (k) 1075push_kboard (struct kboard *k)
1084 struct kboard *k;
1085{ 1076{
1086 struct kboard_stack *p 1077 struct kboard_stack *p
1087 = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack)); 1078 = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack));
@@ -1094,7 +1085,7 @@ push_kboard (k)
1094} 1085}
1095 1086
1096void 1087void
1097pop_kboard () 1088pop_kboard (void)
1098{ 1089{
1099 struct terminal *t; 1090 struct terminal *t;
1100 struct kboard_stack *p = kboard_stack; 1091 struct kboard_stack *p = kboard_stack;
@@ -1129,8 +1120,7 @@ pop_kboard ()
1129 locked, then this function will throw an errow. */ 1120 locked, then this function will throw an errow. */
1130 1121
1131void 1122void
1132temporarily_switch_to_single_kboard (f) 1123temporarily_switch_to_single_kboard (struct frame *f)
1133 struct frame *f;
1134{ 1124{
1135 int was_locked = single_kboard; 1125 int was_locked = single_kboard;
1136 if (was_locked) 1126 if (was_locked)
@@ -1170,8 +1160,7 @@ record_single_kboard_state ()
1170#endif 1160#endif
1171 1161
1172static Lisp_Object 1162static Lisp_Object
1173restore_kboard_configuration (was_locked) 1163restore_kboard_configuration (Lisp_Object was_locked)
1174 Lisp_Object was_locked;
1175{ 1164{
1176 if (NILP (was_locked)) 1165 if (NILP (was_locked))
1177 single_kboard = 0; 1166 single_kboard = 0;
@@ -1192,8 +1181,7 @@ restore_kboard_configuration (was_locked)
1192 by printing an error message and returning to the editor command loop. */ 1181 by printing an error message and returning to the editor command loop. */
1193 1182
1194Lisp_Object 1183Lisp_Object
1195cmd_error (data) 1184cmd_error (Lisp_Object data)
1196 Lisp_Object data;
1197{ 1185{
1198 Lisp_Object old_level, old_length; 1186 Lisp_Object old_level, old_length;
1199 char macroerror[50]; 1187 char macroerror[50];
@@ -1251,9 +1239,7 @@ cmd_error (data)
1251 string. */ 1239 string. */
1252 1240
1253void 1241void
1254cmd_error_internal (data, context) 1242cmd_error_internal (Lisp_Object data, char *context)
1255 Lisp_Object data;
1256 char *context;
1257{ 1243{
1258 struct frame *sf = SELECTED_FRAME (); 1244 struct frame *sf = SELECTED_FRAME ();
1259 1245
@@ -1304,16 +1290,16 @@ cmd_error_internal (data, context)
1304 Vsignaling_function = Qnil; 1290 Vsignaling_function = Qnil;
1305} 1291}
1306 1292
1307Lisp_Object command_loop_1 (); 1293Lisp_Object command_loop_1 (void);
1308Lisp_Object command_loop_2 (); 1294Lisp_Object command_loop_2 (Lisp_Object);
1309Lisp_Object top_level_1 (); 1295Lisp_Object top_level_1 (Lisp_Object);
1310 1296
1311/* Entry to editor-command-loop. 1297/* Entry to editor-command-loop.
1312 This level has the catches for exiting/returning to editor command loop. 1298 This level has the catches for exiting/returning to editor command loop.
1313 It returns nil to exit recursive edit, t to abort it. */ 1299 It returns nil to exit recursive edit, t to abort it. */
1314 1300
1315Lisp_Object 1301Lisp_Object
1316command_loop () 1302command_loop (void)
1317{ 1303{
1318 if (command_loop_level > 0 || minibuf_level > 0) 1304 if (command_loop_level > 0 || minibuf_level > 0)
1319 { 1305 {
@@ -1348,7 +1334,7 @@ command_loop ()
1348 returned due to end of file (or end of kbd macro). */ 1334 returned due to end of file (or end of kbd macro). */
1349 1335
1350Lisp_Object 1336Lisp_Object
1351command_loop_2 () 1337command_loop_2 (Lisp_Object ignore)
1352{ 1338{
1353 register Lisp_Object val; 1339 register Lisp_Object val;
1354 1340
@@ -1360,13 +1346,13 @@ command_loop_2 ()
1360} 1346}
1361 1347
1362Lisp_Object 1348Lisp_Object
1363top_level_2 () 1349top_level_2 (void)
1364{ 1350{
1365 return Feval (Vtop_level); 1351 return Feval (Vtop_level);
1366} 1352}
1367 1353
1368Lisp_Object 1354Lisp_Object
1369top_level_1 () 1355top_level_1 (Lisp_Object ignore)
1370{ 1356{
1371 /* On entry to the outer level, run the startup file */ 1357 /* On entry to the outer level, run the startup file */
1372 if (!NILP (Vtop_level)) 1358 if (!NILP (Vtop_level))
@@ -1424,8 +1410,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
1424 of this function. */ 1410 of this function. */
1425 1411
1426static Lisp_Object 1412static Lisp_Object
1427tracking_off (old_value) 1413tracking_off (Lisp_Object old_value)
1428 Lisp_Object old_value;
1429{ 1414{
1430 do_mouse_tracking = old_value; 1415 do_mouse_tracking = old_value;
1431 if (NILP (old_value)) 1416 if (NILP (old_value))
@@ -1475,7 +1460,7 @@ usage: (track-mouse BODY...) */)
1475int ignore_mouse_drag_p; 1460int ignore_mouse_drag_p;
1476 1461
1477static FRAME_PTR 1462static FRAME_PTR
1478some_mouse_moved () 1463some_mouse_moved (void)
1479{ 1464{
1480 Lisp_Object tail, frame; 1465 Lisp_Object tail, frame;
1481 1466
@@ -1508,8 +1493,7 @@ static void adjust_point_for_property (int, int);
1508 ARG is not used. */ 1493 ARG is not used. */
1509#ifdef HAVE_WINDOW_SYSTEM 1494#ifdef HAVE_WINDOW_SYSTEM
1510static Lisp_Object 1495static Lisp_Object
1511cancel_hourglass_unwind (arg) 1496cancel_hourglass_unwind (Lisp_Object arg)
1512 Lisp_Object arg;
1513{ 1497{
1514 cancel_hourglass (); 1498 cancel_hourglass ();
1515 return Qnil; 1499 return Qnil;
@@ -1517,7 +1501,7 @@ cancel_hourglass_unwind (arg)
1517#endif 1501#endif
1518 1502
1519Lisp_Object 1503Lisp_Object
1520command_loop_1 () 1504command_loop_1 (void)
1521{ 1505{
1522 Lisp_Object cmd; 1506 Lisp_Object cmd;
1523 Lisp_Object keybuf[30]; 1507 Lisp_Object keybuf[30];
@@ -1865,9 +1849,7 @@ extern Lisp_Object Qafter_string, Qbefore_string;
1865extern Lisp_Object get_pos_property (Lisp_Object, Lisp_Object, Lisp_Object); 1849extern Lisp_Object get_pos_property (Lisp_Object, Lisp_Object, Lisp_Object);
1866 1850
1867static void 1851static void
1868adjust_point_for_property (last_pt, modified) 1852adjust_point_for_property (int last_pt, int modified)
1869 int last_pt;
1870 int modified;
1871{ 1853{
1872 EMACS_INT beg, end; 1854 EMACS_INT beg, end;
1873 Lisp_Object val, overlay, tmp; 1855 Lisp_Object val, overlay, tmp;
@@ -2017,8 +1999,7 @@ adjust_point_for_property (last_pt, modified)
2017/* Subroutine for safe_run_hooks: run the hook HOOK. */ 1999/* Subroutine for safe_run_hooks: run the hook HOOK. */
2018 2000
2019static Lisp_Object 2001static Lisp_Object
2020safe_run_hooks_1 (hook) 2002safe_run_hooks_1 (void)
2021 Lisp_Object hook;
2022{ 2003{
2023 if (NILP (Vrun_hooks)) 2004 if (NILP (Vrun_hooks))
2024 return Qnil; 2005 return Qnil;
@@ -2028,8 +2009,7 @@ safe_run_hooks_1 (hook)
2028/* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ 2009/* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */
2029 2010
2030static Lisp_Object 2011static Lisp_Object
2031safe_run_hooks_error (data) 2012safe_run_hooks_error (Lisp_Object data)
2032 Lisp_Object data;
2033{ 2013{
2034 Lisp_Object args[3]; 2014 Lisp_Object args[3];
2035 args[0] = build_string ("Error in %s: %s"); 2015 args[0] = build_string ("Error in %s: %s");
@@ -2044,8 +2024,7 @@ safe_run_hooks_error (data)
2044 to mysteriously evaporate. */ 2024 to mysteriously evaporate. */
2045 2025
2046void 2026void
2047safe_run_hooks (hook) 2027safe_run_hooks (Lisp_Object hook)
2048 Lisp_Object hook;
2049{ 2028{
2050 int count = SPECPDL_INDEX (); 2029 int count = SPECPDL_INDEX ();
2051 specbind (Qinhibit_quit, hook); 2030 specbind (Qinhibit_quit, hook);
@@ -2077,7 +2056,7 @@ struct atimer *poll_timer;
2077 there. */ 2056 there. */
2078 2057
2079void 2058void
2080poll_for_input_1 () 2059poll_for_input_1 (void)
2081{ 2060{
2082/* Tell ns_read_socket() it is being called asynchronously so it can avoid 2061/* Tell ns_read_socket() it is being called asynchronously so it can avoid
2083 doing anything dangerous. */ 2062 doing anything dangerous. */
@@ -2096,8 +2075,7 @@ poll_for_input_1 ()
2096 poll_timer. */ 2075 poll_timer. */
2097 2076
2098void 2077void
2099poll_for_input (timer) 2078poll_for_input (struct atimer *timer)
2100 struct atimer *timer;
2101{ 2079{
2102 if (poll_suppress_count == 0) 2080 if (poll_suppress_count == 0)
2103 { 2081 {
@@ -2116,7 +2094,7 @@ poll_for_input (timer)
2116 This function is called unconditionally from various places. */ 2094 This function is called unconditionally from various places. */
2117 2095
2118void 2096void
2119start_polling () 2097start_polling (void)
2120{ 2098{
2121#ifdef POLL_FOR_INPUT 2099#ifdef POLL_FOR_INPUT
2122 /* XXX This condition was (read_socket_hook && !interrupt_input), 2100 /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2153,7 +2131,7 @@ start_polling ()
2153/* Nonzero if we are using polling to handle input asynchronously. */ 2131/* Nonzero if we are using polling to handle input asynchronously. */
2154 2132
2155int 2133int
2156input_polling_used () 2134input_polling_used (void)
2157{ 2135{
2158#ifdef POLL_FOR_INPUT 2136#ifdef POLL_FOR_INPUT
2159 /* XXX This condition was (read_socket_hook && !interrupt_input), 2137 /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2168,7 +2146,7 @@ input_polling_used ()
2168/* Turn off polling. */ 2146/* Turn off polling. */
2169 2147
2170void 2148void
2171stop_polling () 2149stop_polling (void)
2172{ 2150{
2173#ifdef POLL_FOR_INPUT 2151#ifdef POLL_FOR_INPUT
2174 /* XXX This condition was (read_socket_hook && !interrupt_input), 2152 /* XXX This condition was (read_socket_hook && !interrupt_input),
@@ -2183,8 +2161,7 @@ stop_polling ()
2183 and start or stop polling accordingly. */ 2161 and start or stop polling accordingly. */
2184 2162
2185void 2163void
2186set_poll_suppress_count (count) 2164set_poll_suppress_count (int count)
2187 int count;
2188{ 2165{
2189#ifdef POLL_FOR_INPUT 2166#ifdef POLL_FOR_INPUT
2190 if (count == 0 && poll_suppress_count != 0) 2167 if (count == 0 && poll_suppress_count != 0)
@@ -2204,8 +2181,7 @@ set_poll_suppress_count (count)
2204 But don't decrease it. */ 2181 But don't decrease it. */
2205 2182
2206void 2183void
2207bind_polling_period (n) 2184bind_polling_period (int n)
2208 int n;
2209{ 2185{
2210#ifdef POLL_FOR_INPUT 2186#ifdef POLL_FOR_INPUT
2211 int new = polling_period; 2187 int new = polling_period;
@@ -2224,8 +2200,7 @@ bind_polling_period (n)
2224/* Apply the control modifier to CHARACTER. */ 2200/* Apply the control modifier to CHARACTER. */
2225 2201
2226int 2202int
2227make_ctrl_char (c) 2203make_ctrl_char (int c)
2228 int c;
2229{ 2204{
2230 /* Save the upper bits here. */ 2205 /* Save the upper bits here. */
2231 int upper = c & ~0177; 2206 int upper = c & ~0177;
@@ -2294,9 +2269,8 @@ make_ctrl_char (c)
2294 from X code running asynchronously. */ 2269 from X code running asynchronously. */
2295 2270
2296void 2271void
2297show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) 2272show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
2298 Lisp_Object help, window, object, pos; 2273 Lisp_Object pos, int ok_to_overwrite_keystroke_echo)
2299 int ok_to_overwrite_keystroke_echo;
2300{ 2274{
2301 if (!NILP (help) && !STRINGP (help)) 2275 if (!NILP (help) && !STRINGP (help))
2302 { 2276 {
@@ -2343,9 +2317,10 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo)
2343 2317
2344/* Input of single characters from keyboard */ 2318/* Input of single characters from keyboard */
2345 2319
2346Lisp_Object print_help (); 2320Lisp_Object print_help (Lisp_Object object);
2347static Lisp_Object kbd_buffer_get_event (); 2321static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu,
2348static void record_char (); 2322 struct timeval *end_time);
2323static void record_char (Lisp_Object c);
2349 2324
2350static Lisp_Object help_form_saved_window_configs; 2325static Lisp_Object help_form_saved_window_configs;
2351static Lisp_Object 2326static Lisp_Object
@@ -2394,13 +2369,8 @@ do { if (polling_stopped_here) start_polling (); \
2394 Value is t if we showed a menu and the user rejected it. */ 2369 Value is t if we showed a menu and the user rejected it. */
2395 2370
2396Lisp_Object 2371Lisp_Object
2397read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) 2372read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
2398 int commandflag; 2373 int *used_mouse_menu, struct timeval *end_time)
2399 int nmaps;
2400 Lisp_Object *maps;
2401 Lisp_Object prev_event;
2402 int *used_mouse_menu;
2403 EMACS_TIME *end_time;
2404{ 2374{
2405 volatile Lisp_Object c; 2375 volatile Lisp_Object c;
2406 int count, jmpcount; 2376 int count, jmpcount;
@@ -3311,8 +3281,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
3311 Record it for echoing, for this-command-keys, and so on. */ 3281 Record it for echoing, for this-command-keys, and so on. */
3312 3282
3313static void 3283static void
3314record_menu_key (c) 3284record_menu_key (Lisp_Object c)
3315 Lisp_Object c;
3316{ 3285{
3317 /* Wipe the echo area. */ 3286 /* Wipe the echo area. */
3318 clear_message (1, 0); 3287 clear_message (1, 0);
@@ -3346,8 +3315,7 @@ record_menu_key (c)
3346/* Return 1 if should recognize C as "the help character". */ 3315/* Return 1 if should recognize C as "the help character". */
3347 3316
3348int 3317int
3349help_char_p (c) 3318help_char_p (Lisp_Object c)
3350 Lisp_Object c;
3351{ 3319{
3352 Lisp_Object tail; 3320 Lisp_Object tail;
3353 3321
@@ -3362,8 +3330,7 @@ help_char_p (c)
3362/* Record the input event C in various ways. */ 3330/* Record the input event C in various ways. */
3363 3331
3364static void 3332static void
3365record_char (c) 3333record_char (Lisp_Object c)
3366 Lisp_Object c;
3367{ 3334{
3368 int recorded = 0; 3335 int recorded = 0;
3369 3336
@@ -3497,8 +3464,7 @@ record_char (c)
3497} 3464}
3498 3465
3499Lisp_Object 3466Lisp_Object
3500print_help (object) 3467print_help (Lisp_Object object)
3501 Lisp_Object object;
3502{ 3468{
3503 struct buffer *old = current_buffer; 3469 struct buffer *old = current_buffer;
3504 Fprinc (object, Qnil); 3470 Fprinc (object, Qnil);
@@ -3514,15 +3480,13 @@ print_help (object)
3514 See read_process_output. */ 3480 See read_process_output. */
3515 3481
3516static void 3482static void
3517save_getcjmp (temp) 3483save_getcjmp (jmp_buf temp)
3518 jmp_buf temp;
3519{ 3484{
3520 bcopy (getcjmp, temp, sizeof getcjmp); 3485 bcopy (getcjmp, temp, sizeof getcjmp);
3521} 3486}
3522 3487
3523static void 3488static void
3524restore_getcjmp (temp) 3489restore_getcjmp (jmp_buf temp)
3525 jmp_buf temp;
3526{ 3490{
3527 bcopy (temp, getcjmp, sizeof getcjmp); 3491 bcopy (temp, getcjmp, sizeof getcjmp);
3528} 3492}
@@ -3534,8 +3498,7 @@ restore_getcjmp (temp)
3534/* Return true if there are any events in the queue that read-char 3498/* Return true if there are any events in the queue that read-char
3535 would return. If this returns false, a read-char would block. */ 3499 would return. If this returns false, a read-char would block. */
3536static int 3500static int
3537readable_events (flags) 3501readable_events (int flags)
3538 int flags;
3539{ 3502{
3540#ifdef HAVE_DBUS 3503#ifdef HAVE_DBUS
3541 /* Check whether a D-Bus message has arrived. */ 3504 /* Check whether a D-Bus message has arrived. */
@@ -3611,8 +3574,7 @@ readable_events (flags)
3611int stop_character; 3574int stop_character;
3612 3575
3613static KBOARD * 3576static KBOARD *
3614event_to_kboard (event) 3577event_to_kboard (struct input_event *event)
3615 struct input_event *event;
3616{ 3578{
3617 Lisp_Object frame; 3579 Lisp_Object frame;
3618 frame = event->frame_or_window; 3580 frame = event->frame_or_window;
@@ -3636,8 +3598,7 @@ Lisp_Object Vthrow_on_input;
3636/* Store an event obtained at interrupt level into kbd_buffer, fifo */ 3598/* Store an event obtained at interrupt level into kbd_buffer, fifo */
3637 3599
3638void 3600void
3639kbd_buffer_store_event (event) 3601kbd_buffer_store_event (register struct input_event *event)
3640 register struct input_event *event;
3641{ 3602{
3642 kbd_buffer_store_event_hold (event, 0); 3603 kbd_buffer_store_event_hold (event, 0);
3643} 3604}
@@ -3655,9 +3616,8 @@ kbd_buffer_store_event (event)
3655 */ 3616 */
3656 3617
3657void 3618void
3658kbd_buffer_store_event_hold (event, hold_quit) 3619kbd_buffer_store_event_hold (register struct input_event *event,
3659 register struct input_event *event; 3620 struct input_event *hold_quit)
3660 struct input_event *hold_quit;
3661{ 3621{
3662 if (event->kind == NO_EVENT) 3622 if (event->kind == NO_EVENT)
3663 abort (); 3623 abort ();
@@ -3778,8 +3738,7 @@ kbd_buffer_store_event_hold (event, hold_quit)
3778/* Put an input event back in the head of the event queue. */ 3738/* Put an input event back in the head of the event queue. */
3779 3739
3780void 3740void
3781kbd_buffer_unget_event (event) 3741kbd_buffer_unget_event (register struct input_event *event)
3782 register struct input_event *event;
3783{ 3742{
3784 if (kbd_fetch_ptr == kbd_buffer) 3743 if (kbd_fetch_ptr == kbd_buffer)
3785 kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE; 3744 kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
@@ -3807,9 +3766,8 @@ kbd_buffer_unget_event (event)
3807 Value is the number of input_events generated. */ 3766 Value is the number of input_events generated. */
3808 3767
3809void 3768void
3810gen_help_event (help, frame, window, object, pos) 3769gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window,
3811 Lisp_Object help, frame, object, window; 3770 Lisp_Object object, int pos)
3812 int pos;
3813{ 3771{
3814 struct input_event event; 3772 struct input_event event;
3815 3773
@@ -3828,8 +3786,7 @@ gen_help_event (help, frame, window, object, pos)
3828/* Store HELP_EVENTs for HELP on FRAME in the input queue. */ 3786/* Store HELP_EVENTs for HELP on FRAME in the input queue. */
3829 3787
3830void 3788void
3831kbd_buffer_store_help_event (frame, help) 3789kbd_buffer_store_help_event (Lisp_Object frame, Lisp_Object help)
3832 Lisp_Object frame, help;
3833{ 3790{
3834 struct input_event event; 3791 struct input_event event;
3835 3792
@@ -3846,7 +3803,7 @@ kbd_buffer_store_help_event (frame, help)
3846/* Discard any mouse events in the event buffer by setting them to 3803/* Discard any mouse events in the event buffer by setting them to
3847 NO_EVENT. */ 3804 NO_EVENT. */
3848void 3805void
3849discard_mouse_events () 3806discard_mouse_events (void)
3850{ 3807{
3851 struct input_event *sp; 3808 struct input_event *sp;
3852 for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) 3809 for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
@@ -3876,8 +3833,7 @@ discard_mouse_events ()
3876 are no real input events. */ 3833 are no real input events. */
3877 3834
3878int 3835int
3879kbd_buffer_events_waiting (discard) 3836kbd_buffer_events_waiting (int discard)
3880 int discard;
3881{ 3837{
3882 struct input_event *sp; 3838 struct input_event *sp;
3883 3839
@@ -3899,8 +3855,7 @@ kbd_buffer_events_waiting (discard)
3899/* Clear input event EVENT. */ 3855/* Clear input event EVENT. */
3900 3856
3901static INLINE void 3857static INLINE void
3902clear_event (event) 3858clear_event (struct input_event *event)
3903 struct input_event *event;
3904{ 3859{
3905 event->kind = NO_EVENT; 3860 event->kind = NO_EVENT;
3906} 3861}
@@ -3913,10 +3868,7 @@ clear_event (event)
3913 We always read and discard one event. */ 3868 We always read and discard one event. */
3914 3869
3915static Lisp_Object 3870static Lisp_Object
3916kbd_buffer_get_event (kbp, used_mouse_menu, end_time) 3871kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, struct timeval *end_time)
3917 KBOARD **kbp;
3918 int *used_mouse_menu;
3919 EMACS_TIME *end_time;
3920{ 3872{
3921 register int c; 3873 register int c;
3922 Lisp_Object obj; 3874 Lisp_Object obj;
@@ -4283,8 +4235,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
4283 then return, without reading any user-visible events. */ 4235 then return, without reading any user-visible events. */
4284 4236
4285void 4237void
4286swallow_events (do_display) 4238swallow_events (int do_display)
4287 int do_display;
4288{ 4239{
4289 int old_timers_run; 4240 int old_timers_run;
4290 4241
@@ -4334,7 +4285,7 @@ swallow_events (do_display)
4334 for the sake of running idle-time timers. */ 4285 for the sake of running idle-time timers. */
4335 4286
4336static void 4287static void
4337timer_start_idle () 4288timer_start_idle (void)
4338{ 4289{
4339 Lisp_Object timers; 4290 Lisp_Object timers;
4340 4291
@@ -4362,7 +4313,7 @@ timer_start_idle ()
4362/* Record that Emacs is no longer idle, so stop running idle-time timers. */ 4313/* Record that Emacs is no longer idle, so stop running idle-time timers. */
4363 4314
4364static void 4315static void
4365timer_stop_idle () 4316timer_stop_idle (void)
4366{ 4317{
4367 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); 4318 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
4368} 4319}
@@ -4370,7 +4321,7 @@ timer_stop_idle ()
4370/* Resume idle timer from last idle start time. */ 4321/* Resume idle timer from last idle start time. */
4371 4322
4372static void 4323static void
4373timer_resume_idle () 4324timer_resume_idle (void)
4374{ 4325{
4375 if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) 4326 if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
4376 return; 4327 return;
@@ -4401,7 +4352,7 @@ extern Lisp_Object Qapply;
4401 should be done. */ 4352 should be done. */
4402 4353
4403static EMACS_TIME 4354static EMACS_TIME
4404timer_check_2 () 4355timer_check_2 (void)
4405{ 4356{
4406 EMACS_TIME nexttime; 4357 EMACS_TIME nexttime;
4407 EMACS_TIME now, idleness_now; 4358 EMACS_TIME now, idleness_now;
@@ -4602,12 +4553,11 @@ timer_check_2 ()
4602 Now we always run timers directly. */ 4553 Now we always run timers directly. */
4603 4554
4604EMACS_TIME 4555EMACS_TIME
4605timer_check (do_it_now) 4556timer_check (int do_it_now)
4606 int do_it_now;
4607{ 4557{
4608 EMACS_TIME nexttime; 4558 EMACS_TIME nexttime;
4609 4559
4610 do 4560 do
4611 { 4561 {
4612 nexttime = timer_check_2 (); 4562 nexttime = timer_check_2 ();
4613 } 4563 }
@@ -5254,10 +5204,8 @@ int double_click_count;
5254/* Return position of a mouse click or wheel event */ 5204/* Return position of a mouse click or wheel event */
5255 5205
5256static Lisp_Object 5206static Lisp_Object
5257make_lispy_position (f, x, y, time) 5207make_lispy_position (struct frame *f, Lisp_Object *x, Lisp_Object *y,
5258 struct frame *f; 5208 unsigned long time)
5259 Lisp_Object *x, *y;
5260 unsigned long time;
5261{ 5209{
5262 Lisp_Object window; 5210 Lisp_Object window;
5263 enum window_part part; 5211 enum window_part part;
@@ -5444,8 +5392,7 @@ make_lispy_position (f, x, y, time)
5444 in order to build drag events when the button is released. */ 5392 in order to build drag events when the button is released. */
5445 5393
5446static Lisp_Object 5394static Lisp_Object
5447make_lispy_event (event) 5395make_lispy_event (struct input_event *event)
5448 struct input_event *event;
5449{ 5396{
5450 int i; 5397 int i;
5451 5398
@@ -6152,12 +6099,8 @@ make_lispy_event (event)
6152#if defined(HAVE_MOUSE) || defined(HAVE_GPM) 6099#if defined(HAVE_MOUSE) || defined(HAVE_GPM)
6153 6100
6154static Lisp_Object 6101static Lisp_Object
6155make_lispy_movement (frame, bar_window, part, x, y, time) 6102make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
6156 FRAME_PTR frame; 6103 Lisp_Object x, Lisp_Object y, unsigned long time)
6157 Lisp_Object bar_window;
6158 enum scroll_bar_part part;
6159 Lisp_Object x, y;
6160 unsigned long time;
6161{ 6104{
6162 /* Is it a scroll bar movement? */ 6105 /* Is it a scroll bar movement? */
6163 if (frame && ! NILP (bar_window)) 6106 if (frame && ! NILP (bar_window))
@@ -6192,8 +6135,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
6192 6135
6193/* Construct a switch frame event. */ 6136/* Construct a switch frame event. */
6194static Lisp_Object 6137static Lisp_Object
6195make_lispy_switch_frame (frame) 6138make_lispy_switch_frame (Lisp_Object frame)
6196 Lisp_Object frame;
6197{ 6139{
6198 return Fcons (Qswitch_frame, Fcons (frame, Qnil)); 6140 return Fcons (Qswitch_frame, Fcons (frame, Qnil));
6199} 6141}
@@ -6209,9 +6151,7 @@ make_lispy_switch_frame (frame)
6209 This doesn't use any caches. */ 6151 This doesn't use any caches. */
6210 6152
6211static int 6153static int
6212parse_modifiers_uncached (symbol, modifier_end) 6154parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
6213 Lisp_Object symbol;
6214 int *modifier_end;
6215{ 6155{
6216 Lisp_Object name; 6156 Lisp_Object name;
6217 int i; 6157 int i;
@@ -6321,10 +6261,7 @@ parse_modifiers_uncached (symbol, modifier_end)
6321 prepended to the string BASE[0..BASE_LEN-1]. 6261 prepended to the string BASE[0..BASE_LEN-1].
6322 This doesn't use any caches. */ 6262 This doesn't use any caches. */
6323static Lisp_Object 6263static Lisp_Object
6324apply_modifiers_uncached (modifiers, base, base_len, base_len_byte) 6264apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_byte)
6325 int modifiers;
6326 char *base;
6327 int base_len, base_len_byte;
6328{ 6265{
6329 /* Since BASE could contain nulls, we can't use intern here; we have 6266 /* Since BASE could contain nulls, we can't use intern here; we have
6330 to use Fintern, which expects a genuine Lisp_String, and keeps a 6267 to use Fintern, which expects a genuine Lisp_String, and keeps a
@@ -6383,8 +6320,7 @@ static Lisp_Object modifier_symbols;
6383 6320
6384/* Return the list of modifier symbols corresponding to the mask MODIFIERS. */ 6321/* Return the list of modifier symbols corresponding to the mask MODIFIERS. */
6385static Lisp_Object 6322static Lisp_Object
6386lispy_modifier_list (modifiers) 6323lispy_modifier_list (int modifiers)
6387 int modifiers;
6388{ 6324{
6389 Lisp_Object modifier_list; 6325 Lisp_Object modifier_list;
6390 int i; 6326 int i;
@@ -6409,8 +6345,7 @@ lispy_modifier_list (modifiers)
6409#define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1)) 6345#define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1))
6410 6346
6411Lisp_Object 6347Lisp_Object
6412parse_modifiers (symbol) 6348parse_modifiers (Lisp_Object symbol)
6413 Lisp_Object symbol;
6414{ 6349{
6415 Lisp_Object elements; 6350 Lisp_Object elements;
6416 6351
@@ -6479,9 +6414,7 @@ DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers,
6479 apply_modifiers copies the value of BASE's Qevent_kind property to 6414 apply_modifiers copies the value of BASE's Qevent_kind property to
6480 the modified symbol. */ 6415 the modified symbol. */
6481static Lisp_Object 6416static Lisp_Object
6482apply_modifiers (modifiers, base) 6417apply_modifiers (int modifiers, Lisp_Object base)
6483 int modifiers;
6484 Lisp_Object base;
6485{ 6418{
6486 Lisp_Object cache, index, entry, new_symbol; 6419 Lisp_Object cache, index, entry, new_symbol;
6487 6420
@@ -6550,8 +6483,7 @@ apply_modifiers (modifiers, base)
6550 and M-C-foo end up being equivalent in the keymap. */ 6483 and M-C-foo end up being equivalent in the keymap. */
6551 6484
6552Lisp_Object 6485Lisp_Object
6553reorder_modifiers (symbol) 6486reorder_modifiers (Lisp_Object symbol)
6554 Lisp_Object symbol;
6555{ 6487{
6556 /* It's hopefully okay to write the code this way, since everything 6488 /* It's hopefully okay to write the code this way, since everything
6557 will soon be in caches, and no consing will be done at all. */ 6489 will soon be in caches, and no consing will be done at all. */
@@ -6596,15 +6528,9 @@ reorder_modifiers (symbol)
6596 in the symbol's name. */ 6528 in the symbol's name. */
6597 6529
6598static Lisp_Object 6530static Lisp_Object
6599modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem, 6531modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind,
6600 name_table, symbol_table, table_size) 6532 Lisp_Object name_alist_or_stem, char **name_table,
6601 int symbol_num; 6533 Lisp_Object *symbol_table, unsigned int table_size)
6602 unsigned modifiers;
6603 Lisp_Object symbol_kind;
6604 Lisp_Object name_alist_or_stem;
6605 char **name_table;
6606 Lisp_Object *symbol_table;
6607 unsigned int table_size;
6608{ 6534{
6609 Lisp_Object value; 6535 Lisp_Object value;
6610 Lisp_Object symbol_int; 6536 Lisp_Object symbol_int;
@@ -6841,8 +6767,7 @@ parse_solitary_modifier (Lisp_Object symbol)
6841 but it can be a Lucid-style event type list. */ 6767 but it can be a Lucid-style event type list. */
6842 6768
6843int 6769int
6844lucid_event_type_list_p (object) 6770lucid_event_type_list_p (Lisp_Object object)
6845 Lisp_Object object;
6846{ 6771{
6847 Lisp_Object tail; 6772 Lisp_Object tail;
6848 6773
@@ -6879,9 +6804,7 @@ lucid_event_type_list_p (object)
6879 movements and toolkit scroll bar thumb drags. */ 6804 movements and toolkit scroll bar thumb drags. */
6880 6805
6881static void 6806static void
6882get_input_pending (addr, flags) 6807get_input_pending (int *addr, int flags)
6883 int *addr;
6884 int flags;
6885{ 6808{
6886 /* First of all, have we already counted some input? */ 6809 /* First of all, have we already counted some input? */
6887 *addr = (!NILP (Vquit_flag) || readable_events (flags)); 6810 *addr = (!NILP (Vquit_flag) || readable_events (flags));
@@ -6898,8 +6821,7 @@ get_input_pending (addr, flags)
6898/* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */ 6821/* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */
6899 6822
6900void 6823void
6901gobble_input (expected) 6824gobble_input (int expected)
6902 int expected;
6903{ 6825{
6904#ifdef HAVE_DBUS 6826#ifdef HAVE_DBUS
6905 /* Read D-Bus messages. */ 6827 /* Read D-Bus messages. */
@@ -6936,7 +6858,7 @@ gobble_input (expected)
6936 so that read_key_sequence will notice the new current buffer. */ 6858 so that read_key_sequence will notice the new current buffer. */
6937 6859
6938void 6860void
6939record_asynch_buffer_change () 6861record_asynch_buffer_change (void)
6940{ 6862{
6941 struct input_event event; 6863 struct input_event event;
6942 Lisp_Object tem; 6864 Lisp_Object tem;
@@ -6986,8 +6908,7 @@ record_asynch_buffer_change ()
6986 this is a bad time to try to read input. */ 6908 this is a bad time to try to read input. */
6987 6909
6988static int 6910static int
6989read_avail_input (expected) 6911read_avail_input (int expected)
6990 int expected;
6991{ 6912{
6992 int nread = 0; 6913 int nread = 0;
6993 int err = 0; 6914 int err = 0;
@@ -7313,7 +7234,7 @@ tty_read_avail_input (struct terminal *terminal,
7313} 7234}
7314 7235
7315void 7236void
7316handle_async_input () 7237handle_async_input (void)
7317{ 7238{
7318 interrupt_input_pending = 0; 7239 interrupt_input_pending = 0;
7319#ifdef SYNC_INPUT 7240#ifdef SYNC_INPUT
@@ -7340,7 +7261,7 @@ handle_async_input ()
7340} 7261}
7341 7262
7342void 7263void
7343process_pending_signals () 7264process_pending_signals (void)
7344{ 7265{
7345 if (interrupt_input_pending) 7266 if (interrupt_input_pending)
7346 handle_async_input (); 7267 handle_async_input ();
@@ -7351,8 +7272,7 @@ process_pending_signals ()
7351/* Note SIGIO has been undef'd if FIONREAD is missing. */ 7272/* Note SIGIO has been undef'd if FIONREAD is missing. */
7352 7273
7353static SIGTYPE 7274static SIGTYPE
7354input_available_signal (signo) 7275input_available_signal (int signo)
7355 int signo;
7356{ 7276{
7357 /* Must preserve main program's value of errno. */ 7277 /* Must preserve main program's value of errno. */
7358 int old_errno = errno; 7278 int old_errno = errno;
@@ -7381,7 +7301,7 @@ input_available_signal (signo)
7381 dealing with, without assuming that every file which uses 7301 dealing with, without assuming that every file which uses
7382 UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */ 7302 UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
7383void 7303void
7384reinvoke_input_signal () 7304reinvoke_input_signal (void)
7385{ 7305{
7386#ifdef SIGIO 7306#ifdef SIGIO
7387 handle_async_input (); 7307 handle_async_input ();
@@ -7410,9 +7330,7 @@ struct user_signal_info
7410static struct user_signal_info *user_signals = NULL; 7330static struct user_signal_info *user_signals = NULL;
7411 7331
7412void 7332void
7413add_user_signal (sig, name) 7333add_user_signal (int sig, const char *name)
7414 int sig;
7415 const char *name;
7416{ 7334{
7417 struct user_signal_info *p; 7335 struct user_signal_info *p;
7418 7336
@@ -7432,8 +7350,7 @@ add_user_signal (sig, name)
7432} 7350}
7433 7351
7434static SIGTYPE 7352static SIGTYPE
7435handle_user_signal (sig) 7353handle_user_signal (int sig)
7436 int sig;
7437{ 7354{
7438 int old_errno = errno; 7355 int old_errno = errno;
7439 struct user_signal_info *p; 7356 struct user_signal_info *p;
@@ -7462,8 +7379,7 @@ handle_user_signal (sig)
7462} 7379}
7463 7380
7464static char * 7381static char *
7465find_user_signal_name (sig) 7382find_user_signal_name (int sig)
7466 int sig;
7467{ 7383{
7468 struct user_signal_info *p; 7384 struct user_signal_info *p;
7469 7385
@@ -7475,7 +7391,7 @@ find_user_signal_name (sig)
7475} 7391}
7476 7392
7477static int 7393static int
7478store_user_signal_events () 7394store_user_signal_events (void)
7479{ 7395{
7480 struct user_signal_info *p; 7396 struct user_signal_info *p;
7481 struct input_event buf; 7397 struct input_event buf;
@@ -7525,8 +7441,7 @@ static int menu_bar_items_index;
7525 OLD is an old vector we can optionally reuse, or nil. */ 7441 OLD is an old vector we can optionally reuse, or nil. */
7526 7442
7527Lisp_Object 7443Lisp_Object
7528menu_bar_items (old) 7444menu_bar_items (Lisp_Object old)
7529 Lisp_Object old;
7530{ 7445{
7531 /* The number of keymaps we're scanning right now, and the number of 7446 /* The number of keymaps we're scanning right now, and the number of
7532 keymaps we have allocated space for. */ 7447 keymaps we have allocated space for. */
@@ -7666,9 +7581,7 @@ menu_bar_items (old)
7666Lisp_Object item_properties; 7581Lisp_Object item_properties;
7667 7582
7668static void 7583static void
7669menu_bar_item (key, item, dummy1, dummy2) 7584menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dummy2)
7670 Lisp_Object key, item, dummy1;
7671 void *dummy2;
7672{ 7585{
7673 struct gcpro gcpro1; 7586 struct gcpro gcpro1;
7674 int i; 7587 int i;
@@ -7743,8 +7656,7 @@ menu_bar_item (key, item, dummy1, dummy2)
7743 7656
7744 /* This is used as the handler when calling menu_item_eval_property. */ 7657 /* This is used as the handler when calling menu_item_eval_property. */
7745static Lisp_Object 7658static Lisp_Object
7746menu_item_eval_property_1 (arg) 7659menu_item_eval_property_1 (Lisp_Object arg)
7747 Lisp_Object arg;
7748{ 7660{
7749 /* If we got a quit from within the menu computation, 7661 /* If we got a quit from within the menu computation,
7750 quit all the way out of it. This takes care of C-] in the debugger. */ 7662 quit all the way out of it. This takes care of C-] in the debugger. */
@@ -7757,8 +7669,7 @@ menu_item_eval_property_1 (arg)
7757/* Evaluate an expression and return the result (or nil if something 7669/* Evaluate an expression and return the result (or nil if something
7758 went wrong). Used to evaluate dynamic parts of menu items. */ 7670 went wrong). Used to evaluate dynamic parts of menu items. */
7759Lisp_Object 7671Lisp_Object
7760menu_item_eval_property (sexpr) 7672menu_item_eval_property (Lisp_Object sexpr)
7761 Lisp_Object sexpr;
7762{ 7673{
7763 int count = SPECPDL_INDEX (); 7674 int count = SPECPDL_INDEX ();
7764 Lisp_Object val; 7675 Lisp_Object val;
@@ -7778,9 +7689,7 @@ menu_item_eval_property (sexpr)
7778 otherwise. */ 7689 otherwise. */
7779 7690
7780int 7691int
7781parse_menu_item (item, inmenubar) 7692parse_menu_item (Lisp_Object item, int inmenubar)
7782 Lisp_Object item;
7783 int inmenubar;
7784{ 7693{
7785 Lisp_Object def, tem, item_string, start; 7694 Lisp_Object def, tem, item_string, start;
7786 Lisp_Object filter; 7695 Lisp_Object filter;
@@ -8088,9 +7997,7 @@ static void append_tool_bar_item (void);
8088 tool bar items found. */ 7997 tool bar items found. */
8089 7998
8090Lisp_Object 7999Lisp_Object
8091tool_bar_items (reuse, nitems) 8000tool_bar_items (Lisp_Object reuse, int *nitems)
8092 Lisp_Object reuse;
8093 int *nitems;
8094{ 8001{
8095 Lisp_Object *maps; 8002 Lisp_Object *maps;
8096 int nmaps, i; 8003 int nmaps, i;
@@ -8168,9 +8075,7 @@ tool_bar_items (reuse, nitems)
8168/* Process the definition of KEY which is DEF. */ 8075/* Process the definition of KEY which is DEF. */
8169 8076
8170static void 8077static void
8171process_tool_bar_item (key, def, data, args) 8078process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void *args)
8172 Lisp_Object key, def, data;
8173 void *args;
8174{ 8079{
8175 int i; 8080 int i;
8176 extern Lisp_Object Qundefined; 8081 extern Lisp_Object Qundefined;
@@ -8255,8 +8160,7 @@ process_tool_bar_item (key, def, data, args)
8255 A text label to show with the tool bar button if labels are enabled. */ 8160 A text label to show with the tool bar button if labels are enabled. */
8256 8161
8257static int 8162static int
8258parse_tool_bar_item (key, item) 8163parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
8259 Lisp_Object key, item;
8260{ 8164{
8261 /* Access slot with index IDX of vector tool_bar_item_properties. */ 8165 /* Access slot with index IDX of vector tool_bar_item_properties. */
8262#define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX] 8166#define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
@@ -8386,7 +8290,7 @@ parse_tool_bar_item (key, item)
8386 EMACS_INT max_lbl = 2*tool_bar_max_label_size; 8290 EMACS_INT max_lbl = 2*tool_bar_max_label_size;
8387 Lisp_Object new_lbl; 8291 Lisp_Object new_lbl;
8388 8292
8389 if (strlen (caption) < max_lbl && caption[0] != '\0') 8293 if (strlen (caption) < max_lbl && caption[0] != '\0')
8390 { 8294 {
8391 strcpy (buf, caption); 8295 strcpy (buf, caption);
8392 while (buf[0] != '\0' && buf[strlen (buf) -1] == '.') 8296 while (buf[0] != '\0' && buf[strlen (buf) -1] == '.')
@@ -8398,17 +8302,17 @@ parse_tool_bar_item (key, item)
8398 if (strlen (caption) <= max_lbl) 8302 if (strlen (caption) <= max_lbl)
8399 label = caption; 8303 label = caption;
8400 8304
8401 if (strlen (label) <= max_lbl && label[0] != '\0') 8305 if (strlen (label) <= max_lbl && label[0] != '\0')
8402 { 8306 {
8403 int i; 8307 int i;
8404 if (label != buf) strcpy (buf, label); 8308 if (label != buf) strcpy (buf, label);
8405 8309
8406 for (i = 0; i < strlen (buf); ++i) 8310 for (i = 0; i < strlen (buf); ++i)
8407 { 8311 {
8408 if (buf[i] == '-') buf[i] = ' '; 8312 if (buf[i] == '-') buf[i] = ' ';
8409 } 8313 }
8410 label = buf; 8314 label = buf;
8411 8315
8412 } 8316 }
8413 else label = ""; 8317 else label = "";
8414 8318
@@ -8448,8 +8352,7 @@ parse_tool_bar_item (key, item)
8448 that can be reused. */ 8352 that can be reused. */
8449 8353
8450static void 8354static void
8451init_tool_bar_items (reuse) 8355init_tool_bar_items (Lisp_Object reuse)
8452 Lisp_Object reuse;
8453{ 8356{
8454 if (VECTORP (reuse)) 8357 if (VECTORP (reuse))
8455 tool_bar_items_vector = reuse; 8358 tool_bar_items_vector = reuse;
@@ -8463,7 +8366,7 @@ init_tool_bar_items (reuse)
8463 tool_bar_item_properties */ 8366 tool_bar_item_properties */
8464 8367
8465static void 8368static void
8466append_tool_bar_item () 8369append_tool_bar_item (void)
8467{ 8370{
8468 Lisp_Object *to, *from; 8371 Lisp_Object *to, *from;
8469 8372
@@ -8507,11 +8410,8 @@ append_tool_bar_item ()
8507 and do auto-saving in the inner call of read_char. */ 8410 and do auto-saving in the inner call of read_char. */
8508 8411
8509static Lisp_Object 8412static Lisp_Object
8510read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) 8413read_char_x_menu_prompt (int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
8511 int nmaps; 8414 int *used_mouse_menu)
8512 Lisp_Object *maps;
8513 Lisp_Object prev_event;
8514 int *used_mouse_menu;
8515{ 8415{
8516 int mapno; 8416 int mapno;
8517 8417
@@ -8595,10 +8495,7 @@ static char *read_char_minibuf_menu_text;
8595static int read_char_minibuf_menu_width; 8495static int read_char_minibuf_menu_width;
8596 8496
8597static Lisp_Object 8497static Lisp_Object
8598read_char_minibuf_menu_prompt (commandflag, nmaps, maps) 8498read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
8599 int commandflag ;
8600 int nmaps;
8601 Lisp_Object *maps;
8602{ 8499{
8603 int mapno; 8500 int mapno;
8604 register Lisp_Object name; 8501 register Lisp_Object name;
@@ -8863,10 +8760,8 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps)
8863 NEXT may be the same array as CURRENT. */ 8760 NEXT may be the same array as CURRENT. */
8864 8761
8865static int 8762static int
8866follow_key (key, nmaps, current, defs, next) 8763follow_key (Lisp_Object key, int nmaps, Lisp_Object *current, Lisp_Object *defs,
8867 Lisp_Object key; 8764 Lisp_Object *next)
8868 Lisp_Object *current, *defs, *next;
8869 int nmaps;
8870{ 8765{
8871 int i, first_binding; 8766 int i, first_binding;
8872 8767
@@ -8915,9 +8810,8 @@ typedef struct keyremap
8915 that it is indeed a vector). */ 8810 that it is indeed a vector). */
8916 8811
8917static Lisp_Object 8812static Lisp_Object
8918access_keymap_keyremap (map, key, prompt, do_funcall) 8813access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt,
8919 Lisp_Object map, key, prompt; 8814 int do_funcall)
8920 int do_funcall;
8921{ 8815{
8922 Lisp_Object next; 8816 Lisp_Object next;
8923 8817
@@ -8968,10 +8862,8 @@ access_keymap_keyremap (map, key, prompt, do_funcall)
8968 The return value is non-zero if the remapping actually took place. */ 8862 The return value is non-zero if the remapping actually took place. */
8969 8863
8970static int 8864static int
8971keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt) 8865keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
8972 Lisp_Object *keybuf, prompt; 8866 int input, int doit, int *diff, Lisp_Object prompt)
8973 keyremap *fkey;
8974 int input, doit, *diff, bufsize;
8975{ 8867{
8976 Lisp_Object next, key; 8868 Lisp_Object next, key;
8977 8869
@@ -9063,14 +8955,9 @@ keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt)
9063 from the selected window's buffer. */ 8955 from the selected window's buffer. */
9064 8956
9065static int 8957static int
9066read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, 8958read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9067 can_return_switch_frame, fix_current_buffer) 8959 int dont_downcase_last, int can_return_switch_frame,
9068 Lisp_Object *keybuf; 8960 int fix_current_buffer)
9069 int bufsize;
9070 Lisp_Object prompt;
9071 int dont_downcase_last;
9072 int can_return_switch_frame;
9073 int fix_current_buffer;
9074{ 8961{
9075 volatile Lisp_Object from_string; 8962 volatile Lisp_Object from_string;
9076 volatile int count = SPECPDL_INDEX (); 8963 volatile int count = SPECPDL_INDEX ();
@@ -10565,7 +10452,7 @@ give to the command you invoke, if it asks for an argument. */)
10565/* Return nonzero if input events are pending. */ 10452/* Return nonzero if input events are pending. */
10566 10453
10567int 10454int
10568detect_input_pending () 10455detect_input_pending (void)
10569{ 10456{
10570 if (!input_pending) 10457 if (!input_pending)
10571 get_input_pending (&input_pending, 0); 10458 get_input_pending (&input_pending, 0);
@@ -10577,7 +10464,7 @@ detect_input_pending ()
10577 pending. */ 10464 pending. */
10578 10465
10579int 10466int
10580detect_input_pending_ignore_squeezables () 10467detect_input_pending_ignore_squeezables (void)
10581{ 10468{
10582 if (!input_pending) 10469 if (!input_pending)
10583 get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES); 10470 get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES);
@@ -10588,8 +10475,7 @@ detect_input_pending_ignore_squeezables ()
10588/* Return nonzero if input events are pending, and run any pending timers. */ 10475/* Return nonzero if input events are pending, and run any pending timers. */
10589 10476
10590int 10477int
10591detect_input_pending_run_timers (do_display) 10478detect_input_pending_run_timers (int do_display)
10592 int do_display;
10593{ 10479{
10594 int old_timers_run = timers_run; 10480 int old_timers_run = timers_run;
10595 10481
@@ -10620,7 +10506,7 @@ detect_input_pending_run_timers (do_display)
10620 So calling this function unnecessarily can't do any harm. */ 10506 So calling this function unnecessarily can't do any harm. */
10621 10507
10622void 10508void
10623clear_input_pending () 10509clear_input_pending (void)
10624{ 10510{
10625 input_pending = 0; 10511 input_pending = 0;
10626} 10512}
@@ -10632,7 +10518,7 @@ clear_input_pending ()
10632 to do in that case. It isn't trivial. */ 10518 to do in that case. It isn't trivial. */
10633 10519
10634int 10520int
10635requeued_events_pending_p () 10521requeued_events_pending_p (void)
10636{ 10522{
10637 return (!NILP (Vunread_command_events) || unread_command_char != -1); 10523 return (!NILP (Vunread_command_events) || unread_command_char != -1);
10638} 10524}
@@ -10904,8 +10790,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10904 Then in any case stuff anything Emacs has read ahead and not used. */ 10790 Then in any case stuff anything Emacs has read ahead and not used. */
10905 10791
10906void 10792void
10907stuff_buffered_input (stuffstring) 10793stuff_buffered_input (Lisp_Object stuffstring)
10908 Lisp_Object stuffstring;
10909{ 10794{
10910#ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ 10795#ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */
10911 register unsigned char *p; 10796 register unsigned char *p;
@@ -10943,8 +10828,7 @@ stuff_buffered_input (stuffstring)
10943} 10828}
10944 10829
10945void 10830void
10946set_waiting_for_input (time_to_clear) 10831set_waiting_for_input (struct timeval *time_to_clear)
10947 EMACS_TIME *time_to_clear;
10948{ 10832{
10949 input_available_clear_time = time_to_clear; 10833 input_available_clear_time = time_to_clear;
10950 10834
@@ -10958,7 +10842,7 @@ set_waiting_for_input (time_to_clear)
10958} 10842}
10959 10843
10960void 10844void
10961clear_waiting_for_input () 10845clear_waiting_for_input (void)
10962{ 10846{
10963 /* Tell handle_interrupt not to throw back to read_char, */ 10847 /* Tell handle_interrupt not to throw back to read_char, */
10964 waiting_for_input = 0; 10848 waiting_for_input = 0;
@@ -10972,8 +10856,8 @@ clear_waiting_for_input ()
10972 Otherwise, the handler kills Emacs. */ 10856 Otherwise, the handler kills Emacs. */
10973 10857
10974static SIGTYPE 10858static SIGTYPE
10975interrupt_signal (signalnum) /* If we don't have an argument, */ 10859interrupt_signal (int signalnum) /* If we don't have an argument, some */
10976 int signalnum; /* some compilers complain in signal calls. */ 10860 /* compilers complain in signal calls. */
10977{ 10861{
10978 /* Must preserve main program's value of errno. */ 10862 /* Must preserve main program's value of errno. */
10979 int old_errno = errno; 10863 int old_errno = errno;
@@ -11017,7 +10901,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
11017 non-nil, it stops the job right away. */ 10901 non-nil, it stops the job right away. */
11018 10902
11019static void 10903static void
11020handle_interrupt () 10904handle_interrupt (void)
11021{ 10905{
11022 char c; 10906 char c;
11023 10907
@@ -11143,7 +11027,7 @@ handle_interrupt ()
11143/* Handle a C-g by making read_char return C-g. */ 11027/* Handle a C-g by making read_char return C-g. */
11144 11028
11145void 11029void
11146quit_throw_to_read_char () 11030quit_throw_to_read_char (void)
11147{ 11031{
11148 sigfree (); 11032 sigfree ();
11149 /* Prevent another signal from doing this before we finish. */ 11033 /* Prevent another signal from doing this before we finish. */
@@ -11478,8 +11362,7 @@ The `posn-' functions access elements of such lists. */)
11478 * Set up a new kboard object with reasonable initial values. 11362 * Set up a new kboard object with reasonable initial values.
11479 */ 11363 */
11480void 11364void
11481init_kboard (kb) 11365init_kboard (KBOARD *kb)
11482 KBOARD *kb;
11483{ 11366{
11484 kb->Voverriding_terminal_local_map = Qnil; 11367 kb->Voverriding_terminal_local_map = Qnil;
11485 kb->Vlast_command = Qnil; 11368 kb->Vlast_command = Qnil;
@@ -11513,8 +11396,7 @@ init_kboard (kb)
11513 * it a second time. 11396 * it a second time.
11514 */ 11397 */
11515static void 11398static void
11516wipe_kboard (kb) 11399wipe_kboard (KBOARD *kb)
11517 KBOARD *kb;
11518{ 11400{
11519 xfree (kb->kbd_macro_buffer); 11401 xfree (kb->kbd_macro_buffer);
11520} 11402}
@@ -11522,8 +11404,7 @@ wipe_kboard (kb)
11522/* Free KB and memory referenced from it. */ 11404/* Free KB and memory referenced from it. */
11523 11405
11524void 11406void
11525delete_kboard (kb) 11407delete_kboard (KBOARD *kb)
11526 KBOARD *kb;
11527{ 11408{
11528 KBOARD **kbp; 11409 KBOARD **kbp;
11529 11410
@@ -11548,7 +11429,7 @@ delete_kboard (kb)
11548} 11429}
11549 11430
11550void 11431void
11551init_keyboard () 11432init_keyboard (void)
11552{ 11433{
11553 /* This is correct before outermost invocation of the editor loop */ 11434 /* This is correct before outermost invocation of the editor loop */
11554 command_loop_level = -1; 11435 command_loop_level = -1;
@@ -11648,7 +11529,7 @@ struct event_head head_table[] = {
11648}; 11529};
11649 11530
11650void 11531void
11651syms_of_keyboard () 11532syms_of_keyboard (void)
11652{ 11533{
11653 pending_funcalls = Qnil; 11534 pending_funcalls = Qnil;
11654 staticpro (&pending_funcalls); 11535 staticpro (&pending_funcalls);
@@ -12424,7 +12305,7 @@ and tool-bar buttons. */);
12424} 12305}
12425 12306
12426void 12307void
12427keys_of_keyboard () 12308keys_of_keyboard (void)
12428{ 12309{
12429 initial_define_key (global_map, Ctl ('Z'), "suspend-emacs"); 12310 initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");
12430 initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs"); 12311 initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs");
@@ -12484,7 +12365,7 @@ keys_of_keyboard ()
12484/* Mark the pointers in the kboard objects. 12365/* Mark the pointers in the kboard objects.
12485 Called by the Fgarbage_collector. */ 12366 Called by the Fgarbage_collector. */
12486void 12367void
12487mark_kboards () 12368mark_kboards (void)
12488{ 12369{
12489 KBOARD *kb; 12370 KBOARD *kb;
12490 Lisp_Object *p; 12371 Lisp_Object *p;
diff --git a/src/process.c b/src/process.c
index 255803c92fd..313663e5d42 100644
--- a/src/process.c
+++ b/src/process.c
@@ -297,8 +297,8 @@ static void create_pty (Lisp_Object);
297#define POLL_FOR_INPUT 297#define POLL_FOR_INPUT
298#endif 298#endif
299 299
300static Lisp_Object get_process (); 300static Lisp_Object get_process (register Lisp_Object name);
301static void exec_sentinel (); 301static void exec_sentinel (Lisp_Object proc, Lisp_Object reason);
302 302
303extern int timers_run; 303extern int timers_run;
304 304
@@ -399,8 +399,7 @@ static char pty_name[24];
399static Lisp_Object status_convert (int); 399static Lisp_Object status_convert (int);
400 400
401static void 401static void
402update_status (p) 402update_status (struct Lisp_Process *p)
403 struct Lisp_Process *p;
404{ 403{
405 eassert (p->raw_status_new); 404 eassert (p->raw_status_new);
406 p->status = status_convert (p->raw_status); 405 p->status = status_convert (p->raw_status);
@@ -429,11 +428,7 @@ status_convert (int w)
429 and store them individually through the three pointers. */ 428 and store them individually through the three pointers. */
430 429
431static void 430static void
432decode_status (l, symbol, code, coredump) 431decode_status (Lisp_Object l, Lisp_Object *symbol, int *code, int *coredump)
433 Lisp_Object l;
434 Lisp_Object *symbol;
435 int *code;
436 int *coredump;
437{ 432{
438 Lisp_Object tem; 433 Lisp_Object tem;
439 434
@@ -456,8 +451,7 @@ decode_status (l, symbol, code, coredump)
456/* Return a string describing a process status list. */ 451/* Return a string describing a process status list. */
457 452
458static Lisp_Object 453static Lisp_Object
459status_message (p) 454status_message (struct Lisp_Process *p)
460 struct Lisp_Process *p;
461{ 455{
462 Lisp_Object status = p->status; 456 Lisp_Object status = p->status;
463 Lisp_Object symbol; 457 Lisp_Object symbol;
@@ -519,7 +513,7 @@ status_message (p)
519 is left in the variable pty_name. */ 513 is left in the variable pty_name. */
520 514
521static int 515static int
522allocate_pty () 516allocate_pty (void)
523{ 517{
524 register int c, i; 518 register int c, i;
525 int fd; 519 int fd;
@@ -593,8 +587,7 @@ allocate_pty ()
593#endif /* HAVE_PTYS */ 587#endif /* HAVE_PTYS */
594 588
595static Lisp_Object 589static Lisp_Object
596make_process (name) 590make_process (Lisp_Object name)
597 Lisp_Object name;
598{ 591{
599 register Lisp_Object val, tem, name1; 592 register Lisp_Object val, tem, name1;
600 register struct Lisp_Process *p; 593 register struct Lisp_Process *p;
@@ -638,8 +631,7 @@ make_process (name)
638} 631}
639 632
640static void 633static void
641remove_process (proc) 634remove_process (register Lisp_Object proc)
642 register Lisp_Object proc;
643{ 635{
644 register Lisp_Object pair; 636 register Lisp_Object pair;
645 637
@@ -652,8 +644,7 @@ remove_process (proc)
652/* Setup coding systems of PROCESS. */ 644/* Setup coding systems of PROCESS. */
653 645
654void 646void
655setup_process_coding_systems (process) 647setup_process_coding_systems (Lisp_Object process)
656 Lisp_Object process;
657{ 648{
658 struct Lisp_Process *p = XPROCESS (process); 649 struct Lisp_Process *p = XPROCESS (process);
659 int inch = p->infd; 650 int inch = p->infd;
@@ -729,8 +720,7 @@ BUFFER may be a buffer or the name of one. */)
729 current buffer. */ 720 current buffer. */
730 721
731static Lisp_Object 722static Lisp_Object
732get_process (name) 723get_process (register Lisp_Object name)
733 register Lisp_Object name;
734{ 724{
735 register Lisp_Object proc, obj; 725 register Lisp_Object proc, obj;
736 if (STRINGP (name)) 726 if (STRINGP (name))
@@ -1161,7 +1151,7 @@ DEFUN ("process-query-on-exit-flag",
1161} 1151}
1162 1152
1163#ifdef DATAGRAM_SOCKETS 1153#ifdef DATAGRAM_SOCKETS
1164Lisp_Object Fprocess_datagram_address (); 1154Lisp_Object Fprocess_datagram_address (Lisp_Object process);
1165#endif 1155#endif
1166 1156
1167DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, 1157DEFUN ("process-contact", Fprocess_contact, Sprocess_contact,
@@ -1327,8 +1317,7 @@ Returns nil if format of ADDRESS is invalid. */)
1327#endif 1317#endif
1328 1318
1329static Lisp_Object 1319static Lisp_Object
1330list_processes_1 (query_only) 1320list_processes_1 (Lisp_Object query_only)
1331 Lisp_Object query_only;
1332{ 1321{
1333 register Lisp_Object tail, tem; 1322 register Lisp_Object tail, tem;
1334 Lisp_Object proc, minspace, tem1; 1323 Lisp_Object proc, minspace, tem1;
@@ -1579,7 +1568,7 @@ DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0,
1579 1568
1580/* Starting asynchronous inferior processes. */ 1569/* Starting asynchronous inferior processes. */
1581 1570
1582static Lisp_Object start_process_unwind (); 1571static Lisp_Object start_process_unwind (Lisp_Object proc);
1583 1572
1584DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, 1573DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0,
1585 doc: /* Start a program in a subprocess. Return the process object for it. 1574 doc: /* Start a program in a subprocess. Return the process object for it.
@@ -1814,8 +1803,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1814 an error and the process wasn't started successfully, so we should 1803 an error and the process wasn't started successfully, so we should
1815 remove it from the process list. */ 1804 remove it from the process list. */
1816static Lisp_Object 1805static Lisp_Object
1817start_process_unwind (proc) 1806start_process_unwind (Lisp_Object proc)
1818 Lisp_Object proc;
1819{ 1807{
1820 if (!PROCESSP (proc)) 1808 if (!PROCESSP (proc))
1821 abort (); 1809 abort ();
@@ -1828,8 +1816,7 @@ start_process_unwind (proc)
1828} 1816}
1829 1817
1830static void 1818static void
1831create_process_1 (timer) 1819create_process_1 (struct atimer *timer)
1832 struct atimer *timer;
1833{ 1820{
1834 /* Nothing to do. */ 1821 /* Nothing to do. */
1835} 1822}
@@ -1855,10 +1842,7 @@ create_process_sigchld ()
1855#endif 1842#endif
1856 1843
1857void 1844void
1858create_process (process, new_argv, current_dir) 1845create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
1859 Lisp_Object process;
1860 char **new_argv;
1861 Lisp_Object current_dir;
1862{ 1846{
1863 int inchannel, outchannel; 1847 int inchannel, outchannel;
1864 pid_t pid; 1848 pid_t pid;
@@ -2245,8 +2229,7 @@ create_process (process, new_argv, current_dir)
2245} 2229}
2246 2230
2247void 2231void
2248create_pty (process) 2232create_pty (Lisp_Object process)
2249 Lisp_Object process;
2250{ 2233{
2251 int inchannel, outchannel; 2234 int inchannel, outchannel;
2252 2235
@@ -2333,9 +2316,7 @@ create_pty (process)
2333 The address family of sa is not included in the result. */ 2316 The address family of sa is not included in the result. */
2334 2317
2335static Lisp_Object 2318static Lisp_Object
2336conv_sockaddr_to_lisp (sa, len) 2319conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
2337 struct sockaddr *sa;
2338 int len;
2339{ 2320{
2340 Lisp_Object address; 2321 Lisp_Object address;
2341 int i; 2322 int i;
@@ -2404,9 +2385,7 @@ conv_sockaddr_to_lisp (sa, len)
2404/* Get family and required size for sockaddr structure to hold ADDRESS. */ 2385/* Get family and required size for sockaddr structure to hold ADDRESS. */
2405 2386
2406static int 2387static int
2407get_lisp_to_sockaddr_size (address, familyp) 2388get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp)
2408 Lisp_Object address;
2409 int *familyp;
2410{ 2389{
2411 register struct Lisp_Vector *p; 2390 register struct Lisp_Vector *p;
2412 2391
@@ -2451,11 +2430,7 @@ get_lisp_to_sockaddr_size (address, familyp)
2451 we return after zeroing *SA. */ 2430 we return after zeroing *SA. */
2452 2431
2453static void 2432static void
2454conv_lisp_to_sockaddr (family, address, sa, len) 2433conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int len)
2455 int family;
2456 Lisp_Object address;
2457 struct sockaddr *sa;
2458 int len;
2459{ 2434{
2460 register struct Lisp_Vector *p; 2435 register struct Lisp_Vector *p;
2461 register unsigned char *cp = NULL; 2436 register unsigned char *cp = NULL;
@@ -2612,9 +2587,7 @@ static const struct socket_options {
2612*/ 2587*/
2613 2588
2614static int 2589static int
2615set_socket_option (s, opt, val) 2590set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
2616 int s;
2617 Lisp_Object opt, val;
2618{ 2591{
2619 char *name; 2592 char *name;
2620 const struct socket_options *sopt; 2593 const struct socket_options *sopt;
@@ -3701,7 +3674,7 @@ usage: (make-network-process &rest ARGS) */)
3701 int len1 = sizeof (sa1); 3674 int len1 = sizeof (sa1);
3702 if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) 3675 if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0)
3703 contact = Fplist_put (contact, QClocal, 3676 contact = Fplist_put (contact, QClocal,
3704 conv_sockaddr_to_lisp (&sa1, len1)); 3677 conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1));
3705 } 3678 }
3706#endif 3679#endif
3707 } 3680 }
@@ -4154,8 +4127,7 @@ FLAGS is the current flags of the interface. */)
4154/* Turn off input and output for process PROC. */ 4127/* Turn off input and output for process PROC. */
4155 4128
4156void 4129void
4157deactivate_process (proc) 4130deactivate_process (Lisp_Object proc)
4158 Lisp_Object proc;
4159{ 4131{
4160 register int inchannel, outchannel; 4132 register int inchannel, outchannel;
4161 register struct Lisp_Process *p = XPROCESS (proc); 4133 register struct Lisp_Process *p = XPROCESS (proc);
@@ -4220,7 +4192,7 @@ deactivate_process (proc)
4220 to get rid of irrelevant descriptors. */ 4192 to get rid of irrelevant descriptors. */
4221 4193
4222void 4194void
4223close_process_descs () 4195close_process_descs (void)
4224{ 4196{
4225#ifndef WINDOWSNT 4197#ifndef WINDOWSNT
4226 int i; 4198 int i;
@@ -4313,9 +4285,7 @@ Return non-nil if we received any output before the timeout expired. */)
4313static int connect_counter = 0; 4285static int connect_counter = 0;
4314 4286
4315static void 4287static void
4316server_accept_connection (server, channel) 4288server_accept_connection (Lisp_Object server, int channel)
4317 Lisp_Object server;
4318 int channel;
4319{ 4289{
4320 Lisp_Object proc, caller, name, buffer; 4290 Lisp_Object proc, caller, name, buffer;
4321 Lisp_Object contact, host, service; 4291 Lisp_Object contact, host, service;
@@ -4531,8 +4501,7 @@ server_accept_connection (server, channel)
4531static int waiting_for_user_input_p; 4501static int waiting_for_user_input_p;
4532 4502
4533static Lisp_Object 4503static Lisp_Object
4534wait_reading_process_output_unwind (data) 4504wait_reading_process_output_unwind (Lisp_Object data)
4535 Lisp_Object data;
4536{ 4505{
4537 waiting_for_user_input_p = XINT (data); 4506 waiting_for_user_input_p = XINT (data);
4538 return Qnil; 4507 return Qnil;
@@ -4540,7 +4509,7 @@ wait_reading_process_output_unwind (data)
4540 4509
4541/* This is here so breakpoints can be put on it. */ 4510/* This is here so breakpoints can be put on it. */
4542static void 4511static void
4543wait_reading_process_output_1 () 4512wait_reading_process_output_1 (void)
4544{ 4513{
4545} 4514}
4546 4515
@@ -4553,10 +4522,7 @@ wait_reading_process_output_1 ()
4553 4522
4554#ifndef select 4523#ifndef select
4555static INLINE int 4524static INLINE int
4556select_wrapper (n, rfd, wfd, xfd, tmo) 4525select_wrapper (int n, fd_set *rfd, fd_set *wfd, fd_set *xfd, struct timeval *tmo)
4557 int n;
4558 SELECT_TYPE *rfd, *wfd, *xfd;
4559 EMACS_TIME *tmo;
4560{ 4526{
4561 return select (n, rfd, wfd, xfd, tmo); 4527 return select (n, rfd, wfd, xfd, tmo);
4562} 4528}
@@ -5261,15 +5227,13 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
5261/* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ 5227/* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */
5262 5228
5263static Lisp_Object 5229static Lisp_Object
5264read_process_output_call (fun_and_args) 5230read_process_output_call (Lisp_Object fun_and_args)
5265 Lisp_Object fun_and_args;
5266{ 5231{
5267 return apply1 (XCAR (fun_and_args), XCDR (fun_and_args)); 5232 return apply1 (XCAR (fun_and_args), XCDR (fun_and_args));
5268} 5233}
5269 5234
5270static Lisp_Object 5235static Lisp_Object
5271read_process_output_error_handler (error) 5236read_process_output_error_handler (Lisp_Object error)
5272 Lisp_Object error;
5273{ 5237{
5274 cmd_error_internal (error, "error in process filter: "); 5238 cmd_error_internal (error, "error in process filter: ");
5275 Vinhibit_quit = Qt; 5239 Vinhibit_quit = Qt;
@@ -5290,9 +5254,7 @@ read_process_output_error_handler (error)
5290 for decoding. */ 5254 for decoding. */
5291 5255
5292static int 5256static int
5293read_process_output (proc, channel) 5257read_process_output (Lisp_Object proc, register int channel)
5294 Lisp_Object proc;
5295 register int channel;
5296{ 5258{
5297 register int nbytes; 5259 register int nbytes;
5298 char *chars; 5260 char *chars;
@@ -5618,7 +5580,7 @@ jmp_buf send_process_frame;
5618Lisp_Object process_sent_to; 5580Lisp_Object process_sent_to;
5619 5581
5620SIGTYPE 5582SIGTYPE
5621send_process_trap () 5583send_process_trap (int ignore)
5622{ 5584{
5623 SIGNAL_THREAD_CHECK (SIGPIPE); 5585 SIGNAL_THREAD_CHECK (SIGPIPE);
5624 sigunblock (sigmask (SIGPIPE)); 5586 sigunblock (sigmask (SIGPIPE));
@@ -5636,11 +5598,8 @@ send_process_trap ()
5636 This function can evaluate Lisp code and can garbage collect. */ 5598 This function can evaluate Lisp code and can garbage collect. */
5637 5599
5638static void 5600static void
5639send_process (proc, buf, len, object) 5601send_process (volatile Lisp_Object proc, unsigned char *volatile buf,
5640 volatile Lisp_Object proc; 5602 volatile int len, volatile Lisp_Object object)
5641 unsigned char *volatile buf;
5642 volatile int len;
5643 volatile Lisp_Object object;
5644{ 5603{
5645 /* Use volatile to protect variables from being clobbered by longjmp. */ 5604 /* Use volatile to protect variables from being clobbered by longjmp. */
5646 struct Lisp_Process *p = XPROCESS (proc); 5605 struct Lisp_Process *p = XPROCESS (proc);
@@ -5927,8 +5886,7 @@ Output from processes can arrive in between bunches. */)
5927/* Return the foreground process group for the tty/pty that 5886/* Return the foreground process group for the tty/pty that
5928 the process P uses. */ 5887 the process P uses. */
5929static int 5888static int
5930emacs_get_tty_pgrp (p) 5889emacs_get_tty_pgrp (struct Lisp_Process *p)
5931 struct Lisp_Process *p;
5932{ 5890{
5933 int gid = -1; 5891 int gid = -1;
5934 5892
@@ -5997,11 +5955,8 @@ return t unconditionally. */)
5997 their uid, for which killpg would return an EPERM error. */ 5955 their uid, for which killpg would return an EPERM error. */
5998 5956
5999static void 5957static void
6000process_send_signal (process, signo, current_group, nomsg) 5958process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group,
6001 Lisp_Object process; 5959 int nomsg)
6002 int signo;
6003 Lisp_Object current_group;
6004 int nomsg;
6005{ 5960{
6006 Lisp_Object proc; 5961 Lisp_Object proc;
6007 register struct Lisp_Process *p; 5962 register struct Lisp_Process *p;
@@ -6570,8 +6525,7 @@ process has been transmitted to the serial port. */)
6570 If `buffer' is nil, kill all processes */ 6525 If `buffer' is nil, kill all processes */
6571 6526
6572void 6527void
6573kill_buffer_processes (buffer) 6528kill_buffer_processes (Lisp_Object buffer)
6574 Lisp_Object buffer;
6575{ 6529{
6576 Lisp_Object tail, proc; 6530 Lisp_Object tail, proc;
6577 6531
@@ -6616,8 +6570,7 @@ kill_buffer_processes (buffer)
6616 6570
6617#ifdef SIGCHLD 6571#ifdef SIGCHLD
6618SIGTYPE 6572SIGTYPE
6619sigchld_handler (signo) 6573sigchld_handler (int signo)
6620 int signo;
6621{ 6574{
6622 int old_errno = errno; 6575 int old_errno = errno;
6623 Lisp_Object proc; 6576 Lisp_Object proc;
@@ -6758,16 +6711,14 @@ sigchld_handler (signo)
6758 6711
6759 6712
6760static Lisp_Object 6713static Lisp_Object
6761exec_sentinel_unwind (data) 6714exec_sentinel_unwind (Lisp_Object data)
6762 Lisp_Object data;
6763{ 6715{
6764 XPROCESS (XCAR (data))->sentinel = XCDR (data); 6716 XPROCESS (XCAR (data))->sentinel = XCDR (data);
6765 return Qnil; 6717 return Qnil;
6766} 6718}
6767 6719
6768static Lisp_Object 6720static Lisp_Object
6769exec_sentinel_error_handler (error) 6721exec_sentinel_error_handler (Lisp_Object error)
6770 Lisp_Object error;
6771{ 6722{
6772 cmd_error_internal (error, "error in process sentinel: "); 6723 cmd_error_internal (error, "error in process sentinel: ");
6773 Vinhibit_quit = Qt; 6724 Vinhibit_quit = Qt;
@@ -6777,8 +6728,7 @@ exec_sentinel_error_handler (error)
6777} 6728}
6778 6729
6779static void 6730static void
6780exec_sentinel (proc, reason) 6731exec_sentinel (Lisp_Object proc, Lisp_Object reason)
6781 Lisp_Object proc, reason;
6782{ 6732{
6783 Lisp_Object sentinel, obuffer, odeactivate, okeymap; 6733 Lisp_Object sentinel, obuffer, odeactivate, okeymap;
6784 register struct Lisp_Process *p = XPROCESS (proc); 6734 register struct Lisp_Process *p = XPROCESS (proc);
@@ -6863,8 +6813,7 @@ exec_sentinel (proc, reason)
6863 but can be done at other times. */ 6813 but can be done at other times. */
6864 6814
6865static void 6815static void
6866status_notify (deleting_process) 6816status_notify (struct Lisp_Process *deleting_process)
6867 struct Lisp_Process *deleting_process;
6868{ 6817{
6869 register Lisp_Object proc, buffer; 6818 register Lisp_Object proc, buffer;
6870 Lisp_Object tail, msg; 6819 Lisp_Object tail, msg;
@@ -7064,8 +7013,7 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p,
7064/* Add DESC to the set of keyboard input descriptors. */ 7013/* Add DESC to the set of keyboard input descriptors. */
7065 7014
7066void 7015void
7067add_keyboard_wait_descriptor (desc) 7016add_keyboard_wait_descriptor (int desc)
7068 int desc;
7069{ 7017{
7070 FD_SET (desc, &input_wait_mask); 7018 FD_SET (desc, &input_wait_mask);
7071 FD_SET (desc, &non_process_wait_mask); 7019 FD_SET (desc, &non_process_wait_mask);
@@ -7076,8 +7024,7 @@ add_keyboard_wait_descriptor (desc)
7076static int add_gpm_wait_descriptor_called_flag; 7024static int add_gpm_wait_descriptor_called_flag;
7077 7025
7078void 7026void
7079add_gpm_wait_descriptor (desc) 7027add_gpm_wait_descriptor (int desc)
7080 int desc;
7081{ 7028{
7082 if (! add_gpm_wait_descriptor_called_flag) 7029 if (! add_gpm_wait_descriptor_called_flag)
7083 FD_CLR (0, &input_wait_mask); 7030 FD_CLR (0, &input_wait_mask);
@@ -7091,8 +7038,7 @@ add_gpm_wait_descriptor (desc)
7091/* From now on, do not expect DESC to give keyboard input. */ 7038/* From now on, do not expect DESC to give keyboard input. */
7092 7039
7093void 7040void
7094delete_keyboard_wait_descriptor (desc) 7041delete_keyboard_wait_descriptor (int desc)
7095 int desc;
7096{ 7042{
7097 int fd; 7043 int fd;
7098 int lim = max_keyboard_desc; 7044 int lim = max_keyboard_desc;
@@ -7109,8 +7055,7 @@ delete_keyboard_wait_descriptor (desc)
7109} 7055}
7110 7056
7111void 7057void
7112delete_gpm_wait_descriptor (desc) 7058delete_gpm_wait_descriptor (int desc)
7113 int desc;
7114{ 7059{
7115 int fd; 7060 int fd;
7116 int lim = max_gpm_desc; 7061 int lim = max_gpm_desc;
@@ -7130,8 +7075,7 @@ delete_gpm_wait_descriptor (desc)
7130 that corresponds to one of the keyboard input descriptors. */ 7075 that corresponds to one of the keyboard input descriptors. */
7131 7076
7132static int 7077static int
7133keyboard_bit_set (mask) 7078keyboard_bit_set (fd_set *mask)
7134 SELECT_TYPE *mask;
7135{ 7079{
7136 int fd; 7080 int fd;
7137 7081
@@ -7215,7 +7159,7 @@ integer or floating point values.
7215} 7159}
7216 7160
7217void 7161void
7218init_process () 7162init_process (void)
7219{ 7163{
7220 register int i; 7164 register int i;
7221 7165
@@ -7318,7 +7262,7 @@ init_process ()
7318} 7262}
7319 7263
7320void 7264void
7321syms_of_process () 7265syms_of_process (void)
7322{ 7266{
7323 Qprocessp = intern_c_string ("processp"); 7267 Qprocessp = intern_c_string ("processp");
7324 staticpro (&Qprocessp); 7268 staticpro (&Qprocessp);
diff --git a/src/term.c b/src/term.c
index 275dfa98adc..fb64ca5d6b3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -181,7 +181,7 @@ static int system_uses_terminfo;
181 181
182char *tparam (); 182char *tparam ();
183 183
184extern char *tgetstr (); 184extern char *tgetstr (char *, char **);
185 185
186 186
187#ifdef HAVE_GPM 187#ifdef HAVE_GPM
@@ -558,10 +558,7 @@ static int encode_terminal_dst_size;
558 sequence, and return a pointer to that byte sequence. */ 558 sequence, and return a pointer to that byte sequence. */
559 559
560unsigned char * 560unsigned char *
561encode_terminal_code (src, src_len, coding) 561encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding)
562 struct glyph *src;
563 int src_len;
564 struct coding_system *coding;
565{ 562{
566 struct glyph *src_end = src + src_len; 563 struct glyph *src_end = src + src_len;
567 unsigned char *buf; 564 unsigned char *buf;
@@ -836,10 +833,8 @@ tty_write_glyphs (struct frame *f, struct glyph *string, int len)
836#ifdef HAVE_GPM /* Only used by GPM code. */ 833#ifdef HAVE_GPM /* Only used by GPM code. */
837 834
838static void 835static void
839tty_write_glyphs_with_face (f, string, len, face_id) 836tty_write_glyphs_with_face (register struct frame *f, register struct glyph *string,
840 register struct frame *f; 837 register int len, register int face_id)
841 register struct glyph *string;
842 register int len, face_id;
843{ 838{
844 unsigned char *conversion_buffer; 839 unsigned char *conversion_buffer;
845 struct coding_system *coding; 840 struct coding_system *coding;
@@ -1366,16 +1361,14 @@ static struct fkey_table keys[] =
1366 1361
1367static char **term_get_fkeys_address; 1362static char **term_get_fkeys_address;
1368static KBOARD *term_get_fkeys_kboard; 1363static KBOARD *term_get_fkeys_kboard;
1369static Lisp_Object term_get_fkeys_1 (); 1364static Lisp_Object term_get_fkeys_1 (void);
1370 1365
1371/* Find the escape codes sent by the function keys for Vinput_decode_map. 1366/* Find the escape codes sent by the function keys for Vinput_decode_map.
1372 This function scans the termcap function key sequence entries, and 1367 This function scans the termcap function key sequence entries, and
1373 adds entries to Vinput_decode_map for each function key it finds. */ 1368 adds entries to Vinput_decode_map for each function key it finds. */
1374 1369
1375static void 1370static void
1376term_get_fkeys (address, kboard) 1371term_get_fkeys (char **address, KBOARD *kboard)
1377 char **address;
1378 KBOARD *kboard;
1379{ 1372{
1380 /* We run the body of the function (term_get_fkeys_1) and ignore all Lisp 1373 /* We run the body of the function (term_get_fkeys_1) and ignore all Lisp
1381 errors during the call. The only errors should be from Fdefine_key 1374 errors during the call. The only errors should be from Fdefine_key
@@ -1392,7 +1385,7 @@ term_get_fkeys (address, kboard)
1392} 1385}
1393 1386
1394static Lisp_Object 1387static Lisp_Object
1395term_get_fkeys_1 () 1388term_get_fkeys_1 (void)
1396{ 1389{
1397 int i; 1390 int i;
1398 1391
@@ -1529,8 +1522,7 @@ static void produce_composite_glyph (struct it *);
1529 IT->pixel_width > 1. */ 1522 IT->pixel_width > 1. */
1530 1523
1531static void 1524static void
1532append_glyph (it) 1525append_glyph (struct it *it)
1533 struct it *it;
1534{ 1526{
1535 struct glyph *glyph, *end; 1527 struct glyph *glyph, *end;
1536 int i; 1528 int i;
@@ -1609,8 +1601,7 @@ append_glyph (it)
1609 instead they use the macro PRODUCE_GLYPHS. */ 1601 instead they use the macro PRODUCE_GLYPHS. */
1610 1602
1611void 1603void
1612produce_glyphs (it) 1604produce_glyphs (struct it *it)
1613 struct it *it;
1614{ 1605{
1615 /* If a hook is installed, let it do the work. */ 1606 /* If a hook is installed, let it do the work. */
1616 1607
@@ -1728,8 +1719,7 @@ produce_glyphs (it)
1728 to reach HPOS, a value in canonical character units. */ 1719 to reach HPOS, a value in canonical character units. */
1729 1720
1730static void 1721static void
1731produce_stretch_glyph (it) 1722produce_stretch_glyph (struct it *it)
1732 struct it *it;
1733{ 1723{
1734 /* (space :width WIDTH ...) */ 1724 /* (space :width WIDTH ...) */
1735 Lisp_Object prop, plist; 1725 Lisp_Object prop, plist;
@@ -1798,8 +1788,7 @@ produce_stretch_glyph (it)
1798 face. */ 1788 face. */
1799 1789
1800static void 1790static void
1801append_composite_glyph (it) 1791append_composite_glyph (struct it *it)
1802 struct it *it;
1803{ 1792{
1804 struct glyph *glyph; 1793 struct glyph *glyph;
1805 1794
@@ -1863,8 +1852,7 @@ append_composite_glyph (it)
1863 correctly. */ 1852 correctly. */
1864 1853
1865static void 1854static void
1866produce_composite_glyph (it) 1855produce_composite_glyph (struct it *it)
1867 struct it *it;
1868{ 1856{
1869 int c; 1857 int c;
1870 1858
@@ -1894,9 +1882,7 @@ produce_composite_glyph (it)
1894 face_id, c, len of IT are left untouched. */ 1882 face_id, c, len of IT are left untouched. */
1895 1883
1896void 1884void
1897produce_special_glyphs (it, what) 1885produce_special_glyphs (struct it *it, enum display_element_type what)
1898 struct it *it;
1899 enum display_element_type what;
1900{ 1886{
1901 struct it temp_it; 1887 struct it temp_it;
1902 Lisp_Object gc; 1888 Lisp_Object gc;
@@ -1970,9 +1956,7 @@ produce_special_glyphs (it, what)
1970 FACE_ID is a realized face ID number, in the face cache. */ 1956 FACE_ID is a realized face ID number, in the face cache. */
1971 1957
1972static void 1958static void
1973turn_on_face (f, face_id) 1959turn_on_face (struct frame *f, int face_id)
1974 struct frame *f;
1975 int face_id;
1976{ 1960{
1977 struct face *face = FACE_FROM_ID (f, face_id); 1961 struct face *face = FACE_FROM_ID (f, face_id);
1978 long fg = face->foreground; 1962 long fg = face->foreground;
@@ -2069,9 +2053,7 @@ turn_on_face (f, face_id)
2069/* Turn off appearances of face FACE_ID on tty frame F. */ 2053/* Turn off appearances of face FACE_ID on tty frame F. */
2070 2054
2071static void 2055static void
2072turn_off_face (f, face_id) 2056turn_off_face (struct frame *f, int face_id)
2073 struct frame *f;
2074 int face_id;
2075{ 2057{
2076 struct face *face = FACE_FROM_ID (f, face_id); 2058 struct face *face = FACE_FROM_ID (f, face_id);
2077 struct tty_display_info *tty = FRAME_TTY (f); 2059 struct tty_display_info *tty = FRAME_TTY (f);
@@ -2124,10 +2106,8 @@ turn_off_face (f, face_id)
2124 colors FG and BG. */ 2106 colors FG and BG. */
2125 2107
2126int 2108int
2127tty_capable_p (tty, caps, fg, bg) 2109tty_capable_p (struct tty_display_info *tty, unsigned int caps,
2128 struct tty_display_info *tty; 2110 unsigned long fg, unsigned long bg)
2129 unsigned caps;
2130 unsigned long fg, bg;
2131{ 2111{
2132#define TTY_CAPABLE_P_TRY(tty, cap, TS, NC_bit) \ 2112#define TTY_CAPABLE_P_TRY(tty, cap, TS, NC_bit) \
2133 if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ 2113 if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \
@@ -2267,9 +2247,7 @@ tty_setup_colors (struct tty_display_info *tty, int mode)
2267} 2247}
2268 2248
2269void 2249void
2270set_tty_color_mode (tty, f) 2250set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
2271 struct tty_display_info *tty;
2272 struct frame *f;
2273{ 2251{
2274 Lisp_Object tem, val; 2252 Lisp_Object tem, val;
2275 Lisp_Object color_mode; 2253 Lisp_Object color_mode;
@@ -2333,8 +2311,7 @@ get_tty_terminal (Lisp_Object terminal, int throw)
2333 Returns NULL if the named terminal device is not opened. */ 2311 Returns NULL if the named terminal device is not opened. */
2334 2312
2335struct terminal * 2313struct terminal *
2336get_named_tty (name) 2314get_named_tty (char *name)
2337 char *name;
2338{ 2315{
2339 struct terminal *t; 2316 struct terminal *t;
2340 2317
@@ -2664,7 +2641,7 @@ term_show_mouse_face (enum draw_glyphs_face draw)
2664} 2641}
2665 2642
2666static void 2643static void
2667term_clear_mouse_face () 2644term_clear_mouse_face (void)
2668{ 2645{
2669 if (!NILP (mouse_face_window)) 2646 if (!NILP (mouse_face_window))
2670 term_show_mouse_face (DRAW_NORMAL_TEXT); 2647 term_show_mouse_face (DRAW_NORMAL_TEXT);
@@ -4072,7 +4049,7 @@ mark_ttys (void)
4072 4049
4073 4050
4074void 4051void
4075syms_of_term () 4052syms_of_term (void)
4076{ 4053{
4077 DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo, 4054 DEFVAR_BOOL ("system-uses-terminfo", &system_uses_terminfo,
4078 doc: /* Non-nil means the system uses terminfo rather than termcap. 4055 doc: /* Non-nil means the system uses terminfo rather than termcap.
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 1f401601bbf..25f42d9904f 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -42,7 +42,7 @@ static enum warnlevel warnlevel;
42 42
43/* Function to call to issue a warning; 43/* Function to call to issue a warning;
44 0 means don't issue them. */ 44 0 means don't issue them. */
45static void (*warn_function) (); 45static void (*warn_function) (char *);
46 46
47/* Start of data space; can be changed by calling malloc_init. */ 47/* Start of data space; can be changed by calling malloc_init. */
48static POINTER data_space_start; 48static POINTER data_space_start;
@@ -53,7 +53,7 @@ static unsigned long lim_data;
53 53
54#if defined (HAVE_GETRLIMIT) && defined (RLIMIT_AS) 54#if defined (HAVE_GETRLIMIT) && defined (RLIMIT_AS)
55static void 55static void
56get_lim_data () 56get_lim_data (void)
57{ 57{
58 struct rlimit rlimit; 58 struct rlimit rlimit;
59 59
@@ -170,7 +170,7 @@ get_lim_data ()
170/* Verify amount of memory available, complaining if we're near the end. */ 170/* Verify amount of memory available, complaining if we're near the end. */
171 171
172static void 172static void
173check_memory_limits () 173check_memory_limits (void)
174{ 174{
175#ifdef REL_ALLOC 175#ifdef REL_ALLOC
176 extern POINTER (*real_morecore) (); 176 extern POINTER (*real_morecore) ();
@@ -249,9 +249,7 @@ check_memory_limits ()
249 WARNFUN specifies the function to call to issue a warning. */ 249 WARNFUN specifies the function to call to issue a warning. */
250 250
251void 251void
252memory_warnings (start, warnfun) 252memory_warnings (POINTER start, void (*warnfun) (char *))
253 POINTER start;
254 void (*warnfun) ();
255{ 253{
256 extern void (* __after_morecore_hook) (); /* From gmalloc.c */ 254 extern void (* __after_morecore_hook) (); /* From gmalloc.c */
257 255
diff --git a/src/xdisp.c b/src/xdisp.c
index cea8c625819..14a1cf6bb15 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1011,7 +1011,7 @@ static void redisplay_internal (int);
1011static int echo_area_display (int); 1011static int echo_area_display (int);
1012static void redisplay_windows (Lisp_Object); 1012static void redisplay_windows (Lisp_Object);
1013static void redisplay_window (Lisp_Object, int); 1013static void redisplay_window (Lisp_Object, int);
1014static Lisp_Object redisplay_window_error (); 1014static Lisp_Object redisplay_window_error (Lisp_Object);
1015static Lisp_Object redisplay_window_0 (Lisp_Object); 1015static Lisp_Object redisplay_window_0 (Lisp_Object);
1016static Lisp_Object redisplay_window_1 (Lisp_Object); 1016static Lisp_Object redisplay_window_1 (Lisp_Object);
1017static int update_menu_bar (struct frame *, int, int); 1017static int update_menu_bar (struct frame *, int, int);
@@ -1109,8 +1109,7 @@ static void append_stretch_glyph (struct it *, Lisp_Object,
1109 This is the height of W minus the height of a mode line, if any. */ 1109 This is the height of W minus the height of a mode line, if any. */
1110 1110
1111INLINE int 1111INLINE int
1112window_text_bottom_y (w) 1112window_text_bottom_y (struct window *w)
1113 struct window *w;
1114{ 1113{
1115 int height = WINDOW_TOTAL_HEIGHT (w); 1114 int height = WINDOW_TOTAL_HEIGHT (w);
1116 1115
@@ -1124,9 +1123,7 @@ window_text_bottom_y (w)
1124 the left and right of the window. */ 1123 the left and right of the window. */
1125 1124
1126INLINE int 1125INLINE int
1127window_box_width (w, area) 1126window_box_width (struct window *w, int area)
1128 struct window *w;
1129 int area;
1130{ 1127{
1131 int cols = XFASTINT (w->total_cols); 1128 int cols = XFASTINT (w->total_cols);
1132 int pixels = 0; 1129 int pixels = 0;
@@ -1165,8 +1162,7 @@ window_box_width (w, area)
1165 including mode lines of W, if any. */ 1162 including mode lines of W, if any. */
1166 1163
1167INLINE int 1164INLINE int
1168window_box_height (w) 1165window_box_height (struct window *w)
1169 struct window *w;
1170{ 1166{
1171 struct frame *f = XFRAME (w->frame); 1167 struct frame *f = XFRAME (w->frame);
1172 int height = WINDOW_TOTAL_HEIGHT (w); 1168 int height = WINDOW_TOTAL_HEIGHT (w);
@@ -1213,9 +1209,7 @@ window_box_height (w)
1213 whole window, to the right of the left fringe of W. */ 1209 whole window, to the right of the left fringe of W. */
1214 1210
1215INLINE int 1211INLINE int
1216window_box_left_offset (w, area) 1212window_box_left_offset (struct window *w, int area)
1217 struct window *w;
1218 int area;
1219{ 1213{
1220 int x; 1214 int x;
1221 1215
@@ -1247,9 +1241,7 @@ window_box_left_offset (w, area)
1247 whole window, to the left of the right fringe of W. */ 1241 whole window, to the left of the right fringe of W. */
1248 1242
1249INLINE int 1243INLINE int
1250window_box_right_offset (w, area) 1244window_box_right_offset (struct window *w, int area)
1251 struct window *w;
1252 int area;
1253{ 1245{
1254 return window_box_left_offset (w, area) + window_box_width (w, area); 1246 return window_box_left_offset (w, area) + window_box_width (w, area);
1255} 1247}
@@ -1259,9 +1251,7 @@ window_box_right_offset (w, area)
1259 whole window, to the right of the left fringe of W. */ 1251 whole window, to the right of the left fringe of W. */
1260 1252
1261INLINE int 1253INLINE int
1262window_box_left (w, area) 1254window_box_left (struct window *w, int area)
1263 struct window *w;
1264 int area;
1265{ 1255{
1266 struct frame *f = XFRAME (w->frame); 1256 struct frame *f = XFRAME (w->frame);
1267 int x; 1257 int x;
@@ -1281,9 +1271,7 @@ window_box_left (w, area)
1281 whole window, to the left of the right fringe of W. */ 1271 whole window, to the left of the right fringe of W. */
1282 1272
1283INLINE int 1273INLINE int
1284window_box_right (w, area) 1274window_box_right (struct window *w, int area)
1285 struct window *w;
1286 int area;
1287{ 1275{
1288 return window_box_left (w, area) + window_box_width (w, area); 1276 return window_box_left (w, area) + window_box_width (w, area);
1289} 1277}
@@ -1296,10 +1284,8 @@ window_box_right (w, area)
1296 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ 1284 *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */
1297 1285
1298INLINE void 1286INLINE void
1299window_box (w, area, box_x, box_y, box_width, box_height) 1287window_box (struct window *w, int area, int *box_x, int *box_y,
1300 struct window *w; 1288 int *box_width, int *box_height)
1301 int area;
1302 int *box_x, *box_y, *box_width, *box_height;
1303{ 1289{
1304 if (box_width) 1290 if (box_width)
1305 *box_width = window_box_width (w, area); 1291 *box_width = window_box_width (w, area);
@@ -1347,8 +1333,7 @@ window_box_edges (w, area, top_left_x, top_left_y,
1347 This can modify IT's settings. */ 1333 This can modify IT's settings. */
1348 1334
1349int 1335int
1350line_bottom_y (it) 1336line_bottom_y (struct it *it)
1351 struct it *it;
1352{ 1337{
1353 int line_height = it->max_ascent + it->max_descent; 1338 int line_height = it->max_ascent + it->max_descent;
1354 int line_top_y = it->current_y; 1339 int line_top_y = it->current_y;
@@ -1390,9 +1375,8 @@ line_bottom_y (it)
1390 Set *ROWH and *VPOS to row's visible height and VPOS (row number). */ 1375 Set *ROWH and *VPOS to row's visible height and VPOS (row number). */
1391 1376
1392int 1377int
1393pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos) 1378pos_visible_p (struct window *w, int charpos, int *x, int *y,
1394 struct window *w; 1379 int *rtop, int *rbot, int *rowh, int *vpos)
1395 int charpos, *x, *y, *rtop, *rbot, *rowh, *vpos;
1396{ 1380{
1397 struct it it; 1381 struct it it;
1398 struct text_pos top; 1382 struct text_pos top;
@@ -1531,9 +1515,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
1531 character. */ 1515 character. */
1532 1516
1533static INLINE int 1517static INLINE int
1534string_char_and_length (str, len) 1518string_char_and_length (const unsigned char *str, int *len)
1535 const unsigned char *str;
1536 int *len;
1537{ 1519{
1538 int c; 1520 int c;
1539 1521
@@ -1553,10 +1535,7 @@ string_char_and_length (str, len)
1553 in STRING, return the position NCHARS ahead (NCHARS >= 0). */ 1535 in STRING, return the position NCHARS ahead (NCHARS >= 0). */
1554 1536
1555static struct text_pos 1537static struct text_pos
1556string_pos_nchars_ahead (pos, string, nchars) 1538string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, int nchars)
1557 struct text_pos pos;
1558 Lisp_Object string;
1559 int nchars;
1560{ 1539{
1561 xassert (STRINGP (string) && nchars >= 0); 1540 xassert (STRINGP (string) && nchars >= 0);
1562 1541
@@ -1586,9 +1565,7 @@ string_pos_nchars_ahead (pos, string, nchars)
1586 for character position CHARPOS in STRING. */ 1565 for character position CHARPOS in STRING. */
1587 1566
1588static INLINE struct text_pos 1567static INLINE struct text_pos
1589string_pos (charpos, string) 1568string_pos (int charpos, Lisp_Object string)
1590 int charpos;
1591 Lisp_Object string;
1592{ 1569{
1593 struct text_pos pos; 1570 struct text_pos pos;
1594 xassert (STRINGP (string)); 1571 xassert (STRINGP (string));
@@ -1603,10 +1580,7 @@ string_pos (charpos, string)
1603 means recognize multibyte characters. */ 1580 means recognize multibyte characters. */
1604 1581
1605static struct text_pos 1582static struct text_pos
1606c_string_pos (charpos, s, multibyte_p) 1583c_string_pos (int charpos, unsigned char *s, int multibyte_p)
1607 int charpos;
1608 unsigned char *s;
1609 int multibyte_p;
1610{ 1584{
1611 struct text_pos pos; 1585 struct text_pos pos;
1612 1586
@@ -1638,9 +1612,7 @@ c_string_pos (charpos, s, multibyte_p)
1638 non-zero means recognize multibyte characters. */ 1612 non-zero means recognize multibyte characters. */
1639 1613
1640static int 1614static int
1641number_of_chars (s, multibyte_p) 1615number_of_chars (unsigned char *s, int multibyte_p)
1642 unsigned char *s;
1643 int multibyte_p;
1644{ 1616{
1645 int nchars; 1617 int nchars;
1646 1618
@@ -1667,9 +1639,7 @@ number_of_chars (s, multibyte_p)
1667 NEWPOS->charpos must be >= POS.charpos. */ 1639 NEWPOS->charpos must be >= POS.charpos. */
1668 1640
1669static void 1641static void
1670compute_string_pos (newpos, pos, string) 1642compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string)
1671 struct text_pos *newpos, pos;
1672 Lisp_Object string;
1673{ 1643{
1674 xassert (STRINGP (string)); 1644 xassert (STRINGP (string));
1675 xassert (CHARPOS (*newpos) >= CHARPOS (pos)); 1645 xassert (CHARPOS (*newpos) >= CHARPOS (pos));
@@ -1686,9 +1656,7 @@ compute_string_pos (newpos, pos, string)
1686 frame F. FACE_ID specifies what line's height to estimate. */ 1656 frame F. FACE_ID specifies what line's height to estimate. */
1687 1657
1688int 1658int
1689estimate_mode_line_height (f, face_id) 1659estimate_mode_line_height (struct frame *f, enum face_id face_id)
1690 struct frame *f;
1691 enum face_id face_id;
1692{ 1660{
1693#ifdef HAVE_WINDOW_SYSTEM 1661#ifdef HAVE_WINDOW_SYSTEM
1694 if (FRAME_WINDOW_P (f)) 1662 if (FRAME_WINDOW_P (f))
@@ -1722,12 +1690,8 @@ estimate_mode_line_height (f, face_id)
1722 not force the value into range. */ 1690 not force the value into range. */
1723 1691
1724void 1692void
1725pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip) 1693pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y,
1726 FRAME_PTR f; 1694 int *x, int *y, NativeRectangle *bounds, int noclip)
1727 register int pix_x, pix_y;
1728 int *x, *y;
1729 NativeRectangle *bounds;
1730 int noclip;
1731{ 1695{
1732 1696
1733#ifdef HAVE_WINDOW_SYSTEM 1697#ifdef HAVE_WINDOW_SYSTEM
@@ -1776,10 +1740,8 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
1776 return 0. */ 1740 return 0. */
1777 1741
1778int 1742int
1779glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y) 1743glyph_to_pixel_coords (struct window *w, int hpos, int vpos,
1780 struct window *w; 1744 int *frame_x, int *frame_y)
1781 int hpos, vpos;
1782 int *frame_x, *frame_y;
1783{ 1745{
1784#ifdef HAVE_WINDOW_SYSTEM 1746#ifdef HAVE_WINDOW_SYSTEM
1785 if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))) 1747 if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))))
@@ -1839,10 +1801,8 @@ glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y)
1839 1801
1840static 1802static
1841struct glyph * 1803struct glyph *
1842x_y_to_hpos_vpos (w, x, y, hpos, vpos, dx, dy, area) 1804x_y_to_hpos_vpos (struct window *w, int x, int y, int *hpos, int *vpos,
1843 struct window *w; 1805 int *dx, int *dy, int *area)
1844 int x, y;
1845 int *hpos, *vpos, *dx, *dy, *area;
1846{ 1806{
1847 struct glyph *glyph, *end; 1807 struct glyph *glyph, *end;
1848 struct glyph_row *row = NULL; 1808 struct glyph_row *row = NULL;
@@ -1919,9 +1879,7 @@ x_y_to_hpos_vpos (w, x, y, hpos, vpos, dx, dy, area)
1919 Takes pseudo-windows into account. */ 1879 Takes pseudo-windows into account. */
1920 1880
1921void 1881void
1922frame_to_window_pixel_xy (w, x, y) 1882frame_to_window_pixel_xy (struct window *w, int *x, int *y)
1923 struct window *w;
1924 int *x, *y;
1925{ 1883{
1926 if (w->pseudo_window_p) 1884 if (w->pseudo_window_p)
1927 { 1885 {
@@ -1943,10 +1901,7 @@ frame_to_window_pixel_xy (w, x, y)
1943 Return the number of stored rectangles. */ 1901 Return the number of stored rectangles. */
1944 1902
1945int 1903int
1946get_glyph_string_clip_rects (s, rects, n) 1904get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int n)
1947 struct glyph_string *s;
1948 NativeRectangle *rects;
1949 int n;
1950{ 1905{
1951 XRectangle r; 1906 XRectangle r;
1952 1907
@@ -2140,9 +2095,7 @@ get_glyph_string_clip_rects (s, rects, n)
2140 Return in *NR the clipping rectangle for glyph string S. */ 2095 Return in *NR the clipping rectangle for glyph string S. */
2141 2096
2142void 2097void
2143get_glyph_string_clip_rect (s, nr) 2098get_glyph_string_clip_rect (struct glyph_string *s, NativeRectangle *nr)
2144 struct glyph_string *s;
2145 NativeRectangle *nr;
2146{ 2099{
2147 get_glyph_string_clip_rects (s, nr, 1); 2100 get_glyph_string_clip_rects (s, nr, 1);
2148} 2101}
@@ -2154,11 +2107,8 @@ get_glyph_string_clip_rect (s, nr)
2154*/ 2107*/
2155 2108
2156void 2109void
2157get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp) 2110get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
2158 struct window *w; 2111 struct glyph *glyph, int *xp, int *yp, int *heightp)
2159 struct glyph_row *row;
2160 struct glyph *glyph;
2161 int *xp, *yp, *heightp;
2162{ 2112{
2163 struct frame *f = XFRAME (WINDOW_FRAME (w)); 2113 struct frame *f = XFRAME (WINDOW_FRAME (w));
2164 int x, y, wd, h, h0, y0; 2114 int x, y, wd, h, h0, y0;
@@ -2218,10 +2168,7 @@ get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp)
2218 */ 2168 */
2219 2169
2220void 2170void
2221remember_mouse_glyph (f, gx, gy, rect) 2171remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
2222 struct frame *f;
2223 int gx, gy;
2224 NativeRectangle *rect;
2225{ 2172{
2226 Lisp_Object window; 2173 Lisp_Object window;
2227 struct window *w; 2174 struct window *w;
@@ -2417,8 +2364,7 @@ remember_mouse_glyph (f, gx, gy, rect)
2417/* Error handler for safe_eval and safe_call. */ 2364/* Error handler for safe_eval and safe_call. */
2418 2365
2419static Lisp_Object 2366static Lisp_Object
2420safe_eval_handler (arg) 2367safe_eval_handler (Lisp_Object arg)
2421 Lisp_Object arg;
2422{ 2368{
2423 add_to_log ("Error during redisplay: %s", arg, Qnil); 2369 add_to_log ("Error during redisplay: %s", arg, Qnil);
2424 return Qnil; 2370 return Qnil;
@@ -2433,9 +2379,7 @@ safe_eval_handler (arg)
2433 redisplay during the evaluation. */ 2379 redisplay during the evaluation. */
2434 2380
2435Lisp_Object 2381Lisp_Object
2436safe_call (nargs, args) 2382safe_call (int nargs, Lisp_Object *args)
2437 int nargs;
2438 Lisp_Object *args;
2439{ 2383{
2440 Lisp_Object val; 2384 Lisp_Object val;
2441 2385
@@ -2465,8 +2409,7 @@ safe_call (nargs, args)
2465 Return the result, or nil if something went wrong. */ 2409 Return the result, or nil if something went wrong. */
2466 2410
2467Lisp_Object 2411Lisp_Object
2468safe_call1 (fn, arg) 2412safe_call1 (Lisp_Object fn, Lisp_Object arg)
2469 Lisp_Object fn, arg;
2470{ 2413{
2471 Lisp_Object args[2]; 2414 Lisp_Object args[2];
2472 args[0] = fn; 2415 args[0] = fn;
@@ -2595,12 +2538,9 @@ check_window_end (w)
2595 the desired matrix of W. */ 2538 the desired matrix of W. */
2596 2539
2597void 2540void
2598init_iterator (it, w, charpos, bytepos, row, base_face_id) 2541init_iterator (struct it *it, struct window *w,
2599 struct it *it; 2542 EMACS_INT charpos, EMACS_INT bytepos,
2600 struct window *w; 2543 struct glyph_row *row, enum face_id base_face_id)
2601 EMACS_INT charpos, bytepos;
2602 struct glyph_row *row;
2603 enum face_id base_face_id;
2604{ 2544{
2605 int highlight_region_p; 2545 int highlight_region_p;
2606 enum face_id remapped_base_face_id = base_face_id; 2546 enum face_id remapped_base_face_id = base_face_id;
@@ -2896,10 +2836,7 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
2896/* Initialize IT for the display of window W with window start POS. */ 2836/* Initialize IT for the display of window W with window start POS. */
2897 2837
2898void 2838void
2899start_display (it, w, pos) 2839start_display (struct it *it, struct window *w, struct text_pos pos)
2900 struct it *it;
2901 struct window *w;
2902 struct text_pos pos;
2903{ 2840{
2904 struct glyph_row *row; 2841 struct glyph_row *row;
2905 int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0; 2842 int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
@@ -2971,9 +2908,7 @@ start_display (it, w, pos)
2971 text. W is the window we display, for text property lookup. */ 2908 text. W is the window we display, for text property lookup. */
2972 2909
2973static int 2910static int
2974in_ellipses_for_invisible_text_p (pos, w) 2911in_ellipses_for_invisible_text_p (struct display_pos *pos, struct window *w)
2975 struct display_pos *pos;
2976 struct window *w;
2977{ 2912{
2978 Lisp_Object prop, window; 2913 Lisp_Object prop, window;
2979 int ellipses_p = 0; 2914 int ellipses_p = 0;
@@ -3007,10 +2942,7 @@ in_ellipses_for_invisible_text_p (pos, w)
3007 is zero if there are overlay strings with newlines at POS. */ 2942 is zero if there are overlay strings with newlines at POS. */
3008 2943
3009static int 2944static int
3010init_from_display_pos (it, w, pos) 2945init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
3011 struct it *it;
3012 struct window *w;
3013 struct display_pos *pos;
3014{ 2946{
3015 EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos); 2947 EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos);
3016 int i, overlay_strings_with_newlines = 0; 2948 int i, overlay_strings_with_newlines = 0;
@@ -3118,10 +3050,7 @@ init_from_display_pos (it, w, pos)
3118 starting at ROW->start. */ 3050 starting at ROW->start. */
3119 3051
3120static void 3052static void
3121init_to_row_start (it, w, row) 3053init_to_row_start (struct it *it, struct window *w, struct glyph_row *row)
3122 struct it *it;
3123 struct window *w;
3124 struct glyph_row *row;
3125{ 3054{
3126 init_from_display_pos (it, w, &row->start); 3055 init_from_display_pos (it, w, &row->start);
3127 it->start = row->start; 3056 it->start = row->start;
@@ -3136,10 +3065,7 @@ init_to_row_start (it, w, row)
3136 end position. */ 3065 end position. */
3137 3066
3138static int 3067static int
3139init_to_row_end (it, w, row) 3068init_to_row_end (struct it *it, struct window *w, struct glyph_row *row)
3140 struct it *it;
3141 struct window *w;
3142 struct glyph_row *row;
3143{ 3069{
3144 int success = 0; 3070 int success = 0;
3145 3071
@@ -3167,8 +3093,7 @@ init_to_row_end (it, w, row)
3167 to stop. */ 3093 to stop. */
3168 3094
3169static void 3095static void
3170handle_stop (it) 3096handle_stop (struct it *it)
3171 struct it *it;
3172{ 3097{
3173 enum prop_handled handled; 3098 enum prop_handled handled;
3174 int handle_overlay_change_p; 3099 int handle_overlay_change_p;
@@ -3261,8 +3186,7 @@ handle_stop (it)
3261 information for IT's current position. */ 3186 information for IT's current position. */
3262 3187
3263static void 3188static void
3264compute_stop_pos (it) 3189compute_stop_pos (struct it *it)
3265 struct it *it;
3266{ 3190{
3267 register INTERVAL iv, next_iv; 3191 register INTERVAL iv, next_iv;
3268 Lisp_Object object, limit, position; 3192 Lisp_Object object, limit, position;
@@ -3371,8 +3295,7 @@ compute_stop_pos (it)
3371 xmalloc. */ 3295 xmalloc. */
3372 3296
3373static EMACS_INT 3297static EMACS_INT
3374next_overlay_change (pos) 3298next_overlay_change (EMACS_INT pos)
3375 EMACS_INT pos;
3376{ 3299{
3377 int noverlays; 3300 int noverlays;
3378 EMACS_INT endpos; 3301 EMACS_INT endpos;
@@ -3408,8 +3331,7 @@ next_overlay_change (pos)
3408 regions of text. */ 3331 regions of text. */
3409 3332
3410static enum prop_handled 3333static enum prop_handled
3411handle_fontified_prop (it) 3334handle_fontified_prop (struct it *it)
3412 struct it *it;
3413{ 3335{
3414 Lisp_Object prop, pos; 3336 Lisp_Object prop, pos;
3415 enum prop_handled handled = HANDLED_NORMALLY; 3337 enum prop_handled handled = HANDLED_NORMALLY;
@@ -3496,8 +3418,7 @@ handle_fontified_prop (it)
3496 Called from handle_stop. */ 3418 Called from handle_stop. */
3497 3419
3498static enum prop_handled 3420static enum prop_handled
3499handle_face_prop (it) 3421handle_face_prop (struct it *it)
3500 struct it *it;
3501{ 3422{
3502 int new_face_id; 3423 int new_face_id;
3503 EMACS_INT next_stop; 3424 EMACS_INT next_stop;
@@ -3635,8 +3556,7 @@ handle_face_prop (it)
3635 Otherwise, use the iterator's base_face_id. */ 3556 Otherwise, use the iterator's base_face_id. */
3636 3557
3637static int 3558static int
3638underlying_face_id (it) 3559underlying_face_id (struct it *it)
3639 struct it *it;
3640{ 3560{
3641 int face_id = it->base_face_id, i; 3561 int face_id = it->base_face_id, i;
3642 3562
@@ -3655,9 +3575,7 @@ underlying_face_id (it)
3655 position. Value is the id of the face. */ 3575 position. Value is the id of the face. */
3656 3576
3657static int 3577static int
3658face_before_or_after_it_pos (it, before_p) 3578face_before_or_after_it_pos (struct it *it, int before_p)
3659 struct it *it;
3660 int before_p;
3661{ 3579{
3662 int face_id, limit; 3580 int face_id, limit;
3663 EMACS_INT next_check_charpos; 3581 EMACS_INT next_check_charpos;
@@ -3771,8 +3689,7 @@ face_before_or_after_it_pos (it, before_p)
3771 position. Called from handle_stop. */ 3689 position. Called from handle_stop. */
3772 3690
3773static enum prop_handled 3691static enum prop_handled
3774handle_invisible_prop (it) 3692handle_invisible_prop (struct it *it)
3775 struct it *it;
3776{ 3693{
3777 enum prop_handled handled = HANDLED_NORMALLY; 3694 enum prop_handled handled = HANDLED_NORMALLY;
3778 3695
@@ -3985,9 +3902,7 @@ handle_invisible_prop (it)
3985 Replaces LEN characters from buffer. */ 3902 Replaces LEN characters from buffer. */
3986 3903
3987static void 3904static void
3988setup_for_ellipsis (it, len) 3905setup_for_ellipsis (struct it *it, int len)
3989 struct it *it;
3990 int len;
3991{ 3906{
3992 /* Use the display table definition for `...'. Invalid glyphs 3907 /* Use the display table definition for `...'. Invalid glyphs
3993 will be handled by the method returning elements from dpvec. */ 3908 will be handled by the method returning elements from dpvec. */
@@ -4031,8 +3946,7 @@ setup_for_ellipsis (it, len)
4031 Otherwise we return HANDLED_NORMALLY. */ 3946 Otherwise we return HANDLED_NORMALLY. */
4032 3947
4033static enum prop_handled 3948static enum prop_handled
4034handle_display_prop (it) 3949handle_display_prop (struct it *it)
4035 struct it *it;
4036{ 3950{
4037 Lisp_Object prop, object, overlay; 3951 Lisp_Object prop, object, overlay;
4038 struct text_pos *position; 3952 struct text_pos *position;
@@ -4129,10 +4043,7 @@ handle_display_prop (it)
4129 at START_POS in OBJECT. */ 4043 at START_POS in OBJECT. */
4130 4044
4131static struct text_pos 4045static struct text_pos
4132display_prop_end (it, object, start_pos) 4046display_prop_end (struct it *it, Lisp_Object object, struct text_pos start_pos)
4133 struct it *it;
4134 Lisp_Object object;
4135 struct text_pos start_pos;
4136{ 4047{
4137 Lisp_Object end; 4048 Lisp_Object end;
4138 struct text_pos end_pos; 4049 struct text_pos end_pos;
@@ -4539,8 +4450,7 @@ handle_single_display_spec (it, spec, object, overlay, position,
4539 treated as intangible. */ 4450 treated as intangible. */
4540 4451
4541static int 4452static int
4542single_display_spec_intangible_p (prop) 4453single_display_spec_intangible_p (Lisp_Object prop)
4543 Lisp_Object prop;
4544{ 4454{
4545 /* Skip over `when FORM'. */ 4455 /* Skip over `when FORM'. */
4546 if (CONSP (prop) && EQ (XCAR (prop), Qwhen)) 4456 if (CONSP (prop) && EQ (XCAR (prop), Qwhen))
@@ -4582,8 +4492,7 @@ single_display_spec_intangible_p (prop)
4582 treated as intangible. */ 4492 treated as intangible. */
4583 4493
4584int 4494int
4585display_prop_intangible_p (prop) 4495display_prop_intangible_p (Lisp_Object prop)
4586 Lisp_Object prop;
4587{ 4496{
4588 if (CONSP (prop) 4497 if (CONSP (prop)
4589 && CONSP (XCAR (prop)) 4498 && CONSP (XCAR (prop))
@@ -4615,8 +4524,7 @@ display_prop_intangible_p (prop)
4615/* Return 1 if PROP is a display sub-property value containing STRING. */ 4524/* Return 1 if PROP is a display sub-property value containing STRING. */
4616 4525
4617static int 4526static int
4618single_display_spec_string_p (prop, string) 4527single_display_spec_string_p (Lisp_Object prop, Lisp_Object string)
4619 Lisp_Object prop, string;
4620{ 4528{
4621 if (EQ (string, prop)) 4529 if (EQ (string, prop))
4622 return 1; 4530 return 1;
@@ -4650,8 +4558,7 @@ single_display_spec_string_p (prop, string)
4650/* Return 1 if STRING appears in the `display' property PROP. */ 4558/* Return 1 if STRING appears in the `display' property PROP. */
4651 4559
4652static int 4560static int
4653display_prop_string_p (prop, string) 4561display_prop_string_p (Lisp_Object prop, Lisp_Object string)
4654 Lisp_Object prop, string;
4655{ 4562{
4656 if (CONSP (prop) 4563 if (CONSP (prop)
4657 && CONSP (XCAR (prop)) 4564 && CONSP (XCAR (prop))
@@ -4692,11 +4599,8 @@ display_prop_string_p (prop, string)
4692 called asynchronously from note_mouse_highlight. */ 4599 called asynchronously from note_mouse_highlight. */
4693 4600
4694static EMACS_INT 4601static EMACS_INT
4695string_buffer_position_lim (w, string, from, to, back_p) 4602string_buffer_position_lim (struct window *w, Lisp_Object string,
4696 struct window *w; 4603 EMACS_INT from, EMACS_INT to, int back_p)
4697 Lisp_Object string;
4698 EMACS_INT from, to;
4699 int back_p;
4700{ 4604{
4701 Lisp_Object limit, prop, pos; 4605 Lisp_Object limit, prop, pos;
4702 int found = 0; 4606 int found = 0;
@@ -4745,10 +4649,7 @@ string_buffer_position_lim (w, string, from, to, back_p)
4745 called asynchronously from note_mouse_highlight. */ 4649 called asynchronously from note_mouse_highlight. */
4746 4650
4747EMACS_INT 4651EMACS_INT
4748string_buffer_position (w, string, around_charpos) 4652string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos)
4749 struct window *w;
4750 Lisp_Object string;
4751 EMACS_INT around_charpos;
4752{ 4653{
4753 Lisp_Object limit, prop, pos; 4654 Lisp_Object limit, prop, pos;
4754 const int MAX_DISTANCE = 1000; 4655 const int MAX_DISTANCE = 1000;
@@ -4772,8 +4673,7 @@ string_buffer_position (w, string, around_charpos)
4772 position. Called from handle_stop. */ 4673 position. Called from handle_stop. */
4773 4674
4774static enum prop_handled 4675static enum prop_handled
4775handle_composition_prop (it) 4676handle_composition_prop (struct it *it)
4776 struct it *it;
4777{ 4677{
4778 Lisp_Object prop, string; 4678 Lisp_Object prop, string;
4779 EMACS_INT pos, pos_byte, start, end; 4679 EMACS_INT pos, pos_byte, start, end;
@@ -4846,8 +4746,7 @@ struct overlay_entry
4846 Called from handle_stop. */ 4746 Called from handle_stop. */
4847 4747
4848static enum prop_handled 4748static enum prop_handled
4849handle_overlay_change (it) 4749handle_overlay_change (struct it *it)
4850 struct it *it;
4851{ 4750{
4852 if (!STRINGP (it->string) && get_overlay_strings (it, 0)) 4751 if (!STRINGP (it->string) && get_overlay_strings (it, 0))
4853 return HANDLED_RECOMPUTE_PROPS; 4752 return HANDLED_RECOMPUTE_PROPS;
@@ -4864,8 +4763,7 @@ handle_overlay_change (it)
4864 Otherwise IT->string is set to nil. */ 4763 Otherwise IT->string is set to nil. */
4865 4764
4866static void 4765static void
4867next_overlay_string (it) 4766next_overlay_string (struct it *it)
4868 struct it *it;
4869{ 4767{
4870 ++it->current.overlay_string_index; 4768 ++it->current.overlay_string_index;
4871 if (it->current.overlay_string_index == it->n_overlay_strings) 4769 if (it->current.overlay_string_index == it->n_overlay_strings)
@@ -4933,8 +4831,7 @@ next_overlay_string (it)
4933 4831
4934 4832
4935static int 4833static int
4936compare_overlay_entries (e1, e2) 4834compare_overlay_entries (const void *e1, const void *e2)
4937 void *e1, *e2;
4938{ 4835{
4939 struct overlay_entry *entry1 = (struct overlay_entry *) e1; 4836 struct overlay_entry *entry1 = (struct overlay_entry *) e1;
4940 struct overlay_entry *entry2 = (struct overlay_entry *) e2; 4837 struct overlay_entry *entry2 = (struct overlay_entry *) e2;
@@ -4985,9 +4882,7 @@ compare_overlay_entries (e1, e2)
4985 compare_overlay_entries. */ 4882 compare_overlay_entries. */
4986 4883
4987static void 4884static void
4988load_overlay_strings (it, charpos) 4885load_overlay_strings (struct it *it, int charpos)
4989 struct it *it;
4990 int charpos;
4991{ 4886{
4992 extern Lisp_Object Qwindow, Qpriority; 4887 extern Lisp_Object Qwindow, Qpriority;
4993 Lisp_Object overlay, window, str, invisible; 4888 Lisp_Object overlay, window, str, invisible;
@@ -5138,10 +5033,7 @@ load_overlay_strings (it, charpos)
5138 least one overlay string was found. */ 5033 least one overlay string was found. */
5139 5034
5140static int 5035static int
5141get_overlay_strings_1 (it, charpos, compute_stop_p) 5036get_overlay_strings_1 (struct it *it, int charpos, int compute_stop_p)
5142 struct it *it;
5143 int charpos;
5144 int compute_stop_p;
5145{ 5037{
5146 /* Get the first OVERLAY_STRING_CHUNK_SIZE overlay strings to 5038 /* Get the first OVERLAY_STRING_CHUNK_SIZE overlay strings to
5147 process. This fills IT->overlay_strings with strings, and sets 5039 process. This fills IT->overlay_strings with strings, and sets
@@ -5192,9 +5084,7 @@ get_overlay_strings_1 (it, charpos, compute_stop_p)
5192} 5084}
5193 5085
5194static int 5086static int
5195get_overlay_strings (it, charpos) 5087get_overlay_strings (struct it *it, int charpos)
5196 struct it *it;
5197 int charpos;
5198{ 5088{
5199 it->string = Qnil; 5089 it->string = Qnil;
5200 it->method = GET_FROM_BUFFER; 5090 it->method = GET_FROM_BUFFER;
@@ -5219,8 +5109,7 @@ get_overlay_strings (it, charpos)
5219 processed. */ 5109 processed. */
5220 5110
5221static void 5111static void
5222push_it (it) 5112push_it (struct it *it)
5223 struct it *it;
5224{ 5113{
5225 struct iterator_stack_entry *p; 5114 struct iterator_stack_entry *p;
5226 5115
@@ -5264,8 +5153,7 @@ push_it (it)
5264} 5153}
5265 5154
5266static void 5155static void
5267iterate_out_of_display_property (it) 5156iterate_out_of_display_property (struct it *it)
5268 struct it *it;
5269{ 5157{
5270 /* Maybe initialize paragraph direction. If we are at the beginning 5158 /* Maybe initialize paragraph direction. If we are at the beginning
5271 of a new paragraph, next_element_from_buffer may not have a 5159 of a new paragraph, next_element_from_buffer may not have a
@@ -5298,8 +5186,7 @@ iterate_out_of_display_property (it)
5298 elements from an overlay string, or from a buffer. */ 5186 elements from an overlay string, or from a buffer. */
5299 5187
5300static void 5188static void
5301pop_it (it) 5189pop_it (struct it *it)
5302 struct it *it;
5303{ 5190{
5304 struct iterator_stack_entry *p; 5191 struct iterator_stack_entry *p;
5305 5192
@@ -5378,8 +5265,7 @@ pop_it (it)
5378/* Set IT's current position to the previous line start. */ 5265/* Set IT's current position to the previous line start. */
5379 5266
5380static void 5267static void
5381back_to_previous_line_start (it) 5268back_to_previous_line_start (struct it *it)
5382 struct it *it;
5383{ 5269{
5384 IT_CHARPOS (*it) = find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1); 5270 IT_CHARPOS (*it) = find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1);
5385 IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it)); 5271 IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it));
@@ -5405,9 +5291,7 @@ back_to_previous_line_start (it)
5405 leads to wrong cursor motion. */ 5291 leads to wrong cursor motion. */
5406 5292
5407static int 5293static int
5408forward_to_next_line_start (it, skipped_p) 5294forward_to_next_line_start (struct it *it, int *skipped_p)
5409 struct it *it;
5410 int *skipped_p;
5411{ 5295{
5412 int old_selective, newline_found_p, n; 5296 int old_selective, newline_found_p, n;
5413 const int MAX_NEWLINE_DISTANCE = 500; 5297 const int MAX_NEWLINE_DISTANCE = 500;
@@ -5488,8 +5372,7 @@ forward_to_next_line_start (it, skipped_p)
5488 IT->hpos. */ 5372 IT->hpos. */
5489 5373
5490static void 5374static void
5491back_to_previous_visible_line_start (it) 5375back_to_previous_visible_line_start (struct it *it)
5492 struct it *it;
5493{ 5376{
5494 while (IT_CHARPOS (*it) > BEGV) 5377 while (IT_CHARPOS (*it) > BEGV)
5495 { 5378 {
@@ -5569,8 +5452,7 @@ back_to_previous_visible_line_start (it)
5569 face information etc. */ 5452 face information etc. */
5570 5453
5571void 5454void
5572reseat_at_previous_visible_line_start (it) 5455reseat_at_previous_visible_line_start (struct it *it)
5573 struct it *it;
5574{ 5456{
5575 back_to_previous_visible_line_start (it); 5457 back_to_previous_visible_line_start (it);
5576 reseat (it, it->current.pos, 1); 5458 reseat (it, it->current.pos, 1);
@@ -5586,9 +5468,7 @@ reseat_at_previous_visible_line_start (it)
5586 is invisible because of text properties. */ 5468 is invisible because of text properties. */
5587 5469
5588static void 5470static void
5589reseat_at_next_visible_line_start (it, on_newline_p) 5471reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
5590 struct it *it;
5591 int on_newline_p;
5592{ 5472{
5593 int newline_found_p, skipped_p = 0; 5473 int newline_found_p, skipped_p = 0;
5594 5474
@@ -5642,10 +5522,7 @@ reseat_at_next_visible_line_start (it, on_newline_p)
5642 IT->check_charpos of a property. */ 5522 IT->check_charpos of a property. */
5643 5523
5644static void 5524static void
5645reseat (it, pos, force_p) 5525reseat (struct it *it, struct text_pos pos, int force_p)
5646 struct it *it;
5647 struct text_pos pos;
5648 int force_p;
5649{ 5526{
5650 int original_pos = IT_CHARPOS (*it); 5527 int original_pos = IT_CHARPOS (*it);
5651 5528
@@ -5689,10 +5566,7 @@ reseat (it, pos, force_p)
5689 IT->stop_pos to POS, also. */ 5566 IT->stop_pos to POS, also. */
5690 5567
5691static void 5568static void
5692reseat_1 (it, pos, set_stop_p) 5569reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
5693 struct it *it;
5694 struct text_pos pos;
5695 int set_stop_p;
5696{ 5570{
5697 /* Don't call this function when scanning a C string. */ 5571 /* Don't call this function when scanning a C string. */
5698 xassert (it->s == NULL); 5572 xassert (it->s == NULL);
@@ -5746,12 +5620,8 @@ reseat_1 (it, pos, set_stop_p)
5746 calling this function. */ 5620 calling this function. */
5747 5621
5748static void 5622static void
5749reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) 5623reseat_to_string (struct it *it, unsigned char *s, Lisp_Object string,
5750 struct it *it; 5624 int charpos, int precision, int field_width, int multibyte)
5751 unsigned char *s;
5752 Lisp_Object string;
5753 int charpos;
5754 int precision, field_width, multibyte;
5755{ 5625{
5756 /* No region in strings. */ 5626 /* No region in strings. */
5757 it->region_beg_charpos = it->region_end_charpos = -1; 5627 it->region_beg_charpos = it->region_end_charpos = -1;
@@ -5873,8 +5743,7 @@ static unsigned last_escape_glyph_face_id = (1 << FACE_ID_BITS);
5873static int last_escape_glyph_merged_face_id = 0; 5743static int last_escape_glyph_merged_face_id = 0;
5874 5744
5875int 5745int
5876get_next_display_element (it) 5746get_next_display_element (struct it *it)
5877 struct it *it;
5878{ 5747{
5879 /* Non-zero means that we found a display element. Zero means that 5748 /* Non-zero means that we found a display element. Zero means that
5880 we hit the end of what we iterate over. Performance note: the 5749 we hit the end of what we iterate over. Performance note: the
@@ -6266,9 +6135,7 @@ get_next_display_element (it)
6266 decrement position function which would not be easy to write. */ 6135 decrement position function which would not be easy to write. */
6267 6136
6268void 6137void
6269set_iterator_to_next (it, reseat_p) 6138set_iterator_to_next (struct it *it, int reseat_p)
6270 struct it *it;
6271 int reseat_p;
6272{ 6139{
6273 /* Reset flags indicating start and end of a sequence of characters 6140 /* Reset flags indicating start and end of a sequence of characters
6274 with box. Reset them at the start of this function because 6141 with box. Reset them at the start of this function because
@@ -6533,8 +6400,7 @@ set_iterator_to_next (it, reseat_p)
6533 is restored into IT->face_id in set_iterator_to_next. */ 6400 is restored into IT->face_id in set_iterator_to_next. */
6534 6401
6535static int 6402static int
6536next_element_from_display_vector (it) 6403next_element_from_display_vector (struct it *it)
6537 struct it *it;
6538{ 6404{
6539 Lisp_Object gc; 6405 Lisp_Object gc;
6540 6406
@@ -6583,8 +6449,7 @@ next_element_from_display_vector (it)
6583 overlay string. */ 6449 overlay string. */
6584 6450
6585static int 6451static int
6586next_element_from_string (it) 6452next_element_from_string (struct it *it)
6587 struct it *it;
6588{ 6453{
6589 struct text_pos position; 6454 struct text_pos position;
6590 6455
@@ -6685,8 +6550,7 @@ next_element_from_string (it)
6685 reached, including padding spaces. */ 6550 reached, including padding spaces. */
6686 6551
6687static int 6552static int
6688next_element_from_c_string (it) 6553next_element_from_c_string (struct it *it)
6689 struct it *it;
6690{ 6554{
6691 int success_p = 1; 6555 int success_p = 1;
6692 6556
@@ -6731,8 +6595,7 @@ next_element_from_c_string (it)
6731 ellipsis if an ellipsis is to be displayed. */ 6595 ellipsis if an ellipsis is to be displayed. */
6732 6596
6733static int 6597static int
6734next_element_from_ellipsis (it) 6598next_element_from_ellipsis (struct it *it)
6735 struct it *it;
6736{ 6599{
6737 if (it->selective_display_ellipsis_p) 6600 if (it->selective_display_ellipsis_p)
6738 setup_for_ellipsis (it, it->len); 6601 setup_for_ellipsis (it, it->len);
@@ -6759,8 +6622,7 @@ next_element_from_ellipsis (it)
6759 6622
6760 6623
6761static int 6624static int
6762next_element_from_image (it) 6625next_element_from_image (struct it *it)
6763 struct it *it;
6764{ 6626{
6765 it->what = IT_IMAGE; 6627 it->what = IT_IMAGE;
6766 return 1; 6628 return 1;
@@ -6772,8 +6634,7 @@ next_element_from_image (it)
6772 always 1. */ 6634 always 1. */
6773 6635
6774static int 6636static int
6775next_element_from_stretch (it) 6637next_element_from_stretch (struct it *it)
6776 struct it *it;
6777{ 6638{
6778 it->what = IT_STRETCH; 6639 it->what = IT_STRETCH;
6779 return 1; 6640 return 1;
@@ -6788,9 +6649,7 @@ next_element_from_stretch (it)
6788 position. */ 6649 position. */
6789 6650
6790static void 6651static void
6791handle_stop_backwards (it, charpos) 6652handle_stop_backwards (struct it *it, EMACS_INT charpos)
6792 struct it *it;
6793 EMACS_INT charpos;
6794{ 6653{
6795 EMACS_INT where_we_are = IT_CHARPOS (*it); 6654 EMACS_INT where_we_are = IT_CHARPOS (*it);
6796 struct display_pos save_current = it->current; 6655 struct display_pos save_current = it->current;
@@ -6828,8 +6687,7 @@ handle_stop_backwards (it, charpos)
6828 end. */ 6687 end. */
6829 6688
6830static int 6689static int
6831next_element_from_buffer (it) 6690next_element_from_buffer (struct it *it)
6832 struct it *it;
6833{ 6691{
6834 int success_p = 1; 6692 int success_p = 1;
6835 6693
@@ -7038,8 +6896,7 @@ next_element_from_buffer (it)
7038/* Run the redisplay end trigger hook for IT. */ 6896/* Run the redisplay end trigger hook for IT. */
7039 6897
7040static void 6898static void
7041run_redisplay_end_trigger_hook (it) 6899run_redisplay_end_trigger_hook (struct it *it)
7042 struct it *it;
7043{ 6900{
7044 Lisp_Object args[3]; 6901 Lisp_Object args[3];
7045 6902
@@ -7069,8 +6926,7 @@ run_redisplay_end_trigger_hook (it)
7069 next_element_from_string when necessary. */ 6926 next_element_from_string when necessary. */
7070 6927
7071static int 6928static int
7072next_element_from_composition (it) 6929next_element_from_composition (struct it *it)
7073 struct it *it;
7074{ 6930{
7075 it->what = IT_COMPOSITION; 6931 it->what = IT_COMPOSITION;
7076 it->len = it->cmp_it.nbytes; 6932 it->len = it->cmp_it.nbytes;
@@ -7593,10 +7449,7 @@ move_it_in_display_line (struct it *it,
7593 TO_CHARPOS. */ 7449 TO_CHARPOS. */
7594 7450
7595void 7451void
7596move_it_to (it, to_charpos, to_x, to_y, to_vpos, op) 7452move_it_to (struct it *it, int to_charpos, int to_x, int to_y, int to_vpos, int op)
7597 struct it *it;
7598 int to_charpos, to_x, to_y, to_vpos;
7599 int op;
7600{ 7453{
7601 enum move_it_result skip, skip2 = MOVE_X_REACHED; 7454 enum move_it_result skip, skip2 = MOVE_X_REACHED;
7602 int line_height, line_start_x = 0, reached = 0; 7455 int line_height, line_start_x = 0, reached = 0;
@@ -7847,9 +7700,7 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
7847 set to the top of the line moved to. */ 7700 set to the top of the line moved to. */
7848 7701
7849void 7702void
7850move_it_vertically_backward (it, dy) 7703move_it_vertically_backward (struct it *it, int dy)
7851 struct it *it;
7852 int dy;
7853{ 7704{
7854 int nlines, h; 7705 int nlines, h;
7855 struct it it2, it3; 7706 struct it it2, it3;
@@ -7968,9 +7819,7 @@ move_it_vertically_backward (it, dy)
7968 end, IT will be on the start of a screen line. */ 7819 end, IT will be on the start of a screen line. */
7969 7820
7970void 7821void
7971move_it_vertically (it, dy) 7822move_it_vertically (struct it *it, int dy)
7972 struct it *it;
7973 int dy;
7974{ 7823{
7975 if (dy <= 0) 7824 if (dy <= 0)
7976 move_it_vertically_backward (it, -dy); 7825 move_it_vertically_backward (it, -dy);
@@ -7994,8 +7843,7 @@ move_it_vertically (it, dy)
7994/* Move iterator IT past the end of the text line it is in. */ 7843/* Move iterator IT past the end of the text line it is in. */
7995 7844
7996void 7845void
7997move_it_past_eol (it) 7846move_it_past_eol (struct it *it)
7998 struct it *it;
7999{ 7847{
8000 enum move_it_result rc; 7848 enum move_it_result rc;
8001 7849
@@ -8015,9 +7863,7 @@ move_it_past_eol (it)
8015 truncate-lines nil. */ 7863 truncate-lines nil. */
8016 7864
8017void 7865void
8018move_it_by_lines (it, dvpos, need_y_p) 7866move_it_by_lines (struct it *it, int dvpos, int need_y_p)
8019 struct it *it;
8020 int dvpos, need_y_p;
8021{ 7867{
8022 struct position pos; 7868 struct position pos;
8023 7869
@@ -8111,8 +7957,7 @@ move_it_by_lines (it, dvpos, need_y_p)
8111/* Return 1 if IT points into the middle of a display vector. */ 7957/* Return 1 if IT points into the middle of a display vector. */
8112 7958
8113int 7959int
8114in_display_vector_p (it) 7960in_display_vector_p (struct it *it)
8115 struct it *it;
8116{ 7961{
8117 return (it->method == GET_FROM_DISPLAY_VECTOR 7962 return (it->method == GET_FROM_DISPLAY_VECTOR
8118 && it->current.dpvec_index > 0 7963 && it->current.dpvec_index > 0
@@ -8129,9 +7974,7 @@ in_display_vector_p (it)
8129 to *Messages*. */ 7974 to *Messages*. */
8130 7975
8131void 7976void
8132add_to_log (format, arg1, arg2) 7977add_to_log (char *format, Lisp_Object arg1, Lisp_Object arg2)
8133 char *format;
8134 Lisp_Object arg1, arg2;
8135{ 7978{
8136 Lisp_Object args[3]; 7979 Lisp_Object args[3];
8137 Lisp_Object msg, fmt; 7980 Lisp_Object msg, fmt;
@@ -8168,7 +8011,7 @@ add_to_log (format, arg1, arg2)
8168/* Output a newline in the *Messages* buffer if "needs" one. */ 8011/* Output a newline in the *Messages* buffer if "needs" one. */
8169 8012
8170void 8013void
8171message_log_maybe_newline () 8014message_log_maybe_newline (void)
8172{ 8015{
8173 if (message_log_need_newline) 8016 if (message_log_need_newline)
8174 message_dolog ("", 0, 1, 0); 8017 message_dolog ("", 0, 1, 0);
@@ -8185,9 +8028,7 @@ message_log_maybe_newline ()
8185 so the buffer M must NOT point to a Lisp string. */ 8028 so the buffer M must NOT point to a Lisp string. */
8186 8029
8187void 8030void
8188message_dolog (m, nbytes, nlflag, multibyte) 8031message_dolog (const char *m, int nbytes, int nlflag, int multibyte)
8189 const char *m;
8190 int nbytes, nlflag, multibyte;
8191{ 8032{
8192 if (!NILP (Vmemory_full)) 8033 if (!NILP (Vmemory_full))
8193 return; 8034 return;
@@ -8357,9 +8198,8 @@ message_dolog (m, nbytes, nlflag, multibyte)
8357 value N > 1 if we should also append " [N times]". */ 8198 value N > 1 if we should also append " [N times]". */
8358 8199
8359static int 8200static int
8360message_log_check_duplicate (prev_bol, prev_bol_byte, this_bol, this_bol_byte) 8201message_log_check_duplicate (int prev_bol, int prev_bol_byte,
8361 int prev_bol, this_bol; 8202 int this_bol, int this_bol_byte)
8362 int prev_bol_byte, this_bol_byte;
8363{ 8203{
8364 int i; 8204 int i;
8365 int len = Z_BYTE - 1 - this_bol_byte; 8205 int len = Z_BYTE - 1 - this_bol_byte;
@@ -8397,10 +8237,7 @@ message_log_check_duplicate (prev_bol, prev_bol_byte, this_bol, this_bol_byte)
8397 This may GC, so the buffer M must NOT point to a Lisp string. */ 8237 This may GC, so the buffer M must NOT point to a Lisp string. */
8398 8238
8399void 8239void
8400message2 (m, nbytes, multibyte) 8240message2 (const char *m, int nbytes, int multibyte)
8401 const char *m;
8402 int nbytes;
8403 int multibyte;
8404{ 8241{
8405 /* First flush out any partial line written with print. */ 8242 /* First flush out any partial line written with print. */
8406 message_log_maybe_newline (); 8243 message_log_maybe_newline ();
@@ -8413,9 +8250,7 @@ message2 (m, nbytes, multibyte)
8413/* The non-logging counterpart of message2. */ 8250/* The non-logging counterpart of message2. */
8414 8251
8415void 8252void
8416message2_nolog (m, nbytes, multibyte) 8253message2_nolog (const char *m, int nbytes, int multibyte)
8417 const char *m;
8418 int nbytes, multibyte;
8419{ 8254{
8420 struct frame *sf = SELECTED_FRAME (); 8255 struct frame *sf = SELECTED_FRAME ();
8421 message_enable_multibyte = multibyte; 8256 message_enable_multibyte = multibyte;
@@ -8477,10 +8312,7 @@ message2_nolog (m, nbytes, multibyte)
8477 This function cancels echoing. */ 8312 This function cancels echoing. */
8478 8313
8479void 8314void
8480message3 (m, nbytes, multibyte) 8315message3 (Lisp_Object m, int nbytes, int multibyte)
8481 Lisp_Object m;
8482 int nbytes;
8483 int multibyte;
8484{ 8316{
8485 struct gcpro gcpro1; 8317 struct gcpro gcpro1;
8486 8318
@@ -8512,9 +8344,7 @@ message3 (m, nbytes, multibyte)
8512 and make this cancel echoing. */ 8344 and make this cancel echoing. */
8513 8345
8514void 8346void
8515message3_nolog (m, nbytes, multibyte) 8347message3_nolog (Lisp_Object m, int nbytes, int multibyte)
8516 Lisp_Object m;
8517 int nbytes, multibyte;
8518{ 8348{
8519 struct frame *sf = SELECTED_FRAME (); 8349 struct frame *sf = SELECTED_FRAME ();
8520 message_enable_multibyte = multibyte; 8350 message_enable_multibyte = multibyte;
@@ -8582,8 +8412,7 @@ message3_nolog (m, nbytes, multibyte)
8582 that was alloca'd. */ 8412 that was alloca'd. */
8583 8413
8584void 8414void
8585message1 (m) 8415message1 (char *m)
8586 char *m;
8587{ 8416{
8588 message2 (m, (m ? strlen (m) : 0), 0); 8417 message2 (m, (m ? strlen (m) : 0), 0);
8589} 8418}
@@ -8592,8 +8421,7 @@ message1 (m)
8592/* The non-logging counterpart of message1. */ 8421/* The non-logging counterpart of message1. */
8593 8422
8594void 8423void
8595message1_nolog (m) 8424message1_nolog (char *m)
8596 char *m;
8597{ 8425{
8598 message2_nolog (m, (m ? strlen (m) : 0), 0); 8426 message2_nolog (m, (m ? strlen (m) : 0), 0);
8599} 8427}
@@ -8602,10 +8430,7 @@ message1_nolog (m)
8602 which gets replaced with STRING. */ 8430 which gets replaced with STRING. */
8603 8431
8604void 8432void
8605message_with_string (m, string, log) 8433message_with_string (char *m, Lisp_Object string, int log)
8606 char *m;
8607 Lisp_Object string;
8608 int log;
8609{ 8434{
8610 CHECK_STRING (string); 8435 CHECK_STRING (string);
8611 8436
@@ -8670,9 +8495,7 @@ message_with_string (m, string, log)
8670 8495
8671/* VARARGS 1 */ 8496/* VARARGS 1 */
8672void 8497void
8673message (m, a1, a2, a3) 8498message (char *m, EMACS_INT a1, EMACS_INT a2, EMACS_INT a3)
8674 char *m;
8675 EMACS_INT a1, a2, a3;
8676{ 8499{
8677 if (noninteractive) 8500 if (noninteractive)
8678 { 8501 {
@@ -8733,9 +8556,7 @@ message (m, a1, a2, a3)
8733/* The non-logging version of message. */ 8556/* The non-logging version of message. */
8734 8557
8735void 8558void
8736message_nolog (m, a1, a2, a3) 8559message_nolog (char *m, EMACS_INT a1, EMACS_INT a2, EMACS_INT a3)
8737 char *m;
8738 EMACS_INT a1, a2, a3;
8739{ 8560{
8740 Lisp_Object old_log_max; 8561 Lisp_Object old_log_max;
8741 old_log_max = Vmessage_log_max; 8562 old_log_max = Vmessage_log_max;
@@ -8750,7 +8571,7 @@ message_nolog (m, a1, a2, a3)
8750 critical. */ 8571 critical. */
8751 8572
8752void 8573void
8753update_echo_area () 8574update_echo_area (void)
8754{ 8575{
8755 if (!NILP (echo_area_buffer[0])) 8576 if (!NILP (echo_area_buffer[0]))
8756 { 8577 {
@@ -8766,7 +8587,7 @@ update_echo_area ()
8766 If they aren't, make new ones. */ 8587 If they aren't, make new ones. */
8767 8588
8768static void 8589static void
8769ensure_echo_area_buffers () 8590ensure_echo_area_buffers (void)
8770{ 8591{
8771 int i; 8592 int i;
8772 8593
@@ -8810,13 +8631,9 @@ ensure_echo_area_buffers ()
8810 Value is what FN returns. */ 8631 Value is what FN returns. */
8811 8632
8812static int 8633static int
8813with_echo_area_buffer (w, which, fn, a1, a2, a3, a4) 8634with_echo_area_buffer (struct window *w, int which,
8814 struct window *w; 8635 int (*fn) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
8815 int which; 8636 EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
8816 int (*fn) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
8817 EMACS_INT a1;
8818 Lisp_Object a2;
8819 EMACS_INT a3, a4;
8820{ 8637{
8821 Lisp_Object buffer; 8638 Lisp_Object buffer;
8822 int this_one, the_other, clear_buffer_p, rc; 8639 int this_one, the_other, clear_buffer_p, rc;
@@ -8903,8 +8720,7 @@ with_echo_area_buffer (w, which, fn, a1, a2, a3, a4)
8903 FN called in with_echo_area_buffer. */ 8720 FN called in with_echo_area_buffer. */
8904 8721
8905static Lisp_Object 8722static Lisp_Object
8906with_echo_area_buffer_unwind_data (w) 8723with_echo_area_buffer_unwind_data (struct window *w)
8907 struct window *w;
8908{ 8724{
8909 int i = 0; 8725 int i = 0;
8910 Lisp_Object vector, tmp; 8726 Lisp_Object vector, tmp;
@@ -8944,8 +8760,7 @@ with_echo_area_buffer_unwind_data (w)
8944 with_echo_area_buffer_unwind_data. */ 8760 with_echo_area_buffer_unwind_data. */
8945 8761
8946static Lisp_Object 8762static Lisp_Object
8947unwind_with_echo_area_buffer (vector) 8763unwind_with_echo_area_buffer (Lisp_Object vector)
8948 Lisp_Object vector;
8949{ 8764{
8950 set_buffer_internal_1 (XBUFFER (AREF (vector, 0))); 8765 set_buffer_internal_1 (XBUFFER (AREF (vector, 0)));
8951 Vdeactivate_mark = AREF (vector, 1); 8766 Vdeactivate_mark = AREF (vector, 1);
@@ -8975,8 +8790,7 @@ unwind_with_echo_area_buffer (vector)
8975 non-zero means we will print multibyte. */ 8790 non-zero means we will print multibyte. */
8976 8791
8977void 8792void
8978setup_echo_area_for_printing (multibyte_p) 8793setup_echo_area_for_printing (int multibyte_p)
8979 int multibyte_p;
8980{ 8794{
8981 /* If we can't find an echo area any more, exit. */ 8795 /* If we can't find an echo area any more, exit. */
8982 if (! FRAME_LIVE_P (XFRAME (selected_frame))) 8796 if (! FRAME_LIVE_P (XFRAME (selected_frame)))
@@ -9050,8 +8864,7 @@ setup_echo_area_for_printing (multibyte_p)
9050 display the current message. */ 8864 display the current message. */
9051 8865
9052static int 8866static int
9053display_echo_area (w) 8867display_echo_area (struct window *w)
9054 struct window *w;
9055{ 8868{
9056 int i, no_message_p, window_height_changed_p, count; 8869 int i, no_message_p, window_height_changed_p, count;
9057 8870
@@ -9089,10 +8902,7 @@ display_echo_area (w)
9089 Value is non-zero if height of W was changed. */ 8902 Value is non-zero if height of W was changed. */
9090 8903
9091static int 8904static int
9092display_echo_area_1 (a1, a2, a3, a4) 8905display_echo_area_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
9093 EMACS_INT a1;
9094 Lisp_Object a2;
9095 EMACS_INT a3, a4;
9096{ 8906{
9097 struct window *w = (struct window *) a1; 8907 struct window *w = (struct window *) a1;
9098 Lisp_Object window; 8908 Lisp_Object window;
@@ -9121,7 +8931,7 @@ display_echo_area_1 (a1, a2, a3, a4)
9121 is active, don't shrink it. */ 8931 is active, don't shrink it. */
9122 8932
9123void 8933void
9124resize_echo_area_exactly () 8934resize_echo_area_exactly (void)
9125{ 8935{
9126 if (BUFFERP (echo_area_buffer[0]) 8936 if (BUFFERP (echo_area_buffer[0])
9127 && WINDOWP (echo_area_window)) 8937 && WINDOWP (echo_area_window))
@@ -9154,10 +8964,7 @@ resize_echo_area_exactly ()
9154 resize_mini_window returns. */ 8964 resize_mini_window returns. */
9155 8965
9156static int 8966static int
9157resize_mini_window_1 (a1, exactly, a3, a4) 8967resize_mini_window_1 (EMACS_INT a1, Lisp_Object exactly, EMACS_INT a3, EMACS_INT a4)
9158 EMACS_INT a1;
9159 Lisp_Object exactly;
9160 EMACS_INT a3, a4;
9161{ 8968{
9162 return resize_mini_window ((struct window *) a1, !NILP (exactly)); 8969 return resize_mini_window ((struct window *) a1, !NILP (exactly));
9163} 8970}
@@ -9175,9 +8982,7 @@ resize_mini_window_1 (a1, exactly, a3, a4)
9175 Value is non-zero if the window height has been changed. */ 8982 Value is non-zero if the window height has been changed. */
9176 8983
9177int 8984int
9178resize_mini_window (w, exact_p) 8985resize_mini_window (struct window *w, int exact_p)
9179 struct window *w;
9180 int exact_p;
9181{ 8986{
9182 struct frame *f = XFRAME (w->frame); 8987 struct frame *f = XFRAME (w->frame);
9183 int window_height_changed_p = 0; 8988 int window_height_changed_p = 0;
@@ -9318,7 +9123,7 @@ resize_mini_window (w, exact_p)
9318 current message. */ 9123 current message. */
9319 9124
9320Lisp_Object 9125Lisp_Object
9321current_message () 9126current_message (void)
9322{ 9127{
9323 Lisp_Object msg; 9128 Lisp_Object msg;
9324 9129
@@ -9337,10 +9142,7 @@ current_message ()
9337 9142
9338 9143
9339static int 9144static int
9340current_message_1 (a1, a2, a3, a4) 9145current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
9341 EMACS_INT a1;
9342 Lisp_Object a2;
9343 EMACS_INT a3, a4;
9344{ 9146{
9345 Lisp_Object *msg = (Lisp_Object *) a1; 9147 Lisp_Object *msg = (Lisp_Object *) a1;
9346 9148
@@ -9358,7 +9160,7 @@ current_message_1 (a1, a2, a3, a4)
9358 worth optimizing. */ 9160 worth optimizing. */
9359 9161
9360int 9162int
9361push_message () 9163push_message (void)
9362{ 9164{
9363 Lisp_Object msg; 9165 Lisp_Object msg;
9364 msg = current_message (); 9166 msg = current_message ();
@@ -9370,7 +9172,7 @@ push_message ()
9370/* Restore message display from the top of Vmessage_stack. */ 9172/* Restore message display from the top of Vmessage_stack. */
9371 9173
9372void 9174void
9373restore_message () 9175restore_message (void)
9374{ 9176{
9375 Lisp_Object msg; 9177 Lisp_Object msg;
9376 9178
@@ -9386,8 +9188,7 @@ restore_message ()
9386/* Handler for record_unwind_protect calling pop_message. */ 9188/* Handler for record_unwind_protect calling pop_message. */
9387 9189
9388Lisp_Object 9190Lisp_Object
9389pop_message_unwind (dummy) 9191pop_message_unwind (Lisp_Object dummy)
9390 Lisp_Object dummy;
9391{ 9192{
9392 pop_message (); 9193 pop_message ();
9393 return Qnil; 9194 return Qnil;
@@ -9396,7 +9197,7 @@ pop_message_unwind (dummy)
9396/* Pop the top-most entry off Vmessage_stack. */ 9197/* Pop the top-most entry off Vmessage_stack. */
9397 9198
9398void 9199void
9399pop_message () 9200pop_message (void)
9400{ 9201{
9401 xassert (CONSP (Vmessage_stack)); 9202 xassert (CONSP (Vmessage_stack));
9402 Vmessage_stack = XCDR (Vmessage_stack); 9203 Vmessage_stack = XCDR (Vmessage_stack);
@@ -9408,7 +9209,7 @@ pop_message ()
9408 somewhere. */ 9209 somewhere. */
9409 9210
9410void 9211void
9411check_message_stack () 9212check_message_stack (void)
9412{ 9213{
9413 if (!NILP (Vmessage_stack)) 9214 if (!NILP (Vmessage_stack))
9414 abort (); 9215 abort ();
@@ -9419,8 +9220,7 @@ check_message_stack ()
9419 time we display it---but don't redisplay it now. */ 9220 time we display it---but don't redisplay it now. */
9420 9221
9421void 9222void
9422truncate_echo_area (nchars) 9223truncate_echo_area (int nchars)
9423 int nchars;
9424{ 9224{
9425 if (nchars == 0) 9225 if (nchars == 0)
9426 echo_area_buffer[0] = Qnil; 9226 echo_area_buffer[0] = Qnil;
@@ -9442,10 +9242,7 @@ truncate_echo_area (nchars)
9442 message to at most NCHARS characters. */ 9242 message to at most NCHARS characters. */
9443 9243
9444static int 9244static int
9445truncate_message_1 (nchars, a2, a3, a4) 9245truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
9446 EMACS_INT nchars;
9447 Lisp_Object a2;
9448 EMACS_INT a3, a4;
9449{ 9246{
9450 if (BEG + nchars < Z) 9247 if (BEG + nchars < Z)
9451 del_range (BEG + nchars, Z); 9248 del_range (BEG + nchars, Z);
@@ -9470,10 +9267,7 @@ truncate_message_1 (nchars, a2, a3, a4)
9470 */ 9267 */
9471 9268
9472void 9269void
9473set_message (s, string, nbytes, multibyte_p) 9270set_message (const char *s, Lisp_Object string, int nbytes, int multibyte_p)
9474 const char *s;
9475 Lisp_Object string;
9476 int nbytes, multibyte_p;
9477{ 9271{
9478 message_enable_multibyte 9272 message_enable_multibyte
9479 = ((s && multibyte_p) 9273 = ((s && multibyte_p)
@@ -9492,10 +9286,7 @@ set_message (s, string, nbytes, multibyte_p)
9492 current. */ 9286 current. */
9493 9287
9494static int 9288static int
9495set_message_1 (a1, a2, nbytes, multibyte_p) 9289set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p)
9496 EMACS_INT a1;
9497 Lisp_Object a2;
9498 EMACS_INT nbytes, multibyte_p;
9499{ 9290{
9500 const char *s = (const char *) a1; 9291 const char *s = (const char *) a1;
9501 Lisp_Object string = a2; 9292 Lisp_Object string = a2;
@@ -9574,8 +9365,7 @@ set_message_1 (a1, a2, nbytes, multibyte_p)
9574 last displayed. */ 9365 last displayed. */
9575 9366
9576void 9367void
9577clear_message (current_p, last_displayed_p) 9368clear_message (int current_p, int last_displayed_p)
9578 int current_p, last_displayed_p;
9579{ 9369{
9580 if (current_p) 9370 if (current_p)
9581 { 9371 {
@@ -9599,7 +9389,7 @@ clear_message (current_p, last_displayed_p)
9599 and ensure a complete redisplay of all windows. */ 9389 and ensure a complete redisplay of all windows. */
9600 9390
9601static void 9391static void
9602clear_garbaged_frames () 9392clear_garbaged_frames (void)
9603{ 9393{
9604 if (frame_garbaged) 9394 if (frame_garbaged)
9605 { 9395 {
@@ -9636,8 +9426,7 @@ clear_garbaged_frames ()
9636 mini-windows height has been changed. */ 9426 mini-windows height has been changed. */
9637 9427
9638static int 9428static int
9639echo_area_display (update_frame_p) 9429echo_area_display (int update_frame_p)
9640 int update_frame_p;
9641{ 9430{
9642 Lisp_Object mini_window; 9431 Lisp_Object mini_window;
9643 struct window *w; 9432 struct window *w;
@@ -9812,8 +9601,7 @@ format_mode_line_unwind_data (struct buffer *obuf,
9812} 9601}
9813 9602
9814static Lisp_Object 9603static Lisp_Object
9815unwind_format_mode_line (vector) 9604unwind_format_mode_line (Lisp_Object vector)
9816 Lisp_Object vector;
9817{ 9605{
9818 mode_line_target = XINT (AREF (vector, 0)); 9606 mode_line_target = XINT (AREF (vector, 0));
9819 mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1)); 9607 mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1));
@@ -9873,9 +9661,7 @@ store_mode_line_noprop_char (c)
9873 frame title. */ 9661 frame title. */
9874 9662
9875static int 9663static int
9876store_mode_line_noprop (str, field_width, precision) 9664store_mode_line_noprop (const unsigned char *str, int field_width, int precision)
9877 const unsigned char *str;
9878 int field_width, precision;
9879{ 9665{
9880 int n = 0; 9666 int n = 0;
9881 int dummy, nbytes; 9667 int dummy, nbytes;
@@ -9908,8 +9694,7 @@ store_mode_line_noprop (str, field_width, precision)
9908 frame_title_format. */ 9694 frame_title_format. */
9909 9695
9910static void 9696static void
9911x_consider_frame_title (frame) 9697x_consider_frame_title (Lisp_Object frame)
9912 Lisp_Object frame;
9913{ 9698{
9914 struct frame *f = XFRAME (frame); 9699 struct frame *f = XFRAME (frame);
9915 9700
@@ -9988,7 +9773,7 @@ x_consider_frame_title (frame)
9988 appropriate. This can call eval. */ 9773 appropriate. This can call eval. */
9989 9774
9990void 9775void
9991prepare_menu_bars () 9776prepare_menu_bars (void)
9992{ 9777{
9993 int all_windows; 9778 int all_windows;
9994 struct gcpro gcpro1, gcpro2; 9779 struct gcpro gcpro1, gcpro2;
@@ -10107,10 +9892,7 @@ prepare_menu_bars ()
10107 updated value of this flag, to pass to the next call. */ 9892 updated value of this flag, to pass to the next call. */
10108 9893
10109static int 9894static int
10110update_menu_bar (f, save_match_data, hooks_run) 9895update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
10111 struct frame *f;
10112 int save_match_data;
10113 int hooks_run;
10114{ 9896{
10115 Lisp_Object window; 9897 Lisp_Object window;
10116 register struct window *w; 9898 register struct window *w;
@@ -10235,8 +10017,7 @@ struct cursor_pos output_cursor;
10235 positions are relative to updated_window. */ 10017 positions are relative to updated_window. */
10236 10018
10237void 10019void
10238set_output_cursor (cursor) 10020set_output_cursor (struct cursor_pos *cursor)
10239 struct cursor_pos *cursor;
10240{ 10021{
10241 output_cursor.hpos = cursor->hpos; 10022 output_cursor.hpos = cursor->hpos;
10242 output_cursor.vpos = cursor->vpos; 10023 output_cursor.vpos = cursor->vpos;
@@ -10257,8 +10038,7 @@ set_output_cursor (cursor)
10257 selected_window and display the cursor at the given position. */ 10038 selected_window and display the cursor at the given position. */
10258 10039
10259void 10040void
10260x_cursor_to (vpos, hpos, y, x) 10041x_cursor_to (int vpos, int hpos, int y, int x)
10261 int vpos, hpos, y, x;
10262{ 10042{
10263 struct window *w; 10043 struct window *w;
10264 10044
@@ -10306,8 +10086,7 @@ int last_tool_bar_item;
10306 10086
10307 10087
10308static Lisp_Object 10088static Lisp_Object
10309update_tool_bar_unwind (frame) 10089update_tool_bar_unwind (Lisp_Object frame)
10310 Lisp_Object frame;
10311{ 10090{
10312 selected_frame = frame; 10091 selected_frame = frame;
10313 return Qnil; 10092 return Qnil;
@@ -10319,9 +10098,7 @@ update_tool_bar_unwind (frame)
10319 and restore it here. */ 10098 and restore it here. */
10320 10099
10321static void 10100static void
10322update_tool_bar (f, save_match_data) 10101update_tool_bar (struct frame *f, int save_match_data)
10323 struct frame *f;
10324 int save_match_data;
10325{ 10102{
10326#if defined (USE_GTK) || defined (HAVE_NS) 10103#if defined (USE_GTK) || defined (HAVE_NS)
10327 int do_update = FRAME_EXTERNAL_TOOL_BAR (f); 10104 int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
@@ -10419,8 +10196,7 @@ update_tool_bar (f, save_match_data)
10419 been set up previously by calling prepare_menu_bars. */ 10196 been set up previously by calling prepare_menu_bars. */
10420 10197
10421static void 10198static void
10422build_desired_tool_bar_string (f) 10199build_desired_tool_bar_string (struct frame *f)
10423 struct frame *f;
10424{ 10200{
10425 int i, size, size_needed; 10201 int i, size, size_needed;
10426 struct gcpro gcpro1, gcpro2, gcpro3; 10202 struct gcpro gcpro1, gcpro2, gcpro3;
@@ -10591,9 +10367,7 @@ build_desired_tool_bar_string (f)
10591*/ 10367*/
10592 10368
10593static void 10369static void
10594display_tool_bar_line (it, height) 10370display_tool_bar_line (struct it *it, int height)
10595 struct it *it;
10596 int height;
10597{ 10371{
10598 struct glyph_row *row = it->glyph_row; 10372 struct glyph_row *row = it->glyph_row;
10599 int max_x = it->last_visible_x; 10373 int max_x = it->last_visible_x;
@@ -10720,9 +10494,7 @@ display_tool_bar_line (it, height)
10720 returned in *N_ROWS if non-NULL. */ 10494 returned in *N_ROWS if non-NULL. */
10721 10495
10722static int 10496static int
10723tool_bar_lines_needed (f, n_rows) 10497tool_bar_lines_needed (struct frame *f, int *n_rows)
10724 struct frame *f;
10725 int *n_rows;
10726{ 10498{
10727 struct window *w = XWINDOW (f->tool_bar_window); 10499 struct window *w = XWINDOW (f->tool_bar_window);
10728 struct it it; 10500 struct it it;
@@ -10790,8 +10562,7 @@ DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed,
10790 height should be changed. */ 10562 height should be changed. */
10791 10563
10792static int 10564static int
10793redisplay_tool_bar (f) 10565redisplay_tool_bar (struct frame *f)
10794 struct frame *f;
10795{ 10566{
10796 struct window *w; 10567 struct window *w;
10797 struct it it; 10568 struct it it;
@@ -10962,10 +10733,7 @@ redisplay_tool_bar (f)
10962 GLYPH doesn't display a tool-bar item. */ 10733 GLYPH doesn't display a tool-bar item. */
10963 10734
10964static int 10735static int
10965tool_bar_item_info (f, glyph, prop_idx) 10736tool_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx)
10966 struct frame *f;
10967 struct glyph *glyph;
10968 int *prop_idx;
10969{ 10737{
10970 Lisp_Object prop; 10738 Lisp_Object prop;
10971 int success_p; 10739 int success_p;
@@ -11005,11 +10773,8 @@ tool_bar_item_info (f, glyph, prop_idx)
11005 1 otherwise. */ 10773 1 otherwise. */
11006 10774
11007static int 10775static int
11008get_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx) 10776get_tool_bar_item (struct frame *f, int x, int y, struct glyph **glyph,
11009 struct frame *f; 10777 int *hpos, int *vpos, int *prop_idx)
11010 int x, y;
11011 struct glyph **glyph;
11012 int *hpos, *vpos, *prop_idx;
11013{ 10778{
11014 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 10779 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
11015 struct window *w = XWINDOW (f->tool_bar_window); 10780 struct window *w = XWINDOW (f->tool_bar_window);
@@ -11047,10 +10812,8 @@ get_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx)
11047 release. */ 10812 release. */
11048 10813
11049void 10814void
11050handle_tool_bar_click (f, x, y, down_p, modifiers) 10815handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
11051 struct frame *f; 10816 unsigned int modifiers)
11052 int x, y, down_p;
11053 unsigned int modifiers;
11054{ 10817{
11055 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 10818 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
11056 struct window *w = XWINDOW (f->tool_bar_window); 10819 struct window *w = XWINDOW (f->tool_bar_window);
@@ -11108,9 +10871,7 @@ handle_tool_bar_click (f, x, y, down_p, modifiers)
11108 note_mouse_highlight. */ 10871 note_mouse_highlight. */
11109 10872
11110static void 10873static void
11111note_tool_bar_highlight (f, x, y) 10874note_tool_bar_highlight (struct frame *f, int x, int y)
11112 struct frame *f;
11113 int x, y;
11114{ 10875{
11115 Lisp_Object window = f->tool_bar_window; 10876 Lisp_Object window = f->tool_bar_window;
11116 struct window *w = XWINDOW (window); 10877 struct window *w = XWINDOW (window);
@@ -11214,8 +10975,7 @@ static int hscroll_windows (Lisp_Object);
11214 changed. */ 10975 changed. */
11215 10976
11216static int 10977static int
11217hscroll_window_tree (window) 10978hscroll_window_tree (Lisp_Object window)
11218 Lisp_Object window;
11219{ 10979{
11220 int hscrolled_p = 0; 10980 int hscrolled_p = 0;
11221 int hscroll_relative_p = FLOATP (Vhscroll_step); 10981 int hscroll_relative_p = FLOATP (Vhscroll_step);
@@ -11358,8 +11118,7 @@ hscroll_window_tree (window)
11358 of WINDOW are cleared. */ 11118 of WINDOW are cleared. */
11359 11119
11360static int 11120static int
11361hscroll_windows (window) 11121hscroll_windows (Lisp_Object window)
11362 Lisp_Object window;
11363{ 11122{
11364 int hscrolled_p = hscroll_window_tree (window); 11123 int hscrolled_p = hscroll_window_tree (window);
11365 if (hscrolled_p) 11124 if (hscrolled_p)
@@ -11442,9 +11201,7 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
11442 redisplay_internal for display optimization. */ 11201 redisplay_internal for display optimization. */
11443 11202
11444static INLINE int 11203static INLINE int
11445text_outside_line_unchanged_p (w, start, end) 11204text_outside_line_unchanged_p (struct window *w, int start, int end)
11446 struct window *w;
11447 int start, end;
11448{ 11205{
11449 int unchanged_p = 1; 11206 int unchanged_p = 1;
11450 11207
@@ -11511,15 +11268,14 @@ text_outside_line_unchanged_p (w, start, end)
11511 mini-buffer if that is in use. */ 11268 mini-buffer if that is in use. */
11512 11269
11513void 11270void
11514redisplay () 11271redisplay (void)
11515{ 11272{
11516 redisplay_internal (0); 11273 redisplay_internal (0);
11517} 11274}
11518 11275
11519 11276
11520static Lisp_Object 11277static Lisp_Object
11521overlay_arrow_string_or_property (var) 11278overlay_arrow_string_or_property (Lisp_Object var)
11522 Lisp_Object var;
11523{ 11279{
11524 Lisp_Object val; 11280 Lisp_Object val;
11525 11281
@@ -11531,7 +11287,7 @@ overlay_arrow_string_or_property (var)
11531 11287
11532/* Return 1 if there are any overlay-arrows in current_buffer. */ 11288/* Return 1 if there are any overlay-arrows in current_buffer. */
11533static int 11289static int
11534overlay_arrow_in_current_buffer_p () 11290overlay_arrow_in_current_buffer_p (void)
11535{ 11291{
11536 Lisp_Object vlist; 11292 Lisp_Object vlist;
11537 11293
@@ -11557,7 +11313,7 @@ overlay_arrow_in_current_buffer_p ()
11557 has changed. */ 11313 has changed. */
11558 11314
11559static int 11315static int
11560overlay_arrows_changed_p () 11316overlay_arrows_changed_p (void)
11561{ 11317{
11562 Lisp_Object vlist; 11318 Lisp_Object vlist;
11563 11319
@@ -11585,8 +11341,7 @@ overlay_arrows_changed_p ()
11585/* Mark overlay arrows to be updated on next redisplay. */ 11341/* Mark overlay arrows to be updated on next redisplay. */
11586 11342
11587static void 11343static void
11588update_overlay_arrows (up_to_date) 11344update_overlay_arrows (int up_to_date)
11589 int up_to_date;
11590{ 11345{
11591 Lisp_Object vlist; 11346 Lisp_Object vlist;
11592 11347
@@ -11622,9 +11377,7 @@ update_overlay_arrows (up_to_date)
11622 Return nil if no overlay arrow. */ 11377 Return nil if no overlay arrow. */
11623 11378
11624static Lisp_Object 11379static Lisp_Object
11625overlay_arrow_at_row (it, row) 11380overlay_arrow_at_row (struct it *it, struct glyph_row *row)
11626 struct it *it;
11627 struct glyph_row *row;
11628{ 11381{
11629 Lisp_Object vlist; 11382 Lisp_Object vlist;
11630 11383
@@ -11669,9 +11422,8 @@ overlay_arrow_at_row (it, row)
11669 position. BUF and PT are the current point buffer and position. */ 11422 position. BUF and PT are the current point buffer and position. */
11670 11423
11671int 11424int
11672check_point_in_composition (prev_buf, prev_pt, buf, pt) 11425check_point_in_composition (struct buffer *prev_buf, int prev_pt,
11673 struct buffer *prev_buf, *buf; 11426 struct buffer *buf, int pt)
11674 int prev_pt, pt;
11675{ 11427{
11676 EMACS_INT start, end; 11428 EMACS_INT start, end;
11677 Lisp_Object prop; 11429 Lisp_Object prop;
@@ -11707,9 +11459,7 @@ check_point_in_composition (prev_buf, prev_pt, buf, pt)
11707 in window W. */ 11459 in window W. */
11708 11460
11709static INLINE void 11461static INLINE void
11710reconsider_clip_changes (w, b) 11462reconsider_clip_changes (struct window *w, struct buffer *b)
11711 struct window *w;
11712 struct buffer *b;
11713{ 11463{
11714 if (b->clip_changed 11464 if (b->clip_changed
11715 && !NILP (w->window_end_valid) 11465 && !NILP (w->window_end_valid)
@@ -11748,8 +11498,7 @@ reconsider_clip_changes (w, b)
11748 directly. */ 11498 directly. */
11749 11499
11750static void 11500static void
11751select_frame_for_redisplay (frame) 11501select_frame_for_redisplay (Lisp_Object frame)
11752 Lisp_Object frame;
11753{ 11502{
11754 Lisp_Object tail, tem; 11503 Lisp_Object tail, tem;
11755 Lisp_Object old = selected_frame; 11504 Lisp_Object old = selected_frame;
@@ -11790,8 +11539,7 @@ do { if (polling_stopped_here) start_polling (); \
11790 causes some problems. */ 11539 causes some problems. */
11791 11540
11792static void 11541static void
11793redisplay_internal (preserve_echo_area) 11542redisplay_internal (int preserve_echo_area)
11794 int preserve_echo_area;
11795{ 11543{
11796 struct window *w = XWINDOW (selected_window); 11544 struct window *w = XWINDOW (selected_window);
11797 struct frame *f; 11545 struct frame *f;
@@ -12524,8 +12272,7 @@ redisplay_internal (preserve_echo_area)
12524 called. This is useful for debugging. */ 12272 called. This is useful for debugging. */
12525 12273
12526void 12274void
12527redisplay_preserve_echo_area (from_where) 12275redisplay_preserve_echo_area (int from_where)
12528 int from_where;
12529{ 12276{
12530 TRACE ((stderr, "redisplay_preserve_echo_area (%d)\n", from_where)); 12277 TRACE ((stderr, "redisplay_preserve_echo_area (%d)\n", from_where));
12531 12278
@@ -12554,8 +12301,7 @@ redisplay_preserve_echo_area (from_where)
12554 failure during redisplay, for example). */ 12301 failure during redisplay, for example). */
12555 12302
12556static Lisp_Object 12303static Lisp_Object
12557unwind_redisplay (val) 12304unwind_redisplay (Lisp_Object val)
12558 Lisp_Object val;
12559{ 12305{
12560 Lisp_Object old_redisplaying_p, old_frame; 12306 Lisp_Object old_redisplaying_p, old_frame;
12561 12307
@@ -12575,9 +12321,7 @@ unwind_redisplay (val)
12575 redisplay_internal is called. */ 12321 redisplay_internal is called. */
12576 12322
12577static void 12323static void
12578mark_window_display_accurate_1 (w, accurate_p) 12324mark_window_display_accurate_1 (struct window *w, int accurate_p)
12579 struct window *w;
12580 int accurate_p;
12581{ 12325{
12582 if (BUFFERP (w->buffer)) 12326 if (BUFFERP (w->buffer))
12583 { 12327 {
@@ -12628,9 +12372,7 @@ mark_window_display_accurate_1 (w, accurate_p)
12628 be redisplayed the next time redisplay_internal is called. */ 12372 be redisplayed the next time redisplay_internal is called. */
12629 12373
12630void 12374void
12631mark_window_display_accurate (window, accurate_p) 12375mark_window_display_accurate (Lisp_Object window, int accurate_p)
12632 Lisp_Object window;
12633 int accurate_p;
12634{ 12376{
12635 struct window *w; 12377 struct window *w;
12636 12378
@@ -12665,9 +12407,7 @@ mark_window_display_accurate (window, accurate_p)
12665 macro DISP_CHAR_VECTOR. */ 12407 macro DISP_CHAR_VECTOR. */
12666 12408
12667Lisp_Object 12409Lisp_Object
12668disp_char_vector (dp, c) 12410disp_char_vector (struct Lisp_Char_Table *dp, int c)
12669 struct Lisp_Char_Table *dp;
12670 int c;
12671{ 12411{
12672 Lisp_Object val; 12412 Lisp_Object val;
12673 12413
@@ -12698,8 +12438,7 @@ disp_char_vector (dp, c)
12698/* Redisplay all leaf windows in the window tree rooted at WINDOW. */ 12438/* Redisplay all leaf windows in the window tree rooted at WINDOW. */
12699 12439
12700static void 12440static void
12701redisplay_windows (window) 12441redisplay_windows (Lisp_Object window)
12702 Lisp_Object window;
12703{ 12442{
12704 while (!NILP (window)) 12443 while (!NILP (window))
12705 { 12444 {
@@ -12724,15 +12463,14 @@ redisplay_windows (window)
12724} 12463}
12725 12464
12726static Lisp_Object 12465static Lisp_Object
12727redisplay_window_error () 12466redisplay_window_error (Lisp_Object ignore)
12728{ 12467{
12729 displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer); 12468 displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer);
12730 return Qnil; 12469 return Qnil;
12731} 12470}
12732 12471
12733static Lisp_Object 12472static Lisp_Object
12734redisplay_window_0 (window) 12473redisplay_window_0 (Lisp_Object window)
12735 Lisp_Object window;
12736{ 12474{
12737 if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) 12475 if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
12738 redisplay_window (window, 0); 12476 redisplay_window (window, 0);
@@ -12740,8 +12478,7 @@ redisplay_window_0 (window)
12740} 12478}
12741 12479
12742static Lisp_Object 12480static Lisp_Object
12743redisplay_window_1 (window) 12481redisplay_window_1 (Lisp_Object window)
12744 Lisp_Object window;
12745{ 12482{
12746 if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) 12483 if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
12747 redisplay_window (window, 1); 12484 redisplay_window (window, 1);
@@ -12769,11 +12506,9 @@ redisplay_window_1 (window)
12769 Return 0 if cursor is not on this row, 1 otherwise. */ 12506 Return 0 if cursor is not on this row, 1 otherwise. */
12770 12507
12771int 12508int
12772set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) 12509set_cursor_from_row (struct window *w, struct glyph_row *row,
12773 struct window *w; 12510 struct glyph_matrix *matrix, int delta, int delta_bytes,
12774 struct glyph_row *row; 12511 int dy, int dvpos)
12775 struct glyph_matrix *matrix;
12776 int delta, delta_bytes, dy, dvpos;
12777{ 12512{
12778 struct glyph *glyph = row->glyphs[TEXT_AREA]; 12513 struct glyph *glyph = row->glyphs[TEXT_AREA];
12779 struct glyph *end = glyph + row->used[TEXT_AREA]; 12514 struct glyph *end = glyph + row->used[TEXT_AREA];
@@ -13259,9 +12994,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
13259 We assume that the window's buffer is really current. */ 12994 We assume that the window's buffer is really current. */
13260 12995
13261static INLINE struct text_pos 12996static INLINE struct text_pos
13262run_window_scroll_functions (window, startp) 12997run_window_scroll_functions (Lisp_Object window, struct text_pos startp)
13263 Lisp_Object window;
13264 struct text_pos startp;
13265{ 12998{
13266 struct window *w = XWINDOW (window); 12999 struct window *w = XWINDOW (window);
13267 SET_MARKER_FROM_TEXT_POS (w->start, startp); 13000 SET_MARKER_FROM_TEXT_POS (w->start, startp);
@@ -13295,10 +13028,7 @@ run_window_scroll_functions (window, startp)
13295 as if point had gone off the screen. */ 13028 as if point had gone off the screen. */
13296 13029
13297static int 13030static int
13298cursor_row_fully_visible_p (w, force_p, current_matrix_p) 13031cursor_row_fully_visible_p (struct window *w, int force_p, int current_matrix_p)
13299 struct window *w;
13300 int force_p;
13301 int current_matrix_p;
13302{ 13032{
13303 struct glyph_matrix *matrix; 13033 struct glyph_matrix *matrix;
13304 struct glyph_row *row; 13034 struct glyph_row *row;
@@ -13617,8 +13347,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
13617 screen line with the minimum distance from the old start W->start. */ 13347 screen line with the minimum distance from the old start W->start. */
13618 13348
13619static int 13349static int
13620compute_window_start_on_continuation_line (w) 13350compute_window_start_on_continuation_line (struct window *w)
13621 struct window *w;
13622{ 13351{
13623 struct text_pos pos, start_pos; 13352 struct text_pos pos, start_pos;
13624 int window_start_changed_p = 0; 13353 int window_start_changed_p = 0;
@@ -13704,10 +13433,7 @@ enum
13704}; 13433};
13705 13434
13706static int 13435static int
13707try_cursor_movement (window, startp, scroll_step) 13436try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_step)
13708 Lisp_Object window;
13709 struct text_pos startp;
13710 int *scroll_step;
13711{ 13437{
13712 struct window *w = XWINDOW (window); 13438 struct window *w = XWINDOW (window);
13713 struct frame *f = XFRAME (w->frame); 13439 struct frame *f = XFRAME (w->frame);
@@ -14011,8 +13737,7 @@ try_cursor_movement (window, startp, scroll_step)
14011} 13737}
14012 13738
14013void 13739void
14014set_vertical_scroll_bar (w) 13740set_vertical_scroll_bar (struct window *w)
14015 struct window *w;
14016{ 13741{
14017 int start, end, whole; 13742 int start, end, whole;
14018 13743
@@ -14057,9 +13782,7 @@ set_vertical_scroll_bar (w)
14057 retry. */ 13782 retry. */
14058 13783
14059static void 13784static void
14060redisplay_window (window, just_this_one_p) 13785redisplay_window (Lisp_Object window, int just_this_one_p)
14061 Lisp_Object window;
14062 int just_this_one_p;
14063{ 13786{
14064 struct window *w = XWINDOW (window); 13787 struct window *w = XWINDOW (window);
14065 struct frame *f = XFRAME (w->frame); 13788 struct frame *f = XFRAME (w->frame);
@@ -14853,10 +14576,7 @@ redisplay_window (window, just_this_one_p)
14853 set in FLAGS.) */ 14576 set in FLAGS.) */
14854 14577
14855int 14578int
14856try_window (window, pos, flags) 14579try_window (Lisp_Object window, struct text_pos pos, int flags)
14857 Lisp_Object window;
14858 struct text_pos pos;
14859 int flags;
14860{ 14580{
14861 struct window *w = XWINDOW (window); 14581 struct window *w = XWINDOW (window);
14862 struct it it; 14582 struct it it;
@@ -14956,8 +14676,7 @@ try_window (window, pos, flags)
14956 W->start is the new window start. */ 14676 W->start is the new window start. */
14957 14677
14958static int 14678static int
14959try_window_reusing_current_matrix (w) 14679try_window_reusing_current_matrix (struct window *w)
14960 struct window *w;
14961{ 14680{
14962 struct frame *f = XFRAME (w->frame); 14681 struct frame *f = XFRAME (w->frame);
14963 struct glyph_row *row, *bottom_row; 14682 struct glyph_row *row, *bottom_row;
@@ -15398,10 +15117,8 @@ find_last_row_displaying_text (struct glyph_matrix *, struct it *,
15398 a pointer to the row found. */ 15117 a pointer to the row found. */
15399 15118
15400static struct glyph_row * 15119static struct glyph_row *
15401find_last_row_displaying_text (matrix, it, start) 15120find_last_row_displaying_text (struct glyph_matrix *matrix, struct it *it,
15402 struct glyph_matrix *matrix; 15121 struct glyph_row *start)
15403 struct it *it;
15404 struct glyph_row *start;
15405{ 15122{
15406 struct glyph_row *row, *row_found; 15123 struct glyph_row *row, *row_found;
15407 15124
@@ -15434,8 +15151,7 @@ find_last_row_displaying_text (matrix, it, start)
15434 when the current matrix was built. */ 15151 when the current matrix was built. */
15435 15152
15436static struct glyph_row * 15153static struct glyph_row *
15437find_last_unchanged_at_beg_row (w) 15154find_last_unchanged_at_beg_row (struct window *w)
15438 struct window *w;
15439{ 15155{
15440 int first_changed_pos = BEG + BEG_UNCHANGED; 15156 int first_changed_pos = BEG + BEG_UNCHANGED;
15441 struct glyph_row *row; 15157 struct glyph_row *row;
@@ -15484,9 +15200,7 @@ find_last_unchanged_at_beg_row (w)
15484 changes. */ 15200 changes. */
15485 15201
15486static struct glyph_row * 15202static struct glyph_row *
15487find_first_unchanged_at_end_row (w, delta, delta_bytes) 15203find_first_unchanged_at_end_row (struct window *w, int *delta, int *delta_bytes)
15488 struct window *w;
15489 int *delta, *delta_bytes;
15490{ 15204{
15491 struct glyph_row *row; 15205 struct glyph_row *row;
15492 struct glyph_row *row_found = NULL; 15206 struct glyph_row *row_found = NULL;
@@ -15559,8 +15273,7 @@ find_first_unchanged_at_end_row (w, delta, delta_bytes)
15559 try_window_reusing_current_matrix. */ 15273 try_window_reusing_current_matrix. */
15560 15274
15561static void 15275static void
15562sync_frame_with_window_matrix_rows (w) 15276sync_frame_with_window_matrix_rows (struct window *w)
15563 struct window *w;
15564{ 15277{
15565 struct frame *f = XFRAME (w->frame); 15278 struct frame *f = XFRAME (w->frame);
15566 struct glyph_row *window_row, *window_row_end, *frame_row; 15279 struct glyph_row *window_row, *window_row_end, *frame_row;
@@ -15604,11 +15317,8 @@ sync_frame_with_window_matrix_rows (w)
15604 containing CHARPOS or null. */ 15317 containing CHARPOS or null. */
15605 15318
15606struct glyph_row * 15319struct glyph_row *
15607row_containing_pos (w, charpos, start, end, dy) 15320row_containing_pos (struct window *w, int charpos, struct glyph_row *start,
15608 struct window *w; 15321 struct glyph_row *end, int dy)
15609 int charpos;
15610 struct glyph_row *start, *end;
15611 int dy;
15612{ 15322{
15613 struct glyph_row *row = start; 15323 struct glyph_row *row = start;
15614 struct glyph_row *best_row = NULL; 15324 struct glyph_row *best_row = NULL;
@@ -15710,8 +15420,7 @@ row_containing_pos (w, charpos, start, end, dy)
15710 7. Update W's window end information. */ 15420 7. Update W's window end information. */
15711 15421
15712static int 15422static int
15713try_window_id (w) 15423try_window_id (struct window *w)
15714 struct window *w;
15715{ 15424{
15716 struct frame *f = XFRAME (w->frame); 15425 struct frame *f = XFRAME (w->frame);
15717 struct glyph_matrix *current_matrix = w->current_matrix; 15426 struct glyph_matrix *current_matrix = w->current_matrix;
@@ -16778,9 +16487,7 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */)
16778 Used for non-window-redisplay windows, and for windows w/o left fringe. */ 16487 Used for non-window-redisplay windows, and for windows w/o left fringe. */
16779 16488
16780static struct glyph_row * 16489static struct glyph_row *
16781get_overlay_arrow_glyph_row (w, overlay_arrow_string) 16490get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
16782 struct window *w;
16783 Lisp_Object overlay_arrow_string;
16784{ 16491{
16785 struct frame *f = XFRAME (WINDOW_FRAME (w)); 16492 struct frame *f = XFRAME (WINDOW_FRAME (w));
16786 struct buffer *buffer = XBUFFER (w->buffer); 16493 struct buffer *buffer = XBUFFER (w->buffer);
@@ -16842,8 +16549,7 @@ get_overlay_arrow_glyph_row (w, overlay_arrow_string)
16842 produce_special_glyphs. */ 16549 produce_special_glyphs. */
16843 16550
16844static void 16551static void
16845insert_left_trunc_glyphs (it) 16552insert_left_trunc_glyphs (struct it *it)
16846 struct it *it;
16847{ 16553{
16848 struct it truncate_it; 16554 struct it truncate_it;
16849 struct glyph *from, *end, *to, *toend; 16555 struct glyph *from, *end, *to, *toend;
@@ -16937,8 +16643,7 @@ insert_left_trunc_glyphs (it)
16937 must not be zero. */ 16643 must not be zero. */
16938 16644
16939static void 16645static void
16940compute_line_metrics (it) 16646compute_line_metrics (struct it *it)
16941 struct it *it;
16942{ 16647{
16943 struct glyph_row *row = it->glyph_row; 16648 struct glyph_row *row = it->glyph_row;
16944 int area, i; 16649 int area, i;
@@ -17033,9 +16738,7 @@ compute_line_metrics (it)
17033 end of the line if the row ends in italic text. */ 16738 end of the line if the row ends in italic text. */
17034 16739
17035static int 16740static int
17036append_space_for_newline (it, default_face_p) 16741append_space_for_newline (struct it *it, int default_face_p)
17037 struct it *it;
17038 int default_face_p;
17039{ 16742{
17040 if (FRAME_WINDOW_P (it->f)) 16743 if (FRAME_WINDOW_P (it->f))
17041 { 16744 {
@@ -17099,8 +16802,7 @@ append_space_for_newline (it, default_face_p)
17099 left of the leftmost glyph. */ 16802 left of the leftmost glyph. */
17100 16803
17101static void 16804static void
17102extend_face_to_end_of_line (it) 16805extend_face_to_end_of_line (struct it *it)
17103 struct it *it;
17104{ 16806{
17105 struct face *face; 16807 struct face *face;
17106 struct frame *f = it->f; 16808 struct frame *f = it->f;
@@ -17246,8 +16948,7 @@ extend_face_to_end_of_line (it)
17246 trailing whitespace. */ 16948 trailing whitespace. */
17247 16949
17248static int 16950static int
17249trailing_whitespace_p (charpos) 16951trailing_whitespace_p (int charpos)
17250 int charpos;
17251{ 16952{
17252 int bytepos = CHAR_TO_BYTE (charpos); 16953 int bytepos = CHAR_TO_BYTE (charpos);
17253 int c = 0; 16954 int c = 0;
@@ -17269,9 +16970,7 @@ trailing_whitespace_p (charpos)
17269/* Highlight trailing whitespace, if any, in ROW. */ 16970/* Highlight trailing whitespace, if any, in ROW. */
17270 16971
17271void 16972void
17272highlight_trailing_whitespace (f, row) 16973highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
17273 struct frame *f;
17274 struct glyph_row *row;
17275{ 16974{
17276 int used = row->used[TEXT_AREA]; 16975 int used = row->used[TEXT_AREA];
17277 16976
@@ -17348,9 +17047,7 @@ highlight_trailing_whitespace (f, row)
17348 used to hold the cursor. */ 17047 used to hold the cursor. */
17349 17048
17350static int 17049static int
17351cursor_row_p (w, row) 17050cursor_row_p (struct window *w, struct glyph_row *row)
17352 struct window *w;
17353 struct glyph_row *row;
17354{ 17051{
17355 int cursor_row_p = 1; 17052 int cursor_row_p = 1;
17356 17053
@@ -17465,9 +17162,7 @@ push_display_prop (struct it *it, Lisp_Object prop)
17465/* Return the character-property PROP at the current position in IT. */ 17162/* Return the character-property PROP at the current position in IT. */
17466 17163
17467static Lisp_Object 17164static Lisp_Object
17468get_it_property (it, prop) 17165get_it_property (struct it *it, Lisp_Object prop)
17469 struct it *it;
17470 Lisp_Object prop;
17471{ 17166{
17472 Lisp_Object position; 17167 Lisp_Object position;
17473 17168
@@ -17516,9 +17211,7 @@ handle_line_prefix (struct it *it)
17516 glyphs were produced by PRODUCE_GLYPHS, and the line needs to be 17211 glyphs were produced by PRODUCE_GLYPHS, and the line needs to be
17517 continued. */ 17212 continued. */
17518static void 17213static void
17519unproduce_glyphs (it, n) 17214unproduce_glyphs (struct it *it, int n)
17520 struct it *it;
17521 int n;
17522{ 17215{
17523 struct glyph *glyph, *end; 17216 struct glyph *glyph, *end;
17524 17217
@@ -17538,10 +17231,9 @@ unproduce_glyphs (it, n)
17538/* Find the positions in a bidi-reordered ROW to serve as ROW->minpos 17231/* Find the positions in a bidi-reordered ROW to serve as ROW->minpos
17539 and ROW->maxpos. */ 17232 and ROW->maxpos. */
17540static void 17233static void
17541find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos) 17234find_row_edges (struct it *it, struct glyph_row *row,
17542 struct it *it; 17235 EMACS_INT min_pos, EMACS_INT min_bpos,
17543 struct glyph_row *row; 17236 EMACS_INT max_pos, EMACS_INT max_bpos)
17544 EMACS_INT min_pos, min_bpos, max_pos, max_bpos;
17545{ 17237{
17546 /* FIXME: Revisit this when glyph ``spilling'' in continuation 17238 /* FIXME: Revisit this when glyph ``spilling'' in continuation
17547 lines' rows is implemented for bidi-reordered rows. */ 17239 lines' rows is implemented for bidi-reordered rows. */
@@ -17625,8 +17317,7 @@ find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos)
17625 only. */ 17317 only. */
17626 17318
17627static int 17319static int
17628display_line (it) 17320display_line (struct it *it)
17629 struct it *it;
17630{ 17321{
17631 struct glyph_row *row = it->glyph_row; 17322 struct glyph_row *row = it->glyph_row;
17632 Lisp_Object overlay_arrow_string; 17323 Lisp_Object overlay_arrow_string;
@@ -18379,8 +18070,7 @@ See also `bidi-paragraph-direction'. */)
18379 for the menu bar. */ 18070 for the menu bar. */
18380 18071
18381static void 18072static void
18382display_menu_bar (w) 18073display_menu_bar (struct window *w)
18383 struct window *w;
18384{ 18074{
18385 struct frame *f = XFRAME (WINDOW_FRAME (w)); 18075 struct frame *f = XFRAME (WINDOW_FRAME (w));
18386 struct it it; 18076 struct it it;
@@ -18484,9 +18174,7 @@ display_menu_bar (w)
18484 the number of windows whose mode lines were redisplayed. */ 18174 the number of windows whose mode lines were redisplayed. */
18485 18175
18486static int 18176static int
18487redisplay_mode_lines (window, force) 18177redisplay_mode_lines (Lisp_Object window, int force)
18488 Lisp_Object window;
18489 int force;
18490{ 18178{
18491 int nwindows = 0; 18179 int nwindows = 0;
18492 18180
@@ -18548,8 +18236,7 @@ redisplay_mode_lines (window, force)
18548 sum number of mode lines and header lines displayed. */ 18236 sum number of mode lines and header lines displayed. */
18549 18237
18550static int 18238static int
18551display_mode_lines (w) 18239display_mode_lines (struct window *w)
18552 struct window *w;
18553{ 18240{
18554 Lisp_Object old_selected_window, old_selected_frame; 18241 Lisp_Object old_selected_window, old_selected_frame;
18555 int n = 0; 18242 int n = 0;
@@ -18593,10 +18280,7 @@ display_mode_lines (w)
18593 displayed. */ 18280 displayed. */
18594 18281
18595static int 18282static int
18596display_mode_line (w, face_id, format) 18283display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
18597 struct window *w;
18598 enum face_id face_id;
18599 Lisp_Object format;
18600{ 18284{
18601 struct it it; 18285 struct it it;
18602 struct face *face; 18286 struct face *face;
@@ -18655,8 +18339,7 @@ display_mode_line (w, face_id, format)
18655 Return the updated list. */ 18339 Return the updated list. */
18656 18340
18657static Lisp_Object 18341static Lisp_Object
18658move_elt_to_front (elt, list) 18342move_elt_to_front (Lisp_Object elt, Lisp_Object list)
18659 Lisp_Object elt, list;
18660{ 18343{
18661 register Lisp_Object tail, prev; 18344 register Lisp_Object tail, prev;
18662 register Lisp_Object tem; 18345 register Lisp_Object tem;
@@ -18714,12 +18397,8 @@ move_elt_to_front (elt, list)
18714 `store_mode_line_string', or `display_string'. */ 18397 `store_mode_line_string', or `display_string'. */
18715 18398
18716static int 18399static int
18717display_mode_element (it, depth, field_width, precision, elt, props, risky) 18400display_mode_element (struct it *it, int depth, int field_width, int precision,
18718 struct it *it; 18401 Lisp_Object elt, Lisp_Object props, int risky)
18719 int depth;
18720 int field_width, precision;
18721 Lisp_Object elt, props;
18722 int risky;
18723{ 18402{
18724 int n = 0, field, prec; 18403 int n = 0, field, prec;
18725 int literal = 0; 18404 int literal = 0;
@@ -19181,13 +18860,8 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
19181 */ 18860 */
19182 18861
19183static int 18862static int
19184store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props) 18863store_mode_line_string (char *string, Lisp_Object lisp_string, int copy_string,
19185 char *string; 18864 int field_width, int precision, Lisp_Object props)
19186 Lisp_Object lisp_string;
19187 int copy_string;
19188 int field_width;
19189 int precision;
19190 Lisp_Object props;
19191{ 18865{
19192 int len; 18866 int len;
19193 int n = 0; 18867 int n = 0;
@@ -19374,10 +19048,7 @@ are the selected window and the window's buffer). */)
19374 the positive integer D to BUF using a minimal field width WIDTH. */ 19048 the positive integer D to BUF using a minimal field width WIDTH. */
19375 19049
19376static void 19050static void
19377pint2str (buf, width, d) 19051pint2str (register char *buf, register int width, register int d)
19378 register char *buf;
19379 register int width;
19380 register int d;
19381{ 19052{
19382 register char *p = buf; 19053 register char *p = buf;
19383 19054
@@ -19421,10 +19092,7 @@ static const char power_letter[] =
19421 }; 19092 };
19422 19093
19423static void 19094static void
19424pint2hrstr (buf, width, d) 19095pint2hrstr (char *buf, int width, int d)
19425 char *buf;
19426 int width;
19427 int d;
19428{ 19096{
19429 /* We aim to represent the nonnegative integer D as 19097 /* We aim to represent the nonnegative integer D as
19430 QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */ 19098 QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
@@ -19525,10 +19193,7 @@ pint2hrstr (buf, width, d)
19525static unsigned char invalid_eol_type[] = "(*invalid*)"; 19193static unsigned char invalid_eol_type[] = "(*invalid*)";
19526 19194
19527static char * 19195static char *
19528decode_mode_spec_coding (coding_system, buf, eol_flag) 19196decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
19529 Lisp_Object coding_system;
19530 register char *buf;
19531 int eol_flag;
19532{ 19197{
19533 Lisp_Object val; 19198 Lisp_Object val;
19534 int multibyte = !NILP (current_buffer->enable_multibyte_characters); 19199 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
@@ -19613,11 +19278,8 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
19613static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; 19278static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------";
19614 19279
19615static char * 19280static char *
19616decode_mode_spec (w, c, field_width, precision, string) 19281decode_mode_spec (struct window *w, register int c, int field_width,
19617 struct window *w; 19282 int precision, Lisp_Object *string)
19618 register int c;
19619 int field_width, precision;
19620 Lisp_Object *string;
19621{ 19283{
19622 Lisp_Object obj; 19284 Lisp_Object obj;
19623 struct frame *f = XFRAME (WINDOW_FRAME (w)); 19285 struct frame *f = XFRAME (WINDOW_FRAME (w));
@@ -20034,9 +19696,8 @@ decode_mode_spec (w, c, field_width, precision, string)
20034 Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */ 19696 Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */
20035 19697
20036static int 19698static int
20037display_count_lines (start, start_byte, limit_byte, count, byte_pos_ptr) 19699display_count_lines (int start, int start_byte, int limit_byte, int count,
20038 int start, start_byte, limit_byte, count; 19700 int *byte_pos_ptr)
20039 int *byte_pos_ptr;
20040{ 19701{
20041 register unsigned char *cursor; 19702 register unsigned char *cursor;
20042 unsigned char *base; 19703 unsigned char *base;
@@ -20195,7 +19856,7 @@ display_string (string, lisp_string, face_string, face_string_pos,
20195 with index START. */ 19856 with index START. */
20196 reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start, 19857 reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start,
20197 precision, field_width, multibyte); 19858 precision, field_width, multibyte);
20198 if (string && STRINGP (lisp_string)) 19859 if (string && STRINGP (lisp_string))
20199 /* LISP_STRING is the one returned by decode_mode_spec. We should 19860 /* LISP_STRING is the one returned by decode_mode_spec. We should
20200 ignore its text properties. */ 19861 ignore its text properties. */
20201 it->stop_charpos = -1; 19862 it->stop_charpos = -1;
@@ -20369,9 +20030,7 @@ display_string (string, lisp_string, face_string, face_string_pos,
20369 and 1 if it's invisible and without an ellipsis. */ 20030 and 1 if it's invisible and without an ellipsis. */
20370 20031
20371int 20032int
20372invisible_p (propval, list) 20033invisible_p (register Lisp_Object propval, Lisp_Object list)
20373 register Lisp_Object propval;
20374 Lisp_Object list;
20375{ 20034{
20376 register Lisp_Object tail, proptail; 20035 register Lisp_Object tail, proptail;
20377 20036
@@ -20500,12 +20159,8 @@ else if the text is replaced by an ellipsis. */)
20500 : - 1) 20159 : - 1)
20501 20160
20502int 20161int
20503calc_pixel_width_or_height (res, it, prop, font, width_p, align_to) 20162calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
20504 double *res; 20163 struct font *font, int width_p, int *align_to)
20505 struct it *it;
20506 Lisp_Object prop;
20507 struct font *font;
20508 int width_p, *align_to;
20509{ 20164{
20510 double pixels; 20165 double pixels;
20511 20166
@@ -20723,7 +20378,7 @@ dump_glyph_string (s)
20723 face-override for drawing S. */ 20378 face-override for drawing S. */
20724 20379
20725#ifdef HAVE_NTGUI 20380#ifdef HAVE_NTGUI
20726#define OPTIONAL_HDC(hdc) hdc, 20381#define OPTIONAL_HDC(hdc) HDC hdc,
20727#define DECLARE_HDC(hdc) HDC hdc; 20382#define DECLARE_HDC(hdc) HDC hdc;
20728#define ALLOCATE_HDC(hdc, f) hdc = get_frame_dc ((f)) 20383#define ALLOCATE_HDC(hdc, f) hdc = get_frame_dc ((f))
20729#define RELEASE_HDC(hdc, f) release_frame_dc ((f), (hdc)) 20384#define RELEASE_HDC(hdc, f) release_frame_dc ((f), (hdc))
@@ -20737,15 +20392,10 @@ dump_glyph_string (s)
20737#endif 20392#endif
20738 20393
20739static void 20394static void
20740init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl) 20395init_glyph_string (struct glyph_string *s,
20741 struct glyph_string *s; 20396 OPTIONAL_HDC (hdc)
20742 DECLARE_HDC (hdc) 20397 XChar2b *char2b, struct window *w, struct glyph_row *row,
20743 XChar2b *char2b; 20398 enum glyph_row_area area, int start, enum draw_glyphs_face hl)
20744 struct window *w;
20745 struct glyph_row *row;
20746 enum glyph_row_area area;
20747 int start;
20748 enum draw_glyphs_face hl;
20749{ 20399{
20750 bzero (s, sizeof *s); 20400 bzero (s, sizeof *s);
20751 s->w = w; 20401 s->w = w;
@@ -20770,9 +20420,8 @@ init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl)
20770 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */ 20420 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */
20771 20421
20772static INLINE void 20422static INLINE void
20773append_glyph_string_lists (head, tail, h, t) 20423append_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
20774 struct glyph_string **head, **tail; 20424 struct glyph_string *h, struct glyph_string *t)
20775 struct glyph_string *h, *t;
20776{ 20425{
20777 if (h) 20426 if (h)
20778 { 20427 {
@@ -20791,9 +20440,8 @@ append_glyph_string_lists (head, tail, h, t)
20791 result. */ 20440 result. */
20792 20441
20793static INLINE void 20442static INLINE void
20794prepend_glyph_string_lists (head, tail, h, t) 20443prepend_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
20795 struct glyph_string **head, **tail; 20444 struct glyph_string *h, struct glyph_string *t)
20796 struct glyph_string *h, *t;
20797{ 20445{
20798 if (h) 20446 if (h)
20799 { 20447 {
@@ -20811,9 +20459,8 @@ prepend_glyph_string_lists (head, tail, h, t)
20811 Set *HEAD and *TAIL to the resulting list. */ 20459 Set *HEAD and *TAIL to the resulting list. */
20812 20460
20813static INLINE void 20461static INLINE void
20814append_glyph_string (head, tail, s) 20462append_glyph_string (struct glyph_string **head, struct glyph_string **tail,
20815 struct glyph_string **head, **tail; 20463 struct glyph_string *s)
20816 struct glyph_string *s;
20817{ 20464{
20818 s->next = s->prev = NULL; 20465 s->next = s->prev = NULL;
20819 append_glyph_string_lists (head, tail, s, s); 20466 append_glyph_string_lists (head, tail, s, s);
@@ -20828,11 +20475,8 @@ append_glyph_string (head, tail, s)
20828 DISPLAY_P is non-zero. */ 20475 DISPLAY_P is non-zero. */
20829 20476
20830static INLINE struct face * 20477static INLINE struct face *
20831get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p) 20478get_char_face_and_encoding (struct frame *f, int c, int face_id,
20832 struct frame *f; 20479 XChar2b *char2b, int multibyte_p, int display_p)
20833 int c, face_id;
20834 XChar2b *char2b;
20835 int multibyte_p, display_p;
20836{ 20480{
20837 struct face *face = FACE_FROM_ID (f, face_id); 20481 struct face *face = FACE_FROM_ID (f, face_id);
20838 20482
@@ -20864,11 +20508,8 @@ get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p)
20864 a pointer to a realized face that is ready for display. */ 20508 a pointer to a realized face that is ready for display. */
20865 20509
20866static INLINE struct face * 20510static INLINE struct face *
20867get_glyph_face_and_encoding (f, glyph, char2b, two_byte_p) 20511get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
20868 struct frame *f; 20512 XChar2b *char2b, int *two_byte_p)
20869 struct glyph *glyph;
20870 XChar2b *char2b;
20871 int *two_byte_p;
20872{ 20513{
20873 struct face *face; 20514 struct face *face;
20874 20515
@@ -20906,10 +20547,8 @@ get_glyph_face_and_encoding (f, glyph, char2b, two_byte_p)
20906 Value is the index of a component not in S. */ 20547 Value is the index of a component not in S. */
20907 20548
20908static int 20549static int
20909fill_composite_glyph_string (s, base_face, overlaps) 20550fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
20910 struct glyph_string *s; 20551 int overlaps)
20911 struct face *base_face;
20912 int overlaps;
20913{ 20552{
20914 int i; 20553 int i;
20915 /* For all glyphs of this composition, starting at the offset 20554 /* For all glyphs of this composition, starting at the offset
@@ -20972,10 +20611,8 @@ fill_composite_glyph_string (s, base_face, overlaps)
20972} 20611}
20973 20612
20974static int 20613static int
20975fill_gstring_glyph_string (s, face_id, start, end, overlaps) 20614fill_gstring_glyph_string (struct glyph_string *s, int face_id,
20976 struct glyph_string *s; 20615 int start, int end, int overlaps)
20977 int face_id;
20978 int start, end, overlaps;
20979{ 20616{
20980 struct glyph *glyph, *last; 20617 struct glyph *glyph, *last;
20981 Lisp_Object lgstring; 20618 Lisp_Object lgstring;
@@ -21019,10 +20656,8 @@ fill_gstring_glyph_string (s, face_id, start, end, overlaps)
21019 Value is the index of the first glyph not in S. */ 20656 Value is the index of the first glyph not in S. */
21020 20657
21021static int 20658static int
21022fill_glyph_string (s, face_id, start, end, overlaps) 20659fill_glyph_string (struct glyph_string *s, int face_id,
21023 struct glyph_string *s; 20660 int start, int end, int overlaps)
21024 int face_id;
21025 int start, end, overlaps;
21026{ 20661{
21027 struct glyph *glyph, *last; 20662 struct glyph *glyph, *last;
21028 int voffset; 20663 int voffset;
@@ -21082,8 +20717,7 @@ fill_glyph_string (s, face_id, start, end, overlaps)
21082/* Fill glyph string S from image glyph S->first_glyph. */ 20717/* Fill glyph string S from image glyph S->first_glyph. */
21083 20718
21084static void 20719static void
21085fill_image_glyph_string (s) 20720fill_image_glyph_string (struct glyph_string *s)
21086 struct glyph_string *s;
21087{ 20721{
21088 xassert (s->first_glyph->type == IMAGE_GLYPH); 20722 xassert (s->first_glyph->type == IMAGE_GLYPH);
21089 s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id); 20723 s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id);
@@ -21107,11 +20741,8 @@ fill_image_glyph_string (s)
21107 Value is the index of the first glyph not in S. */ 20741 Value is the index of the first glyph not in S. */
21108 20742
21109static int 20743static int
21110fill_stretch_glyph_string (s, row, area, start, end) 20744fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
21111 struct glyph_string *s; 20745 enum glyph_row_area area, int start, int end)
21112 struct glyph_row *row;
21113 enum glyph_row_area area;
21114 int start, end;
21115{ 20746{
21116 struct glyph *glyph, *last; 20747 struct glyph *glyph, *last;
21117 int voffset, face_id; 20748 int voffset, face_id;
@@ -21145,10 +20776,7 @@ fill_stretch_glyph_string (s, row, area, start, end)
21145} 20776}
21146 20777
21147static struct font_metrics * 20778static struct font_metrics *
21148get_per_char_metric (f, font, char2b) 20779get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b)
21149 struct frame *f;
21150 struct font *font;
21151 XChar2b *char2b;
21152{ 20780{
21153 static struct font_metrics metrics; 20781 static struct font_metrics metrics;
21154 unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b); 20782 unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
@@ -21165,10 +20793,7 @@ get_per_char_metric (f, font, char2b)
21165 assumed to be zero. */ 20793 assumed to be zero. */
21166 20794
21167void 20795void
21168x_get_glyph_overhangs (glyph, f, left, right) 20796x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *right)
21169 struct glyph *glyph;
21170 struct frame *f;
21171 int *left, *right;
21172{ 20797{
21173 *left = *right = 0; 20798 *left = *right = 0;
21174 20799
@@ -21219,8 +20844,7 @@ x_get_glyph_overhangs (glyph, f, left, right)
21219 if no glyphs are overwritten. */ 20844 if no glyphs are overwritten. */
21220 20845
21221static int 20846static int
21222left_overwritten (s) 20847left_overwritten (struct glyph_string *s)
21223 struct glyph_string *s;
21224{ 20848{
21225 int k; 20849 int k;
21226 20850
@@ -21247,8 +20871,7 @@ left_overwritten (s)
21247 glyph in front of S overwrites S. */ 20871 glyph in front of S overwrites S. */
21248 20872
21249static int 20873static int
21250left_overwriting (s) 20874left_overwriting (struct glyph_string *s)
21251 struct glyph_string *s;
21252{ 20875{
21253 int i, k, x; 20876 int i, k, x;
21254 struct glyph *glyphs = s->row->glyphs[s->area]; 20877 struct glyph *glyphs = s->row->glyphs[s->area];
@@ -21274,8 +20897,7 @@ left_overwriting (s)
21274 no such glyph is found. */ 20897 no such glyph is found. */
21275 20898
21276static int 20899static int
21277right_overwritten (s) 20900right_overwritten (struct glyph_string *s)
21278 struct glyph_string *s;
21279{ 20901{
21280 int k = -1; 20902 int k = -1;
21281 20903
@@ -21301,8 +20923,7 @@ right_overwritten (s)
21301 if no such glyph is found. */ 20923 if no such glyph is found. */
21302 20924
21303static int 20925static int
21304right_overwriting (s) 20926right_overwriting (struct glyph_string *s)
21305 struct glyph_string *s;
21306{ 20927{
21307 int i, k, x; 20928 int i, k, x;
21308 int end = s->row->used[s->area]; 20929 int end = s->row->used[s->area];
@@ -21329,10 +20950,7 @@ right_overwriting (s)
21329 in the drawing area. */ 20950 in the drawing area. */
21330 20951
21331static INLINE void 20952static INLINE void
21332set_glyph_string_background_width (s, start, last_x) 20953set_glyph_string_background_width (struct glyph_string *s, int start, int last_x)
21333 struct glyph_string *s;
21334 int start;
21335 int last_x;
21336{ 20954{
21337 /* If the face of this glyph string has to be drawn to the end of 20955 /* If the face of this glyph string has to be drawn to the end of
21338 the drawing area, set S->extends_to_end_of_line_p. */ 20956 the drawing area, set S->extends_to_end_of_line_p. */
@@ -21361,10 +20979,7 @@ set_glyph_string_background_width (s, start, last_x)
21361 BACKWARD_P non-zero means process predecessors. */ 20979 BACKWARD_P non-zero means process predecessors. */
21362 20980
21363static void 20981static void
21364compute_overhangs_and_x (s, x, backward_p) 20982compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
21365 struct glyph_string *s;
21366 int x;
21367 int backward_p;
21368{ 20983{
21369 if (backward_p) 20984 if (backward_p)
21370 { 20985 {
@@ -21620,14 +21235,9 @@ compute_overhangs_and_x (s, x, backward_p)
21620 Value is the x-position reached, relative to AREA of W. */ 21235 Value is the x-position reached, relative to AREA of W. */
21621 21236
21622static int 21237static int
21623draw_glyphs (w, x, row, area, start, end, hl, overlaps) 21238draw_glyphs (struct window *w, int x, struct glyph_row *row,
21624 struct window *w; 21239 enum glyph_row_area area, EMACS_INT start, EMACS_INT end,
21625 int x; 21240 enum draw_glyphs_face hl, int overlaps)
21626 struct glyph_row *row;
21627 enum glyph_row_area area;
21628 EMACS_INT start, end;
21629 enum draw_glyphs_face hl;
21630 int overlaps;
21631{ 21241{
21632 struct glyph_string *head, *tail; 21242 struct glyph_string *head, *tail;
21633 struct glyph_string *s; 21243 struct glyph_string *s;
@@ -21875,8 +21485,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
21875 Called from x_produce_glyphs when IT->glyph_row is non-null. */ 21485 Called from x_produce_glyphs when IT->glyph_row is non-null. */
21876 21486
21877static INLINE void 21487static INLINE void
21878append_glyph (it) 21488append_glyph (struct it *it)
21879 struct it *it;
21880{ 21489{
21881 struct glyph *glyph; 21490 struct glyph *glyph;
21882 enum glyph_row_area area = it->area; 21491 enum glyph_row_area area = it->area;
@@ -21950,8 +21559,7 @@ append_glyph (it)
21950 non-null. */ 21559 non-null. */
21951 21560
21952static INLINE void 21561static INLINE void
21953append_composite_glyph (it) 21562append_composite_glyph (struct it *it)
21954 struct it *it;
21955{ 21563{
21956 struct glyph *glyph; 21564 struct glyph *glyph;
21957 enum glyph_row_area area = it->area; 21565 enum glyph_row_area area = it->area;
@@ -22020,8 +21628,7 @@ append_composite_glyph (it)
22020 IT->voffset. */ 21628 IT->voffset. */
22021 21629
22022static INLINE void 21630static INLINE void
22023take_vertical_position_into_account (it) 21631take_vertical_position_into_account (struct it *it)
22024 struct it *it;
22025{ 21632{
22026 if (it->voffset) 21633 if (it->voffset)
22027 { 21634 {
@@ -22042,8 +21649,7 @@ take_vertical_position_into_account (it)
22042 an overview of struct display_iterator. */ 21649 an overview of struct display_iterator. */
22043 21650
22044static void 21651static void
22045produce_image_glyph (it) 21652produce_image_glyph (struct it *it)
22046 struct it *it;
22047{ 21653{
22048 struct image *img; 21654 struct image *img;
22049 struct face *face; 21655 struct face *face;
@@ -22203,11 +21809,8 @@ produce_image_glyph (it)
22203 stretch. ASCENT is the ascent of the glyph (0 <= ASCENT <= HEIGHT). */ 21809 stretch. ASCENT is the ascent of the glyph (0 <= ASCENT <= HEIGHT). */
22204 21810
22205static void 21811static void
22206append_stretch_glyph (it, object, width, height, ascent) 21812append_stretch_glyph (struct it *it, Lisp_Object object,
22207 struct it *it; 21813 int width, int height, int ascent)
22208 Lisp_Object object;
22209 int width, height;
22210 int ascent;
22211{ 21814{
22212 struct glyph *glyph; 21815 struct glyph *glyph;
22213 enum glyph_row_area area = it->area; 21816 enum glyph_row_area area = it->area;
@@ -22298,8 +21901,7 @@ append_stretch_glyph (it, object, width, height, ascent)
22298 ASCENT must be in the range 0 <= ASCENT <= 100. */ 21901 ASCENT must be in the range 0 <= ASCENT <= 100. */
22299 21902
22300static void 21903static void
22301produce_stretch_glyph (it) 21904produce_stretch_glyph (struct it *it)
22302 struct it *it;
22303{ 21905{
22304 /* (space :width WIDTH :height HEIGHT ...) */ 21906 /* (space :width WIDTH :height HEIGHT ...) */
22305 Lisp_Object prop, plist; 21907 Lisp_Object prop, plist;
@@ -22425,11 +22027,8 @@ produce_stretch_glyph (it)
22425 22027
22426 22028
22427static Lisp_Object 22029static Lisp_Object
22428calc_line_height_property (it, val, font, boff, override) 22030calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
22429 struct it *it; 22031 int boff, int override)
22430 Lisp_Object val;
22431 struct font *font;
22432 int boff, override;
22433{ 22032{
22434 Lisp_Object face_name = Qnil; 22033 Lisp_Object face_name = Qnil;
22435 int ascent, descent, height; 22034 int ascent, descent, height;
@@ -22505,8 +22104,7 @@ calc_line_height_property (it, val, font, boff, override)
22505 for an overview of struct it. */ 22104 for an overview of struct it. */
22506 22105
22507void 22106void
22508x_produce_glyphs (it) 22107x_produce_glyphs (struct it *it)
22509 struct it *it;
22510{ 22108{
22511 int extra_line_spacing = it->extra_line_spacing; 22109 int extra_line_spacing = it->extra_line_spacing;
22512 22110
@@ -23292,9 +22890,7 @@ x_produce_glyphs (it)
23292 row being updated. */ 22890 row being updated. */
23293 22891
23294void 22892void
23295x_write_glyphs (start, len) 22893x_write_glyphs (struct glyph *start, int len)
23296 struct glyph *start;
23297 int len;
23298{ 22894{
23299 int x, hpos; 22895 int x, hpos;
23300 22896
@@ -23329,9 +22925,7 @@ x_write_glyphs (start, len)
23329 Insert LEN glyphs from START at the nominal cursor position. */ 22925 Insert LEN glyphs from START at the nominal cursor position. */
23330 22926
23331void 22927void
23332x_insert_glyphs (start, len) 22928x_insert_glyphs (struct glyph *start, int len)
23333 struct glyph *start;
23334 int len;
23335{ 22929{
23336 struct frame *f; 22930 struct frame *f;
23337 struct window *w; 22931 struct window *w;
@@ -23389,8 +22983,7 @@ x_insert_glyphs (start, len)
23389 updated_window. TO_X == -1 means clear to the end of this area. */ 22983 updated_window. TO_X == -1 means clear to the end of this area. */
23390 22984
23391void 22985void
23392x_clear_end_of_line (to_x) 22986x_clear_end_of_line (int to_x)
23393 int to_x;
23394{ 22987{
23395 struct frame *f; 22988 struct frame *f;
23396 struct window *w = updated_window; 22989 struct window *w = updated_window;
@@ -23466,9 +23059,7 @@ x_clear_end_of_line (to_x)
23466 of the bar cursor. */ 23059 of the bar cursor. */
23467 23060
23468static enum text_cursor_kinds 23061static enum text_cursor_kinds
23469get_specified_cursor_type (arg, width) 23062get_specified_cursor_type (Lisp_Object arg, int *width)
23470 Lisp_Object arg;
23471 int *width;
23472{ 23063{
23473 enum text_cursor_kinds type; 23064 enum text_cursor_kinds type;
23474 23065
@@ -23521,9 +23112,7 @@ get_specified_cursor_type (arg, width)
23521 23112
23522/* Set the default cursor types for specified frame. */ 23113/* Set the default cursor types for specified frame. */
23523void 23114void
23524set_frame_cursor_types (f, arg) 23115set_frame_cursor_types (struct frame *f, Lisp_Object arg)
23525 struct frame *f;
23526 Lisp_Object arg;
23527{ 23116{
23528 int width; 23117 int width;
23529 Lisp_Object tem; 23118 Lisp_Object tem;
@@ -23557,11 +23146,8 @@ set_frame_cursor_types (f, arg)
23557 In all other cases, we want a hollow box cursor. */ 23146 In all other cases, we want a hollow box cursor. */
23558 23147
23559static enum text_cursor_kinds 23148static enum text_cursor_kinds
23560get_window_cursor_type (w, glyph, width, active_cursor) 23149get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
23561 struct window *w; 23150 int *active_cursor)
23562 struct glyph *glyph;
23563 int *width;
23564 int *active_cursor;
23565{ 23151{
23566 struct frame *f = XFRAME (w->frame); 23152 struct frame *f = XFRAME (w->frame);
23567 struct buffer *b = XBUFFER (w->buffer); 23153 struct buffer *b = XBUFFER (w->buffer);
@@ -23717,10 +23303,8 @@ get_window_cursor_type (w, glyph, width, active_cursor)
23717 are window-relative. */ 23303 are window-relative. */
23718 23304
23719static void 23305static void
23720notice_overwritten_cursor (w, area, x0, x1, y0, y1) 23306notice_overwritten_cursor (struct window *w, enum glyph_row_area area,
23721 struct window *w; 23307 int x0, int x1, int y0, int y1)
23722 enum glyph_row_area area;
23723 int x0, y0, x1, y1;
23724{ 23308{
23725 int cx0, cx1, cy0, cy1; 23309 int cx0, cx1, cy0, cy1;
23726 struct glyph_row *row; 23310 struct glyph_row *row;
@@ -23787,11 +23371,8 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1)
23787 with respect to the overlapping part OVERLAPS. */ 23371 with respect to the overlapping part OVERLAPS. */
23788 23372
23789void 23373void
23790x_fix_overlapping_area (w, row, area, overlaps) 23374x_fix_overlapping_area (struct window *w, struct glyph_row *row,
23791 struct window *w; 23375 enum glyph_row_area area, int overlaps)
23792 struct glyph_row *row;
23793 enum glyph_row_area area;
23794 int overlaps;
23795{ 23376{
23796 int i, x; 23377 int i, x;
23797 23378
@@ -23832,10 +23413,8 @@ x_fix_overlapping_area (w, row, area, overlaps)
23832 comment of draw_glyphs for the meaning of HL. */ 23413 comment of draw_glyphs for the meaning of HL. */
23833 23414
23834void 23415void
23835draw_phys_cursor_glyph (w, row, hl) 23416draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
23836 struct window *w; 23417 enum draw_glyphs_face hl)
23837 struct glyph_row *row;
23838 enum draw_glyphs_face hl;
23839{ 23418{
23840 /* If cursor hpos is out of bounds, don't draw garbage. This can 23419 /* If cursor hpos is out of bounds, don't draw garbage. This can
23841 happen in mini-buffer windows when switching between echo area 23420 happen in mini-buffer windows when switching between echo area
@@ -23878,8 +23457,7 @@ draw_phys_cursor_glyph (w, row, hl)
23878 Erase the image of a cursor of window W from the screen. */ 23457 Erase the image of a cursor of window W from the screen. */
23879 23458
23880void 23459void
23881erase_phys_cursor (w) 23460erase_phys_cursor (struct window *w)
23882 struct window *w;
23883{ 23461{
23884 struct frame *f = XFRAME (w->frame); 23462 struct frame *f = XFRAME (w->frame);
23885 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 23463 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -23995,9 +23573,8 @@ erase_phys_cursor (w)
23995 where to put the cursor is specified by HPOS, VPOS, X and Y. */ 23573 where to put the cursor is specified by HPOS, VPOS, X and Y. */
23996 23574
23997void 23575void
23998display_and_set_cursor (w, on, hpos, vpos, x, y) 23576display_and_set_cursor (struct window *w, int on,
23999 struct window *w; 23577 int hpos, int vpos, int x, int y)
24000 int on, hpos, vpos, x, y;
24001{ 23578{
24002 struct frame *f = XFRAME (w->frame); 23579 struct frame *f = XFRAME (w->frame);
24003 int new_cursor_type; 23580 int new_cursor_type;
@@ -24080,9 +23657,7 @@ display_and_set_cursor (w, on, hpos, vpos, x, y)
24080 of ON. */ 23657 of ON. */
24081 23658
24082void 23659void
24083update_window_cursor (w, on) 23660update_window_cursor (struct window *w, int on)
24084 struct window *w;
24085 int on;
24086{ 23661{
24087 /* Don't update cursor in windows whose frame is in the process 23662 /* Don't update cursor in windows whose frame is in the process
24088 of being deleted. */ 23663 of being deleted. */
@@ -24100,9 +23675,7 @@ update_window_cursor (w, on)
24100 in the window tree rooted at W. */ 23675 in the window tree rooted at W. */
24101 23676
24102static void 23677static void
24103update_cursor_in_window_tree (w, on_p) 23678update_cursor_in_window_tree (struct window *w, int on_p)
24104 struct window *w;
24105 int on_p;
24106{ 23679{
24107 while (w) 23680 while (w)
24108 { 23681 {
@@ -24123,9 +23696,7 @@ update_cursor_in_window_tree (w, on_p)
24123 Don't change the cursor's position. */ 23696 Don't change the cursor's position. */
24124 23697
24125void 23698void
24126x_update_cursor (f, on_p) 23699x_update_cursor (struct frame *f, int on_p)
24127 struct frame *f;
24128 int on_p;
24129{ 23700{
24130 update_cursor_in_window_tree (XWINDOW (f->root_window), on_p); 23701 update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
24131} 23702}
@@ -24137,8 +23708,7 @@ x_update_cursor (f, on_p)
24137 is about to be rewritten. */ 23708 is about to be rewritten. */
24138 23709
24139void 23710void
24140x_clear_cursor (w) 23711x_clear_cursor (struct window *w)
24141 struct window *w;
24142{ 23712{
24143 if (FRAME_VISIBLE_P (XFRAME (w->frame)) && w->phys_cursor_on_p) 23713 if (FRAME_VISIBLE_P (XFRAME (w->frame)) && w->phys_cursor_on_p)
24144 update_window_cursor (w, 0); 23714 update_window_cursor (w, 0);
@@ -24149,9 +23719,7 @@ x_clear_cursor (w)
24149 Display the active region described by mouse_face_* according to DRAW. */ 23719 Display the active region described by mouse_face_* according to DRAW. */
24150 23720
24151void 23721void
24152show_mouse_face (dpyinfo, draw) 23722show_mouse_face (Display_Info *dpyinfo, enum draw_glyphs_face draw)
24153 Display_Info *dpyinfo;
24154 enum draw_glyphs_face draw;
24155{ 23723{
24156 struct window *w = XWINDOW (dpyinfo->mouse_face_window); 23724 struct window *w = XWINDOW (dpyinfo->mouse_face_window);
24157 struct frame *f = XFRAME (WINDOW_FRAME (w)); 23725 struct frame *f = XFRAME (WINDOW_FRAME (w));
@@ -24234,8 +23802,7 @@ show_mouse_face (dpyinfo, draw)
24234 face was actually drawn unhighlighted. */ 23802 face was actually drawn unhighlighted. */
24235 23803
24236int 23804int
24237clear_mouse_face (dpyinfo) 23805clear_mouse_face (Display_Info *dpyinfo)
24238 Display_Info *dpyinfo;
24239{ 23806{
24240 int cleared = 0; 23807 int cleared = 0;
24241 23808
@@ -24257,8 +23824,7 @@ clear_mouse_face (dpyinfo)
24257 Non-zero if physical cursor of window W is within mouse face. */ 23824 Non-zero if physical cursor of window W is within mouse face. */
24258 23825
24259int 23826int
24260cursor_in_mouse_face_p (w) 23827cursor_in_mouse_face_p (struct window *w)
24261 struct window *w;
24262{ 23828{
24263 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame)); 23829 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
24264 int in_mouse_face = 0; 23830 int in_mouse_face = 0;
@@ -24483,12 +24049,8 @@ mouse_face_from_buffer_pos (Lisp_Object window,
24483 Value is non-zero if a glyph was found. */ 24049 Value is non-zero if a glyph was found. */
24484 24050
24485static int 24051static int
24486fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p) 24052fast_find_string_pos (struct window *w, EMACS_INT pos, Lisp_Object object,
24487 struct window *w; 24053 int *hpos, int *vpos, int *x, int *y, int right_p)
24488 EMACS_INT pos;
24489 Lisp_Object object;
24490 int *hpos, *vpos, *x, *y;
24491 int right_p;
24492{ 24054{
24493 int yb = window_text_bottom_y (w); 24055 int yb = window_text_bottom_y (w);
24494 struct glyph_row *r; 24056 struct glyph_row *r;
@@ -24552,9 +24114,7 @@ fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
24552/* See if position X, Y is within a hot-spot of an image. */ 24114/* See if position X, Y is within a hot-spot of an image. */
24553 24115
24554static int 24116static int
24555on_hot_spot_p (hot_spot, x, y) 24117on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
24556 Lisp_Object hot_spot;
24557 int x, y;
24558{ 24118{
24559 if (!CONSP (hot_spot)) 24119 if (!CONSP (hot_spot))
24560 return 0; 24120 return 0;
@@ -24650,9 +24210,7 @@ on_hot_spot_p (hot_spot, x, y)
24650} 24210}
24651 24211
24652Lisp_Object 24212Lisp_Object
24653find_hot_spot (map, x, y) 24213find_hot_spot (Lisp_Object map, int x, int y)
24654 Lisp_Object map;
24655 int x, y;
24656{ 24214{
24657 while (CONSP (map)) 24215 while (CONSP (map))
24658 { 24216 {
@@ -24693,10 +24251,7 @@ Returns the alist element for the first matching AREA in MAP. */)
24693 24251
24694/* Display frame CURSOR, optionally using shape defined by POINTER. */ 24252/* Display frame CURSOR, optionally using shape defined by POINTER. */
24695static void 24253static void
24696define_frame_cursor1 (f, cursor, pointer) 24254define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
24697 struct frame *f;
24698 Cursor cursor;
24699 Lisp_Object pointer;
24700{ 24255{
24701 /* Do not change cursor shape while dragging mouse. */ 24256 /* Do not change cursor shape while dragging mouse. */
24702 if (!NILP (do_mouse_tracking)) 24257 if (!NILP (do_mouse_tracking))
@@ -24735,10 +24290,8 @@ define_frame_cursor1 (f, cursor, pointer)
24735 position relative to the start of the mode line. */ 24290 position relative to the start of the mode line. */
24736 24291
24737static void 24292static void
24738note_mode_line_or_margin_highlight (window, x, y, area) 24293note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
24739 Lisp_Object window; 24294 enum window_part area)
24740 int x, y;
24741 enum window_part area;
24742{ 24295{
24743 struct window *w = XWINDOW (window); 24296 struct window *w = XWINDOW (window);
24744 struct frame *f = XFRAME (w->frame); 24297 struct frame *f = XFRAME (w->frame);
@@ -24978,9 +24531,7 @@ note_mode_line_or_margin_highlight (window, x, y, area)
24978 X and Y can be negative or out of range. */ 24531 X and Y can be negative or out of range. */
24979 24532
24980void 24533void
24981note_mouse_highlight (f, x, y) 24534note_mouse_highlight (struct frame *f, int x, int y)
24982 struct frame *f;
24983 int x, y;
24984{ 24535{
24985 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 24536 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
24986 enum window_part part; 24537 enum window_part part;
@@ -25446,8 +24997,7 @@ note_mouse_highlight (f, x, y)
25446 functions to ensure the mouse-highlight is off. */ 24997 functions to ensure the mouse-highlight is off. */
25447 24998
25448void 24999void
25449x_clear_window_mouse_face (w) 25000x_clear_window_mouse_face (struct window *w)
25450 struct window *w;
25451{ 25001{
25452 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame)); 25002 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
25453 Lisp_Object window; 25003 Lisp_Object window;
@@ -25465,8 +25015,7 @@ x_clear_window_mouse_face (w)
25465 This is used when the size of F is changed. */ 25015 This is used when the size of F is changed. */
25466 25016
25467void 25017void
25468cancel_mouse_face (f) 25018cancel_mouse_face (struct frame *f)
25469 struct frame *f;
25470{ 25019{
25471 Lisp_Object window; 25020 Lisp_Object window;
25472 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 25021 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -25494,11 +25043,8 @@ cancel_mouse_face (f)
25494 which intersects rectangle R. R is in window-relative coordinates. */ 25043 which intersects rectangle R. R is in window-relative coordinates. */
25495 25044
25496static void 25045static void
25497expose_area (w, row, r, area) 25046expose_area (struct window *w, struct glyph_row *row, XRectangle *r,
25498 struct window *w; 25047 enum glyph_row_area area)
25499 struct glyph_row *row;
25500 XRectangle *r;
25501 enum glyph_row_area area;
25502{ 25048{
25503 struct glyph *first = row->glyphs[area]; 25049 struct glyph *first = row->glyphs[area];
25504 struct glyph *end = row->glyphs[area] + row->used[area]; 25050 struct glyph *end = row->glyphs[area] + row->used[area];
@@ -25552,10 +25098,7 @@ expose_area (w, row, r, area)
25552 non-zero if mouse-face was overwritten. */ 25098 non-zero if mouse-face was overwritten. */
25553 25099
25554static int 25100static int
25555expose_line (w, row, r) 25101expose_line (struct window *w, struct glyph_row *row, XRectangle *r)
25556 struct window *w;
25557 struct glyph_row *row;
25558 XRectangle *r;
25559{ 25102{
25560 xassert (row->enabled_p); 25103 xassert (row->enabled_p);
25561 25104
@@ -25587,11 +25130,10 @@ expose_line (w, row, r)
25587 LAST_OVERLAPPING_ROW is the last such row. */ 25130 LAST_OVERLAPPING_ROW is the last such row. */
25588 25131
25589static void 25132static void
25590expose_overlaps (w, first_overlapping_row, last_overlapping_row, r) 25133expose_overlaps (struct window *w,
25591 struct window *w; 25134 struct glyph_row *first_overlapping_row,
25592 struct glyph_row *first_overlapping_row; 25135 struct glyph_row *last_overlapping_row,
25593 struct glyph_row *last_overlapping_row; 25136 XRectangle *r)
25594 XRectangle *r;
25595{ 25137{
25596 struct glyph_row *row; 25138 struct glyph_row *row;
25597 25139
@@ -25617,9 +25159,7 @@ expose_overlaps (w, first_overlapping_row, last_overlapping_row, r)
25617/* Return non-zero if W's cursor intersects rectangle R. */ 25159/* Return non-zero if W's cursor intersects rectangle R. */
25618 25160
25619static int 25161static int
25620phys_cursor_in_rect_p (w, r) 25162phys_cursor_in_rect_p (struct window *w, XRectangle *r)
25621 struct window *w;
25622 XRectangle *r;
25623{ 25163{
25624 XRectangle cr, result; 25164 XRectangle cr, result;
25625 struct glyph *cursor_glyph; 25165 struct glyph *cursor_glyph;
@@ -25665,8 +25205,7 @@ phys_cursor_in_rect_p (w, r)
25665 have vertical scroll bars. */ 25205 have vertical scroll bars. */
25666 25206
25667void 25207void
25668x_draw_vertical_border (w) 25208x_draw_vertical_border (struct window *w)
25669 struct window *w;
25670{ 25209{
25671 struct frame *f = XFRAME (WINDOW_FRAME (w)); 25210 struct frame *f = XFRAME (WINDOW_FRAME (w));
25672 25211
@@ -25716,9 +25255,7 @@ x_draw_vertical_border (w)
25716 mouse-face. */ 25255 mouse-face. */
25717 25256
25718static int 25257static int
25719expose_window (w, fr) 25258expose_window (struct window *w, XRectangle *fr)
25720 struct window *w;
25721 XRectangle *fr;
25722{ 25259{
25723 struct frame *f = XFRAME (w->frame); 25260 struct frame *f = XFRAME (w->frame);
25724 XRectangle wr, r; 25261 XRectangle wr, r;
@@ -25851,9 +25388,7 @@ expose_window (w, fr)
25851 non-zero if the exposure overwrites mouse-face. */ 25388 non-zero if the exposure overwrites mouse-face. */
25852 25389
25853static int 25390static int
25854expose_window_tree (w, r) 25391expose_window_tree (struct window *w, XRectangle *r)
25855 struct window *w;
25856 XRectangle *r;
25857{ 25392{
25858 struct frame *f = XFRAME (w->frame); 25393 struct frame *f = XFRAME (w->frame);
25859 int mouse_face_overwritten_p = 0; 25394 int mouse_face_overwritten_p = 0;
@@ -25883,9 +25418,7 @@ expose_window_tree (w, r)
25883 the entire frame. */ 25418 the entire frame. */
25884 25419
25885void 25420void
25886expose_frame (f, x, y, w, h) 25421expose_frame (struct frame *f, int x, int y, int w, int h)
25887 struct frame *f;
25888 int x, y, w, h;
25889{ 25422{
25890 XRectangle r; 25423 XRectangle r;
25891 int mouse_face_overwritten_p = 0; 25424 int mouse_face_overwritten_p = 0;
@@ -25973,8 +25506,7 @@ expose_frame (f, x, y, w, h)
25973 empty. */ 25506 empty. */
25974 25507
25975int 25508int
25976x_intersect_rectangles (r1, r2, result) 25509x_intersect_rectangles (XRectangle *r1, XRectangle *r2, XRectangle *result)
25977 XRectangle *r1, *r2, *result;
25978{ 25510{
25979 XRectangle *left, *right; 25511 XRectangle *left, *right;
25980 XRectangle *upper, *lower; 25512 XRectangle *upper, *lower;
@@ -26029,7 +25561,7 @@ x_intersect_rectangles (r1, r2, result)
26029 ***********************************************************************/ 25561 ***********************************************************************/
26030 25562
26031void 25563void
26032syms_of_xdisp () 25564syms_of_xdisp (void)
26033{ 25565{
26034 Vwith_echo_area_save_vector = Qnil; 25566 Vwith_echo_area_save_vector = Qnil;
26035 staticpro (&Vwith_echo_area_save_vector); 25567 staticpro (&Vwith_echo_area_save_vector);
@@ -26676,7 +26208,7 @@ Value must be an integer or float. */);
26676/* Initialize this module when Emacs starts. */ 26208/* Initialize this module when Emacs starts. */
26677 26209
26678void 26210void
26679init_xdisp () 26211init_xdisp (void)
26680{ 26212{
26681 Lisp_Object root_window; 26213 Lisp_Object root_window;
26682 struct window *mini_w; 26214 struct window *mini_w;
@@ -26733,14 +26265,14 @@ init_xdisp ()
26733 26265
26734/* Return non-zero if houglass timer has been started or hourglass is shown. */ 26266/* Return non-zero if houglass timer has been started or hourglass is shown. */
26735int 26267int
26736hourglass_started () 26268hourglass_started (void)
26737{ 26269{
26738 return hourglass_shown_p || hourglass_atimer != NULL; 26270 return hourglass_shown_p || hourglass_atimer != NULL;
26739} 26271}
26740 26272
26741/* Cancel a currently active hourglass timer, and start a new one. */ 26273/* Cancel a currently active hourglass timer, and start a new one. */
26742void 26274void
26743start_hourglass () 26275start_hourglass (void)
26744{ 26276{
26745#if defined (HAVE_WINDOW_SYSTEM) 26277#if defined (HAVE_WINDOW_SYSTEM)
26746 EMACS_TIME delay; 26278 EMACS_TIME delay;
@@ -26772,7 +26304,7 @@ start_hourglass ()
26772/* Cancel the hourglass cursor timer if active, hide a busy cursor if 26304/* Cancel the hourglass cursor timer if active, hide a busy cursor if
26773 shown. */ 26305 shown. */
26774void 26306void
26775cancel_hourglass () 26307cancel_hourglass (void)
26776{ 26308{
26777#if defined (HAVE_WINDOW_SYSTEM) 26309#if defined (HAVE_WINDOW_SYSTEM)
26778 if (hourglass_atimer) 26310 if (hourglass_atimer)