Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | a4f53d9b3154 |
children | 6240c7796c7a |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
105 Lisp_Object Vsystem_configuration_options; | 105 Lisp_Object Vsystem_configuration_options; |
106 | 106 |
107 /* Version numbers and strings */ | 107 /* Version numbers and strings */ |
108 Lisp_Object Vemacs_major_version; | 108 Lisp_Object Vemacs_major_version; |
109 Lisp_Object Vemacs_minor_version; | 109 Lisp_Object Vemacs_minor_version; |
110 Lisp_Object Vemacs_patch_level; | |
111 Lisp_Object Vemacs_beta_version; | 110 Lisp_Object Vemacs_beta_version; |
112 Lisp_Object Vxemacs_codename; | 111 Lisp_Object Vxemacs_codename; |
113 #ifdef INFODOCK | 112 #ifdef INFODOCK |
114 Lisp_Object Vinfodock_major_version; | 113 Lisp_Object Vinfodock_major_version; |
115 Lisp_Object Vinfodock_minor_version; | 114 Lisp_Object Vinfodock_minor_version; |
216 extern int always_gc; /* hack */ | 215 extern int always_gc; /* hack */ |
217 | 216 |
218 Lisp_Object Qkill_emacs_hook; | 217 Lisp_Object Qkill_emacs_hook; |
219 Lisp_Object Qsave_buffers_kill_emacs; | 218 Lisp_Object Qsave_buffers_kill_emacs; |
220 | 219 |
221 extern Lisp_Object Vauto_save_list_file_name; | |
222 | 220 |
223 /* Signal code for the fatal signal that was received */ | 221 /* Signal code for the fatal signal that was received */ |
224 static int fatal_error_code; | 222 static int fatal_error_code; |
225 | 223 |
226 /* Nonzero if handling a fatal error already */ | 224 /* Nonzero if handling a fatal error already */ |
530 int inhibit_window_system; | 528 int inhibit_window_system; |
531 #ifdef NeXT | 529 #ifdef NeXT |
532 extern int malloc_cookie; | 530 extern int malloc_cookie; |
533 #endif | 531 #endif |
534 | 532 |
535 #if (!defined (SYSTEM_MALLOC) && !defined (HAVE_LIBMCHECK) \ | 533 #if !defined(SYSTEM_MALLOC) && !defined(HAVE_LIBMCHECK) |
536 && !defined (DOUG_LEA_MALLOC)) | |
537 /* Make sure that any libraries we link against haven't installed a | 534 /* Make sure that any libraries we link against haven't installed a |
538 hook for a gmalloc of a potentially incompatible version. */ | 535 hook for a gmalloc of a potentially incompatible version. */ |
539 /* If we're using libmcheck, the hooks have already been initialized, */ | 536 /* If we're using libmcheck, the hooks have already been initialized, */ |
540 /* don't touch them. -slb */ | 537 /* don't touch them. -slb */ |
541 __malloc_hook = NULL; | 538 __malloc_hook = NULL; |
542 __realloc_hook = NULL; | 539 __realloc_hook = NULL; |
543 __free_hook = NULL; | 540 __free_hook = NULL; |
544 #endif /* not SYSTEM_MALLOC or HAVE_LIBMCHECK or DOUG_LEA_MALLOC */ | 541 #endif /* not SYSTEM_MALLOC */ |
545 | 542 |
546 noninteractive = 0; | 543 noninteractive = 0; |
547 | 544 |
548 #ifdef NeXT | 545 #ifdef NeXT |
549 /* 19-Jun-1995 -baw | 546 /* 19-Jun-1995 -baw |
613 #endif /* APOLLO */ | 610 #endif /* APOLLO */ |
614 | 611 |
615 #if defined (HAVE_MMAP) && defined (REL_ALLOC) | 612 #if defined (HAVE_MMAP) && defined (REL_ALLOC) |
616 /* ralloc can only be used if using the GNU memory allocator. */ | 613 /* ralloc can only be used if using the GNU memory allocator. */ |
617 init_ralloc (); | 614 init_ralloc (); |
618 #elif defined (REL_ALLOC) && !defined(DOUG_LEA_MALLOC) | |
619 if (initialized) | |
620 init_ralloc(); | |
621 #endif | 615 #endif |
622 | 616 |
623 #ifdef HAVE_SOCKS | 617 #ifdef HAVE_SOCKS |
624 if (initialized) | 618 if (initialized) |
625 SOCKSinit (argv[0]); | 619 SOCKSinit (argv[0]); |
866 */ | 860 */ |
867 | 861 |
868 syms_of_abbrev (); | 862 syms_of_abbrev (); |
869 syms_of_alloc (); | 863 syms_of_alloc (); |
870 #ifdef HAVE_X_WINDOWS | 864 #ifdef HAVE_X_WINDOWS |
871 #ifdef HAVE_BALLOON_HELP | |
872 syms_of_balloon_x (); | 865 syms_of_balloon_x (); |
873 #endif | |
874 #endif | 866 #endif |
875 syms_of_buffer (); | 867 syms_of_buffer (); |
876 syms_of_bytecode (); | 868 syms_of_bytecode (); |
877 syms_of_callint (); | 869 syms_of_callint (); |
878 syms_of_callproc (); | 870 syms_of_callproc (); |
983 #endif | 975 #endif |
984 syms_of_xselect (); | 976 syms_of_xselect (); |
985 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) | 977 #if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) |
986 syms_of_gui_x (); | 978 syms_of_gui_x (); |
987 #endif | 979 #endif |
988 #ifdef HAVE_XIM | |
989 #ifdef XIM_XLIB | |
990 syms_of_input_method_xlib (); | |
991 #endif | |
992 #endif /* HAVE_XIM */ | |
993 #endif /* HAVE_X_WINDOWS */ | 980 #endif /* HAVE_X_WINDOWS */ |
994 | 981 |
995 #ifdef HAVE_MS_WINDOWS | 982 #ifdef HAVE_MS_WINDOWS |
996 syms_of_console_mswindows (); | 983 syms_of_console_mswindows (); |
997 syms_of_device_mswindows (); | 984 syms_of_device_mswindows (); |
1007 syms_of_scrollbar_mswindows (); | 994 syms_of_scrollbar_mswindows (); |
1008 #endif | 995 #endif |
1009 #ifdef HAVE_MSW_C_DIRED | 996 #ifdef HAVE_MSW_C_DIRED |
1010 syms_of_dired_mswindows (); | 997 syms_of_dired_mswindows (); |
1011 #endif | 998 #endif |
1012 #ifdef WINDOWSNT | |
1013 syms_of_ntproc (); | |
1014 #endif | |
1015 #endif /* HAVE_MS_WINDOWS */ | 999 #endif /* HAVE_MS_WINDOWS */ |
1016 | 1000 |
1017 #ifdef MULE | 1001 #ifdef MULE |
1018 syms_of_mule (); | 1002 syms_of_mule (); |
1019 syms_of_mule_ccl (); | 1003 syms_of_mule_ccl (); |
1020 syms_of_mule_charset (); | 1004 syms_of_mule_charset (); |
1021 #endif | 1005 #endif |
1022 #ifdef FILE_CODING | 1006 #ifdef FILE_CODING |
1023 syms_of_file_coding (); | 1007 syms_of_mule_coding (); |
1024 #endif | 1008 #endif |
1025 #ifdef MULE | 1009 #ifdef MULE |
1026 #ifdef HAVE_WNN | 1010 #ifdef HAVE_WNN |
1027 syms_of_mule_wnn (); | 1011 syms_of_mule_wnn (); |
1028 #endif | 1012 #endif |
1195 | 1179 |
1196 */ | 1180 */ |
1197 | 1181 |
1198 lstream_type_create (); | 1182 lstream_type_create (); |
1199 #ifdef FILE_CODING | 1183 #ifdef FILE_CODING |
1200 lstream_type_create_file_coding (); | 1184 lstream_type_create_mule_coding (); |
1201 #endif | 1185 #endif |
1202 #if defined (HAVE_MS_WINDOWS) && !defined(HAVE_MSG_SELECT) | 1186 #if defined (HAVE_MS_WINDOWS) && !defined(HAVE_MSG_SELECT) |
1203 lstream_type_create_mswindows_selectable (); | 1187 lstream_type_create_mswindows_selectable (); |
1204 #endif | 1188 #endif |
1205 | 1189 |
1260 init_provide_once (); | 1244 init_provide_once (); |
1261 | 1245 |
1262 vars_of_abbrev (); | 1246 vars_of_abbrev (); |
1263 vars_of_alloc (); | 1247 vars_of_alloc (); |
1264 #ifdef HAVE_X_WINDOWS | 1248 #ifdef HAVE_X_WINDOWS |
1265 #ifdef HAVE_BALLOON_HELP | |
1266 vars_of_balloon_x (); | 1249 vars_of_balloon_x (); |
1267 #endif | |
1268 #endif | 1250 #endif |
1269 vars_of_buffer (); | 1251 vars_of_buffer (); |
1270 vars_of_bytecode (); | 1252 vars_of_bytecode (); |
1271 vars_of_callint (); | 1253 vars_of_callint (); |
1272 vars_of_callproc (); | 1254 vars_of_callproc (); |
1273 vars_of_chartab (); | |
1274 vars_of_cmdloop (); | 1255 vars_of_cmdloop (); |
1275 vars_of_cmds (); | 1256 vars_of_cmds (); |
1276 vars_of_console (); | 1257 vars_of_console (); |
1277 vars_of_data (); | 1258 vars_of_data (); |
1278 #ifdef DEBUG_XEMACS | 1259 #ifdef DEBUG_XEMACS |
1328 #endif | 1309 #endif |
1329 #ifdef HAVE_MENUBARS | 1310 #ifdef HAVE_MENUBARS |
1330 vars_of_menubar (); | 1311 vars_of_menubar (); |
1331 #endif | 1312 #endif |
1332 vars_of_minibuf (); | 1313 vars_of_minibuf (); |
1333 #ifdef WINDOWSNT | |
1334 vars_of_ntproc (); | |
1335 #endif | |
1336 vars_of_objects (); | 1314 vars_of_objects (); |
1337 vars_of_print (); | 1315 vars_of_print (); |
1338 | 1316 |
1339 #ifndef NO_SUBPROCESSES | 1317 #ifndef NO_SUBPROCESSES |
1340 vars_of_process (); | 1318 vars_of_process (); |
1415 #endif | 1393 #endif |
1416 #endif /* HAVE_MS_WINDOWS */ | 1394 #endif /* HAVE_MS_WINDOWS */ |
1417 | 1395 |
1418 #ifdef MULE | 1396 #ifdef MULE |
1419 vars_of_mule (); | 1397 vars_of_mule (); |
1420 vars_of_mule_ccl (); | |
1421 vars_of_mule_charset (); | 1398 vars_of_mule_charset (); |
1422 #endif | 1399 #endif |
1423 #ifdef FILE_CODING | 1400 #ifdef FILE_CODING |
1424 vars_of_file_coding (); | 1401 vars_of_mule_coding (); |
1425 #endif | 1402 #endif |
1426 #ifdef MULE | 1403 #ifdef MULE |
1427 #ifdef HAVE_WNN | 1404 #ifdef HAVE_WNN |
1428 vars_of_mule_wnn (); | 1405 vars_of_mule_wnn (); |
1429 #endif | 1406 #endif |
1491 /* These two depend on hashtables and various variables declared | 1468 /* These two depend on hashtables and various variables declared |
1492 earlier. The second may also depend on the first. */ | 1469 earlier. The second may also depend on the first. */ |
1493 complex_vars_of_mule_charset (); | 1470 complex_vars_of_mule_charset (); |
1494 #endif | 1471 #endif |
1495 #if defined(FILE_CODING) | 1472 #if defined(FILE_CODING) |
1496 complex_vars_of_file_coding (); | 1473 complex_vars_of_mule_coding (); |
1497 #endif | 1474 #endif |
1498 | 1475 |
1499 /* This calls allocate_glyph(), which creates specifiers | 1476 /* This calls allocate_glyph(), which creates specifiers |
1500 and also relies on a variable (Vthe_nothing_vector) initialized | 1477 and also relies on a variable (Vthe_nothing_vector) initialized |
1501 above. It also calls make_ext_string(), which under Mule | 1478 above. It also calls make_ext_string(), which under Mule |
1996 wampum_all_len[ac]); | 1973 wampum_all_len[ac]); |
1997 wampum_all_len[ac]++; | 1974 wampum_all_len[ac]++; |
1998 total_len += wampum_all_len[ac]; | 1975 total_len += wampum_all_len[ac]; |
1999 } | 1976 } |
2000 DO_REALLOC (run_temacs_args, run_temacs_args_size, total_len, char); | 1977 DO_REALLOC (run_temacs_args, run_temacs_args_size, total_len, char); |
2001 DO_REALLOC (run_temacs_argv, run_temacs_argv_size, nargs+2, char *); | 1978 DO_REALLOC (run_temacs_argv, run_temacs_argv_size, nargs+1, char *); |
2002 | 1979 |
2003 memcpy (run_temacs_args, wampum, namesize); | 1980 memcpy (run_temacs_args, wampum, namesize); |
2004 run_temacs_argv [0] = run_temacs_args; | 1981 run_temacs_argv [0] = run_temacs_args; |
2005 for (ac = 0; ac < nargs; ac++) | 1982 for (ac = 0; ac < nargs; ac++) |
2006 { | 1983 { |
2096 is bracketed with both a system specific preprocessor test | 2073 is bracketed with both a system specific preprocessor test |
2097 and a runtime "do you have this problem" test | 2074 and a runtime "do you have this problem" test |
2098 | 2075 |
2099 06/20/96 robertl@dgii.com */ | 2076 06/20/96 robertl@dgii.com */ |
2100 { | 2077 { |
2101 extern char **_environ; | 2078 extern char *_environ; |
2102 if ((unsigned) environ == 0) | 2079 if ((unsigned) environ == 0) |
2103 environ=_environ; | 2080 environ=_environ; |
2104 } | 2081 } |
2105 #endif /* _SCO_DS */ | 2082 #endif /* _SCO_DS */ |
2106 vol_envp = environ; | 2083 vol_envp = environ; |
2209 } | 2186 } |
2210 | 2187 |
2211 UNGCPRO; | 2188 UNGCPRO; |
2212 | 2189 |
2213 shut_down_emacs (0, ((STRINGP (arg)) ? arg : Qnil)); | 2190 shut_down_emacs (0, ((STRINGP (arg)) ? arg : Qnil)); |
2214 | |
2215 /* If we have an auto-save list file, | |
2216 kill it because we are exiting Emacs deliberately (not crashing). | |
2217 Do it after shut_down_emacs, which does an auto-save. */ | |
2218 if (STRINGP (Vauto_save_list_file_name)) | |
2219 unlink ((char *) XSTRING_DATA (Vauto_save_list_file_name)); | |
2220 | 2191 |
2221 #if defined(GNU_MALLOC) | 2192 #if defined(GNU_MALLOC) |
2222 __free_hook = voodoo_free_hook; | 2193 __free_hook = voodoo_free_hook; |
2223 #endif | 2194 #endif |
2224 | 2195 |
2276 stderr_out ("\nFatal error (%d).\n", sig); | 2247 stderr_out ("\nFatal error (%d).\n", sig); |
2277 stderr_out | 2248 stderr_out |
2278 ("Your files have been auto-saved.\n" | 2249 ("Your files have been auto-saved.\n" |
2279 "Use `M-x recover-session' to recover them.\n" | 2250 "Use `M-x recover-session' to recover them.\n" |
2280 "\n" | 2251 "\n" |
2281 "If you have access to the PROBLEMS file that came with your\n" | |
2282 "version of XEmacs, please check to see if your crash is described\n" | |
2283 "there, as there may be a workaround available.\n" | |
2284 #ifdef INFODOCK | 2252 #ifdef INFODOCK |
2285 "Otherwise, please report this bug by selecting `Report-Bug'\n" | 2253 "Please report this bug by selecting `Report-Bug' in the InfoDock\n" |
2286 "in the InfoDock menu.\n" | 2254 "menu.\n" |
2287 #else | 2255 #else |
2288 "Otherwise, please report this bug by running the send-pr\n" | 2256 "Please report this bug by running the send-pr script included\n" |
2289 "script included with XEmacs, or selecting `Send Bug Report'\n" | 2257 "with XEmacs, or selecting `Send Bug Report' from the help menu.\n" |
2290 "from the help menu.\n" | |
2291 "As a last resort send ordinary email to `crashes@xemacs.org'.\n" | 2258 "As a last resort send ordinary email to `crashes@xemacs.org'.\n" |
2292 #endif | 2259 #endif |
2293 "*MAKE SURE* to include the information in the command\n" | 2260 "*MAKE SURE* to include the information in the command\n" |
2294 "M-x describe-installation.\n" | 2261 "M-x describe-installation.\n" |
2295 "\n" | 2262 "\n" |
2548 if (!path) | 2515 if (!path) |
2549 return Qnil; | 2516 return Qnil; |
2550 | 2517 |
2551 GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (path, newpath); | 2518 GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (path, newpath); |
2552 | 2519 |
2553 len = strlen ((const char *) newpath); | 2520 len = strlen (newpath); |
2554 /* #### Does this make sense? It certainly does for | 2521 /* #### Does this make sense? It certainly does for |
2555 decode_env_path(), but it looks dubious here. Does any code | 2522 decode_env_path(), but it looks dubious here. Does any code |
2556 depend on decode_path("") returning nil instead of an empty | 2523 depend on decode_path("") returning nil instead of an empty |
2557 string? */ | 2524 string? */ |
2558 if (!len) | 2525 if (!len) |
2775 FSF Emacs: 19.23 | 2742 FSF Emacs: 19.23 |
2776 XEmacs: 19.10 | 2743 XEmacs: 19.10 |
2777 */ ); | 2744 */ ); |
2778 Vemacs_minor_version = make_int (EMACS_MINOR_VERSION); | 2745 Vemacs_minor_version = make_int (EMACS_MINOR_VERSION); |
2779 | 2746 |
2780 DEFVAR_LISP ("emacs-patch-level", &Vemacs_patch_level /* | 2747 DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /* |
2781 The patch level of this version of Emacs, as an integer. | |
2782 The value is non-nil if this version of XEmacs is part of a series of | |
2783 stable XEmacsen, but has bug fixes applied. | |
2784 Warning: this variable does not exist in FSF Emacs or in XEmacs versions | |
2785 earlier than 21.1.1 | |
2786 */ ); | |
2787 #ifdef EMACS_PATCH_LEVEL | |
2788 Vemacs_patch_level = make_int (EMACS_PATCH_LEVEL); | |
2789 #else | |
2790 Vemacs_patch_level = Qnil; | |
2791 #endif | |
2792 | |
2793 DEFVAR_LISP ("emacs-beta-version", &Vemacs_beta_version /* | |
2794 Beta number of this version of Emacs, as an integer. | 2748 Beta number of this version of Emacs, as an integer. |
2795 The value is nil if this is an officially released version of XEmacs. | 2749 The value is nil if this is an officially released version of XEmacs. |
2796 Warning: this variable does not exist in FSF Emacs or in XEmacs versions | 2750 Warning: this variable does not exist in FSF Emacs or in XEmacs versions |
2797 earlier than 20.3. | 2751 earlier than 20.3. |
2798 */ ); | 2752 */ ); |
3092 * The target is to override the static constructor from the | 3046 * The target is to override the static constructor from the |
3093 * libiflPNG.so library which is maskerading as libz, and | 3047 * libiflPNG.so library which is maskerading as libz, and |
3094 * cores on us when re-started from the dumped executable. | 3048 * cores on us when re-started from the dumped executable. |
3095 * This will have to go for 21.1 -- OG. | 3049 * This will have to go for 21.1 -- OG. |
3096 */ | 3050 */ |
3097 void __sti__iflPNGFile_c___(void); | |
3098 void __sti__iflPNGFile_c___() | 3051 void __sti__iflPNGFile_c___() |
3099 { | 3052 { |
3100 } | 3053 } |
3101 | 3054 |
3102 #endif | 3055 #endif |