Mercurial > hg > xemacs-beta
changeset 2054:91d4c8c65a0f
[xemacs-hg @ 2004-05-02 04:06:51 by malcolmp]
Fix warnings and errors when building GTK using C++ and --use-union-type.
author | malcolmp |
---|---|
date | Sun, 02 May 2004 04:07:01 +0000 |
parents | 11e709117623 |
children | 512c8189d646 |
files | lisp/ChangeLog lisp/gtk-marshal.el src/ChangeLog src/console-gtk-impl.h src/data.c src/device-gtk.c src/emacs-marshals.c src/event-gtk.c src/frame-gtk.c src/gccache-gtk.c src/gccache-gtk.h src/glade.c src/glyphs-gtk.c src/glyphs.h src/gtk-glue.c src/gtk-xemacs.c src/gui-gtk.c src/menubar-gtk.c src/objects-gtk.c src/redisplay-gtk.c src/scrollbar-gtk.c src/select-gtk.c src/sysdll.c src/ui-byhand.c src/ui-gtk.c |
diffstat | 25 files changed, 256 insertions(+), 159 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat May 01 21:50:40 2004 +0000 +++ b/lisp/ChangeLog Sun May 02 04:07:01 2004 +0000 @@ -1,3 +1,7 @@ +2004-04-20 Malcolm Purvis <malcolmpurvis@optushome.com.au> + + * gtk-marshal.el: Return type for INT is gint, not guint. + 2004-02-23 Stephen J. Turnbull <stephen@xemacs.org> * isearch-mode.el (isearch-abort): Preserve successful search target.
--- a/lisp/gtk-marshal.el Sat May 01 21:50:40 2004 +0000 +++ b/lisp/gtk-marshal.el Sun May 02 04:07:01 2004 +0000 @@ -1,5 +1,8 @@ +;; +;; To regenerate ../src/emacs-marshals.c just load this file. +;; (defconst name-to-return-type - '(("INT" . "guint") + '(("INT" . "gint") ("CALLBACK" . "GtkCallback") ("OBJECT" . "GtkObject *") ("POINTER" . "void *") @@ -26,7 +29,7 @@ (setq name (get-marshaller-name rval args)) (if (member name defined-marshallers) - (error "Attempe to define the same marshaller more than once! %s" name)) + (error "Attempt to define the same marshaller more than once! %s" name)) (set-buffer (get-buffer-create "emacs-marshals.c")) (goto-char (point-max))
--- a/src/ChangeLog Sat May 01 21:50:40 2004 +0000 +++ b/src/ChangeLog Sun May 02 04:07:01 2004 +0000 @@ -1,3 +1,89 @@ +2004-04-20 Malcolm Purvis <malcolmpurvis@optushome.com.au> + + * console-gtk-impl.h: Include X11.h. + * console-gtk-impl.h (struct gtk_device): Use X types for keysym data. + * data.c (Fstring_to_number): Cast Ibtye to char* for atoX arg. + * device-gtk.c (gtk_init_device): Convert gtkrc filename to extern + encoding before use by GTK. + * device-gtk.c (Fgtk_grab_pointer): Cast bitmask to expected type. + * emacs-marshals.c: INT return type is gint, not guint. + * event-gtk.c: Add args to gtk_keysym_to_emacs_keysym() prototype. + * event-gtk.c (gtk_event_to_emacs_event): Cast button posn from + double to int. + * event-gtk.c (gtk_reset_key_mapping): Avoid casts to void* for + keysym_map. + * frame-gtk.c (gtk_set_initial_frame_size): Avoid '|' of bitfield enum. + * frame-gtk.c (gtk_initialize_frame_size): Cast to right type. + * frame-gtk.c (gtk_get_frame_parent): Cast to right type. + * frame-gtk.c (gtk_set_frame_size): Avoid '|' of bitfield enum. + * gccache-gtk.c: mask type is unsigned long, not enum. + * gccache-gtk.c (gc_cache_lookup): mask type is unsigned long, not enum. + * gccache-gtk.h (gc_cache_lookup): mask type is unsigned long, not enum + * glade.c (Fglade_xml_signal_connect): Cast Ibtye to char*. + * glyphs-gtk.c: Remove extra definition of Qxface. + * glyphs-gtk.c (gtk_print_image_instance): #ifdef, not #if, HAVE_SUBWINDOWS. + * glyphs-gtk.c (gtk_finalize_image_instance): cast to right type. + * glyphs-gtk.c (gtk_image_instance_equal): #ifdef, not #if, HAVE_SUBWINDOWS. + * glyphs-gtk.c (gtk_image_instance_hash): #ifdef, not #if, HAVE_SUBWINDOWS. + * glyphs-gtk.c (xbm_instantiate_1): Use Extbyte*, not char*. + * glyphs-gtk.c (struct color_symbol): Use Ibyte, not char*. + * glyphs-gtk.c (extract_xpm_color_names): Pass correct data to free_cons(). + * glyphs-gtk.c (gtk_xpm_instantiate): width, height are gint, not + unsigned. Use proper internal strcasecmp function. + * glyphs-gtk.c (resource_name_to_resource): Expect + image_instance_type, not int. + * glyphs-gtk.c (resource_symbol_to_type): Return + image_instance_type, not int. + * glyphs-gtk.c (gtk_resource_instantiate): Use + image_instance_type, not int. + * glyphs-gtk.c (cursor_name_to_index): Return GdkCursorType, not + gint. + * glyphs-gtk.c (cursor_font_instantiate): Use GdkCursorType, not + gint. + * glyphs-gtk.c (gtk_redisplay_widget): Commented out unused var. + * glyphs-gtk.c (BUILD_GLYPH_INST): Use ExtByte, not char* + * glyphs-gtk.c (gtk_colorize_image_instance): Cast to enum + bitfield. + * glyphs.h: typedef image_instance_type. + * gtk-glue.c (xemacs_gtklist_to_list): Cast first arg of + g_list_foreach() to right type. + * gtk-glue.c (xemacs_list_to_array): Cast to cghar*. + * gtk-glue.c (gdk_event_to_emacs_event): Cast button posn from + double to int. + * gtk-xemacs.c (gtk_xemacs_new): Cast constructor return to right type. + * gtk-xemacs.c (gtk_xemacs_draw): Cast data to right type. + * gui-gtk.c: Removed double definition of Qmenu_no_selection_hook. + * menubar-gtk.c (gtk_xemacs_menubar_new): Cast constructor return to right type. + * menubar-gtk.c (menu_name_to_accelerator): Remove unnecessary + cast to unsigned char. + * menubar-gtk.c (remove_underscores): Use Ibyte, char char* + * menubar-gtk.c (menu_descriptor_to_widget_1): ditto + * menubar-gtk.c (menu_can_reuse_widget): ditto + * objects-gtk.c (gtk_initialize_font_instance): Cast to right type. + * objects-gtk.c (gtk_find_charset_font): Use Ibyte, not char*. + * objects-gtk.c (__get_gtk_font_truename): ditto. + * redisplay-gtk.c (gtk_get_gc): Cast mask to right type. + * redisplay-gtk.c (gtk_output_string):Font attibs are int, not + unsigned. + * scrollbar-gtk.c (scrollbar_cb): Cast to right type. + * select-gtk.c (gtk_own_selection): Removed unused var selection_time. + * sysdll.c (search_linked_libs): Count is unsigned. + * sysdll.c (dll_function): Cast function pointer to void*. + * ui-byhand.c (generic_toolbar_insert_item): Cast Ibyte to char*. + * ui-gtk.c: Macro to hide manipulation of fundamental types. + * ui-gtk.c (initialize_dll_cache): Type problems with literal + strings. + * ui-gtk.c (Fdll_load): Use Ibyte form of strdup. + * ui-gtk.c (__allocate_object_storage): Cast during fundamental type test. + * ui-gtk.c (type_to_marshaller_type): Cast during fundamental type test. + * ui-gtk.c (__dll_mapper): Use CIbyte, not char*. + * ui-gtk.c (Fgtk_import_function_internal): Cast during fundamental type test. + * ui-gtk.c (Fgtk_call_function): Cast during fundamental type test. + * ui-gtk.c (Fgtk_describe_type): Cast during fundamental type test. + * ui-gtk.c (gtk_type_to_lisp): Cast during fundamental type test. + * ui-gtk.c (lisp_to_gtk_type): Cast during fundamental type test. + * ui-gtk.c (lisp_to_gtk_ret_type): Cast during fundamental type test. + 2004-04-30 Jerry James <james@xemacs.org> * number.c (vars_of_number): Fix comment. Initialize
--- a/src/console-gtk-impl.h Sat May 01 21:50:40 2004 +0000 +++ b/src/console-gtk-impl.h Sun May 02 04:07:01 2004 +0000 @@ -37,6 +37,7 @@ #include "console-impl.h" #include "console-gtk.h" +#include <X11/Xlib.h> #define GDK_DRAWABLE(x) (GdkDrawable *) (x) #define GET_GTK_WIDGET_WINDOW(x) (GTK_WIDGET (x)->window) @@ -66,11 +67,11 @@ /* The following items are all used exclusively in event-gtk.c. */ int MetaMask, HyperMask, SuperMask, AltMask, ModeMask; - guint lock_interpretation; + KeySym lock_interpretation; - void *x_modifier_keymap; /* Really an (XModifierKeymap *)*/ + XModifierKeymap *x_modifier_keymap; - guint *x_keysym_map; + KeySym *x_keysym_map; int x_keysym_map_min_code; int x_keysym_map_max_code; int x_keysym_map_keysyms_per_code;
--- a/src/data.c Sat May 01 21:50:40 2004 +0000 +++ b/src/data.c Sun May 02 04:07:01 2004 +0000 @@ -1374,11 +1374,11 @@ { /* Use the system-provided functions for base 10. */ #if SIZEOF_EMACS_INT == SIZEOF_INT - return make_int (atoi (p)); + return make_int (atoi ((char*) p)); #elif SIZEOF_EMACS_INT == SIZEOF_LONG - return make_int (atol (p)); + return make_int (atol ((char*) p)); #elif SIZEOF_EMACS_INT == SIZEOF_LONG_LONG - return make_int (atoll (p)); + return make_int (atoll ((char*) p)); #endif } else
--- a/src/device-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/device-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -236,7 +236,8 @@ new_rc_files = xnew_array_and_zero (gchar *, num_files + 3); - new_rc_files[0] = XSTRING_DATA (gtkrc); + LISP_STRING_TO_EXTERNAL (gtkrc, new_rc_files[0], Qfile_name); + for (ctr = 1; default_files[ctr-1]; ctr++) new_rc_files[ctr] = g_strdup (default_files[ctr-1]); @@ -553,13 +554,13 @@ w = GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (device_selected_frame (d))); result = gdk_pointer_grab (w, FALSE, - GDK_POINTER_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON1_MOTION_MASK | - GDK_BUTTON2_MOTION_MASK | - GDK_BUTTON3_MOTION_MASK | - GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK, + (GdkEventMask) (GDK_POINTER_MOTION_MASK | + GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON1_MOTION_MASK | + GDK_BUTTON2_MOTION_MASK | + GDK_BUTTON3_MOTION_MASK | + GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK), w, NULL, /* #### BILL!!! Need to create a GdkCursor * as necessary! */ GDK_CURRENT_TIME);
--- a/src/emacs-marshals.c Sat May 01 21:50:40 2004 +0000 +++ b/src/emacs-marshals.c Sun May 02 04:07:01 2004 +0000 @@ -120,7 +120,7 @@ emacs_gtk_marshal_INT__BOOL (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[1]); *return_val = (*rfunc) (GTK_VALUE_BOOL (args[0])); @@ -130,7 +130,7 @@ emacs_gtk_marshal_INT__OBJECT_ARRAY (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_ARRAY (args[1])); @@ -140,7 +140,7 @@ emacs_gtk_marshal_INT__OBJECT_INT_ARRAY (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_ARRAY (args[2])); @@ -150,7 +150,7 @@ emacs_gtk_marshal_INT__OBJECT_INT_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT (args[2])); @@ -160,7 +160,7 @@ emacs_gtk_marshal_INT__OBJECT_INT_STRING (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_STRING (args[2])); @@ -170,7 +170,7 @@ emacs_gtk_marshal_INT__OBJECT_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1])); @@ -180,7 +180,7 @@ emacs_gtk_marshal_INT__OBJECT_OBJECT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1])); @@ -190,7 +190,7 @@ emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[4]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3])); @@ -200,7 +200,7 @@ emacs_gtk_marshal_INT__OBJECT_POINTER_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2])); @@ -210,7 +210,7 @@ emacs_gtk_marshal_INT__OBJECT_POINTER (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1])); @@ -220,7 +220,7 @@ emacs_gtk_marshal_INT__OBJECT_STRING (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1])); @@ -230,7 +230,7 @@ emacs_gtk_marshal_INT__OBJECT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[1]); *return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0])); @@ -240,7 +240,7 @@ emacs_gtk_marshal_INT__POINTER_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1])); @@ -250,7 +250,7 @@ emacs_gtk_marshal_INT__POINTER_STRING_INT (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_INT (args[2])); @@ -260,7 +260,7 @@ emacs_gtk_marshal_INT__POINTER_STRING_STRING (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[3]); *return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_STRING (args[2])); @@ -270,7 +270,7 @@ emacs_gtk_marshal_INT__POINTER_STRING (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[2]); *return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1])); @@ -280,7 +280,7 @@ emacs_gtk_marshal_INT__POINTER (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[1]); *return_val = (*rfunc) (GTK_VALUE_POINTER (args[0])); @@ -290,7 +290,7 @@ emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[4]); *return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_INT (args[2]), GTK_VALUE_ARRAY (args[3])); @@ -300,7 +300,7 @@ emacs_gtk_marshal_INT__STRING (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[1]); *return_val = (*rfunc) (GTK_VALUE_STRING (args[0])); @@ -310,7 +310,7 @@ emacs_gtk_marshal_INT__NONE (ffi_actual_function func, GtkArg *args) { __INT_fn rfunc = (__INT_fn) func; - guint *return_val; + gint *return_val; return_val = GTK_RETLOC_INT (args[0]); *return_val = (*rfunc) (); @@ -424,7 +424,7 @@ __NONE_fn rfunc = (__NONE_fn) func; (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_BOOL (args[2])); } -typedef void (*__NONE__OBJECT_INT_FLOAT_BOOL_fn)(GtkObject *, guint, gfloat, gboolean); +typedef void (*__NONE__OBJECT_INT_FLOAT_BOOL_fn)(GtkObject *, gint, gfloat, gboolean); static void emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT_BOOL (ffi_actual_function func, GtkArg *args) @@ -432,7 +432,7 @@ __NONE__OBJECT_INT_FLOAT_BOOL_fn rfunc = (__NONE__OBJECT_INT_FLOAT_BOOL_fn) func; (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_FLOAT (args[2]), GTK_VALUE_BOOL (args[3])); } -typedef void (*__NONE__OBJECT_INT_FLOAT_fn)(GtkObject *, guint, gfloat); +typedef void (*__NONE__OBJECT_INT_FLOAT_fn)(GtkObject *, gint, gfloat); static void emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT (ffi_actual_function func, GtkArg *args) @@ -454,7 +454,7 @@ __NONE_fn rfunc = (__NONE_fn) func; (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT (args[2]), GTK_VALUE_ARRAY (args[3])); } -typedef void (*__NONE__OBJECT_INT_INT_FLOAT_FLOAT_fn)(GtkObject *, guint, guint, gfloat, gfloat); +typedef void (*__NONE__OBJECT_INT_INT_FLOAT_FLOAT_fn)(GtkObject *, gint, gint, gfloat, gfloat); static void emacs_gtk_marshal_NONE__OBJECT_INT_INT_FLOAT_FLOAT (ffi_actual_function func, GtkArg *args) @@ -574,7 +574,7 @@ __NONE_fn rfunc = (__NONE_fn) func; (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_BOOL (args[2]), GTK_VALUE_BOOL (args[3])); } -typedef void (*__NONE__OBJECT_OBJECT_FLOAT_INT_fn)(GtkObject *, GtkObject *, gfloat, guint); +typedef void (*__NONE__OBJECT_OBJECT_FLOAT_INT_fn)(GtkObject *, GtkObject *, gfloat, gint); static void emacs_gtk_marshal_NONE__OBJECT_OBJECT_FLOAT_INT (ffi_actual_function func, GtkArg *args) @@ -701,7 +701,7 @@ __NONE_fn rfunc = (__NONE_fn) func; (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_BOOL (args[2])); } -typedef void (*__NONE__OBJECT_POINTER_INT_FLOAT_FLOAT_fn)(GtkObject *, void *, guint, gfloat, gfloat); +typedef void (*__NONE__OBJECT_POINTER_INT_FLOAT_FLOAT_fn)(GtkObject *, void *, gint, gfloat, gfloat); static void emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_FLOAT_FLOAT (ffi_actual_function func, GtkArg *args) @@ -1070,7 +1070,7 @@ return_val = GTK_RETLOC_OBJECT (args[1]); *return_val = (*rfunc) (GTK_VALUE_INT (args[0])); } -typedef GtkObject * (*__OBJECT__OBJECT_FLOAT_INT_fn)(GtkObject *, gfloat, guint); +typedef GtkObject * (*__OBJECT__OBJECT_FLOAT_INT_fn)(GtkObject *, gfloat, gint); static void emacs_gtk_marshal_OBJECT__OBJECT_FLOAT_INT (ffi_actual_function func, GtkArg *args)
--- a/src/event-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/event-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -82,7 +82,7 @@ extern SELECT_TYPE input_wait_mask, non_fake_input_wait_mask; extern SELECT_TYPE process_only_mask, tty_only_mask; -static Lisp_Object gtk_keysym_to_emacs_keysym (); +static Lisp_Object gtk_keysym_to_emacs_keysym (guint keysym, int simple_p); void debug_process_finalization (struct Lisp_Process *p); gboolean emacs_gtk_event_handler (GtkWidget *wid /* unused */, GdkEvent *event, @@ -1392,8 +1392,8 @@ SET_EVENT_BUTTON_MODIFIERS (emacs_event, modifiers); SET_EVENT_TIMESTAMP (emacs_event, button_event->time); SET_EVENT_BUTTON_BUTTON (emacs_event, button_event->button); - SET_EVENT_BUTTON_X (emacs_event, button_event->x); - SET_EVENT_BUTTON_Y (emacs_event, button_event->y); + SET_EVENT_BUTTON_X (emacs_event, (int) button_event->x); + SET_EVENT_BUTTON_Y (emacs_event, (int) button_event->y); } } break; @@ -1720,22 +1720,20 @@ { Display *display = GDK_DISPLAY (); struct gtk_device *xd = DEVICE_GTK_DATA (d); - XModifierKeymap *map = (XModifierKeymap *) xd->x_keysym_map; KeySym *keysym, *keysym_end; Lisp_Object hashtable; int key_code_count, keysyms_per_code; - if (map) - XFree ((char *) map); + if (xd->x_keysym_map) + XFree ((char *) xd->x_keysym_map); XDisplayKeycodes (display, &xd->x_keysym_map_min_code, &xd->x_keysym_map_max_code); key_code_count = xd->x_keysym_map_max_code - xd->x_keysym_map_min_code + 1; - map = (XModifierKeymap *) + xd->x_keysym_map = XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count, &xd->x_keysym_map_keysyms_per_code); - xd->x_keysym_map = (void *)map; hashtable = xd->x_keysym_map_hashtable; if (HASH_TABLEP (hashtable)) { @@ -1747,7 +1745,7 @@ make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); } - for (keysym = (KeySym *) map, + for (keysym = xd->x_keysym_map, keysyms_per_code = xd->x_keysym_map_keysyms_per_code, keysym_end = keysym + (key_code_count * keysyms_per_code); keysym < keysym_end;
--- a/src/frame-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/frame-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -344,13 +344,12 @@ { GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); GdkGeometry geometry; - GdkWindowHints geometry_mask = 0x00; if (GTK_IS_WINDOW (shell)) { + GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; /* Deal with the cell size */ default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); - geometry_mask |= GDK_HINT_RESIZE_INC; gtk_window_set_geometry_hints (GTK_WINDOW (shell), FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); @@ -599,7 +598,7 @@ if (STRINGP (Vgtk_initial_geometry)) { - if (!gnome_parse_geometry (XSTRING_DATA (Vgtk_initial_geometry), &x,&y,&w,&h)) + if (!gnome_parse_geometry ((char*) XSTRING_DATA (Vgtk_initial_geometry), &x,&y,&w,&h)) { x = y = 10; w = 80; @@ -1084,8 +1083,8 @@ static Lisp_Object gtk_get_frame_parent (struct frame *f) { - GtkWidget *parentwid = gtk_object_get_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)), - TRANSIENT_DATA_IDENTIFIER); + GtkWidget *parentwid = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)), + TRANSIENT_DATA_IDENTIFIER); /* find the frame whose wid is parentwid */ if (parentwid) @@ -1137,13 +1136,13 @@ { GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); GdkGeometry geometry; - GdkWindowHints geometry_mask = 0x00; if (GTK_IS_WINDOW (shell)) { + GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; + /* Update the cell size */ default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); - geometry_mask |= GDK_HINT_RESIZE_INC; gtk_window_set_geometry_hints (GTK_WINDOW (shell), FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask);
--- a/src/gccache-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/gccache-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -68,7 +68,7 @@ struct gcv_and_mask { GdkGCValues gcv; - GdkGCValuesMask mask; + unsigned long mask; /* contains a GdkGCValuesMask bitmask. */ }; struct gc_cache_cell { @@ -155,7 +155,7 @@ } GdkGC * -gc_cache_lookup (struct gc_cache *cache, GdkGCValues *gcv, GdkGCValuesMask mask) +gc_cache_lookup (struct gc_cache *cache, GdkGCValues *gcv, unsigned long mask) { struct gc_cache_cell *cell, *next, *prev; struct gcv_and_mask gcvm; @@ -267,7 +267,7 @@ #endif /* Now make and return the GC. */ - cell->gc = gdk_gc_new_with_values (cache->window, gcv, mask); + cell->gc = gdk_gc_new_with_values (cache->window, gcv, (GdkGCValuesMask) mask); /* debug */ assert (cell->gc == gc_cache_lookup (cache, gcv, mask));
--- a/src/gccache-gtk.h Sat May 01 21:50:40 2004 +0000 +++ b/src/gccache-gtk.h Sun May 02 04:07:01 2004 +0000 @@ -30,6 +30,6 @@ struct gc_cache; struct gc_cache *make_gc_cache (GtkWidget *); void free_gc_cache (struct gc_cache *cache); -GdkGC *gc_cache_lookup (struct gc_cache *, GdkGCValues *, GdkGCValuesMask mask); +GdkGC *gc_cache_lookup (struct gc_cache *, GdkGCValues *, unsigned long mask); #endif /* _XGCCACHE_H_ */
--- a/src/glade.c Sat May 01 21:50:40 2004 +0000 +++ b/src/glade.c Sun May 02 04:07:01 2004 +0000 @@ -79,7 +79,7 @@ } glade_xml_signal_connect_full (GLADE_XML (XGTK_OBJECT (xml)->object), - XSTRING_DATA (handler_name), + (char*) XSTRING_DATA (handler_name), connector, LISP_TO_VOID (func)); return (Qt); }
--- a/src/glyphs-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/glyphs-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -91,7 +91,6 @@ #ifdef HAVE_XFACE DEFINE_DEVICE_IIFORMAT (gtk, xface); -Lisp_Object Qxface; #endif #ifdef HAVE_XPM @@ -129,7 +128,7 @@ int dest_mask, Lisp_Object domain); -static gint cursor_name_to_index (const char *name); +static GdkCursorType cursor_name_to_index (const char *name); #ifndef BitmapSuccess #define BitmapSuccess 0 @@ -356,7 +355,7 @@ (unsigned long) IMAGE_INSTANCE_GTK_MASK (p)); write_c_string (printcharfun, ")"); break; -#if HAVE_SUBWINDOWS +#ifdef HAVE_SUBWINDOWS case IMAGE_SUBWINDOW: /* #### implement me */ #endif @@ -380,7 +379,7 @@ { if (IMAGE_INSTANCE_SUBWINDOW_ID (p)) { - gtk_widget_destroy (IMAGE_INSTANCE_SUBWINDOW_ID (p)); + gtk_widget_destroy ((GtkWidget*) IMAGE_INSTANCE_SUBWINDOW_ID (p)); /* We can release the callbacks again. */ /* #### FIXME! */ @@ -462,7 +461,7 @@ if (IMAGE_INSTANCE_GTK_COLORMAP (p1) != IMAGE_INSTANCE_GTK_COLORMAP (p2) || IMAGE_INSTANCE_GTK_NPIXELS (p1) != IMAGE_INSTANCE_GTK_NPIXELS (p2)) return 0; -#if HAVE_SUBWINDOWS +#ifdef HAVE_SUBWINDOWS case IMAGE_SUBWINDOW: /* #### implement me */ #endif @@ -483,7 +482,7 @@ case IMAGE_COLOR_PIXMAP: case IMAGE_POINTER: return IMAGE_INSTANCE_GTK_NPIXELS (p); -#if HAVE_SUBWINDOWS +#ifdef HAVE_SUBWINDOWS case IMAGE_SUBWINDOW: /* #### implement me */ return 0; @@ -1016,7 +1015,7 @@ Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file); struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); GdkPixmap *mask = 0; - const char *gcc_may_you_rot_in_hell; + const Extbyte *gcc_may_you_rot_in_hell; if (!NILP (mask_data)) { @@ -1027,7 +1026,6 @@ pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii), XINT (XCAR (mask_data)), XINT (XCAR (XCDR (mask_data))), - (const unsigned char *) gcc_may_you_rot_in_hell); } @@ -1152,7 +1150,7 @@ struct color_symbol { - char* name; + Ibyte* name; GdkColor color; }; @@ -1210,11 +1208,11 @@ colortbl[j].color = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (XCDR (cons))); - colortbl[j].name = (char *) XSTRING_DATA (XCAR (cons)); - free_cons (XCONS (cons)); + colortbl[j].name = XSTRING_DATA (XCAR (cons)); + free_cons (cons); cons = results; results = XCDR (results); - free_cons (XCONS (cons)); + free_cons (cons); } return colortbl; } @@ -1241,7 +1239,7 @@ Q_color_symbols); enum image_instance_type type; int force_mono; - unsigned int w, h; + gint w, h; Lisp_Object tempfile = Qnil; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; @@ -1276,8 +1274,8 @@ &nsymbols); for (i = 0; i < nsymbols; i++) { - if (!qxestrcasecmp ("BgColor", color_symbols[i].name) || - !qxestrcasecmp ("None", color_symbols[i].name)) + if (!qxestrcasecmp_c (color_symbols[i].name, "BgColor") || + !qxestrcasecmp_c (color_symbols[i].name, "None")) { transparent_color = &color_symbols[i].color; } @@ -1482,7 +1480,7 @@ extern guint symbol_to_enum (Lisp_Object, GtkType); -static guint resource_name_to_resource (Lisp_Object name, int type) +static guint resource_name_to_resource (Lisp_Object name, image_instance_type type) { if (type == IMAGE_POINTER) return (symbol_to_enum (name, GTK_TYPE_GDK_CURSOR_TYPE)); @@ -1490,7 +1488,7 @@ return (0); } -static int +static image_instance_type resource_symbol_to_type (Lisp_Object data) { if (EQ (data, Qcursor)) @@ -1502,7 +1500,7 @@ return IMAGE_BITMAP; #endif else - return 0; + return IMAGE_UNKNOWN; } static void @@ -1512,7 +1510,7 @@ { struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); GdkCursor *c = NULL; - unsigned int type = 0; + image_instance_type type; Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); Lisp_Object resource_type = find_keyword_in_vector (instantiator, Q_resource_type); Lisp_Object resource_id = find_keyword_in_vector (instantiator, Q_resource_id); @@ -1534,7 +1532,7 @@ /* mess with the keyword info we were provided with */ gtk_initialize_pixmap_image_instance (ii, 1, type); - c = gdk_cursor_new (resource_name_to_resource (resource_id, type)); + c = gdk_cursor_new ((GdkCursorType) resource_name_to_resource (resource_id, type)); IMAGE_INSTANCE_GTK_CURSOR (ii) = c; IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = resource_id; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = 10; @@ -1855,7 +1853,7 @@ } /* This is basically the equivalent of XmuCursorNameToIndex */ -static gint +static GdkCursorType cursor_name_to_index (const char *name) { int i; @@ -1919,10 +1917,10 @@ if (!the_gdk_cursors[i]) continue; if (!strcmp (the_gdk_cursors[i], name)) { - return (i); + return (GdkCursorType) i; } } - return(-1); + return (GdkCursorType) -1; } static void @@ -1934,7 +1932,7 @@ Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - int i; + GdkCursorType i; const char *name_ext; Lisp_Object foreground, background; @@ -2107,11 +2105,9 @@ gtk_widget_show_all (IMAGE_INSTANCE_GTK_CLIPWIDGET (p)); if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) { - Lisp_Object image_instance = wrap_image_instance (p); - - /* Need to update GtkArgs that might have changed... */ /* #### FIXME!!! */ + /*Lisp_Object image_instance = wrap_image_instance (p); */ } else { @@ -2708,7 +2704,7 @@ vector3 (Qxbm, Q_data, \ list3 (make_int (name##_width), \ make_int (name##_height), \ - make_ext_string (name##_bits, \ + make_ext_string ((Extbyte*) name##_bits, \ sizeof (name##_bits), \ Qbinary))), \ Qglobal, Qgtk, Qnil) @@ -2757,7 +2753,8 @@ gcv.foreground = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (foreground)); gcv.background = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (background)); - gc = gdk_gc_new_with_values (new_pxmp, &gcv, GDK_GC_BACKGROUND | GDK_GC_FOREGROUND); + gc = gdk_gc_new_with_values (new_pxmp, &gcv, + (GdkGCValuesMask) (GDK_GC_BACKGROUND | GDK_GC_FOREGROUND)); XCopyPlane (GDK_WINDOW_XDISPLAY (draw), GDK_WINDOW_XWINDOW (IMAGE_INSTANCE_GTK_PIXMAP (p)),
--- a/src/glyphs.h Sat May 01 21:50:40 2004 +0000 +++ b/src/glyphs.h Sun May 02 04:07:01 2004 +0000 @@ -460,6 +460,7 @@ IMAGE_SUBWINDOW, IMAGE_WIDGET }; +typedef enum image_instance_type image_instance_type; #define IMAGE_NOTHING_MASK (1 << 0) #define IMAGE_TEXT_MASK (1 << 1)
--- a/src/gtk-glue.c Sat May 01 21:50:40 2004 +0000 +++ b/src/gtk-glue.c Sun May 02 04:07:01 2004 +0000 @@ -122,11 +122,11 @@ { if (arg->type == GTK_TYPE_STRING_LIST) { - g_list_foreach (GTK_VALUE_POINTER (*arg), __make_string_mapper, &rval); + g_list_foreach ((GList*) GTK_VALUE_POINTER (*arg), __make_string_mapper, &rval); } else if (arg->type == GTK_TYPE_OBJECT_LIST) { - g_list_foreach (GTK_VALUE_POINTER (*arg), __make_gtk_object_mapper, &rval); + g_list_foreach ((GList*) GTK_VALUE_POINTER (*arg), __make_gtk_object_mapper, &rval); } else { @@ -169,7 +169,7 @@ if (arg->type == GTK_TYPE_STRING_ARRAY) { - FROB(gchar *, CHECK_STRING, XSTRING_DATA); + FROB(gchar *, CHECK_STRING, (gchar*) XSTRING_DATA); } else if (arg->type == GTK_TYPE_FLOAT_ARRAY) { @@ -249,8 +249,8 @@ set_event_type (emacs_event, misc_user_event); SET_EVENT_MISC_USER_BUTTON (emacs_event, ev->button.button); SET_EVENT_MISC_USER_MODIFIERS (emacs_event, 0); - SET_EVENT_MISC_USER_X (emacs_event, ev->button.x); - SET_EVENT_MISC_USER_Y (emacs_event, ev->button.y); + SET_EVENT_MISC_USER_X (emacs_event, (int) ev->button.x); + SET_EVENT_MISC_USER_Y (emacs_event, (int) ev->button.y); if (ev->type == GDK_2BUTTON_PRESS) SET_EVENT_MISC_USER_FUNCTION (emacs_event, intern ("double-click")); else
--- a/src/gtk-xemacs.c Sat May 01 21:50:40 2004 +0000 +++ b/src/gtk-xemacs.c Sun May 02 04:07:01 2004 +0000 @@ -96,7 +96,7 @@ { GtkXEmacs *xemacs; - xemacs = gtk_type_new (gtk_xemacs_get_type ()); + xemacs = (GtkXEmacs*) gtk_type_new (gtk_xemacs_get_type ()); xemacs->f = f; return GTK_WIDGET (xemacs); @@ -321,7 +321,7 @@ while (children) { - child = children->data; + child = (GtkFixedChild*) children->data; children = children->next; /* #### This is what causes the scrollbar flickering! Evidently the scrollbars pretty much take care of drawing
--- a/src/gui-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/gui-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -34,10 +34,6 @@ #include "console-gtk-impl.h" -#ifdef HAVE_POPUPS -Lisp_Object Qmenu_no_selection_hook; -#endif - static GUI_ID gui_id_ctr = 0; GUI_ID
--- a/src/menubar-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/menubar-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -153,7 +153,7 @@ GtkWidget * gtk_xemacs_menubar_new (struct frame *f) { - GtkXEmacsMenubar *menubar = gtk_type_new (gtk_xemacs_menubar_get_type ()); + GtkXEmacsMenubar *menubar = (GtkXEmacsMenubar*) gtk_type_new (gtk_xemacs_menubar_get_type ()); menubar->frame = f; @@ -173,7 +173,7 @@ /* Converting from XEmacs to GTK representation */ static Lisp_Object -menu_name_to_accelerator (char *name) +menu_name_to_accelerator (Ibyte *name) { while (*name) { if (*name=='%') { @@ -182,7 +182,7 @@ return Qnil; if (*name=='_' && *(name+1)) { - int accelerator = (int) (unsigned char) (*(name+1)); + int accelerator = (int) (*(name+1)); return make_char (tolower (accelerator)); } } @@ -356,9 +356,9 @@ } static char * -remove_underscores(const char *name) +remove_underscores(const Ibyte* name) { - char *rval = xmalloc_and_zero (strlen(name) + 1); + char *rval = (char*) xmalloc_and_zero (strlen((char*) name) + 1); int i,j; for (i = 0, j = 0; name[i]; i++) @@ -698,18 +698,18 @@ if (!separator_string_p (XSTRING_DATA (name))) { - char *label_buffer = NULL; + Ibyte *label_buffer = NULL; char *temp_label = NULL; if (STRINGP (suffix) && XSTRING_LENGTH (suffix)) { - label_buffer = ALLOCA (XSTRING_LENGTH (name) + 15 + XSTRING_LENGTH (suffix)); - sprintf (label_buffer, "%s %s ", XSTRING_DATA (name), XSTRING_DATA (suffix)); + label_buffer = (Ibyte*) ALLOCA (XSTRING_LENGTH (name) + 15 + XSTRING_LENGTH (suffix)); + sprintf ((char*) label_buffer, "%s %s ", XSTRING_DATA (name), XSTRING_DATA (suffix)); } else { - label_buffer = ALLOCA (XSTRING_LENGTH (name) + 15); - sprintf (label_buffer, "%s ", XSTRING_DATA (name)); + label_buffer = (Ibyte*) ALLOCA (XSTRING_LENGTH (name) + 15); + sprintf ((char*) label_buffer, "%s ", XSTRING_DATA (name)); } temp_label = remove_underscores (label_buffer); @@ -898,7 +898,7 @@ } static gboolean -menu_can_reuse_widget (GtkWidget *child, const char *label) +menu_can_reuse_widget (GtkWidget *child, const Ibyte *label) { /* Everything up at the top level was done using ** gtk_menu_item_new_with_label(), but we still double check to make
--- a/src/objects-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/objects-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -230,7 +230,7 @@ return 0; } - xf = GDK_FONT_XFONT (gf); + xf = (XFontStruct*) GDK_FONT_XFONT (gf); /* Don't allocate the data until we're sure that we will succeed, or the finalize method may get fucked. */ @@ -507,7 +507,7 @@ if (gtk_font_spec_matches_charset (XDEVICE (device), charset, intname, Qnil, 0, -1, 0)) { - result = make_string ((char *) intname, intlen); + result = make_string (intname, intlen); break; } } @@ -556,12 +556,12 @@ { if (names->data) { - if (valid_font_name_p (dpy, names->data)) + if (valid_font_name_p (dpy, (char*) names->data)) { if (!expandp) { /* They want the wildcarded version */ - font_name = build_string (names->data); + font_name = build_string ((char*) names->data); } else { @@ -569,7 +569,7 @@ int nnames = 0; char **x_font_names = 0; - x_font_names = XListFonts (dpy, names->data, 1, &nnames); + x_font_names = XListFonts (dpy, (char*) names->data, 1, &nnames); if (x_font_names) { font_name = build_string (x_font_names[0]);
--- a/src/redisplay-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/redisplay-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -608,7 +608,7 @@ mask |= GDK_GC_LINE_WIDTH; } - return gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, mask); + return gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, (GdkGCValuesMask) mask); } /***************************************************************************** @@ -848,7 +848,7 @@ /* We draw underlines in the same color as the text. */ if (cachel->underline) { - unsigned long upos, uthick; + int upos, uthick; /* Cannot get at font properties in Gtk, so we resort to guessing */ @@ -874,7 +874,7 @@ } if (cachel->strikethru) { - unsigned long ascent,descent,upos, uthick; + gint ascent,descent,upos, uthick; GdkFont *gfont = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (font)); /* Cannot get at font properties in Gtk, so we resort to
--- a/src/scrollbar-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/scrollbar-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -364,7 +364,7 @@ { /* This function can GC */ int vertical = (int) user_data; - struct frame *f = gtk_object_get_data (GTK_OBJECT (adj), "xemacs::frame"); + struct frame *f = (struct frame*) gtk_object_get_data (GTK_OBJECT (adj), "xemacs::frame"); struct scrollbar_instance *instance; GUI_ID id = (GUI_ID) gtk_object_get_data (GTK_OBJECT (adj), "xemacs::gui_id"); Lisp_Object win, frame;
--- a/src/select-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/select-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -409,7 +409,6 @@ { struct device *d = decode_gtk_device (Qnil); GtkWidget *selecting_window = GTK_WIDGET (DEVICE_GTK_APP_SHELL (d)); - Lisp_Object selection_time; /* Use the time of the last-read mouse or keyboard event. For selection purposes, we use this as a sleazy way of knowing what the current time is in server-time. This assumes that the most recently read
--- a/src/sysdll.c Sat May 01 21:50:40 2004 +0000 +++ b/src/sysdll.c Sun May 02 04:07:01 2004 +0000 @@ -362,7 +362,7 @@ static NSSymbol search_linked_libs(const struct mach_header * mh, const char *symbol) { - int n; + unsigned long n; NSSymbol nssym = 0; struct load_command *lc = @@ -407,7 +407,7 @@ { /* NOTE: This assumes that this function is included in the main program and not in a shared library. */ - const struct mach_header* my_mh = image_for_address(&dll_function); + const struct mach_header* my_mh = image_for_address((void*) &dll_function); if (NSIsSymbolNameDefinedInImage(my_mh, n)) {
--- a/src/ui-byhand.c Sat May 01 21:50:40 2004 +0000 +++ b/src/ui-byhand.c Sun May 02 04:07:01 2004 +0000 @@ -527,9 +527,9 @@ { w = (NILP (prepend_p) ? gtk_toolbar_append_item : gtk_toolbar_prepend_item) (GTK_TOOLBAR (XGTK_OBJECT (toolbar)->object), - XSTRING_DATA (text), - XSTRING_DATA (tooltip_text), - XSTRING_DATA (tooltip_private_text), + (char*) XSTRING_DATA (text), + (char*) XSTRING_DATA (tooltip_text), + (char*) XSTRING_DATA (tooltip_private_text), GTK_WIDGET (XGTK_OBJECT (icon)->object), GTK_SIGNAL_FUNC (__generic_toolbar_callback), LISP_TO_VOID (callback)); @@ -537,9 +537,9 @@ else { w = gtk_toolbar_insert_item (GTK_TOOLBAR (XGTK_OBJECT (toolbar)->object), - XSTRING_DATA (text), - XSTRING_DATA (tooltip_text), - XSTRING_DATA (tooltip_private_text), + (char*) XSTRING_DATA (text), + (char*) XSTRING_DATA (tooltip_text), + (char*) XSTRING_DATA (tooltip_private_text), GTK_WIDGET (XGTK_OBJECT (icon)->object), GTK_SIGNAL_FUNC (__generic_toolbar_callback), LISP_TO_VOID (callback),
--- a/src/ui-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/ui-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -27,6 +27,9 @@ /* XEmacs specific GTK types */ #include "gtk-glue.c" +/* Is the fundamental type of 't' the xemacs defined fundamental type 'type'? */ +#define IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t,type) (((GtkType) GTK_FUNDAMENTAL_TYPE(t)) == (type)) + Lisp_Object Qemacs_ffip; Lisp_Object Qemacs_gtk_objectp; Lisp_Object Qemacs_gtk_boxedp; @@ -53,9 +56,11 @@ { if (!dll_cache) { + static char text[] = "---XEmacs Internal Handle---"; + dll_cache = g_hash_table_new (g_str_hash, g_str_equal); - g_hash_table_insert (dll_cache, "---XEmacs Internal Handle---", dll_open (Qnil)); + g_hash_table_insert (dll_cache, text, dll_open (Qnil)); } } @@ -85,12 +90,11 @@ if (h) { - g_hash_table_insert (dll_cache, g_strdup (XSTRING_DATA (dll)), h); + g_hash_table_insert (dll_cache, qxestrdup (XSTRING_DATA (dll)), h); } else { - signal_error (Qfile_error, - "dll_open error", build_string (dll_error ())); + signal_error (Qfile_error, "dll_open error", dll_error()); } } return (h ? Qt : Qnil); @@ -331,17 +335,25 @@ 0, 0, 0, ffi_data_description, emacs_ffi_data); -typedef GtkObject * (*__OBJECT_fn) (); -typedef gint (*__INT_fn) (); -typedef void (*__NONE_fn) (); -typedef gchar * (*__STRING_fn) (); -typedef gboolean (*__BOOL_fn) (); -typedef gfloat (*__FLOAT_fn) (); -typedef void * (*__POINTER_fn) (); -typedef GList * (*__LIST_fn) (); +#if defined (__cplusplus) +#define MANY_ARGS ... +#else +#define MANY_ARGS +#endif + +typedef void (*pfv)(); +typedef GtkObject * (*__OBJECT_fn) (MANY_ARGS); +typedef gint (*__INT_fn) (MANY_ARGS); +typedef void (*__NONE_fn) (MANY_ARGS); +typedef gchar * (*__STRING_fn) (MANY_ARGS); +typedef gboolean (*__BOOL_fn) (MANY_ARGS); +typedef gfloat (*__FLOAT_fn) (MANY_ARGS); +typedef void * (*__POINTER_fn) (MANY_ARGS); +typedef GList * (*__LIST_fn) (MANY_ARGS); /* An auto-generated file of marshalling functions. */ #include "emacs-marshals.c" +#undef MANY_ARGS #define CONVERT_SINGLE_TYPE(var,nam,tp) case GTK_TYPE_##nam: GTK_VALUE_##nam (var) = * (tp *) v; break; #define CONVERT_RETVAL(a,freep) \ @@ -424,7 +436,7 @@ break; default: - if (GTK_FUNDAMENTAL_TYPE (t) == GTK_TYPE_LISTOF) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_LISTOF)) { s = (sizeof (void *)); } @@ -478,18 +490,18 @@ new fundamental type that is not fixed at compile time. *sigh* */ - if (GTK_FUNDAMENTAL_TYPE (t) == GTK_TYPE_ARRAY) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_ARRAY)) return (build_string ("ARRAY")); - if (GTK_FUNDAMENTAL_TYPE (t) == GTK_TYPE_LISTOF) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_LISTOF)) return (build_string ("LIST")); return (Qnil); } } struct __dll_mapper_closure { - void * (*func) (dll_handle, const char *); - const char *obj_name; + void * (*func) (dll_handle, const CIbyte *); + Ibyte *obj_name; void **storage; }; @@ -500,7 +512,7 @@ if (*(closure->storage) == NULL) { /* Need to see if it is in this one */ - *(closure->storage) = closure->func ((dll_handle) value, closure->obj_name); + *(closure->storage) = closure->func ((dll_handle) value, (CIbyte*) closure->obj_name); } } @@ -657,7 +669,7 @@ data->n_args = n_args; data->function_name = name; - data->function_ptr = name_func; + data->function_ptr = (dll_func) name_func; data->marshal = marshaller_func; rval = wrap_emacs_ffi (data); @@ -756,11 +768,11 @@ int i; for (i = 0; i < n_args; i++) { - if (GTK_FUNDAMENTAL_TYPE (the_args[i].type) == GTK_TYPE_ARRAY) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(the_args[i].type, GTK_TYPE_ARRAY)) { g_free (GTK_VALUE_POINTER (the_args[i])); } - else if (GTK_FUNDAMENTAL_TYPE (the_args[i].type) == GTK_TYPE_LISTOF) + else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(the_args[i].type, GTK_TYPE_LISTOF)) { /* g_list_free (GTK_VALUE_POINTER (the_args[i])); */ } @@ -1237,7 +1249,7 @@ if (STRINGP (type)) { - t = gtk_type_from_name (XSTRING_DATA (type)); + t = gtk_type_from_name ((gchar*) XSTRING_DATA (type)); if (t == GTK_TYPE_INVALID) { invalid_argument ("Not a GTK type", type); @@ -1518,7 +1530,7 @@ } default: - if (GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_LISTOF) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF)) { if (!GTK_VALUE_POINTER (*arg)) return (Qnil); @@ -1779,7 +1791,7 @@ break; default: - if (GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_ARRAY) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_ARRAY)) { if (NILP (obj)) GTK_VALUE_POINTER(*arg) = NULL; @@ -1788,7 +1800,7 @@ xemacs_list_to_array (obj, arg); } } - else if (GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_LISTOF) + else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF)) { if (NILP (obj)) GTK_VALUE_POINTER(*arg) = NULL; @@ -2059,7 +2071,7 @@ break; default: - if (GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_ARRAY) + if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_ARRAY)) { if (NILP (obj)) *(GTK_RETLOC_POINTER(*arg)) = NULL; @@ -2068,7 +2080,7 @@ xemacs_list_to_array (obj, arg); } } - else if (GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_LISTOF) + else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF)) { if (NILP (obj)) *(GTK_RETLOC_POINTER(*arg)) = NULL;