diff options
| author | Eli Zaretskii | 2015-10-22 19:52:18 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-10-22 19:52:18 +0300 |
| commit | d4352f813a0703cc7f7a873525131b272ef0c105 (patch) | |
| tree | 8fa21fa5d0bfecb3e25bf6453c952c43eb7b8de5 /src | |
| parent | 11d14229dc96d8b44b78a2f35ac0011fbd0f527f (diff) | |
| download | emacs-d4352f813a0703cc7f7a873525131b272ef0c105.tar.gz emacs-d4352f813a0703cc7f7a873525131b272ef0c105.zip | |
Include file cleanup for w32 files in src directory
* src/w32xfns.c: Don't include keyboard.h, window.h, charset.h,
fontset.h, blockinput.h.
* src/w32uniscribe.c: Don't include dispextern.h, character.h,
charset.h, fontset.h.
* src/w32term.c: Don't include systty.h, systime.h, charset.h,
character.h, ccl.h, dispextern.h, disptab.h, intervals.h,
process.h, atimer.h, keymap.h, w32heap.h. Include bitmap/gray.xbm
in an ifdef-ed away block.
Include fcntl.h for CYGWIN.
(set_frame_param): Remove unused function.
* src/w32select.c: Don't include charset.h and composite.h.
(setup_config, Fw32_get_clipboard_data): Avoid compiler warnings
due to pointer signedness mismatches.
* src/w32reg.c (w32_get_string_resource): Avoid compiler warnings
due to pointer signedness mismatches.
* src/w32proc.c: Include unistd.h. Don't include systime.h,
process.h, dispextern.h.
(sys_spawnve, Fw32_short_file_name, Fw32_long_file_name)
(Fw32_application_type): Avoid compiler warnings due to pointer
signedness mismatches.
* src/w32menu.c: Don't include keymap.h, termhooks.h, window.h,
character.h, charset.h, dispextern.h.
(simple_dialog_show, add_menu_item): Avoid compiler warnings due
to pointer signedness mismatches.
* src/w32inevt.c: Don't include dispextern.h, window.h,
termhooks.h, w32heap.h.
* src/w32font.c: Don't include dispextern.h, character.h,
charset.h, fontset.h, font.h.
(intern_font_name, add_font_entity_to_list)
(registry_to_w32_charset, w32_to_x_charset, fill_in_logfont)
(list_all_matching_fonts): Avoid compiler warnings due to pointer
signedness mismatches.
* src/w32fns.c: Don't include character.h, intervals.h,
dispextern.h, epaths.h, charset.h, ccl.h, fontset.h, systime.h,
termhooks.h, w32heap.h, bitmap/gray.xbm, font.h, w32font.h.
(w32_color_map_lookup, add_system_logical_colors_to_map)
(x_decode_color, x_set_name, FPRINTF_WM_CHARS, Fxw_color_defined_p)
(Fxw_color_values, x_display_info_for_name, Fset_message_beep)
(x_create_tip_frame, Fx_file_dialog, Fsystem_move_file_to_trash)
(w32_parse_hot_key, Ffile_system_info, w32_kbd_patch_key): Avoid
compiler warnings, mainly due to pointer signedness mismatches.
(unwind_create_frame_1): Remove unused function.
* src/w32console.c: Don't include character.h, disptab.h, frame.h,
window.h, termhooks.h, dispextern.h.
(w32con_write_glyphs, w32con_write_glyphs_with_face): Fix pointer
signedness mismatch.
* src/w32.c: Include c-strcase.h and systty.h. Don't include
w32heap.h.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 10 | ||||
| -rw-r--r-- | src/w32console.c | 19 | ||||
| -rw-r--r-- | src/w32fns.c | 85 | ||||
| -rw-r--r-- | src/w32font.c | 21 | ||||
| -rw-r--r-- | src/w32heap.c | 2 | ||||
| -rw-r--r-- | src/w32inevt.c | 6 | ||||
| -rw-r--r-- | src/w32menu.c | 17 | ||||
| -rw-r--r-- | src/w32proc.c | 18 | ||||
| -rw-r--r-- | src/w32reg.c | 6 | ||||
| -rw-r--r-- | src/w32select.c | 8 | ||||
| -rw-r--r-- | src/w32term.c | 34 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 4 | ||||
| -rw-r--r-- | src/w32xfns.c | 8 |
13 files changed, 81 insertions, 157 deletions
| @@ -67,7 +67,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 67 | #undef localtime | 67 | #undef localtime |
| 68 | 68 | ||
| 69 | #include "lisp.h" | 69 | #include "lisp.h" |
| 70 | #include "epaths.h" /* for SHELL */ | 70 | #include "epaths.h" /* for PATH_EXEC */ |
| 71 | 71 | ||
| 72 | #include <pwd.h> | 72 | #include <pwd.h> |
| 73 | #include <grp.h> | 73 | #include <grp.h> |
| @@ -224,20 +224,22 @@ typedef struct _REPARSE_DATA_BUFFER { | |||
| 224 | 224 | ||
| 225 | #include <iphlpapi.h> /* should be after winsock2.h */ | 225 | #include <iphlpapi.h> /* should be after winsock2.h */ |
| 226 | 226 | ||
| 227 | #include <c-strcase.h> | ||
| 228 | |||
| 227 | #include "w32.h" | 229 | #include "w32.h" |
| 228 | #include <dirent.h> | 230 | #include <dirent.h> |
| 229 | #include "w32common.h" | 231 | #include "w32common.h" |
| 230 | #include "w32heap.h" | ||
| 231 | #include "w32select.h" | 232 | #include "w32select.h" |
| 232 | #include "systime.h" | 233 | #include "systime.h" /* for current_timespec, struct timespec */ |
| 233 | #include "dispextern.h" /* for xstrcasecmp */ | 234 | #include "dispextern.h" /* for xstrcasecmp */ |
| 234 | #include "coding.h" /* for Vlocale_coding_system */ | 235 | #include "coding.h" /* for Vlocale_coding_system */ |
| 235 | 236 | ||
| 236 | #include "careadlinkat.h" | 237 | #include "careadlinkat.h" |
| 237 | #include "allocator.h" | 238 | #include "allocator.h" |
| 238 | 239 | ||
| 239 | /* For serial_configure and serial_open. */ | 240 | /* For Lisp_Process, serial_configure and serial_open. */ |
| 240 | #include "process.h" | 241 | #include "process.h" |
| 242 | #include "systty.h" | ||
| 241 | 243 | ||
| 242 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) | 244 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) |
| 243 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); | 245 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); |
diff --git a/src/w32console.c b/src/w32console.c index a38a558c226..ec54f83129f 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -28,22 +28,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include <windows.h> | 28 | #include <windows.h> |
| 29 | 29 | ||
| 30 | #include "lisp.h" | 30 | #include "lisp.h" |
| 31 | #include "character.h" | ||
| 32 | #include "coding.h" | 31 | #include "coding.h" |
| 33 | #include "disptab.h" | 32 | #include "termchar.h" /* for FRAME_TTY */ |
| 34 | #include "frame.h" | ||
| 35 | #include "window.h" | ||
| 36 | #include "termhooks.h" | ||
| 37 | #include "termchar.h" | ||
| 38 | #include "dispextern.h" | ||
| 39 | #include "menu.h" /* for tty_menu_show */ | 33 | #include "menu.h" /* for tty_menu_show */ |
| 40 | #include "w32term.h" | 34 | #include "w32term.h" |
| 41 | #include "w32common.h" /* for os_subtype */ | 35 | #include "w32common.h" /* for os_subtype */ |
| 42 | #include "w32inevt.h" | 36 | #include "w32inevt.h" |
| 43 | 37 | ||
| 44 | /* from window.c */ | ||
| 45 | extern Lisp_Object Frecenter (Lisp_Object); | ||
| 46 | |||
| 47 | static void w32con_move_cursor (struct frame *f, int row, int col); | 38 | static void w32con_move_cursor (struct frame *f, int row, int col); |
| 48 | static void w32con_clear_to_end (struct frame *f); | 39 | static void w32con_clear_to_end (struct frame *f); |
| 49 | static void w32con_clear_frame (struct frame *f); | 40 | static void w32con_clear_frame (struct frame *f); |
| @@ -297,7 +288,7 @@ w32con_write_glyphs (struct frame *f, register struct glyph *string, | |||
| 297 | { | 288 | { |
| 298 | DWORD r; | 289 | DWORD r; |
| 299 | WORD char_attr; | 290 | WORD char_attr; |
| 300 | unsigned char *conversion_buffer; | 291 | LPCSTR conversion_buffer; |
| 301 | struct coding_system *coding; | 292 | struct coding_system *coding; |
| 302 | 293 | ||
| 303 | if (len <= 0) | 294 | if (len <= 0) |
| @@ -328,7 +319,7 @@ w32con_write_glyphs (struct frame *f, register struct glyph *string, | |||
| 328 | if (n == len) | 319 | if (n == len) |
| 329 | /* This is the last run. */ | 320 | /* This is the last run. */ |
| 330 | coding->mode |= CODING_MODE_LAST_BLOCK; | 321 | coding->mode |= CODING_MODE_LAST_BLOCK; |
| 331 | conversion_buffer = encode_terminal_code (string, n, coding); | 322 | conversion_buffer = (LPCSTR) encode_terminal_code (string, n, coding); |
| 332 | if (coding->produced > 0) | 323 | if (coding->produced > 0) |
| 333 | { | 324 | { |
| 334 | /* Set the attribute for these characters. */ | 325 | /* Set the attribute for these characters. */ |
| @@ -365,7 +356,7 @@ w32con_write_glyphs_with_face (struct frame *f, register int x, register int y, | |||
| 365 | register struct glyph *string, register int len, | 356 | register struct glyph *string, register int len, |
| 366 | register int face_id) | 357 | register int face_id) |
| 367 | { | 358 | { |
| 368 | unsigned char *conversion_buffer; | 359 | LPCSTR conversion_buffer; |
| 369 | struct coding_system *coding; | 360 | struct coding_system *coding; |
| 370 | 361 | ||
| 371 | if (len <= 0) | 362 | if (len <= 0) |
| @@ -380,7 +371,7 @@ w32con_write_glyphs_with_face (struct frame *f, register int x, register int y, | |||
| 380 | they all have the same face. So this _is_ the last block. */ | 371 | they all have the same face. So this _is_ the last block. */ |
| 381 | coding->mode |= CODING_MODE_LAST_BLOCK; | 372 | coding->mode |= CODING_MODE_LAST_BLOCK; |
| 382 | 373 | ||
| 383 | conversion_buffer = encode_terminal_code (string, len, coding); | 374 | conversion_buffer = (LPCSTR) encode_terminal_code (string, len, coding); |
| 384 | if (coding->produced > 0) | 375 | if (coding->produced > 0) |
| 385 | { | 376 | { |
| 386 | DWORD filled, written; | 377 | DWORD filled, written; |
diff --git a/src/w32fns.c b/src/w32fns.c index 7434215080b..d92352a9802 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -35,24 +35,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | #include "w32term.h" | 35 | #include "w32term.h" |
| 36 | #include "frame.h" | 36 | #include "frame.h" |
| 37 | #include "window.h" | 37 | #include "window.h" |
| 38 | #include "character.h" | ||
| 39 | #include "buffer.h" | 38 | #include "buffer.h" |
| 40 | #include "intervals.h" | ||
| 41 | #include "dispextern.h" | ||
| 42 | #include "keyboard.h" | 39 | #include "keyboard.h" |
| 43 | #include "blockinput.h" | 40 | #include "blockinput.h" |
| 44 | #include "epaths.h" | ||
| 45 | #include "charset.h" | ||
| 46 | #include "coding.h" | 41 | #include "coding.h" |
| 47 | #include "ccl.h" | ||
| 48 | #include "fontset.h" | ||
| 49 | #include "systime.h" | ||
| 50 | #include "termhooks.h" | ||
| 51 | 42 | ||
| 52 | #include "w32common.h" | 43 | #include "w32common.h" |
| 53 | 44 | ||
| 54 | #ifdef WINDOWSNT | 45 | #ifdef WINDOWSNT |
| 55 | #include "w32heap.h" | ||
| 56 | #include <mbstring.h> | 46 | #include <mbstring.h> |
| 57 | #endif /* WINDOWSNT */ | 47 | #endif /* WINDOWSNT */ |
| 58 | 48 | ||
| @@ -62,8 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 62 | #include "w32.h" | 52 | #include "w32.h" |
| 63 | #endif | 53 | #endif |
| 64 | 54 | ||
| 65 | #include "bitmaps/gray.xbm" | ||
| 66 | |||
| 67 | #include <commctrl.h> | 55 | #include <commctrl.h> |
| 68 | #include <commdlg.h> | 56 | #include <commdlg.h> |
| 69 | #include <shellapi.h> | 57 | #include <shellapi.h> |
| @@ -75,9 +63,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 75 | #include <imm.h> | 63 | #include <imm.h> |
| 76 | #include <windowsx.h> | 64 | #include <windowsx.h> |
| 77 | 65 | ||
| 78 | #include "font.h" | ||
| 79 | #include "w32font.h" | ||
| 80 | |||
| 81 | #ifndef FOF_NO_CONNECTED_ELEMENTS | 66 | #ifndef FOF_NO_CONNECTED_ELEMENTS |
| 82 | #define FOF_NO_CONNECTED_ELEMENTS 0x2000 | 67 | #define FOF_NO_CONNECTED_ELEMENTS 0x2000 |
| 83 | #endif | 68 | #endif |
| @@ -759,7 +744,7 @@ w32_color_map_lookup (const char *colorname) | |||
| 759 | 744 | ||
| 760 | tem = XCAR (elt); | 745 | tem = XCAR (elt); |
| 761 | 746 | ||
| 762 | if (lstrcmpi (SDATA (tem), colorname) == 0) | 747 | if (lstrcmpi (SSDATA (tem), colorname) == 0) |
| 763 | { | 748 | { |
| 764 | ret = Fcdr (elt); | 749 | ret = Fcdr (elt); |
| 765 | break; | 750 | break; |
| @@ -802,7 +787,7 @@ add_system_logical_colors_to_map (Lisp_Object *system_colors) | |||
| 802 | strcpy (full_name_buffer, SYSTEM_COLOR_PREFIX); | 787 | strcpy (full_name_buffer, SYSTEM_COLOR_PREFIX); |
| 803 | 788 | ||
| 804 | while (RegEnumValueA (colors_key, index, name_buffer, &name_size, | 789 | while (RegEnumValueA (colors_key, index, name_buffer, &name_size, |
| 805 | NULL, NULL, color_buffer, &color_size) | 790 | NULL, NULL, (LPBYTE)color_buffer, &color_size) |
| 806 | == ERROR_SUCCESS) | 791 | == ERROR_SUCCESS) |
| 807 | { | 792 | { |
| 808 | int r, g, b; | 793 | int r, g, b; |
| @@ -1227,9 +1212,9 @@ x_decode_color (struct frame *f, Lisp_Object arg, int def) | |||
| 1227 | 1212 | ||
| 1228 | CHECK_STRING (arg); | 1213 | CHECK_STRING (arg); |
| 1229 | 1214 | ||
| 1230 | if (strcmp (SDATA (arg), "black") == 0) | 1215 | if (strcmp (SSDATA (arg), "black") == 0) |
| 1231 | return BLACK_PIX_DEFAULT (f); | 1216 | return BLACK_PIX_DEFAULT (f); |
| 1232 | else if (strcmp (SDATA (arg), "white") == 0) | 1217 | else if (strcmp (SSDATA (arg), "white") == 0) |
| 1233 | return WHITE_PIX_DEFAULT (f); | 1218 | return WHITE_PIX_DEFAULT (f); |
| 1234 | 1219 | ||
| 1235 | if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1) | 1220 | if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1) |
| @@ -1237,7 +1222,7 @@ x_decode_color (struct frame *f, Lisp_Object arg, int def) | |||
| 1237 | 1222 | ||
| 1238 | /* w32_defined_color is responsible for coping with failures | 1223 | /* w32_defined_color is responsible for coping with failures |
| 1239 | by looking for a near-miss. */ | 1224 | by looking for a near-miss. */ |
| 1240 | if (w32_defined_color (f, SDATA (arg), &cdef, true)) | 1225 | if (w32_defined_color (f, SSDATA (arg), &cdef, true)) |
| 1241 | return cdef.pixel; | 1226 | return cdef.pixel; |
| 1242 | 1227 | ||
| 1243 | /* defined_color failed; return an ultimate default. */ | 1228 | /* defined_color failed; return an ultimate default. */ |
| @@ -1866,7 +1851,7 @@ x_set_name (struct frame *f, Lisp_Object name, bool explicit) | |||
| 1866 | /* Check for no change needed in this very common case | 1851 | /* Check for no change needed in this very common case |
| 1867 | before we do any consing. */ | 1852 | before we do any consing. */ |
| 1868 | if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name, | 1853 | if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name, |
| 1869 | SDATA (f->name))) | 1854 | SSDATA (f->name))) |
| 1870 | return; | 1855 | return; |
| 1871 | name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name); | 1856 | name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name); |
| 1872 | } | 1857 | } |
| @@ -2955,7 +2940,7 @@ get_wm_chars (HWND aWnd, int *buf, int buflen, int ignore_ctrl, int ctrl, | |||
| 2955 | #ifdef DBG_WM_CHARS | 2940 | #ifdef DBG_WM_CHARS |
| 2956 | # define FPRINTF_WM_CHARS(ARG) fprintf ARG | 2941 | # define FPRINTF_WM_CHARS(ARG) fprintf ARG |
| 2957 | #else | 2942 | #else |
| 2958 | # define FPRINTF_WM_CHARS(ARG) 0 | 2943 | # define FPRINTF_WM_CHARS(ARG) (void)0 |
| 2959 | #endif | 2944 | #endif |
| 2960 | 2945 | ||
| 2961 | /* This is a heuristic only. This is supposed to track the state of the | 2946 | /* This is a heuristic only. This is supposed to track the state of the |
| @@ -3142,25 +3127,25 @@ deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam, | |||
| 3142 | && console_modifiers & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)) | 3127 | && console_modifiers & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED)) |
| 3143 | { | 3128 | { |
| 3144 | type_CtrlAlt = "bB"; /* generic bindable Ctrl-Alt- modifiers */ | 3129 | type_CtrlAlt = "bB"; /* generic bindable Ctrl-Alt- modifiers */ |
| 3145 | if (console_modifiers & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) | 3130 | if ((console_modifiers & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) |
| 3146 | == (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) | 3131 | == (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) |
| 3147 | /* double-Ctrl: | 3132 | /* double-Ctrl: |
| 3148 | e.g. AltGr-rCtrl on some layouts (in this order!) */ | 3133 | e.g. AltGr-rCtrl on some layouts (in this order!) */ |
| 3149 | type_CtrlAlt = "dD"; | 3134 | type_CtrlAlt = "dD"; |
| 3150 | else if (console_modifiers | 3135 | else if ((console_modifiers |
| 3151 | & (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED) | 3136 | & (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED)) |
| 3152 | == (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED)) | 3137 | == (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED)) |
| 3153 | type_CtrlAlt = "lL"; /* Ctrl-Alt- modifiers on the left */ | 3138 | type_CtrlAlt = "lL"; /* Ctrl-Alt- modifiers on the left */ |
| 3154 | else if (!NILP (Vw32_recognize_altgr) | 3139 | else if (!NILP (Vw32_recognize_altgr) |
| 3155 | && (console_modifiers | 3140 | && ((console_modifiers |
| 3156 | & (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED)) | 3141 | & (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED))) |
| 3157 | == (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED)) | 3142 | == (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED)) |
| 3158 | type_CtrlAlt = "gG"; /* modifiers as in AltGr */ | 3143 | type_CtrlAlt = "gG"; /* modifiers as in AltGr */ |
| 3159 | } | 3144 | } |
| 3160 | else if (wmsg.dwModifiers & (alt_modifier | meta_modifier) | 3145 | else if (wmsg.dwModifiers & (alt_modifier | meta_modifier) |
| 3161 | || (console_modifiers | 3146 | || ((console_modifiers |
| 3162 | & (LEFT_WIN_PRESSED | RIGHT_WIN_PRESSED | 3147 | & (LEFT_WIN_PRESSED | RIGHT_WIN_PRESSED |
| 3163 | | APPS_PRESSED | SCROLLLOCK_ON))) | 3148 | | APPS_PRESSED | SCROLLLOCK_ON)))) |
| 3164 | { | 3149 | { |
| 3165 | /* Pure Alt (or combination of Alt, Win, APPS, scrolllock. */ | 3150 | /* Pure Alt (or combination of Alt, Win, APPS, scrolllock. */ |
| 3166 | type_CtrlAlt = "aA"; | 3151 | type_CtrlAlt = "aA"; |
| @@ -4828,12 +4813,6 @@ do_unwind_create_frame (Lisp_Object frame) | |||
| 4828 | } | 4813 | } |
| 4829 | 4814 | ||
| 4830 | static void | 4815 | static void |
| 4831 | unwind_create_frame_1 (Lisp_Object val) | ||
| 4832 | { | ||
| 4833 | inhibit_lisp_code = val; | ||
| 4834 | } | ||
| 4835 | |||
| 4836 | static void | ||
| 4837 | x_default_font_parameter (struct frame *f, Lisp_Object parms) | 4816 | x_default_font_parameter (struct frame *f, Lisp_Object parms) |
| 4838 | { | 4817 | { |
| 4839 | struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); | 4818 | struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); |
| @@ -5239,7 +5218,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, | |||
| 5239 | 5218 | ||
| 5240 | CHECK_STRING (color); | 5219 | CHECK_STRING (color); |
| 5241 | 5220 | ||
| 5242 | if (w32_defined_color (f, SDATA (color), &foo, false)) | 5221 | if (w32_defined_color (f, SSDATA (color), &foo, false)) |
| 5243 | return Qt; | 5222 | return Qt; |
| 5244 | else | 5223 | else |
| 5245 | return Qnil; | 5224 | return Qnil; |
| @@ -5254,7 +5233,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, | |||
| 5254 | 5233 | ||
| 5255 | CHECK_STRING (color); | 5234 | CHECK_STRING (color); |
| 5256 | 5235 | ||
| 5257 | if (w32_defined_color (f, SDATA (color), &foo, false)) | 5236 | if (w32_defined_color (f, SSDATA (color), &foo, false)) |
| 5258 | return list3i ((GetRValue (foo.pixel) << 8) | GetRValue (foo.pixel), | 5237 | return list3i ((GetRValue (foo.pixel) << 8) | GetRValue (foo.pixel), |
| 5259 | (GetGValue (foo.pixel) << 8) | GetGValue (foo.pixel), | 5238 | (GetGValue (foo.pixel) << 8) | GetGValue (foo.pixel), |
| 5260 | (GetBValue (foo.pixel) << 8) | GetBValue (foo.pixel)); | 5239 | (GetBValue (foo.pixel) << 8) | GetBValue (foo.pixel)); |
| @@ -5759,8 +5738,7 @@ x_display_info_for_name (Lisp_Object name) | |||
| 5759 | 5738 | ||
| 5760 | validate_x_resource_name (); | 5739 | validate_x_resource_name (); |
| 5761 | 5740 | ||
| 5762 | dpyinfo = w32_term_init (name, (unsigned char *)0, | 5741 | dpyinfo = w32_term_init (name, NULL, SSDATA (Vx_resource_name)); |
| 5763 | SSDATA (Vx_resource_name)); | ||
| 5764 | 5742 | ||
| 5765 | if (dpyinfo == 0) | 5743 | if (dpyinfo == 0) |
| 5766 | error ("Cannot connect to server %s", SDATA (name)); | 5744 | error ("Cannot connect to server %s", SDATA (name)); |
| @@ -5779,7 +5757,7 @@ terminate Emacs if we can't open the connection. | |||
| 5779 | (In the Nextstep version, the last two arguments are currently ignored.) */) | 5757 | (In the Nextstep version, the last two arguments are currently ignored.) */) |
| 5780 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) | 5758 | (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed) |
| 5781 | { | 5759 | { |
| 5782 | unsigned char *xrm_option; | 5760 | char *xrm_option; |
| 5783 | struct w32_display_info *dpyinfo; | 5761 | struct w32_display_info *dpyinfo; |
| 5784 | 5762 | ||
| 5785 | CHECK_STRING (display); | 5763 | CHECK_STRING (display); |
| @@ -5821,9 +5799,9 @@ terminate Emacs if we can't open the connection. | |||
| 5821 | add_system_logical_colors_to_map (&Vw32_color_map); | 5799 | add_system_logical_colors_to_map (&Vw32_color_map); |
| 5822 | 5800 | ||
| 5823 | if (! NILP (xrm_string)) | 5801 | if (! NILP (xrm_string)) |
| 5824 | xrm_option = SDATA (xrm_string); | 5802 | xrm_option = SSDATA (xrm_string); |
| 5825 | else | 5803 | else |
| 5826 | xrm_option = (unsigned char *) 0; | 5804 | xrm_option = NULL; |
| 5827 | 5805 | ||
| 5828 | /* Use this general default value to start with. */ | 5806 | /* Use this general default value to start with. */ |
| 5829 | /* First remove .exe suffix from invocation-name - it looks ugly. */ | 5807 | /* First remove .exe suffix from invocation-name - it looks ugly. */ |
| @@ -5841,8 +5819,7 @@ terminate Emacs if we can't open the connection. | |||
| 5841 | 5819 | ||
| 5842 | /* This is what opens the connection and sets x_current_display. | 5820 | /* This is what opens the connection and sets x_current_display. |
| 5843 | This also initializes many symbols, such as those used for input. */ | 5821 | This also initializes many symbols, such as those used for input. */ |
| 5844 | dpyinfo = w32_term_init (display, xrm_option, | 5822 | dpyinfo = w32_term_init (display, xrm_option, SSDATA (Vx_resource_name)); |
| 5845 | SSDATA (Vx_resource_name)); | ||
| 5846 | 5823 | ||
| 5847 | if (dpyinfo == 0) | 5824 | if (dpyinfo == 0) |
| 5848 | { | 5825 | { |
| @@ -6097,7 +6074,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, | |||
| 6097 | struct frame *f; | 6074 | struct frame *f; |
| 6098 | Lisp_Object frame; | 6075 | Lisp_Object frame; |
| 6099 | Lisp_Object name; | 6076 | Lisp_Object name; |
| 6100 | long window_prompting = 0; | ||
| 6101 | int width, height; | 6077 | int width, height; |
| 6102 | ptrdiff_t count = SPECPDL_INDEX (); | 6078 | ptrdiff_t count = SPECPDL_INDEX (); |
| 6103 | struct kboard *kb; | 6079 | struct kboard *kb; |
| @@ -6235,7 +6211,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, | |||
| 6235 | f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; | 6211 | f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; |
| 6236 | f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; | 6212 | f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; |
| 6237 | 6213 | ||
| 6238 | window_prompting = x_figure_window_size (f, parms, true, &x_width, &x_height); | 6214 | x_figure_window_size (f, parms, true, &x_width, &x_height); |
| 6239 | 6215 | ||
| 6240 | /* No fringes on tip frame. */ | 6216 | /* No fringes on tip frame. */ |
| 6241 | f->fringe_cols = 0; | 6217 | f->fringe_cols = 0; |
| @@ -6997,9 +6973,9 @@ value of DIR as in previous invocations; this is standard Windows behavior. */) | |||
| 6997 | 6973 | ||
| 6998 | /* We modify these in-place, so make copies for safety. */ | 6974 | /* We modify these in-place, so make copies for safety. */ |
| 6999 | dir = Fcopy_sequence (dir); | 6975 | dir = Fcopy_sequence (dir); |
| 7000 | unixtodos_filename (SDATA (dir)); | 6976 | unixtodos_filename (SSDATA (dir)); |
| 7001 | filename = Fcopy_sequence (filename); | 6977 | filename = Fcopy_sequence (filename); |
| 7002 | unixtodos_filename (SDATA (filename)); | 6978 | unixtodos_filename (SSDATA (filename)); |
| 7003 | if (SBYTES (filename) >= MAX_UTF8_PATH) | 6979 | if (SBYTES (filename) >= MAX_UTF8_PATH) |
| 7004 | report_file_error ("filename too long", default_filename); | 6980 | report_file_error ("filename too long", default_filename); |
| 7005 | if (w32_unicode_filenames) | 6981 | if (w32_unicode_filenames) |
| @@ -7222,7 +7198,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, | |||
| 7222 | 7198 | ||
| 7223 | encoded_file = ENCODE_FILE (filename); | 7199 | encoded_file = ENCODE_FILE (filename); |
| 7224 | 7200 | ||
| 7225 | path = map_w32_filename (SDATA (encoded_file), NULL); | 7201 | path = map_w32_filename (SSDATA (encoded_file), NULL); |
| 7226 | 7202 | ||
| 7227 | /* The Unicode version of SHFileOperation is not supported on | 7203 | /* The Unicode version of SHFileOperation is not supported on |
| 7228 | Windows 9X. */ | 7204 | Windows 9X. */ |
| @@ -7261,7 +7237,8 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash, | |||
| 7261 | /* If a file cannot be represented in ANSI codepage, don't | 7237 | /* If a file cannot be represented in ANSI codepage, don't |
| 7262 | let them inadvertently delete other files because some | 7238 | let them inadvertently delete other files because some |
| 7263 | characters are interpreted as a wildcards. */ | 7239 | characters are interpreted as a wildcards. */ |
| 7264 | if (_mbspbrk (tmp_path_a, "?*")) | 7240 | if (_mbspbrk ((unsigned char *)tmp_path_a, |
| 7241 | (const unsigned char *)"?*")) | ||
| 7265 | result = ERROR_FILE_NOT_FOUND; | 7242 | result = ERROR_FILE_NOT_FOUND; |
| 7266 | else | 7243 | else |
| 7267 | { | 7244 | { |
| @@ -7679,7 +7656,7 @@ w32_parse_hot_key (Lisp_Object key) | |||
| 7679 | c = Fcar (c); | 7656 | c = Fcar (c); |
| 7680 | if (!SYMBOLP (c)) | 7657 | if (!SYMBOLP (c)) |
| 7681 | emacs_abort (); | 7658 | emacs_abort (); |
| 7682 | vk_code = lookup_vk_code (SDATA (SYMBOL_NAME (c))); | 7659 | vk_code = lookup_vk_code (SSDATA (SYMBOL_NAME (c))); |
| 7683 | } | 7660 | } |
| 7684 | else if (INTEGERP (c)) | 7661 | else if (INTEGERP (c)) |
| 7685 | { | 7662 | { |
| @@ -8282,7 +8259,7 @@ If the underlying system call fails, value is nil. */) | |||
| 8282 | char rootname[MAX_UTF8_PATH]; | 8259 | char rootname[MAX_UTF8_PATH]; |
| 8283 | wchar_t rootname_w[MAX_PATH]; | 8260 | wchar_t rootname_w[MAX_PATH]; |
| 8284 | char rootname_a[MAX_PATH]; | 8261 | char rootname_a[MAX_PATH]; |
| 8285 | char *name = SDATA (encoded); | 8262 | char *name = SSDATA (encoded); |
| 8286 | BOOL result; | 8263 | BOOL result; |
| 8287 | 8264 | ||
| 8288 | /* find the root name of the volume if given */ | 8265 | /* find the root name of the volume if given */ |
| @@ -8736,7 +8713,7 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId) | |||
| 8736 | 8713 | ||
| 8737 | event->uChar.UnicodeChar = buf[isdead - 1]; | 8714 | event->uChar.UnicodeChar = buf[isdead - 1]; |
| 8738 | isdead = WideCharToMultiByte (cpId, 0, buf, isdead, | 8715 | isdead = WideCharToMultiByte (cpId, 0, buf, isdead, |
| 8739 | ansi_code, 4, NULL, NULL); | 8716 | (LPSTR)ansi_code, 4, NULL, NULL); |
| 8740 | } | 8717 | } |
| 8741 | else | 8718 | else |
| 8742 | isdead = 0; | 8719 | isdead = 0; |
diff --git a/src/w32font.c b/src/w32font.c index 1c2f9665037..2b6f6109454 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -26,12 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #include "lisp.h" | 26 | #include "lisp.h" |
| 27 | #include "w32term.h" | 27 | #include "w32term.h" |
| 28 | #include "frame.h" | 28 | #include "frame.h" |
| 29 | #include "dispextern.h" | 29 | #include "coding.h" /* for ENCODE_SYSTEM, DECODE_SYSTEM */ |
| 30 | #include "character.h" | ||
| 31 | #include "charset.h" | ||
| 32 | #include "coding.h" | ||
| 33 | #include "fontset.h" | ||
| 34 | #include "font.h" | ||
| 35 | #include "w32font.h" | 30 | #include "w32font.h" |
| 36 | #ifdef WINDOWSNT | 31 | #ifdef WINDOWSNT |
| 37 | #include "w32.h" | 32 | #include "w32.h" |
| @@ -244,7 +239,7 @@ intern_font_name (char * string) | |||
| 244 | Lisp_Object str = DECODE_SYSTEM (build_string (string)); | 239 | Lisp_Object str = DECODE_SYSTEM (build_string (string)); |
| 245 | ptrdiff_t len = SCHARS (str); | 240 | ptrdiff_t len = SCHARS (str); |
| 246 | Lisp_Object obarray = check_obarray (Vobarray); | 241 | Lisp_Object obarray = check_obarray (Vobarray); |
| 247 | Lisp_Object tem = oblookup (obarray, SDATA (str), len, len); | 242 | Lisp_Object tem = oblookup (obarray, SSDATA (str), len, len); |
| 248 | /* This code is similar to intern function from lread.c. */ | 243 | /* This code is similar to intern function from lread.c. */ |
| 249 | return SYMBOLP (tem) ? tem : intern_driver (str, obarray, tem); | 244 | return SYMBOLP (tem) ? tem : intern_driver (str, obarray, tem); |
| 250 | } | 245 | } |
| @@ -1478,12 +1473,12 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font, | |||
| 1478 | by a foundry, we accept raster fonts if the font name is found | 1473 | by a foundry, we accept raster fonts if the font name is found |
| 1479 | anywhere within the full name. */ | 1474 | anywhere within the full name. */ |
| 1480 | if ((logical_font->elfLogFont.lfOutPrecision == OUT_STRING_PRECIS | 1475 | if ((logical_font->elfLogFont.lfOutPrecision == OUT_STRING_PRECIS |
| 1481 | && !strstr (logical_font->elfFullName, | 1476 | && !strstr ((char *)logical_font->elfFullName, |
| 1482 | logical_font->elfLogFont.lfFaceName)) | 1477 | logical_font->elfLogFont.lfFaceName)) |
| 1483 | /* Check for well known substitutions that mess things up in the | 1478 | /* Check for well known substitutions that mess things up in the |
| 1484 | presence of Type-1 fonts of the same name. */ | 1479 | presence of Type-1 fonts of the same name. */ |
| 1485 | || (!check_face_name (&logical_font->elfLogFont, | 1480 | || (!check_face_name (&logical_font->elfLogFont, |
| 1486 | logical_font->elfFullName))) | 1481 | (char *)logical_font->elfFullName))) |
| 1487 | return 1; | 1482 | return 1; |
| 1488 | 1483 | ||
| 1489 | /* Make a font entity for the font. */ | 1484 | /* Make a font entity for the font. */ |
| @@ -1660,7 +1655,7 @@ registry_to_w32_charset (Lisp_Object charset) | |||
| 1660 | else if (EQ (charset, Qiso8859_1)) | 1655 | else if (EQ (charset, Qiso8859_1)) |
| 1661 | return ANSI_CHARSET; | 1656 | return ANSI_CHARSET; |
| 1662 | else if (SYMBOLP (charset)) | 1657 | else if (SYMBOLP (charset)) |
| 1663 | return x_to_w32_charset (SDATA (SYMBOL_NAME (charset))); | 1658 | return x_to_w32_charset (SSDATA (SYMBOL_NAME (charset))); |
| 1664 | else | 1659 | else |
| 1665 | return DEFAULT_CHARSET; | 1660 | return DEFAULT_CHARSET; |
| 1666 | } | 1661 | } |
| @@ -1782,7 +1777,7 @@ w32_to_x_charset (int fncharset, char *matching) | |||
| 1782 | || !SYMBOLP (XCAR (XCDR (this_entry)))) | 1777 | || !SYMBOLP (XCAR (XCDR (this_entry)))) |
| 1783 | continue; | 1778 | continue; |
| 1784 | 1779 | ||
| 1785 | x_charset = SDATA (XCAR (this_entry)); | 1780 | x_charset = SSDATA (XCAR (this_entry)); |
| 1786 | w32_charset = XCAR (XCDR (this_entry)); | 1781 | w32_charset = XCAR (XCDR (this_entry)); |
| 1787 | codepage = XCDR (XCDR (this_entry)); | 1782 | codepage = XCDR (XCDR (this_entry)); |
| 1788 | 1783 | ||
| @@ -1987,7 +1982,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec) | |||
| 1987 | else if (SYMBOLP (tmp)) | 1982 | else if (SYMBOLP (tmp)) |
| 1988 | { | 1983 | { |
| 1989 | strncpy (logfont->lfFaceName, | 1984 | strncpy (logfont->lfFaceName, |
| 1990 | SDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE); | 1985 | SSDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE); |
| 1991 | logfont->lfFaceName[LF_FACESIZE-1] = '\0'; | 1986 | logfont->lfFaceName[LF_FACESIZE-1] = '\0'; |
| 1992 | } | 1987 | } |
| 1993 | } | 1988 | } |
| @@ -2083,7 +2078,7 @@ list_all_matching_fonts (struct font_callback_data *match_data) | |||
| 2083 | if (NILP (family)) | 2078 | if (NILP (family)) |
| 2084 | continue; | 2079 | continue; |
| 2085 | else if (SYMBOLP (family)) | 2080 | else if (SYMBOLP (family)) |
| 2086 | name = SDATA (ENCODE_SYSTEM (SYMBOL_NAME (family))); | 2081 | name = SSDATA (ENCODE_SYSTEM (SYMBOL_NAME (family))); |
| 2087 | else | 2082 | else |
| 2088 | continue; | 2083 | continue; |
| 2089 | 2084 | ||
diff --git a/src/w32heap.c b/src/w32heap.c index 60afd1d3174..a74e7adc5ff 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | #include <sys/mman.h> | 52 | #include <sys/mman.h> |
| 53 | #include "w32common.h" | 53 | #include "w32common.h" |
| 54 | #include "w32heap.h" | 54 | #include "w32heap.h" |
| 55 | #include "lisp.h" /* for VALMASK */ | 55 | #include "lisp.h" |
| 56 | 56 | ||
| 57 | /* We chose to leave those declarations here. They are used only in | 57 | /* We chose to leave those declarations here. They are used only in |
| 58 | this file. The RtlCreateHeap is available since XP. It is located | 58 | this file. The RtlCreateHeap is available since XP. It is located |
diff --git a/src/w32inevt.c b/src/w32inevt.c index ea2db26a60e..db2e2189952 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -37,12 +37,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | #include "lisp.h" | 37 | #include "lisp.h" |
| 38 | #include "keyboard.h" | 38 | #include "keyboard.h" |
| 39 | #include "frame.h" | 39 | #include "frame.h" |
| 40 | #include "dispextern.h" | ||
| 41 | #include "window.h" | ||
| 42 | #include "blockinput.h" | 40 | #include "blockinput.h" |
| 43 | #include "termhooks.h" | 41 | #include "termchar.h" /* for Mouse_HLInfo, tty_display_info */ |
| 44 | #include "termchar.h" | ||
| 45 | #include "w32heap.h" | ||
| 46 | #include "w32term.h" | 42 | #include "w32term.h" |
| 47 | #include "w32inevt.h" | 43 | #include "w32inevt.h" |
| 48 | 44 | ||
diff --git a/src/w32menu.c b/src/w32menu.c index 40b8f5f82a0..6af69f482d4 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -25,15 +25,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 25 | 25 | ||
| 26 | #include "lisp.h" | 26 | #include "lisp.h" |
| 27 | #include "keyboard.h" | 27 | #include "keyboard.h" |
| 28 | #include "keymap.h" | ||
| 29 | #include "frame.h" | 28 | #include "frame.h" |
| 30 | #include "termhooks.h" | ||
| 31 | #include "window.h" | ||
| 32 | #include "blockinput.h" | 29 | #include "blockinput.h" |
| 33 | #include "character.h" | ||
| 34 | #include "buffer.h" | 30 | #include "buffer.h" |
| 35 | #include "charset.h" | 31 | #include "coding.h" /* for ENCODE_SYSTEM */ |
| 36 | #include "coding.h" | ||
| 37 | #include "menu.h" | 32 | #include "menu.h" |
| 38 | 33 | ||
| 39 | /* This may include sys/types.h, and that somehow loses | 34 | /* This may include sys/types.h, and that somehow loses |
| @@ -54,8 +49,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 54 | #include <sys/types.h> | 49 | #include <sys/types.h> |
| 55 | #endif | 50 | #endif |
| 56 | 51 | ||
| 57 | #include "dispextern.h" | ||
| 58 | |||
| 59 | #include "w32common.h" /* for osinfo_cache */ | 52 | #include "w32common.h" /* for osinfo_cache */ |
| 60 | 53 | ||
| 61 | #undef HAVE_DIALOGS /* TODO: Implement native dialogs. */ | 54 | #undef HAVE_DIALOGS /* TODO: Implement native dialogs. */ |
| @@ -1104,14 +1097,14 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header) | |||
| 1104 | 1097 | ||
| 1105 | if (STRINGP (temp)) | 1098 | if (STRINGP (temp)) |
| 1106 | { | 1099 | { |
| 1107 | char *utf8_text = SDATA (ENCODE_UTF_8 (temp)); | 1100 | char *utf8_text = SSDATA (ENCODE_UTF_8 (temp)); |
| 1108 | /* Be pessimistic about the number of characters needed. | 1101 | /* Be pessimistic about the number of characters needed. |
| 1109 | Remember characters outside the BMP will take more than | 1102 | Remember characters outside the BMP will take more than |
| 1110 | one utf16 word, so we cannot simply use the character | 1103 | one utf16 word, so we cannot simply use the character |
| 1111 | length of temp. */ | 1104 | length of temp. */ |
| 1112 | int utf8_len = strlen (utf8_text); | 1105 | int utf8_len = strlen (utf8_text); |
| 1113 | text = SAFE_ALLOCA ((utf8_len + 1) * sizeof (WCHAR)); | 1106 | text = SAFE_ALLOCA ((utf8_len + 1) * sizeof (WCHAR)); |
| 1114 | utf8to16 (utf8_text, utf8_len, text); | 1107 | utf8to16 ((unsigned char *)utf8_text, utf8_len, text); |
| 1115 | } | 1108 | } |
| 1116 | else | 1109 | else |
| 1117 | { | 1110 | { |
| @@ -1140,7 +1133,7 @@ simple_dialog_show (struct frame *f, Lisp_Object contents, Lisp_Object header) | |||
| 1140 | encoding so questions representable by the system codepage | 1133 | encoding so questions representable by the system codepage |
| 1141 | are encoded properly. */ | 1134 | are encoded properly. */ |
| 1142 | if (STRINGP (temp)) | 1135 | if (STRINGP (temp)) |
| 1143 | text = SDATA (ENCODE_SYSTEM (temp)); | 1136 | text = SSDATA (ENCODE_SYSTEM (temp)); |
| 1144 | else | 1137 | else |
| 1145 | text = ""; | 1138 | text = ""; |
| 1146 | 1139 | ||
| @@ -1353,7 +1346,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1353 | else | 1346 | else |
| 1354 | utf16_string = SAFE_ALLOCA ((utf8_len + 1) * sizeof (WCHAR)); | 1347 | utf16_string = SAFE_ALLOCA ((utf8_len + 1) * sizeof (WCHAR)); |
| 1355 | 1348 | ||
| 1356 | utf8to16 (out_string, utf8_len, utf16_string); | 1349 | utf8to16 ((unsigned char *)out_string, utf8_len, utf16_string); |
| 1357 | return_value = unicode_append_menu (menu, fuFlags, | 1350 | return_value = unicode_append_menu (menu, fuFlags, |
| 1358 | item != NULL ? (UINT_PTR) item | 1351 | item != NULL ? (UINT_PTR) item |
| 1359 | : (UINT_PTR) wv->call_data, | 1352 | : (UINT_PTR) wv->call_data, |
diff --git a/src/w32proc.c b/src/w32proc.c index 6659ed7499e..8a1e17ec38f 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -29,6 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include <ctype.h> | 29 | #include <ctype.h> |
| 30 | #include <io.h> | 30 | #include <io.h> |
| 31 | #include <fcntl.h> | 31 | #include <fcntl.h> |
| 32 | #include <unistd.h> | ||
| 32 | #include <signal.h> | 33 | #include <signal.h> |
| 33 | #include <sys/file.h> | 34 | #include <sys/file.h> |
| 34 | #include <mbstring.h> | 35 | #include <mbstring.h> |
| @@ -59,12 +60,9 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD); | |||
| 59 | #include "w32.h" | 60 | #include "w32.h" |
| 60 | #include "w32common.h" | 61 | #include "w32common.h" |
| 61 | #include "w32heap.h" | 62 | #include "w32heap.h" |
| 62 | #include "systime.h" | 63 | #include "syswait.h" /* for WNOHANG */ |
| 63 | #include "syswait.h" | ||
| 64 | #include "process.h" | ||
| 65 | #include "syssignal.h" | 64 | #include "syssignal.h" |
| 66 | #include "w32term.h" | 65 | #include "w32term.h" |
| 67 | #include "dispextern.h" /* for xstrcasecmp */ | ||
| 68 | #include "coding.h" | 66 | #include "coding.h" |
| 69 | 67 | ||
| 70 | #define RVA_TO_PTR(var,section,filedata) \ | 68 | #define RVA_TO_PTR(var,section,filedata) \ |
| @@ -1757,7 +1755,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 1757 | return -1; | 1755 | return -1; |
| 1758 | } | 1756 | } |
| 1759 | program = ENCODE_FILE (full); | 1757 | program = ENCODE_FILE (full); |
| 1760 | cmdname = SDATA (program); | 1758 | cmdname = SSDATA (program); |
| 1761 | } | 1759 | } |
| 1762 | else | 1760 | else |
| 1763 | { | 1761 | { |
| @@ -1779,7 +1777,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 1779 | /* We explicitly require that the command's file name be encodable | 1777 | /* We explicitly require that the command's file name be encodable |
| 1780 | in the current ANSI codepage, because we will be invoking it via | 1778 | in the current ANSI codepage, because we will be invoking it via |
| 1781 | the ANSI APIs. */ | 1779 | the ANSI APIs. */ |
| 1782 | if (_mbspbrk (cmdname_a, "?")) | 1780 | if (_mbspbrk ((unsigned char *)cmdname_a, (const unsigned char *)"?")) |
| 1783 | { | 1781 | { |
| 1784 | errno = ENOENT; | 1782 | errno = ENOENT; |
| 1785 | return -1; | 1783 | return -1; |
| @@ -2881,7 +2879,7 @@ All path elements in FILENAME are converted to their short names. */) | |||
| 2881 | filename = Fexpand_file_name (filename, Qnil); | 2879 | filename = Fexpand_file_name (filename, Qnil); |
| 2882 | 2880 | ||
| 2883 | /* luckily, this returns the short version of each element in the path. */ | 2881 | /* luckily, this returns the short version of each element in the path. */ |
| 2884 | if (w32_get_short_filename (SDATA (ENCODE_FILE (filename)), | 2882 | if (w32_get_short_filename (SSDATA (ENCODE_FILE (filename)), |
| 2885 | shortname, MAX_PATH) == 0) | 2883 | shortname, MAX_PATH) == 0) |
| 2886 | return Qnil; | 2884 | return Qnil; |
| 2887 | 2885 | ||
| @@ -2911,7 +2909,7 @@ All path elements in FILENAME are converted to their long names. */) | |||
| 2911 | /* first expand it. */ | 2909 | /* first expand it. */ |
| 2912 | filename = Fexpand_file_name (filename, Qnil); | 2910 | filename = Fexpand_file_name (filename, Qnil); |
| 2913 | 2911 | ||
| 2914 | if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, | 2912 | if (!w32_get_long_filename (SSDATA (ENCODE_FILE (filename)), longname, |
| 2915 | MAX_UTF8_PATH)) | 2913 | MAX_UTF8_PATH)) |
| 2916 | return Qnil; | 2914 | return Qnil; |
| 2917 | 2915 | ||
| @@ -3011,12 +3009,12 @@ such programs cannot be invoked by Emacs anyway. */) | |||
| 3011 | 3009 | ||
| 3012 | program = Fexpand_file_name (program, Qnil); | 3010 | program = Fexpand_file_name (program, Qnil); |
| 3013 | encoded_progname = ENCODE_FILE (program); | 3011 | encoded_progname = ENCODE_FILE (program); |
| 3014 | progname = SDATA (encoded_progname); | 3012 | progname = SSDATA (encoded_progname); |
| 3015 | unixtodos_filename (progname); | 3013 | unixtodos_filename (progname); |
| 3016 | filename_to_ansi (progname, progname_a); | 3014 | filename_to_ansi (progname, progname_a); |
| 3017 | /* Reject file names that cannot be encoded in the current ANSI | 3015 | /* Reject file names that cannot be encoded in the current ANSI |
| 3018 | codepage. */ | 3016 | codepage. */ |
| 3019 | if (_mbspbrk (progname_a, "?")) | 3017 | if (_mbspbrk ((unsigned char *)progname_a, (const unsigned char *)"?")) |
| 3020 | return Qunknown; | 3018 | return Qunknown; |
| 3021 | 3019 | ||
| 3022 | if (w32_executable_type (progname_a, &is_dos_app, &is_cygwin_app, | 3020 | if (w32_executable_type (progname_a, &is_dos_app, &is_cygwin_app, |
diff --git a/src/w32reg.c b/src/w32reg.c index 261cfcd09de..a4ce2187043 100644 --- a/src/w32reg.c +++ b/src/w32reg.c | |||
| @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "w32term.h" | 24 | #include "w32term.h" /* for XrmDatabase, xrdb */ |
| 25 | #include "blockinput.h" | 25 | #include "blockinput.h" |
| 26 | 26 | ||
| 27 | #include <stdio.h> | 27 | #include <stdio.h> |
| @@ -73,7 +73,7 @@ w32_get_rdb_resource (char *rdb, const char *resource) | |||
| 73 | return NULL; | 73 | return NULL; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | static LPBYTE | 76 | static char * |
| 77 | w32_get_string_resource (const char *name, const char *class, DWORD dwexptype) | 77 | w32_get_string_resource (const char *name, const char *class, DWORD dwexptype) |
| 78 | { | 78 | { |
| 79 | LPBYTE lpvalue = NULL; | 79 | LPBYTE lpvalue = NULL; |
| @@ -134,7 +134,7 @@ w32_get_string_resource (const char *name, const char *class, DWORD dwexptype) | |||
| 134 | /* Check if there are Windows specific defaults defined. */ | 134 | /* Check if there are Windows specific defaults defined. */ |
| 135 | return w32_get_rdb_resource (SYSTEM_DEFAULT_RESOURCES, name); | 135 | return w32_get_rdb_resource (SYSTEM_DEFAULT_RESOURCES, name); |
| 136 | } | 136 | } |
| 137 | return (lpvalue); | 137 | return (char *)lpvalue; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | /* Retrieve the string resource specified by NAME with CLASS from | 140 | /* Retrieve the string resource specified by NAME with CLASS from |
diff --git a/src/w32select.c b/src/w32select.c index 3c554c622ae..3962ac6cbed 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -76,11 +76,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 76 | #include "lisp.h" | 76 | #include "lisp.h" |
| 77 | #include "w32common.h" /* os_subtype */ | 77 | #include "w32common.h" /* os_subtype */ |
| 78 | #include "w32term.h" /* for all of the w32 includes */ | 78 | #include "w32term.h" /* for all of the w32 includes */ |
| 79 | #include "keyboard.h" | 79 | #include "keyboard.h" /* for waiting_for_input */ |
| 80 | #include "blockinput.h" | 80 | #include "blockinput.h" |
| 81 | #include "charset.h" | ||
| 82 | #include "coding.h" | 81 | #include "coding.h" |
| 83 | #include "composite.h" | ||
| 84 | 82 | ||
| 85 | #ifdef CYGWIN | 83 | #ifdef CYGWIN |
| 86 | #include <string.h> | 84 | #include <string.h> |
| @@ -513,7 +511,7 @@ setup_config (void) | |||
| 513 | cfg_clipboard_type = CF_TEXT; | 511 | cfg_clipboard_type = CF_TEXT; |
| 514 | 512 | ||
| 515 | /* Interpret the coding system symbol name */ | 513 | /* Interpret the coding system symbol name */ |
| 516 | coding_name = SDATA (SYMBOL_NAME (cfg_coding_system)); | 514 | coding_name = SSDATA (SYMBOL_NAME (cfg_coding_system)); |
| 517 | 515 | ||
| 518 | /* "(.*-)?utf-16.*" -> CF_UNICODETEXT */ | 516 | /* "(.*-)?utf-16.*" -> CF_UNICODETEXT */ |
| 519 | cp = strstr (coding_name, "utf-16"); | 517 | cp = strstr (coding_name, "utf-16"); |
| @@ -857,7 +855,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | |||
| 857 | { | 855 | { |
| 858 | int i; | 856 | int i; |
| 859 | 857 | ||
| 860 | nbytes = strlen (src); | 858 | nbytes = strlen ((char *)src); |
| 861 | 859 | ||
| 862 | for (i = 0; i < nbytes; i++) | 860 | for (i = 0; i < nbytes; i++) |
| 863 | { | 861 | { |
diff --git a/src/w32term.c b/src/w32term.c index bd6070f9091..83178672679 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -24,37 +24,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 24 | #include "blockinput.h" | 24 | #include "blockinput.h" |
| 25 | #include "w32term.h" | 25 | #include "w32term.h" |
| 26 | 26 | ||
| 27 | #include "systty.h" | ||
| 28 | #include "systime.h" | ||
| 29 | |||
| 30 | #include <ctype.h> | 27 | #include <ctype.h> |
| 31 | #include <errno.h> | 28 | #include <errno.h> |
| 32 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
| 30 | #ifdef CYGWIN | ||
| 31 | #include <fcntl.h> /* for O_RDWR */ | ||
| 32 | #endif | ||
| 33 | #include <imm.h> | 33 | #include <imm.h> |
| 34 | 34 | ||
| 35 | #include "charset.h" | ||
| 36 | #include "character.h" | ||
| 37 | #include "coding.h" | 35 | #include "coding.h" |
| 38 | #include "ccl.h" | ||
| 39 | #include "frame.h" | 36 | #include "frame.h" |
| 40 | #include "dispextern.h" | ||
| 41 | #include "fontset.h" | 37 | #include "fontset.h" |
| 42 | #include "termhooks.h" | 38 | #include "termhooks.h" |
| 43 | #include "termopts.h" | 39 | #include "termopts.h" |
| 44 | #include "termchar.h" | 40 | #include "termchar.h" |
| 45 | #include "disptab.h" | ||
| 46 | #include "buffer.h" | 41 | #include "buffer.h" |
| 47 | #include "window.h" | 42 | #include "window.h" |
| 48 | #include "keyboard.h" | 43 | #include "keyboard.h" |
| 49 | #include "intervals.h" | 44 | #include "menu.h" /* for w32_menu_show */ |
| 50 | #include "process.h" | ||
| 51 | #include "atimer.h" | ||
| 52 | #include "keymap.h" | ||
| 53 | #include "menu.h" | ||
| 54 | 45 | ||
| 55 | #ifdef WINDOWSNT | 46 | #ifdef WINDOWSNT |
| 56 | #include "w32.h" /* for filename_from_utf16, filename_from_ansi */ | 47 | #include "w32.h" /* for filename_from_utf16, filename_from_ansi */ |
| 57 | #include "w32heap.h" | ||
| 58 | #endif | 48 | #endif |
| 59 | 49 | ||
| 60 | #ifndef WINDOWSNT | 50 | #ifndef WINDOWSNT |
| @@ -65,6 +55,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 65 | 55 | ||
| 66 | #include "font.h" | 56 | #include "font.h" |
| 67 | #include "w32font.h" | 57 | #include "w32font.h" |
| 58 | |||
| 59 | #if 0 /* TODO: stipple */ | ||
| 60 | #include "bitmaps/gray.xbm" | ||
| 61 | #endif | ||
| 68 | 62 | ||
| 69 | /* Fringe bitmaps. */ | 63 | /* Fringe bitmaps. */ |
| 70 | 64 | ||
| @@ -4509,18 +4503,6 @@ x_scroll_bar_clear (struct frame *f) | |||
| 4509 | } | 4503 | } |
| 4510 | } | 4504 | } |
| 4511 | 4505 | ||
| 4512 | static void | ||
| 4513 | set_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val) | ||
| 4514 | { | ||
| 4515 | register Lisp_Object old_alist_elt; | ||
| 4516 | |||
| 4517 | old_alist_elt = Fassq (prop, f->param_alist); | ||
| 4518 | if (EQ (old_alist_elt, Qnil)) | ||
| 4519 | fset_param_alist (f, Fcons (Fcons (prop, val), f->param_alist)); | ||
| 4520 | else | ||
| 4521 | Fsetcdr (old_alist_elt, val); | ||
| 4522 | } | ||
| 4523 | |||
| 4524 | /* The main W32 event-reading loop - w32_read_socket. */ | 4506 | /* The main W32 event-reading loop - w32_read_socket. */ |
| 4525 | 4507 | ||
| 4526 | /* Record the last 100 characters stored | 4508 | /* Record the last 100 characters stored |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index e5efec77c0f..a8b5932f73a 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -33,11 +33,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #include "lisp.h" | 33 | #include "lisp.h" |
| 34 | #include "w32term.h" | 34 | #include "w32term.h" |
| 35 | #include "frame.h" | 35 | #include "frame.h" |
| 36 | #include "dispextern.h" | ||
| 37 | #include "character.h" | ||
| 38 | #include "charset.h" | ||
| 39 | #include "composite.h" | 36 | #include "composite.h" |
| 40 | #include "fontset.h" | ||
| 41 | #include "font.h" | 37 | #include "font.h" |
| 42 | #include "w32font.h" | 38 | #include "w32font.h" |
| 43 | 39 | ||
diff --git a/src/w32xfns.c b/src/w32xfns.c index 35e12fd10e6..48da14dc8e3 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -20,16 +20,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | #include <signal.h> | 21 | #include <signal.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <windows.h> | ||
| 24 | #include <windowsx.h> | ||
| 23 | 25 | ||
| 24 | #include "lisp.h" | 26 | #include "lisp.h" |
| 25 | #include "keyboard.h" | ||
| 26 | #include "frame.h" | 27 | #include "frame.h" |
| 27 | #include "window.h" | ||
| 28 | #include "charset.h" | ||
| 29 | #include "fontset.h" | ||
| 30 | #include "blockinput.h" | ||
| 31 | #include "w32term.h" | 28 | #include "w32term.h" |
| 32 | #include "windowsx.h" | ||
| 33 | 29 | ||
| 34 | #define myalloc(cb) GlobalAllocPtr (GPTR, cb) | 30 | #define myalloc(cb) GlobalAllocPtr (GPTR, cb) |
| 35 | #define myfree(lp) GlobalFreePtr (lp) | 31 | #define myfree(lp) GlobalFreePtr (lp) |