Mercurial > hg > xemacs-beta
diff src/callproc.c @ 288:e11d67e05968 r21-0b42
Import from CVS: tag r21-0b42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:54 +0200 |
parents | 558f606b08ae |
children | 19dcec799385 |
line wrap: on
line diff
--- a/src/callproc.c Mon Aug 13 10:35:07 2007 +0200 +++ b/src/callproc.c Mon Aug 13 10:35:54 2007 +0200 @@ -44,6 +44,8 @@ #ifdef WINDOWSNT #define _P_NOWAIT 1 /* from process.h */ +#include <windows.h> +#include "nt.h" #endif #ifdef DOS_NT @@ -825,6 +827,8 @@ if (NILP (v)) message ("%s not defined in environment", XSTRING_DATA (var)); else + /* #### Should use Fprin1_to_string or Fprin1 to handle string + containing quotes correctly. */ message ("\"%s\"", value); } RETURN_UNGCPRO (v); @@ -869,35 +873,25 @@ ** If NT then we look at COMSPEC for the shell program. */ sh = egetenv ("COMSPEC"); - { - char *tem; - /* - ** If COMSPEC has been set, then convert the - ** DOS formatted name into a UNIX format. Then - ** create a LISP object. - */ - if (sh) - { -#if 0 /* This breaks everything -kkm */ - tem = (char *) alloca (strlen (sh) + 1); - dostounix_filename (strcpy (tem, sh)); - Vshell_file_name = build_string (tem); -#else - Vshell_file_name = build_string (sh); -#endif - } - /* - ** Odd, no COMSPEC, so let's default to our - ** best guess for NT. - */ - else - { - Vshell_file_name = build_string ("\\WINNT\\system32\\cmd.exe"); - } - } + /* + ** If COMSPEC has been set, then convert the + ** DOS formatted name into a UNIX format. Then + ** create a LISP object. + */ + if (sh) + Vshell_file_name = build_string (sh); + /* + ** Odd, no COMSPEC, so let's default to our + ** best guess for NT. + */ + else + Vshell_file_name = build_string ("\\WINNT\\system32\\cmd.exe"); + #else /* not WINDOWSNT */ + sh = (char *) egetenv ("SHELL"); Vshell_file_name = build_string (sh ? sh : "/bin/sh"); + #endif }