aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2011-09-14 11:45:59 +0200
committerJoakim Verona2011-09-14 11:45:59 +0200
commit8d07d23ecd32b9e9f07234313c2e712a8c42b524 (patch)
treed5d925a00733d9a6d1f637b8f3dfdd40c33a2fe7 /src
parent8918dacdb34e848edcd894e32de5b7b4e2fa19ea (diff)
parent46888499da0bb61ce47d339275d5a0c757a02eb2 (diff)
downloademacs-8d07d23ecd32b9e9f07234313c2e712a8c42b524.tar.gz
emacs-8d07d23ecd32b9e9f07234313c2e712a8c42b524.zip
upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog90
-rw-r--r--src/alloc.c22
-rw-r--r--src/buffer.h2
-rw-r--r--src/callproc.c4
-rw-r--r--src/casefiddle.c6
-rw-r--r--src/ccl.c22
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/dired.c2
-rw-r--r--src/dispextern.h4
-rw-r--r--src/dispnew.c10
-rw-r--r--src/doprnt.c4
-rw-r--r--src/dosfns.c6
-rw-r--r--src/editfns.c4
-rw-r--r--src/emacs.c24
-rw-r--r--src/emacsgtkfixed.c12
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c18
-rw-r--r--src/filelock.c2
-rw-r--r--src/floatfns.c4
-rw-r--r--src/fns.c4
-rw-r--r--src/font.c6
-rw-r--r--src/frame.c22
-rw-r--r--src/fringe.c6
-rw-r--r--src/getpagesize.h2
-rw-r--r--src/gmalloc.c12
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/image.c36
-rw-r--r--src/indent.c2
-rw-r--r--src/insdel.c4
-rw-r--r--src/keyboard.c12
-rw-r--r--src/keymap.h11
-rw-r--r--src/lisp.h70
-rw-r--r--src/lread.c2
-rw-r--r--src/m/alpha.h2
-rw-r--r--src/menu.c4
-rw-r--r--src/minibuf.c11
-rw-r--r--src/msdos.c34
-rw-r--r--src/nsgui.h2
-rw-r--r--src/nsterm.h2
-rw-r--r--src/print.c6
-rw-r--r--src/process.c40
-rw-r--r--src/ralloc.c6
-rw-r--r--src/regex.c22
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/sound.c6
-rw-r--r--src/sysdep.c8
-rw-r--r--src/termcap.c2
-rw-r--r--src/termchar.h2
-rw-r--r--src/unexaix.c26
-rw-r--r--src/unexelf.c72
-rw-r--r--src/unexmacosx.c2
-rw-r--r--src/unexw32.c6
-rw-r--r--src/vm-limit.c2
-rw-r--r--src/w16select.c16
-rw-r--r--src/w32.c8
-rw-r--r--src/w32term.h2
-rw-r--r--src/widget.c24
-rw-r--r--src/window.c6
-rw-r--r--src/xdisp.c14
-rw-r--r--src/xfaces.c4
-rw-r--r--src/xfns.c8
-rw-r--r--src/xmenu.c4
-rw-r--r--src/xml.c12
-rw-r--r--src/xrdb.c4
-rw-r--r--src/xselect.c25
-rw-r--r--src/xsettings.c2
-rw-r--r--src/xterm.c2
-rw-r--r--src/xterm.h2
69 files changed, 454 insertions, 369 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a4c985b1a0c..9f8361153a1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,83 @@
12011-09-14 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
4 computation of loop end. Reported by Johan Bockgård
5 <bojohan@gnu.org>.
6
72011-09-13 Chong Yidong <cyd@stupidchicken.com>
8
9 * frame.c (Fother_visible_frames_p): Function deleted.
10
112011-09-12 Eli Zaretskii <eliz@gnu.org>
12
13 * indent.c (compute_motion): Process display vector front to back
14 rather than the other way around. (Bug#2496)
15
162011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
19
202011-09-11 Chong Yidong <cyd@stupidchicken.com>
21
22 * minibuf.c (Fread_from_minibuffer): Doc fix.
23
242011-09-11 Eli Zaretskii <eliz@gnu.org>
25
26 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
27 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
28
292011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
30
31 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
32 value for non-existent files.
33
342011-09-11 Eli Zaretskii <eliz@gnu.org>
35
36 * fileio.c (Finsert_file_contents): If the file cannot be opened,
37 set its "size" to -1. This will set the modtime_size field of
38 the corresponding buffer to -1, which is what
39 verify-visited-file-modtime expects for files that do not exist.
40 (Bug#9139)
41
422011-09-11 Paul Eggert <eggert@cs.ucla.edu>
43
44 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
45 here ...
46 * lisp.h: ... from here. push_key_description is no longer
47 defined in keyboard.c, so its declaration should not be in
48 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
49 logically belongs with push_key_description.
50
512011-09-10 Paul Eggert <eggert@cs.ucla.edu>
52
53 * buffer.h: Include <sys/types.h> instead of <time.h>.
54 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
55 Problem reported by Herbert J. Skuhra.
56
572011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
58
59 * xml.c (parse_region): Make the parsing work for
60 non-comment-starting XML files again (bug#9144).
61
622011-09-10 Andreas Schwab <schwab@linux-m68k.org>
63
64 * image.c (gif_load): Fix calculation of bottom and right corner.
65 (Bug#9468)
66
672011-09-10 Eli Zaretskii <eliz@gnu.org>
68
69 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
70 redisplay in small windows.
71
722011-09-09 Eli Zaretskii <eliz@gnu.org>
73
74 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
75
762011-09-08 Martin Rudalics <rudalics@gmx.at>
77
78 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
79 Operate on live windows only.
80
12011-09-08 Juanma Barranquero <lekktu@gmail.com> 812011-09-08 Juanma Barranquero <lekktu@gmail.com>
2 82
3 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused. 83 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
@@ -891,7 +971,7 @@
891 971
892 * nsfns.m (as_script, as_result, as_status): New static variables. 972 * nsfns.m (as_script, as_result, as_status): New static variables.
893 (ns_run_ascript): New function. 973 (ns_run_ascript): New function.
894 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined 974 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
895 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start 975 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
896 the event loop. Get status from as_status (Bug#7276). 976 the event loop. Get status from as_status (Bug#7276).
897 977
@@ -1067,7 +1147,7 @@
1067 1147
1068 * xdisp.c: Remove one-slot cache of display string positions. 1148 * xdisp.c: Remove one-slot cache of display string positions.
1069 (compute_display_string_pos): Accept an additional argument 1149 (compute_display_string_pos): Accept an additional argument
1070 DISP_PROP_P; callers changed. Scan at most 5K characters forward 1150 DISP_PROP_P; callers changed. Scan at most 5K characters forward
1071 for a display string or property. If found, set DISP_PROP_P 1151 for a display string or property. If found, set DISP_PROP_P
1072 non-zero. 1152 non-zero.
1073 1153
@@ -2085,7 +2165,7 @@
2085 (Fput_unicode_property_internal): New functions. 2165 (Fput_unicode_property_internal): New functions.
2086 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr 2166 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
2087 Sunicode_property_table_internal, Sget_unicode_property_internal, 2167 Sunicode_property_table_internal, Sget_unicode_property_internal,
2088 and Sput_unicode_property_internal. Defvar_lisp 2168 and Sput_unicode_property_internal. Defvar_lisp
2089 char-code-property-alist. 2169 char-code-property-alist.
2090 2170
2091 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of 2171 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
@@ -2117,7 +2197,7 @@
2117 (store_config_changed_event): Add comment. 2197 (store_config_changed_event): Add comment.
2118 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style) 2198 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
2119 (store_tool_bar_style_changed): New functions. 2199 (store_tool_bar_style_changed): New functions.
2120 (store_monospaced_changed): Add comment. Call dpyinfo_valid. 2200 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
2121 (struct xsettings): Move font inside HAVE_XFT. 2201 (struct xsettings): Move font inside HAVE_XFT.
2122 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines. 2202 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
2123 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT. 2203 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
@@ -2126,7 +2206,7 @@
2126 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME 2206 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
2127 also. 2207 also.
2128 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines. 2208 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
2129 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT. 2209 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
2130 (something_changed_gconfCB): Rename from something_changedCB. 2210 (something_changed_gconfCB): Rename from something_changedCB.
2131 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also. 2211 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
2132 (parse_settings): Move check for font inside HAVE_XFT. 2212 (parse_settings): Move check for font inside HAVE_XFT.
diff --git a/src/alloc.c b/src/alloc.c
index 2d256800466..ad1741e308f 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1880,7 +1880,7 @@ check_string_free_list (void)
1880 while (s != NULL) 1880 while (s != NULL)
1881 { 1881 {
1882 if ((uintptr_t) s < 1024) 1882 if ((uintptr_t) s < 1024)
1883 abort(); 1883 abort ();
1884 s = NEXT_FREE_LISP_STRING (s); 1884 s = NEXT_FREE_LISP_STRING (s);
1885 } 1885 }
1886} 1886}
@@ -2531,17 +2531,17 @@ make_uninit_multibyte_string (EMACS_INT nchars, EMACS_INT nbytes)
2531 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1)) 2531 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1))
2532 2532
2533#define GETMARKBIT(block,n) \ 2533#define GETMARKBIT(block,n) \
2534 (((block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2534 (((block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2535 >> ((n) % (sizeof(int) * CHAR_BIT))) \ 2535 >> ((n) % (sizeof (int) * CHAR_BIT))) \
2536 & 1) 2536 & 1)
2537 2537
2538#define SETMARKBIT(block,n) \ 2538#define SETMARKBIT(block,n) \
2539 (block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2539 (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2540 |= 1 << ((n) % (sizeof(int) * CHAR_BIT)) 2540 |= 1 << ((n) % (sizeof (int) * CHAR_BIT))
2541 2541
2542#define UNSETMARKBIT(block,n) \ 2542#define UNSETMARKBIT(block,n) \
2543 (block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2543 (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2544 &= ~(1 << ((n) % (sizeof(int) * CHAR_BIT))) 2544 &= ~(1 << ((n) % (sizeof (int) * CHAR_BIT)))
2545 2545
2546#define FLOAT_BLOCK(fptr) \ 2546#define FLOAT_BLOCK(fptr) \
2547 ((struct float_block *) (((uintptr_t) (fptr)) & ~(BLOCK_ALIGN - 1))) 2547 ((struct float_block *) (((uintptr_t) (fptr)) & ~(BLOCK_ALIGN - 1)))
@@ -2553,7 +2553,7 @@ struct float_block
2553{ 2553{
2554 /* Place `floats' at the beginning, to ease up FLOAT_INDEX's job. */ 2554 /* Place `floats' at the beginning, to ease up FLOAT_INDEX's job. */
2555 struct Lisp_Float floats[FLOAT_BLOCK_SIZE]; 2555 struct Lisp_Float floats[FLOAT_BLOCK_SIZE];
2556 int gcmarkbits[1 + FLOAT_BLOCK_SIZE / (sizeof(int) * CHAR_BIT)]; 2556 int gcmarkbits[1 + FLOAT_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
2557 struct float_block *next; 2557 struct float_block *next;
2558}; 2558};
2559 2559
@@ -2659,7 +2659,7 @@ struct cons_block
2659{ 2659{
2660 /* Place `conses' at the beginning, to ease up CONS_INDEX's job. */ 2660 /* Place `conses' at the beginning, to ease up CONS_INDEX's job. */
2661 struct Lisp_Cons conses[CONS_BLOCK_SIZE]; 2661 struct Lisp_Cons conses[CONS_BLOCK_SIZE];
2662 int gcmarkbits[1 + CONS_BLOCK_SIZE / (sizeof(int) * CHAR_BIT)]; 2662 int gcmarkbits[1 + CONS_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
2663 struct cons_block *next; 2663 struct cons_block *next;
2664}; 2664};
2665 2665
@@ -2964,7 +2964,7 @@ allocate_hash_table (void)
2964struct window * 2964struct window *
2965allocate_window (void) 2965allocate_window (void)
2966{ 2966{
2967 return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW); 2967 return ALLOCATE_PSEUDOVECTOR (struct window, current_matrix, PVEC_WINDOW);
2968} 2968}
2969 2969
2970 2970
@@ -4159,7 +4159,7 @@ mark_maybe_pointer (void *p)
4159 break; 4159 break;
4160 4160
4161 case MEM_TYPE_BUFFER: 4161 case MEM_TYPE_BUFFER:
4162 if (live_buffer_p (m, p) && !VECTOR_MARKED_P((struct buffer *)p)) 4162 if (live_buffer_p (m, p) && !VECTOR_MARKED_P ((struct buffer *)p))
4163 XSETVECTOR (obj, p); 4163 XSETVECTOR (obj, p);
4164 break; 4164 break;
4165 4165
diff --git a/src/buffer.h b/src/buffer.h
index c50cfe56c77..73628fe6dfc 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -18,7 +18,7 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <time.h> /* for time_t */ 21#include <sys/types.h> /* for off_t, time_t */
22 22
23/* Accessing the parameters of the current buffer. */ 23/* Accessing the parameters of the current buffer. */
24 24
diff --git a/src/callproc.c b/src/callproc.c
index 1bdb57a27d0..97531f73848 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -691,7 +691,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
691 /* Enable sending signal if user quits below. */ 691 /* Enable sending signal if user quits below. */
692 call_process_exited = 0; 692 call_process_exited = 0;
693 693
694#if defined(MSDOS) 694#if defined (MSDOS)
695 /* MSDOS needs different cleanup information. */ 695 /* MSDOS needs different cleanup information. */
696 record_unwind_protect (call_process_cleanup, 696 record_unwind_protect (call_process_cleanup,
697 Fcons (Fcurrent_buffer (), 697 Fcons (Fcurrent_buffer (),
@@ -1315,7 +1315,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1315 if (err != in && err != out) 1315 if (err != in && err != out)
1316 emacs_close (err); 1316 emacs_close (err);
1317 1317
1318#if defined(USG) 1318#if defined (USG)
1319#ifndef SETPGRP_RELEASES_CTTY 1319#ifndef SETPGRP_RELEASES_CTTY
1320 setpgrp (); /* No arguments but equivalent in this case */ 1320 setpgrp (); /* No arguments but equivalent in this case */
1321#endif 1321#endif
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 50ad4eeda74..77222c9e0a3 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -223,7 +223,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
223 record_change (start, end - start); 223 record_change (start, end - start);
224 start_byte = CHAR_TO_BYTE (start); 224 start_byte = CHAR_TO_BYTE (start);
225 225
226 SETUP_BUFFER_SYNTAX_TABLE(); /* For syntax_prefix_flag_p. */ 226 SETUP_BUFFER_SYNTAX_TABLE (); /* For syntax_prefix_flag_p. */
227 227
228 while (start < end) 228 while (start < end)
229 { 229 {
@@ -434,9 +434,9 @@ syms_of_casefiddle (void)
434void 434void
435keys_of_casefiddle (void) 435keys_of_casefiddle (void)
436{ 436{
437 initial_define_key (control_x_map, Ctl('U'), "upcase-region"); 437 initial_define_key (control_x_map, Ctl ('U'), "upcase-region");
438 Fput (intern ("upcase-region"), Qdisabled, Qt); 438 Fput (intern ("upcase-region"), Qdisabled, Qt);
439 initial_define_key (control_x_map, Ctl('L'), "downcase-region"); 439 initial_define_key (control_x_map, Ctl ('L'), "downcase-region");
440 Fput (intern ("downcase-region"), Qdisabled, Qt); 440 Fput (intern ("downcase-region"), Qdisabled, Qt);
441 441
442 initial_define_key (meta_map, 'u', "upcase-word"); 442 initial_define_key (meta_map, 'u', "upcase-word");
diff --git a/src/ccl.c b/src/ccl.c
index b28a284f70a..cb96eece5ee 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -61,7 +61,7 @@ static Lisp_Object Vccl_program_table;
61 61
62/* Return a hash table of id number ID. */ 62/* Return a hash table of id number ID. */
63#define GET_HASH_TABLE(id) \ 63#define GET_HASH_TABLE(id) \
64 (XHASH_TABLE (XCDR(XVECTOR(Vtranslation_hash_table_vector)->contents[(id)]))) 64 (XHASH_TABLE (XCDR (XVECTOR (Vtranslation_hash_table_vector)->contents[(id)])))
65 65
66/* CCL (Code Conversion Language) is a simple language which has 66/* CCL (Code Conversion Language) is a simple language which has
67 operations on one input buffer, one output buffer, and 7 registers. 67 operations on one input buffer, one output buffer, and 7 registers.
@@ -706,7 +706,7 @@ do \
706 ccl->status = CCL_STAT_SUCCESS; \ 706 ccl->status = CCL_STAT_SUCCESS; \
707 goto ccl_finish; \ 707 goto ccl_finish; \
708 } \ 708 } \
709while(0) 709while (0)
710 710
711/* Suspend CCL program because of reading from empty input buffer or 711/* Suspend CCL program because of reading from empty input buffer or
712 writing to full output buffer. When this program is resumed, the 712 writing to full output buffer. When this program is resumed, the
@@ -730,7 +730,7 @@ do \
730 ccl->status = CCL_STAT_INVALID_CMD; \ 730 ccl->status = CCL_STAT_INVALID_CMD; \
731 goto ccl_error_handler; \ 731 goto ccl_error_handler; \
732 } \ 732 } \
733while(0) 733while (0)
734 734
735#else 735#else
736 736
@@ -741,7 +741,7 @@ do \
741 ccl->status = CCL_STAT_INVALID_CMD; \ 741 ccl->status = CCL_STAT_INVALID_CMD; \
742 goto ccl_error_handler; \ 742 goto ccl_error_handler; \
743 } \ 743 } \
744while(0) 744while (0)
745 745
746#endif 746#endif
747 747
@@ -1419,7 +1419,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1419 else if (INTEGERP (content) && IN_INT_RANGE (XINT (content))) 1419 else if (INTEGERP (content) && IN_INT_RANGE (XINT (content)))
1420 { 1420 {
1421 reg[RRR] = i; 1421 reg[RRR] = i;
1422 reg[rrr] = XINT(content); 1422 reg[rrr] = XINT (content);
1423 break; 1423 break;
1424 } 1424 }
1425 else if (EQ (content, Qt) || EQ (content, Qlambda)) 1425 else if (EQ (content, Qt) || EQ (content, Qlambda))
@@ -1692,7 +1692,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1692 value = XCDR (content); 1692 value = XCDR (content);
1693 if (!INTEGERP (attrib) || !INTEGERP (value)) 1693 if (!INTEGERP (attrib) || !INTEGERP (value))
1694 continue; 1694 continue;
1695 reg[rrr] = XINT(value); 1695 reg[rrr] = XINT (value);
1696 break; 1696 break;
1697 } 1697 }
1698 else if (SYMBOLP (content)) 1698 else if (SYMBOLP (content))
@@ -1729,8 +1729,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1729 switch (ccl->status) 1729 switch (ccl->status)
1730 { 1730 {
1731 case CCL_STAT_INVALID_CMD: 1731 case CCL_STAT_INVALID_CMD:
1732 sprintf(msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.", 1732 sprintf (msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.",
1733 code & 0x1F, code, this_ic); 1733 code & 0x1F, code, this_ic);
1734#ifdef CCL_DEBUG 1734#ifdef CCL_DEBUG
1735 { 1735 {
1736 int i = ccl_backtrace_idx - 1; 1736 int i = ccl_backtrace_idx - 1;
@@ -1748,7 +1748,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1748 if (i < 0) i = CCL_DEBUG_BACKTRACE_LEN - 1; 1748 if (i < 0) i = CCL_DEBUG_BACKTRACE_LEN - 1;
1749 if (ccl_backtrace_table[i] == 0) 1749 if (ccl_backtrace_table[i] == 0)
1750 break; 1750 break;
1751 sprintf(msg, " %d", ccl_backtrace_table[i]); 1751 sprintf (msg, " %d", ccl_backtrace_table[i]);
1752 msglen = strlen (msg); 1752 msglen = strlen (msg);
1753 if (dst + msglen > (dst_bytes ? dst_end : src)) 1753 if (dst + msglen > (dst_bytes ? dst_end : src))
1754 break; 1754 break;
@@ -1762,11 +1762,11 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1762 1762
1763 case CCL_STAT_QUIT: 1763 case CCL_STAT_QUIT:
1764 if (! ccl->quit_silently) 1764 if (! ccl->quit_silently)
1765 sprintf(msg, "\nCCL: Quited."); 1765 sprintf (msg, "\nCCL: Quited.");
1766 break; 1766 break;
1767 1767
1768 default: 1768 default:
1769 sprintf(msg, "\nCCL: Unknown error type (%d)", ccl->status); 1769 sprintf (msg, "\nCCL: Unknown error type (%d)", ccl->status);
1770 } 1770 }
1771 1771
1772 msglen = strlen (msg); 1772 msglen = strlen (msg);
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 2a38d15873c..227d4e647e9 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1880,7 +1880,7 @@ xd_read_queued_messages (int fd, void *data, int for_read)
1880 busp = CDR_SAFE (busp); 1880 busp = CDR_SAFE (busp);
1881 } 1881 }
1882 1882
1883 if (NILP(bus)) 1883 if (NILP (bus))
1884 return; 1884 return;
1885 1885
1886 /* We ignore all Lisp errors during the call. */ 1886 /* We ignore all Lisp errors during the call. */
diff --git a/src/dired.c b/src/dired.c
index 415f9ac5ae5..be94b16cf75 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1003,7 +1003,7 @@ so last access time will always be midnight of that day. */)
1003 values[10] = INTEGER_TO_CONS (s.st_ino); 1003 values[10] = INTEGER_TO_CONS (s.st_ino);
1004 values[11] = INTEGER_TO_CONS (s.st_dev); 1004 values[11] = INTEGER_TO_CONS (s.st_dev);
1005 1005
1006 return Flist (sizeof(values) / sizeof(values[0]), values); 1006 return Flist (sizeof (values) / sizeof (values[0]), values);
1007} 1007}
1008 1008
1009DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0, 1009DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0,
diff --git a/src/dispextern.h b/src/dispextern.h
index 1b2df45086c..bc75dc5d2e6 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1290,10 +1290,10 @@ struct glyph_string
1290 unsigned padding_p : 1; 1290 unsigned padding_p : 1;
1291 1291
1292 /* The GC to use for drawing this glyph string. */ 1292 /* The GC to use for drawing this glyph string. */
1293#if defined(HAVE_X_WINDOWS) 1293#if defined (HAVE_X_WINDOWS)
1294 GC gc; 1294 GC gc;
1295#endif 1295#endif
1296#if defined(HAVE_NTGUI) 1296#if defined (HAVE_NTGUI)
1297 XGCValues *gc; 1297 XGCValues *gc;
1298 HDC hdc; 1298 HDC hdc;
1299#endif 1299#endif
diff --git a/src/dispnew.c b/src/dispnew.c
index abe09ed6a49..50b96b699f9 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -92,7 +92,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
92#endif 92#endif
93#endif /* not __GNU_LIBRARY__ */ 93#endif /* not __GNU_LIBRARY__ */
94 94
95#if defined(HAVE_TERM_H) && defined (GNU_LINUX) && defined (HAVE_LIBNCURSES) 95#if defined (HAVE_TERM_H) && defined (GNU_LINUX) && defined (HAVE_LIBNCURSES)
96#include <term.h> /* for tgetent */ 96#include <term.h> /* for tgetent */
97#endif 97#endif
98 98
@@ -4925,7 +4925,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
4925 4925
4926/* Char insertion/deletion cost vector, from term.c */ 4926/* Char insertion/deletion cost vector, from term.c */
4927 4927
4928#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS((f))]) 4928#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS ((f))])
4929 4929
4930 4930
4931/* Perform a frame-based update on line VPOS in frame FRAME. */ 4931/* Perform a frame-based update on line VPOS in frame FRAME. */
@@ -5377,7 +5377,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5377 } 5377 }
5378 5378
5379 /* Add extra (default width) columns if clicked after EOL. */ 5379 /* Add extra (default width) columns if clicked after EOL. */
5380 x1 = max(0, it.current_x + it.pixel_width - it.first_visible_x); 5380 x1 = max (0, it.current_x + it.pixel_width - it.first_visible_x);
5381 if (x0 > x1) 5381 if (x0 > x1)
5382 it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); 5382 it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w);
5383 5383
@@ -6241,7 +6241,7 @@ init_display (void)
6241 ) 6241 )
6242 { 6242 {
6243 Vinitial_window_system = Qns; 6243 Vinitial_window_system = Qns;
6244 Vwindow_system_version = make_number(10); 6244 Vwindow_system_version = make_number (10);
6245 adjust_frame_glyphs_initially (); 6245 adjust_frame_glyphs_initially ();
6246 return; 6246 return;
6247 } 6247 }
@@ -6340,7 +6340,7 @@ init_display (void)
6340 { 6340 {
6341 /* For the initial frame, we don't have any way of knowing what 6341 /* For the initial frame, we don't have any way of knowing what
6342 are the foreground and background colors of the terminal. */ 6342 are the foreground and background colors of the terminal. */
6343 struct frame *sf = SELECTED_FRAME(); 6343 struct frame *sf = SELECTED_FRAME ();
6344 6344
6345 FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR; 6345 FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR;
6346 FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR; 6346 FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR;
diff --git a/src/doprnt.c b/src/doprnt.c
index 638fa4d6312..8db7c0f2ada 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -347,7 +347,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
347 case 'e': 347 case 'e':
348 case 'g': 348 case 'g':
349 { 349 {
350 double d = va_arg(ap, double); 350 double d = va_arg (ap, double);
351 sprintf (sprintf_buffer, fmtcpy, d); 351 sprintf (sprintf_buffer, fmtcpy, d);
352 /* Now copy into final output, truncating as necessary. */ 352 /* Now copy into final output, truncating as necessary. */
353 string = sprintf_buffer; 353 string = sprintf_buffer;
@@ -427,7 +427,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
427 427
428 case 'c': 428 case 'c':
429 { 429 {
430 int chr = va_arg(ap, int); 430 int chr = va_arg (ap, int);
431 tem = CHAR_STRING (chr, (unsigned char *) charbuf); 431 tem = CHAR_STRING (chr, (unsigned char *) charbuf);
432 string = charbuf; 432 string = charbuf;
433 string[tem] = 0; 433 string[tem] = 0;
diff --git a/src/dosfns.c b/src/dosfns.c
index e903ef20af0..ab3433b7902 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -343,13 +343,13 @@ init_dosfns (void)
343 { 343 {
344 dpmiregs.x.ax = 0x168e; 344 dpmiregs.x.ax = 0x168e;
345 dpmiregs.x.dx = 3; /* get VM title */ 345 dpmiregs.x.dx = 3; /* get VM title */
346 dpmiregs.x.cx = sizeof(parent_vm_title) - 1; 346 dpmiregs.x.cx = sizeof (parent_vm_title) - 1;
347 dpmiregs.x.es = __tb >> 4; 347 dpmiregs.x.es = __tb >> 4;
348 dpmiregs.x.di = __tb & 15; 348 dpmiregs.x.di = __tb & 15;
349 dpmiregs.x.sp = dpmiregs.x.ss = dpmiregs.x.flags = 0; 349 dpmiregs.x.sp = dpmiregs.x.ss = dpmiregs.x.flags = 0;
350 _go32_dpmi_simulate_int (0x2f, &dpmiregs); 350 _go32_dpmi_simulate_int (0x2f, &dpmiregs);
351 if (dpmiregs.x.ax == 1) 351 if (dpmiregs.x.ax == 1)
352 dosmemget (__tb, sizeof(parent_vm_title), parent_vm_title); 352 dosmemget (__tb, sizeof (parent_vm_title), parent_vm_title);
353 } 353 }
354 } 354 }
355 else 355 else
@@ -573,7 +573,7 @@ system_process_attributes (Lisp_Object pid)
573 Fsymbol_value (intern ("before-init-time"))), 573 Fsymbol_value (intern ("before-init-time"))),
574 attrs); 574 attrs);
575 attrs = Fcons (Fcons (Qvsize, 575 attrs = Fcons (Fcons (Qvsize,
576 make_fixnum_or_float ((unsigned long)sbrk(0)/1024)), 576 make_fixnum_or_float ((unsigned long)sbrk (0)/1024)),
577 attrs); 577 attrs);
578 attrs = Fcons (Fcons (Qetime, tem), attrs); 578 attrs = Fcons (Fcons (Qetime, tem), attrs);
579#ifndef SYSTEM_MALLOC 579#ifndef SYSTEM_MALLOC
diff --git a/src/editfns.c b/src/editfns.c
index 580298c6e7d..596765d899e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -146,7 +146,7 @@ init_editfns (void)
146 /* If the user name claimed in the environment vars differs from 146 /* If the user name claimed in the environment vars differs from
147 the real uid, use the claimed name to find the full name. */ 147 the real uid, use the claimed name to find the full name. */
148 tem = Fstring_equal (Vuser_login_name, Vuser_real_login_name); 148 tem = Fstring_equal (Vuser_login_name, Vuser_real_login_name);
149 Vuser_full_name = Fuser_full_name (NILP (tem)? make_number (geteuid()) 149 Vuser_full_name = Fuser_full_name (NILP (tem)? make_number (geteuid ())
150 : Vuser_login_name); 150 : Vuser_login_name);
151 151
152 p = getenv ("NAME"); 152 p = getenv ("NAME");
@@ -3254,7 +3254,7 @@ save_restriction_save (void)
3254 end = buildmark (ZV, ZV_BYTE); 3254 end = buildmark (ZV, ZV_BYTE);
3255 3255
3256 /* END must move forward if text is inserted at its exact location. */ 3256 /* END must move forward if text is inserted at its exact location. */
3257 XMARKER(end)->insertion_type = 1; 3257 XMARKER (end)->insertion_type = 1;
3258 3258
3259 return Fcons (beg, end); 3259 return Fcons (beg, end);
3260 } 3260 }
diff --git a/src/emacs.c b/src/emacs.c
index c766523b1c3..d0e7a748849 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -165,7 +165,7 @@ int inhibit_window_system;
165 data on the first attempt to change it inside asynchronous code. */ 165 data on the first attempt to change it inside asynchronous code. */
166int running_asynch_code; 166int running_asynch_code;
167 167
168#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 168#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
169/* If non-zero, -d was specified, meaning we're using some window system. */ 169/* If non-zero, -d was specified, meaning we're using some window system. */
170int display_arg; 170int display_arg;
171#endif 171#endif
@@ -811,7 +811,7 @@ main (int argc, char **argv)
811 { 811 {
812 static char heapexec[] = "EMACS_HEAP_EXEC=true"; 812 static char heapexec[] = "EMACS_HEAP_EXEC=true";
813 /* Set this so we only do this once. */ 813 /* Set this so we only do this once. */
814 putenv(heapexec); 814 putenv (heapexec);
815 815
816 /* A flag to turn off address randomization which is introduced 816 /* A flag to turn off address randomization which is introduced
817 in linux kernel shipped with fedora core 4 */ 817 in linux kernel shipped with fedora core 4 */
@@ -851,7 +851,7 @@ main (int argc, char **argv)
851 stack allocation routine for new process that the allocation 851 stack allocation routine for new process that the allocation
852 fails if stack limit is not on page boundary. So, round up the 852 fails if stack limit is not on page boundary. So, round up the
853 new limit to page boundary. */ 853 new limit to page boundary. */
854 newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize(); 854 newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize ();
855#endif 855#endif
856 if (newlim > rlim.rlim_max) 856 if (newlim > rlim.rlim_max)
857 { 857 {
@@ -1100,7 +1100,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1100 || strlen (dname_arg) < 1 || strlen (dname_arg) > 70) 1100 || strlen (dname_arg) < 1 || strlen (dname_arg) > 70)
1101 { 1101 {
1102 fprintf (stderr, "emacs daemon: daemon name absent or too long\n"); 1102 fprintf (stderr, "emacs daemon: daemon name absent or too long\n");
1103 exit(1); 1103 exit (1);
1104 } 1104 }
1105 dname_arg2[0] = '\0'; 1105 dname_arg2[0] = '\0';
1106 sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]), 1106 sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]),
@@ -1118,7 +1118,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1118 fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC); 1118 fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC);
1119 1119
1120#ifdef HAVE_SETSID 1120#ifdef HAVE_SETSID
1121 setsid(); 1121 setsid ();
1122#endif 1122#endif
1123#else /* DOS_NT */ 1123#else /* DOS_NT */
1124 fprintf (stderr, "This platform does not support the -daemon flag.\n"); 1124 fprintf (stderr, "This platform does not support the -daemon flag.\n");
@@ -1319,7 +1319,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1319 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); 1319 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
1320 1320
1321#ifdef HAVE_NS 1321#ifdef HAVE_NS
1322 ns_alloc_autorelease_pool(); 1322 ns_alloc_autorelease_pool ();
1323 if (!noninteractive) 1323 if (!noninteractive)
1324 { 1324 {
1325#ifdef NS_IMPL_COCOA 1325#ifdef NS_IMPL_COCOA
@@ -1327,12 +1327,12 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1327 { 1327 {
1328 /* FIXME: Do the right thing if getenv returns NULL, or if 1328 /* FIXME: Do the right thing if getenv returns NULL, or if
1329 chdir fails. */ 1329 chdir fails. */
1330 if (!strncmp(argv[skip_args], "-psn", 4)) 1330 if (!strncmp (argv[skip_args], "-psn", 4))
1331 { 1331 {
1332 skip_args += 1; 1332 skip_args += 1;
1333 chdir (getenv ("HOME")); 1333 chdir (getenv ("HOME"));
1334 } 1334 }
1335 else if (skip_args+1 < argc && !strncmp(argv[skip_args+1], "-psn", 4)) 1335 else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4))
1336 { 1336 {
1337 skip_args += 2; 1337 skip_args += 2;
1338 chdir (getenv ("HOME")); 1338 chdir (getenv ("HOME"));
@@ -1560,9 +1560,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1560 1560
1561#ifdef MSDOS 1561#ifdef MSDOS
1562 syms_of_xmenu (); 1562 syms_of_xmenu ();
1563 syms_of_dosfns(); 1563 syms_of_dosfns ();
1564 syms_of_msdos(); 1564 syms_of_msdos ();
1565 syms_of_win16select(); 1565 syms_of_win16select ();
1566#endif /* MSDOS */ 1566#endif /* MSDOS */
1567 1567
1568#ifdef HAVE_NS 1568#ifdef HAVE_NS
@@ -1661,7 +1661,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1661 GNU/Linux and MinGW. It might work on some other systems too. 1661 GNU/Linux and MinGW. It might work on some other systems too.
1662 Give it a try and tell us if it works on your system. To compile 1662 Give it a try and tell us if it works on your system. To compile
1663 for profiling, use the configure option --enable-profiling. */ 1663 for profiling, use the configure option --enable-profiling. */
1664#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined(__MINGW32__) 1664#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined (__MINGW32__)
1665#ifdef PROFILING 1665#ifdef PROFILING
1666 if (initialized) 1666 if (initialized)
1667 { 1667 {
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 7b93319e978..8cde68d8303 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,4 +1,4 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
2This file is only use when compiling with Gtk+ 3. 2This file is only use when compiling with Gtk+ 3.
3 3
4Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
@@ -237,10 +237,10 @@ emacs_fixed_get_preferred_height (GtkWidget *widget,
237 (Bug#8919), and so users can resize our frames as they wish. */ 237 (Bug#8919), and so users can resize our frames as they wish. */
238 238
239void 239void
240XSetWMSizeHints(Display* d, 240XSetWMSizeHints (Display* d,
241 Window w, 241 Window w,
242 XSizeHints* hints, 242 XSizeHints* hints,
243 Atom prop) 243 Atom prop)
244{ 244{
245 struct x_display_info *dpyinfo = x_display_info_for_display (d); 245 struct x_display_info *dpyinfo = x_display_info_for_display (d);
246 struct frame *f = x_top_window_to_frame (dpyinfo, w); 246 struct frame *f = x_top_window_to_frame (dpyinfo, w);
@@ -279,7 +279,7 @@ XSetWMSizeHints(Display* d,
279/* Override this X11 function. 279/* Override this X11 function.
280 This function is in the same X11 file as the one above. So we must 280 This function is in the same X11 file as the one above. So we must
281 provide it also. */ 281 provide it also. */
282 282
283void 283void
284XSetWMNormalHints (Display *d, Window w, XSizeHints *hints) 284XSetWMNormalHints (Display *d, Window w, XSizeHints *hints)
285{ 285{
diff --git a/src/eval.c b/src/eval.c
index f2407cede31..57a273cd4aa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -467,7 +467,7 @@ usage: (setq [SYM VAL]...) */)
467 467
468 args_left = Fcdr (Fcdr (args_left)); 468 args_left = Fcdr (Fcdr (args_left));
469 } 469 }
470 while (!NILP(args_left)); 470 while (!NILP (args_left));
471 471
472 UNGCPRO; 472 UNGCPRO;
473 return val; 473 return val;
diff --git a/src/fileio.c b/src/fileio.c
index fe0fb593208..08be41f9fe4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1472,7 +1472,7 @@ search_embedded_absfilename (char *nm, char *endp)
1472 if ((0 1472 if ((0
1473 || IS_DIRECTORY_SEP (p[-1])) 1473 || IS_DIRECTORY_SEP (p[-1]))
1474 && file_name_absolute_p (p) 1474 && file_name_absolute_p (p)
1475#if defined (WINDOWSNT) || defined(CYGWIN) 1475#if defined (WINDOWSNT) || defined (CYGWIN)
1476 /* // at start of file name is meaningful in Apollo, 1476 /* // at start of file name is meaningful in Apollo,
1477 WindowsNT and Cygwin systems. */ 1477 WindowsNT and Cygwin systems. */
1478 && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) 1478 && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm)
@@ -2497,7 +2497,7 @@ See also `file-exists-p' and `file-attributes'. */)
2497 2497
2498 absname = ENCODE_FILE (absname); 2498 absname = ENCODE_FILE (absname);
2499 2499
2500#if defined(DOS_NT) || defined(macintosh) 2500#if defined (DOS_NT) || defined (macintosh)
2501 /* Under MS-DOS, Windows, and Macintosh, open does not work for 2501 /* Under MS-DOS, Windows, and Macintosh, open does not work for
2502 directories. */ 2502 directories. */
2503 if (access (SDATA (absname), 0) == 0) 2503 if (access (SDATA (absname), 0) == 0)
@@ -2782,7 +2782,7 @@ if file does not exist, is not accessible, or SELinux is disabled */)
2782 } 2782 }
2783#endif 2783#endif
2784 2784
2785 return Flist (sizeof(values) / sizeof(values[0]), values); 2785 return Flist (sizeof (values) / sizeof (values[0]), values);
2786} 2786}
2787 2787
2788DEFUN ("set-file-selinux-context", Fset_file_selinux_context, 2788DEFUN ("set-file-selinux-context", Fset_file_selinux_context,
@@ -2853,7 +2853,7 @@ is disabled. */)
2853 context_free (parsed_con); 2853 context_free (parsed_con);
2854 } 2854 }
2855 else 2855 else
2856 report_file_error("Doing lgetfilecon", Fcons (absname, Qnil)); 2856 report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
2857 2857
2858 if (con) 2858 if (con)
2859 freecon (con); 2859 freecon (con);
@@ -3253,6 +3253,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
3253 if (NILP (visit)) 3253 if (NILP (visit))
3254 report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); 3254 report_file_error ("Opening input file", Fcons (orig_filename, Qnil));
3255 st.st_mtime = -1; 3255 st.st_mtime = -1;
3256 st.st_size = -1;
3256 how_much = 0; 3257 how_much = 0;
3257 if (!NILP (Vcoding_system_for_read)) 3258 if (!NILP (Vcoding_system_for_read))
3258 Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); 3259 Fset (Qbuffer_file_coding_system, Vcoding_system_for_read);
@@ -3545,7 +3546,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
3545 immediate_quit = 0; 3546 immediate_quit = 0;
3546 /* If the file matches the buffer completely, 3547 /* If the file matches the buffer completely,
3547 there's no need to replace anything. */ 3548 there's no need to replace anything. */
3548 if (same_at_start - BEGV_BYTE == end_offset) 3549 if (same_at_start - BEGV_BYTE == end_offset - beg_offset)
3549 { 3550 {
3550 emacs_close (fd); 3551 emacs_close (fd);
3551 specpdl_ptr--; 3552 specpdl_ptr--;
@@ -5044,9 +5045,10 @@ Next attempt to save will certainly not complain of a discrepancy. */)
5044DEFUN ("visited-file-modtime", Fvisited_file_modtime, 5045DEFUN ("visited-file-modtime", Fvisited_file_modtime,
5045 Svisited_file_modtime, 0, 0, 0, 5046 Svisited_file_modtime, 0, 0, 0,
5046 doc: /* Return the current buffer's recorded visited file modification time. 5047 doc: /* Return the current buffer's recorded visited file modification time.
5047The value is a list of the form (HIGH LOW), like the time values 5048The value is a list of the form (HIGH LOW), like the time values that
5048that `file-attributes' returns. If the current buffer has no recorded 5049`file-attributes' returns. If the current buffer has no recorded file
5049file modification time, this function returns 0. 5050modification time, this function returns 0. If the visited file
5051doesn't exist, HIGH will be -1.
5050See Info node `(elisp)Modification Time' for more details. */) 5052See Info node `(elisp)Modification Time' for more details. */)
5051 (void) 5053 (void)
5052{ 5054{
diff --git a/src/filelock.c b/src/filelock.c
index 7235c862ef0..5ee2c039b81 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -630,7 +630,7 @@ unlock_all_files (void)
630 b = XBUFFER (XCDR (XCAR (tail))); 630 b = XBUFFER (XCDR (XCAR (tail)));
631 if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) 631 if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
632 { 632 {
633 unlock_file(BVAR (b, file_truename)); 633 unlock_file (BVAR (b, file_truename));
634 } 634 }
635 } 635 }
636} 636}
diff --git a/src/floatfns.c b/src/floatfns.c
index 81cf6bdb61f..2011b4d942d 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
71extern double logb (double); 71extern double logb (double);
72#endif /* not HPUX and HAVE_LOGB and no logb macro */ 72#endif /* not HPUX and HAVE_LOGB and no logb macro */
73 73
74#if defined(DOMAIN) && defined(SING) && defined(OVERFLOW) 74#if defined (DOMAIN) && defined (SING) && defined (OVERFLOW)
75 /* If those are defined, then this is probably a `matherr' machine. */ 75 /* If those are defined, then this is probably a `matherr' machine. */
76# ifndef HAVE_MATHERR 76# ifndef HAVE_MATHERR
77# define HAVE_MATHERR 77# define HAVE_MATHERR
@@ -519,7 +519,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
519 if (f1 == 0.0 && f2 == 0.0) 519 if (f1 == 0.0 && f2 == 0.0)
520 f1 = 1.0; 520 f1 = 1.0;
521#ifdef FLOAT_CHECK_DOMAIN 521#ifdef FLOAT_CHECK_DOMAIN
522 else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor(f2))) 522 else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor (f2)))
523 domain_error2 ("expt", arg1, arg2); 523 domain_error2 ("expt", arg1, arg2);
524#endif 524#endif
525 IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2); 525 IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2);
diff --git a/src/fns.c b/src/fns.c
index a3af6b8c15a..392f447a6d8 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4704,13 +4704,13 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_
4704 force_raw_text = 1; 4704 force_raw_text = 1;
4705 } 4705 }
4706 4706
4707 if (NILP (coding_system) && !NILP (Fbuffer_file_name(object))) 4707 if (NILP (coding_system) && !NILP (Fbuffer_file_name (object)))
4708 { 4708 {
4709 /* Check file-coding-system-alist. */ 4709 /* Check file-coding-system-alist. */
4710 Lisp_Object args[4], val; 4710 Lisp_Object args[4], val;
4711 4711
4712 args[0] = Qwrite_region; args[1] = start; args[2] = end; 4712 args[0] = Qwrite_region; args[1] = start; args[2] = end;
4713 args[3] = Fbuffer_file_name(object); 4713 args[3] = Fbuffer_file_name (object);
4714 val = Ffind_operation_coding_system (4, args); 4714 val = Ffind_operation_coding_system (4, args);
4715 if (CONSP (val) && !NILP (XCDR (val))) 4715 if (CONSP (val) && !NILP (XCDR (val)))
4716 coding_system = XCDR (val); 4716 coding_system = XCDR (val);
diff --git a/src/font.c b/src/font.c
index 34cacb37ce4..1a4742ba959 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1334,7 +1334,7 @@ font_parse_fcname (char *name, Lisp_Object font)
1334 { 1334 {
1335 int decimal = 0, size_found = 1; 1335 int decimal = 0, size_found = 1;
1336 for (q = p + 1; *q && *q != ':'; q++) 1336 for (q = p + 1; *q && *q != ':'; q++)
1337 if (! isdigit(*q)) 1337 if (! isdigit (*q))
1338 { 1338 {
1339 if (*q != '.' || decimal) 1339 if (*q != '.' || decimal)
1340 { 1340 {
@@ -3239,7 +3239,7 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O
3239 if (INTEGERP (height)) 3239 if (INTEGERP (height))
3240 pt = XINT (height); 3240 pt = XINT (height);
3241 else 3241 else
3242 abort(); /* We should never end up here. */ 3242 abort (); /* We should never end up here. */
3243 } 3243 }
3244 3244
3245 pt /= 10; 3245 pt /= 10;
@@ -3247,7 +3247,7 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O
3247#ifdef HAVE_NS 3247#ifdef HAVE_NS
3248 if (size == 0) 3248 if (size == 0)
3249 { 3249 {
3250 Lisp_Object ffsize = get_frame_param(f, Qfontsize); 3250 Lisp_Object ffsize = get_frame_param (f, Qfontsize);
3251 size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0; 3251 size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0;
3252 } 3252 }
3253#endif 3253#endif
diff --git a/src/frame.c b/src/frame.c
index 66b857a73e9..112f102a1f2 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1155,17 +1155,6 @@ other_visible_frames (FRAME_PTR f)
1155 return 1; 1155 return 1;
1156} 1156}
1157 1157
1158DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0,
1159 doc: /* Return t if there are other visible frames beside FRAME.
1160FRAME defaults to the selected frame. */)
1161 (Lisp_Object frame)
1162{
1163 if (NILP (frame))
1164 frame = selected_frame;
1165 CHECK_LIVE_FRAME (frame);
1166 return other_visible_frames (XFRAME (frame)) ? Qt : Qnil;
1167}
1168
1169/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME 1158/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
1170 unconditionally. x_connection_closed and delete_terminal use 1159 unconditionally. x_connection_closed and delete_terminal use
1171 this. Any other value of FORCE implements the semantics 1160 this. Any other value of FORCE implements the semantics
@@ -3098,7 +3087,11 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3098 for non-toolkit scroll bar. 3087 for non-toolkit scroll bar.
3099 ruler-mode.el depends on this. */ 3088 ruler-mode.el depends on this. */
3100 : Qnil)); 3089 : Qnil));
3101 w = FRAME_X_WINDOW (f); 3090 /* FRAME_X_WINDOW is not guaranteed to return an integer. E.g., on
3091 MS-Windows it returns a value whose type is HANDLE, which is
3092 actually a pointer. Explicit casting avoids compiler
3093 warnings. */
3094 w = (unsigned long) FRAME_X_WINDOW (f);
3102 sprintf (buf, "%lu", w); 3095 sprintf (buf, "%lu", w);
3103 store_in_alist (alistptr, Qwindow_id, 3096 store_in_alist (alistptr, Qwindow_id,
3104 build_string (buf)); 3097 build_string (buf));
@@ -3108,7 +3101,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3108 if (FRAME_X_OUTPUT (f)->widget) 3101 if (FRAME_X_OUTPUT (f)->widget)
3109#endif 3102#endif
3110 { 3103 {
3111 w = FRAME_OUTER_WINDOW (f); 3104 w = (unsigned long) FRAME_OUTER_WINDOW (f);
3112 sprintf (buf, "%lu", w); 3105 sprintf (buf, "%lu", w);
3113 } 3106 }
3114 store_in_alist (alistptr, Qouter_window_id, 3107 store_in_alist (alistptr, Qouter_window_id,
@@ -4370,7 +4363,7 @@ Setting this variable does not affect existing frames, only new ones. */);
4370 DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars, 4363 DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars,
4371 doc: /* Default position of scroll bars on this window-system. */); 4364 doc: /* Default position of scroll bars on this window-system. */);
4372#ifdef HAVE_WINDOW_SYSTEM 4365#ifdef HAVE_WINDOW_SYSTEM
4373#if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)) 4366#if defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA) || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS))
4374 /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by 4367 /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
4375 default. */ 4368 default. */
4376 Vdefault_frame_scroll_bars = Qright; 4369 Vdefault_frame_scroll_bars = Qright;
@@ -4471,7 +4464,6 @@ automatically. See also `mouse-autoselect-window'. */);
4471 defsubr (&Sframe_list); 4464 defsubr (&Sframe_list);
4472 defsubr (&Snext_frame); 4465 defsubr (&Snext_frame);
4473 defsubr (&Sprevious_frame); 4466 defsubr (&Sprevious_frame);
4474 defsubr (&Sother_visible_frames_p);
4475 defsubr (&Sdelete_frame); 4467 defsubr (&Sdelete_frame);
4476 defsubr (&Smouse_position); 4468 defsubr (&Smouse_position);
4477 defsubr (&Smouse_pixel_position); 4469 defsubr (&Smouse_pixel_position);
diff --git a/src/fringe.c b/src/fringe.c
index 5878c541247..25fecca2334 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -456,7 +456,7 @@ static struct fringe_bitmap standard_bitmaps[] =
456 456
457#define NO_FRINGE_BITMAP 0 457#define NO_FRINGE_BITMAP 0
458#define UNDEF_FRINGE_BITMAP 1 458#define UNDEF_FRINGE_BITMAP 1
459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof(standard_bitmaps)/sizeof(standard_bitmaps[0])) 459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof (standard_bitmaps)/sizeof (standard_bitmaps[0]))
460 460
461static struct fringe_bitmap **fringe_bitmaps; 461static struct fringe_bitmap **fringe_bitmaps;
462static Lisp_Object *fringe_faces; 462static Lisp_Object *fringe_faces;
@@ -1165,7 +1165,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1165 } 1165 }
1166 else if ((!row->reversed_p && row->truncated_on_left_p) 1166 else if ((!row->reversed_p && row->truncated_on_left_p)
1167 || (row->reversed_p && row->truncated_on_right_p)) 1167 || (row->reversed_p && row->truncated_on_right_p))
1168 left = LEFT_FRINGE(0, Qtruncation, 0); 1168 left = LEFT_FRINGE (0, Qtruncation, 0);
1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) 1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
1170 { 1170 {
1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) 1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
@@ -1787,7 +1787,7 @@ init_fringe_once (void)
1787 int bt; 1787 int bt;
1788 1788
1789 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) 1789 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
1790 init_fringe_bitmap(bt, &standard_bitmaps[bt], 1); 1790 init_fringe_bitmap (bt, &standard_bitmaps[bt], 1);
1791} 1791}
1792 1792
1793void 1793void
diff --git a/src/getpagesize.h b/src/getpagesize.h
index 965d0bc0244..c0c4e504f0a 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21# include <unistd.h> 21# include <unistd.h>
22 22
23# ifdef _SC_PAGESIZE 23# ifdef _SC_PAGESIZE
24# define getpagesize() sysconf(_SC_PAGESIZE) 24# define getpagesize() sysconf (_SC_PAGESIZE)
25# else /* no _SC_PAGESIZE */ 25# else /* no _SC_PAGESIZE */
26# ifdef HAVE_SYS_PARAM_H 26# ifdef HAVE_SYS_PARAM_H
27# include <sys/param.h> 27# include <sys/param.h>
diff --git a/src/gmalloc.c b/src/gmalloc.c
index d49259b8ed7..7b5e6df009b 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -102,7 +102,7 @@ extern void malloc_enable_thread PP ((void));
102 receive a fragment of a block. Fragment sizes are powers of two, 102 receive a fragment of a block. Fragment sizes are powers of two,
103 and all fragments of a block are the same size. When all the 103 and all fragments of a block are the same size. When all the
104 fragments in a block have been freed, the block itself is freed. */ 104 fragments in a block have been freed, the block itself is freed. */
105#define INT_BIT (CHAR_BIT * sizeof(int)) 105#define INT_BIT (CHAR_BIT * sizeof (int))
106#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) 106#define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
107#define BLOCKSIZE (1 << BLOCKLOG) 107#define BLOCKSIZE (1 << BLOCKLOG)
108#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) 108#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
@@ -445,7 +445,7 @@ protect_malloc_state (protect_p)
445 } 445 }
446} 446}
447 447
448#define PROTECT_MALLOC_STATE(PROT) protect_malloc_state(PROT) 448#define PROTECT_MALLOC_STATE(PROT) protect_malloc_state (PROT)
449 449
450#else 450#else
451#define PROTECT_MALLOC_STATE(PROT) /* empty */ 451#define PROTECT_MALLOC_STATE(PROT) /* empty */
@@ -1541,7 +1541,7 @@ _realloc_internal (ptr, size)
1541{ 1541{
1542 __ptr_t result; 1542 __ptr_t result;
1543 1543
1544 LOCK(); 1544 LOCK ();
1545 result = _realloc_internal_nolock (ptr, size); 1545 result = _realloc_internal_nolock (ptr, size);
1546 UNLOCK (); 1546 UNLOCK ();
1547 1547
@@ -1625,7 +1625,7 @@ MA 02110-1301, USA. */
1625 1625
1626/* uClibc defines __GNU_LIBRARY__, but it is not completely 1626/* uClibc defines __GNU_LIBRARY__, but it is not completely
1627 compatible. */ 1627 compatible. */
1628#if !defined(__GNU_LIBRARY__) || defined(__UCLIBC__) 1628#if !defined (__GNU_LIBRARY__) || defined (__UCLIBC__)
1629#define __sbrk sbrk 1629#define __sbrk sbrk
1630#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */ 1630#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */
1631/* It is best not to declare this and cast its result on foreign operating 1631/* It is best not to declare this and cast its result on foreign operating
@@ -1647,7 +1647,7 @@ __default_morecore (increment)
1647 __malloc_ptrdiff_t increment; 1647 __malloc_ptrdiff_t increment;
1648{ 1648{
1649 __ptr_t result; 1649 __ptr_t result;
1650#if defined(CYGWIN) 1650#if defined (CYGWIN)
1651 if (!bss_sbrk_did_unexec) 1651 if (!bss_sbrk_did_unexec)
1652 { 1652 {
1653 return bss_sbrk (increment); 1653 return bss_sbrk (increment);
@@ -1830,7 +1830,7 @@ extern size_t __getpagesize PP ((void));
1830#endif 1830#endif
1831#else 1831#else
1832#include "getpagesize.h" 1832#include "getpagesize.h"
1833#define __getpagesize() getpagesize() 1833#define __getpagesize() getpagesize ()
1834#endif 1834#endif
1835 1835
1836#ifndef _MALLOC_INTERNAL 1836#ifndef _MALLOC_INTERNAL
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 04d05d2a630..3cac8084dea 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -422,7 +422,7 @@ xg_get_image_for_pixmap (FRAME_PTR f,
422static void 422static void
423xg_set_cursor (GtkWidget *w, GdkCursor *cursor) 423xg_set_cursor (GtkWidget *w, GdkCursor *cursor)
424{ 424{
425 GdkWindow *window = gtk_widget_get_window(w); 425 GdkWindow *window = gtk_widget_get_window (w);
426 GList *children = gdk_window_peek_children (window); 426 GList *children = gdk_window_peek_children (window);
427 427
428 gdk_window_set_cursor (window, cursor); 428 gdk_window_set_cursor (window, cursor);
diff --git a/src/image.c b/src/image.c
index c5dcbb32e5d..db201d5a831 100644
--- a/src/image.c
+++ b/src/image.c
@@ -56,7 +56,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56#define COLOR_TABLE_SUPPORT 1 56#define COLOR_TABLE_SUPPORT 1
57 57
58typedef struct x_bitmap_record Bitmap_Record; 58typedef struct x_bitmap_record Bitmap_Record;
59#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) 59#define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y)
60#define NO_PIXMAP None 60#define NO_PIXMAP None
61 61
62#define RGB_PIXEL_COLOR unsigned long 62#define RGB_PIXEL_COLOR unsigned long
@@ -74,7 +74,7 @@ typedef struct x_bitmap_record Bitmap_Record;
74#undef COLOR_TABLE_SUPPORT 74#undef COLOR_TABLE_SUPPORT
75 75
76typedef struct w32_bitmap_record Bitmap_Record; 76typedef struct w32_bitmap_record Bitmap_Record;
77#define GET_PIXEL(ximg, x, y) GetPixel(ximg, x, y) 77#define GET_PIXEL(ximg, x, y) GetPixel (ximg, x, y)
78#define NO_PIXMAP 0 78#define NO_PIXMAP 0
79 79
80#define RGB_PIXEL_COLOR COLORREF 80#define RGB_PIXEL_COLOR COLORREF
@@ -106,7 +106,7 @@ Lisp_Object Qlibpng_version;
106 106
107typedef struct ns_bitmap_record Bitmap_Record; 107typedef struct ns_bitmap_record Bitmap_Record;
108 108
109#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) 109#define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y)
110#define NO_PIXMAP 0 110#define NO_PIXMAP 0
111 111
112#define RGB_PIXEL_COLOR unsigned long 112#define RGB_PIXEL_COLOR unsigned long
@@ -115,7 +115,7 @@ typedef struct ns_bitmap_record Bitmap_Record;
115#define PIX_MASK_RETAIN 0 115#define PIX_MASK_RETAIN 0
116#define PIX_MASK_DRAW 1 116#define PIX_MASK_DRAW 1
117 117
118#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO(f)->visual 118#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO (f)->visual
119#define x_defined_color(f, name, color_def, alloc) \ 119#define x_defined_color(f, name, color_def, alloc) \
120 ns_defined_color (f, name, color_def, alloc, 0) 120 ns_defined_color (f, name, color_def, alloc, 0)
121#define FRAME_X_SCREEN(f) 0 121#define FRAME_X_SCREEN(f) 0
@@ -1106,8 +1106,8 @@ image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
1106 because a typical font is `top-heavy' (due to the presence 1106 because a typical font is `top-heavy' (due to the presence
1107 uppercase letters), so the image placement should err towards 1107 uppercase letters), so the image placement should err towards
1108 being top-heavy too. It also just generally looks better. */ 1108 being top-heavy too. It also just generally looks better. */
1109 ascent = (height + FONT_BASE(face->font) 1109 ascent = (height + FONT_BASE (face->font)
1110 - FONT_DESCENT(face->font) + 1) / 2; 1110 - FONT_DESCENT (face->font) + 1) / 2;
1111#endif /* HAVE_NTGUI */ 1111#endif /* HAVE_NTGUI */
1112 } 1112 }
1113 else 1113 else
@@ -5545,7 +5545,7 @@ init_png_functions (Lisp_Object libraries)
5545/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ 5545/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */
5546#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) 5546#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1))
5547#define PNG_JMPBUF(ptr) \ 5547#define PNG_JMPBUF(ptr) \
5548 (*fn_png_set_longjmp_fn((ptr), longjmp, sizeof (jmp_buf))) 5548 (*fn_png_set_longjmp_fn ((ptr), longjmp, sizeof (jmp_buf)))
5549#endif 5549#endif
5550 5550
5551/* Error and warning handlers installed when the PNG library 5551/* Error and warning handlers installed when the PNG library
@@ -5966,9 +5966,9 @@ png_load (struct frame *f, struct image *img)
5966static int 5966static int
5967png_load (struct frame *f, struct image *img) 5967png_load (struct frame *f, struct image *img)
5968{ 5968{
5969 return ns_load_image(f, img, 5969 return ns_load_image (f, img,
5970 image_spec_value (img->spec, QCfile, NULL), 5970 image_spec_value (img->spec, QCfile, NULL),
5971 image_spec_value (img->spec, QCdata, NULL)); 5971 image_spec_value (img->spec, QCdata, NULL));
5972} 5972}
5973#endif /* HAVE_NS */ 5973#endif /* HAVE_NS */
5974 5974
@@ -6115,7 +6115,7 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
6115 6115
6116#else 6116#else
6117 6117
6118#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress(a) 6118#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress (a)
6119#define fn_jpeg_start_decompress jpeg_start_decompress 6119#define fn_jpeg_start_decompress jpeg_start_decompress
6120#define fn_jpeg_finish_decompress jpeg_finish_decompress 6120#define fn_jpeg_finish_decompress jpeg_finish_decompress
6121#define fn_jpeg_destroy_decompress jpeg_destroy_decompress 6121#define fn_jpeg_destroy_decompress jpeg_destroy_decompress
@@ -7229,8 +7229,10 @@ gif_load (struct frame *f, struct image *img)
7229 7229
7230 img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; 7230 img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top;
7231 img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; 7231 img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left;
7232 img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; 7232 img->corners[BOT_CORNER]
7233 img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; 7233 = img->corners[TOP_CORNER] + gif->SavedImages[0].ImageDesc.Height;
7234 img->corners[RIGHT_CORNER]
7235 = img->corners[LEFT_CORNER] + gif->SavedImages[0].ImageDesc.Width;
7234 7236
7235 if (!check_image_size (f, width, height)) 7237 if (!check_image_size (f, width, height))
7236 { 7238 {
@@ -7623,7 +7625,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7623 return 0; 7625 return 0;
7624 } 7626 }
7625 7627
7626 if (MagickGetNumberImages(ping_wand) > 1) 7628 if (MagickGetNumberImages (ping_wand) > 1)
7627 img->lisp_data = 7629 img->lisp_data =
7628 Fcons (Qcount, 7630 Fcons (Qcount,
7629 Fcons (make_number (MagickGetNumberImages (ping_wand)), 7631 Fcons (make_number (MagickGetNumberImages (ping_wand)),
@@ -7648,7 +7650,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7648 if (im_image == NULL) 7650 if (im_image == NULL)
7649 goto imagemagick_no_wand; 7651 goto imagemagick_no_wand;
7650 image_wand = NewMagickWandFromImage (im_image); 7652 image_wand = NewMagickWandFromImage (im_image);
7651 DestroyImage(im_image); 7653 DestroyImage (im_image);
7652 } 7654 }
7653 else 7655 else
7654 { 7656 {
@@ -7769,7 +7771,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7769#ifdef COLOR_TABLE_SUPPORT 7771#ifdef COLOR_TABLE_SUPPORT
7770 free_color_table (); 7772 free_color_table ();
7771#endif 7773#endif
7772 image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil); 7774 image_error ("Imagemagick X bitmap allocation failure", Qnil, Qnil);
7773 goto imagemagick_error; 7775 goto imagemagick_error;
7774 } 7776 }
7775 7777
@@ -7823,7 +7825,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7823#ifdef COLOR_TABLE_SUPPORT 7825#ifdef COLOR_TABLE_SUPPORT
7824 free_color_table (); 7826 free_color_table ();
7825#endif 7827#endif
7826 image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil); 7828 image_error ("Imagemagick X bitmap allocation failure", Qnil, Qnil);
7827 goto imagemagick_error; 7829 goto imagemagick_error;
7828 } 7830 }
7829 7831
diff --git a/src/indent.c b/src/indent.c
index 6e602d28f60..bae9ab1b46d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1543,7 +1543,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
1543 n = 1; 1543 n = 1;
1544 } 1544 }
1545 1545
1546 for (i = n - 1; i >= 0; --i) 1546 for (i = 0; i < n; ++i)
1547 { 1547 {
1548 if (VECTORP (charvec)) 1548 if (VECTORP (charvec))
1549 { 1549 {
diff --git a/src/insdel.c b/src/insdel.c
index 0cae578925d..01e5c57b2b0 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -329,7 +329,7 @@ adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte,
329 - disordered overlays in the slot `overlays_before' of current_buffer. */ 329 - disordered overlays in the slot `overlays_before' of current_buffer. */
330 if (adjusted) 330 if (adjusted)
331 { 331 {
332 fix_start_end_in_overlays(from, to); 332 fix_start_end_in_overlays (from, to);
333 fix_overlays_before (current_buffer, from, to); 333 fix_overlays_before (current_buffer, from, to);
334 } 334 }
335} 335}
@@ -1606,7 +1606,7 @@ del_range_1 (EMACS_INT from, EMACS_INT to, int prepare, int ret_string)
1606 to_byte = CHAR_TO_BYTE (to); 1606 to_byte = CHAR_TO_BYTE (to);
1607 1607
1608 deletion = del_range_2 (from, from_byte, to, to_byte, ret_string); 1608 deletion = del_range_2 (from, from_byte, to, to_byte, ret_string);
1609 GCPRO1(deletion); 1609 GCPRO1 (deletion);
1610 signal_after_change (from, to - from, 0); 1610 signal_after_change (from, to - from, 0);
1611 update_compositions (from, from, CHECK_HEAD); 1611 update_compositions (from, from, CHECK_HEAD);
1612 UNGCPRO; 1612 UNGCPRO;
diff --git a/src/keyboard.c b/src/keyboard.c
index 8705c3cd65f..b266da07a42 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -411,7 +411,7 @@ int interrupts_deferred;
411 411
412/* If we support a window system, turn on the code to poll periodically 412/* If we support a window system, turn on the code to poll periodically
413 to detect C-g. It isn't actually used when doing interrupt input. */ 413 to detect C-g. It isn't actually used when doing interrupt input. */
414#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS) 414#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS)
415#define POLL_FOR_INPUT 415#define POLL_FOR_INPUT
416#endif 416#endif
417 417
@@ -3958,7 +3958,7 @@ kbd_buffer_get_event (KBOARD **kbp,
3958 kbd_fetch_ptr = event + 1; 3958 kbd_fetch_ptr = event + 1;
3959 } 3959 }
3960#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 3960#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
3961 || defined(HAVE_NS) || defined (USE_GTK) 3961 || defined (HAVE_NS) || defined (USE_GTK)
3962 else if (event->kind == MENU_BAR_ACTIVATE_EVENT) 3962 else if (event->kind == MENU_BAR_ACTIVATE_EVENT)
3963 { 3963 {
3964 kbd_fetch_ptr = event + 1; 3964 kbd_fetch_ptr = event + 1;
@@ -4075,7 +4075,7 @@ kbd_buffer_get_event (KBOARD **kbp,
4075 obj = make_lispy_event (event); 4075 obj = make_lispy_event (event);
4076 4076
4077#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 4077#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
4078 || defined(HAVE_NS) || defined (USE_GTK) 4078 || defined (HAVE_NS) || defined (USE_GTK)
4079 /* If this was a menu selection, then set the flag to inhibit 4079 /* If this was a menu selection, then set the flag to inhibit
4080 writing to last_nonmenu_event. Don't do this if the event 4080 writing to last_nonmenu_event. Don't do this if the event
4081 we're returning is (menu-bar), though; that indicates the 4081 we're returning is (menu-bar), though; that indicates the
@@ -5891,7 +5891,7 @@ make_lispy_event (struct input_event *event)
5891#endif /* HAVE_MOUSE */ 5891#endif /* HAVE_MOUSE */
5892 5892
5893#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 5893#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
5894 || defined(HAVE_NS) || defined (USE_GTK) 5894 || defined (HAVE_NS) || defined (USE_GTK)
5895 case MENU_BAR_EVENT: 5895 case MENU_BAR_EVENT:
5896 if (EQ (event->arg, event->frame_or_window)) 5896 if (EQ (event->arg, event->frame_or_window))
5897 /* This is the prefix key. We translate this to 5897 /* This is the prefix key. We translate this to
@@ -6012,7 +6012,7 @@ make_lispy_event (struct input_event *event)
6012 } 6012 }
6013} 6013}
6014 6014
6015#if defined(HAVE_MOUSE) || defined(HAVE_GPM) 6015#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
6016 6016
6017static Lisp_Object 6017static Lisp_Object
6018make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, 6018make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
@@ -7024,7 +7024,7 @@ tty_read_avail_input (struct terminal *terminal,
7024 if (n_to_read > sizeof cbuf) 7024 if (n_to_read > sizeof cbuf)
7025 n_to_read = sizeof cbuf; 7025 n_to_read = sizeof cbuf;
7026#else /* no FIONREAD */ 7026#else /* no FIONREAD */
7027#if defined (USG) || defined(CYGWIN) 7027#if defined (USG) || defined (CYGWIN)
7028 /* Read some input if available, but don't wait. */ 7028 /* Read some input if available, but don't wait. */
7029 n_to_read = sizeof cbuf; 7029 n_to_read = sizeof cbuf;
7030 fcntl (fileno (tty->input), F_SETFL, O_NDELAY); 7030 fcntl (fileno (tty->input), F_SETFL, O_NDELAY);
diff --git a/src/keymap.h b/src/keymap.h
index ec9d4cadbb1..a989f124b14 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -19,6 +19,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#ifndef KEYMAP_H 19#ifndef KEYMAP_H
20#define KEYMAP_H 20#define KEYMAP_H
21 21
22/* The maximum byte size consumed by push_key_description.
23 All callers should assure that at least this size of memory is
24 allocated at the place pointed by the second argument.
25
26 There are 6 modifiers, each consumes 2 chars.
27 The octal form of a character code consumes
28 (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
29 We need one more byte for string terminator `\0'. */
30#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
31
22#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0))) 32#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0)))
23extern Lisp_Object Qkeymap, Qmenu_bar; 33extern Lisp_Object Qkeymap, Qmenu_bar;
24extern Lisp_Object Qremap; 34extern Lisp_Object Qremap;
@@ -30,6 +40,7 @@ EXFUN (Fdefine_key, 3);
30EXFUN (Fcommand_remapping, 3); 40EXFUN (Fcommand_remapping, 3);
31EXFUN (Fkey_binding, 4); 41EXFUN (Fkey_binding, 4);
32EXFUN (Fkey_description, 2); 42EXFUN (Fkey_description, 2);
43extern char *push_key_description (EMACS_INT, char *, int);
33EXFUN (Fsingle_key_description, 2); 44EXFUN (Fsingle_key_description, 2);
34EXFUN (Fwhere_is_internal, 5); 45EXFUN (Fwhere_is_internal, 5);
35EXFUN (Fcurrent_active_maps, 2); 46EXFUN (Fcurrent_active_maps, 2);
diff --git a/src/lisp.h b/src/lisp.h
index 7936e6a6dec..64c94647f0e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -132,9 +132,9 @@ extern int suppress_checking EXTERNALLY_VISIBLE;
132#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */ 132#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */
133#else /* ENABLE_CHECKING */ 133#else /* ENABLE_CHECKING */
134#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__) 134#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__)
135#define eassert(cond) CHECK(cond,"assertion failed: " #cond) 135#define eassert(cond) CHECK (cond, "assertion failed: " #cond)
136#else 136#else
137#define eassert(cond) CHECK(cond,"assertion failed") 137#define eassert(cond) CHECK (cond, "assertion failed")
138#endif 138#endif
139#endif /* ENABLE_CHECKING */ 139#endif /* ENABLE_CHECKING */
140 140
@@ -588,20 +588,20 @@ extern Lisp_Object make_number (EMACS_INT);
588 588
589/* Extract a value or address from a Lisp_Object. */ 589/* Extract a value or address from a Lisp_Object. */
590 590
591#define XCONS(a) (eassert (CONSP(a)),(struct Lisp_Cons *) XPNTR(a)) 591#define XCONS(a) (eassert (CONSP (a)), (struct Lisp_Cons *) XPNTR (a))
592#define XVECTOR(a) (eassert (VECTORLIKEP(a)),(struct Lisp_Vector *) XPNTR(a)) 592#define XVECTOR(a) (eassert (VECTORLIKEP (a)), (struct Lisp_Vector *) XPNTR (a))
593#define XSTRING(a) (eassert (STRINGP(a)),(struct Lisp_String *) XPNTR(a)) 593#define XSTRING(a) (eassert (STRINGP (a)), (struct Lisp_String *) XPNTR (a))
594#define XSYMBOL(a) (eassert (SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a)) 594#define XSYMBOL(a) (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XPNTR (a))
595#define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a)) 595#define XFLOAT(a) (eassert (FLOATP (a)), (struct Lisp_Float *) XPNTR (a))
596 596
597/* Misc types. */ 597/* Misc types. */
598 598
599#define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) 599#define XMISC(a) ((union Lisp_Misc *) XPNTR (a))
600#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC(a)->u_any)) 600#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC (a)->u_any))
601#define XMISCTYPE(a) (XMISCANY (a)->type) 601#define XMISCTYPE(a) (XMISCANY (a)->type)
602#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC(a)->u_marker)) 602#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC (a)->u_marker))
603#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay)) 603#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC (a)->u_overlay))
604#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value)) 604#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC (a)->u_save_value))
605 605
606/* Forwarding object types. */ 606/* Forwarding object types. */
607 607
@@ -616,14 +616,14 @@ extern Lisp_Object make_number (EMACS_INT);
616 616
617/* Pseudovector types. */ 617/* Pseudovector types. */
618 618
619#define XPROCESS(a) (eassert (PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) 619#define XPROCESS(a) (eassert (PROCESSP (a)), (struct Lisp_Process *) XPNTR (a))
620#define XWINDOW(a) (eassert (WINDOWP(a)),(struct window *) XPNTR(a)) 620#define XWINDOW(a) (eassert (WINDOWP (a)), (struct window *) XPNTR (a))
621#define XTERMINAL(a) (eassert (TERMINALP(a)),(struct terminal *) XPNTR(a)) 621#define XTERMINAL(a) (eassert (TERMINALP (a)), (struct terminal *) XPNTR (a))
622#define XSUBR(a) (eassert (SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) 622#define XSUBR(a) (eassert (SUBRP (a)), (struct Lisp_Subr *) XPNTR (a))
623#define XBUFFER(a) (eassert (BUFFERP(a)),(struct buffer *) XPNTR(a)) 623#define XBUFFER(a) (eassert (BUFFERP (a)), (struct buffer *) XPNTR (a))
624#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR(a)) 624#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR (a))
625#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR(a)) 625#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR (a))
626#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR(a)) 626#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR (a))
627 627
628/* Construct a Lisp_Object from a value or address. */ 628/* Construct a Lisp_Object from a value or address. */
629 629
@@ -641,7 +641,7 @@ extern Lisp_Object make_number (EMACS_INT);
641 641
642/* Pseudovector types. */ 642/* Pseudovector types. */
643 643
644#define XSETPVECTYPE(v, code) XSETTYPED_PVECTYPE(v, header.size, code) 644#define XSETPVECTYPE(v, code) XSETTYPED_PVECTYPE (v, header.size, code)
645#define XSETTYPED_PVECTYPE(v, size_member, code) \ 645#define XSETTYPED_PVECTYPE(v, size_member, code) \
646 ((v)->size_member |= PSEUDOVECTOR_FLAG | (code)) 646 ((v)->size_member |= PSEUDOVECTOR_FLAG | (code))
647#define XSETPVECTYPESIZE(v, code, sizeval) \ 647#define XSETPVECTYPESIZE(v, code, sizeval) \
@@ -753,8 +753,8 @@ struct Lisp_Cons
753#endif 753#endif
754 754
755/* Use these from normal code. */ 755/* Use these from normal code. */
756#define XCAR(c) LISP_MAKE_RVALUE(XCAR_AS_LVALUE(c)) 756#define XCAR(c) LISP_MAKE_RVALUE (XCAR_AS_LVALUE (c))
757#define XCDR(c) LISP_MAKE_RVALUE(XCDR_AS_LVALUE(c)) 757#define XCDR(c) LISP_MAKE_RVALUE (XCDR_AS_LVALUE (c))
758 758
759/* Use these to set the fields of a cons cell. 759/* Use these to set the fields of a cons cell.
760 760
@@ -762,8 +762,8 @@ struct Lisp_Cons
762 should not be read after 'c' is first modified. Also, neither 762 should not be read after 'c' is first modified. Also, neither
763 argument should be evaluated more than once; side effects are 763 argument should be evaluated more than once; side effects are
764 especially common in the second argument. */ 764 especially common in the second argument. */
765#define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n)) 765#define XSETCAR(c,n) (XCAR_AS_LVALUE (c) = (n))
766#define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n)) 766#define XSETCDR(c,n) (XCDR_AS_LVALUE (c) = (n))
767 767
768/* Take the car or cdr of something whose type is not known. */ 768/* Take the car or cdr of something whose type is not known. */
769#define CAR(c) \ 769#define CAR(c) \
@@ -876,14 +876,14 @@ struct Lisp_Vector
876 of the shortest vector that would hold that struct. */ 876 of the shortest vector that would hold that struct. */
877#define VECSIZE(type) ((sizeof (type) \ 877#define VECSIZE(type) ((sizeof (type) \
878 - offsetof (struct Lisp_Vector, contents[0]) \ 878 - offsetof (struct Lisp_Vector, contents[0]) \
879 + sizeof(Lisp_Object) - 1) /* round up */ \ 879 + sizeof (Lisp_Object) - 1) /* round up */ \
880 / sizeof (Lisp_Object)) 880 / sizeof (Lisp_Object))
881 881
882/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields 882/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
883 at the end and we need to compute the number of Lisp_Object fields (the 883 at the end and we need to compute the number of Lisp_Object fields (the
884 ones that the GC needs to trace). */ 884 ones that the GC needs to trace). */
885#define PSEUDOVECSIZE(type, nonlispfield) \ 885#define PSEUDOVECSIZE(type, nonlispfield) \
886 ((offsetof(type, nonlispfield) - offsetof(struct Lisp_Vector, contents[0])) \ 886 ((offsetof (type, nonlispfield) - offsetof (struct Lisp_Vector, contents[0])) \
887 / sizeof (Lisp_Object)) 887 / sizeof (Lisp_Object))
888 888
889/* A char-table is a kind of vectorlike, with contents are like a 889/* A char-table is a kind of vectorlike, with contents are like a
@@ -1603,16 +1603,6 @@ typedef unsigned char UCHAR;
1603 itself. */ 1603 itself. */
1604#define CHARACTERBITS 22 1604#define CHARACTERBITS 22
1605 1605
1606/* The maximum byte size consumed by push_key_description.
1607 All callers should assure that at least this size of memory is
1608 allocated at the place pointed by the second argument.
1609
1610 There are 6 modifiers, each consumes 2 chars.
1611 The octal form of a character code consumes
1612 (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
1613 We need one more byte for string terminator `\0'. */
1614#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
1615
1616 1606
1617/* The glyph datatype, used to represent characters on the display. 1607/* The glyph datatype, used to represent characters on the display.
1618 It consists of a char code and a face id. */ 1608 It consists of a char code and a face id. */
@@ -3262,8 +3252,6 @@ extern void force_auto_save_soon (void);
3262extern void init_keyboard (void); 3252extern void init_keyboard (void);
3263extern void syms_of_keyboard (void); 3253extern void syms_of_keyboard (void);
3264extern void keys_of_keyboard (void); 3254extern void keys_of_keyboard (void);
3265extern char *push_key_description (EMACS_INT, char *, int);
3266
3267 3255
3268/* Defined in indent.c */ 3256/* Defined in indent.c */
3269EXFUN (Fvertical_motion, 2); 3257EXFUN (Fvertical_motion, 2);
@@ -3300,7 +3288,7 @@ extern void syms_of_frame (void);
3300/* Defined in emacs.c */ 3288/* Defined in emacs.c */
3301extern char **initial_argv; 3289extern char **initial_argv;
3302extern int initial_argc; 3290extern int initial_argc;
3303#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 3291#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
3304extern int display_arg; 3292extern int display_arg;
3305#endif 3293#endif
3306extern Lisp_Object decode_env_path (const char *, const char *); 3294extern Lisp_Object decode_env_path (const char *, const char *);
@@ -3646,7 +3634,7 @@ extern void init_system_name (void);
3646/* We used to use `abs', but that clashes with system headers on some 3634/* We used to use `abs', but that clashes with system headers on some
3647 platforms, and using a name reserved by Standard C is a bad idea 3635 platforms, and using a name reserved by Standard C is a bad idea
3648 anyway. */ 3636 anyway. */
3649#if !defined(eabs) 3637#if !defined (eabs)
3650#define eabs(x) ((x) < 0 ? -(x) : (x)) 3638#define eabs(x) ((x) < 0 ? -(x) : (x))
3651#endif 3639#endif
3652 3640
diff --git a/src/lread.c b/src/lread.c
index ec65e881b0e..11c4cf8c8f4 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1284,7 +1284,7 @@ Return t if the file exists and loads successfully. */)
1284 } 1284 }
1285 1285
1286 if (! NILP (Vpurify_flag)) 1286 if (! NILP (Vpurify_flag))
1287 Vpreloaded_file_list = Fcons (Fpurecopy(file), Vpreloaded_file_list); 1287 Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
1288 1288
1289 if (NILP (nomessage) || force_load_messages) 1289 if (NILP (nomessage) || force_load_messages)
1290 { 1290 {
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 3a27cfd65d9..713598fa8b6 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -31,7 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31 31
32#ifdef __ELF__ 32#ifdef __ELF__
33 33
34#if !defined(GNU_LINUX) && !defined(__NetBSD__) 34#if !defined (GNU_LINUX) && !defined (__NetBSD__)
35#define DATA_START 0x140000000 35#define DATA_START 0x140000000
36#endif 36#endif
37 37
diff --git a/src/menu.c b/src/menu.c
index fa31c8a51c1..587f55e14db 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -364,7 +364,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
364 return; 364 return;
365 } 365 }
366 366
367#if defined(HAVE_X_WINDOWS) || defined(MSDOS) 367#if defined (HAVE_X_WINDOWS) || defined (MSDOS)
368#ifndef HAVE_BOXES 368#ifndef HAVE_BOXES
369 /* Simulate radio buttons and toggle boxes by putting a prefix in 369 /* Simulate radio buttons and toggle boxes by putting a prefix in
370 front of them. */ 370 front of them. */
@@ -977,7 +977,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data)
977 prefix = entry = Qnil; 977 prefix = entry = Qnil;
978 i = 0; 978 i = 0;
979 subprefix_stack = 979 subprefix_stack =
980 (Lisp_Object *)alloca(menu_items_used * sizeof (Lisp_Object)); 980 (Lisp_Object *)alloca (menu_items_used * sizeof (Lisp_Object));
981 981
982 while (i < menu_items_used) 982 while (i < menu_items_used)
983 { 983 {
diff --git a/src/minibuf.c b/src/minibuf.c
index ad8f3ed8b86..d3f43b06254 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -914,12 +914,11 @@ Fifth arg HIST, if non-nil, specifies a history list and optionally
914 history commands. For consistency, you should also specify that 914 history commands. For consistency, you should also specify that
915 element of the history as the value of INITIAL-CONTENTS. Positions 915 element of the history as the value of INITIAL-CONTENTS. Positions
916 are counted starting from 1 at the beginning of the list. 916 are counted starting from 1 at the beginning of the list.
917Sixth arg DEFAULT-VALUE is the default value or the list of default values. 917Sixth arg DEFAULT-VALUE is a default value or list of default values.
918 If non-nil, it is available for history commands, and as the value 918 If non-nil, it is available via history commands. If READ is
919 (or the first element of the list of default values) to return 919 non-nil, it is also the default to `read' if the user enters empty
920 if the user enters the empty string. But, unless READ is non-nil, 920 input. If READ is non-nil, `read-from-minibuffer' does NOT return
921 `read-from-minibuffer' does NOT return DEFAULT-VALUE if the user enters 921 DEFAULT-VALUE for empty input! It returns the empty string.
922 empty input! It returns the empty string.
923Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits 922Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
924 the current input method and the setting of `enable-multibyte-characters'. 923 the current input method and the setting of `enable-multibyte-characters'.
925If the variable `minibuffer-allow-text-properties' is non-nil, 924If the variable `minibuffer-allow-text-properties' is non-nil,
diff --git a/src/msdos.c b/src/msdos.c
index 3f12bc85cbe..6b6e365a165 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -296,7 +296,7 @@ mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window,
296 FOR_EACH_FRAME (tail, frame) 296 FOR_EACH_FRAME (tail, frame)
297 XFRAME (frame)->mouse_moved = 0; 297 XFRAME (frame)->mouse_moved = 0;
298 298
299 *f = SELECTED_FRAME(); 299 *f = SELECTED_FRAME ();
300 *bar_window = Qnil; 300 *bar_window = Qnil;
301 mouse_get_xy (&ix, &iy); 301 mouse_get_xy (&ix, &iy);
302 *time = event_timestamp (); 302 *time = event_timestamp ();
@@ -310,7 +310,7 @@ mouse_check_moved (void)
310 int x, y; 310 int x, y;
311 311
312 mouse_get_xy (&x, &y); 312 mouse_get_xy (&x, &y);
313 SELECTED_FRAME()->mouse_moved |= (x != mouse_last_x || y != mouse_last_y); 313 SELECTED_FRAME ()->mouse_moved |= (x != mouse_last_x || y != mouse_last_y);
314 mouse_last_x = x; 314 mouse_last_x = x;
315 mouse_last_y = y; 315 mouse_last_y = y;
316} 316}
@@ -582,7 +582,7 @@ dos_set_window_size (int *rows, int *cols)
582 /* If the dimensions changed, the mouse highlight info is invalid. */ 582 /* If the dimensions changed, the mouse highlight info is invalid. */
583 if (current_rows != *rows || current_cols != *cols) 583 if (current_rows != *rows || current_cols != *cols)
584 { 584 {
585 struct frame *f = SELECTED_FRAME(); 585 struct frame *f = SELECTED_FRAME ();
586 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 586 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
587 Lisp_Object window = hlinfo->mouse_face_window; 587 Lisp_Object window = hlinfo->mouse_face_window;
588 588
@@ -639,7 +639,7 @@ msdos_set_cursor_shape (struct frame *f, int start_line, int width)
639 /* Avoid the costly BIOS call if F isn't the currently selected 639 /* Avoid the costly BIOS call if F isn't the currently selected
640 frame. Allow for NULL as unconditionally meaning the selected 640 frame. Allow for NULL as unconditionally meaning the selected
641 frame. */ 641 frame. */
642 if (f && f != SELECTED_FRAME()) 642 if (f && f != SELECTED_FRAME ())
643 return; 643 return;
644 644
645 if (tty->termscript) 645 if (tty->termscript)
@@ -776,7 +776,7 @@ IT_ring_bell (struct frame *f)
776static void 776static void
777IT_set_face (int face) 777IT_set_face (int face)
778{ 778{
779 struct frame *sf = SELECTED_FRAME(); 779 struct frame *sf = SELECTED_FRAME ();
780 struct face *fp = FACE_FROM_ID (sf, face); 780 struct face *fp = FACE_FROM_ID (sf, face);
781 struct face *dfp = FACE_FROM_ID (sf, DEFAULT_FACE_ID); 781 struct face *dfp = FACE_FROM_ID (sf, DEFAULT_FACE_ID);
782 unsigned long fg, bg, dflt_fg, dflt_bg; 782 unsigned long fg, bg, dflt_fg, dflt_bg;
@@ -868,7 +868,7 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
868 868
869 if (str_len <= 0) return; 869 if (str_len <= 0) return;
870 870
871 sf = SELECTED_FRAME(); 871 sf = SELECTED_FRAME ();
872 872
873 /* Since faces get cached and uncached behind our back, we can't 873 /* Since faces get cached and uncached behind our back, we can't
874 rely on their indices in the cache being consistent across 874 rely on their indices in the cache being consistent across
@@ -1755,7 +1755,7 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
1755 if (redraw) 1755 if (redraw)
1756 { 1756 {
1757 face_change_count++; /* forces xdisp.c to recompute basic faces */ 1757 face_change_count++; /* forces xdisp.c to recompute basic faces */
1758 if (f == SELECTED_FRAME()) 1758 if (f == SELECTED_FRAME ())
1759 redraw_frame (f); 1759 redraw_frame (f);
1760 } 1760 }
1761} 1761}
@@ -1772,7 +1772,7 @@ internal_terminal_init (void)
1772{ 1772{
1773 static int init_needed = 1; 1773 static int init_needed = 1;
1774 char *term = getenv ("TERM"), *colors; 1774 char *term = getenv ("TERM"), *colors;
1775 struct frame *sf = SELECTED_FRAME(); 1775 struct frame *sf = SELECTED_FRAME ();
1776 struct tty_display_info *tty; 1776 struct tty_display_info *tty;
1777 1777
1778#ifdef HAVE_X_WINDOWS 1778#ifdef HAVE_X_WINDOWS
@@ -1923,7 +1923,7 @@ dos_get_saved_screen (char **screen, int *rows, int *cols)
1923void 1923void
1924check_x (void) 1924check_x (void)
1925{ 1925{
1926 if (! FRAME_MSDOS_P (SELECTED_FRAME())) 1926 if (! FRAME_MSDOS_P (SELECTED_FRAME ()))
1927 error ("Not running under a window system"); 1927 error ("Not running under a window system");
1928} 1928}
1929 1929
@@ -2442,12 +2442,12 @@ dos_rawgetc (void)
2442{ 2442{
2443 struct input_event event; 2443 struct input_event event;
2444 union REGS regs; 2444 union REGS regs;
2445 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (SELECTED_FRAME()); 2445 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (SELECTED_FRAME ());
2446 EVENT_INIT (event); 2446 EVENT_INIT (event);
2447 2447
2448#ifndef HAVE_X_WINDOWS 2448#ifndef HAVE_X_WINDOWS
2449 /* Maybe put the cursor where it should be. */ 2449 /* Maybe put the cursor where it should be. */
2450 IT_cmgoto (SELECTED_FRAME()); 2450 IT_cmgoto (SELECTED_FRAME ());
2451#endif 2451#endif
2452 2452
2453 /* The following condition is equivalent to `kbhit ()', except that 2453 /* The following condition is equivalent to `kbhit ()', except that
@@ -2692,7 +2692,7 @@ dos_rawgetc (void)
2692 /* Generate SELECT_WINDOW_EVENTs when needed. */ 2692 /* Generate SELECT_WINDOW_EVENTs when needed. */
2693 if (!NILP (Vmouse_autoselect_window)) 2693 if (!NILP (Vmouse_autoselect_window))
2694 { 2694 {
2695 mouse_window = window_from_coordinates (SELECTED_FRAME(), 2695 mouse_window = window_from_coordinates (SELECTED_FRAME (),
2696 mouse_last_x, 2696 mouse_last_x,
2697 mouse_last_y, 2697 mouse_last_y,
2698 0, 0); 2698 0, 0);
@@ -2718,7 +2718,7 @@ dos_rawgetc (void)
2718 previous_help_echo_string = help_echo_string; 2718 previous_help_echo_string = help_echo_string;
2719 help_echo_string = help_echo_object = help_echo_window = Qnil; 2719 help_echo_string = help_echo_object = help_echo_window = Qnil;
2720 help_echo_pos = -1; 2720 help_echo_pos = -1;
2721 note_mouse_highlight (SELECTED_FRAME(), mouse_last_x, mouse_last_y); 2721 note_mouse_highlight (SELECTED_FRAME (), mouse_last_x, mouse_last_y);
2722 /* If the contents of the global variable help_echo has 2722 /* If the contents of the global variable help_echo has
2723 changed, generate a HELP_EVENT. */ 2723 changed, generate a HELP_EVENT. */
2724 if (!NILP (help_echo_string) || !NILP (previous_help_echo_string)) 2724 if (!NILP (help_echo_string) || !NILP (previous_help_echo_string))
@@ -2913,7 +2913,7 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int *faces, int disp_help)
2913 int i, j, face, width, mx, my, enabled, mousehere, row, col; 2913 int i, j, face, width, mx, my, enabled, mousehere, row, col;
2914 struct glyph *text, *p; 2914 struct glyph *text, *p;
2915 const unsigned char *q; 2915 const unsigned char *q;
2916 struct frame *sf = SELECTED_FRAME(); 2916 struct frame *sf = SELECTED_FRAME ();
2917 2917
2918 menu_help_message = NULL; 2918 menu_help_message = NULL;
2919 2919
@@ -3092,7 +3092,7 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
3092 int statecount, x, y, i, b, screensize, leave, result, onepane; 3092 int statecount, x, y, i, b, screensize, leave, result, onepane;
3093 int title_faces[4]; /* face to display the menu title */ 3093 int title_faces[4]; /* face to display the menu title */
3094 int faces[4], buffers_num_deleted = 0; 3094 int faces[4], buffers_num_deleted = 0;
3095 struct frame *sf = SELECTED_FRAME(); 3095 struct frame *sf = SELECTED_FRAME ();
3096 Lisp_Object saved_echo_area_message, selectface; 3096 Lisp_Object saved_echo_area_message, selectface;
3097 3097
3098 /* Just in case we got here without a mouse present... */ 3098 /* Just in case we got here without a mouse present... */
@@ -3539,10 +3539,10 @@ init_environment (int argc, char **argv, int skip_args)
3539 /* Some lusers set TMPDIR=e:, probably because some losing 3539 /* Some lusers set TMPDIR=e:, probably because some losing
3540 programs cannot handle multiple slashes if they use e:/. 3540 programs cannot handle multiple slashes if they use e:/.
3541 e: fails in `access' below, so we interpret e: as e:/. */ 3541 e: fails in `access' below, so we interpret e: as e:/. */
3542 tmp_len = strlen(tmp); 3542 tmp_len = strlen (tmp);
3543 if (tmp[tmp_len - 1] != '/' && tmp[tmp_len - 1] != '\\') 3543 if (tmp[tmp_len - 1] != '/' && tmp[tmp_len - 1] != '\\')
3544 { 3544 {
3545 strcpy(buf, tmp); 3545 strcpy (buf, tmp);
3546 buf[tmp_len++] = '/', buf[tmp_len] = 0; 3546 buf[tmp_len++] = '/', buf[tmp_len] = 0;
3547 tmp = buf; 3547 tmp = buf;
3548 } 3548 }
diff --git a/src/nsgui.h b/src/nsgui.h
index 999dc27e310..5cc2eee3230 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -134,7 +134,7 @@ typedef struct {
134} XRectangle; 134} XRectangle;
135 135
136#ifndef __OBJC__ 136#ifndef __OBJC__
137#if defined(__LP64__) && __LP64__ 137#if defined (__LP64__) && __LP64__
138typedef double CGFloat; 138typedef double CGFloat;
139#else 139#else
140typedef float CGFloat; 140typedef float CGFloat;
diff --git a/src/nsterm.h b/src/nsterm.h
index 188ec732e82..b54e182780a 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -362,7 +362,7 @@ extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
362#endif 362#endif
363 363
364#ifndef NS_HAVE_NSINTEGER 364#ifndef NS_HAVE_NSINTEGER
365#if defined(__LP64__) && __LP64__ 365#if defined (__LP64__) && __LP64__
366typedef double CGFloat; 366typedef double CGFloat;
367typedef long NSInteger; 367typedef long NSInteger;
368typedef unsigned long NSUInteger; 368typedef unsigned long NSUInteger;
diff --git a/src/print.c b/src/print.c
index d15590a8880..1d6998d8f1a 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2029,9 +2029,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
2029 2029
2030 case Lisp_Misc_Save_Value: 2030 case Lisp_Misc_Save_Value:
2031 strout ("#<save_value ", -1, -1, printcharfun); 2031 strout ("#<save_value ", -1, -1, printcharfun);
2032 sprintf(buf, "ptr=%p int=%"pD"d", 2032 sprintf (buf, "ptr=%p int=%"pD"d",
2033 XSAVE_VALUE (obj)->pointer, 2033 XSAVE_VALUE (obj)->pointer,
2034 XSAVE_VALUE (obj)->integer); 2034 XSAVE_VALUE (obj)->integer);
2035 strout (buf, -1, -1, printcharfun); 2035 strout (buf, -1, -1, printcharfun);
2036 PRINTCHAR ('>'); 2036 PRINTCHAR ('>');
2037 break; 2037 break;
diff --git a/src/process.c b/src/process.c
index 058ad5f871f..90ad9c21681 100644
--- a/src/process.c
+++ b/src/process.c
@@ -54,16 +54,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
54#endif 54#endif
55 55
56#include <sys/ioctl.h> 56#include <sys/ioctl.h>
57#if defined(HAVE_NET_IF_H) 57#if defined (HAVE_NET_IF_H)
58#include <net/if.h> 58#include <net/if.h>
59#endif /* HAVE_NET_IF_H */ 59#endif /* HAVE_NET_IF_H */
60 60
61#if defined(HAVE_IFADDRS_H) 61#if defined (HAVE_IFADDRS_H)
62/* Must be after net/if.h */ 62/* Must be after net/if.h */
63#include <ifaddrs.h> 63#include <ifaddrs.h>
64 64
65/* We only use structs from this header when we use getifaddrs. */ 65/* We only use structs from this header when we use getifaddrs. */
66#if defined(HAVE_NET_IF_DL_H) 66#if defined (HAVE_NET_IF_DL_H)
67#include <net/if_dl.h> 67#include <net/if_dl.h>
68#endif 68#endif
69 69
@@ -256,7 +256,7 @@ static void create_pty (Lisp_Object);
256 256
257/* If we support a window system, turn on the code to poll periodically 257/* If we support a window system, turn on the code to poll periodically
258 to detect C-g. It isn't actually used when doing interrupt input. */ 258 to detect C-g. It isn't actually used when doing interrupt input. */
259#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS) 259#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS)
260#define POLL_FOR_INPUT 260#define POLL_FOR_INPUT
261#endif 261#endif
262 262
@@ -2921,7 +2921,7 @@ usage: (make-network-process &rest ARGS) */)
2921 { 2921 {
2922 /* Don't support network sockets when non-blocking mode is 2922 /* Don't support network sockets when non-blocking mode is
2923 not available, since a blocked Emacs is not useful. */ 2923 not available, since a blocked Emacs is not useful. */
2924#if !defined(O_NONBLOCK) && !defined(O_NDELAY) 2924#if !defined (O_NONBLOCK) && !defined (O_NDELAY)
2925 error ("Network servers not supported"); 2925 error ("Network servers not supported");
2926#else 2926#else
2927 is_server = 1; 2927 is_server = 1;
@@ -2975,7 +2975,7 @@ usage: (make-network-process &rest ARGS) */)
2975 tem = Fplist_get (contact, QCfamily); 2975 tem = Fplist_get (contact, QCfamily);
2976 if (NILP (tem)) 2976 if (NILP (tem))
2977 { 2977 {
2978#if defined(HAVE_GETADDRINFO) && defined(AF_INET6) 2978#if defined (HAVE_GETADDRINFO) && defined (AF_INET6)
2979 family = AF_UNSPEC; 2979 family = AF_UNSPEC;
2980#else 2980#else
2981 family = AF_INET; 2981 family = AF_INET;
@@ -3560,7 +3560,7 @@ usage: (make-network-process &rest ARGS) */)
3560} 3560}
3561 3561
3562 3562
3563#if defined(HAVE_NET_IF_H) 3563#if defined (HAVE_NET_IF_H)
3564 3564
3565#ifdef SIOCGIFCONF 3565#ifdef SIOCGIFCONF
3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, 3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0,
@@ -3631,7 +3631,7 @@ format; see the description of ADDRESS in `make-network-process'. */)
3631} 3631}
3632#endif /* SIOCGIFCONF */ 3632#endif /* SIOCGIFCONF */
3633 3633
3634#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 3634#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
3635 3635
3636struct ifflag_def { 3636struct ifflag_def {
3637 int flag_bit; 3637 int flag_bit;
@@ -3738,7 +3738,7 @@ FLAGS is the current flags of the interface. */)
3738 return Qnil; 3738 return Qnil;
3739 3739
3740 elt = Qnil; 3740 elt = Qnil;
3741#if defined(SIOCGIFFLAGS) && defined(HAVE_STRUCT_IFREQ_IFR_FLAGS) 3741#if defined (SIOCGIFFLAGS) && defined (HAVE_STRUCT_IFREQ_IFR_FLAGS)
3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0) 3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0)
3743 { 3743 {
3744 int flags = rq.ifr_flags; 3744 int flags = rq.ifr_flags;
@@ -3772,7 +3772,7 @@ FLAGS is the current flags of the interface. */)
3772 res = Fcons (elt, res); 3772 res = Fcons (elt, res);
3773 3773
3774 elt = Qnil; 3774 elt = Qnil;
3775#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_HWADDR) 3775#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0) 3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0)
3777 { 3777 {
3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3784,7 +3784,7 @@ FLAGS is the current flags of the interface. */)
3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]); 3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]);
3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr); 3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr);
3786 } 3786 }
3787#elif defined(HAVE_GETIFADDRS) && defined(LLADDR) 3787#elif defined (HAVE_GETIFADDRS) && defined (LLADDR)
3788 if (getifaddrs (&ifap) != -1) 3788 if (getifaddrs (&ifap) != -1)
3789 { 3789 {
3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3802,7 +3802,7 @@ FLAGS is the current flags of the interface. */)
3802 || sdl->sdl_alen != 6) 3802 || sdl->sdl_alen != 6)
3803 continue; 3803 continue;
3804 3804
3805 memcpy (linkaddr, LLADDR(sdl), sdl->sdl_alen); 3805 memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
3806 for (n = 0; n < 6; n++) 3806 for (n = 0; n < 6; n++)
3807 p->contents[n] = make_number (linkaddr[n]); 3807 p->contents[n] = make_number (linkaddr[n]);
3808 3808
@@ -3819,7 +3819,7 @@ FLAGS is the current flags of the interface. */)
3819 res = Fcons (elt, res); 3819 res = Fcons (elt, res);
3820 3820
3821 elt = Qnil; 3821 elt = Qnil;
3822#if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR)) 3822#if defined (SIOCGIFNETMASK) && (defined (HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined (HAVE_STRUCT_IFREQ_IFR_ADDR))
3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) 3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0)
3824 { 3824 {
3825 any = 1; 3825 any = 1;
@@ -3833,7 +3833,7 @@ FLAGS is the current flags of the interface. */)
3833 res = Fcons (elt, res); 3833 res = Fcons (elt, res);
3834 3834
3835 elt = Qnil; 3835 elt = Qnil;
3836#if defined(SIOCGIFBRDADDR) && defined(HAVE_STRUCT_IFREQ_IFR_BROADADDR) 3836#if defined (SIOCGIFBRDADDR) && defined (HAVE_STRUCT_IFREQ_IFR_BROADADDR)
3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0) 3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0)
3838 { 3838 {
3839 any = 1; 3839 any = 1;
@@ -3843,7 +3843,7 @@ FLAGS is the current flags of the interface. */)
3843 res = Fcons (elt, res); 3843 res = Fcons (elt, res);
3844 3844
3845 elt = Qnil; 3845 elt = Qnil;
3846#if defined(SIOCGIFADDR) && defined(HAVE_STRUCT_IFREQ_IFR_ADDR) 3846#if defined (SIOCGIFADDR) && defined (HAVE_STRUCT_IFREQ_IFR_ADDR)
3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0) 3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0)
3848 { 3848 {
3849 any = 1; 3849 any = 1;
@@ -3857,7 +3857,7 @@ FLAGS is the current flags of the interface. */)
3857 return any ? res : Qnil; 3857 return any ? res : Qnil;
3858} 3858}
3859#endif 3859#endif
3860#endif /* defined(HAVE_NET_IF_H) */ 3860#endif /* defined (HAVE_NET_IF_H) */
3861 3861
3862/* Turn off input and output for process PROC. */ 3862/* Turn off input and output for process PROC. */
3863 3863
@@ -7280,7 +7280,7 @@ init_process (void)
7280#ifdef HAVE_GETSOCKNAME 7280#ifdef HAVE_GETSOCKNAME
7281 ADD_SUBFEATURE (QCservice, Qt); 7281 ADD_SUBFEATURE (QCservice, Qt);
7282#endif 7282#endif
7283#if defined(O_NONBLOCK) || defined(O_NDELAY) 7283#if defined (O_NONBLOCK) || defined (O_NDELAY)
7284 ADD_SUBFEATURE (QCserver, Qt); 7284 ADD_SUBFEATURE (QCserver, Qt);
7285#endif 7285#endif
7286 7286
@@ -7472,14 +7472,14 @@ The variable takes effect when `start-process' is called. */);
7472 defsubr (&Sset_network_process_option); 7472 defsubr (&Sset_network_process_option);
7473 defsubr (&Smake_network_process); 7473 defsubr (&Smake_network_process);
7474 defsubr (&Sformat_network_address); 7474 defsubr (&Sformat_network_address);
7475#if defined(HAVE_NET_IF_H) 7475#if defined (HAVE_NET_IF_H)
7476#ifdef SIOCGIFCONF 7476#ifdef SIOCGIFCONF
7477 defsubr (&Snetwork_interface_list); 7477 defsubr (&Snetwork_interface_list);
7478#endif 7478#endif
7479#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 7479#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
7480 defsubr (&Snetwork_interface_info); 7480 defsubr (&Snetwork_interface_info);
7481#endif 7481#endif
7482#endif /* defined(HAVE_NET_IF_H) */ 7482#endif /* defined (HAVE_NET_IF_H) */
7483#ifdef DATAGRAM_SOCKETS 7483#ifdef DATAGRAM_SOCKETS
7484 defsubr (&Sprocess_datagram_address); 7484 defsubr (&Sprocess_datagram_address);
7485 defsubr (&Sset_process_datagram_address); 7485 defsubr (&Sset_process_datagram_address);
diff --git a/src/ralloc.c b/src/ralloc.c
index 64a47416202..50d322523c1 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -100,7 +100,7 @@ static int extra_bytes;
100 & ~(page_size - 1)) 100 & ~(page_size - 1))
101#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1))) 101#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1)))
102 102
103#define MEM_ALIGN sizeof(double) 103#define MEM_ALIGN sizeof (double)
104#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \ 104#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \
105 & ~(MEM_ALIGN - 1)) 105 & ~(MEM_ALIGN - 1))
106 106
@@ -468,7 +468,7 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
468 468
469 /* No need to ever call this if arena is frozen, bug somewhere! */ 469 /* No need to ever call this if arena is frozen, bug somewhere! */
470 if (r_alloc_freeze_level) 470 if (r_alloc_freeze_level)
471 abort(); 471 abort ();
472 472
473 while (b) 473 while (b)
474 { 474 {
@@ -592,7 +592,7 @@ resize_bloc (bloc_ptr bloc, SIZE size)
592 592
593 /* No need to ever call this if arena is frozen, bug somewhere! */ 593 /* No need to ever call this if arena is frozen, bug somewhere! */
594 if (r_alloc_freeze_level) 594 if (r_alloc_freeze_level)
595 abort(); 595 abort ();
596 596
597 if (bloc == NIL_BLOC || size == bloc->size) 597 if (bloc == NIL_BLOC || size == bloc->size)
598 return 1; 598 return 1;
diff --git a/src/regex.c b/src/regex.c
index d1b835621d9..8033ab9edaa 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -67,7 +67,7 @@
67# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) 67# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
68# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) 68# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
69# define regerror(err_code, preg, errbuf, errbuf_size) \ 69# define regerror(err_code, preg, errbuf, errbuf_size) \
70 __regerror(err_code, preg, errbuf, errbuf_size) 70 __regerror (err_code, preg, errbuf, errbuf_size)
71# define re_set_registers(bu, re, nu, st, en) \ 71# define re_set_registers(bu, re, nu, st, en) \
72 __re_set_registers (bu, re, nu, st, en) 72 __re_set_registers (bu, re, nu, st, en)
73# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ 73# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
@@ -376,12 +376,12 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
376# define ISUPPER(c) isupper (c) 376# define ISUPPER(c) isupper (c)
377# define ISXDIGIT(c) isxdigit (c) 377# define ISXDIGIT(c) isxdigit (c)
378 378
379# define ISWORD(c) ISALPHA(c) 379# define ISWORD(c) ISALPHA (c)
380 380
381# ifdef _tolower 381# ifdef _tolower
382# define TOLOWER(c) _tolower(c) 382# define TOLOWER(c) _tolower (c)
383# else 383# else
384# define TOLOWER(c) tolower(c) 384# define TOLOWER(c) tolower (c)
385# endif 385# endif
386 386
387/* How many characters in the character set. */ 387/* How many characters in the character set. */
@@ -2112,7 +2112,7 @@ re_iswctype (int ch, re_wctype_t cc)
2112 case RECC_WORD: return ISWORD (ch) != 0; 2112 case RECC_WORD: return ISWORD (ch) != 0;
2113 case RECC_ERROR: return false; 2113 case RECC_ERROR: return false;
2114 default: 2114 default:
2115 abort(); 2115 abort ();
2116 } 2116 }
2117} 2117}
2118 2118
@@ -2133,7 +2133,7 @@ re_wctype_to_bit (re_wctype_t cc)
2133 case RECC_ASCII: case RECC_DIGIT: case RECC_XDIGIT: case RECC_CNTRL: 2133 case RECC_ASCII: case RECC_DIGIT: case RECC_XDIGIT: case RECC_CNTRL:
2134 case RECC_BLANK: case RECC_UNIBYTE: case RECC_ERROR: return 0; 2134 case RECC_BLANK: case RECC_UNIBYTE: case RECC_ERROR: return 0;
2135 default: 2135 default:
2136 abort(); 2136 abort ();
2137 } 2137 }
2138} 2138}
2139#endif 2139#endif
@@ -4537,10 +4537,10 @@ WEAK_ALIAS (__re_search_2, re_search_2)
4537 4537
4538/* Declarations and macros for re_match_2. */ 4538/* Declarations and macros for re_match_2. */
4539 4539
4540static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, 4540static int bcmp_translate _RE_ARGS ((re_char *s1, re_char *s2,
4541 register ssize_t len, 4541 register ssize_t len,
4542 RE_TRANSLATE_TYPE translate, 4542 RE_TRANSLATE_TYPE translate,
4543 const int multibyte)); 4543 const int multibyte));
4544 4544
4545/* This converts PTR, a pointer into one of the search strings `string1' 4545/* This converts PTR, a pointer into one of the search strings `string1'
4546 and `string2' into an offset from the beginning of that string. */ 4546 and `string2' into an offset from the beginning of that string. */
@@ -6276,7 +6276,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1,
6276 goto fail; 6276 goto fail;
6277 6277
6278 default: 6278 default:
6279 abort(); 6279 abort ();
6280 } 6280 }
6281 6281
6282 assert (p >= bufp->buffer && p <= pend); 6282 assert (p >= bufp->buffer && p <= pend);
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 178d7082f72..3d78bf695bc 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -103,7 +103,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
103/* This is needed for dispnew.c:update_frame. */ 103/* This is needed for dispnew.c:update_frame. */
104#ifdef emacs 104#ifdef emacs
105#include <stdio.h> /* Get the definition of _IO_STDIO_H. */ 105#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
106#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) 106#if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM)
107/* New C libio names. */ 107/* New C libio names. */
108#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 108#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
109 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) 109 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
diff --git a/src/s/gnu.h b/src/s/gnu.h
index 8f6035b36a7..c40f764f8bf 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -37,7 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37 37
38#ifdef emacs 38#ifdef emacs
39#include <stdio.h> /* Get the definition of _IO_STDIO_H. */ 39#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
40#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) 40#if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM)
41/* new C libio names */ 41/* new C libio names */
42#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 42#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
43 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) 43 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
diff --git a/src/sound.c b/src/sound.c
index 07c7dab0ada..362c04b7d40 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1013,7 +1013,7 @@ alsa_configure (struct sound_device *sd)
1013 1013
1014 err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size); 1014 err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size);
1015 if (err < 0) 1015 if (err < 0)
1016 alsa_sound_perror("Unable to get buffer size for playback", err); 1016 alsa_sound_perror ("Unable to get buffer size for playback", err);
1017 1017
1018 err = snd_pcm_sw_params_current (p->handle, p->swparams); 1018 err = snd_pcm_sw_params_current (p->handle, p->swparams);
1019 if (err < 0) 1019 if (err < 0)
@@ -1071,7 +1071,7 @@ alsa_configure (struct sound_device *sd)
1071 snd_mixer_selem_set_playback_volume (e, chn, vol); 1071 snd_mixer_selem_set_playback_volume (e, chn, vol);
1072 } 1072 }
1073 } 1073 }
1074 snd_mixer_close(handle); 1074 snd_mixer_close (handle);
1075 } 1075 }
1076 } 1076 }
1077} 1077}
@@ -1182,7 +1182,7 @@ alsa_write (struct sound_device *sd, const char *buffer, EMACS_INT nbytes)
1182 else if (err == -ESTRPIPE) 1182 else if (err == -ESTRPIPE)
1183 { 1183 {
1184 while ((err = snd_pcm_resume (p->handle)) == -EAGAIN) 1184 while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
1185 sleep(1); /* wait until the suspend flag is released */ 1185 sleep (1); /* wait until the suspend flag is released */
1186 if (err < 0) 1186 if (err < 0)
1187 { 1187 {
1188 err = snd_pcm_prepare (p->handle); 1188 err = snd_pcm_prepare (p->handle);
diff --git a/src/sysdep.c b/src/sysdep.c
index e20bd591da1..f97a8585253 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -300,7 +300,7 @@ wait_for_termination_1 (int pid, int interruptible)
300{ 300{
301 while (1) 301 while (1)
302 { 302 {
303#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined(__GNU__) 303#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined (__GNU__)
304 /* Note that kill returns -1 even if the process is just a zombie now. 304 /* Note that kill returns -1 even if the process is just a zombie now.
305 But inevitably a SIGCHLD interrupt should be generated 305 But inevitably a SIGCHLD interrupt should be generated
306 and child_sig will do wait3 and make the process go away. */ 306 and child_sig will do wait3 and make the process go away. */
@@ -1326,7 +1326,7 @@ setup_pty (int fd)
1326 Since the latter lossage is more benign, we may as well 1326 Since the latter lossage is more benign, we may as well
1327 lose that way. -- cph */ 1327 lose that way. -- cph */
1328#ifdef FIONBIO 1328#ifdef FIONBIO
1329#if defined(UNIX98_PTYS) 1329#if defined (UNIX98_PTYS)
1330 { 1330 {
1331 int on = 1; 1331 int on = 1;
1332 ioctl (fd, FIONBIO, &on); 1332 ioctl (fd, FIONBIO, &on);
@@ -1499,7 +1499,7 @@ sys_signal (int signal_number, signal_handler_t action)
1499 after a signal that sets the interrupt_input_pending flag. */ 1499 after a signal that sets the interrupt_input_pending flag. */
1500 /* Non-interactive keyboard input goes through stdio, where we always 1500 /* Non-interactive keyboard input goes through stdio, where we always
1501 want restartable system calls. */ 1501 want restartable system calls. */
1502# if defined (BROKEN_SA_RESTART) || defined(SYNC_INPUT) 1502# if defined (BROKEN_SA_RESTART) || defined (SYNC_INPUT)
1503 if (noninteractive) 1503 if (noninteractive)
1504# endif 1504# endif
1505 new_action.sa_flags = SA_RESTART; 1505 new_action.sa_flags = SA_RESTART;
@@ -2040,7 +2040,7 @@ rename (const char *from, const char *to)
2040#endif 2040#endif
2041 2041
2042 2042
2043#if defined(HPUX) && !defined(HAVE_PERROR) 2043#if defined (HPUX) && !defined (HAVE_PERROR)
2044 2044
2045/* HPUX curses library references perror, but as far as we know 2045/* HPUX curses library references perror, but as far as we know
2046 it won't be called. Anyway this definition will do for now. */ 2046 it won't be called. Anyway this definition will do for now. */
diff --git a/src/termcap.c b/src/termcap.c
index 6f24817fa72..10c195eebe2 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -400,7 +400,7 @@ tgetent (char *bp, const char *name)
400 if (termcap_name && (*termcap_name == '\\' 400 if (termcap_name && (*termcap_name == '\\'
401 || *termcap_name == '/' 401 || *termcap_name == '/'
402 || termcap_name[1] == ':')) 402 || termcap_name[1] == ':'))
403 dostounix_filename(termcap_name); 403 dostounix_filename (termcap_name);
404#endif 404#endif
405 405
406 filep = termcap_name && valid_filename_p (termcap_name); 406 filep = termcap_name && valid_filename_p (termcap_name);
diff --git a/src/termchar.h b/src/termchar.h
index 035974a8ce6..5ca3cf305c1 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -207,6 +207,6 @@ extern struct tty_display_info *tty_list;
207 (((f)->output_method == output_termcap \ 207 (((f)->output_method == output_termcap \
208 || (f)->output_method == output_msdos_raw) \ 208 || (f)->output_method == output_msdos_raw) \
209 ? (f)->terminal->display_info.tty \ 209 ? (f)->terminal->display_info.tty \
210 : (abort(), (struct tty_display_info *) 0)) 210 : (abort (), (struct tty_display_info *) 0))
211 211
212#define CURTTY() FRAME_TTY (SELECTED_FRAME()) 212#define CURTTY() FRAME_TTY (SELECTED_FRAME())
diff --git a/src/unexaix.c b/src/unexaix.c
index df4c5b8905c..22120b0ea03 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -221,24 +221,24 @@ make_hdr (int new, int a_out,
221 } 221 }
222 222
223#define CHECK_SCNHDR(ptr, name, flags) \ 223#define CHECK_SCNHDR(ptr, name, flags) \
224 if (strcmp(s->s_name, name) == 0) { \ 224 if (strcmp (s->s_name, name) == 0) { \
225 if (s->s_flags != flags) { \ 225 if (s->s_flags != flags) { \
226 fprintf(stderr, "unexec: %lx flags where %x expected in %s section.\n", \ 226 fprintf (stderr, "unexec: %lx flags where %x expected in %s section.\n", \
227 (unsigned long)s->s_flags, flags, name); \ 227 (unsigned long)s->s_flags, flags, name); \
228 } \ 228 } \
229 if (ptr) { \ 229 if (ptr) { \
230 fprintf(stderr, "unexec: duplicate section header for section %s.\n", \ 230 fprintf (stderr, "unexec: duplicate section header for section %s.\n", \
231 name); \ 231 name); \
232 } \ 232 } \
233 ptr = s; \ 233 ptr = s; \
234 } 234 }
235 CHECK_SCNHDR(f_thdr, _TEXT, STYP_TEXT); 235 CHECK_SCNHDR (f_thdr, _TEXT, STYP_TEXT);
236 CHECK_SCNHDR(f_dhdr, _DATA, STYP_DATA); 236 CHECK_SCNHDR (f_dhdr, _DATA, STYP_DATA);
237 CHECK_SCNHDR(f_bhdr, _BSS, STYP_BSS); 237 CHECK_SCNHDR (f_bhdr, _BSS, STYP_BSS);
238 CHECK_SCNHDR(f_lhdr, _LOADER, STYP_LOADER); 238 CHECK_SCNHDR (f_lhdr, _LOADER, STYP_LOADER);
239 CHECK_SCNHDR(f_dbhdr, _DEBUG, STYP_DEBUG); 239 CHECK_SCNHDR (f_dbhdr, _DEBUG, STYP_DEBUG);
240 CHECK_SCNHDR(f_tchdr, _TYPCHK, STYP_TYPCHK); 240 CHECK_SCNHDR (f_tchdr, _TYPCHK, STYP_TYPCHK);
241 CHECK_SCNHDR(f_xhdr, _EXCEPT, STYP_EXCEPT); 241 CHECK_SCNHDR (f_xhdr, _EXCEPT, STYP_EXCEPT);
242 } 242 }
243 243
244 if (f_thdr == 0) 244 if (f_thdr == 0)
@@ -541,7 +541,7 @@ unrelocate_symbols (int new, int a_out, char *a_name, char *new_name)
541#else 541#else
542 /* This worked (and was needed) before AIX 4.2. 542 /* This worked (and was needed) before AIX 4.2.
543 I have no idea why. -- Mike */ 543 I have no idea why. -- Mike */
544 ulong d_reloc = (ulong) &_data - ALIGN(f_ohdr.data_start, 2); 544 ulong d_reloc = (ulong) &_data - ALIGN (f_ohdr.data_start, 2);
545#endif 545#endif
546 int * p; 546 int * p;
547 547
diff --git a/src/unexelf.c b/src/unexelf.c
index a169ffcb5c8..979d6dce629 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -453,7 +453,7 @@ typedef struct {
453 long cbRfdOffset; 453 long cbRfdOffset;
454 long cbExtOffset; 454 long cbExtOffset;
455} HDRR, *pHDRR; 455} HDRR, *pHDRR;
456#define cbHDRR sizeof(HDRR) 456#define cbHDRR sizeof (HDRR)
457#define hdrNil ((pHDRR)0) 457#define hdrNil ((pHDRR)0)
458#endif 458#endif
459 459
@@ -549,11 +549,11 @@ typedef struct {
549 */ 549 */
550 550
551#define OLD_SECTION_H(n) \ 551#define OLD_SECTION_H(n) \
552 (*(ElfW(Shdr) *) ((byte *) old_section_h + old_file_h->e_shentsize * (n))) 552 (*(ElfW (Shdr) *) ((byte *) old_section_h + old_file_h->e_shentsize * (n)))
553#define NEW_SECTION_H(n) \ 553#define NEW_SECTION_H(n) \
554 (*(ElfW(Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n))) 554 (*(ElfW (Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n)))
555#define NEW_PROGRAM_H(n) \ 555#define NEW_PROGRAM_H(n) \
556 (*(ElfW(Phdr) *) ((byte *) new_program_h + new_file_h->e_phentsize * (n))) 556 (*(ElfW (Phdr) *) ((byte *) new_program_h + new_file_h->e_phentsize * (n)))
557 557
558#define PATCH_INDEX(n) \ 558#define PATCH_INDEX(n) \
559 do { \ 559 do { \
@@ -563,8 +563,8 @@ typedef unsigned char byte;
563 563
564/* Round X up to a multiple of Y. */ 564/* Round X up to a multiple of Y. */
565 565
566static ElfW(Addr) 566static ElfW (Addr)
567round_up (ElfW(Addr) x, ElfW(Addr) y) 567round_up (ElfW (Addr) x, ElfW (Addr) y)
568{ 568{
569 int rem = x % y; 569 int rem = x % y;
570 if (rem == 0) 570 if (rem == 0)
@@ -581,7 +581,7 @@ round_up (ElfW(Addr) x, ElfW(Addr) y)
581 581
582static int 582static int
583find_section (const char *name, const char *section_names, const char *file_name, 583find_section (const char *name, const char *section_names, const char *file_name,
584 ElfW(Ehdr) *old_file_h, ElfW(Shdr) *old_section_h, int noerror) 584 ElfW (Ehdr) *old_file_h, ElfW (Shdr) *old_section_h, int noerror)
585{ 585{
586 int idx; 586 int idx;
587 587
@@ -635,19 +635,19 @@ unexec (const char *new_name, const char *old_name)
635 635
636 /* Pointers to the file, program and section headers for the old and 636 /* Pointers to the file, program and section headers for the old and
637 new files. */ 637 new files. */
638 ElfW(Ehdr) *old_file_h, *new_file_h; 638 ElfW (Ehdr) *old_file_h, *new_file_h;
639 ElfW(Phdr) *old_program_h, *new_program_h; 639 ElfW (Phdr) *old_program_h, *new_program_h;
640 ElfW(Shdr) *old_section_h, *new_section_h; 640 ElfW (Shdr) *old_section_h, *new_section_h;
641 641
642 /* Point to the section name table in the old file. */ 642 /* Point to the section name table in the old file. */
643 char *old_section_names; 643 char *old_section_names;
644 644
645 ElfW(Addr) old_bss_addr, new_bss_addr; 645 ElfW (Addr) old_bss_addr, new_bss_addr;
646 ElfW(Word) old_bss_size, new_data2_size; 646 ElfW (Word) old_bss_size, new_data2_size;
647 ElfW(Off) new_data2_offset; 647 ElfW (Off) new_data2_offset;
648 ElfW(Addr) new_data2_addr; 648 ElfW (Addr) new_data2_addr;
649 ElfW(Off) old_bss_offset; 649 ElfW (Off) old_bss_offset;
650 ElfW(Word) new_data2_incr; 650 ElfW (Word) new_data2_incr;
651 651
652 int n, nn; 652 int n, nn;
653 int old_bss_index, old_sbss_index, old_plt_index; 653 int old_bss_index, old_sbss_index, old_plt_index;
@@ -690,9 +690,9 @@ unexec (const char *new_name, const char *old_name)
690 690
691 /* Get pointers to headers & section names */ 691 /* Get pointers to headers & section names */
692 692
693 old_file_h = (ElfW(Ehdr) *) old_base; 693 old_file_h = (ElfW (Ehdr) *) old_base;
694 old_program_h = (ElfW(Phdr) *) ((byte *) old_base + old_file_h->e_phoff); 694 old_program_h = (ElfW (Phdr) *) ((byte *) old_base + old_file_h->e_phoff);
695 old_section_h = (ElfW(Shdr) *) ((byte *) old_base + old_file_h->e_shoff); 695 old_section_h = (ElfW (Shdr) *) ((byte *) old_base + old_file_h->e_shoff);
696 old_section_names = (char *) old_base 696 old_section_names = (char *) old_base
697 + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset; 697 + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset;
698 698
@@ -759,7 +759,7 @@ unexec (const char *new_name, const char *old_name)
759 759
760#if defined (emacs) || !defined (DEBUG) 760#if defined (emacs) || !defined (DEBUG)
761 new_break = sbrk (0); 761 new_break = sbrk (0);
762 new_bss_addr = (ElfW(Addr)) new_break; 762 new_bss_addr = (ElfW (Addr)) new_break;
763#else 763#else
764 new_bss_addr = old_bss_addr + old_bss_size + 0x1234; 764 new_bss_addr = old_bss_addr + old_bss_size + 0x1234;
765#endif 765#endif
@@ -806,9 +806,9 @@ unexec (const char *new_name, const char *old_name)
806 if (new_base == MAP_FAILED) 806 if (new_base == MAP_FAILED)
807 fatal ("Can't allocate buffer for %s\n", old_name, 0); 807 fatal ("Can't allocate buffer for %s\n", old_name, 0);
808 808
809 new_file_h = (ElfW(Ehdr) *) new_base; 809 new_file_h = (ElfW (Ehdr) *) new_base;
810 new_program_h = (ElfW(Phdr) *) ((byte *) new_base + old_file_h->e_phoff); 810 new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff);
811 new_section_h = (ElfW(Shdr) *) 811 new_section_h = (ElfW (Shdr) *)
812 ((byte *) new_base + old_file_h->e_shoff + new_data2_incr); 812 ((byte *) new_base + old_file_h->e_shoff + new_data2_incr);
813 813
814 /* Make our new file, program and section headers as copies of the 814 /* Make our new file, program and section headers as copies of the
@@ -844,7 +844,7 @@ unexec (const char *new_name, const char *old_name)
844 for (n = new_file_h->e_phnum - 1; n >= 0; n--) 844 for (n = new_file_h->e_phnum - 1; n >= 0; n--)
845 { 845 {
846 /* Compute maximum of all requirements for alignment of section. */ 846 /* Compute maximum of all requirements for alignment of section. */
847 ElfW(Word) alignment = (NEW_PROGRAM_H (n)).p_align; 847 ElfW (Word) alignment = (NEW_PROGRAM_H (n)).p_align;
848 if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) 848 if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
849 alignment = OLD_SECTION_H (old_bss_index).sh_addralign; 849 alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
850 850
@@ -1078,8 +1078,8 @@ temacs:
1078 if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG 1078 if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG
1079 && old_mdebug_index != -1) 1079 && old_mdebug_index != -1)
1080 { 1080 {
1081 int diff = NEW_SECTION_H(nn).sh_offset 1081 int diff = NEW_SECTION_H (nn).sh_offset
1082 - OLD_SECTION_H(old_mdebug_index).sh_offset; 1082 - OLD_SECTION_H (old_mdebug_index).sh_offset;
1083 HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base); 1083 HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base);
1084 1084
1085 if (diff) 1085 if (diff)
@@ -1158,9 +1158,9 @@ temacs:
1158 if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB 1158 if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB
1159 || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM) 1159 || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM)
1160 { 1160 {
1161 ElfW(Shdr) *spt = &NEW_SECTION_H (nn); 1161 ElfW (Shdr) *spt = &NEW_SECTION_H (nn);
1162 unsigned int num = spt->sh_size / spt->sh_entsize; 1162 unsigned int num = spt->sh_size / spt->sh_entsize;
1163 ElfW(Sym) * sym = (ElfW(Sym) *) (NEW_SECTION_H (nn).sh_offset + 1163 ElfW (Sym) * sym = (ElfW (Sym) *) (NEW_SECTION_H (nn).sh_offset +
1164 new_base); 1164 new_base);
1165 for (; num--; sym++) 1165 for (; num--; sym++)
1166 { 1166 {
@@ -1178,7 +1178,7 @@ temacs:
1178 for (n = new_file_h->e_shnum - 1; n; n--) 1178 for (n = new_file_h->e_shnum - 1; n; n--)
1179 { 1179 {
1180 byte *symnames; 1180 byte *symnames;
1181 ElfW(Sym) *symp, *symendp; 1181 ElfW (Sym) *symp, *symendp;
1182 1182
1183 if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM 1183 if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM
1184 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB) 1184 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB)
@@ -1186,8 +1186,8 @@ temacs:
1186 1186
1187 symnames = ((byte *) new_base 1187 symnames = ((byte *) new_base
1188 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset); 1188 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset);
1189 symp = (ElfW(Sym) *) (NEW_SECTION_H (n).sh_offset + new_base); 1189 symp = (ElfW (Sym) *) (NEW_SECTION_H (n).sh_offset + new_base);
1190 symendp = (ElfW(Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size); 1190 symendp = (ElfW (Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size);
1191 1191
1192 for (; symp < symendp; symp ++) 1192 for (; symp < symendp; symp ++)
1193 { 1193 {
@@ -1231,7 +1231,7 @@ temacs:
1231 that it can undo relocations performed by the runtime linker. */ 1231 that it can undo relocations performed by the runtime linker. */
1232 for (n = new_file_h->e_shnum - 1; n; n--) 1232 for (n = new_file_h->e_shnum - 1; n; n--)
1233 { 1233 {
1234 ElfW(Shdr) section = NEW_SECTION_H (n); 1234 ElfW (Shdr) section = NEW_SECTION_H (n);
1235 1235
1236 /* Cause a compilation error if anyone uses n instead of nn below. */ 1236 /* Cause a compilation error if anyone uses n instead of nn below. */
1237 #define n ((void) 0); 1237 #define n ((void) 0);
@@ -1263,21 +1263,21 @@ temacs:
1263 || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), 1263 || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
1264 ".data1")) 1264 ".data1"))
1265 { 1265 {
1266 ElfW(Addr) offset = (NEW_SECTION_H (nn).sh_addr 1266 ElfW (Addr) offset = (NEW_SECTION_H (nn).sh_addr
1267 - NEW_SECTION_H (nn).sh_offset); 1267 - NEW_SECTION_H (nn).sh_offset);
1268 caddr_t reloc = old_base + section.sh_offset, end; 1268 caddr_t reloc = old_base + section.sh_offset, end;
1269 for (end = reloc + section.sh_size; reloc < end; 1269 for (end = reloc + section.sh_size; reloc < end;
1270 reloc += section.sh_entsize) 1270 reloc += section.sh_entsize)
1271 { 1271 {
1272 ElfW(Addr) addr = ((ElfW(Rel) *) reloc)->r_offset - offset; 1272 ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset;
1273#ifdef __alpha__ 1273#ifdef __alpha__
1274 /* The Alpha ELF binutils currently have a bug that 1274 /* The Alpha ELF binutils currently have a bug that
1275 sometimes results in relocs that contain all 1275 sometimes results in relocs that contain all
1276 zeroes. Work around this for now... */ 1276 zeroes. Work around this for now... */
1277 if (((ElfW(Rel) *) reloc)->r_offset == 0) 1277 if (((ElfW (Rel) *) reloc)->r_offset == 0)
1278 continue; 1278 continue;
1279#endif 1279#endif
1280 memcpy (new_base + addr, old_base + addr, sizeof(ElfW(Addr))); 1280 memcpy (new_base + addr, old_base + addr, sizeof (ElfW (Addr)));
1281 } 1281 }
1282 } 1282 }
1283 break; 1283 break;
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 0751eeacb9b..a4c2f241c9f 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -478,7 +478,7 @@ find_emacs_zone_regions (void)
478{ 478{
479 num_unexec_regions = 0; 479 num_unexec_regions = 0;
480 480
481 emacs_zone->introspect->enumerator (mach_task_self(), 0, 481 emacs_zone->introspect->enumerator (mach_task_self (), 0,
482 MALLOC_PTR_REGION_RANGE_TYPE 482 MALLOC_PTR_REGION_RANGE_TYPE
483 | MALLOC_ADMIN_REGION_RANGE_TYPE, 483 | MALLOC_ADMIN_REGION_RANGE_TYPE,
484 (vm_address_t) emacs_zone, 484 (vm_address_t) emacs_zone,
diff --git a/src/unexw32.c b/src/unexw32.c
index e03fa6c9b9a..e5440c2f500 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -123,8 +123,8 @@ _start (void)
123 is finished. */ 123 is finished. */
124#ifdef HAVE_NTGUI 124#ifdef HAVE_NTGUI
125 /* determine WinMain args like crt0.c does */ 125 /* determine WinMain args like crt0.c does */
126 hinst = GetModuleHandle(NULL); 126 hinst = GetModuleHandle (NULL);
127 lpCmdLine = GetCommandLine(); 127 lpCmdLine = GetCommandLine ();
128 nCmdShow = SW_SHOWDEFAULT; 128 nCmdShow = SW_SHOWDEFAULT;
129#endif 129#endif
130 mainCRTStartup (); 130 mainCRTStartup ();
@@ -326,7 +326,7 @@ relocate_offset (DWORD offset,
326#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL)) 326#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL))
327 327
328#define RVA_TO_PTR(var,section,filedata) \ 328#define RVA_TO_PTR(var,section,filedata) \
329 ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base)) 329 ((void *)(RVA_TO_OFFSET (var,section) + (filedata).file_base))
330 330
331#define PTR_TO_OFFSET(ptr, pfile_data) \ 331#define PTR_TO_OFFSET(ptr, pfile_data) \
332 ((unsigned char *)(ptr) - (pfile_data)->file_base) 332 ((unsigned char *)(ptr) - (pfile_data)->file_base)
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 846946b41c1..fc847a295dd 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -237,7 +237,7 @@ check_memory_limits (void)
237 (*warn_function) ("Warning: memory in use exceeds lisp pointer size"); 237 (*warn_function) ("Warning: memory in use exceeds lisp pointer size");
238} 238}
239 239
240#if !defined(CANNOT_DUMP) || !defined(SYSTEM_MALLOC) 240#if !defined (CANNOT_DUMP) || !defined (SYSTEM_MALLOC)
241/* Some systems that cannot dump also cannot implement these. */ 241/* Some systems that cannot dump also cannot implement these. */
242 242
243/* 243/*
diff --git a/src/w16select.c b/src/w16select.c
index d5aae1b2e5c..cae7a6f82dd 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -110,7 +110,7 @@ identify_winoldap_version (void)
110 <> 1700H: AL = Major version number 110 <> 1700H: AL = Major version number
111 AH = Minor version number */ 111 AH = Minor version number */
112 regs.x.ax = 0x1700; 112 regs.x.ax = 0x1700;
113 __dpmi_int(0x2f, &regs); 113 __dpmi_int (0x2f, &regs);
114 return regs.x.ax; 114 return regs.x.ax;
115} 115}
116 116
@@ -133,7 +133,7 @@ open_clipboard (void)
133 Return Values AX == 0: Clipboard already open 133 Return Values AX == 0: Clipboard already open
134 <> 0: Clipboard opened */ 134 <> 0: Clipboard opened */
135 regs.x.ax = 0x1701; 135 regs.x.ax = 0x1701;
136 __dpmi_int(0x2f, &regs); 136 __dpmi_int (0x2f, &regs);
137 return regs.x.ax; 137 return regs.x.ax;
138} 138}
139 139
@@ -147,7 +147,7 @@ empty_clipboard (void)
147 Return Values AX == 0: Error occurred 147 Return Values AX == 0: Error occurred
148 <> 0: OK, Clipboard emptied */ 148 <> 0: OK, Clipboard emptied */
149 regs.x.ax = 0x1702; 149 regs.x.ax = 0x1702;
150 __dpmi_int(0x2f, &regs); 150 __dpmi_int (0x2f, &regs);
151 return regs.x.ax; 151 return regs.x.ax;
152} 152}
153 153
@@ -294,7 +294,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
294 regs.x.cx = truelen & 0xffff; 294 regs.x.cx = truelen & 0xffff;
295 regs.x.es = xbuf_addr >> 4; 295 regs.x.es = xbuf_addr >> 4;
296 regs.x.bx = xbuf_addr & 15; 296 regs.x.bx = xbuf_addr & 15;
297 __dpmi_int(0x2f, &regs); 297 __dpmi_int (0x2f, &regs);
298 298
299 free_xfer_buf (); 299 free_xfer_buf ();
300 300
@@ -320,7 +320,7 @@ get_clipboard_data_size (unsigned Format)
320 the clipboard. */ 320 the clipboard. */
321 regs.x.ax = 0x1704; 321 regs.x.ax = 0x1704;
322 regs.x.dx = Format; 322 regs.x.dx = Format;
323 __dpmi_int(0x2f, &regs); 323 __dpmi_int (0x2f, &regs);
324 return ( (((unsigned)regs.x.dx) << 16) | regs.x.ax); 324 return ( (((unsigned)regs.x.dx) << 16) | regs.x.ax);
325} 325}
326 326
@@ -353,7 +353,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
353 regs.x.dx = Format; 353 regs.x.dx = Format;
354 regs.x.es = xbuf_addr >> 4; 354 regs.x.es = xbuf_addr >> 4;
355 regs.x.bx = xbuf_addr & 15; 355 regs.x.bx = xbuf_addr & 15;
356 __dpmi_int(0x2f, &regs); 356 __dpmi_int (0x2f, &regs);
357 if (regs.x.ax != 0) 357 if (regs.x.ax != 0)
358 { 358 {
359 unsigned char null_char = '\0'; 359 unsigned char null_char = '\0';
@@ -415,7 +415,7 @@ close_clipboard (void)
415 Return Values AX == 0: Error occurred 415 Return Values AX == 0: Error occurred
416 <> 0: OK */ 416 <> 0: OK */
417 regs.x.ax = 0x1708; 417 regs.x.ax = 0x1708;
418 __dpmi_int(0x2f, &regs); 418 __dpmi_int (0x2f, &regs);
419 return regs.x.ax; 419 return regs.x.ax;
420} 420}
421 421
@@ -432,7 +432,7 @@ clipboard_compact (unsigned Size)
432 regs.x.ax = 0x1709; 432 regs.x.ax = 0x1709;
433 regs.x.si = Size >> 16; 433 regs.x.si = Size >> 16;
434 regs.x.cx = Size & 0xffff; 434 regs.x.cx = Size & 0xffff;
435 __dpmi_int(0x2f, &regs); 435 __dpmi_int (0x2f, &regs);
436 return ((unsigned)regs.x.dx << 16) | regs.x.ax; 436 return ((unsigned)regs.x.dx << 16) | regs.x.ax;
437} 437}
438 438
diff --git a/src/w32.c b/src/w32.c
index de72e180c62..91893ddfc61 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -95,7 +95,7 @@ typedef struct _MEMORY_STATUS_EX {
95#include <tlhelp32.h> 95#include <tlhelp32.h>
96#include <psapi.h> 96#include <psapi.h>
97#include <w32api.h> 97#include <w32api.h>
98#if !defined(__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15) 98#if !defined (__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15)
99/* This either is not in psapi.h or guarded by higher value of 99/* This either is not in psapi.h or guarded by higher value of
100 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15 100 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15
101 defines it in psapi.h */ 101 defines it in psapi.h */
@@ -6212,7 +6212,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6212 6212
6213 for (;;) 6213 for (;;)
6214 { 6214 {
6215 n = sys_read(fd, (char*)buf, sz); 6215 n = sys_read (fd, (char*)buf, sz);
6216 6216
6217 if (n >= 0) 6217 if (n >= 0)
6218 return n; 6218 return n;
@@ -6222,7 +6222,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6222 if (err == EWOULDBLOCK) 6222 if (err == EWOULDBLOCK)
6223 { 6223 {
6224 /* Set a small timeout. */ 6224 /* Set a small timeout. */
6225 EMACS_SET_SECS_USECS(timeout, 1, 0); 6225 EMACS_SET_SECS_USECS (timeout, 1, 0);
6226 FD_ZERO (&fdset); 6226 FD_ZERO (&fdset);
6227 FD_SET ((int)fd, &fdset); 6227 FD_SET ((int)fd, &fdset);
6228 6228
@@ -6252,7 +6252,7 @@ emacs_gnutls_push (gnutls_transport_ptr_t p, const void* buf, size_t sz)
6252{ 6252{
6253 struct Lisp_Process *process = (struct Lisp_Process *)p; 6253 struct Lisp_Process *process = (struct Lisp_Process *)p;
6254 int fd = process->outfd; 6254 int fd = process->outfd;
6255 ssize_t n = sys_write(fd, buf, sz); 6255 ssize_t n = sys_write (fd, buf, sz);
6256 6256
6257 /* 0 or more bytes written means everything went fine. */ 6257 /* 0 or more bytes written means everything went fine. */
6258 if (n >= 0) 6258 if (n >= 0)
diff --git a/src/w32term.h b/src/w32term.h
index 24a2be7dca9..710394583e4 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -68,7 +68,7 @@ struct w32_palette_entry {
68#endif 68#endif
69}; 69};
70 70
71extern void w32_regenerate_palette(struct frame *f); 71extern void w32_regenerate_palette (struct frame *f);
72 72
73 73
74/* For each display (currently only one on w32), we have a structure that 74/* For each display (currently only one on w32), we have a structure that
diff --git a/src/widget.c b/src/widget.c
index a09ec2631ad..0582718948d 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -86,12 +86,12 @@ static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry
86#undef XtOffset 86#undef XtOffset
87#define XtOffset(p_type,field) \ 87#define XtOffset(p_type,field) \
88 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0))) 88 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
89#define offset(field) XtOffset(EmacsFrame, emacs_frame.field) 89#define offset(field) XtOffset (EmacsFrame, emacs_frame.field)
90 90
91static XtResource resources[] = { 91static XtResource resources[] = {
92 {XtNgeometry, XtCGeometry, XtRString, sizeof(String), 92 {XtNgeometry, XtCGeometry, XtRString, sizeof (String),
93 offset (geometry), XtRString, (XtPointer) 0}, 93 offset (geometry), XtRString, (XtPointer) 0},
94 {XtNiconic, XtCIconic, XtRBoolean, sizeof(Boolean), 94 {XtNiconic, XtCIconic, XtRBoolean, sizeof (Boolean),
95 offset (iconic), XtRImmediate, (XtPointer) False}, 95 offset (iconic), XtRImmediate, (XtPointer) False},
96 96
97 {XtNemacsFrame, XtCEmacsFrame, XtRPointer, sizeof (XtPointer), 97 {XtNemacsFrame, XtCEmacsFrame, XtRPointer, sizeof (XtPointer),
@@ -105,12 +105,12 @@ static XtResource resources[] = {
105 offset (internal_border_width), XtRImmediate, (XtPointer)4}, 105 offset (internal_border_width), XtRImmediate, (XtPointer)4},
106 {XtNinterline, XtCInterline, XtRInt, sizeof (int), 106 {XtNinterline, XtCInterline, XtRInt, sizeof (int),
107 offset (interline), XtRImmediate, (XtPointer)0}, 107 offset (interline), XtRImmediate, (XtPointer)0},
108 {XtNfont, XtCFont, XtRFontStruct, sizeof(struct font *), 108 {XtNfont, XtCFont, XtRFontStruct, sizeof (struct font *),
109 offset(font),XtRString, DEFAULT_FACE_FONT}, 109 offset (font),XtRString, DEFAULT_FACE_FONT},
110 {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), 110 {XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
111 offset(foreground_pixel), XtRString, "XtDefaultForeground"}, 111 offset (foreground_pixel), XtRString, "XtDefaultForeground"},
112 {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), 112 {XtNcursorColor, XtCForeground, XtRPixel, sizeof (Pixel),
113 offset(cursor_color), XtRString, "XtDefaultForeground"}, 113 offset (cursor_color), XtRString, "XtDefaultForeground"},
114 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), 114 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean),
115 offset (bar_cursor), XtRImmediate, (XtPointer)0}, 115 offset (bar_cursor), XtRImmediate, (XtPointer)0},
116 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), 116 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean),
@@ -141,7 +141,7 @@ static EmacsFrameClassRec emacsFrameClassRec = {
141 { /* core fields */ 141 { /* core fields */
142 /* superclass */ &widgetClassRec, 142 /* superclass */ &widgetClassRec,
143 /* class_name */ "EmacsFrame", 143 /* class_name */ "EmacsFrame",
144 /* widget_size */ sizeof(EmacsFrameRec), 144 /* widget_size */ sizeof (EmacsFrameRec),
145 /* class_initialize */ 0, 145 /* class_initialize */ 0,
146 /* class_part_initialize */ 0, 146 /* class_part_initialize */ 0,
147 /* class_inited */ FALSE, 147 /* class_inited */ FALSE,
@@ -151,7 +151,7 @@ static EmacsFrameClassRec emacsFrameClassRec = {
151 /* actions */ 0, /*emacsFrameActionsTable*/ 151 /* actions */ 0, /*emacsFrameActionsTable*/
152 /* num_actions */ 0, /*XtNumber (emacsFrameActionsTable)*/ 152 /* num_actions */ 0, /*XtNumber (emacsFrameActionsTable)*/
153 /* resources */ resources, 153 /* resources */ resources,
154 /* resource_count */ XtNumber(resources), 154 /* resource_count */ XtNumber (resources),
155 /* xrm_class */ NULLQUARK, 155 /* xrm_class */ NULLQUARK,
156 /* compress_motion */ TRUE, 156 /* compress_motion */ TRUE,
157 /* compress_exposure */ TRUE, 157 /* compress_exposure */ TRUE,
@@ -574,7 +574,7 @@ setup_frame_gcs (EmacsFrame ew)
574 never actually get used as a background tile! 574 never actually get used as a background tile!
575 */ 575 */
576 blank_tile 576 blank_tile
577 = XCreatePixmapFromBitmapData (XtDisplay(ew), 577 = XCreatePixmapFromBitmapData (XtDisplay (ew),
578 RootWindowOfScreen (XtScreen (ew)), 578 RootWindowOfScreen (XtScreen (ew)),
579 setup_frame_cursor_bits, 2, 2, 579 setup_frame_cursor_bits, 2, 2,
580 0, 1, ew->core.depth); 580 0, 1, ew->core.depth);
diff --git a/src/window.c b/src/window.c
index 33361b5ac1d..0f5aeb0cda9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -777,7 +777,7 @@ of just the text area, use `window-inside-pixel-edges'. */)
777} 777}
778 778
779static void 779static void
780calc_absolute_offset(struct window *w, int *add_x, int *add_y) 780calc_absolute_offset (struct window *w, int *add_x, int *add_y)
781{ 781{
782 struct frame *f = XFRAME (w->frame); 782 struct frame *f = XFRAME (w->frame);
783 *add_y = f->top_pos; 783 *add_y = f->top_pos;
@@ -1684,7 +1684,7 @@ PREV-BUFFERS should be either nil or a list of <buffer, window-start,
1684window-point> triples where buffer was previously shown in WINDOW. */) 1684window-point> triples where buffer was previously shown in WINDOW. */)
1685 (Lisp_Object window, Lisp_Object prev_buffers) 1685 (Lisp_Object window, Lisp_Object prev_buffers)
1686{ 1686{
1687 return decode_any_window (window)->prev_buffers = prev_buffers; 1687 return decode_window (window)->prev_buffers = prev_buffers;
1688} 1688}
1689 1689
1690DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers, 1690DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers,
@@ -1706,7 +1706,7 @@ NEXT-BUFFERS should be either nil or a list of buffers that have been
1706recently re-shown in WINDOW. */) 1706recently re-shown in WINDOW. */)
1707 (Lisp_Object window, Lisp_Object next_buffers) 1707 (Lisp_Object window, Lisp_Object next_buffers)
1708{ 1708{
1709 return decode_any_window (window)->next_buffers = next_buffers; 1709 return decode_window (window)->next_buffers = next_buffers;
1710} 1710}
1711 1711
1712DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters, 1712DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
diff --git a/src/xdisp.c b/src/xdisp.c
index 2aa0dee02b8..241571cd9df 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -608,7 +608,7 @@ int current_mode_line_height, current_header_line_height;
608 if (CACHE) \ 608 if (CACHE) \
609 bidi_unshelve_cache (CACHE, 1); \ 609 bidi_unshelve_cache (CACHE, 1); \
610 ITCOPY = ITORIG; \ 610 ITCOPY = ITORIG; \
611 CACHE = bidi_shelve_cache(); \ 611 CACHE = bidi_shelve_cache (); \
612 } while (0) 612 } while (0)
613 613
614#define RESTORE_IT(pITORIG,pITCOPY,CACHE) \ 614#define RESTORE_IT(pITORIG,pITCOPY,CACHE) \
@@ -1921,7 +1921,7 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
1921 rectangle as wide as the glyph, but use a canonical character 1921 rectangle as wide as the glyph, but use a canonical character
1922 width instead. */ 1922 width instead. */
1923 wd = glyph->pixel_width - 1; 1923 wd = glyph->pixel_width - 1;
1924#if defined(HAVE_NTGUI) || defined(HAVE_NS) 1924#if defined (HAVE_NTGUI) || defined (HAVE_NS)
1925 wd++; /* Why? */ 1925 wd++; /* Why? */
1926#endif 1926#endif
1927 1927
@@ -3137,9 +3137,9 @@ next_overlay_change (EMACS_INT pos)
3137} 3137}
3138 3138
3139/* How many characters forward to search for a display property or 3139/* How many characters forward to search for a display property or
3140 display string. Enough for a screenful of 100 lines x 50 3140 display string. Searching too far forward makes the bidi display
3141 characters in a line. */ 3141 sluggish, especially in small windows. */
3142#define MAX_DISP_SCAN 5000 3142#define MAX_DISP_SCAN 250
3143 3143
3144/* Return the character position of a display string at or after 3144/* Return the character position of a display string at or after
3145 position specified by POSITION. If no display string exists at or 3145 position specified by POSITION. If no display string exists at or
@@ -16152,7 +16152,7 @@ try_window_reusing_current_matrix (struct window *w)
16152 if (row < bottom_row) 16152 if (row < bottom_row)
16153 { 16153 {
16154 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; 16154 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
16155 struct glyph *end = glyph + row->used[TEXT_AREA]; 16155 struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
16156 16156
16157 /* Can't use this optimization with bidi-reordered glyph 16157 /* Can't use this optimization with bidi-reordered glyph
16158 rows, unless cursor is already at point. */ 16158 rows, unless cursor is already at point. */
@@ -23479,6 +23479,7 @@ produce_stretch_glyph (struct it *it)
23479 if (FRAME_WINDOW_P (it->f)) 23479 if (FRAME_WINDOW_P (it->f))
23480 { 23480 {
23481 append_stretch_glyph (it, object, width, height, ascent); 23481 append_stretch_glyph (it, object, width, height, ascent);
23482 it->pixel_width = width;
23482 it->ascent = it->phys_ascent = ascent; 23483 it->ascent = it->phys_ascent = ascent;
23483 it->descent = it->phys_descent = height - it->ascent; 23484 it->descent = it->phys_descent = height - it->ascent;
23484 it->nglyphs = width > 0 && height > 0 ? 1 : 0; 23485 it->nglyphs = width > 0 && height > 0 ? 1 : 0;
@@ -23493,7 +23494,6 @@ produce_stretch_glyph (struct it *it)
23493 while (n--) 23494 while (n--)
23494 tty_append_glyph (it); 23495 tty_append_glyph (it);
23495 it->object = o_object; 23496 it->object = o_object;
23496 it->pixel_width = width;
23497 } 23497 }
23498 } 23498 }
23499} 23499}
diff --git a/src/xfaces.c b/src/xfaces.c
index 47d55f4da4b..9faa7c79e0b 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2579,7 +2579,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to,
2579 } 2579 }
2580 else if (EQ (keyword, QCstipple)) 2580 else if (EQ (keyword, QCstipple))
2581 { 2581 {
2582#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 2582#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
2583 Lisp_Object pixmap_p = Fbitmap_spec_p (value); 2583 Lisp_Object pixmap_p = Fbitmap_spec_p (value);
2584 if (!NILP (pixmap_p)) 2584 if (!NILP (pixmap_p))
2585 to[LFACE_STIPPLE_INDEX] = value; 2585 to[LFACE_STIPPLE_INDEX] = value;
@@ -3095,7 +3095,7 @@ FRAME 0 means change the face on all frames, and change the default
3095 } 3095 }
3096 else if (EQ (attr, QCstipple)) 3096 else if (EQ (attr, QCstipple))
3097 { 3097 {
3098#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 3098#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
3099 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) 3099 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
3100 && !NILP (value) 3100 && !NILP (value)
3101 && NILP (Fbitmap_spec_p (value))) 3101 && NILP (Fbitmap_spec_p (value)))
diff --git a/src/xfns.c b/src/xfns.c
index 194a8f063b7..998c803a7ad 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -105,7 +105,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
105#include "../lwlib/xlwmenu.h" 105#include "../lwlib/xlwmenu.h"
106#endif 106#endif
107 107
108#if !defined(NO_EDITRES) 108#if !defined (NO_EDITRES)
109#define HACK_EDITRES 109#define HACK_EDITRES
110extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); 110extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
111#endif /* not defined NO_EDITRES */ 111#endif /* not defined NO_EDITRES */
@@ -3274,7 +3274,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3274 "internalBorderWidth", "internalBorderWidth", 3274 "internalBorderWidth", "internalBorderWidth",
3275 RES_TYPE_NUMBER); 3275 RES_TYPE_NUMBER);
3276 x_default_parameter (f, parms, Qvertical_scroll_bars, 3276 x_default_parameter (f, parms, Qvertical_scroll_bars,
3277#if defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS) 3277#if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)
3278 Qright, 3278 Qright,
3279#else 3279#else
3280 Qleft, 3280 Qleft,
@@ -3443,7 +3443,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3443 BLOCK_INPUT; 3443 BLOCK_INPUT;
3444 3444
3445 /* Set machine name and pid for the purpose of window managers. */ 3445 /* Set machine name and pid for the purpose of window managers. */
3446 set_machine_and_pid_properties(f); 3446 set_machine_and_pid_properties (f);
3447 3447
3448 /* Set the WM leader property. GTK does this itself, so this is not 3448 /* Set the WM leader property. GTK does this itself, so this is not
3449 needed when using GTK. */ 3449 needed when using GTK. */
@@ -5594,7 +5594,7 @@ If FRAME is omitted or nil, it defaults to the selected frame. */)
5594 5594
5595 BLOCK_INPUT; 5595 BLOCK_INPUT;
5596 5596
5597 GCPRO2(font_param, font); 5597 GCPRO2 (font_param, font);
5598 5598
5599 XSETFONT (font, FRAME_FONT (f)); 5599 XSETFONT (font, FRAME_FONT (f));
5600 font_param = Ffont_get (font, intern (":name")); 5600 font_param = Ffont_get (font, intern (":name"));
diff --git a/src/xmenu.c b/src/xmenu.c
index b4338c1d653..cf58e85af10 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1947,7 +1947,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
1947 LWLIB_ID dialog_id; 1947 LWLIB_ID dialog_id;
1948 1948
1949 if (!FRAME_X_P (f)) 1949 if (!FRAME_X_P (f))
1950 abort(); 1950 abort ();
1951 1951
1952 dialog_id = widget_id_tick++; 1952 dialog_id = widget_id_tick++;
1953#ifdef USE_LUCID 1953#ifdef USE_LUCID
@@ -2095,7 +2095,7 @@ xdialog_show (FRAME_PTR f,
2095 /* Frame title: 'Q' = Question, 'I' = Information. 2095 /* Frame title: 'Q' = Question, 'I' = Information.
2096 Can also have 'E' = Error if, one day, we want 2096 Can also have 'E' = Error if, one day, we want
2097 a popup for errors. */ 2097 a popup for errors. */
2098 if (NILP(header)) 2098 if (NILP (header))
2099 dialog_name[0] = 'Q'; 2099 dialog_name[0] = 'Q';
2100 else 2100 else
2101 dialog_name[0] = 'I'; 2101 dialog_name[0] = 'I';
diff --git a/src/xml.c b/src/xml.c
index 8b485e73649..f0422875f7e 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -124,6 +124,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
124 124
125 if (doc != NULL) 125 if (doc != NULL)
126 { 126 {
127 /* If the document is just comments, then this should get us the
128 nodes anyway. */
127 xmlNode *n = doc->children->next; 129 xmlNode *n = doc->children->next;
128 Lisp_Object r = Qnil; 130 Lisp_Object r = Qnil;
129 131
@@ -134,9 +136,13 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
134 n = n->next; 136 n = n->next;
135 } 137 }
136 138
137 if (NILP (result)) 139 if (NILP (result)) {
138 result = r; 140 /* The document isn't just comments, so get the tree the
139 else 141 proper way. */
142 xmlNode *node = xmlDocGetRootElement (doc);
143 if (node != NULL)
144 result = make_dom (node);
145 } else
140 result = Fcons (intern ("top"), 146 result = Fcons (intern ("top"),
141 Fcons (Qnil, Fnreverse (Fcons (r, result)))); 147 Fcons (Qnil, Fnreverse (Fcons (r, result))));
142 148
diff --git a/src/xrdb.c b/src/xrdb.c
index 63f06738b98..4237ed11c53 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -602,8 +602,8 @@ x_get_resource (XrmDatabase rdb, const char *name, const char *class,
602 XrmClass classlist[100]; 602 XrmClass classlist[100];
603 XrmRepresentation type; 603 XrmRepresentation type;
604 604
605 XrmStringToNameList(name, namelist); 605 XrmStringToNameList (name, namelist);
606 XrmStringToClassList(class, classlist); 606 XrmStringToClassList (class, classlist);
607 607
608 if (XrmQGetResource (rdb, namelist, classlist, &type, &value) == True 608 if (XrmQGetResource (rdb, namelist, classlist, &type, &value) == True
609 && (type == expected_type)) 609 && (type == expected_type))
diff --git a/src/xselect.c b/src/xselect.c
index 77bda79007c..241622e81b3 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -592,7 +592,8 @@ static int x_reply_selection_request_cnt;
592#endif /* TRACE_SELECTION */ 592#endif /* TRACE_SELECTION */
593 593
594static void 594static void
595x_reply_selection_request (struct input_event *event, struct x_display_info *dpyinfo) 595x_reply_selection_request (struct input_event *event,
596 struct x_display_info *dpyinfo)
596{ 597{
597 XEvent reply_base; 598 XEvent reply_base;
598 XSelectionEvent *reply = &(reply_base.xselection); 599 XSelectionEvent *reply = &(reply_base.xselection);
@@ -1079,7 +1080,8 @@ waiting_for_other_props_on_window (Display *display, Window window)
1079 this awaited property change. */ 1080 this awaited property change. */
1080 1081
1081static struct prop_location * 1082static struct prop_location *
1082expect_property_change (Display *display, Window window, Atom property, int state) 1083expect_property_change (Display *display, Window window,
1084 Atom property, int state)
1083{ 1085{
1084 struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl); 1086 struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl);
1085 pl->identifier = ++prop_location_identifier; 1087 pl->identifier = ++prop_location_identifier;
@@ -2472,7 +2474,8 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
2472/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ 2474/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */
2473 2475
2474int 2476int
2475x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) 2477x_handle_dnd_message (struct frame *f, XClientMessageEvent *event,
2478 struct x_display_info *dpyinfo, struct input_event *bufp)
2476{ 2479{
2477 Lisp_Object vec; 2480 Lisp_Object vec;
2478 Lisp_Object frame; 2481 Lisp_Object frame;
@@ -2550,22 +2553,24 @@ the Atom is sent. If a value is a cons, it is converted to a 32 bit number
2550with the high 16 bits from the car and the lower 16 bit from the cdr. 2553with the high 16 bits from the car and the lower 16 bit from the cdr.
2551If more values than fits into the event is given, the excessive values 2554If more values than fits into the event is given, the excessive values
2552are ignored. */) 2555are ignored. */)
2553 (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Lisp_Object message_type, Lisp_Object format, Lisp_Object values) 2556 (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
2557 Lisp_Object message_type, Lisp_Object format, Lisp_Object values)
2554{ 2558{
2555 struct x_display_info *dpyinfo = check_x_display_info (display); 2559 struct x_display_info *dpyinfo = check_x_display_info (display);
2556 2560
2557 CHECK_STRING (message_type); 2561 CHECK_STRING (message_type);
2558 x_send_client_event(display, dest, from, 2562 x_send_client_event (display, dest, from,
2559 XInternAtom (dpyinfo->display, 2563 XInternAtom (dpyinfo->display,
2560 SSDATA (message_type), 2564 SSDATA (message_type),
2561 False), 2565 False),
2562 format, values); 2566 format, values);
2563 2567
2564 return Qnil; 2568 return Qnil;
2565} 2569}
2566 2570
2567void 2571void
2568x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Atom message_type, Lisp_Object format, Lisp_Object values) 2572x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
2573 Atom message_type, Lisp_Object format, Lisp_Object values)
2569{ 2574{
2570 struct x_display_info *dpyinfo = check_x_display_info (display); 2575 struct x_display_info *dpyinfo = check_x_display_info (display);
2571 Window wdest; 2576 Window wdest;
diff --git a/src/xsettings.c b/src/xsettings.c
index dadbe68b4cb..d57f3b5be81 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -812,7 +812,7 @@ init_gsettings (void)
812 g_type_init (); 812 g_type_init ();
813#endif 813#endif
814 814
815 schemas = g_settings_list_schemas(); 815 schemas = g_settings_list_schemas ();
816 if (schemas == NULL) return; 816 if (schemas == NULL) return;
817 while (! schema_found && *schemas != NULL) 817 while (! schema_found && *schemas != NULL)
818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0; 818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;
diff --git a/src/xterm.c b/src/xterm.c
index 40dbe540903..29f1a85d2c6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -103,7 +103,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
103#endif 103#endif
104 104
105#ifdef USE_X_TOOLKIT 105#ifdef USE_X_TOOLKIT
106#if !defined(NO_EDITRES) 106#if !defined (NO_EDITRES)
107#define HACK_EDITRES 107#define HACK_EDITRES
108extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); 108extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
109#endif /* not NO_EDITRES */ 109#endif /* not NO_EDITRES */
diff --git a/src/xterm.h b/src/xterm.h
index fe86a32d09f..5c9365c1269 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -682,7 +682,7 @@ enum
682#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w) 682#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w)
683#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY () 683#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY ()
684#define gtk_widget_get_preferred_size(a, ign, b) \ 684#define gtk_widget_get_preferred_size(a, ign, b) \
685 gtk_widget_size_request(a, b) 685 gtk_widget_size_request (a, b)
686#endif 686#endif
687 687
688#define GTK_WIDGET_TO_X_WIN(w) \ 688#define GTK_WIDGET_TO_X_WIN(w) \