1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00

(etags_getcwd) [WINDOWSNT]: Convert backslashes to slashes.

This commit is contained in:
Richard M. Stallman 1996-10-06 19:50:49 +00:00
parent f8a9bac913
commit ae178a12ea

View File

@ -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. */