summaryrefslogtreecommitdiffstats
path: root/contrib/less/lsystem.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-09 01:35:27 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-09 01:35:27 +0000
commit810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2 (patch)
tree5e0628caeff31611fab89dbdf72053148a59a873 /contrib/less/lsystem.c
parent8583a840068803e7fd9e0fc2452605bca6e822d8 (diff)
downloadFreeBSD-src-810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2.zip
FreeBSD-src-810e5a84b4607c4d0fc76e9a418ae9fd2b0eeeb2.tar.gz
Update to less v429.
Diffstat (limited to 'contrib/less/lsystem.c')
-rw-r--r--contrib/less/lsystem.c11
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).
OpenPOWER on IntegriCloud