gnomelib-init



I don't know how useful this will be to anyone, but here's a patch that fixed
the crashes I got whenever gnomelib_init was called.

Unfortunatly it adds a warning about an unused variable if gnomelib_init isn't
called. 

iain

diff -U2 libgnome/ChangeLog /usr/local/src/Gnome/gnome-libs/libgnome/ChangeLog
--- libgnome/ChangeLog	Mon Nov 15 17:38:56 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/ChangeLog	Wed Nov 17 11:56:16 1999
@@ -1,2 +1,7 @@
+1999-11-17  Iain Holmes <ih@csd.abdn.ac.uk>
+
+	* gnomelib-init.h: Added fakeargv definition and changed gnomelib_init
+	to set argc and argv to the "fake" one.
+
 1999-11-15  Elliot Lee  <sopwith@redhat.com>
 
diff -U2 libgnome/gnomelib-init.h /usr/local/src/Gnome/gnome-libs/libgnome/gnomelib-init.h
--- libgnome/gnomelib-init.h	Thu Oct 28 00:03:04 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/gnomelib-init.h	Tue Nov 16 18:15:15 1999
@@ -40,8 +40,9 @@
 extern char *gnome_user_accels_dir;
 
+static char *fakeargv[] = {"Unknown", NULL};
 /* Backwards compat */
 #define gnome_app_id gnome_program_get_name(gnome_program_get())
 #define gnome_app_version gnome_program_get_version(gnome_program_get())
-#define gnomelib_init(app_id, app_version) gnome_program_init(app_id, app_version, 0, NULL, NULL)
+#define gnomelib_init(app_id, app_version) gnome_program_init(app_id, app_version, 1, fakeargv, NULL)
 
 END_GNOME_DECLS



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]