# HG changeset patch # User Francesco Potort # Date 801751225 0 # Node ID 1e5d25c997cac4581be0014a84bda6fcec24eeac # Parent 0deb4505c0f073a58f9ec418d57cda5eeea077d1 * etags.c (etags_getcwd): Undo the /bin/pwd change. It may raise compatibility problems. diff -r 0deb4505c0f0 -r 1e5d25c997ca lib-src/etags.c --- a/lib-src/etags.c Mon May 29 07:27:50 1995 +0000 +++ b/lib-src/etags.c Mon May 29 12:40:25 1995 +0000 @@ -32,7 +32,7 @@ * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. */ -char pot_etags_version[] = "@(#) pot revision number is 11.28"; +char pot_etags_version[] = "@(#) pot revision number is 11.29"; #define TRUE 1 #define FALSE 0 @@ -3661,8 +3661,8 @@ guess buffer size in advance. */ char * etags_getcwd () +#ifdef DOS_NT { -#ifdef DOS_NT char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ getwd (path); @@ -3674,8 +3674,9 @@ *p++ = tolower (*p); return strdup (path); -#else /* not DOS_NT */ -#if HAVE_GETCWD +} +#elif HAVE_GETCWD /* not DOS_NT */ +{ int bufsize = 200; char *path = xnew (bufsize, char); @@ -3688,20 +3689,21 @@ } return path; +} #else /* not DOS_NT and not HAVE_GETCWD */ +{ struct linebuffer path; FILE *pipe; initbuffer (&path); - pipe = (FILE *) popen ("/bin/pwd 2>/dev/null", "r"); + pipe = (FILE *) popen ("pwd 2>/dev/null", "r"); if (pipe == NULL || readline_internal (&path, pipe) == 0) - pfatal ("/bin/pwd"); + pfatal ("pwd"); pclose (pipe); return path.buffer; -#endif /* not HAVE_GETCWD */ -#endif /* not DOS_NT */ } +#endif /* not DOS_NT and not HAVE_GETCWD */ /* Return a newly allocated string containing the filename of FILE relative to the absolute directory DIR (which