aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2010-07-26 13:29:08 +0900
committerKenichi Handa2010-07-26 13:29:08 +0900
commit50efd41b43c9b1b540c49c53d4e7824468ec7879 (patch)
tree4a3be8d0322c537816f47a0c6450fc13495edf35 /src
parentdfe3c90fa5974e200483297e11bb889d0589b8f5 (diff)
parent7d383292d10b876efec43e77fd51c2665e912688 (diff)
downloademacs-50efd41b43c9b1b540c49c53d4e7824468ec7879.tar.gz
emacs-50efd41b43c9b1b540c49c53d4e7824468ec7879.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog100
-rw-r--r--src/ChangeLog.1018
-rw-r--r--src/ChangeLog.24
-rw-r--r--src/ChangeLog.32
-rw-r--r--src/ChangeLog.512
-rw-r--r--src/ChangeLog.62
-rw-r--r--src/ChangeLog.924
-rw-r--r--src/alloc.c10
-rw-r--r--src/callproc.c19
-rw-r--r--src/cmds.c4
-rw-r--r--src/config.in3
-rw-r--r--src/dired.c4
-rw-r--r--src/dispnew.c2
-rw-r--r--src/ecrt0.c95
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs.c10
-rw-r--r--src/font.c33
-rw-r--r--src/frame.c10
-rw-r--r--src/keyboard.c4
-rw-r--r--src/lisp.h9
-rw-r--r--src/lread.c6
-rw-r--r--src/mem-limits.h4
-rw-r--r--src/menu.c2
-rw-r--r--src/ndir.h9
-rw-r--r--src/ralloc.c33
-rw-r--r--src/sound.c2
-rw-r--r--src/syssignal.h2
-rw-r--r--src/term.c4
-rw-r--r--src/terminfo.c6
-rw-r--r--src/unexalpha.c539
-rw-r--r--src/vm-limit.c6
-rw-r--r--src/w32fns.c21
-rw-r--r--src/w32gui.h2
-rw-r--r--src/w32heap.h6
-rw-r--r--src/w32menu.c32
-rw-r--r--src/w32term.c4
-rw-r--r--src/w32term.h32
-rw-r--r--src/xfaces.c1
38 files changed, 212 insertions, 866 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7e79e65b0c9..3e750aed54b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,6 +3,94 @@
3 * font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the 3 * font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the
4 number of glyphs gets smaller than the original length. 4 number of glyphs gets smaller than the original length.
5 5
62010-07-26 Juanma Barranquero <lekktu@gmail.com>
7
8 * lread.c (unreadpure, mapatoms_1): Make static.
9
102010-07-25 Juanma Barranquero <lekktu@gmail.com>
11
12 * terminfo.c (tparam): Fix prototype of tparm.
13
142010-07-25 Andreas Schwab <schwab@linux-m68k.org>
15
16 * emacs.c (main) [PROFILING]: Use __executable_start if defined to
17 find start of text segment.
18 * dispnew.c (safe_bcopy): Don't define if HAVE___EXECUTABLE_START
19 is defined.
20
21 * callproc.c (set_initial_environment): Avoid unbalanced braces.
22
232010-07-25 Ken Brown <kbrown@cornell.edu>
24
25 * vm-limit.c (check_memory_limits): Fix previous change;
26 accidentally reverted an earlier change.
27
282010-07-25 Ken Brown <kbrown@cornell.edu>
29
30 * mem-limits.h (BSD4_2) [cygwin]: Don't define here; instead...
31 * vm-limit.c: ...add 'defined (CYGWIN)' here (Bug#6715).
32
332010-07-25 Juanma Barranquero <lekktu@gmail.com>
34
35 * callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
36 * dired.c (opendir, readdir): Fix prototypes.
37 * editfns.c (w32_get_internal_run_time): Fix prototypes.
38 * keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
39 * ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
40 (telldir): Remove declaration.
41 * ralloc.c (real_morecore, __morecore): Fix prototypes.
42 * sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
43 * syssignal.h (strsignal): Fix prototype.
44 * term.c (tparam): Fix prototype.
45 (term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
46 (term_get_fkeys): Set inside "#ifndef DOS_NT".
47 * vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
48 and __morecore.
49 * w32gui.h (XParseGeometry): Fix prototype.
50 * w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
51 * w32term.c (my_set_focus): Declare inside #if 0.
52 * w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
53 (w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
54 (drain_message_queue, get_next_msg, post_msg, parse_button)
55 (ClipboardSequence_Proc): Fix prototypes.
56 (wait_for_sync): Remove declaration.
57
582010-07-24 Juanma Barranquero <lekktu@gmail.com>
59
60 * w32fns.c (w32_to_x_color): Remove, unused.
61
622010-07-24 Andreas Schwab <schwab@linux-m68k.org>
63
64 * lisp.h: Remove leftover P_.
65
662010-07-24 Dan Nicolaescu <dann@ics.uci.edu>
67
68 * ecrt0.c, unexalpha.c: Remove files, unused.
69
702010-07-24 Andreas Schwab <schwab@linux-m68k.org>
71
72 * cmds.c (internal_self_insert): Make static.
73 * lisp.h (internal_self_insert): Remove declaration.
74
752010-07-23 Juanma Barranquero <lekktu@gmail.com>
76
77 * alloc.c (free_float):
78 * font.c [ENABLE_CHECKING] (font_match_xlfd, font_check_xlfd_parse):
79 * frame.c (delete_frame_handler):
80 * ralloc.c (reorder_bloc):
81 * w32menu.c (menubar_id_to_frame, add_left_right_boundary):
82 Remove unused static functions.
83
84 * menu.c (cleanup_popup_menu): Set inside "#ifdef HAVE_NS";
85 it is called only from NS code.
86
87 * w32term.c (my_set_focus): #ifdef away; it is called only from
88 "#ifdef 0" code.
89
90 * w32fns.c (x_edge_detection):
91 * xfaces.c (may_use_scalable_font_p):
92 Remove obsolete static declarations.
93
62010-07-20 Juanma Barranquero <lekktu@gmail.com> 942010-07-20 Juanma Barranquero <lekktu@gmail.com>
7 95
8 * alloc.c (emacs_blocked_free, emacs_blocked_malloc) 96 * alloc.c (emacs_blocked_free, emacs_blocked_malloc)
@@ -2732,7 +2820,7 @@
2732 (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef 2820 (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
2733 HAVE_XFT. 2821 HAVE_XFT.
2734 (something_changedCB): store_font_changed_event is now 2822 (something_changedCB): store_font_changed_event is now
2735 store_config_changed_event 2823 store_config_changed_event.
2736 (parse_settings): Rename from parse_xft_settings. Read 2824 (parse_settings): Rename from parse_xft_settings. Read
2737 non-xft xsettings outside #ifdef HAVE_XFT. 2825 non-xft xsettings outside #ifdef HAVE_XFT.
2738 (read_settings): Renamed from read_xft_settings. 2826 (read_settings): Renamed from read_xft_settings.
@@ -4481,7 +4569,7 @@
4481 (scroll_end_callback): Remove. 4569 (scroll_end_callback): Remove.
4482 (xg_create_scroll_bar): Add parameter end_callback, bind it to 4570 (xg_create_scroll_bar): Add parameter end_callback, bind it to
4483 button-release-event. Replace value-changed event with change-value, 4571 button-release-event. Replace value-changed event with change-value,
4484 bug #5177, 4572 bug #5177.
4485 (xg_event_is_for_scrollbar): Only return true if button is less than 4, 4573 (xg_event_is_for_scrollbar): Only return true if button is less than 4,
4486 bug #5177. 4574 bug #5177.
4487 4575
@@ -4502,7 +4590,7 @@
4502 4590
45032009-12-12 Eli Zaretskii <eliz@gnu.org> 45912009-12-12 Eli Zaretskii <eliz@gnu.org>
4504 4592
4505 * dispextern.h (struct text_pos): Use EMACS_INT; 4593 * dispextern.h (struct text_pos): Use EMACS_INT.
4506 (struct glyph): Use EMACS_INT for charpos. 4594 (struct glyph): Use EMACS_INT for charpos.
4507 (struct it): Use EMACS_INT for stop_charpos, end_charpos, 4595 (struct it): Use EMACS_INT for stop_charpos, end_charpos,
4508 region_beg_charpos, region_end_charpos, 4596 region_beg_charpos, region_end_charpos,
@@ -12068,8 +12156,8 @@
120682008-07-15 Chris Hall <chris@web.workinglinux.com> (tiny change) 121562008-07-15 Chris Hall <chris@web.workinglinux.com> (tiny change)
12069 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 12157 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12070 12158
12071 (make_initial_frame): Call init_frame_faces(f) in CANNOT_DUMP case -- 12159 * frame.c (make_initial_frame): Call init_frame_faces(f) in
12072 fix crash due to different init order. 12160 CANNOT_DUMP case -- fix crash due to different init order.
12073 12161
120742008-07-15 Adrian Robert <Adrian.B.Robert@gmail.com> 121622008-07-15 Adrian Robert <Adrian.B.Robert@gmail.com>
12075 12163
@@ -12266,7 +12354,7 @@
12266 * m/macppc.h: 12354 * m/macppc.h:
12267 * m/alpha.h: Use GNU_LINUX instead of LINUX. Reorganize conditionals. 12355 * m/alpha.h: Use GNU_LINUX instead of LINUX. Reorganize conditionals.
12268 12356
12269 * m/ibms390x.h (XINT, XUINT): Don't define, same as the default 12357 * m/ibms390x.h (XINT, XUINT): Don't define, same as the default.
12270 (SPECIAL_EMACS_INT): 12358 (SPECIAL_EMACS_INT):
12271 * m/ia64.h (SPECIAL_EMACS_INT): 12359 * m/ia64.h (SPECIAL_EMACS_INT):
12272 * m/amdx86-64.h (SPECIAL_EMACS_INT): 12360 * m/amdx86-64.h (SPECIAL_EMACS_INT):
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 24818e6770f..dd847f8a64e 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -3252,7 +3252,7 @@
32522006-07-02 Kim F. Storm <storm@cua.dk> 32522006-07-02 Kim F. Storm <storm@cua.dk>
3253 3253
3254 * xdisp.c (display_tool_bar_line): Skip glyphs which are too big 3254 * xdisp.c (display_tool_bar_line): Skip glyphs which are too big
3255 to ever fit the tool-bar, 3255 to ever fit the tool-bar.
3256 (MAX_FRAME_TOOL_BAR_HEIGHT): New macro. 3256 (MAX_FRAME_TOOL_BAR_HEIGHT): New macro.
3257 (tool_bar_lines_needed): Use unused mode-line row as temp_row. 3257 (tool_bar_lines_needed): Use unused mode-line row as temp_row.
3258 (redisplay_tool_bar): Only clear desired matrix if we actually 3258 (redisplay_tool_bar): Only clear desired matrix if we actually
@@ -7869,7 +7869,7 @@
7869 7869
78702005-07-19 Juanma Barranquero <lekktu@gmail.com> 78702005-07-19 Juanma Barranquero <lekktu@gmail.com>
7871 7871
7872 * eval.c (Fprog2, Fcalled_interactively_p), 7872 * eval.c (Fprog2, Fcalled_interactively_p)
7873 (syms_of_eval) <debug-on-quit>: Doc fixes. 7873 (syms_of_eval) <debug-on-quit>: Doc fixes.
7874 (syms_of_eval) <max-specpdl-size>: 7874 (syms_of_eval) <max-specpdl-size>:
7875 (Finteractive_p): Fix typos in docstrings. 7875 (Finteractive_p): Fix typos in docstrings.
@@ -11250,7 +11250,7 @@
112502004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 112502004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11251 11251
11252 * macterm.c (endif, x_font_name_to_mac_font_name): 11252 * macterm.c (endif, x_font_name_to_mac_font_name):
11253 Use maccentraleurroman instead of maccentraleuropean 11253 Use maccentraleurroman instead of maccentraleuropean.
11254 (mac_c_string_match, mac_do_list_fonts): Speed up font search by 11254 (mac_c_string_match, mac_do_list_fonts): Speed up font search by
11255 quickly finding a specific font without needing regexps. 11255 quickly finding a specific font without needing regexps.
11256 11256
@@ -12477,7 +12477,7 @@
12477 12477
12478 * gtkutil.h (xg_frame_cleared): Remove. 12478 * gtkutil.h (xg_frame_cleared): Remove.
12479 12479
12480 * xterm.c (x_clear_frame): Remove call to xg_frame_cleared 12480 * xterm.c (x_clear_frame): Remove call to xg_frame_cleared.
12481 (x_scroll_bar_create, XTset_vertical_scroll_bar): 12481 (x_scroll_bar_create, XTset_vertical_scroll_bar):
12482 Remove arguments left and width to xg_update_scrollbar_pos. 12482 Remove arguments left and width to xg_update_scrollbar_pos.
12483 (XTset_vertical_scroll_bar): Do x_clear_area for USE_GTK also. 12483 (XTset_vertical_scroll_bar): Do x_clear_area for USE_GTK also.
@@ -13017,9 +13017,9 @@
13017 13017
13018 * macmenu.c (ENCODE_MENU_STRING): Added to handle multibyte 13018 * macmenu.c (ENCODE_MENU_STRING): Added to handle multibyte
13019 strings in menu items. 13019 strings in menu items.
13020 (single_submenu): Use ENCODE_MENU_STRING 13020 (single_submenu): Use ENCODE_MENU_STRING.
13021 (mac_menu_show): Use ENCODE_MENU_STRING. Reset grabbed because 13021 (mac_menu_show): Use ENCODE_MENU_STRING. Reset grabbed because
13022 button release isn't passed to event loop 13022 button release isn't passed to event loop.
13023 (add_menu_item): Use SetMenuItemWithCFString. 13023 (add_menu_item): Use SetMenuItemWithCFString.
13024 13024
130252004-08-26 Steven Tamm <steventamm@mac.com> 130252004-08-26 Steven Tamm <steventamm@mac.com>
@@ -15407,7 +15407,7 @@
15407 (Fxw_display_color_p): Use dpyinfo->color_p. 15407 (Fxw_display_color_p): Use dpyinfo->color_p.
15408 (Fx_display_grayscale_p, Fx_display_planes): Don't use 15408 (Fx_display_grayscale_p, Fx_display_planes): Don't use
15409 dpyinfo->n_cbits. 15409 dpyinfo->n_cbits.
15410 (Fx_display_color_cells): Use dpyinfo->n_planes; 15410 (Fx_display_color_cells): Use dpyinfo->n_planes.
15411 (QCmatrix, QCcolor_adjustment, QCmask, Qemboss, Qedge_detection) 15411 (QCmatrix, QCcolor_adjustment, QCmask, Qemboss, Qedge_detection)
15412 (Qheuristic, cross_disabled_images, emboss_matrix) 15412 (Qheuristic, cross_disabled_images, emboss_matrix)
15413 (laplace_matrix): New variables (from xfns.c). 15413 (laplace_matrix): New variables (from xfns.c).
@@ -16414,7 +16414,7 @@
16414 (append_glyph, append_composite_glyph, produce_image_glyph) 16414 (append_glyph, append_composite_glyph, produce_image_glyph)
16415 (append_stretch_glyph): Set glyph's ascent and descent. 16415 (append_stretch_glyph): Set glyph's ascent and descent.
16416 (on_hot_spot_p): New function to check if position is inside an 16416 (on_hot_spot_p): New function to check if position is inside an
16417 rectangular, circular, or polygon-shaped image hot-spot, 16417 rectangular, circular, or polygon-shaped image hot-spot.
16418 (find_hot_spot): New function to search for image hot-spot. 16418 (find_hot_spot): New function to search for image hot-spot.
16419 (Flookup_image_map): New defun to search for image hot-spot. 16419 (Flookup_image_map): New defun to search for image hot-spot.
16420 (define_frame_cursor1): New aux function to determine frame 16420 (define_frame_cursor1): New aux function to determine frame
@@ -18570,7 +18570,7 @@
18570 change/simplify relevant callers. 18570 change/simplify relevant callers.
18571 (x_y_to_hpos_vpos): Adapt to per-window fringes and scroll bars, 18571 (x_y_to_hpos_vpos): Adapt to per-window fringes and scroll bars,
18572 and new fringe vs. display margin position. 18572 and new fringe vs. display margin position.
18573 Use window_box_left_offset and window_box_right_offset 18573 Use window_box_left_offset and window_box_right_offset.
18574 (get_glyph_string_clip_rect): Adapt to per-window fringes and 18574 (get_glyph_string_clip_rect): Adapt to per-window fringes and
18575 scroll bars, and new fringe vs. display margin position. 18575 scroll bars, and new fringe vs. display margin position.
18576 Use WINDOW_LEFT_EDGE_X and WINDOW_TOTAL_WIDTH. 18576 Use WINDOW_LEFT_EDGE_X and WINDOW_TOTAL_WIDTH.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index 7313f56ae8e..41e280a71b3 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -3102,9 +3102,9 @@
3102 [So (-259 . (259 . x)) means to format x -exactly- 259 chars wide.] 3102 [So (-259 . (259 . x)) means to format x -exactly- 259 chars wide.]
3103 3103
3104 * dispnew.c (Fding): 3104 * dispnew.c (Fding):
3105 Do not terminate macro-definition if given an argument 3105 Do not terminate macro-definition if given an argument.
3106 (This is so things like asynchronous process notifications 3106 (This is so things like asynchronous process notifications
3107 can beep but not screw) 3107 can beep but not screw.)
3108 3108
31091986-11-10 Richard M. Stallman (rms@prep) 31091986-11-10 Richard M. Stallman (rms@prep)
3110 3110
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index 241019b51c7..e3c5ab70f66 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -6993,7 +6993,7 @@
6993 6993
6994 * keyboard.c (Qvertical_split): Renamed to `vertical-line', 6994 * keyboard.c (Qvertical_split): Renamed to `vertical-line',
6995 since the window arrangement is actually referred to as a 6995 since the window arrangement is actually referred to as a
6996 `horizontal split.' 6996 `horizontal split'.
6997 (make_lispy_event, make_lispy_movement, syms_of_keyboard): Uses 6997 (make_lispy_event, make_lispy_movement, syms_of_keyboard): Uses
6998 renamed here. 6998 renamed here.
6999 * keyboard.h (Qvertical_split): Extern declaration changed here. 6999 * keyboard.h (Qvertical_split): Extern declaration changed here.
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index e4991971461..f27186079ac 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -387,7 +387,7 @@
387 based on frame name and icon_name fields. 387 based on frame name and icon_name fields.
388 (x_set_icon_name): New function. 388 (x_set_icon_name): New function.
389 (x_icon): Call x_text_icon. 389 (x_icon): Call x_text_icon.
390 (x_set_name): Look at icon_name field when setting the icon name, 390 (x_set_name): Look at icon_name field when setting the icon name.
391 (x_frame_parms): Add icon-name. 391 (x_frame_parms): Add icon-name.
392 (syms_of_xfns): Set up Qicon_name. 392 (syms_of_xfns): Set up Qicon_name.
393 393
@@ -903,7 +903,7 @@
903 903
9041995-05-04 Richard Stallman <rms@mole.gnu.ai.mit.edu> 9041995-05-04 Richard Stallman <rms@mole.gnu.ai.mit.edu>
905 905
906 * s/freebsd.h: (GETPGRP_NO_ARG): Defined 906 * s/freebsd.h (GETPGRP_NO_ARG): Define.
907 (HAVE_GETPAGESIZE): Definition deleted. 907 (HAVE_GETPAGESIZE): Definition deleted.
908 908
909 * data.c (store_symval_forwarding): Error if value out of range 909 * data.c (store_symval_forwarding): Error if value out of range
@@ -1308,7 +1308,7 @@
1308 1308
1309 * ntinevt.c (do_mouse_event): Use XSETFASTINT. 1309 * ntinevt.c (do_mouse_event): Use XSETFASTINT.
1310 (SET_FRAME): Undefined. 1310 (SET_FRAME): Undefined.
1311 (select): Renamed to sys_select to correspond to routine in sysdep.c 1311 (select): Renamed to sys_select to correspond to routine in sysdep.c.
1312 (sys_select): Support struct timeval. 1312 (sys_select): Support struct timeval.
1313 (key_event): Support German keyboard. 1313 (key_event): Support German keyboard.
1314 Replace SET_FRAME with XSETFRAME. 1314 Replace SET_FRAME with XSETFRAME.
@@ -4217,7 +4217,7 @@
4217 4217
4218 * process.c: Handle multiple keyboard input descriptors. 4218 * process.c: Handle multiple keyboard input descriptors.
4219 (non_keyboard_wait_mask): New variable. 4219 (non_keyboard_wait_mask): New variable.
4220 (Fset_process_filter): Update non_keyboard_wait_mask 4220 (Fset_process_filter): Update non_keyboard_wait_mask.
4221 (create_process, Fopen_network_stream, deactivate_process): 4221 (create_process, Fopen_network_stream, deactivate_process):
4222 (init_process, sigchld_handler): Likewise. 4222 (init_process, sigchld_handler): Likewise.
4223 (wait_reading_process_input): Maybe use non_keyboard_wait_mask. 4223 (wait_reading_process_input): Maybe use non_keyboard_wait_mask.
@@ -4456,7 +4456,7 @@
4456 4456
4457 * xfns.c: Use FRAME_X_DISPLAY instead of x_current_display 4457 * xfns.c: Use FRAME_X_DISPLAY instead of x_current_display
4458 and XDISPLAY. 4458 and XDISPLAY.
4459 (x_in_use): New variable, 4459 (x_in_use): New variable.
4460 (check_x, using_x_p): Test x_in_use. 4460 (check_x, using_x_p): Test x_in_use.
4461 (Fx_open_connection): Set x_in_use. 4461 (Fx_open_connection): Set x_in_use.
4462 (check_x_frame): New function. 4462 (check_x_frame): New function.
@@ -5953,7 +5953,7 @@
59531994-09-03 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) 59531994-09-03 Kaveh R. Ghazi (ghazi@noc.rutgers.edu)
5954 5954
5955 * m/delta88k.h [__GNUC__] (HAVE_ALLOCA): Defined. 5955 * m/delta88k.h [__GNUC__] (HAVE_ALLOCA): Defined.
5956 [__GNUC__] (C_ALLOCA): Add #undef 5956 [__GNUC__] (C_ALLOCA): Add #undef.
5957 (LIB_X11_LIB): Add #undef. 5957 (LIB_X11_LIB): Add #undef.
5958 (HAVE_TERMIOS): Defined. 5958 (HAVE_TERMIOS): Defined.
5959 (HAVE_TERMIO): Add #undef. 5959 (HAVE_TERMIO): Add #undef.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 6c7d04a531e..3b1bdbffabc 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -2830,7 +2830,7 @@
2830 * dosfns.c (Fint86, Fdos_memget, Fdos_memput, Fmsdos_set_keyboard): 2830 * dosfns.c (Fint86, Fdos_memget, Fdos_memput, Fmsdos_set_keyboard):
2831 Harmonize arguments with documentation. 2831 Harmonize arguments with documentation.
2832 2832
2833 * editfns.c (Fchar_to_string, Fstring_to_char, Fgoto_char, Fencode_time, 2833 * editfns.c (Fchar_to_string, Fstring_to_char, Fgoto_char, Fencode_time)
2834 (Finsert_char, Fbuffer_substring, Fbuffer_substring_no_properties) 2834 (Finsert_char, Fbuffer_substring, Fbuffer_substring_no_properties)
2835 (Finsert_buffer_substring, Fdelete_region, Fnarrow_to_region): 2835 (Finsert_buffer_substring, Fdelete_region, Fnarrow_to_region):
2836 Harmonize arguments with documentation. 2836 Harmonize arguments with documentation.
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 6e53a39ac93..9146a6465a8 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -1126,7 +1126,7 @@
1126 1126
1127 * xterm.c (note_mouse_highlight) <help-echo>: When looking for 1127 * xterm.c (note_mouse_highlight) <help-echo>: When looking for
1128 help-echo for a string which doesn't have help-echo itself, use 1128 help-echo for a string which doesn't have help-echo itself, use
1129 get-char-property to obtain the help-echo from the string's buffer 1129 get-char-property to obtain the help-echo from the string's buffer.
1130 (note_mouse_highlight) <mouse-face>: When on a string that doesn't 1130 (note_mouse_highlight) <mouse-face>: When on a string that doesn't
1131 have mouse-face, look ``under'' the string for mouse-face from an 1131 have mouse-face, look ``under'' the string for mouse-face from an
1132 overlay. 1132 overlay.
@@ -3119,7 +3119,7 @@
3119 * w32fns.c (Fx_show_tip): Fix calls to make_number. 3119 * w32fns.c (Fx_show_tip): Fix calls to make_number.
3120 (x_set_font): If font hasn't changed, avoid recomputing 3120 (x_set_font): If font hasn't changed, avoid recomputing
3121 faces and other things. 3121 faces and other things.
3122 (x_set_tool_bar_lines): Do nothing if frame is minibuffer-only, 3122 (x_set_tool_bar_lines): Do nothing if frame is minibuffer-only.
3123 (Fx_create_frame): Add the tool bar height to the frame height. 3123 (Fx_create_frame): Add the tool bar height to the frame height.
3124 (x_create_tip_frame): Prevent changing the tooltip's 3124 (x_create_tip_frame): Prevent changing the tooltip's
3125 background color by specifying a color for the default font 3125 background color by specifying a color for the default font
@@ -4887,7 +4887,7 @@
4887 4887
4888 * md5.c: Delay include of md5.h until after namespace cleaning. 4888 * md5.c: Delay include of md5.h until after namespace cleaning.
4889 4889
4890 * makefile.w32-in (fns.o): Depend on md5.h 4890 * makefile.w32-in (fns.o): Depend on md5.h.
4891 (md5.o): New target. 4891 (md5.o): New target.
4892 (sunfns.o): Remove. 4892 (sunfns.o): Remove.
4893 4893
@@ -7254,7 +7254,7 @@
7254 7254
7255 * charset.h (MAKE_CHAR): Be sure to set MSB of C1 to 0. 7255 * charset.h (MAKE_CHAR): Be sure to set MSB of C1 to 0.
7256 7256
7257 * charset.c: Include composite.h 7257 * charset.c: Include composite.h.
7258 (lisp_string_width): New function. 7258 (lisp_string_width): New function.
7259 (Fstring_width): Call lisp_string_width instead of strwidth. 7259 (Fstring_width): Call lisp_string_width instead of strwidth.
7260 7260
@@ -7333,7 +7333,7 @@
7333 7333
7334 * s/ms-w32.h (ORDINARY_LINK): New define. 7334 * s/ms-w32.h (ORDINARY_LINK): New define.
7335 7335
7336 * w32.c (_ANONYMOUS_UNION) [__GNUC__]: New define 7336 * w32.c (_ANONYMOUS_UNION) [__GNUC__]: New define.
7337 (_ANONYMOUS_STRUCT) [__GNUC__]: New define. 7337 (_ANONYMOUS_STRUCT) [__GNUC__]: New define.
7338 7338
7339 * makefile.w32-in (clean): Don't delete config.h and epaths.h. 7339 * makefile.w32-in (clean): Don't delete config.h and epaths.h.
@@ -8409,7 +8409,7 @@
8409 (encode_coding_iso2022): New local variable safe_chars. Check 8409 (encode_coding_iso2022): New local variable safe_chars. Check
8410 unsafe chars. 8410 unsafe chars.
8411 (setup_coding_system): Delete the code to initialize 8411 (setup_coding_system): Delete the code to initialize
8412 coding->safe_charses 8412 coding->safe_charses.
8413 (intersection, find_safe_codings): New functions. 8413 (intersection, find_safe_codings): New functions.
8414 (Ffind_coding_systems_region_internal): New function. 8414 (Ffind_coding_systems_region_internal): New function.
8415 (syms_of_coding): Defsubr it. Initialize Qsafe_chars, 8415 (syms_of_coding): Defsubr it. Initialize Qsafe_chars,
@@ -8729,7 +8729,7 @@
8729 * w32term.c (help_echo_object, help_echo_pos): New variables. 8729 * w32term.c (help_echo_object, help_echo_pos): New variables.
8730 (note_mode_line_highlight): Store additional information about the 8730 (note_mode_line_highlight): Store additional information about the
8731 help-echo in help_echo_object and help_echo_pos. Check both 8731 help-echo in help_echo_object and help_echo_pos. Check both
8732 `local-map' and `keymap' properties for changing the cursor 8732 `local-map' and `keymap' properties for changing the cursor.
8733 (note_mouse_highlight): Store additional information about the 8733 (note_mouse_highlight): Store additional information about the
8734 help-echo in help_echo_object and help_echo_pos. 8734 help-echo in help_echo_object and help_echo_pos.
8735 (note_tool_bar_highlight): Set help_echo_object to nil and 8735 (note_tool_bar_highlight): Set help_echo_object to nil and
@@ -8797,7 +8797,7 @@
8797 * xterm.c (help_echo_object, help_echo_pos): New variables. 8797 * xterm.c (help_echo_object, help_echo_pos): New variables.
8798 (note_mode_line_highlight): Store additional information about the 8798 (note_mode_line_highlight): Store additional information about the
8799 help-echo in help_echo_object and help_echo_pos. Check both 8799 help-echo in help_echo_object and help_echo_pos. Check both
8800 `local-map' and `keymap' properties for changing the cursor 8800 `local-map' and `keymap' properties for changing the cursor.
8801 (note_mouse_highlight): Store additional information about the 8801 (note_mouse_highlight): Store additional information about the
8802 help-echo in help_echo_object and help_echo_pos. 8802 help-echo in help_echo_object and help_echo_pos.
8803 (note_tool_bar_highlight): Set help_echo_object to nil and 8803 (note_tool_bar_highlight): Set help_echo_object to nil and
@@ -11979,7 +11979,7 @@
11979 (detect_coding_utf_8): New function. 11979 (detect_coding_utf_8): New function.
11980 (UTF_16_INVALID_P, UTF_16_HIGH_SURROGATE_P 11980 (UTF_16_INVALID_P, UTF_16_HIGH_SURROGATE_P
11981 UTF_16_LOW_SURROGATE_P): New macros. 11981 UTF_16_LOW_SURROGATE_P): New macros.
11982 (detect_coding_utf_16): New function 11982 (detect_coding_utf_16): New function.
11983 (detect_coding_mask): When priorities are specified, skip any 11983 (detect_coding_mask): When priorities are specified, skip any
11984 categories that have `nil' coding-system. Fix bug of returning 11984 categories that have `nil' coding-system. Fix bug of returning
11985 wrong mask when PRIORITIES is specified and detect_coding_XXX() 11985 wrong mask when PRIORITIES is specified and detect_coding_XXX()
@@ -12222,7 +12222,7 @@
12222 12222
12223 * makefile.nt: Add atimer.h to dependencies. 12223 * makefile.nt: Add atimer.h to dependencies.
12224 * w32.c (init_environment): Set Vw32_num_mouse_buttons here. 12224 * w32.c (init_environment): Set Vw32_num_mouse_buttons here.
12225 * w32console.c: Only disable window system features for dispextern.h 12225 * w32console.c: Only disable window system features for dispextern.h.
12226 (initialize_w32_display): Build a display info for the console. 12226 (initialize_w32_display): Build a display info for the console.
12227 * w32faces.c (tty_defined_color): Apply xfaces.c change from 02-17. 12227 * w32faces.c (tty_defined_color): Apply xfaces.c change from 02-17.
12228 * w32fns.c (w32_wnd_proc) [WM_LBUTTON_DOWN, WM_RBUTTON_DOWN, 12228 * w32fns.c (w32_wnd_proc) [WM_LBUTTON_DOWN, WM_RBUTTON_DOWN,
@@ -12825,7 +12825,7 @@
12825 (FRAME_XIM): Removed. 12825 (FRAME_XIM): Removed.
12826 12826
12827 * xfns.c (supported_styles): New variable. 12827 * xfns.c (supported_styles): New variable.
12828 (DEFAULT_STYLE, DEFAULT_FONT): New macros 12828 (DEFAULT_STYLE, DEFAULT_FONT): New macros.
12829 (xic_create_xfontset, best_style, xic_create_frame) 12829 (xic_create_xfontset, best_style, xic_create_frame)
12830 (xic_destroy_frame, xic_set_preeditarea, xic_set_statusarea) 12830 (xic_destroy_frame, xic_set_preeditarea, xic_set_statusarea)
12831 (xic_set_xfontset): New functions. 12831 (xic_set_xfontset): New functions.
@@ -13156,7 +13156,7 @@
13156 (GC_STRING_BYTES, GC_STRING_CHARS): New macros. 13156 (GC_STRING_BYTES, GC_STRING_CHARS): New macros.
13157 (DONT_COPY_FLAG): Removed. 13157 (DONT_COPY_FLAG): Removed.
13158 (SBLOCK_SIZE, LARGE_STRING_BYTES): New macros. 13158 (SBLOCK_SIZE, LARGE_STRING_BYTES): New macros.
13159 (struct sdata, struct sblock): New 13159 (struct sdata, struct sblock): New.
13160 (struct string_block): Rewritten. 13160 (struct string_block): Rewritten.
13161 (STRINGS_IN_STRING_BLOCK): New macro. 13161 (STRINGS_IN_STRING_BLOCK): New macro.
13162 (oldest_sblock, current_sblock, total_strings, total_free_strings) 13162 (oldest_sblock, current_sblock, total_strings, total_free_strings)
diff --git a/src/alloc.c b/src/alloc.c
index 2ce74f97ff7..2ddec3dbe48 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2538,16 +2538,6 @@ init_float (void)
2538} 2538}
2539 2539
2540 2540
2541/* Explicitly free a float cell by putting it on the free-list. */
2542
2543static void
2544free_float (struct Lisp_Float *ptr)
2545{
2546 ptr->u.chain = float_free_list;
2547 float_free_list = ptr;
2548}
2549
2550
2551/* Return a new float object with value FLOAT_VALUE. */ 2541/* Return a new float object with value FLOAT_VALUE. */
2552 2542
2553Lisp_Object 2543Lisp_Object
diff --git a/src/callproc.c b/src/callproc.c
index 4286ab1ae29..7019d741b34 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -984,7 +984,9 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
984 RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); 984 RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args)));
985} 985}
986 986
987#ifndef WINDOWSNT
987static int relocate_fd (int fd, int minfd); 988static int relocate_fd (int fd, int minfd);
989#endif
988 990
989static char ** 991static char **
990add_env (char **env, char **new_env, char *string) 992add_env (char **env, char **new_env, char *string)
@@ -1113,7 +1115,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1113 char **p, **q; 1115 char **p, **q;
1114 register int new_length; 1116 register int new_length;
1115 Lisp_Object display = Qnil; 1117 Lisp_Object display = Qnil;
1116 1118
1117 new_length = 0; 1119 new_length = 0;
1118 1120
1119 for (tem = Vprocess_environment; 1121 for (tem = Vprocess_environment;
@@ -1149,7 +1151,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1149 but with corrected value. */ 1151 but with corrected value. */
1150 if (egetenv ("PWD")) 1152 if (egetenv ("PWD"))
1151 *new_env++ = pwd_var; 1153 *new_env++ = pwd_var;
1152 1154
1153 if (STRINGP (display)) 1155 if (STRINGP (display))
1154 { 1156 {
1155 int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1; 1157 int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1;
@@ -1179,7 +1181,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1179 } 1181 }
1180 } 1182 }
1181 1183
1182 1184
1183#ifdef WINDOWSNT 1185#ifdef WINDOWSNT
1184 prepare_standard_handles (in, out, err, handles); 1186 prepare_standard_handles (in, out, err, handles);
1185 set_process_dir (SDATA (current_dir)); 1187 set_process_dir (SDATA (current_dir));
@@ -1265,6 +1267,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1265#endif /* not MSDOS */ 1267#endif /* not MSDOS */
1266} 1268}
1267 1269
1270#ifndef WINDOWSNT
1268/* Move the file descriptor FD so that its number is not less than MINFD. 1271/* Move the file descriptor FD so that its number is not less than MINFD.
1269 If the file descriptor is moved at all, the original is freed. */ 1272 If the file descriptor is moved at all, the original is freed. */
1270static int 1273static int
@@ -1298,6 +1301,7 @@ relocate_fd (int fd, int minfd)
1298 return new; 1301 return new;
1299 } 1302 }
1300} 1303}
1304#endif /* not WINDOWSNT */
1301 1305
1302static int 1306static int
1303getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, 1307getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen,
@@ -1526,13 +1530,12 @@ void
1526set_initial_environment (void) 1530set_initial_environment (void)
1527{ 1531{
1528 register char **envp; 1532 register char **envp;
1529#ifndef CANNOT_DUMP 1533#ifdef CANNOT_DUMP
1530 if (initialized) 1534 Vprocess_environment = Qnil;
1531 {
1532#else 1535#else
1533 { 1536 if (initialized)
1534 Vprocess_environment = Qnil;
1535#endif 1537#endif
1538 {
1536 for (envp = environ; *envp; envp++) 1539 for (envp = environ; *envp; envp++)
1537 Vprocess_environment = Fcons (build_string (*envp), 1540 Vprocess_environment = Fcons (build_string (*envp),
1538 Vprocess_environment); 1541 Vprocess_environment);
diff --git a/src/cmds.c b/src/cmds.c
index 81f975a9885..2b686a44d87 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -45,6 +45,8 @@ Lisp_Object Vself_insert_face_command;
45 45
46extern Lisp_Object Qface; 46extern Lisp_Object Qface;
47extern Lisp_Object Vtranslation_table_for_input; 47extern Lisp_Object Vtranslation_table_for_input;
48
49static int internal_self_insert (int, int);
48 50
49DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, 51DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
50 doc: /* Return buffer position N characters after (before if N negative) point. */) 52 doc: /* Return buffer position N characters after (before if N negative) point. */)
@@ -347,7 +349,7 @@ After insertion, the value of `auto-fill-function' is called if the
347 349
348static Lisp_Object Qexpand_abbrev; 350static Lisp_Object Qexpand_abbrev;
349 351
350int 352static int
351internal_self_insert (int c, int noautofill) 353internal_self_insert (int c, int noautofill)
352{ 354{
353 int hairy = 0; 355 int hairy = 0;
diff --git a/src/config.in b/src/config.in
index 40b62633446..647c8804dff 100644
--- a/src/config.in
+++ b/src/config.in
@@ -801,6 +801,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
801/* Define to 1 if you want to use the X window system. */ 801/* Define to 1 if you want to use the X window system. */
802#undef HAVE_X_WINDOWS 802#undef HAVE_X_WINDOWS
803 803
804/* Define to 1 if you have the `__executable_start' function. */
805#undef HAVE___EXECUTABLE_START
806
804/* Define to 1 if you have the `__fpending' function. */ 807/* Define to 1 if you have the `__fpending' function. */
805#undef HAVE___FPENDING 808#undef HAVE___FPENDING
806 809
diff --git a/src/dired.c b/src/dired.c
index cdb4545e81c..8f360e8879f 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -66,8 +66,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
66#ifndef MSDOS 66#ifndef MSDOS
67#define DIRENTRY struct direct 67#define DIRENTRY struct direct
68 68
69extern DIR *opendir (); 69extern DIR *opendir (char *);
70extern struct direct *readdir (); 70extern struct direct *readdir (DIR *);
71 71
72#endif /* not MSDOS */ 72#endif /* not MSDOS */
73#endif /* not SYSV_SYSTEM_DIR */ 73#endif /* not SYSV_SYSTEM_DIR */
diff --git a/src/dispnew.c b/src/dispnew.c
index fe64143ec07..73aafe07d94 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -436,7 +436,7 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history,
436#endif /* GLYPH_DEBUG == 0 */ 436#endif /* GLYPH_DEBUG == 0 */
437 437
438 438
439#ifdef PROFILING 439#if defined PROFILING && !HAVE___EXECUTABLE_START
440/* FIXME: only used to find text start for profiling. */ 440/* FIXME: only used to find text start for profiling. */
441 441
442void 442void
diff --git a/src/ecrt0.c b/src/ecrt0.c
deleted file mode 100644
index 458771319c7..00000000000
--- a/src/ecrt0.c
+++ /dev/null
@@ -1,95 +0,0 @@
1/* C code startup routine.
2 Copyright (C) 1985, 1986, 1992, 2001, 2002, 2003, 2004,
3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or
10(at your option) any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19
20
21/* The standard Vax 4.2 Unix crt0.c cannot be used for Emacs
22 because it makes `environ' an initialized variable.
23 It is easiest to have a special crt0.c on all machines
24 though I don't know whether other machines actually need it. */
25
26/* On the vax and 68000, in BSD4.2 and USG5.2,
27 this is the data format on startup:
28 (vax) ap and fp are unpredictable as far as I know; don't use them.
29 sp -> word containing argc
30 word pointing to first arg string
31 [word pointing to next arg string]... 0 or more times
32 0
33Optionally:
34 [word pointing to environment variable]... 1 or more times
35 ...
36 0
37And always:
38 first arg string
39 [next arg string]... 0 or more times
40*/
41
42#ifdef emacs
43#include <config.h>
44#endif
45
46/* ******** WARNING ********
47 Do not insert any data definitions before data_start!
48 Since this is the first file linked, the address of the following
49 variable should correspond to the start of initialized data space.
50 On some systems this is a constant that is independent of the text
51 size for shared executables. On others, it is a function of the
52 text size. In short, this seems to be the most portable way to
53 discover the start of initialized data space dynamically at runtime,
54 for either shared or unshared executables, on either swapping or
55 virtual systems. It only requires that the linker allocate objects
56 in the order encountered, a reasonable model for most Unix systems.
57 Similarly, note that the address of _start() should be the start
58 of text space. Fred Fish, UniSoft Systems Inc. */
59
60int data_start = 0;
61
62char **environ;
63
64static start1 ();
65
66/* Define symbol "start": here; some systems want that symbol. */
67asm(" .text ");
68asm(" .globl start ");
69asm(" start: ");
70
71_start ()
72{
73/* On vax, nothing is pushed here */
74 start1 ();
75}
76
77static
78start1 (bogus_fp, argc, xargv)
79 int argc;
80 char *xargv;
81{
82 register char **argv = &xargv;
83 environ = argv + argc + 1;
84
85 if ((char *)environ == xargv)
86 environ--;
87 exit (main (argc, argv, environ));
88
89 /* Refer to `start1' so GCC will not think it is never called
90 and optimize it out. */
91 (void) &start1;
92}
93
94/* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74
95 (do not change this comment) */
diff --git a/src/editfns.c b/src/editfns.c
index 805dba60446..96ae1766e04 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -90,7 +90,7 @@ extern size_t emacs_strftimeu (char *, size_t, const char *,
90 const struct tm *, int); 90 const struct tm *, int);
91 91
92#ifdef WINDOWSNT 92#ifdef WINDOWSNT
93extern Lisp_Object w32_get_internal_run_time (); 93extern Lisp_Object w32_get_internal_run_time (void);
94#endif 94#endif
95 95
96static int tm_diff (struct tm *, struct tm *); 96static int tm_diff (struct tm *, struct tm *);
diff --git a/src/emacs.c b/src/emacs.c
index fbae7763877..a5d57116c4f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1747,9 +1747,18 @@ main (int argc, char **argv)
1747#else 1747#else
1748 extern char etext; 1748 extern char etext;
1749#endif 1749#endif
1750#ifdef HAVE___EXECUTABLE_START
1751 /* This symbol is defined by GNU ld to the start of the text
1752 segment. */
1753 extern char __executable_start[];
1754#else
1750 extern void safe_bcopy (); 1755 extern void safe_bcopy ();
1756#endif
1751 1757
1752 atexit (_mcleanup); 1758 atexit (_mcleanup);
1759#ifdef HAVE___EXECUTABLE_START
1760 monstartup (__executable_start, &etext);
1761#else
1753 /* This uses safe_bcopy because that function comes first in the 1762 /* This uses safe_bcopy because that function comes first in the
1754 Emacs executable. It might be better to use something that 1763 Emacs executable. It might be better to use something that
1755 gives the start of the text segment, but start_of_text is not 1764 gives the start of the text segment, but start_of_text is not
@@ -1757,6 +1766,7 @@ main (int argc, char **argv)
1757 /* FIXME: Does not work on architectures with function 1766 /* FIXME: Does not work on architectures with function
1758 descriptors. */ 1767 descriptors. */
1759 monstartup (safe_bcopy, &etext); 1768 monstartup (safe_bcopy, &etext);
1769#endif
1760 } 1770 }
1761 else 1771 else
1762 moncontrol (0); 1772 moncontrol (0);
diff --git a/src/font.c b/src/font.c
index ed4da9c75ac..c35716c7c67 100644
--- a/src/font.c
+++ b/src/font.c
@@ -980,39 +980,6 @@ font_expand_wildcards (Lisp_Object *field, int n)
980} 980}
981 981
982 982
983#ifdef ENABLE_CHECKING
984/* Match a 14-field XLFD pattern against a full XLFD font name. */
985static int
986font_match_xlfd (char *pattern, char *name)
987{
988 while (*pattern && *name)
989 {
990 if (*pattern == *name)
991 pattern++;
992 else if (*pattern == '*')
993 if (*name == pattern[1])
994 pattern += 2;
995 else
996 ;
997 else
998 return 0;
999 name++;
1000 }
1001 return 1;
1002}
1003
1004/* Make sure the font object matches the XLFD font name. */
1005static int
1006font_check_xlfd_parse (Lisp_Object font, char *name)
1007{
1008 char name_check[256];
1009 font_unparse_xlfd (font, 0, name_check, 255);
1010 return font_match_xlfd (name_check, name);
1011}
1012
1013#endif
1014
1015
1016/* Parse NAME (null terminated) as XLFD and store information in FONT 983/* Parse NAME (null terminated) as XLFD and store information in FONT
1017 (font-spec or font-entity). Size property of FONT is set as 984 (font-spec or font-entity). Size property of FONT is set as
1018 follows: 985 follows:
diff --git a/src/frame.c b/src/frame.c
index 69a640cdc96..0cd7377ece1 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1280,14 +1280,6 @@ other_visible_frames (FRAME_PTR f)
1280 return 1; 1280 return 1;
1281} 1281}
1282 1282
1283/* Error handler for `delete-frame-functions'. */
1284static Lisp_Object
1285delete_frame_handler (Lisp_Object arg)
1286{
1287 add_to_log ("Error during `delete-frame': %s", arg, Qnil);
1288 return Qnil;
1289}
1290
1291extern Lisp_Object Qrun_hook_with_args; 1283extern Lisp_Object Qrun_hook_with_args;
1292 1284
1293/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME 1285/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
@@ -1299,7 +1291,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1299 /* If we use `register' here, gcc-4.0.2 on amd64 using 1291 /* If we use `register' here, gcc-4.0.2 on amd64 using
1300 -DUSE_LISP_UNION_TYPE complains further down that we're getting the 1292 -DUSE_LISP_UNION_TYPE complains further down that we're getting the
1301 address of `force'. Go figure. */ 1293 address of `force'. Go figure. */
1302 1294
1303{ 1295{
1304 struct frame *f; 1296 struct frame *f;
1305 struct frame *sf = SELECTED_FRAME (); 1297 struct frame *sf = SELECTED_FRAME ();
diff --git a/src/keyboard.c b/src/keyboard.c
index c2f010cf4e7..1cc24f95bdc 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -635,7 +635,9 @@ static Lisp_Object apply_modifiers (int, Lisp_Object);
635static void clear_event (struct input_event *); 635static void clear_event (struct input_event *);
636static Lisp_Object restore_kboard_configuration (Lisp_Object); 636static Lisp_Object restore_kboard_configuration (Lisp_Object);
637static SIGTYPE interrupt_signal (int signalnum); 637static SIGTYPE interrupt_signal (int signalnum);
638#ifdef SIGIO
638static SIGTYPE input_available_signal (int signo); 639static SIGTYPE input_available_signal (int signo);
640#endif
639static void handle_interrupt (void); 641static void handle_interrupt (void);
640static void timer_start_idle (void); 642static void timer_start_idle (void);
641static void timer_stop_idle (void); 643static void timer_stop_idle (void);
@@ -3895,7 +3897,7 @@ kbd_buffer_get_event (KBOARD **kbp,
3895{ 3897{
3896 register int c; 3898 register int c;
3897 Lisp_Object obj; 3899 Lisp_Object obj;
3898 3900
3899 if (kbd_on_hold_p () && kbd_buffer_nr_stored () < KBD_BUFFER_SIZE/4) 3901 if (kbd_on_hold_p () && kbd_buffer_nr_stored () < KBD_BUFFER_SIZE/4)
3900 { 3902 {
3901 /* Start reading input again, we have processed enough so we can 3903 /* Start reading input again, we have processed enough so we can
diff --git a/src/lisp.h b/src/lisp.h
index d1a14fcd894..6b5de400c06 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2393,7 +2393,6 @@ extern void swap_in_global_binding (struct Lisp_Symbol *);
2393EXFUN (Fend_of_line, 1); 2393EXFUN (Fend_of_line, 1);
2394EXFUN (Fforward_char, 1); 2394EXFUN (Fforward_char, 1);
2395EXFUN (Fforward_line, 1); 2395EXFUN (Fforward_line, 1);
2396extern int internal_self_insert (int, int);
2397extern void syms_of_cmds (void); 2396extern void syms_of_cmds (void);
2398extern void keys_of_cmds (void); 2397extern void keys_of_cmds (void);
2399 2398
@@ -3400,16 +3399,16 @@ extern int emacs_close (int);
3400extern int emacs_read (int, char *, unsigned int); 3399extern int emacs_read (int, char *, unsigned int);
3401extern int emacs_write (int, const char *, unsigned int); 3400extern int emacs_write (int, const char *, unsigned int);
3402#ifndef HAVE_MEMSET 3401#ifndef HAVE_MEMSET
3403extern void *memset P_ ((void *, int, size_t)); 3402extern void *memset (void *, int, size_t);
3404#endif 3403#endif
3405#ifndef HAVE_MEMCPY 3404#ifndef HAVE_MEMCPY
3406extern void *memcpy P_ ((void *, void *, size_t)); 3405extern void *memcpy (void *, void *, size_t);
3407#endif 3406#endif
3408#ifndef HAVE_MEMMOVE 3407#ifndef HAVE_MEMMOVE
3409extern void *memmove P_ ((void *, void *, size_t)); 3408extern void *memmove (void *, void *, size_t);
3410#endif 3409#endif
3411#ifndef HAVE_MEMCMP 3410#ifndef HAVE_MEMCMP
3412extern int memcmp P_ ((void *, void *, size_t)); 3411extern int memcmp (void *, void *, size_t);
3413#endif 3412#endif
3414 3413
3415/* Defined in filelock.c */ 3414/* Defined in filelock.c */
diff --git a/src/lread.c b/src/lread.c
index 96108ec4a72..b29971a5f88 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1276,7 +1276,6 @@ Return t if the file exists and loads successfully. */)
1276 1276
1277static Lisp_Object 1277static Lisp_Object
1278load_unwind (Lisp_Object arg) /* used as unwind-protect function in load */ 1278load_unwind (Lisp_Object arg) /* used as unwind-protect function in load */
1279
1280{ 1279{
1281 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; 1280 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
1282 if (stream != NULL) 1281 if (stream != NULL)
@@ -1567,9 +1566,8 @@ build_load_history (Lisp_Object filename, int entire)
1567 Vload_history); 1566 Vload_history);
1568} 1567}
1569 1568
1570Lisp_Object 1569static Lisp_Object
1571unreadpure (Lisp_Object junk) /* Used as unwind-protect function in readevalloop */ 1570unreadpure (Lisp_Object junk) /* Used as unwind-protect function in readevalloop */
1572
1573{ 1571{
1574 read_pure = 0; 1572 read_pure = 0;
1575 return Qnil; 1573 return Qnil;
@@ -3818,7 +3816,7 @@ map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Ob
3818 } 3816 }
3819} 3817}
3820 3818
3821void 3819static void
3822mapatoms_1 (Lisp_Object sym, Lisp_Object function) 3820mapatoms_1 (Lisp_Object sym, Lisp_Object function)
3823{ 3821{
3824 call1 (function, sym); 3822 call1 (function, sym);
diff --git a/src/mem-limits.h b/src/mem-limits.h
index a550e1464b8..8827c458c02 100644
--- a/src/mem-limits.h
+++ b/src/mem-limits.h
@@ -34,10 +34,6 @@ extern int etext;
34# endif 34# endif
35#endif 35#endif
36 36
37#ifdef CYGWIN
38#define BSD4_2
39#endif
40
41#ifdef BSD4_2 37#ifdef BSD4_2
42#include <sys/time.h> 38#include <sys/time.h>
43#include <sys/resource.h> 39#include <sys/resource.h>
diff --git a/src/menu.c b/src/menu.c
index a424200fb3e..321dc2677a1 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -133,12 +133,14 @@ discard_menu_items (void)
133 xassert (NILP (menu_items_inuse)); 133 xassert (NILP (menu_items_inuse));
134} 134}
135 135
136#ifdef HAVE_NS
136static Lisp_Object 137static Lisp_Object
137cleanup_popup_menu (Lisp_Object arg) 138cleanup_popup_menu (Lisp_Object arg)
138{ 139{
139 discard_menu_items (); 140 discard_menu_items ();
140 return Qnil; 141 return Qnil;
141} 142}
143#endif
142 144
143/* This undoes save_menu_items, and it is called by the specpdl unwind 145/* This undoes save_menu_items, and it is called by the specpdl unwind
144 mechanism. */ 146 mechanism. */
diff --git a/src/ndir.h b/src/ndir.h
index d7bac9d3fae..92d198334b7 100644
--- a/src/ndir.h
+++ b/src/ndir.h
@@ -32,11 +32,10 @@ typedef struct
32 char dd_buf[DIRBLKSIZ]; /* directory block */ 32 char dd_buf[DIRBLKSIZ]; /* directory block */
33 } DIR; /* stream data from opendir() */ 33 } DIR; /* stream data from opendir() */
34 34
35extern DIR *opendir(); 35extern DIR *opendir (char *);
36extern struct direct *readdir(); 36extern struct direct *readdir (DIR *);
37extern long telldir(); 37extern void seekdir (DIR *, long);
38extern void seekdir(); 38extern void closedir (DIR *);
39extern void closedir();
40 39
41#define rewinddir( dirp ) seekdir( dirp, 0L ) 40#define rewinddir( dirp ) seekdir( dirp, 0L )
42 41
diff --git a/src/ralloc.c b/src/ralloc.c
index 0a2b156e393..5f2b52fcc4b 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -79,7 +79,7 @@ static void r_alloc_init (void);
79/* Declarations for working with the malloc, ralloc, and system breaks. */ 79/* Declarations for working with the malloc, ralloc, and system breaks. */
80 80
81/* Function to set the real break value. */ 81/* Function to set the real break value. */
82POINTER (*real_morecore) (); 82POINTER (*real_morecore) (long int);
83 83
84/* The break value, as seen by malloc. */ 84/* The break value, as seen by malloc. */
85static POINTER virtual_break_value; 85static POINTER virtual_break_value;
@@ -111,7 +111,7 @@ static int extra_bytes;
111 from the system. */ 111 from the system. */
112 112
113#ifndef SYSTEM_MALLOC 113#ifndef SYSTEM_MALLOC
114extern POINTER (*__morecore) (); 114extern POINTER (*__morecore) (long int);
115#endif 115#endif
116 116
117 117
@@ -519,35 +519,6 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
519 519
520 return 1; 520 return 1;
521} 521}
522
523/* Reorder the bloc BLOC to go before bloc BEFORE in the doubly linked list.
524 This is necessary if we put the memory of space of BLOC
525 before that of BEFORE. */
526
527static void
528reorder_bloc (bloc_ptr bloc, bloc_ptr before)
529{
530 bloc_ptr prev, next;
531
532 /* Splice BLOC out from where it is. */
533 prev = bloc->prev;
534 next = bloc->next;
535
536 if (prev)
537 prev->next = next;
538 if (next)
539 next->prev = prev;
540
541 /* Splice it in before BEFORE. */
542 prev = before->prev;
543
544 if (prev)
545 prev->next = bloc;
546 bloc->prev = prev;
547
548 before->prev = bloc;
549 bloc->next = before;
550}
551 522
552/* Update the records of which heaps contain which blocs, starting 523/* Update the records of which heaps contain which blocs, starting
553 with heap HEAP and bloc BLOC. */ 524 with heap HEAP and bloc BLOC. */
diff --git a/src/sound.c b/src/sound.c
index e0ebd565151..4e3d583ccf0 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -115,7 +115,9 @@ enum sound_attr
115 SOUND_ATTR_SENTINEL 115 SOUND_ATTR_SENTINEL
116}; 116};
117 117
118#ifdef HAVE_ALSA
118static void alsa_sound_perror (char *, int) NO_RETURN; 119static void alsa_sound_perror (char *, int) NO_RETURN;
120#endif
119static void sound_perror (char *) NO_RETURN; 121static void sound_perror (char *) NO_RETURN;
120static void sound_warning (char *); 122static void sound_warning (char *);
121static int parse_sound (Lisp_Object, Lisp_Object *); 123static int parse_sound (Lisp_Object, Lisp_Object *);
diff --git a/src/syssignal.h b/src/syssignal.h
index e3765add425..f034e9e0761 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -160,7 +160,7 @@ sigset_t sys_sigsetmask (sigset_t new_mask);
160 160
161#ifndef HAVE_STRSIGNAL 161#ifndef HAVE_STRSIGNAL
162/* strsignal is in sysdep.c */ 162/* strsignal is in sysdep.c */
163char *strsignal (); 163char *strsignal (int);
164#endif 164#endif
165 165
166#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD 166#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
diff --git a/src/term.c b/src/term.c
index 3233db84cf7..25501370cdf 100644
--- a/src/term.c
+++ b/src/term.c
@@ -183,7 +183,7 @@ static int no_controlling_tty;
183 183
184static int system_uses_terminfo; 184static int system_uses_terminfo;
185 185
186char *tparam (); 186char *tparam (char *, char *, int, int, ...);
187 187
188extern char *tgetstr (char *, char **); 188extern char *tgetstr (char *, char **);
189 189
@@ -1363,6 +1363,7 @@ static struct fkey_table keys[] =
1363 {"!3", "S-undo"} /*shifted undo key*/ 1363 {"!3", "S-undo"} /*shifted undo key*/
1364 }; 1364 };
1365 1365
1366#ifndef DOS_NT
1366static char **term_get_fkeys_address; 1367static char **term_get_fkeys_address;
1367static KBOARD *term_get_fkeys_kboard; 1368static KBOARD *term_get_fkeys_kboard;
1368static Lisp_Object term_get_fkeys_1 (void); 1369static Lisp_Object term_get_fkeys_1 (void);
@@ -1500,6 +1501,7 @@ term_get_fkeys_1 (void)
1500 1501
1501 return Qnil; 1502 return Qnil;
1502} 1503}
1504#endif /* not DOS_NT */
1503 1505
1504 1506
1505/*********************************************************************** 1507/***********************************************************************
diff --git a/src/terminfo.c b/src/terminfo.c
index 89d7426e8f4..50749492cfe 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -35,10 +35,12 @@ char *UP, *BC, PC;
35*/ 35*/
36 36
37char * 37char *
38tparam (char *string, char *outstring, int len, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) 38tparam (char *string, char *outstring,
39 int len, int arg1, int arg2, int arg3, int arg4,
40 int arg5, int arg6, int arg7, int arg8, int arg9)
39{ 41{
40 char *temp; 42 char *temp;
41 extern char *tparm(/* ??? */); 43 extern char *tparm (char *str, ...);
42 44
43 temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); 45 temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
44 if (outstring == 0) 46 if (outstring == 0)
diff --git a/src/unexalpha.c b/src/unexalpha.c
deleted file mode 100644
index d0faa179931..00000000000
--- a/src/unexalpha.c
+++ /dev/null
@@ -1,539 +0,0 @@
1/* Unexec for DEC alpha.
2
3 Copyright (C) 1994, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5
6Author: Rainer Schoepf <schoepf@sc.ZIB-Berlin.DE>
7
8This file is part of GNU Emacs.
9
10GNU Emacs is free software: you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation, either version 3 of the License, or
13(at your option) any later version.
14
15GNU Emacs is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22
23
24#include <config.h>
25#include <sys/types.h>
26#include <sys/file.h>
27#include <sys/stat.h>
28#include <sys/mman.h>
29#include <stdio.h>
30#include <errno.h>
31#include <string.h>
32#if !defined (__NetBSD__) && !defined (__OpenBSD__)
33#include <filehdr.h>
34#include <aouthdr.h>
35#include <scnhdr.h>
36#include <syms.h>
37#ifndef __linux__
38# include <reloc.h>
39# include <elf_abi.h>
40#endif
41#else /* __NetBSD__ or __OpenBSD__ */
42/*
43 * NetBSD/Alpha does not have 'normal' user-land ECOFF support because
44 * there's no desire to support ECOFF as the executable format in the
45 * long term.
46 */
47#include <sys/exec_ecoff.h>
48
49/* Structures, constants, etc., that NetBSD defines strangely. */
50#define filehdr ecoff_filehdr
51#define aouthdr ecoff_aouthdr
52#define scnhdr ecoff_scnhdr
53#define HDRR struct ecoff_symhdr
54#define pHDRR HDRR *
55#define cbHDRR sizeof(HDRR)
56#ifdef __OpenBSD__
57#define ALPHAMAGIC ECOFF_MAGIC_NATIVE_ALPHA
58#else
59#define ALPHAMAGIC ECOFF_MAGIC_NETBSD_ALPHA
60#endif
61#define ZMAGIC ECOFF_ZMAGIC
62
63/* Misc. constants that NetBSD doesn't define at all. */
64#define ALPHAUMAGIC 0617
65#define _MIPS_NSCNS_MAX 35
66#define STYP_TEXT 0x00000020
67#define STYP_DATA 0x00000040
68#define STYP_BSS 0x00000080
69#define STYP_RDATA 0x00000100
70#define STYP_SDATA 0x00000200
71#define STYP_SBSS 0x00000400
72#define STYP_INIT 0x80000000
73#define _TEXT ".text"
74#define _DATA ".data"
75#define _BSS ".bss"
76#define _INIT ".init"
77#define _RDATA ".rdata"
78#define _SDATA ".sdata"
79#define _SBSS ".sbss"
80#define TEXT_START 0x120000000
81#endif /* __NetBSD__ || __OpenBSD__ */
82
83
84static void fatal_unexec (char *, char *);
85static void mark_x (char *);
86
87static void update_dynamic_symbols (char *, char *, int, struct aouthdr);
88
89#define READ(_fd, _buffer, _size, _error_message, _error_arg) \
90 errno = EEOF; \
91 if (read (_fd, _buffer, _size) != _size) \
92 fatal_unexec (_error_message, _error_arg);
93
94#define WRITE(_fd, _buffer, _size, _error_message, _error_arg) \
95 if (write (_fd, _buffer, _size) != _size) \
96 fatal_unexec (_error_message, _error_arg);
97
98#define SEEK(_fd, _position, _error_message, _error_arg) \
99 errno = EEOF; \
100 if (lseek (_fd, _position, L_SET) != _position) \
101 fatal_unexec (_error_message, _error_arg);
102
103#ifdef HAVE_UNISTD_H
104#include <unistd.h>
105#else
106void *sbrk ();
107#endif
108
109#define EEOF -1
110
111static struct scnhdr *text_section;
112static struct scnhdr *rel_dyn_section;
113static struct scnhdr *dynstr_section;
114static struct scnhdr *dynsym_section;
115static struct scnhdr *init_section;
116static struct scnhdr *finit_section;
117static struct scnhdr *rdata_section;
118static struct scnhdr *rconst_section;
119static struct scnhdr *data_section;
120static struct scnhdr *pdata_section;
121static struct scnhdr *xdata_section;
122static struct scnhdr *got_section;
123static struct scnhdr *lit8_section;
124static struct scnhdr *lit4_section;
125static struct scnhdr *sdata_section;
126static struct scnhdr *sbss_section;
127static struct scnhdr *bss_section;
128
129static struct scnhdr old_data_scnhdr;
130
131static unsigned long Brk;
132
133struct headers {
134 struct filehdr fhdr;
135 struct aouthdr aout;
136 struct scnhdr section[_MIPS_NSCNS_MAX];
137};
138
139
140void
141unexec (new_name, a_name, data_start, bss_start, entry_address)
142 char *new_name, *a_name;
143 unsigned long data_start, bss_start, entry_address;
144{
145 int new, old;
146 char * oldptr;
147 struct headers ohdr, nhdr;
148 struct stat stat;
149 long pagesize, brk;
150 long newsyms, symrel;
151 int nread;
152 int i;
153 long vaddr, scnptr;
154#define BUFSIZE 8192
155 char buffer[BUFSIZE];
156
157 if ((old = open (a_name, O_RDONLY)) < 0)
158 fatal_unexec ("opening %s", a_name);
159
160 new = creat (new_name, 0666);
161 if (new < 0) fatal_unexec ("creating %s", new_name);
162
163 if ((fstat (old, &stat) == -1))
164 fatal_unexec ("fstat %s", a_name);
165
166 oldptr = (char *)mmap (0, stat.st_size, PROT_READ, MAP_FILE|MAP_SHARED, old, 0);
167
168 if (oldptr == (char *)-1)
169 fatal_unexec ("mmap %s", a_name);
170
171 close (old);
172
173 /* This is a copy of the a.out header of the original executable */
174
175 ohdr = (*(struct headers *)oldptr);
176
177 /* This is where we build the new header from the in-memory copy */
178
179 nhdr = *((struct headers *)TEXT_START);
180
181 /* First do some consistency checks */
182
183 if (nhdr.fhdr.f_magic != ALPHAMAGIC
184 && nhdr.fhdr.f_magic != ALPHAUMAGIC)
185 {
186 fprintf (stderr, "unexec: input file magic number is %x, not %x or %x.\n",
187 nhdr.fhdr.f_magic, ALPHAMAGIC, ALPHAUMAGIC);
188 exit (1);
189 }
190
191 if (nhdr.fhdr.f_opthdr != sizeof (nhdr.aout))
192 {
193 fprintf (stderr, "unexec: input a.out header is %d bytes, not %d.\n",
194 nhdr.fhdr.f_opthdr, (int)sizeof (nhdr.aout));
195 exit (1);
196 }
197 if (nhdr.aout.magic != ZMAGIC)
198 {
199 fprintf (stderr, "unexec: input file a.out magic number is %o, not %o.\n",
200 nhdr.aout.magic, ZMAGIC);
201 exit (1);
202 }
203
204
205 /* Now check the existence of certain header section and grab
206 their addresses. */
207
208#define CHECK_SCNHDR(ptr, name, flags) \
209 ptr = NULL; \
210 for (i = 0; i < nhdr.fhdr.f_nscns && !ptr; i++) \
211 if (strncmp (nhdr.section[i].s_name, name, 8) == 0) \
212 { \
213 if (nhdr.section[i].s_flags != flags) \
214 fprintf (stderr, "unexec: %x flags (%x expected) in %s section.\n", \
215 nhdr.section[i].s_flags, flags, name); \
216 ptr = nhdr.section + i; \
217 } \
218
219 CHECK_SCNHDR (text_section, _TEXT, STYP_TEXT);
220 CHECK_SCNHDR (init_section, _INIT, STYP_INIT);
221#ifdef _REL_DYN
222 CHECK_SCNHDR (rel_dyn_section, _REL_DYN, STYP_REL_DYN);
223#endif /* _REL_DYN */
224#ifdef _DYNSYM
225 CHECK_SCNHDR (dynsym_section, _DYNSYM, STYP_DYNSYM);
226#endif /* _REL_DYN */
227#ifdef _DYNSTR
228 CHECK_SCNHDR (dynstr_section, _DYNSTR, STYP_DYNSTR);
229#endif /* _REL_DYN */
230#ifdef _FINI
231 CHECK_SCNHDR (finit_section, _FINI, STYP_FINI);
232#endif /* _FINI */
233 CHECK_SCNHDR (rdata_section, _RDATA, STYP_RDATA);
234#ifdef _RCONST
235 CHECK_SCNHDR (rconst_section, _RCONST, STYP_RCONST);
236#endif
237#ifdef _PDATA
238 CHECK_SCNHDR (pdata_section, _PDATA, STYP_PDATA);
239#endif /* _PDATA */
240#ifdef _GOT
241 CHECK_SCNHDR (got_section, _GOT, STYP_GOT);
242#endif /* _GOT */
243 CHECK_SCNHDR (data_section, _DATA, STYP_DATA);
244#ifdef _XDATA
245 CHECK_SCNHDR (xdata_section, _XDATA, STYP_XDATA);
246#endif /* _XDATA */
247#ifdef _LIT8
248 CHECK_SCNHDR (lit8_section, _LIT8, STYP_LIT8);
249 CHECK_SCNHDR (lit4_section, _LIT4, STYP_LIT4);
250#endif /* _LIT8 */
251 CHECK_SCNHDR (sdata_section, _SDATA, STYP_SDATA);
252 CHECK_SCNHDR (sbss_section, _SBSS, STYP_SBSS);
253 CHECK_SCNHDR (bss_section, _BSS, STYP_BSS);
254
255
256 pagesize = getpagesize ();
257 brk = (((long) (sbrk (0))) + pagesize - 1) & (-pagesize);
258
259 /* Remember the current break */
260
261 Brk = brk;
262
263 memcpy (&old_data_scnhdr, data_section, sizeof (old_data_scnhdr));
264
265 nhdr.aout.dsize = brk - DATA_START;
266 nhdr.aout.bsize = 0;
267 if (entry_address == 0)
268 {
269 extern __start ();
270 nhdr.aout.entry = (unsigned long)__start;
271 }
272 else
273 nhdr.aout.entry = entry_address;
274
275 nhdr.aout.bss_start = nhdr.aout.data_start + nhdr.aout.dsize;
276
277 if (rdata_section != NULL)
278 {
279 rdata_section->s_size = data_start - DATA_START;
280
281 /* Adjust start and virtual addresses of rdata_section, too. */
282 rdata_section->s_vaddr = DATA_START;
283 rdata_section->s_paddr = DATA_START;
284 rdata_section->s_scnptr = text_section->s_scnptr + nhdr.aout.tsize;
285 }
286
287 data_section->s_vaddr = data_start;
288 data_section->s_paddr = data_start;
289 data_section->s_size = brk - data_start;
290
291 if (rdata_section != NULL)
292 {
293 data_section->s_scnptr = rdata_section->s_scnptr + rdata_section->s_size;
294 }
295
296 vaddr = data_section->s_vaddr + data_section->s_size;
297 scnptr = data_section->s_scnptr + data_section->s_size;
298 if (lit8_section != NULL)
299 {
300 lit8_section->s_vaddr = vaddr;
301 lit8_section->s_paddr = vaddr;
302 lit8_section->s_size = 0;
303 lit8_section->s_scnptr = scnptr;
304 }
305 if (lit4_section != NULL)
306 {
307 lit4_section->s_vaddr = vaddr;
308 lit4_section->s_paddr = vaddr;
309 lit4_section->s_size = 0;
310 lit4_section->s_scnptr = scnptr;
311 }
312 if (sdata_section != NULL)
313 {
314 sdata_section->s_vaddr = vaddr;
315 sdata_section->s_paddr = vaddr;
316 sdata_section->s_size = 0;
317 sdata_section->s_scnptr = scnptr;
318 }
319#ifdef _XDATA
320 if (xdata_section != NULL)
321 {
322 xdata_section->s_vaddr = vaddr;
323 xdata_section->s_paddr = vaddr;
324 xdata_section->s_size = 0;
325 xdata_section->s_scnptr = scnptr;
326 }
327#endif
328#ifdef _GOT
329 if (got_section != NULL)
330 {
331 memcpy (buffer, got_section, sizeof (struct scnhdr));
332
333 got_section->s_vaddr = vaddr;
334 got_section->s_paddr = vaddr;
335 got_section->s_size = 0;
336 got_section->s_scnptr = scnptr;
337 }
338#endif /*_GOT */
339 if (sbss_section != NULL)
340 {
341 sbss_section->s_vaddr = vaddr;
342 sbss_section->s_paddr = vaddr;
343 sbss_section->s_size = 0;
344 sbss_section->s_scnptr = scnptr;
345 }
346 if (bss_section != NULL)
347 {
348 bss_section->s_vaddr = vaddr;
349 bss_section->s_paddr = vaddr;
350 bss_section->s_size = 0;
351 bss_section->s_scnptr = scnptr;
352 }
353
354 WRITE (new, (char *)TEXT_START, nhdr.aout.tsize,
355 "writing text section to %s", new_name);
356 WRITE (new, (char *)DATA_START, nhdr.aout.dsize,
357 "writing data section to %s", new_name);
358
359#ifdef _GOT
360#define old_got_section ((struct scnhdr *)buffer)
361
362 if (got_section != NULL)
363 {
364 SEEK (new, old_got_section->s_scnptr,
365 "seeking to start of got_section in %s", new_name);
366 WRITE (new, oldptr + old_got_section->s_scnptr, old_got_section->s_size,
367 "writing new got_section of %s", new_name);
368 SEEK (new, nhdr.aout.tsize + nhdr.aout.dsize,
369 "seeking to end of data section of %s", new_name);
370 }
371
372#undef old_got_section
373#endif
374
375 /*
376 * Construct new symbol table header
377 */
378
379 memcpy (buffer, oldptr + nhdr.fhdr.f_symptr, cbHDRR);
380
381#define symhdr ((pHDRR)buffer)
382 newsyms = nhdr.aout.tsize + nhdr.aout.dsize;
383 symrel = newsyms - nhdr.fhdr.f_symptr;
384 nhdr.fhdr.f_symptr = newsyms;
385 symhdr->cbLineOffset += symrel;
386 symhdr->cbDnOffset += symrel;
387 symhdr->cbPdOffset += symrel;
388 symhdr->cbSymOffset += symrel;
389 symhdr->cbOptOffset += symrel;
390 symhdr->cbAuxOffset += symrel;
391 symhdr->cbSsOffset += symrel;
392 symhdr->cbSsExtOffset += symrel;
393 symhdr->cbFdOffset += symrel;
394 symhdr->cbRfdOffset += symrel;
395 symhdr->cbExtOffset += symrel;
396
397 WRITE (new, buffer, cbHDRR, "writing symbol table header of %s", new_name);
398
399 /*
400 * Copy the symbol table and line numbers
401 */
402 WRITE (new, oldptr + ohdr.fhdr.f_symptr + cbHDRR,
403 stat.st_size - ohdr.fhdr.f_symptr - cbHDRR,
404 "writing symbol table of %s", new_name);
405
406#ifdef _REL_DYN
407 if (rel_dyn_section)
408 update_dynamic_symbols (oldptr, new_name, new, nhdr.aout);
409#endif
410
411#undef symhdr
412
413 SEEK (new, 0, "seeking to start of header in %s", new_name);
414 WRITE (new, &nhdr, sizeof (nhdr),
415 "writing header of %s", new_name);
416
417 close (old);
418 close (new);
419 mark_x (new_name);
420}
421
422
423static void
424update_dynamic_symbols (old, new_name, new, aout)
425 char *old; /* Pointer to old executable */
426 char *new_name; /* Name of new executable */
427 int new; /* File descriptor for new executable */
428 struct aouthdr aout; /* a.out info from the file header */
429{
430#if !defined (__linux__) && !defined (__NetBSD__) && !defined (__OpenBSD__)
431
432 typedef struct dynrel_info {
433 char * addr;
434 unsigned type:8;
435 unsigned index:24;
436 unsigned info:8;
437 unsigned pad:8;
438 } dr_info;
439
440 int nsyms = rel_dyn_section->s_size / sizeof (struct dynrel_info);
441 int i;
442 dr_info * rd_base = (dr_info *) (old + rel_dyn_section->s_scnptr);
443 Elf32_Sym * ds_base = (Elf32_Sym *) (old + dynsym_section->s_scnptr);
444
445 for (i = 0; i < nsyms; i++) {
446 register Elf32_Sym x;
447
448 if (rd_base[i].index == 0)
449 continue;
450
451 x = ds_base[rd_base[i].index];
452
453#if 0
454 fprintf (stderr, "Object inspected: %s, addr = %lx, shndx = %x",
455 old + dynstr_section->s_scnptr + x.st_name, rd_base[i].addr, x.st_shndx);
456#endif
457
458
459 if ((ELF32_ST_BIND (x.st_info) == STB_GLOBAL)
460 && (x.st_shndx == 0)
461 /* && (x.st_value == NULL) */
462 ) {
463 /* OK, this is probably a reference to an object in a shared
464 library, so copy the old value. This is done in several steps:
465 1. reladdr is the address of the location in question relative to
466 the start of the data section,
467 2. oldref is the addr is the mapped in temacs executable,
468 3. newref is the address of the location in question in the
469 undumped executable,
470 4. len is the size of the object reference in bytes --
471 currently only 4 (long) and 8 (quad) are supported.
472 */
473 register unsigned long reladdr = (long)rd_base[i].addr - old_data_scnhdr.s_vaddr;
474 char * oldref = old + old_data_scnhdr.s_scnptr + reladdr;
475 unsigned long newref = aout.tsize + reladdr;
476 int len;
477
478#if 0
479 fprintf (stderr, "...relocated\n");
480#endif
481
482 if (rd_base[i].type == R_REFLONG)
483 len = 4;
484 else if (rd_base[i].type == R_REFQUAD)
485 len = 8;
486 else
487 fatal_unexec ("unrecognized relocation type in .dyn.rel section (symbol #%d)", (char *) i);
488
489 SEEK (new, newref, "seeking to dynamic symbol in %s", new_name);
490 WRITE (new, oldref, len, "writing old dynrel info in %s", new_name);
491 }
492
493#if 0
494 else
495 fprintf (stderr, "...not relocated\n");
496#endif
497
498 }
499
500#endif /* not __linux__ and not __NetBSD__ and not __OpenBSD__ */
501}
502
503
504/*
505 * mark_x
506 *
507 * After successfully building the new a.out, mark it executable
508 */
509
510static void
511mark_x (name)
512 char *name;
513{
514 struct stat sbuf;
515 int um = umask (777);
516 umask (um);
517 if (stat (name, &sbuf) < 0)
518 fatal_unexec ("getting protection on %s", name);
519 sbuf.st_mode |= 0111 & ~um;
520 if (chmod (name, sbuf.st_mode) < 0)
521 fatal_unexec ("setting protection on %s", name);
522}
523
524static void
525fatal_unexec (s, arg)
526 char *s;
527 char *arg;
528{
529 if (errno == EEOF)
530 fputs ("unexec: unexpected end of file, ", stderr);
531 else
532 fprintf (stderr, "unexec: %s, ", strerror (errno));
533 fprintf (stderr, s, arg);
534 fputs (".\n", stderr);
535 exit (1);
536}
537
538/* arch-tag: 46316c49-ee08-4aa3-942b-00798902f5bd
539 (do not change this comment) */
diff --git a/src/vm-limit.c b/src/vm-limit.c
index b288276f394..71ad82d687e 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -100,7 +100,7 @@ get_lim_data (void)
100} 100}
101 101
102#else 102#else
103#if !defined (BSD4_2) && !defined (__osf__) 103#if !defined (BSD4_2) && !defined (__osf__) && !defined (CYGWIN)
104 104
105#ifdef MSDOS 105#ifdef MSDOS
106void 106void
@@ -173,9 +173,9 @@ static void
173check_memory_limits (void) 173check_memory_limits (void)
174{ 174{
175#ifdef REL_ALLOC 175#ifdef REL_ALLOC
176 extern POINTER (*real_morecore) (); 176 extern POINTER (*real_morecore) (SIZE);
177#endif 177#endif
178 extern POINTER (*__morecore) (); 178 extern POINTER (*__morecore) (SIZE);
179 179
180 register POINTER cp; 180 register POINTER cp;
181 unsigned long five_percent; 181 unsigned long five_percent;
diff --git a/src/w32fns.c b/src/w32fns.c
index 57786d76795..72830c435e9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -439,8 +439,6 @@ void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
439void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 439void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
440void x_set_title (struct frame *, Lisp_Object, Lisp_Object); 440void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
441void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 441void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
442static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
443 Lisp_Object);
444 442
445 443
446 444
@@ -788,25 +786,6 @@ DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
788} 786}
789 787
790static Lisp_Object 788static Lisp_Object
791w32_to_x_color (Lisp_Object rgb)
792{
793 Lisp_Object color;
794
795 CHECK_NUMBER (rgb);
796
797 BLOCK_INPUT;
798
799 color = Frassq (rgb, Vw32_color_map);
800
801 UNBLOCK_INPUT;
802
803 if (!NILP (color))
804 return (Fcar (color));
805 else
806 return Qnil;
807}
808
809static Lisp_Object
810w32_color_map_lookup (char *colorname) 789w32_color_map_lookup (char *colorname)
811{ 790{
812 Lisp_Object tail, ret = Qnil; 791 Lisp_Object tail, ret = Qnil;
diff --git a/src/w32gui.h b/src/w32gui.h
index 07a6fed0b47..9cad4f21f21 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -118,7 +118,7 @@ extern int nCmdShow;
118#define PBaseSize (1L << 8) /* program specified base for incrementing */ 118#define PBaseSize (1L << 8) /* program specified base for incrementing */
119#define PWinGravity (1L << 9) /* program specified window gravity */ 119#define PWinGravity (1L << 9) /* program specified window gravity */
120 120
121extern int XParseGeometry (); 121extern int XParseGeometry (char *, int *, int *, unsigned *, unsigned *);
122 122
123 123
124typedef struct { 124typedef struct {
diff --git a/src/w32heap.h b/src/w32heap.h
index cbd7f7ae96d..20a49a4e0ac 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -41,8 +41,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
41#define get_w32_major_version() w32_major_version 41#define get_w32_major_version() w32_major_version
42#define get_w32_minor_version() w32_minor_version 42#define get_w32_minor_version() w32_minor_version
43 43
44extern unsigned char *get_data_start(); 44extern unsigned char *get_data_start (void);
45extern unsigned char *get_data_end(); 45extern unsigned char *get_data_end (void);
46extern unsigned long reserved_heap_size; 46extern unsigned long reserved_heap_size;
47extern SYSTEM_INFO sysinfo_cache; 47extern SYSTEM_INFO sysinfo_cache;
48extern OSVERSIONINFO osinfo_cache; 48extern OSVERSIONINFO osinfo_cache;
@@ -62,7 +62,7 @@ extern int os_subtype;
62extern void *sbrk (unsigned long size); 62extern void *sbrk (unsigned long size);
63 63
64/* Initialize heap structures for sbrk on startup. */ 64/* Initialize heap structures for sbrk on startup. */
65extern void init_heap (); 65extern void init_heap (void);
66 66
67/* Round the heap to this size. */ 67/* Round the heap to this size. */
68extern void round_heap (unsigned long size); 68extern void round_heap (unsigned long size);
diff --git a/src/w32menu.c b/src/w32menu.c
index e96b70b59dc..919f8505da8 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -111,30 +111,6 @@ void w32_free_menu_strings (HWND);
111 111
112int pending_menu_activation; 112int pending_menu_activation;
113 113
114
115/* Return the frame whose ->output_data.w32->menubar_widget equals
116 ID, or 0 if none. */
117
118static struct frame *
119menubar_id_to_frame (HMENU id)
120{
121 Lisp_Object tail, frame;
122 FRAME_PTR f;
123
124 for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
125 {
126 frame = XCAR (tail);
127 if (!FRAMEP (frame))
128 continue;
129 f = XFRAME (frame);
130 if (!FRAME_WINDOW_P (f))
131 continue;
132 if (f->output_data.w32->menubar_widget == id)
133 return f;
134 }
135 return 0;
136}
137
138#ifdef HAVE_MENUS 114#ifdef HAVE_MENUS
139 115
140DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, 116DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
@@ -1316,14 +1292,6 @@ name_is_separator (char *name)
1316 return (*name == '\0' || start + 2 == name); 1292 return (*name == '\0' || start + 2 == name);
1317} 1293}
1318 1294
1319
1320/* Indicate boundary between left and right. */
1321static int
1322add_left_right_boundary (HMENU menu)
1323{
1324 return AppendMenu (menu, MF_MENUBARBREAK, 0, NULL);
1325}
1326
1327/* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */ 1295/* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */
1328static void 1296static void
1329utf8to16 (unsigned char * src, int len, WCHAR * dest) 1297utf8to16 (unsigned char * src, int len, WCHAR * dest)
diff --git a/src/w32term.c b/src/w32term.c
index 3a0a1b1abae..fc03034b14b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -268,7 +268,9 @@ static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
268static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC); 268static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC);
269static BOOL my_show_window (struct frame *, HWND, int); 269static BOOL my_show_window (struct frame *, HWND, int);
270static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT); 270static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT);
271#if 0
271static void my_set_focus (struct frame *, HWND); 272static void my_set_focus (struct frame *, HWND);
273#endif
272static void my_set_foreground_window (HWND); 274static void my_set_foreground_window (HWND);
273static void my_destroy_window (struct frame *, HWND); 275static void my_destroy_window (struct frame *, HWND);
274 276
@@ -3366,12 +3368,14 @@ my_set_window_pos (HWND hwnd, HWND hwndAfter,
3366#endif 3368#endif
3367} 3369}
3368 3370
3371#if 0
3369static void 3372static void
3370my_set_focus (struct frame * f, HWND hwnd) 3373my_set_focus (struct frame * f, HWND hwnd)
3371{ 3374{
3372 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, 3375 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS,
3373 (WPARAM) hwnd, 0); 3376 (WPARAM) hwnd, 0);
3374} 3377}
3378#endif
3375 3379
3376static void 3380static void
3377my_set_foreground_window (HWND hwnd) 3381my_set_foreground_window (HWND hwnd)
diff --git a/src/w32term.h b/src/w32term.h
index b5b3d4451f2..ea245144ac3 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -48,8 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
48extern MSG CurMsg; 48extern MSG CurMsg;
49extern BOOL bUseDflt; 49extern BOOL bUseDflt;
50 50
51extern struct frame *x_window_to_frame ();
52
53/* Structure recording bitmaps and reference count. 51/* Structure recording bitmaps and reference count.
54 If REFCOUNT is 0 then this record is free to be reused. */ 52 If REFCOUNT is 0 then this record is free to be reused. */
55 53
@@ -226,13 +224,16 @@ extern Lisp_Object w32_display_name_list;
226/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ 224/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */
227extern Lisp_Object Vx_pixel_size_width_font_regexp; 225extern Lisp_Object Vx_pixel_size_width_font_regexp;
228 226
229struct w32_display_info *x_display_info_for_name (); 227extern struct frame *x_window_to_frame (struct w32_display_info *, HWND);
228
229struct w32_display_info *x_display_info_for_name (Lisp_Object);
230 230
231Lisp_Object display_x_get_resource (struct w32_display_info *, 231Lisp_Object display_x_get_resource (struct w32_display_info *,
232 Lisp_Object, Lisp_Object, 232 Lisp_Object, Lisp_Object,
233 Lisp_Object, Lisp_Object); 233 Lisp_Object, Lisp_Object);
234 234
235extern struct w32_display_info *w32_term_init (); 235extern struct w32_display_info *w32_term_init (Lisp_Object,
236 char *, char *);
236 237
237extern int x_display_pixel_height (struct w32_display_info *); 238extern int x_display_pixel_height (struct w32_display_info *);
238extern int x_display_pixel_width (struct w32_display_info *); 239extern int x_display_pixel_width (struct w32_display_info *);
@@ -544,8 +545,10 @@ struct scroll_bar {
544#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) 545#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
545 546
546 547
547extern void w32_fill_rect (); 548struct frame; /* from frame.h */
548extern void w32_clear_window (); 549
550extern void w32_fill_rect (struct frame *, HDC, COLORREF, RECT *);
551extern void w32_clear_window (struct frame *);
549 552
550#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \ 553#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \
551do { \ 554do { \
@@ -645,10 +648,10 @@ typedef struct deferred_msg
645 648
646extern CRITICAL_SECTION critsect; 649extern CRITICAL_SECTION critsect;
647 650
648extern void init_crit (); 651extern void init_crit (void);
649extern void delete_crit (); 652extern void delete_crit (void);
650 653
651extern void signal_quit (); 654extern void signal_quit (void);
652 655
653#define enter_crit() EnterCriticalSection (&critsect) 656#define enter_crit() EnterCriticalSection (&critsect)
654#define leave_crit() LeaveCriticalSection (&critsect) 657#define leave_crit() LeaveCriticalSection (&critsect)
@@ -658,14 +661,13 @@ extern void deselect_palette (struct frame * f, HDC hdc);
658extern HDC get_frame_dc (struct frame * f); 661extern HDC get_frame_dc (struct frame * f);
659extern int release_frame_dc (struct frame * f, HDC hDC); 662extern int release_frame_dc (struct frame * f, HDC hDC);
660 663
661extern void drain_message_queue (); 664extern void drain_message_queue (void);
662 665
663extern BOOL get_next_msg (); 666extern BOOL get_next_msg (W32Msg *, BOOL);
664extern BOOL post_msg (); 667extern BOOL post_msg (W32Msg *);
665extern void complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result); 668extern void complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result);
666extern void wait_for_sync ();
667 669
668extern BOOL parse_button (); 670extern BOOL parse_button (int, int, int *, int *);
669 671
670extern void w32_sys_ring_bell (struct frame *f); 672extern void w32_sys_ring_bell (struct frame *f);
671extern void x_delete_display (struct w32_display_info *dpyinfo); 673extern void x_delete_display (struct w32_display_info *dpyinfo);
@@ -725,7 +727,7 @@ struct frame * check_x_frame (Lisp_Object);
725EXFUN (Fx_display_color_p, 1); 727EXFUN (Fx_display_color_p, 1);
726EXFUN (Fx_display_grayscale_p, 1); 728EXFUN (Fx_display_grayscale_p, 1);
727 729
728typedef DWORD (WINAPI * ClipboardSequence_Proc) (); 730typedef DWORD (WINAPI * ClipboardSequence_Proc) (void);
729typedef BOOL (WINAPI * AppendMenuW_Proc) ( 731typedef BOOL (WINAPI * AppendMenuW_Proc) (
730 IN HMENU, 732 IN HMENU,
731 IN UINT, 733 IN UINT,
diff --git a/src/xfaces.c b/src/xfaces.c
index d5aabd40c0c..c0c53f3aa1f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -513,7 +513,6 @@ struct named_merge_point;
513static void map_tty_color (struct frame *, struct face *, 513static void map_tty_color (struct frame *, struct face *,
514 enum lface_attribute_index, int *); 514 enum lface_attribute_index, int *);
515static Lisp_Object resolve_face_name (Lisp_Object, int); 515static Lisp_Object resolve_face_name (Lisp_Object, int);
516static int may_use_scalable_font_p (const char *);
517static void set_font_frame_param (Lisp_Object, Lisp_Object); 516static void set_font_frame_param (Lisp_Object, Lisp_Object);
518static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *, 517static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *,
519 int, struct named_merge_point *); 518 int, struct named_merge_point *);