comparison src/lread.c @ 11735:f2f0f3b55a7e

(isfloat_string): Reject strings like "0.5+". (init_lread): Don't warn about missing installation dirs when using dirs derived from the executable.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 May 1995 17:30:36 +0000
parents eb4b842ee557
children 129b45ef421b
comparison
equal deleted inserted replaced
11734:e6675e3ed8b3 11735:f2f0f3b55a7e
1499 } 1499 }
1500 if (*cp == 'e') 1500 if (*cp == 'e')
1501 { 1501 {
1502 state |= E_CHAR; 1502 state |= E_CHAR;
1503 cp++; 1503 cp++;
1504 } 1504 if (*cp == '+' || *cp == '-')
1505 if ((*cp == '+') || (*cp == '-')) 1505 cp++;
1506 cp++; 1506 }
1507 1507
1508 if (*cp >= '0' && *cp <= '9') 1508 if (*cp >= '0' && *cp <= '9')
1509 { 1509 {
1510 state |= EXP_INT; 1510 state |= EXP_INT;
1511 while (*cp >= '0' && *cp <= '9') 1511 while (*cp >= '0' && *cp <= '9')
2066 } 2066 }
2067 2067
2068 init_lread () 2068 init_lread ()
2069 { 2069 {
2070 char *normal; 2070 char *normal;
2071 int turn_off_warning = 0;
2071 2072
2072 /* Compute the default load-path. */ 2073 /* Compute the default load-path. */
2073 #ifdef CANNOT_DUMP 2074 #ifdef CANNOT_DUMP
2074 normal = PATH_LOADSEARCH; 2075 normal = PATH_LOADSEARCH;
2075 Vload_path = decode_env_path (0, normal); 2076 Vload_path = decode_env_path (0, normal);
2101 Vinstallation_directory); 2102 Vinstallation_directory);
2102 tem1 = Ffile_exists_p (tem); 2103 tem1 = Ffile_exists_p (tem);
2103 if (!NILP (tem1)) 2104 if (!NILP (tem1))
2104 { 2105 {
2105 if (NILP (Fmember (tem, Vload_path))) 2106 if (NILP (Fmember (tem, Vload_path)))
2106 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 2107 {
2108 turn_off_warning = 1;
2109 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
2110 }
2107 } 2111 }
2108 else 2112 else
2109 /* That dir doesn't exist, so add the build-time 2113 /* That dir doesn't exist, so add the build-time
2110 Lisp dirs instead. */ 2114 Lisp dirs instead. */
2111 Vload_path = nconc2 (Vload_path, dump_path); 2115 Vload_path = nconc2 (Vload_path, dump_path);
2131 almost never correct, thereby causing a warning to be printed out that 2135 almost never correct, thereby causing a warning to be printed out that
2132 confuses users. Since PATH_LOADSEARCH is always overriden by the 2136 confuses users. Since PATH_LOADSEARCH is always overriden by the
2133 EMACSLOADPATH environment variable below, disable the warning on NT. */ 2137 EMACSLOADPATH environment variable below, disable the warning on NT. */
2134 2138
2135 /* Warn if dirs in the *standard* path don't exist. */ 2139 /* Warn if dirs in the *standard* path don't exist. */
2136 { 2140 if (!turn_off_warning)
2137 Lisp_Object path_tail; 2141 {
2138 2142 Lisp_Object path_tail;
2139 for (path_tail = Vload_path; 2143
2140 !NILP (path_tail); 2144 for (path_tail = Vload_path;
2141 path_tail = XCONS (path_tail)->cdr) 2145 !NILP (path_tail);
2142 { 2146 path_tail = XCONS (path_tail)->cdr)
2143 Lisp_Object dirfile; 2147 {
2144 dirfile = Fcar (path_tail); 2148 Lisp_Object dirfile;
2145 if (STRINGP (dirfile)) 2149 dirfile = Fcar (path_tail);
2146 { 2150 if (STRINGP (dirfile))
2147 dirfile = Fdirectory_file_name (dirfile); 2151 {
2148 if (access (XSTRING (dirfile)->data, 0) < 0) 2152 dirfile = Fdirectory_file_name (dirfile);
2149 fprintf (stderr, 2153 if (access (XSTRING (dirfile)->data, 0) < 0)
2150 "Warning: Lisp directory `%s' does not exist.\n", 2154 fprintf (stderr,
2151 XSTRING (Fcar (path_tail))->data); 2155 "Warning: Lisp directory `%s' does not exist.\n",
2152 } 2156 XSTRING (Fcar (path_tail))->data);
2153 } 2157 }
2154 } 2158 }
2159 }
2155 #endif /* WINDOWSNT */ 2160 #endif /* WINDOWSNT */
2156 2161
2157 /* If the EMACSLOADPATH environment variable is set, use its value. 2162 /* If the EMACSLOADPATH environment variable is set, use its value.
2158 This doesn't apply if we're dumping. */ 2163 This doesn't apply if we're dumping. */
2159 if (NILP (Vpurify_flag) 2164 if (NILP (Vpurify_flag)