diff src/fileio.c @ 90116:29e773288013

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-23 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 150-165) - Update from CVS - Merge from gnus--rel--5.10 - Add info/dir to arch branch * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 34-37) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 09 Mar 2005 00:09:34 +0000
parents 6d92d69fae33 891064d819d7
children 8395880305fe
line wrap: on
line diff
--- a/src/fileio.c	Tue Mar 08 08:37:20 2005 +0000
+++ b/src/fileio.c	Wed Mar 09 00:09:34 2005 +0000
@@ -148,6 +148,10 @@
 #  define lstat stat
 #endif
 
+#ifndef FILE_SYSTEM_CASE
+#define FILE_SYSTEM_CASE(filename)  (filename)
+#endif
+
 /* Nonzero during writing of auto-save files */
 int auto_saving;
 
@@ -417,9 +421,7 @@
   if (!NILP (handler))
     return call2 (handler, Qfile_name_directory, filename);
 
-#ifdef FILE_SYSTEM_CASE
   filename = FILE_SYSTEM_CASE (filename);
-#endif
   beg = SDATA (filename);
 #ifdef DOS_NT
   beg = strcpy (alloca (strlen (beg) + 1), beg);
@@ -1124,14 +1126,7 @@
       UNGCPRO;
     }
 
-#ifdef VMS
-  /* Filenames on VMS are always upper case.  */
-  name = Fupcase (name);
-#endif
-#ifdef FILE_SYSTEM_CASE
   name = FILE_SYSTEM_CASE (name);
-#endif
-
   nm = SDATA (name);
 
 #ifdef DOS_NT
@@ -1231,23 +1226,23 @@
 	    slash = p;
 	  }
 	  if (p[0] == '-')
-#ifndef VMS4_4
-	    /* VMS pre V4.4,convert '-'s in filenames. */
+#ifdef NO_HYPHENS_IN_FILENAMES
 	    if (lbrack == rbrack)
 	      {
-		if (dots < 2)   /* this is to allow negative version numbers */
+                /* Avoid clobbering negative version numbers.  */
+                if (dots < 2)
 		  p[0] = '_';
 	      }
 	    else
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	      if (lbrack > rbrack &&
 		  ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
 		   (p[1] == '.' || p[1] == ']' || p[1] == '>')))
 		lose = 1;
-#ifndef VMS4_4
+#ifdef NO_HYPHENS_IN_FILENAMES
 	      else
 		p[0] = '_';
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	  /* count open brackets, reset close bracket pointer */
 	  if (p[0] == '[' || p[0] == '<')
 	    lbrack++, brack = 0;
@@ -1627,12 +1622,12 @@
 	}
       else
 	{
-#ifndef VMS4_4
+#ifdef NO_HYPHENS_IN_FILENAMES
 	  if (*p == '-' &&
 	      o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
 	      p[1] != ']' && p[1] != '>' && p[1] != '.')
 	    *p = '_';
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	  *o++ = *p++;
 	}
 #else /* not VMS */
@@ -6301,7 +6296,7 @@
     {
        Lisp_Object val1 = double_dollars (val);
        tem = Fsymbol_value (Qfile_name_history);
-       if (history_delete_duplicates) 
+       if (history_delete_duplicates)
 	 XSETCDR (tem, Fdelete (val1, XCDR(tem)));
        XSETCAR (tem, val1);
     }