diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-04-30 19:34:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-04-30 19:34:26 +0000 |
commit | 88f125fc73f661db5fb2d791e805d517f3ece93f (patch) | |
tree | 0e4ccf1bdb730db6230eeec78ef0610677282f83 /lib-src | |
parent | 677159d6a5d2a27e94a49b0bc3b38f1c3cea64b8 (diff) | |
download | emacs-88f125fc73f661db5fb2d791e805d517f3ece93f.tar.gz |
[MSDOS]: #include <sys/param.h> for the following.
[MSDOS] (etags_getcwd): Define simple MSDOS version without spawning a shell.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 9bd4bce83f5..bae7e17207a 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -32,6 +32,7 @@ char pot_etags_version[] = "@(#) pot revision number is 10.32"; #ifdef MSDOS #include <fcntl.h> +#include <sys/param.h> #endif /* MSDOS */ #ifdef HAVE_CONFIG_H @@ -3123,6 +3124,21 @@ concat (s1, s2, s3) return result; } +#ifdef MSDOS +char * +etags_getcwd () +{ + char *p, cwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ + getwd (cwd); + p = cwd; + while (*p) + if (*p == '\\') + *p++ = '/'; + else + *p++ = tolower (*p); + return strdup (cwd); +} +#else /* not MSDOS */ /* Does the same work as the system V getcwd, but does not need to guess buffer size in advance. Included mostly for compatibility. */ char * @@ -3155,6 +3171,7 @@ etags_getcwd () return buf; } +#endif /* not MSDOS */ /* Return a newly allocated string containing the filename of FILE relative to the absolute directory DIR (which |