changeset 9790:637b4664f7a5

Change explicit uses of the Unix directory separator '/' to uses of the macros IS_ANY_SEP, IS_DIRECTORY_SEP, IS_DEVICE_SEP, DIRECTORY_SEP, and DEVICE_SEP. (init_lread) [WINDOWSNT]: Disable warnings about directories in the load path not existing. (load): Test DOS_NT instead of MSDOS.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Nov 1994 08:22:31 +0000
parents a1e6724db219
children 068c89ed6765
files src/lread.c
diffstat 1 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Tue Nov 01 08:16:31 1994 +0000
+++ b/src/lread.c	Tue Nov 01 08:22:31 1994 +0000
@@ -357,9 +357,9 @@
   /* 1 means inhibit the message at the beginning.  */
   int nomessage1 = 0;
   Lisp_Object handler;
-#ifdef MSDOS
+#ifdef DOS_NT
   char *dosmode = "rt";
-#endif
+#endif /* DOS_NT */
 
   CHECK_STRING (str, 0);
   str = Fsubstitute_in_file_name (str);
@@ -395,9 +395,9 @@
       struct stat s1, s2;
       int result;
 
-#ifdef MSDOS
+#ifdef DOS_NT
       dosmode = "rb";
-#endif
+#endif /* DOS_NT */
       stat ((char *)XSTRING (found)->data, &s1);
       XSTRING (found)->data[XSTRING (found)->size - 1] = 0;
       result = stat ((char *)XSTRING (found)->data, &s2);
@@ -412,12 +412,12 @@
       XSTRING (found)->data[XSTRING (found)->size - 1] = 'c';
     }
 
-#ifdef MSDOS
+#ifdef DOS_NT
   close (fd);
   stream = fopen ((char *) XSTRING (found)->data, dosmode);
-#else
+#else  /* not DOS_NT */
   stream = fdopen (fd, "r");
-#endif
+#endif /* not DOS_NT */
   if (stream == 0)
     {
       close (fd);
@@ -484,16 +484,15 @@
      Lisp_Object pathname;
 {
   register unsigned char *s = XSTRING (pathname)->data;
-  return (*s == '/'
+  return (IS_DIRECTORY_SEP (s[0])
+	  || (XSTRING (pathname)->size > 2
+	      && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))
 #ifdef ALTOS
 	  || *s == '@'
 #endif
 #ifdef VMS
 	  || index (s, ':')
 #endif /* VMS */
-#ifdef MSDOS	/* MW, May 1993 */
-	  || (s[0] != '\0' && s[1] == ':' && s[2] == '/')
-#endif
 	  );
 }
 
@@ -1912,6 +1911,12 @@
     Vload_path = decode_env_path (0, normal);
 #endif
 
+#ifndef WINDOWSNT
+  /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is 
+     almost never correct, thereby causing a warning to be printed out that 
+     confuses users.  Since PATH_LOADSEARCH is always overriden by the
+     EMACSLOADPATH environment variable below, disable the warning on NT.  */
+
   /* Warn if dirs in the *standard* path don't exist.  */
   {
     Lisp_Object path_tail;
@@ -1932,6 +1937,7 @@
 	  }
       }
   }
+#endif /* WINDOWSNT */
 
   /* If the EMACSLOADPATH environment variable is set, use its value.
      This doesn't apply if we're dumping.  */