diff options
author | delphij <delphij@FreeBSD.org> | 2009-05-08 23:45:27 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-05-08 23:45:27 +0000 |
commit | 40472e4d24727eb8c2cf003fa10c3d4c6a89e22b (patch) | |
tree | a3b19b698e154070851f613743d2c3b6467b5828 /lsystem.c | |
parent | d069efd47cacc3156036ed37d5532d6a1d4f55c3 (diff) | |
download | FreeBSD-src-40472e4d24727eb8c2cf003fa10c3d4c6a89e22b.zip FreeBSD-src-40472e4d24727eb8c2cf003fa10c3d4c6a89e22b.tar.gz |
Vendor import of less v429
Diffstat (limited to 'lsystem.c')
-rw-r--r-- | lsystem.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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). |