comparison src/emacs.c @ 854:1d8fb2eee1bb

[xemacs-hg @ 2002-05-28 16:06:58 by didierv] Fix header inclusion order
author didierv
date Tue, 28 May 2002 16:07:03 +0000
parents 2b6fa2618f76
children 84762348c6f9
comparison
equal deleted inserted replaced
853:2b6fa2618f76 854:1d8fb2eee1bb
231 version 18.57 released late January, 1991. 231 version 18.57 released late January, 1991.
232 version 18.58 released ?????. 232 version 18.58 released ?????.
233 version 18.59 released October 31, 1992. 233 version 18.59 released October 31, 1992.
234 234
235 */ 235 */
236 236
237 /* Note: It is necessary to specify <config.h> and not "config.h" in 237 /* Note: It is necessary to specify <config.h> and not "config.h" in
238 order for the --srcdir type of compilation to work properly. 238 order for the --srcdir type of compilation to work properly.
239 Otherwise the config.h from the srcdir, rather than the one from 239 Otherwise the config.h from the srcdir, rather than the one from
240 the build dir, will be used. */ 240 the build dir, will be used. */
241 241
249 #include "process.h" 249 #include "process.h"
250 #include "redisplay.h" 250 #include "redisplay.h"
251 #include "frame.h" 251 #include "frame.h"
252 #include "sysdep.h" 252 #include "sysdep.h"
253 253
254 #include "syssignal.h" /* Always include before systty.h */ 254 #include "syssignal.h" /* Always include before systty.h and sysproc.h */
255 #include "systty.h" 255 #include "systty.h"
256 #include "sysfile.h" 256 #include "sysfile.h"
257 #include "systime.h" 257 #include "systime.h"
258 #include "sysproc.h" /* for qxe_getpid() */ 258 #include "sysproc.h" /* for qxe_getpid() */
259 259
728 currently because we can't initialize the Unicode tables until we've 728 currently because we can't initialize the Unicode tables until we've
729 computed the location of data-directory, which doesn't happen till 729 computed the location of data-directory, which doesn't happen till
730 startup.el, which is way late. We need to be dumping the Unicode 730 startup.el, which is way late. We need to be dumping the Unicode
731 data, which means we need to fix pdump to correctly dump the "union" 731 data, which means we need to fix pdump to correctly dump the "union"
732 format used by the tables. */ 732 format used by the tables. */
733 733
734 #if (!defined (SYSTEM_MALLOC) && !defined (HAVE_LIBMCHECK) \ 734 #if (!defined (SYSTEM_MALLOC) && !defined (HAVE_LIBMCHECK) \
735 && !defined (DOUG_LEA_MALLOC)) 735 && !defined (DOUG_LEA_MALLOC))
736 /* Make sure that any libraries we link against haven't installed a 736 /* Make sure that any libraries we link against haven't installed a
737 hook for a gmalloc of a potentially incompatible version. */ 737 hook for a gmalloc of a potentially incompatible version. */
738 /* If we're using libmcheck, the hooks have already been initialized, */ 738 /* If we're using libmcheck, the hooks have already been initialized, */
824 824
825 /* NOTE NOTE NOTE: Keep the following args in sync with the big list of 825 /* NOTE NOTE NOTE: Keep the following args in sync with the big list of
826 arguments below in standard_args[], with the help text in startup.el, 826 arguments below in standard_args[], with the help text in startup.el,
827 and with the list of non-clobbered variables near where pdump_load() 827 and with the list of non-clobbered variables near where pdump_load()
828 is called! */ 828 is called! */
829 829
830 /* Handle the -sd/--show-dump-id switch, which means show the hex dump_id 830 /* Handle the -sd/--show-dump-id switch, which means show the hex dump_id
831 and quit */ 831 and quit */
832 if (argmatch (argv, argc, "-sd", "--show-dump-id", 0, NULL, &skip_args)) 832 if (argmatch (argv, argc, "-sd", "--show-dump-id", 0, NULL, &skip_args))
833 { 833 {
834 #ifdef PDUMP 834 #ifdef PDUMP
836 #else 836 #else
837 printf ("Portable dumper not configured; -sd just forces exit.\n"); 837 printf ("Portable dumper not configured; -sd just forces exit.\n");
838 #endif 838 #endif
839 exit (0); 839 exit (0);
840 } 840 }
841 841
842 /* Handle the -t switch, which specifies filename to use as terminal */ 842 /* Handle the -t switch, which specifies filename to use as terminal */
843 { 843 {
844 Extbyte *term; 844 Extbyte *term;
845 if (argmatch (argv, argc, "-t", "--terminal", 0, &term, &skip_args)) 845 if (argmatch (argv, argc, "-t", "--terminal", 0, &term, &skip_args))
846 { 846 {
888 up a communication path with i.exe so that when a ^C is sent to it 888 up a communication path with i.exe so that when a ^C is sent to it
889 (using GenerateConsoleCtrlEvent), it in turn signals us to commit 889 (using GenerateConsoleCtrlEvent), it in turn signals us to commit
890 suicide. (This is cleaner than using TerminateProcess()). This 890 suicide. (This is cleaner than using TerminateProcess()). This
891 makes (e.g.) the "Stop Build" command from VC++ correctly terminate 891 makes (e.g.) the "Stop Build" command from VC++ correctly terminate
892 XEmacs. */ 892 XEmacs. */
893 893
894 char *heventstr; 894 char *heventstr;
895 if (argmatch (argv, argc, "-mswindows-termination-handle", 0, 0, 895 if (argmatch (argv, argc, "-mswindows-termination-handle", 0, 0,
896 &heventstr, &skip_args)) 896 &heventstr, &skip_args))
897 { 897 {
898 HANDLE hevent = (HANDLE) atol (heventstr); 898 HANDLE hevent = (HANDLE) atol (heventstr);
934 #ifdef HAVE_SHLIB 934 #ifdef HAVE_SHLIB
935 if (argmatch (argv, argc, "-no-site-modules", "--no-site-modules", 935 if (argmatch (argv, argc, "-no-site-modules", "--no-site-modules",
936 0, NULL, &skip_args)) 936 0, NULL, &skip_args))
937 #endif 937 #endif
938 inhibit_site_modules = 1; 938 inhibit_site_modules = 1;
939 939
940 if (argmatch (argv, argc, "-vanilla", "--vanilla", 940 if (argmatch (argv, argc, "-vanilla", "--vanilla",
941 0, NULL, &skip_args)) 941 0, NULL, &skip_args))
942 { 942 {
943 inhibit_early_packages = 1; 943 inhibit_early_packages = 1;
944 vanilla_inhibiting = 1; 944 vanilla_inhibiting = 1;
1306 #endif 1306 #endif
1307 #ifdef HAVE_MENUBARS 1307 #ifdef HAVE_MENUBARS
1308 syms_of_menubar_gtk (); 1308 syms_of_menubar_gtk ();
1309 #endif 1309 #endif
1310 syms_of_select_gtk (); 1310 syms_of_select_gtk ();
1311 1311
1312 #ifdef HAVE_GUI_OBJECTS 1312 #ifdef HAVE_GUI_OBJECTS
1313 syms_of_gui_gtk (); 1313 syms_of_gui_gtk ();
1314 #endif 1314 #endif
1315 #endif /* HAVE_GTK */ 1315 #endif /* HAVE_GTK */
1316 1316
3028 else 3028 else
3029 retval = 0; 3029 retval = 0;
3030 EMACS_SIGNAL (SIGBUS, old_sigbus); 3030 EMACS_SIGNAL (SIGBUS, old_sigbus);
3031 EMACS_SIGNAL (SIGSEGV, old_sigsegv); 3031 EMACS_SIGNAL (SIGSEGV, old_sigsegv);
3032 errno = old_errno; 3032 errno = old_errno;
3033 3033
3034 return retval; 3034 return retval;
3035 } 3035 }
3036 3036
3037 #endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */ 3037 #endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */
3038 3038
3309 UNGCPRO; 3309 UNGCPRO;
3310 3310
3311 #ifdef HAVE_MS_WINDOWS 3311 #ifdef HAVE_MS_WINDOWS
3312 pause_so_user_can_read_messages (1); 3312 pause_so_user_can_read_messages (1);
3313 #endif 3313 #endif
3314 3314
3315 shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0); 3315 shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0);
3316 3316
3317 #if defined(GNU_MALLOC) 3317 #if defined(GNU_MALLOC)
3318 __free_hook = 3318 __free_hook =
3319 #ifdef __GNUC__ /* prototype of __free_hook varies with glibc version */ 3319 #ifdef __GNUC__ /* prototype of __free_hook varies with glibc version */
3346 the GPF, and properly go into the debugger.) */ 3346 the GPF, and properly go into the debugger.) */
3347 #if defined (ERROR_CHECK_TYPES) || defined (ERROR_CHECK_TEXT) || defined (ERROR_CHECK_GC) || defined (ERROR_CHECK_STRUCTURES) 3347 #if defined (ERROR_CHECK_TYPES) || defined (ERROR_CHECK_TEXT) || defined (ERROR_CHECK_GC) || defined (ERROR_CHECK_STRUCTURES)
3348 #define USER_IS_DEVELOPING_XEMACS 3348 #define USER_IS_DEVELOPING_XEMACS
3349 #endif 3349 #endif
3350 3350
3351 3351
3352 /* Handle bus errors, illegal instruction, etc: actual implementation. */ 3352 /* Handle bus errors, illegal instruction, etc: actual implementation. */
3353 static void 3353 static void
3354 guts_of_fatal_error_signal (int sig) 3354 guts_of_fatal_error_signal (int sig)
3355 { 3355 {
3356 fatal_error_in_progress++; 3356 fatal_error_in_progress++;