]> code.delx.au - gnu-emacs/blobdiff - lib-src/etags.c
(VERTICAL_SCROLL_BAR_INSIDE_WIDTH): Add frame as an
[gnu-emacs] / lib-src / etags.c
index 97f860a96a416d283805e98b3a8c2276e788fb3f..536ca567f18abdea767247a9df34257e1464287c 100644 (file)
@@ -4105,7 +4105,16 @@ readline_internal (linebuffer, stream)
          if (p > buffer && p[-1] == '\r')
            {
              *--p = '\0';
+#ifdef DOS_NT
+             /* Assume CRLF->LF translation will be performed by Emacs
+                when loading this file, so CRs won't appear in the buffer.
+                It would be cleaner to compensate within Emacs;
+                however, Emacs does not know how many CRs were deleted
+                before any given point in the file.  */
+             chars_deleted = 1;
+#else
              chars_deleted = 2;
+#endif
            }
          else
            {
@@ -4323,19 +4332,7 @@ concat (s1, s2, s3)
 char *
 etags_getcwd ()
 {
-#ifdef MSDOS
-  char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS.  */
-
-  getwd (path);
-  for (p = path; *p != '\0'; p++)
-    if (*p == '\\')
-      *p = '/';
-    else
-      *p = lowcase (*p);
-
-  return strdup (path);
-#else /* not MSDOS */
-#if HAVE_GETCWD
+#ifdef HAVE_GETCWD
   int bufsize = 200;
   char *path = xnew (bufsize, char);
 
@@ -4348,7 +4345,20 @@ etags_getcwd ()
     }
 
   return path;
-#else /* not MSDOS and not HAVE_GETCWD */
+#else /* not HAVE_GETCWD */
+#ifdef MSDOS
+  char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS.  */
+
+  getwd (path);
+
+  for (p = path; *p != '\0'; p++)
+    if (*p == '\\')
+      *p = '/';
+    else
+      *p = lowcase (*p);
+
+  return strdup (path);
+#else /* not MSDOS */
   struct linebuffer path;
   FILE *pipe;
 
@@ -4359,8 +4369,8 @@ etags_getcwd ()
   pclose (pipe);
 
   return path.buffer;
-#endif /* not HAVE_GETCWD */
 #endif /* not MSDOS */
+#endif /* not HAVE_GETCWD */
 }
 
 /* Return a newly allocated string containing the filename