From: Richard M. Stallman Date: Sat, 30 Apr 1994 19:34:26 +0000 (+0000) Subject: [MSDOS]: #include for the following. X-Git-Tag: emacs-19.34~8626 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88f125fc73f661db5fb2d791e805d517f3ece93f;p=emacs.git [MSDOS]: #include for the following. [MSDOS] (etags_getcwd): Define simple MSDOS version without spawning a shell. --- 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 +#include #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