Mercurial > hg > xemacs-beta
comparison src/ui-gtk.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 | ecf1ebac70d8 |
children | de9952d2ed18 |
comparison
equal
deleted
inserted
replaced
2499:4c5ee4d2e921 | 2500:3d8143fc88e1 |
---|---|
1178 { | 1178 { |
1179 Lisp_Object retval = Qnil; | 1179 Lisp_Object retval = Qnil; |
1180 emacs_gtk_boxed_data *data = NULL; | 1180 emacs_gtk_boxed_data *data = NULL; |
1181 | 1181 |
1182 if (GTK_FUNDAMENTAL_TYPE (t) != GTK_TYPE_BOXED) | 1182 if (GTK_FUNDAMENTAL_TYPE (t) != GTK_TYPE_BOXED) |
1183 abort(); | 1183 ABORT(); |
1184 | 1184 |
1185 data = allocate_emacs_gtk_boxed_data (); | 1185 data = allocate_emacs_gtk_boxed_data (); |
1186 data->object = obj; | 1186 data->object = obj; |
1187 data->object_type = t; | 1187 data->object_type = t; |
1188 | 1188 |
1444 break; | 1444 break; |
1445 | 1445 |
1446 /* structured types */ | 1446 /* structured types */ |
1447 case GTK_TYPE_SIGNAL: | 1447 case GTK_TYPE_SIGNAL: |
1448 case GTK_TYPE_ARGS: /* This we can do as a list of values */ | 1448 case GTK_TYPE_ARGS: /* This we can do as a list of values */ |
1449 abort(); | 1449 ABORT(); |
1450 case GTK_TYPE_CALLBACK: | 1450 case GTK_TYPE_CALLBACK: |
1451 stderr_out ("callback fn: ...\n"); | 1451 stderr_out ("callback fn: ...\n"); |
1452 break; | 1452 break; |
1453 case GTK_TYPE_C_CALLBACK: | 1453 case GTK_TYPE_C_CALLBACK: |
1454 case GTK_TYPE_FOREIGN: | 1454 case GTK_TYPE_FOREIGN: |
1455 abort(); | 1455 ABORT(); |
1456 | 1456 |
1457 /* base type of the object system */ | 1457 /* base type of the object system */ |
1458 case GTK_TYPE_OBJECT: | 1458 case GTK_TYPE_OBJECT: |
1459 if (GTK_VALUE_OBJECT (a)) | 1459 if (GTK_VALUE_OBJECT (a)) |
1460 stderr_out ("object: %s\n", gtk_type_name (GTK_OBJECT_TYPE (GTK_VALUE_OBJECT (a)))); | 1460 stderr_out ("object: %s\n", gtk_type_name (GTK_OBJECT_TYPE (GTK_VALUE_OBJECT (a)))); |
1461 else | 1461 else |
1462 stderr_out ("object: NULL\n"); | 1462 stderr_out ("object: NULL\n"); |
1463 break; | 1463 break; |
1464 | 1464 |
1465 default: | 1465 default: |
1466 abort(); | 1466 ABORT(); |
1467 } | 1467 } |
1468 } | 1468 } |
1469 #endif | 1469 #endif |
1470 | 1470 |
1471 Lisp_Object gtk_type_to_lisp (GtkArg *arg) | 1471 Lisp_Object gtk_type_to_lisp (GtkArg *arg) |
1542 { | 1542 { |
1543 return (xemacs_gtklist_to_list (arg)); | 1543 return (xemacs_gtklist_to_list (arg)); |
1544 } | 1544 } |
1545 } | 1545 } |
1546 stderr_out ("Do not know how to convert `%s' to lisp!\n", gtk_type_name (arg->type)); | 1546 stderr_out ("Do not know how to convert `%s' to lisp!\n", gtk_type_name (arg->type)); |
1547 abort (); | 1547 ABORT (); |
1548 } | 1548 } |
1549 /* This is chuck reminding GCC to... SHUT UP! */ | 1549 /* This is chuck reminding GCC to... SHUT UP! */ |
1550 return (Qnil); | 1550 return (Qnil); |
1551 } | 1551 } |
1552 | 1552 |
1595 GTK_VALUE_INT(*arg) = XINT (obj); | 1595 GTK_VALUE_INT(*arg) = XINT (obj); |
1596 } | 1596 } |
1597 break; | 1597 break; |
1598 case GTK_TYPE_LONG: | 1598 case GTK_TYPE_LONG: |
1599 case GTK_TYPE_ULONG: | 1599 case GTK_TYPE_ULONG: |
1600 abort(); | 1600 ABORT(); |
1601 case GTK_TYPE_FLOAT: | 1601 case GTK_TYPE_FLOAT: |
1602 CHECK_INT_OR_FLOAT (obj); | 1602 CHECK_INT_OR_FLOAT (obj); |
1603 GTK_VALUE_FLOAT(*arg) = extract_float (obj); | 1603 GTK_VALUE_FLOAT(*arg) = extract_float (obj); |
1604 break; | 1604 break; |
1605 case GTK_TYPE_DOUBLE: | 1605 case GTK_TYPE_DOUBLE: |
1814 } | 1814 } |
1815 } | 1815 } |
1816 else | 1816 else |
1817 { | 1817 { |
1818 stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); | 1818 stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); |
1819 abort(); | 1819 ABORT(); |
1820 } | 1820 } |
1821 break; | 1821 break; |
1822 } | 1822 } |
1823 | 1823 |
1824 return (0); | 1824 return (0); |
1875 *(GTK_RETLOC_INT(*arg)) = XINT (obj); | 1875 *(GTK_RETLOC_INT(*arg)) = XINT (obj); |
1876 } | 1876 } |
1877 break; | 1877 break; |
1878 case GTK_TYPE_LONG: | 1878 case GTK_TYPE_LONG: |
1879 case GTK_TYPE_ULONG: | 1879 case GTK_TYPE_ULONG: |
1880 abort(); | 1880 ABORT(); |
1881 case GTK_TYPE_FLOAT: | 1881 case GTK_TYPE_FLOAT: |
1882 CHECK_INT_OR_FLOAT (obj); | 1882 CHECK_INT_OR_FLOAT (obj); |
1883 *(GTK_RETLOC_FLOAT(*arg)) = extract_float (obj); | 1883 *(GTK_RETLOC_FLOAT(*arg)) = extract_float (obj); |
1884 break; | 1884 break; |
1885 case GTK_TYPE_DOUBLE: | 1885 case GTK_TYPE_DOUBLE: |
2094 } | 2094 } |
2095 } | 2095 } |
2096 else | 2096 else |
2097 { | 2097 { |
2098 stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); | 2098 stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); |
2099 abort(); | 2099 ABORT(); |
2100 } | 2100 } |
2101 break; | 2101 break; |
2102 } | 2102 } |
2103 | 2103 |
2104 return (0); | 2104 return (0); |
2169 obj = XCDR (obj); | 2169 obj = XCDR (obj); |
2170 } | 2170 } |
2171 } | 2171 } |
2172 else | 2172 else |
2173 { | 2173 { |
2174 /* abort ()? */ | 2174 /* ABORT ()? */ |
2175 } | 2175 } |
2176 return (val); | 2176 return (val); |
2177 } | 2177 } |
2178 | 2178 |
2179 static Lisp_Object | 2179 static Lisp_Object |