[COMMIT] This patch has been applied.
William M. Perry wrote:
Malcolm Purvis <malcolmpurvis(a)optushome.com.au> writes:
>Ben,
>
>A fresh version of XEmacs, configured with:
>
>../xemacs-21.5/configure --prefix=/usr/local/gcc3-world --with-gnome
>
>produces:
>
>make[1]: *** No rule to make target `events-mod.h', needed by `event-gtk.o'.
Stop.
>make[1]: Leaving directory `/home/malcolmp/devl/xemacs/objdir/src'
>make: *** [src] Error 2
>
Apply this patch, run 'make depend', then rerun configure, and bob's your
uncle. Here is the changelog. This patch includes a bunch of compilation
warning fixes as well.
2002-03-13 William M. Perry <wmperry(a)gnu.org>
* ui-gtk.c (__allocate_object_storage): Make static to avoid
warnings.
(type_to_marshaller_type): Ditto.
* symsinit.h: Added some missing *_gtk_* functions to avoid
warnings.
* select-gtk.c: Add extern definitions of lisp_to_time and
time_to_lisp to avoid warnings.
* redisplay-gtk.c (gtk_flash): reorder select/poll stuff to avoid
warning about 'poll' being implicitly defined. Mirrors change
made to redisplay-x.c some time ago.
(gtk_bevel_area): Fix unused variable warning.
* gtk-xemacs.c (smash_face_fallbacks): ifdef this out to avoid
warnings.
* glyphs-gtk.c (write_lisp_string_to_temp_file): Fix 'grpro3'
typo.
(gtk_locate_pixmap_file): Use split_external_path instead of
decode_path.
* gccache-gtk.c (gc_cache_hash): Fix signed/unsigned warning.
* event-gtk.c: event-mods.h no longer needed. event-gtk.h is.
* emacs-marshals.c (our_string_hash): Make this function static to
avoid warnings.
* device-gtk.c (gtk_event_name): Fix signed/unsigned warning.
* event-gtk.h: New header file to hold declarations from
event-gtk.c that are used in other files. The quest to remove
compilation warnings from GTK files begins.
-bp
------------------------------------------------------------------------
Index: console-gtk.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-gtk.h,v
retrieving revision 1.2.6.1
diff -u -w -u -w -r1.2.6.1 console-gtk.h
--- console-gtk.h 2002/03/04 08:37:03 1.2.6.1
+++ console-gtk.h 2002/03/13 21:13:20
@@ -235,5 +235,20 @@
extern Lisp_Object Vgtk_initial_argv_list; /* #### ugh! */
const char *gtk_event_name (GdkEventType event_type);
+
+void reinit_console_type_create_gtk (void);
+
+void emacs_gtk_selection_handle (GtkWidget *,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time_stamp,
+ gpointer data);
+void emacs_gtk_selection_clear_event_handle (GtkWidget *widget,
+ GdkEventSelection *event,
+ gpointer data);
+void emacs_gtk_selection_received (GtkWidget *widget,
+ GtkSelectionData *selection_data,
+ gpointer user_data);
+
#endif /* HAVE_GTK */
#endif /* _XEMACS_DEVICE_X_H_ */
Index: device-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-gtk.c,v
retrieving revision 1.4.2.3
diff -u -w -u -w -r1.4.2.3 device-gtk.c
--- device-gtk.c 2002/03/04 08:37:03 1.4.2.3
+++ device-gtk.c 2002/03/13 21:13:20
@@ -121,18 +121,6 @@
extern void gdk_imlib_init(void);
#endif
-extern void emacs_gtk_selection_handle (GtkWidget *,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- gpointer data);
-extern void emacs_gtk_selection_clear_event_handle (GtkWidget *widget,
- GdkEventSelection *event,
- gpointer data);
-extern void emacs_gtk_selection_received (GtkWidget *widget,
- GtkSelectionData *selection_data,
- gpointer user_data);
-
#ifdef HAVE_BONOBO
static CORBA_ORB orb;
#endif
@@ -399,7 +387,7 @@
{
GtkEnumValue *vals = gtk_type_enum_get_values (GTK_TYPE_GDK_EVENT_TYPE);
- while (vals && (vals->value != event_type)) vals++;
+ while (vals && ((GdkEventType)(vals->value) != event_type)) vals++;
if (vals)
return (vals->value_nick);
Index: emacs-marshals.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs-marshals.c,v
retrieving revision 1.2.6.1
diff -u -w -u -w -r1.2.6.1 emacs-marshals.c
--- emacs-marshals.c 2001/08/16 01:49:27 1.2.6.1
+++ emacs-marshals.c 2002/03/13 21:13:20
@@ -1467,7 +1467,7 @@
return !strcmp ( (const char *) st1, (const char *) st2);
}
-unsigned long
+static unsigned long
our_string_hash (const void *xv)
{
unsigned int h = 0;
Index: event-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-gtk.c,v
retrieving revision 1.3.2.11
diff -u -w -u -w -r1.3.2.11 event-gtk.c
--- event-gtk.c 2002/02/20 06:40:06 1.3.2.11
+++ event-gtk.c 2002/03/13 21:13:22
@@ -60,9 +60,9 @@
#include "offix.h"
#endif
-#include "events-mod.h"
-
#include <gdk/gdkx.h>
+
+#include "event-gtk.h"
static struct event_stream *gtk_event_stream;
Index: event-gtk.h
===================================================================
RCS file: event-gtk.h
diff -N event-gtk.h
--- /dev/null Wed Mar 13 22:05:04 2002
+++ event-gtk.h Wed Mar 13 22:13:22 2002
@@ -0,0 +1,37 @@
+/* Header file for miscellaneous event functions for GTK.
+ Copyright (C) 2002 William Perry.
+
+This file is part of XEmacs.
+
+XEmacs is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#ifndef __EVENT_GTK_H__
+#define __EVENT_GTK_H__
+
+int gtk_event_to_emacs_event (struct frame *frame,
+ GdkEvent *gdk_event,
+ struct Lisp_Event *emacs_event);
+
+gint emacs_gtk_key_event_handler(GtkWidget *widget, GdkEventKey *event);
+gint emacs_gtk_button_event_handler(GtkWidget *widget, GdkEventButton *event);
+gint emacs_gtk_motion_event_handler (GtkWidget *widget, GdkEventMotion *event);
+
+gboolean emacs_shell_event_handler (GtkWidget *wid /* unused */,
+ GdkEvent *event,
+ gpointer closure);
+void reinit_vars_of_event_gtk (void);
+
+#endif /* __EVENT-GTK_H__ */
Index: gccache-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gccache-gtk.c,v
retrieving revision 1.2
diff -u -w -u -w -r1.2 gccache-gtk.c
--- gccache-gtk.c 2001/04/12 18:23:48 1.2
+++ gccache-gtk.c 2002/03/13 21:13:22
@@ -97,7 +97,7 @@
const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
unsigned long *longs = (unsigned long *) &gcvm->gcv;
unsigned long hash = gcvm->mask;
- int i;
+ unsigned int i;
/* This could look at the mask and only use the used slots in the
hash code. That would win in that we wouldn't have to initialize
every slot of the gcv when calling gc_cache_lookup. But we need
Index: glyphs-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-gtk.c,v
retrieving revision 1.3.2.14
diff -u -w -u -w -r1.3.2.14 glyphs-gtk.c
--- glyphs-gtk.c 2002/03/04 08:37:10 1.3.2.14
+++ glyphs-gtk.c 2002/03/13 21:13:24
@@ -574,7 +574,7 @@
if (NILP (Vgtk_bitmap_file_path))
{
Vgtk_bitmap_file_path = nconc2 (Vgtk_bitmap_file_path,
- (decode_path (BITMAPDIR)));
+ (split_external_path (BITMAPDIR)));
}
{
@@ -1090,10 +1090,9 @@
static Extbyte_dynarr *conversion_out_dynarr;
Bytecount bstart, bend;
Lisp_Object tempfile;
- struct gcpro gcpro1, gcpro2, grpro3;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object conv_out_stream;
Lstream *costr;
- struct gcpro gcpro4;
/* This function can GC */
if (!conversion_out_dynarr)
Index: gtk-glue.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gtk-glue.c,v
retrieving revision 1.2.6.2
diff -u -w -u -w -r1.2.6.2 gtk-glue.c
--- gtk-glue.c 2002/02/20 06:40:13 1.2.6.2
+++ gtk-glue.c 2002/03/13 21:13:24
@@ -225,8 +225,6 @@
return (style);
}
-extern int gtk_event_to_emacs_event (struct frame *, GdkEvent *, struct Lisp_Event *);
-
static Lisp_Object
gdk_event_to_emacs_event(GdkEvent *ev)
{
Index: gtk-xemacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gtk-xemacs.c,v
retrieving revision 1.2.6.3
diff -u -w -u -w -r1.2.6.3 gtk-xemacs.c
--- gtk-xemacs.c 2002/03/04 08:37:12 1.2.6.3
+++ gtk-xemacs.c 2002/03/13 21:13:24
@@ -15,6 +15,7 @@
#include "gtk-xemacs.h"
#include "window.h"
#include "faces.h"
+#include "event-gtk.h"
extern Lisp_Object Vmodeline_face;
extern Lisp_Object Vscrollbar_on_left_p;
@@ -58,10 +59,6 @@
static GtkWidgetClass *parent_class;
-extern gint emacs_gtk_button_event_handler(GtkWidget *widget, GdkEventButton *event);
-extern gint emacs_gtk_key_event_handler(GtkWidget *widget, GdkEventKey *event);
-extern gint emacs_gtk_motion_event_handler(GtkWidget *widget, GdkEventMotion *event);
-
static void
gtk_xemacs_class_init (GtkXEmacsClass *class)
{
@@ -135,6 +132,7 @@
#define convert_font(f) __get_gtk_font_truename (f, 0)
+#ifdef SMASH_FACE_FALLBACKS
static void
smash_face_fallbacks (struct frame *f, GtkStyle *style)
{
@@ -176,6 +174,7 @@
#undef FROB
#undef FROB_FACE
}
+#endif /* SMASH_FACE_FALLBACKS */
#ifdef HAVE_SCROLLBARS
static void
@@ -235,7 +234,7 @@
if (x->f)
{
__nuke_background_items (widget);
-#if 0
+#ifdef SMASH_FACE_FALLBACKS
smash_face_fallbacks (x->f, new_style);
#endif
#ifdef HAVE_SCROLLBARS
Index: redisplay-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-gtk.c,v
retrieving revision 1.2.6.2
diff -u -w -u -w -r1.2.6.2 redisplay-gtk.c
--- redisplay-gtk.c 2002/03/04 08:37:18 1.2.6.2
+++ redisplay-gtk.c 2002/03/13 21:13:25
@@ -857,7 +857,7 @@
upos = dl->descent / 2;
uthick = 1;
- if (dl->ypos + upos < dl->ypos + dl->descent - dl->clip)
+ if ((dl->ypos + upos) < (dl->ypos + dl->descent - dl->clip))
{
if (dl->ypos + upos + uthick > dl->ypos + dl->descent - dl->clip)
uthick = dl->descent - dl->clip - upos;
@@ -1785,9 +1785,6 @@
gdk_flush ();
-#ifdef HAVE_POLL
- poll (0, 0, 100);
-#else /* !HAVE_POLL */
#ifdef HAVE_SELECT
{
int usecs = 100000;
@@ -1798,9 +1795,12 @@
select (0, 0, 0, 0, &tv);
}
#else
+#ifdef HAVE_POLL
+ poll (0, 0, 100);
+#else
bite me
-#endif /* HAVE_POLL */
-#endif /* HAVE_SELECT */
+#endif
+#endif
gdk_draw_rectangle (GDK_DRAWABLE (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f))),
gc, TRUE, w->pixel_left, w->pixel_top,
@@ -1817,7 +1817,6 @@
int shadow_thickness, int edges, enum edge_style style)
{
struct frame *f = XFRAME (w->frame);
- struct device *d = XDEVICE (f->device);
gtk_output_shadows (f, x, y, width, height, shadow_thickness);
}
Index: select-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/select-gtk.c,v
retrieving revision 1.3.2.5
diff -u -w -u -w -r1.3.2.5 select-gtk.c
--- select-gtk.c 2002/03/04 08:37:20 1.3.2.5
+++ select-gtk.c 2002/03/13 21:13:25
@@ -43,6 +43,9 @@
static gboolean waiting_for_selection;
Lisp_Object Vgtk_sent_selection_hooks;
+extern int lisp_to_time (Lisp_Object, time_t *);
+extern Lisp_Object time_to_lisp (time_t);
+
static GdkAtom
symbol_to_gtk_atom (struct device *d, Lisp_Object sym, int only_if_exists)
{
Index: symsinit.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/symsinit.h,v
retrieving revision 1.36.2.10
diff -u -w -u -w -r1.36.2.10 symsinit.h
--- symsinit.h 2001/10/27 07:56:46 1.36.2.10
+++ symsinit.h 2002/03/13 21:13:26
@@ -508,6 +508,8 @@
void syms_of_objects_gtk (void);
void syms_of_select_gtk (void);
void syms_of_ui_gtk (void);
+void syms_of_widget_accessors (void);
+void syms_of_ui_byhand (void);
void console_type_create_gtk (void);
void console_type_create_device_gtk (void);
void console_type_create_frame_gtk (void);
@@ -532,5 +534,6 @@
void vars_of_ui_gtk (void);
void complex_vars_of_glyphs_gtk (void);
void init_event_gtk_late (void);
+void console_type_create_select_gtk (void);
#endif /* INCLUDED_symsinit_h_ */
Index: ui-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ui-gtk.c,v
retrieving revision 1.3.2.2
diff -u -w -u -w -r1.3.2.2 ui-gtk.c
--- ui-gtk.c 2002/02/20 06:40:23 1.3.2.2
+++ ui-gtk.c 2002/03/13 21:13:26
@@ -22,6 +22,7 @@
#include "hash.h"
#include "events.h"
#include "elhash.h"
+#include "event-gtk.h"
/* XEmacs specific GTK types */
#include "gtk-glue.c"
@@ -36,7 +37,9 @@
Lisp_Object gtk_type_to_lisp (GtkArg *arg);
int lisp_to_gtk_type (Lisp_Object obj, GtkArg *arg);
+#if 0
void describe_gtk_arg (GtkArg *arg);
+#endif
guint symbol_to_enum (Lisp_Object obj, GtkType t);
static guint lisp_to_flag (Lisp_Object obj, GtkType t);
static Lisp_Object flags_to_list (guint value, GtkType t);
@@ -367,7 +370,7 @@
if (freep) xfree(v); \
} while (0)
-gpointer __allocate_object_storage (GtkType t)
+static gpointer __allocate_object_storage (GtkType t)
{
size_t s = 0;
void *rval = NULL;
@@ -437,7 +440,7 @@
return (rval);
}
-Lisp_Object type_to_marshaller_type (GtkType t)
+static Lisp_Object type_to_marshaller_type (GtkType t)
{
switch (GTK_FUNDAMENTAL_TYPE (t))
{
@@ -1363,6 +1366,7 @@
/* Various utility functions */
+#if 0
void describe_gtk_arg (GtkArg *arg)
{
GtkArg a = *arg;
@@ -1441,6 +1445,7 @@
abort();
}
}
+#endif
Lisp_Object gtk_type_to_lisp (GtkArg *arg)
{
Index: ui-gtk.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ui-gtk.h,v
retrieving revision 1.2.6.1
diff -u -w -u -w -r1.2.6.1 ui-gtk.h
--- ui-gtk.h 2001/08/16 01:50:15 1.2.6.1
+++ ui-gtk.h 2002/03/13 21:13:26
@@ -71,4 +71,6 @@
#define GTK_BOXEDP(x) RECORDP (x, emacs_gtk_boxed)
#define CHECK_GTK_BOXED(x) CHECK_RECORD (x, emacs_gtk_boxed)
+extern Lisp_Object build_gtk_boxed (void *obj, GtkType t);
+
#endif /* __UI_GTK_H__ */