Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 173:8eaf7971accc r20-3b13
Import from CVS: tag r20-3b13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:49:09 +0200 |
parents | 15872534500d |
children | 2d532a89d707 |
comparison
equal
deleted
inserted
replaced
172:a38aed19690b | 173:8eaf7971accc |
---|---|
395 | 395 |
396 static int | 396 static int |
397 argmatch (char **argv, int argc, char *sstr, char *lstr, | 397 argmatch (char **argv, int argc, char *sstr, char *lstr, |
398 int minlen, char **valptr, int *skipptr) | 398 int minlen, char **valptr, int *skipptr) |
399 { | 399 { |
400 char *p; | 400 char *p = NULL; |
401 int arglen; | 401 int arglen; |
402 char *arg; | 402 char *arg; |
403 | 403 |
404 /* Don't access argv[argc]; give up in advance. */ | 404 /* Don't access argv[argc]; give up in advance. */ |
405 if (argc <= *skipptr + 1) | 405 if (argc <= *skipptr + 1) |
1408 #ifdef HAVE_GIF | 1408 #ifdef HAVE_GIF |
1409 init_gif_err (); | 1409 init_gif_err (); |
1410 #endif | 1410 #endif |
1411 init_console_stream (); /* Create the first console */ | 1411 init_console_stream (); /* Create the first console */ |
1412 | 1412 |
1413 /* try to get the actually pathname of the exec file we are running */ | 1413 /* try to get the actual pathname of the exec file we are running */ |
1414 { | 1414 { |
1415 Vinvocation_name = Fcar (Vcommand_line_args); | 1415 Vinvocation_name = Fcar (Vcommand_line_args); |
1416 Vinvocation_directory = Vinvocation_name; | 1416 Vinvocation_directory = Vinvocation_name; |
1417 | 1417 |
1418 if (!NILP (Ffile_name_directory (Vinvocation_name))) | 1418 if (!NILP (Ffile_name_directory (Vinvocation_name))) |
2015 release_breathing_space (); | 2015 release_breathing_space (); |
2016 | 2016 |
2017 /* Tell malloc where start of impure now is */ | 2017 /* Tell malloc where start of impure now is */ |
2018 /* Also arrange for warnings when nearly out of space. */ | 2018 /* Also arrange for warnings when nearly out of space. */ |
2019 #ifndef SYSTEM_MALLOC | 2019 #ifndef SYSTEM_MALLOC |
2020 memory_warnings (&my_edata, malloc_warning); | 2020 memory_warnings (my_edata, malloc_warning); |
2021 #endif | 2021 #endif |
2022 UNGCPRO; | 2022 UNGCPRO; |
2023 map_out_data (XSTRING_DATA (intoname)); | 2023 map_out_data (XSTRING_DATA (intoname)); |
2024 | 2024 |
2025 purify_flag = opurify; | 2025 purify_flag = opurify; |
2080 mapout_data (XSTRING_DATA (intoname)); | 2080 mapout_data (XSTRING_DATA (intoname)); |
2081 #else | 2081 #else |
2082 /* Tell malloc where start of impure now is */ | 2082 /* Tell malloc where start of impure now is */ |
2083 /* Also arrange for warnings when nearly out of space. */ | 2083 /* Also arrange for warnings when nearly out of space. */ |
2084 #ifndef SYSTEM_MALLOC | 2084 #ifndef SYSTEM_MALLOC |
2085 memory_warnings (&my_edata, malloc_warning); | 2085 memory_warnings (my_edata, malloc_warning); |
2086 #endif | 2086 #endif |
2087 | 2087 |
2088 UNGCPRO; | 2088 UNGCPRO; |
2089 | 2089 |
2090 #if defined (MSDOS) && defined (EMX) | 2090 #if defined (MSDOS) && defined (EMX) |
2113 It's a whole lot easier to do the conversion here than to | 2113 It's a whole lot easier to do the conversion here than to |
2114 modify all the unexec routines to ensure that filename | 2114 modify all the unexec routines to ensure that filename |
2115 conversion is applied everywhere. Don't worry about memory | 2115 conversion is applied everywhere. Don't worry about memory |
2116 leakage because this call only happens once. */ | 2116 leakage because this call only happens once. */ |
2117 unexec ((char *) intoname_ext, (char *) symname_ext, | 2117 unexec ((char *) intoname_ext, (char *) symname_ext, |
2118 (uintptr_t) &my_edata, | 2118 (uintptr_t) my_edata, |
2119 0, 0); | 2119 0, 0); |
2120 } | 2120 } |
2121 #endif /* not MSDOS and EMX */ | 2121 #endif /* not MSDOS and EMX */ |
2122 #endif /* not VMS */ | 2122 #endif /* not VMS */ |
2123 | 2123 |
2133 #ifndef SEPCHAR | 2133 #ifndef SEPCHAR |
2134 #define SEPCHAR ':' | 2134 #define SEPCHAR ':' |
2135 #endif | 2135 #endif |
2136 | 2136 |
2137 Lisp_Object | 2137 Lisp_Object |
2138 decode_env_path (CONST char *evarname, CONST char *defalt) | 2138 decode_env_path (CONST char *evarname, CONST char *default_) |
2139 { | 2139 { |
2140 REGISTER CONST char *path = 0; | 2140 REGISTER CONST char *path = 0; |
2141 REGISTER CONST char *p; | 2141 REGISTER CONST char *p; |
2142 Lisp_Object lpath = Qnil; | 2142 Lisp_Object lpath = Qnil; |
2143 | 2143 |
2144 if (evarname) | 2144 if (evarname) |
2145 path = (char *) egetenv (evarname); | 2145 path = (char *) egetenv (evarname); |
2146 if (!path) | 2146 if (!path) |
2147 path = defalt; | 2147 path = default_; |
2148 if (!path) | 2148 if (!path) |
2149 return (Qnil); | 2149 return Qnil; |
2150 | 2150 |
2151 #if defined (MSDOS) || defined (WIN32) | 2151 #if defined (MSDOS) || defined (WIN32) |
2152 dostounix_filename (path); | 2152 dostounix_filename (path); |
2153 #endif | 2153 #endif |
2154 | 2154 |
2171 DEFUN ("noninteractive", Fnoninteractive, 0, 0, 0, /* | 2171 DEFUN ("noninteractive", Fnoninteractive, 0, 0, 0, /* |
2172 Non-nil return value means XEmacs is running without interactive terminal. | 2172 Non-nil return value means XEmacs is running without interactive terminal. |
2173 */ | 2173 */ |
2174 ()) | 2174 ()) |
2175 { | 2175 { |
2176 return ((noninteractive) ? Qt : Qnil); | 2176 return noninteractive ? Qt : Qnil; |
2177 } | 2177 } |
2178 | 2178 |
2179 /* This flag is useful to define if you're under a debugger; this way, you | 2179 /* This flag is useful to define if you're under a debugger; this way, you |
2180 can put a breakpoint of assert_failed() and debug multiple problems | 2180 can put a breakpoint of assert_failed() and debug multiple problems |
2181 in one session without having to recompile. */ | 2181 in one session without having to recompile. */ |