changeset 7227:6fa038c33a0f

[MSDOS]: #include <sys/param.h> for the following. [MSDOS] (etags_getcwd): Define simple MSDOS version without spawning a shell.
author Richard M. Stallman <rms@gnu.org>
date Sat, 30 Apr 1994 19:34:26 +0000
parents 6b202e759f69
children 14df71736eae
files lib-src/etags.c
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/etags.c	Sat Apr 30 19:10:37 1994 +0000
+++ b/lib-src/etags.c	Sat Apr 30 19:34:26 1994 +0000
@@ -32,6 +32,7 @@
 
 #ifdef MSDOS
 #include <fcntl.h>
+#include <sys/param.h>
 #endif /* MSDOS */
 
 #ifdef HAVE_CONFIG_H
@@ -3123,6 +3124,21 @@
   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 @@
 
   return buf;
 }
+#endif /* not MSDOS */
 
 /* Return a newly allocated string containing the filename
    of FILE relative to the absolute directory DIR (which