diff options
Diffstat (limited to 'contrib/less/lsystem.c')
-rw-r--r-- | contrib/less/lsystem.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/less/lsystem.c b/contrib/less/lsystem.c index 512bea3..1d10123 100644 --- a/contrib/less/lsystem.c +++ b/contrib/less/lsystem.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2007 Mark Nudelman + * Copyright (C) 1984-2008 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -49,7 +49,7 @@ lsystem(cmd, donemsg) register char *p; #endif IFILE save_ifile; -#if MSDOS_COMPILER +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C char cwd[FILENAME_MAX+1]; #endif @@ -68,6 +68,10 @@ lsystem(cmd, donemsg) } #if MSDOS_COMPILER +#if MSDOS_COMPILER==WIN32C + if (*cmd == '\0') + cmd = getenv("COMSPEC"); +#else /* * Working directory is global on MSDOS. * The child might change the working directory, so we @@ -77,6 +81,7 @@ lsystem(cmd, donemsg) */ getcwd(cwd, FILENAME_MAX); #endif +#endif /* * Close the current input file. @@ -192,7 +197,7 @@ lsystem(cmd, donemsg) init(); screen_trashed = 1; -#if MSDOS_COMPILER +#if MSDOS_COMPILER && MSDOS_COMPILER!=WIN32C /* * Restore the previous directory (possibly * changed by the child program we just ran). |