[PATCH #64] Made shell command with no arguments functional for Windows.

This commit is contained in:
Jim Monte 2019-06-14 23:01:59 +02:00 committed by Holger Vogt
parent 9a904cb952
commit 4a26ea9847
1 changed files with 9 additions and 3 deletions

View File

@ -10,16 +10,22 @@
#include "ngspice/cpextern.h"
/* Fork a shell. */
#ifdef _WIN32
#define SHELL "cmd /k"
#else
#define SHELL "/bin/csh"
#endif
/* Fork a shell. */
void
com_shell(wordlist *wl)
{
char *com, *shell = NULL;
shell = getenv("SHELL");
if (shell == NULL)
shell = "/bin/csh";
if (shell == NULL) {
shell = SHELL;
}
cp_ccon(FALSE);