Mercurial > hg > xemacs-beta
comparison src/ntproc.c @ 347:7c94d56991e1 r21-1-3
Import from CVS: tag r21-1-3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:53:48 +0200 |
parents | 33bdb3d4b97f |
children | 4711e16a8e49 |
comparison
equal
deleted
inserted
replaced
346:dd0986ffd2cf | 347:7c94d56991e1 |
---|---|
48 #include "nt.h" | 48 #include "nt.h" |
49 #include "ntheap.h" /* From 19.34.6 */ | 49 #include "ntheap.h" /* From 19.34.6 */ |
50 #include "systime.h" | 50 #include "systime.h" |
51 #include "syssignal.h" | 51 #include "syssignal.h" |
52 #include "syswait.h" | 52 #include "syswait.h" |
53 #include "buffer.h" | |
53 #include "process.h" | 54 #include "process.h" |
54 /*#include "w32term.h"*/ /* From 19.34.6: sync in ? --marcpa */ | 55 /*#include "w32term.h"*/ /* From 19.34.6: sync in ? --marcpa */ |
55 | 56 |
56 /* #### I'm not going to play with shit. */ | 57 /* #### I'm not going to play with shit. */ |
57 #pragma warning (disable:4013 4024 4090) | 58 #pragma warning (disable:4013 4024 4090) |
569 { | 570 { |
570 UNGCPRO; | 571 UNGCPRO; |
571 errno = EINVAL; | 572 errno = EINVAL; |
572 return -1; | 573 return -1; |
573 } | 574 } |
574 cmdname = XSTRING_DATA (full); | 575 GET_C_STRING_FILENAME_DATA_ALLOCA (full, cmdname); |
575 /* #### KLUDGE */ | 576 } |
576 *(char**)(argv[0]) = cmdname; | 577 else |
578 { | |
579 (char*)cmdname = alloca (strlen (argv[0]) + 1); | |
580 strcpy ((char*)cmdname, argv[0]); | |
577 } | 581 } |
578 UNGCPRO; | 582 UNGCPRO; |
579 | 583 |
580 /* make sure argv[0] and cmdname are both in DOS format */ | 584 /* make sure argv[0] and cmdname are both in DOS format */ |
581 strcpy (cmdname = alloca (strlen (cmdname) + 1), argv[0]); | |
582 unixtodos_filename (cmdname); | 585 unixtodos_filename (cmdname); |
583 /* #### KLUDGE */ | 586 /* #### KLUDGE */ |
584 *(char**)(argv[0]) = cmdname; | 587 ((CONST char**)argv)[0] = cmdname; |
585 | 588 |
586 /* Determine whether program is a 16-bit DOS executable, or a Win32 | 589 /* Determine whether program is a 16-bit DOS executable, or a Win32 |
587 executable that is implicitly linked to the Cygnus dll (implying it | 590 executable that is implicitly linked to the Cygnus dll (implying it |
588 was compiled with the Cygnus GNU toolchain and hence relies on | 591 was compiled with the Cygnus GNU toolchain and hence relies on |
589 cygwin.dll to parse the command line - we use this to decide how to | 592 cygwin.dll to parse the command line - we use this to decide how to |
1333 | 1336 |
1334 | 1337 |
1335 void | 1338 void |
1336 syms_of_ntproc () | 1339 syms_of_ntproc () |
1337 { | 1340 { |
1338 Qhigh = intern ("high"); | |
1339 Qlow = intern ("low"); | |
1340 | |
1341 DEFSUBR (Fwin32_short_file_name); | 1341 DEFSUBR (Fwin32_short_file_name); |
1342 DEFSUBR (Fwin32_long_file_name); | 1342 DEFSUBR (Fwin32_long_file_name); |
1343 DEFSUBR (Fwin32_set_process_priority); | 1343 DEFSUBR (Fwin32_set_process_priority); |
1344 DEFSUBR (Fwin32_get_locale_info); | 1344 DEFSUBR (Fwin32_get_locale_info); |
1345 DEFSUBR (Fwin32_get_current_locale_id); | 1345 DEFSUBR (Fwin32_get_current_locale_id); |
1346 DEFSUBR (Fwin32_get_default_locale_id); | 1346 DEFSUBR (Fwin32_get_default_locale_id); |
1347 DEFSUBR (Fwin32_get_valid_locale_ids); | 1347 DEFSUBR (Fwin32_get_valid_locale_ids); |
1348 DEFSUBR (Fwin32_set_current_locale); | 1348 DEFSUBR (Fwin32_set_current_locale); |
1349 } | |
1350 | |
1351 | |
1352 void | |
1353 vars_of_ntproc (void) | |
1354 { | |
1355 Qhigh = intern ("high"); | |
1356 Qlow = intern ("low"); | |
1349 | 1357 |
1350 DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args /* | 1358 DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args /* |
1351 Non-nil enables quoting of process arguments to ensure correct parsing. | 1359 Non-nil enables quoting of process arguments to ensure correct parsing. |
1352 Because Windows does not directly pass argv arrays to child processes, | 1360 Because Windows does not directly pass argv arrays to child processes, |
1353 programs have to reconstruct the argv array by parsing the command | 1361 programs have to reconstruct the argv array by parsing the command |
1374 allowing only only DOS subprocess to run at a time (whether started directly | 1382 allowing only only DOS subprocess to run at a time (whether started directly |
1375 or indirectly by Emacs), and preventing Emacs from cleanly terminating the | 1383 or indirectly by Emacs), and preventing Emacs from cleanly terminating the |
1376 subprocess group, but may allow Emacs to interrupt a subprocess that doesn't | 1384 subprocess group, but may allow Emacs to interrupt a subprocess that doesn't |
1377 otherwise respond to interrupts from Emacs. | 1385 otherwise respond to interrupts from Emacs. |
1378 */ ); | 1386 */ ); |
1379 Vwin32_start_process_share_console = Qnil; | 1387 Vwin32_start_process_share_console = Qt; |
1380 | 1388 |
1381 DEFVAR_LISP ("win32-pipe-read-delay", &Vwin32_pipe_read_delay /* | 1389 DEFVAR_LISP ("win32-pipe-read-delay", &Vwin32_pipe_read_delay /* |
1382 Forced delay before reading subprocess output. | 1390 Forced delay before reading subprocess output. |
1383 This is done to improve the buffering of subprocess output, by | 1391 This is done to improve the buffering of subprocess output, by |
1384 avoiding the inefficiency of frequently reading small amounts of data. | 1392 avoiding the inefficiency of frequently reading small amounts of data. |
1399 the truename of a file can be slow. | 1407 the truename of a file can be slow. |
1400 */ ); | 1408 */ ); |
1401 Vwin32_generate_fake_inodes = Qnil; | 1409 Vwin32_generate_fake_inodes = Qnil; |
1402 #endif | 1410 #endif |
1403 } | 1411 } |
1412 | |
1404 /* end of ntproc.c */ | 1413 /* end of ntproc.c */ |