Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 05472e90ae02 |
children | c7528f8e288d |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
62 #endif | 62 #endif |
63 #endif | 63 #endif |
64 | 64 |
65 extern void memory_warnings (void *, void (*warnfun) (CONST char *)); | 65 extern void memory_warnings (void *, void (*warnfun) (CONST char *)); |
66 | 66 |
67 #ifndef SYSTEM_MALLOC | |
68 extern void *(*__malloc_hook)(size_t); | |
69 extern void *(*__realloc_hook)(void *, size_t); | |
70 extern void (*__free_hook)(void *); | |
71 #endif /* not SYSTEM_MALLOC */ | |
72 | |
73 /* Command line args from shell, as list of strings */ | 67 /* Command line args from shell, as list of strings */ |
74 Lisp_Object Vcommand_line_args; | 68 Lisp_Object Vcommand_line_args; |
75 | 69 |
76 /* Set nonzero after XEmacs has started up the first time. | 70 /* Set nonzero after XEmacs has started up the first time. |
77 Prevents reinitialization of the Lisp world and keymaps | 71 Prevents reinitialization of the Lisp world and keymaps |
82 Lisp_Object Vsystem_type; | 76 Lisp_Object Vsystem_type; |
83 | 77 |
84 /* Variable whose value is string giving configuration built for. */ | 78 /* Variable whose value is string giving configuration built for. */ |
85 Lisp_Object Vsystem_configuration; | 79 Lisp_Object Vsystem_configuration; |
86 | 80 |
87 /* Version numbers and strings */ | |
88 Lisp_Object Vemacs_major_version; | |
89 Lisp_Object Vemacs_minor_version; | |
90 | |
91 /* The name under which XEmacs was invoked, with any leading directory | 81 /* The name under which XEmacs was invoked, with any leading directory |
92 names discarded. */ | 82 names discarded. */ |
93 Lisp_Object Vinvocation_name; | 83 Lisp_Object Vinvocation_name; |
94 | 84 |
95 /* The directory name from which XEmacs was invoked. */ | 85 /* The directory name from which XEmacs was invoked. */ |
177 EMACS_UNBLOCK_SIGNAL (fatal_error_code); | 167 EMACS_UNBLOCK_SIGNAL (fatal_error_code); |
178 | 168 |
179 /* If fatal error occurs in code below, avoid infinite recursion. */ | 169 /* If fatal error occurs in code below, avoid infinite recursion. */ |
180 if (! fatal_error_in_progress) | 170 if (! fatal_error_in_progress) |
181 { | 171 { |
182 fatal_error_in_progress = dont_check_for_quit = 1; | 172 fatal_error_in_progress = 1; |
183 shut_down_emacs (sig, Qnil); | 173 shut_down_emacs (sig, Qnil); |
184 stderr_out("\nLisp backtrace follows:\n\n"); | 174 stderr_out("\nLisp backtrace follows:\n\n"); |
185 Fbacktrace(Qexternal_debugging_output, Qt); | 175 Fbacktrace(Qexternal_debugging_output, Qt); |
186 | 176 |
187 # if 0 /* This is evil, rarely useful, and causes grief in some cases. */ | |
188 /* Check for Sun-style stack printing via /proc */ | 177 /* Check for Sun-style stack printing via /proc */ |
189 { | 178 { |
190 CONST char *pstack = "/usr/proc/bin/pstack"; | 179 CONST char *pstack = "/usr/proc/bin/pstack"; |
191 if (access(pstack, X_OK) == 0) | 180 if (access(pstack, X_OK) == 0) |
192 { | 181 { |
195 "(A real debugger may provide better information)\n\n"); | 184 "(A real debugger may provide better information)\n\n"); |
196 sprintf(buf, "%s %d >&2", pstack, (int)getpid()); | 185 sprintf(buf, "%s %d >&2", pstack, (int)getpid()); |
197 system(buf); | 186 system(buf); |
198 } | 187 } |
199 } | 188 } |
200 # endif | |
201 } | 189 } |
202 #ifdef VMS | 190 #ifdef VMS |
203 LIB$STOP (SS$_ABORT); | 191 LIB$STOP (SS$_ABORT); |
204 #else | 192 #else |
205 /* Signal the same code; this time it will really be fatal. */ | 193 /* Signal the same code; this time it will really be fatal. */ |
369 #ifdef I18N4 | 357 #ifdef I18N4 |
370 /* #### - don't know why I18N4 on SunOS/JLE | 358 /* #### - don't know why I18N4 on SunOS/JLE |
371 can't deal with this. It's a potential | 359 can't deal with this. It's a potential |
372 bug that needs to be looked at. */ | 360 bug that needs to be looked at. */ |
373 # undef RUN_TIME_REMAP | 361 # undef RUN_TIME_REMAP |
362 #endif | |
363 | |
364 #if defined (MULE) && defined (MSDOS) && defined (EMX) | |
365 /* Setup all of files be input/output'ed with binary translation mdoe. */ | |
366 asm (" .text"); | |
367 asm ("L_setbinmode:"); | |
368 asm (" movl $1, __fmode_bin"); | |
369 asm (" ret"); | |
370 asm (" .stabs \"___CTOR_LIST__\", 23, 0, 0, L_setbinmode"); | |
374 #endif | 371 #endif |
375 | 372 |
376 /* Test whether the next argument in ARGV matches SSTR or a prefix of | 373 /* Test whether the next argument in ARGV matches SSTR or a prefix of |
377 LSTR (at least MINLEN characters). If so, then if VALPTR is non-null | 374 LSTR (at least MINLEN characters). If so, then if VALPTR is non-null |
378 (the argument is supposed to have a value) store in *VALPTR either | 375 (the argument is supposed to have a value) store in *VALPTR either |
441 { | 438 { |
442 char stack_bottom_variable; | 439 char stack_bottom_variable; |
443 int skip_args = 0; | 440 int skip_args = 0; |
444 Lisp_Object load_me; | 441 Lisp_Object load_me; |
445 int inhibit_window_system; | 442 int inhibit_window_system; |
443 | |
444 noninteractive = 0; | |
445 | |
446 #ifdef NeXT | 446 #ifdef NeXT |
447 extern int malloc_cookie; | 447 extern int malloc_cookie; |
448 #endif | 448 |
449 | |
450 #ifndef SYSTEM_MALLOC | |
451 /* Make sure that any libraries we link against haven't installed a | |
452 hook for a gmalloc of a potentially incompatible version. */ | |
453 __malloc_hook = NULL; | |
454 __realloc_hook = NULL; | |
455 __free_hook = NULL; | |
456 #endif /* not SYSTEM_MALLOC */ | |
457 | |
458 noninteractive = 0; | |
459 | |
460 #ifdef NeXT | |
461 /* 19-Jun-1995 -baw | 449 /* 19-Jun-1995 -baw |
462 * NeXT secret magic, ripped from Emacs-for-NS by Carl Edman | 450 * NeXT secret magic, ripped from Emacs-for-NS by Carl Edman |
463 * <cedman@princeton.edu>. Note that even Carl doesn't know what this | 451 * <cedman@princeton.edu>. Note that even Carl doesn't know what this |
464 * does; it was provided by NeXT, and it presumable makes NS's mallocator | 452 * does; it was provided by NeXT, and it presumable makes NS's mallocator |
465 * work with dumping. But malloc_jumpstart() and malloc_freezedry() in | 453 * work with dumping. But malloc_jumpstart() and malloc_freezedry() in |
593 if (open (term, O_RDWR, 2) < 0) | 581 if (open (term, O_RDWR, 2) < 0) |
594 fatal ("%s: %s", term, strerror (errno)); | 582 fatal ("%s: %s", term, strerror (errno)); |
595 dup (0); | 583 dup (0); |
596 if (! isatty (0)) | 584 if (! isatty (0)) |
597 fatal ("%s: not a tty", term); | 585 fatal ("%s: not a tty", term); |
598 | 586 |
599 stderr_out ("Using %s", ttyname (0)); | 587 stderr_out ("Using %s", ttyname (0)); |
600 inhibit_window_system = 1; /* -t => -nw */ | 588 inhibit_window_system = 1; /* -t => -nw */ |
601 } | 589 } |
602 } | 590 } |
603 | 591 |
606 inhibit_window_system = 1; | 594 inhibit_window_system = 1; |
607 | 595 |
608 /* Handle the -batch switch, which means don't do interactive display. */ | 596 /* Handle the -batch switch, which means don't do interactive display. */ |
609 if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) | 597 if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) |
610 noninteractive = 1; | 598 noninteractive = 1; |
611 | 599 |
612 /* Partially handle the -version and -help switches: they imply -batch, | 600 /* Partially handle the -version and -help switches: they imply -batch, |
613 but are not removed from the list. */ | 601 but are not removed from the list. */ |
614 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args) || | 602 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args) || |
615 argmatch (argv, argc, "-?", 0, 2, NULL, &skip_args) || | 603 argmatch (argv, argc, "-?", 0, 2, NULL, &skip_args) || |
616 argmatch (argv, argc, "-flags", "--flags", 6, NULL, &skip_args)) | 604 argmatch (argv, argc, "-flags", "--flags", 6, NULL, &skip_args)) |
761 syms_of_bytecode (); | 749 syms_of_bytecode (); |
762 syms_of_callint (); | 750 syms_of_callint (); |
763 syms_of_callproc (); | 751 syms_of_callproc (); |
764 syms_of_casefiddle (); | 752 syms_of_casefiddle (); |
765 syms_of_casetab (); | 753 syms_of_casetab (); |
754 syms_of_chartab (); | |
766 syms_of_cmdloop (); | 755 syms_of_cmdloop (); |
767 syms_of_cmds (); | 756 syms_of_cmds (); |
768 syms_of_console (); | 757 syms_of_console (); |
769 syms_of_data (); | 758 syms_of_data (); |
770 #ifdef DEBUG_XEMACS | 759 #ifdef DEBUG_XEMACS |
877 #ifdef HAVE_SCROLLBARS | 866 #ifdef HAVE_SCROLLBARS |
878 syms_of_scrollbar_ns (); | 867 syms_of_scrollbar_ns (); |
879 #endif | 868 #endif |
880 #endif /* HAVE_NEXTSTEP */ | 869 #endif /* HAVE_NEXTSTEP */ |
881 | 870 |
871 #ifdef MULE | |
872 syms_of_mule (); | |
873 syms_of_mule_ccl (); | |
874 syms_of_mule_charset (); | |
875 syms_of_mule_coding (); | |
876 #ifdef HAVE_WNN | |
877 syms_of_mule_wnn (); | |
878 #endif | |
879 #ifdef HAVE_CANNA | |
880 syms_of_mule_canna (); | |
881 #endif /* HAVE_CANNA */ | |
882 #endif /* MULE */ | |
883 | |
882 #ifdef SYMS_SYSTEM | 884 #ifdef SYMS_SYSTEM |
883 SYMS_SYSTEM; | 885 SYMS_SYSTEM; |
884 #endif | 886 #endif |
885 | 887 |
886 #ifdef SYMS_MACHINE | 888 #ifdef SYMS_MACHINE |
980 | 982 |
981 */ | 983 */ |
982 | 984 |
983 structure_type_create (); | 985 structure_type_create (); |
984 | 986 |
987 structure_type_create_chartab (); | |
985 structure_type_create_faces (); | 988 structure_type_create_faces (); |
986 structure_type_create_rangetab (); | 989 structure_type_create_rangetab (); |
987 | 990 |
988 /* Now initialize the image instantiator formats and associated symbols. | 991 /* Now initialize the image instantiator formats and associated symbols. |
989 Other than the first function below, the functions may | 992 Other than the first function below, the functions may |
1008 LSTREAM_HAS_METHOD() | 1011 LSTREAM_HAS_METHOD() |
1009 | 1012 |
1010 */ | 1013 */ |
1011 | 1014 |
1012 lstream_type_create (); | 1015 lstream_type_create (); |
1016 #ifdef MULE | |
1017 lstream_type_create_mule_coding (); | |
1018 #endif | |
1013 lstream_type_create_print (); | 1019 lstream_type_create_print (); |
1014 | 1020 |
1015 /* Now initialize most variables. | 1021 /* Now initialize most variables. |
1016 | 1022 |
1017 These functions may do exactly the following: | 1023 These functions may do exactly the following: |
1096 vars_of_gui (); | 1102 vars_of_gui (); |
1097 #endif | 1103 #endif |
1098 vars_of_indent (); | 1104 vars_of_indent (); |
1099 vars_of_insdel (); | 1105 vars_of_insdel (); |
1100 vars_of_intl (); | 1106 vars_of_intl (); |
1107 #ifdef HAVE_XIM | |
1108 #ifdef XIM_MOTIF | |
1109 vars_of_input_method_motif (); | |
1110 #else /* XIM_XLIB */ | |
1111 vars_of_input_method_xlib (); | |
1112 #endif | |
1113 #endif /* HAVE_XIM */ | |
1101 vars_of_keymap (); | 1114 vars_of_keymap (); |
1102 vars_of_lread (); | 1115 vars_of_lread (); |
1103 vars_of_lstream (); | 1116 vars_of_lstream (); |
1104 vars_of_macros (); | 1117 vars_of_macros (); |
1105 vars_of_md5 (); | 1118 vars_of_md5 (); |
1166 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) | 1179 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) |
1167 vars_of_gui_x (); | 1180 vars_of_gui_x (); |
1168 #endif | 1181 #endif |
1169 #endif | 1182 #endif |
1170 | 1183 |
1184 #ifdef MULE | |
1185 vars_of_mule (); | |
1186 vars_of_mule_charset (); | |
1187 vars_of_mule_coding (); | |
1188 #ifdef HAVE_WNN | |
1189 vars_of_mule_wnn (); | |
1190 #endif | |
1191 #ifdef HAVE_CANNA | |
1192 vars_of_mule_canna (); | |
1193 #endif /* HAVE_CANNA */ | |
1194 #endif /* MULE */ | |
1195 | |
1171 #ifdef ENERGIZE | 1196 #ifdef ENERGIZE |
1172 vars_of_energize (); | 1197 vars_of_energize (); |
1173 #endif | 1198 #endif |
1174 | 1199 |
1175 #ifdef TOOLTALK | 1200 #ifdef TOOLTALK |
1223 complex_vars_of_extents (); | 1248 complex_vars_of_extents (); |
1224 | 1249 |
1225 /* Depends on hashtables and specifiers. */ | 1250 /* Depends on hashtables and specifiers. */ |
1226 complex_vars_of_faces (); | 1251 complex_vars_of_faces (); |
1227 | 1252 |
1253 #ifdef MULE | |
1254 /* These two depend on hashtables and various variables declared | |
1255 earlier. The second may also depend on the first. */ | |
1256 complex_vars_of_mule_charset (); | |
1257 complex_vars_of_mule_coding (); | |
1258 #endif | |
1259 | |
1228 /* This calls allocate_glyph(), which creates specifiers | 1260 /* This calls allocate_glyph(), which creates specifiers |
1229 and also relies on a variable (Vthe_nothing_vector) initialized | 1261 and also relies on a variable (Vthe_nothing_vector) initialized |
1230 above. */ | 1262 above. It also calls make_ext_string(), which under Mule |
1263 could require that the charsets be initialized. */ | |
1231 complex_vars_of_glyphs (); | 1264 complex_vars_of_glyphs (); |
1232 | 1265 |
1233 /* This relies on the glyphs just created in the previous function, | 1266 /* This relies on the glyphs just created in the previous function, |
1234 and calls Fadd_spec_to_specifier(), which relies on various | 1267 and calls Fadd_spec_to_specifier(), which relies on various |
1235 variables initialized above. */ | 1268 variables initialized above. */ |
1255 | 1288 |
1256 /* Depends on hashtables. */ | 1289 /* Depends on hashtables. */ |
1257 #ifdef ENERGIZE | 1290 #ifdef ENERGIZE |
1258 complex_vars_of_energize (); | 1291 complex_vars_of_energize (); |
1259 #endif | 1292 #endif |
1293 | |
1294 /* This calls Fcopy_category_table() under Mule, which calls who | |
1295 knows what. */ | |
1296 complex_vars_of_chartab (); | |
1260 | 1297 |
1261 /* This calls set_string_char(), which (under Mule) depends on the | 1298 /* This calls set_string_char(), which (under Mule) depends on the |
1262 charsets being initialized. */ | 1299 charsets being initialized. */ |
1263 complex_vars_of_casetab (); | 1300 complex_vars_of_casetab (); |
1264 | 1301 |
1304 { | 1341 { |
1305 /* Stuff that needs to be reset at run time. Order below should | 1342 /* Stuff that needs to be reset at run time. Order below should |
1306 not matter. */ | 1343 not matter. */ |
1307 reinit_alloc (); | 1344 reinit_alloc (); |
1308 reinit_eval (); | 1345 reinit_eval (); |
1346 #ifdef MULE_REGEXP | |
1347 reinit_mule_category (); | |
1348 #endif | |
1309 } | 1349 } |
1310 | 1350 |
1311 /* Now do further initialization/setup of stuff that is not needed by the | 1351 /* Now do further initialization/setup of stuff that is not needed by the |
1312 syms_of_() routines. This involves stuff that only is enabled in | 1352 syms_of_() routines. This involves stuff that only is enabled in |
1313 an interactive run (redisplay, user input, etc.) and stuff that is | 1353 an interactive run (redisplay, user input, etc.) and stuff that is |
1391 load_me = Qnil; | 1431 load_me = Qnil; |
1392 if (!initialized) | 1432 if (!initialized) |
1393 { | 1433 { |
1394 /* Handle -l loadup-and-dump, args passed by Makefile. */ | 1434 /* Handle -l loadup-and-dump, args passed by Makefile. */ |
1395 if (argc > 2 + skip_args && !strcmp (argv[1 + skip_args], "-l")) | 1435 if (argc > 2 + skip_args && !strcmp (argv[1 + skip_args], "-l")) |
1396 load_me = build_string (argv[2 + skip_args]); | 1436 load_me = build_string (argv[2 + skip_args]); |
1397 #ifdef CANNOT_DUMP | 1437 #ifdef CANNOT_DUMP |
1398 /* Unless next switch is -nl, load "loadup.el" first thing. */ | 1438 /* Unless next switch is -nl, load "loadup.el" first thing. */ |
1399 if (!(argc > 1 + skip_args && !strcmp (argv[1 + skip_args], "-nl"))) | 1439 if (!(argc > 1 + skip_args && !strcmp (argv[1 + skip_args], "-nl"))) |
1400 load_me = build_string ("loadup.el"); | 1440 load_me = build_string ("loadup.el"); |
1401 #endif /* CANNOT_DUMP */ | 1441 #endif /* CANNOT_DUMP */ |
1515 int *options = (int *) xmalloc (sizeof (int) * argc); | 1555 int *options = (int *) xmalloc (sizeof (int) * argc); |
1516 int *priority = (int *) xmalloc (sizeof (int) * argc); | 1556 int *priority = (int *) xmalloc (sizeof (int) * argc); |
1517 int to = 1; | 1557 int to = 1; |
1518 int from; | 1558 int from; |
1519 int i; | 1559 int i; |
1520 int end_of_options_p = 0; | |
1521 | 1560 |
1522 /* Categorize all the options, | 1561 /* Categorize all the options, |
1523 and figure out which argv elts are option arguments. */ | 1562 and figure out which argv elts are option arguments. */ |
1524 for (from = 1; from < argc; from++) | 1563 for (from = 1; from < argc; from++) |
1525 { | 1564 { |
1526 options[from] = -1; | 1565 options[from] = -1; |
1527 priority[from] = 0; | 1566 priority[from] = 0; |
1528 /* Pseudo options "--" and "run-temacs" indicate end of options */ | 1567 if (argv[from][0] == '-') |
1529 if (!strcmp (argv[from], "--") || | |
1530 !strcmp (argv[from], "run-temacs")) | |
1531 end_of_options_p = 1; | |
1532 if (!end_of_options_p && argv[from][0] == '-') | |
1533 { | 1568 { |
1534 int match, thislen; | 1569 int match, thislen; |
1535 char *equals; | 1570 char *equals; |
1536 | 1571 |
1537 /* Look for a match with a known old-fashioned option. */ | 1572 /* Look for a match with a known old-fashioned option. */ |
1654 much as long as your filesystem is local, and you don't end up with | 1689 much as long as your filesystem is local, and you don't end up with |
1655 a dumped version in case you want to rerun it. This function is most | 1690 a dumped version in case you want to rerun it. This function is most |
1656 useful when used as part of the `make all-elc' command. --ben] | 1691 useful when used as part of the `make all-elc' command. --ben] |
1657 This will \"restart\" emacs with the specified command-line arguments. | 1692 This will \"restart\" emacs with the specified command-line arguments. |
1658 */ | 1693 */ |
1659 (int nargs, Lisp_Object *args)) | 1694 (int nargs, Lisp_Object *args)) |
1660 { | 1695 { |
1661 int ac; | 1696 int ac; |
1662 Extbyte *wampum; | 1697 Extbyte *wampum; |
1663 int namesize; | 1698 int namesize; |
1664 int total_len; | 1699 int total_len; |
1723 #endif /* QUANTIFY */ | 1758 #endif /* QUANTIFY */ |
1724 | 1759 |
1725 suppress_early_backtrace = 0; | 1760 suppress_early_backtrace = 0; |
1726 lim_data = 0; /* force reinitialization of this variable */ | 1761 lim_data = 0; /* force reinitialization of this variable */ |
1727 | 1762 |
1728 /* Lisp_Object must fit in a word; check VALBITS and GCTYPEBITS */ | 1763 if (sizeof (Lisp_Object) != sizeof (void *)) |
1729 assert (sizeof (Lisp_Object) == sizeof (void *)); | 1764 abort (); /* Lisp_Object must fit in a word; |
1730 | 1765 check VALBITS and GCTYPEBITS */ |
1731 if (!initialized) | 1766 if (!initialized) |
1732 { | 1767 { |
1733 run_temacs_argc = 0; | 1768 run_temacs_argc = 0; |
1734 if (! SETJMP (run_temacs_catch)) | 1769 if (! SETJMP (run_temacs_catch)) |
1735 main_1 (vol_argc, vol_argv, vol_envp); | 1770 main_1 (vol_argc, vol_argv, vol_envp); |
1736 /* run-emacs-from-temacs called */ | 1771 /* run-emacs-from-temacs called */ |
1737 vol_argc = run_temacs_argc; | 1772 vol_argc = run_temacs_argc; |
1738 vol_argv = run_temacs_argv; | 1773 run_temacs_argc = 0; |
1774 vol_argv = run_temacs_argv; | |
1739 #ifdef _SCO_DS | 1775 #ifdef _SCO_DS |
1740 /* This makes absolutely no sense to anyone involved. There are | 1776 /* |
1741 several people using this stuff. We've compared versions on | 1777 This makes absolutely no sense to anyone involved. |
1742 everything we can think of. We can find no difference. | 1778 There are several people using this stuff. We've |
1743 However, on both my systems environ is a plain old global | 1779 compared versions on everything we can think of. We |
1744 variable initialized to zero. _environ is the one that | 1780 can find no difference. However, on both my systems |
1745 contains pointers to the actual environment. | 1781 environ is a plain old global variable initialized to |
1746 | 1782 zero. _environ is the one that contains pointers to |
1747 Since we can't figure out the difference (and we're hours | 1783 the actual environment. |
1748 away from a release), this takes a very cowardly approach and | 1784 Since we can't figure out the difference (and we're |
1749 is bracketed with both a system specific preprocessor test | 1785 hours away from a release), this takes a very cowardly |
1750 and a runtime "do you have this problem" test | 1786 approach and is bracketed with both a system specific |
1751 | 1787 preprocessor test and a runtime "do you have this |
1752 06/20/96 robertl@dgii.com */ | 1788 problem" test |
1753 { | 1789 06/20/96 robertl@dgii.com |
1754 extern char *_environ; | 1790 */ |
1755 if ((unsigned) environ == 0) | 1791 { |
1756 environ=_environ; | 1792 extern char *_environ ; |
1757 } | 1793 if ((unsigned) environ == 0) |
1794 environ=_environ; | |
1795 } | |
1758 #endif /* _SCO_DS */ | 1796 #endif /* _SCO_DS */ |
1759 vol_envp = environ; | 1797 vol_envp = environ; |
1760 } | 1798 } |
1761 run_temacs_argc = -1; | 1799 run_temacs_argc = -1; |
1762 | 1800 |
1763 main_1 (vol_argc, vol_argv, vol_envp); | 1801 main_1 (vol_argc, vol_argv, vol_envp); |
1764 } | 1802 } |
1765 | 1803 |
2124 /* This flag is useful to define if you're under a debugger; this way, you | 2162 /* This flag is useful to define if you're under a debugger; this way, you |
2125 can put a breakpoint of assert_failed() and debug multiple problems | 2163 can put a breakpoint of assert_failed() and debug multiple problems |
2126 in one session without having to recompile. */ | 2164 in one session without having to recompile. */ |
2127 /* #define ASSERTIONS_DONT_ABORT */ | 2165 /* #define ASSERTIONS_DONT_ABORT */ |
2128 | 2166 |
2167 #ifdef USE_ASSERTIONS | |
2129 /* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */ | 2168 /* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */ |
2130 | 2169 |
2131 DOESNT_RETURN | 2170 DOESNT_RETURN |
2132 assert_failed (CONST char *file, int line, CONST char *expr) | 2171 assert_failed (CONST char *file, int line, CONST char *expr) |
2133 { | 2172 { |
2136 #undef abort /* avoid infinite #define loop... */ | 2175 #undef abort /* avoid infinite #define loop... */ |
2137 #ifndef ASSERTIONS_DONT_ABORT | 2176 #ifndef ASSERTIONS_DONT_ABORT |
2138 abort (); | 2177 abort (); |
2139 #endif | 2178 #endif |
2140 } | 2179 } |
2180 #endif /* USE_ASSERTIONS */ | |
2141 | 2181 |
2142 #ifdef QUANTIFY | 2182 #ifdef QUANTIFY |
2143 DEFUN ("quantify-start-recording-data", | 2183 DEFUN ("quantify-start-recording-data", |
2144 Fquantify_start_recording_data, 0, 0, 0, /* | 2184 Fquantify_start_recording_data, 0, 0, 0, /* |
2145 Start recording Quantify data. | 2185 Start recording Quantify data. |
2238 #endif | 2278 #endif |
2239 DEFVAR_LISP ("system-configuration", &Vsystem_configuration /* | 2279 DEFVAR_LISP ("system-configuration", &Vsystem_configuration /* |
2240 Value is string indicating configuration XEmacs was built for. | 2280 Value is string indicating configuration XEmacs was built for. |
2241 */ ); | 2281 */ ); |
2242 Vsystem_configuration = Fpurecopy (build_string (EMACS_CONFIGURATION)); | 2282 Vsystem_configuration = Fpurecopy (build_string (EMACS_CONFIGURATION)); |
2243 | |
2244 /* emacs-major-version and emacs-minor-version work correctly in the */ | |
2245 /* real XEmacs source code ... */ | |
2246 DEFVAR_LISP ("emacs-major-version", &Vemacs_major_version /* | |
2247 Major version number of this version of Emacs, as an integer. | |
2248 Warning: this variable did not exist in Emacs versions earlier than: | |
2249 FSF Emacs: 19.23 | |
2250 XEmacs: 19.10 | |
2251 */ ); | |
2252 Vemacs_major_version = make_int (19); | |
2253 | |
2254 DEFVAR_LISP ("emacs-minor-version", &Vemacs_minor_version /* | |
2255 Minor version number of this version of Emacs, as an integer. | |
2256 Warning: this variable did not exist in Emacs versions earlier than: | |
2257 FSF Emacs: 19.23 | |
2258 XEmacs: 19.10 | |
2259 */ ); | |
2260 Vemacs_minor_version = make_int (16); | |
2261 | |
2262 | 2283 |
2263 DEFVAR_BOOL ("noninteractive", &noninteractive1 /* | 2284 DEFVAR_BOOL ("noninteractive", &noninteractive1 /* |
2264 Non-nil means XEmacs is running without interactive terminal. | 2285 Non-nil means XEmacs is running without interactive terminal. |
2265 */ ); | 2286 */ ); |
2266 | 2287 |