87 |
#ifdef DATA_SEG_BITS |
#ifdef DATA_SEG_BITS |
88 |
EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; |
EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; |
89 |
#else |
#else |
90 |
EMACS_INT gdb_data_seg_bits = 0; |
EMACS_INT gdb_data_seg_bits = 0; |
91 |
#endif |
#endif |
92 |
EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; |
EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; |
93 |
|
|
158 |
Lisp_Object Vsystem_time_locale; |
Lisp_Object Vsystem_time_locale; |
159 |
Lisp_Object Vprevious_system_time_locale; |
Lisp_Object Vprevious_system_time_locale; |
160 |
|
|
161 |
/* If non-zero, emacs should not attempt to use an window-specific code, |
/* If non-zero, emacs should not attempt to use a window-specific code, |
162 |
but instead should use the virtual terminal under which it was started. */ |
but instead should use the virtual terminal under which it was started. */ |
163 |
int inhibit_window_system; |
int inhibit_window_system; |
164 |
|
|
228 |
Initialization options:\n\ |
Initialization options:\n\ |
229 |
\n\ |
\n\ |
230 |
--batch do not do interactive display; implies -q\n\ |
--batch do not do interactive display; implies -q\n\ |
231 |
|
--script FILE run FILE as an Emacs Lisp script.\n\ |
232 |
--debug-init enable Emacs Lisp debugger during init file\n\ |
--debug-init enable Emacs Lisp debugger during init file\n\ |
233 |
--help display this help message and exit\n\ |
--help display this help message and exit\n\ |
234 |
--multibyte, --no-unibyte run Emacs in multibyte mode\n\ |
--multibyte, --no-unibyte run Emacs in multibyte mode\n\ |
426 |
{ |
{ |
427 |
register int i; |
register int i; |
428 |
Lisp_Object name, dir, tem; |
Lisp_Object name, dir, tem; |
429 |
int count = specpdl_ptr - specpdl; |
int count = SPECPDL_INDEX (); |
430 |
Lisp_Object raw_name; |
Lisp_Object raw_name; |
431 |
|
|
432 |
initial_argv = argv; |
initial_argv = argv; |
744 |
if (!STRINGP(temp)) |
if (!STRINGP(temp)) |
745 |
return REPORT_EMACS_BUG_ADDRESS; |
return REPORT_EMACS_BUG_ADDRESS; |
746 |
|
|
747 |
string = XSTRING (temp)->data; |
string = SDATA (temp); |
748 |
|
|
749 |
/* Count dots in `emacs-version'. */ |
/* Count dots in `emacs-version'. */ |
750 |
while (*string) |
while (*string) |
762 |
|
|
763 |
/* ARGSUSED */ |
/* ARGSUSED */ |
764 |
int |
int |
765 |
main (argc, argv, envp) |
main (argc, argv |
766 |
|
#ifdef VMS |
767 |
|
, envp |
768 |
|
#endif |
769 |
|
) |
770 |
int argc; |
int argc; |
771 |
char **argv; |
char **argv; |
772 |
|
#ifdef VMS |
773 |
char **envp; |
char **envp; |
774 |
|
#endif |
775 |
{ |
{ |
776 |
#if GC_MARK_STACK |
#if GC_MARK_STACK |
777 |
Lisp_Object dummy; |
Lisp_Object dummy; |
786 |
struct rlimit rlim; |
struct rlimit rlim; |
787 |
#endif |
#endif |
788 |
int no_loadup = 0; |
int no_loadup = 0; |
789 |
|
char *junk = 0; |
790 |
|
|
791 |
#if GC_MARK_STACK |
#if GC_MARK_STACK |
792 |
extern Lisp_Object *stack_base; |
extern Lisp_Object *stack_base; |
825 |
} |
} |
826 |
else |
else |
827 |
{ |
{ |
828 |
printf ("GNU Emacs %s\n", XSTRING (tem)->data); |
printf ("GNU Emacs %s\n", SDATA (tem)); |
829 |
printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); |
printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); |
830 |
printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); |
printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); |
831 |
printf ("You may redistribute copies of Emacs\n"); |
printf ("You may redistribute copies of Emacs\n"); |
1041 |
noninteractive = 0; |
noninteractive = 0; |
1042 |
if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) |
if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) |
1043 |
noninteractive = 1; |
noninteractive = 1; |
1044 |
|
if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) |
1045 |
|
{ |
1046 |
|
noninteractive = 1; /* Set batch mode. */ |
1047 |
|
/* Convert --script to -l, un-skip it, and sort again so that -l will be |
1048 |
|
handled in proper sequence. */ |
1049 |
|
argv[skip_args - 1] = "-l"; |
1050 |
|
skip_args -= 2; |
1051 |
|
sort_args (argc, argv); |
1052 |
|
} |
1053 |
|
|
1054 |
/* Handle the --help option, which gives a usage message. */ |
/* Handle the --help option, which gives a usage message. */ |
1055 |
if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) |
if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) |
1375 |
#endif /* MSDOS */ |
#endif /* MSDOS */ |
1376 |
|
|
1377 |
#ifdef WINDOWSNT |
#ifdef WINDOWSNT |
1378 |
|
globals_of_w32 (); |
1379 |
/* Initialize environment from registry settings. */ |
/* Initialize environment from registry settings. */ |
1380 |
init_environment (argv); |
init_environment (argv); |
1381 |
init_ntproc (); /* must precede init_editfns. */ |
init_ntproc (); /* must precede init_editfns. */ |
1382 |
#endif |
#endif |
1383 |
|
|
1384 |
|
#ifdef HAVE_CARBON |
1385 |
|
if (initialized) |
1386 |
|
init_mac_osx_environment (); |
1387 |
|
#endif |
1388 |
|
|
1389 |
/* egetenv is a pretty low-level facility, which may get called in |
/* egetenv is a pretty low-level facility, which may get called in |
1390 |
many circumstances; it seems flimsy to put off initializing it |
many circumstances; it seems flimsy to put off initializing it |
1391 |
until calling init_callproc. */ |
until calling init_callproc. */ |
1542 |
keys_of_minibuf (); |
keys_of_minibuf (); |
1543 |
keys_of_window (); |
keys_of_window (); |
1544 |
} |
} |
1545 |
|
else |
1546 |
|
{ |
1547 |
|
/* |
1548 |
|
Initialization that must be done even if the global variable |
1549 |
|
initialized is non zero |
1550 |
|
*/ |
1551 |
|
#ifdef HAVE_NTGUI |
1552 |
|
globals_of_w32fns (); |
1553 |
|
globals_of_w32menu (); |
1554 |
|
#endif /* end #ifdef HAVE_NTGUI */ |
1555 |
|
} |
1556 |
|
|
1557 |
if (!noninteractive) |
if (!noninteractive) |
1558 |
{ |
{ |
1687 |
{ "-nw", "--no-window-system", 110, 0 }, |
{ "-nw", "--no-window-system", 110, 0 }, |
1688 |
{ "-nw", "--no-windows", 110, 0 }, |
{ "-nw", "--no-windows", 110, 0 }, |
1689 |
{ "-batch", "--batch", 100, 0 }, |
{ "-batch", "--batch", 100, 0 }, |
1690 |
|
{ "-script", "--script", 100, 1 }, |
1691 |
{ "-help", "--help", 90, 0 }, |
{ "-help", "--help", 90, 0 }, |
1692 |
{ "-no-unibyte", "--no-unibyte", 83, 0 }, |
{ "-no-unibyte", "--no-unibyte", 83, 0 }, |
1693 |
{ "-multibyte", "--multibyte", 82, 0 }, |
{ "-multibyte", "--multibyte", 82, 0 }, |
1943 |
kill it because we are exiting Emacs deliberately (not crashing). |
kill it because we are exiting Emacs deliberately (not crashing). |
1944 |
Do it after shut_down_emacs, which does an auto-save. */ |
Do it after shut_down_emacs, which does an auto-save. */ |
1945 |
if (STRINGP (Vauto_save_list_file_name)) |
if (STRINGP (Vauto_save_list_file_name)) |
1946 |
unlink (XSTRING (Vauto_save_list_file_name)->data); |
unlink (SDATA (Vauto_save_list_file_name)); |
1947 |
|
|
1948 |
exit (INTEGERP (arg) ? XINT (arg) |
exit (INTEGERP (arg) ? XINT (arg) |
1949 |
#ifdef VMS |
#ifdef VMS |
2012 |
#ifdef HAVE_X_WINDOWS |
#ifdef HAVE_X_WINDOWS |
2013 |
/* It's not safe to call intern here. Maybe we are crashing. */ |
/* It's not safe to call intern here. Maybe we are crashing. */ |
2014 |
if (!noninteractive && SYMBOLP (Vwindow_system) |
if (!noninteractive && SYMBOLP (Vwindow_system) |
2015 |
&& XSTRING (SYMBOL_NAME (Vwindow_system))->size == 1 |
&& SCHARS (SYMBOL_NAME (Vwindow_system)) == 1 |
2016 |
&& XSTRING (SYMBOL_NAME (Vwindow_system))->data[0] == 'x' |
&& SREF (SYMBOL_NAME (Vwindow_system), 0) == 'x' |
2017 |
&& ! no_x) |
&& ! no_x) |
2018 |
Fx_close_current_connection (); |
Fx_close_current_connection (); |
2019 |
#endif /* HAVE_X_WINDOWS */ |
#endif /* HAVE_X_WINDOWS */ |
2071 |
#ifndef SYSTEM_MALLOC |
#ifndef SYSTEM_MALLOC |
2072 |
memory_warnings (my_edata, malloc_warning); |
memory_warnings (my_edata, malloc_warning); |
2073 |
#endif |
#endif |
2074 |
map_out_data (XSTRING (filename)->data); |
map_out_data (SDATA (filename)); |
2075 |
|
|
2076 |
Vpurify_flag = tem; |
Vpurify_flag = tem; |
2077 |
|
|
2092 |
extern char my_edata[]; |
extern char my_edata[]; |
2093 |
Lisp_Object tem; |
Lisp_Object tem; |
2094 |
Lisp_Object symbol; |
Lisp_Object symbol; |
2095 |
int count = BINDING_STACK_SIZE (); |
int count = SPECPDL_INDEX (); |
2096 |
|
|
2097 |
check_pure_size (); |
check_pure_size (); |
2098 |
|
|
2110 |
if (!NILP (symfile)) |
if (!NILP (symfile)) |
2111 |
{ |
{ |
2112 |
CHECK_STRING (symfile); |
CHECK_STRING (symfile); |
2113 |
if (XSTRING (symfile)->size) |
if (SCHARS (symfile)) |
2114 |
symfile = Fexpand_file_name (symfile, Qnil); |
symfile = Fexpand_file_name (symfile, Qnil); |
2115 |
} |
} |
2116 |
|
|
2127 |
|
|
2128 |
fflush (stdout); |
fflush (stdout); |
2129 |
#ifdef VMS |
#ifdef VMS |
2130 |
mapout_data (XSTRING (filename)->data); |
mapout_data (SDATA (filename)); |
2131 |
#else |
#else |
2132 |
/* Tell malloc where start of impure now is. */ |
/* Tell malloc where start of impure now is. */ |
2133 |
/* Also arrange for warnings when nearly out of space. */ |
/* Also arrange for warnings when nearly out of space. */ |
2145 |
#ifdef USE_MMAP_FOR_BUFFERS |
#ifdef USE_MMAP_FOR_BUFFERS |
2146 |
mmap_set_vars (0); |
mmap_set_vars (0); |
2147 |
#endif |
#endif |
2148 |
unexec (XSTRING (filename)->data, |
unexec (SDATA (filename), |
2149 |
!NILP (symfile) ? XSTRING (symfile)->data : 0, my_edata, 0, 0); |
!NILP (symfile) ? SDATA (symfile) : 0, my_edata, 0, 0); |
2150 |
#ifdef USE_MMAP_FOR_BUFFERS |
#ifdef USE_MMAP_FOR_BUFFERS |
2151 |
mmap_set_vars (1); |
mmap_set_vars (1); |
2152 |
#endif |
#endif |
2186 |
{ |
{ |
2187 |
*plocale = desired_locale; |
*plocale = desired_locale; |
2188 |
setlocale (category, (STRINGP (desired_locale) |
setlocale (category, (STRINGP (desired_locale) |
2189 |
? (char *)(XSTRING (desired_locale)->data) |
? (char *)(SDATA (desired_locale)) |
2190 |
: "")); |
: "")); |
2191 |
} |
} |
2192 |
} |
} |
2256 |
/* Add /: to the front of the name |
/* Add /: to the front of the name |
2257 |
if it would otherwise be treated as magic. */ |
if it would otherwise be treated as magic. */ |
2258 |
tem = Ffind_file_name_handler (element, Qt); |
tem = Ffind_file_name_handler (element, Qt); |
2259 |
|
|
2260 |
|
/* However, if the handler says "I'm safe", |
2261 |
|
don't bother adding /:. */ |
2262 |
|
if (SYMBOLP (tem)) |
2263 |
|
{ |
2264 |
|
Lisp_Object prop; |
2265 |
|
prop = Fget (tem, intern ("safe-magic")); |
2266 |
|
if (! NILP (prop)) |
2267 |
|
tem = Qnil; |
2268 |
|
} |
2269 |
|
|
2270 |
if (! NILP (tem)) |
if (! NILP (tem)) |
2271 |
element = concat2 (build_string ("/:"), element); |
element = concat2 (build_string ("/:"), element); |
2272 |
|
|
2299 |
defsubr (&Sinvocation_directory); |
defsubr (&Sinvocation_directory); |
2300 |
|
|
2301 |
DEFVAR_LISP ("command-line-args", &Vcommand_line_args, |
DEFVAR_LISP ("command-line-args", &Vcommand_line_args, |
2302 |
doc: /* Args passed by shell to Emacs, as a list of strings. */); |
doc: /* Args passed by shell to Emacs, as a list of strings. |
2303 |
|
Many arguments are deleted from the list as they are processed. */); |
2304 |
|
|
2305 |
DEFVAR_LISP ("system-type", &Vsystem_type, |
DEFVAR_LISP ("system-type", &Vsystem_type, |
2306 |
doc: /* Value is symbol indicating type of operating system you are using. */); |
doc: /* Value is symbol indicating type of operating system you are using. */); |
2320 |
doc: /* Non-nil means Emacs is running without interactive terminal. */); |
doc: /* Non-nil means Emacs is running without interactive terminal. */); |
2321 |
|
|
2322 |
DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook, |
DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook, |
2323 |
doc: /* Hook to be run whenever kill-emacs is called. |
doc: /* Hook to be run when kill-emacs is called. |
2324 |
Since kill-emacs may be invoked when the terminal is disconnected (or |
Since `kill-emacs' may be invoked when the terminal is disconnected (or |
2325 |
in other similar situations), functions placed on this hook should not |
in other similar situations), functions placed on this hook should not |
2326 |
expect to be able to interact with the user. To ask for confirmation, |
expect to be able to interact with the user. To ask for confirmation, |
2327 |
see `kill-emacs-query-functions' instead. */); |
see `kill-emacs-query-functions' instead. |
2328 |
|
|
2329 |
|
The hook is not run in batch mode, i.e., if `noninteractive' is non-nil. */); |
2330 |
Vkill_emacs_hook = Qnil; |
Vkill_emacs_hook = Qnil; |
2331 |
|
|
2332 |
empty_string = build_string (""); |
empty_string = build_string (""); |