summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-10-22 19:52:18 +0300
committerEli Zaretskii <eliz@gnu.org>2015-10-22 19:52:18 +0300
commitd4352f813a0703cc7f7a873525131b272ef0c105 (patch)
tree8fa21fa5d0bfecb3e25bf6453c952c43eb7b8de5 /src/w32proc.c
parent11d14229dc96d8b44b78a2f35ac0011fbd0f527f (diff)
downloademacs-d4352f813a0703cc7f7a873525131b272ef0c105.tar.gz
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/w32proc.c')
-rw-r--r--src/w32proc.c18
1 files changed, 8 insertions, 10 deletions
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/>. */
#include <ctype.h>
#include <io.h>
#include <fcntl.h>
+#include <unistd.h>
#include <signal.h>
#include <sys/file.h>
#include <mbstring.h>
@@ -59,12 +60,9 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
#include "w32.h"
#include "w32common.h"
#include "w32heap.h"
-#include "systime.h"
-#include "syswait.h"
-#include "process.h"
+#include "syswait.h" /* for WNOHANG */
#include "syssignal.h"
#include "w32term.h"
-#include "dispextern.h" /* for xstrcasecmp */
#include "coding.h"
#define RVA_TO_PTR(var,section,filedata) \
@@ -1757,7 +1755,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
return -1;
}
program = ENCODE_FILE (full);
- cmdname = SDATA (program);
+ cmdname = SSDATA (program);
}
else
{
@@ -1779,7 +1777,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
/* We explicitly require that the command's file name be encodable
in the current ANSI codepage, because we will be invoking it via
the ANSI APIs. */
- if (_mbspbrk (cmdname_a, "?"))
+ if (_mbspbrk ((unsigned char *)cmdname_a, (const unsigned char *)"?"))
{
errno = ENOENT;
return -1;
@@ -2881,7 +2879,7 @@ All path elements in FILENAME are converted to their short names. */)
filename = Fexpand_file_name (filename, Qnil);
/* luckily, this returns the short version of each element in the path. */
- if (w32_get_short_filename (SDATA (ENCODE_FILE (filename)),
+ if (w32_get_short_filename (SSDATA (ENCODE_FILE (filename)),
shortname, MAX_PATH) == 0)
return Qnil;
@@ -2911,7 +2909,7 @@ All path elements in FILENAME are converted to their long names. */)
/* first expand it. */
filename = Fexpand_file_name (filename, Qnil);
- if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname,
+ if (!w32_get_long_filename (SSDATA (ENCODE_FILE (filename)), longname,
MAX_UTF8_PATH))
return Qnil;
@@ -3011,12 +3009,12 @@ such programs cannot be invoked by Emacs anyway. */)
program = Fexpand_file_name (program, Qnil);
encoded_progname = ENCODE_FILE (program);
- progname = SDATA (encoded_progname);
+ progname = SSDATA (encoded_progname);
unixtodos_filename (progname);
filename_to_ansi (progname, progname_a);
/* Reject file names that cannot be encoded in the current ANSI
codepage. */
- if (_mbspbrk (progname_a, "?"))
+ if (_mbspbrk ((unsigned char *)progname_a, (const unsigned char *)"?"))
return Qunknown;
if (w32_executable_type (progname_a, &is_dos_app, &is_cygwin_app,