Changes from Kai G.
[bpt/emacs.git] / lib-src / etags.c
index 8f7949c..4a24bbf 100644 (file)
@@ -308,8 +308,8 @@ static char *absolute_dirname P_((char *, char *));
 static bool filename_is_absolute P_((char *f));
 static void canonicalize_filename P_((char *));
 static void grow_linebuffer P_((linebuffer *, int));
-static long *xmalloc P_((unsigned int));
-static long *xrealloc P_((char *, unsigned int));
+long *xmalloc P_((unsigned int));
+long *xrealloc P_((char *, unsigned int));
 
 \f
 char searchar = '/';           /* use /.../ searches */
@@ -5484,7 +5484,7 @@ canonicalize_filename (fn)
 {
 #ifdef DOS_NT
   /* Canonicalize drive letter case.  */
-  if (islower (fn[0]))
+  if (fn[0] && fn[1] == ':' && islower (fn[0]))
     fn[0] = toupper (fn[0]);
   /* Convert backslashes to slashes.  */
   for (; *fn != '\0'; fn++)
@@ -5508,7 +5508,7 @@ grow_linebuffer (lbp, toksize)
 }
 
 /* Like malloc but get fatal error if memory is exhausted.  */
-static long *
+long *
 xmalloc (size)
      unsigned int size;
 {
@@ -5518,7 +5518,7 @@ xmalloc (size)
   return result;
 }
 
-static long *
+long *
 xrealloc (ptr, size)
      char *ptr;
      unsigned int size;