aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-11-01 08:22:31 +0000
committerRichard M. Stallman1994-11-01 08:22:31 +0000
commit317073d51d0fa13f7d01c0de97428365e0710dba (patch)
tree3982c09793c31503aac90210ce2e453dffdc623a /src
parent5e570b758548713c1b189f180e829f0b474fdf66 (diff)
downloademacs-317073d51d0fa13f7d01c0de97428365e0710dba.tar.gz
emacs-317073d51d0fa13f7d01c0de97428365e0710dba.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/lread.c b/src/lread.c
index a64a01f8fd6..434a0f4693e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -357,9 +357,9 @@ Return t if file exists.")
357 /* 1 means inhibit the message at the beginning. */ 357 /* 1 means inhibit the message at the beginning. */
358 int nomessage1 = 0; 358 int nomessage1 = 0;
359 Lisp_Object handler; 359 Lisp_Object handler;
360#ifdef MSDOS 360#ifdef DOS_NT
361 char *dosmode = "rt"; 361 char *dosmode = "rt";
362#endif 362#endif /* DOS_NT */
363 363
364 CHECK_STRING (str, 0); 364 CHECK_STRING (str, 0);
365 str = Fsubstitute_in_file_name (str); 365 str = Fsubstitute_in_file_name (str);
@@ -395,9 +395,9 @@ Return t if file exists.")
395 struct stat s1, s2; 395 struct stat s1, s2;
396 int result; 396 int result;
397 397
398#ifdef MSDOS 398#ifdef DOS_NT
399 dosmode = "rb"; 399 dosmode = "rb";
400#endif 400#endif /* DOS_NT */
401 stat ((char *)XSTRING (found)->data, &s1); 401 stat ((char *)XSTRING (found)->data, &s1);
402 XSTRING (found)->data[XSTRING (found)->size - 1] = 0; 402 XSTRING (found)->data[XSTRING (found)->size - 1] = 0;
403 result = stat ((char *)XSTRING (found)->data, &s2); 403 result = stat ((char *)XSTRING (found)->data, &s2);
@@ -412,12 +412,12 @@ Return t if file exists.")
412 XSTRING (found)->data[XSTRING (found)->size - 1] = 'c'; 412 XSTRING (found)->data[XSTRING (found)->size - 1] = 'c';
413 } 413 }
414 414
415#ifdef MSDOS 415#ifdef DOS_NT
416 close (fd); 416 close (fd);
417 stream = fopen ((char *) XSTRING (found)->data, dosmode); 417 stream = fopen ((char *) XSTRING (found)->data, dosmode);
418#else 418#else /* not DOS_NT */
419 stream = fdopen (fd, "r"); 419 stream = fdopen (fd, "r");
420#endif 420#endif /* not DOS_NT */
421 if (stream == 0) 421 if (stream == 0)
422 { 422 {
423 close (fd); 423 close (fd);
@@ -484,16 +484,15 @@ complete_filename_p (pathname)
484 Lisp_Object pathname; 484 Lisp_Object pathname;
485{ 485{
486 register unsigned char *s = XSTRING (pathname)->data; 486 register unsigned char *s = XSTRING (pathname)->data;
487 return (*s == '/' 487 return (IS_DIRECTORY_SEP (s[0])
488 || (XSTRING (pathname)->size > 2
489 && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))
488#ifdef ALTOS 490#ifdef ALTOS
489 || *s == '@' 491 || *s == '@'
490#endif 492#endif
491#ifdef VMS 493#ifdef VMS
492 || index (s, ':') 494 || index (s, ':')
493#endif /* VMS */ 495#endif /* VMS */
494#ifdef MSDOS /* MW, May 1993 */
495 || (s[0] != '\0' && s[1] == ':' && s[2] == '/')
496#endif
497 ); 496 );
498} 497}
499 498
@@ -1912,6 +1911,12 @@ init_lread ()
1912 Vload_path = decode_env_path (0, normal); 1911 Vload_path = decode_env_path (0, normal);
1913#endif 1912#endif
1914 1913
1914#ifndef WINDOWSNT
1915 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
1916 almost never correct, thereby causing a warning to be printed out that
1917 confuses users. Since PATH_LOADSEARCH is always overriden by the
1918 EMACSLOADPATH environment variable below, disable the warning on NT. */
1919
1915 /* Warn if dirs in the *standard* path don't exist. */ 1920 /* Warn if dirs in the *standard* path don't exist. */
1916 { 1921 {
1917 Lisp_Object path_tail; 1922 Lisp_Object path_tail;
@@ -1932,6 +1937,7 @@ init_lread ()
1932 } 1937 }
1933 } 1938 }
1934 } 1939 }
1940#endif /* WINDOWSNT */
1935 1941
1936 /* If the EMACSLOADPATH environment variable is set, use its value. 1942 /* If the EMACSLOADPATH environment variable is set, use its value.
1937 This doesn't apply if we're dumping. */ 1943 This doesn't apply if we're dumping. */