Mercurial > hg > xemacs-beta
comparison src/events.c @ 2500:3d8143fc88e1
[xemacs-hg @ 2005-01-24 23:33:30 by ben]
get working with VC7
config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories.
Redo all graphics library defaults to mirror the versions and
directories in the current binary aux distribution on xemacs
web site. Enable TIFF and COMPFACE by default since you can
now compile with them and binary libs are provided.
xemacs.mak: Put our own directories first in case of conflict (e.g. config.h
in compface).
xemacs.mak: Use MSVCRT to avoid link problems.
s/windowsnt.h:
bytecode.c, print.c: Add casts to avoid warning.
compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and
friends here, like for GCC. Need different definitions for VC7
and VC6.
s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function
declared with __declspec(noreturn) has non-void return type")
on VC7 since lots of Lisp primitives trigger this and there is
no easy way to kludge around the warning.
glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled.
#### The better solution is to move the TIFF and JPEG code to
different files.
glyphs-msw.c: Define __STDC__ to avoid problems with compface.h.
intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone.
Various functions change parameter types semi-randomly between
VC6 and VC7, so we need to include our own versions that
can handle both kinds with appropriate casting.
EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort()
since it creates huge problems in VC7, solvable only by including
massive amounts of files in every compile (and not worth it).
author | ben |
---|---|
date | Mon, 24 Jan 2005 23:34:34 +0000 |
parents | ab71ad6ff3dd |
children | 9f70af3ac939 |
comparison
equal
deleted
inserted
replaced
2499:4c5ee4d2e921 | 2500:3d8143fc88e1 |
---|---|
304 case magic_event: | 304 case magic_event: |
305 case empty_event: | 305 case empty_event: |
306 case dead_event: | 306 case dead_event: |
307 break; | 307 break; |
308 default: | 308 default: |
309 abort (); | 309 ABORT (); |
310 } | 310 } |
311 mark_object (event->channel); | 311 mark_object (event->channel); |
312 return event->next; | 312 return event->next; |
313 } | 313 } |
314 | 314 |
397 if (e1->event_type != e2->event_type) return 0; | 397 if (e1->event_type != e2->event_type) return 0; |
398 if (!EQ (e1->channel, e2->channel)) return 0; | 398 if (!EQ (e1->channel, e2->channel)) return 0; |
399 /* if (e1->timestamp != e2->timestamp) return 0; */ | 399 /* if (e1->timestamp != e2->timestamp) return 0; */ |
400 switch (e1->event_type) | 400 switch (e1->event_type) |
401 { | 401 { |
402 default: abort (); | 402 default: ABORT (); |
403 | 403 |
404 case process_event: | 404 case process_event: |
405 return EQ (EVENT_PROCESS_PROCESS (e1), EVENT_PROCESS_PROCESS (e2)); | 405 return EQ (EVENT_PROCESS_PROCESS (e1), EVENT_PROCESS_PROCESS (e2)); |
406 | 406 |
407 case timeout_event: | 407 case timeout_event: |
503 case empty_event: | 503 case empty_event: |
504 case dead_event: | 504 case dead_event: |
505 return hash; | 505 return hash; |
506 | 506 |
507 default: | 507 default: |
508 abort (); | 508 ABORT (); |
509 } | 509 } |
510 | 510 |
511 return 0; /* unreached */ | 511 return 0; /* unreached */ |
512 } | 512 } |
513 | 513 |
821 case misc_user_event: | 821 case misc_user_event: |
822 SET_EVENT_MISC_USER_X (e, coord_x); | 822 SET_EVENT_MISC_USER_X (e, coord_x); |
823 SET_EVENT_MISC_USER_Y (e, coord_y); | 823 SET_EVENT_MISC_USER_Y (e, coord_y); |
824 break; | 824 break; |
825 default: | 825 default: |
826 abort (); | 826 ABORT (); |
827 } | 827 } |
828 } | 828 } |
829 | 829 |
830 /* Finally, do some more validation. */ | 830 /* Finally, do some more validation. */ |
831 switch (EVENT_TYPE (e)) | 831 switch (EVENT_TYPE (e)) |
882 int i, len; | 882 int i, len; |
883 | 883 |
884 if (EQ (event, Vlast_command_event) || | 884 if (EQ (event, Vlast_command_event) || |
885 EQ (event, Vlast_input_event) || | 885 EQ (event, Vlast_input_event) || |
886 EQ (event, Vunread_command_event)) | 886 EQ (event, Vunread_command_event)) |
887 abort (); | 887 ABORT (); |
888 | 888 |
889 len = XVECTOR_LENGTH (Vthis_command_keys); | 889 len = XVECTOR_LENGTH (Vthis_command_keys); |
890 for (i = 0; i < len; i++) | 890 for (i = 0; i < len; i++) |
891 if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) | 891 if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) |
892 abort (); | 892 ABORT (); |
893 if (!NILP (Vrecent_keys_ring)) | 893 if (!NILP (Vrecent_keys_ring)) |
894 { | 894 { |
895 int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); | 895 int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); |
896 for (i = 0; i < recent_ring_len; i++) | 896 for (i = 0; i < recent_ring_len; i++) |
897 if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) | 897 if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) |
898 abort (); | 898 ABORT (); |
899 } | 899 } |
900 } | 900 } |
901 #endif /* 0 */ | 901 #endif /* 0 */ |
902 | 902 |
903 assert (!EQ (event, Vevent_resource)); | 903 assert (!EQ (event, Vevent_resource)); |
1108 return previous; | 1108 return previous; |
1109 previous = event_chain; | 1109 previous = event_chain; |
1110 event_chain = XEVENT_NEXT (event_chain); | 1110 event_chain = XEVENT_NEXT (event_chain); |
1111 } | 1111 } |
1112 | 1112 |
1113 abort (); | 1113 ABORT (); |
1114 return Qnil; | 1114 return Qnil; |
1115 } | 1115 } |
1116 | 1116 |
1117 Lisp_Object | 1117 Lisp_Object |
1118 event_chain_nth (Lisp_Object event_chain, int n) | 1118 event_chain_nth (Lisp_Object event_chain, int n) |
1322 XEVENT_KEY_MODIFIERS (event) & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT)) | 1322 XEVENT_KEY_MODIFIERS (event) & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT)) |
1323 return -1; | 1323 return -1; |
1324 if (CHAR_OR_CHAR_INTP (XEVENT_KEY_KEYSYM (event))) | 1324 if (CHAR_OR_CHAR_INTP (XEVENT_KEY_KEYSYM (event))) |
1325 c = XCHAR_OR_CHAR_INT (XEVENT_KEY_KEYSYM (event)); | 1325 c = XCHAR_OR_CHAR_INT (XEVENT_KEY_KEYSYM (event)); |
1326 else if (!SYMBOLP (XEVENT_KEY_KEYSYM (event))) | 1326 else if (!SYMBOLP (XEVENT_KEY_KEYSYM (event))) |
1327 abort (); | 1327 ABORT (); |
1328 else if (map_device_key_names && !NILP (Vcharacter_set_property) | 1328 else if (map_device_key_names && !NILP (Vcharacter_set_property) |
1329 /* Allow window-system-specific extensibility of | 1329 /* Allow window-system-specific extensibility of |
1330 keysym->code mapping */ | 1330 keysym->code mapping */ |
1331 && CHAR_OR_CHAR_INTP (code = Fget (XEVENT_KEY_KEYSYM (event), | 1331 && CHAR_OR_CHAR_INTP (code = Fget (XEVENT_KEY_KEYSYM (event), |
1332 Vcharacter_set_property, | 1332 Vcharacter_set_property, |
1549 case process_event: eicat_ascii (buf, "process"); return; | 1549 case process_event: eicat_ascii (buf, "process"); return; |
1550 case timeout_event: eicat_ascii (buf, "timeout"); return; | 1550 case timeout_event: eicat_ascii (buf, "timeout"); return; |
1551 case empty_event: eicat_ascii (buf, "empty"); return; | 1551 case empty_event: eicat_ascii (buf, "empty"); return; |
1552 case dead_event: eicat_ascii (buf, "DEAD-EVENT"); return; | 1552 case dead_event: eicat_ascii (buf, "DEAD-EVENT"); return; |
1553 default: | 1553 default: |
1554 abort (); | 1554 ABORT (); |
1555 return; | 1555 return; |
1556 } | 1556 } |
1557 #define modprint(x,y) \ | 1557 #define modprint(x,y) \ |
1558 do { if (brief) eicat_ascii (buf, (y)); else eicat_ascii (buf, (x)); } while (0) | 1558 do { if (brief) eicat_ascii (buf, (y)); else eicat_ascii (buf, (x)); } while (0) |
1559 if (mod & XEMACS_MOD_CONTROL) modprint ("control-", "C-"); | 1559 if (mod & XEMACS_MOD_CONTROL) modprint ("control-", "C-"); |
1589 eicat_ascii (buf, str); | 1589 eicat_ascii (buf, str); |
1590 else | 1590 else |
1591 eicat_lstr (buf, XSYMBOL (key)->name); | 1591 eicat_lstr (buf, XSYMBOL (key)->name); |
1592 } | 1592 } |
1593 else | 1593 else |
1594 abort (); | 1594 ABORT (); |
1595 if (mouse_p) | 1595 if (mouse_p) |
1596 eicat_ascii (buf, "up"); | 1596 eicat_ascii (buf, "up"); |
1597 } | 1597 } |
1598 | 1598 |
1599 void | 1599 void |
1738 | 1738 |
1739 case empty_event: | 1739 case empty_event: |
1740 return Qempty; | 1740 return Qempty; |
1741 | 1741 |
1742 default: | 1742 default: |
1743 abort (); | 1743 ABORT (); |
1744 return Qnil; | 1744 return Qnil; |
1745 } | 1745 } |
1746 } | 1746 } |
1747 | 1747 |
1748 DEFUN ("event-timestamp", Fevent_timestamp, 1, 1, 0, /* | 1748 DEFUN ("event-timestamp", Fevent_timestamp, 1, 1, 0, /* |
2128 if (!NILP (ret_obj1) && !(GLYPHP (ret_obj1) | 2128 if (!NILP (ret_obj1) && !(GLYPHP (ret_obj1) |
2129 #ifdef HAVE_TOOLBARS | 2129 #ifdef HAVE_TOOLBARS |
2130 || TOOLBAR_BUTTONP (ret_obj1) | 2130 || TOOLBAR_BUTTONP (ret_obj1) |
2131 #endif | 2131 #endif |
2132 )) | 2132 )) |
2133 abort (); | 2133 ABORT (); |
2134 if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2))) | 2134 if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2))) |
2135 abort (); | 2135 ABORT (); |
2136 | 2136 |
2137 if (char_x) | 2137 if (char_x) |
2138 *char_x = ret_x; | 2138 *char_x = ret_x; |
2139 if (char_y) | 2139 if (char_y) |
2140 *char_y = ret_y; | 2140 *char_y = ret_y; |
2478 | 2478 |
2479 props = cons3 (Qtimestamp, Fevent_timestamp (event), props); | 2479 props = cons3 (Qtimestamp, Fevent_timestamp (event), props); |
2480 | 2480 |
2481 switch (EVENT_TYPE (e)) | 2481 switch (EVENT_TYPE (e)) |
2482 { | 2482 { |
2483 default: abort (); | 2483 default: ABORT (); |
2484 | 2484 |
2485 case process_event: | 2485 case process_event: |
2486 props = cons3 (Qprocess, EVENT_PROCESS_PROCESS (e), props); | 2486 props = cons3 (Qprocess, EVENT_PROCESS_PROCESS (e), props); |
2487 break; | 2487 break; |
2488 | 2488 |