summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-10-06 19:50:49 +0000
committerRichard M. Stallman <rms@gnu.org>1996-10-06 19:50:49 +0000
commit22e796b3b825eed9d28eb7fb07f03bb17fd83e90 (patch)
tree0847f6bf2c02da3bd48d4c32028f7cabb580d39d /lib-src
parent470ce72a233f6fbe6e55f58de2618ab9ba720ce9 (diff)
downloademacs-22e796b3b825eed9d28eb7fb07f03bb17fd83e90.tar.gz
(etags_getcwd) [WINDOWSNT]: Convert backslashes to slashes.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 1e66de77a9f..0928fada4d2 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4337,6 +4337,7 @@ etags_getcwd ()
#ifdef HAVE_GETCWD
int bufsize = 200;
char *path = xnew (bufsize, char);
+ char *p;
while (getcwd (path, bufsize) == NULL)
{
@@ -4346,7 +4347,15 @@ etags_getcwd ()
path = xnew (bufsize, char);
}
+ /* Convert backslashes to slashes. */
+#if WINDOWSNT
+ for (p = path; *p != '\0'; p++)
+ if (*p == '\\')
+ *p = '/';
+#endif
+
return path;
+
#else /* not HAVE_GETCWD */
#ifdef MSDOS
char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */