comparison src/ntproc.c @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 501cfd01ee6d
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
22 Adapted from alarm.c by Tim Fleehart */ 22 Adapted from alarm.c by Tim Fleehart */
23 23
24 /* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */ 24 /* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */
25 /* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */ 25 /* Synced with FSF Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */
26 26
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <errno.h>
30 #include <io.h>
31 #include <fcntl.h>
32 #include <signal.h>
33
34 /* must include CRT headers *before* config.h */
35 /* #### I don't believe it - martin */
36 #include <config.h> 27 #include <config.h>
37 #undef signal 28 #undef signal
38 #undef wait 29 #undef wait
39 #undef spawnve 30 #undef spawnve
40 #undef select 31 #undef select
41 #undef kill 32 #undef kill
42 33
43 #include <windows.h> 34 #include <windows.h>
44 #include <sys/socket.h>
45 #ifdef HAVE_A_OUT_H 35 #ifdef HAVE_A_OUT_H
46 #include <a.out.h> 36 #include <a.out.h>
47 #endif 37 #endif
48 #include "lisp.h" 38 #include "lisp.h"
49 #include "sysproc.h" 39 #include "sysproc.h"
109 va_end (args); 99 va_end (args);
110 OutputDebugString (buf); 100 OutputDebugString (buf);
111 #endif 101 #endif
112 } 102 }
113 103
114 /* sys_signal moved to nt.c. It's now called msw_signal... */ 104 /* sys_signal moved to nt.c. It's now called mswindows_signal... */
115 105
116 /* Defined in <process.h> which conflicts with the local copy */ 106 /* Defined in <process.h> which conflicts with the local copy */
117 #define _P_NOWAIT 1 107 #define _P_NOWAIT 1
118 108
119 /* Child process management list. */ 109 /* Child process management list. */
789 { 779 {
790 char window_class[32]; 780 char window_class[32];
791 781
792 GetClassName (hwnd, window_class, sizeof (window_class)); 782 GetClassName (hwnd, window_class, sizeof (window_class));
793 if (strcmp (window_class, 783 if (strcmp (window_class,
794 msw_windows9x_p() 784 mswindows_windows9x_p()
795 ? "tty" 785 ? "tty"
796 : "ConsoleWindowClass") == 0) 786 : "ConsoleWindowClass") == 0)
797 { 787 {
798 cp->hwnd = hwnd; 788 cp->hwnd = hwnd;
799 return FALSE; 789 return FALSE;
882 else 872 else
883 { 873 {
884 if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd) 874 if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd)
885 { 875 {
886 #if 1 876 #if 1
887 if (msw_windows9x_p()) 877 if (mswindows_windows9x_p())
888 { 878 {
889 /* 879 /*
890 Another possibility is to try terminating the VDM out-right by 880 Another possibility is to try terminating the VDM out-right by
891 calling the Shell VxD (id 0x17) V86 interface, function #4 881 calling the Shell VxD (id 0x17) V86 interface, function #4
892 "SHELL_Destroy_VM", ie. 882 "SHELL_Destroy_VM", ie.
1036 } 1026 }
1037 1027
1038 /* Some miscellaneous functions that are Windows specific, but not GUI 1028 /* Some miscellaneous functions that are Windows specific, but not GUI
1039 specific (ie. are applicable in terminal or batch mode as well). */ 1029 specific (ie. are applicable in terminal or batch mode as well). */
1040 1030
1041 /* lifted from fileio.c */
1042 #define CORRECT_DIR_SEPS(s) \
1043 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
1044 else unixtodos_filename (s); \
1045 } while (0)
1046
1047 DEFUN ("win32-short-file-name", Fwin32_short_file_name, 1, 1, "", /* 1031 DEFUN ("win32-short-file-name", Fwin32_short_file_name, 1, 1, "", /*
1048 Return the short file name version (8.3) of the full path of FILENAME. 1032 Return the short file name version (8.3) of the full path of FILENAME.
1049 If FILENAME does not exist, return nil. 1033 If FILENAME does not exist, return nil.
1050 All path elements in FILENAME are converted to their short names. 1034 All path elements in FILENAME are converted to their short names.
1051 */ 1035 */