gnomelib_init (take 3)
- From: u07ih abdn ac uk
- To: gnome-devel-list gnome org
- Subject: gnomelib_init (take 3)
- Date: Wed, 17 Nov 1999 21:48:34 +0000 (GMT)
Here's take 3 of my patch to fix the crash that gnomelib_init caused. I've also
fixed it in gnome-init.c and the test programs so they call the
gnome_program_init function instead. Hopefully I've done it right this time :)
There's also another patch that sets gnome-config to return the compatability
libraries if --enable-gnome-compat is used.
Iain
diff -U2 -r gnome-libs/libgnome/ChangeLog /usr/local/src/Gnome/gnome-libs/libgnome/ChangeLog
--- gnome-libs/libgnome/ChangeLog Mon Nov 15 17:38:56 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/ChangeLog Wed Nov 17 19:33:17 1999
@@ -1,2 +1,9 @@
+1999-11-17 Iain Holmes <ih@csd.abdn.ac.uk>
+
+ * gnomelib-init.h: Removed gnomelib_init.
+
+ * gnome10-compat.[ch]: Added gnomelib_init as a function to pass fake
+ arguments to gnome_program_init.
+
1999-11-15 Elliot Lee <sopwith@redhat.com>
diff -U2 -r gnome-libs/libgnome/gnome10-compat.c /usr/local/src/Gnome/gnome-libs/libgnome/gnome10-compat.c
--- gnome-libs/libgnome/gnome10-compat.c Tue Nov 9 18:08:15 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/gnome10-compat.c Wed Nov 17 17:10:46 1999
@@ -0,0 +1,28 @@
+/* gnome10-compat.c - GNOME 1.0 compatibility functions.
+
+ The Gnome Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The Gnome Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the Gnome Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "gnome10-compat.h"
+#include "gnomelib-init2.h"
+
+void
+gnomelib_init (const char *app_id,
+ const char *app_version)
+{
+ char *fakeargv[] = { "Unknown", NULL };
+
+ gnome_program_init (app_id, app_version, 1, fakeargv, NULL);
+}
diff -U2 -r gnome-libs/libgnome/gnome10-compat.h /usr/local/src/Gnome/gnome-libs/libgnome/gnome10-compat.h
--- gnome-libs/libgnome/gnome10-compat.h Tue Nov 9 18:08:15 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/gnome10-compat.h Wed Nov 17 18:00:18 1999
@@ -0,0 +1,24 @@
+/* gnome10-compat.h - GNOME 1.0 compatibility functions.
+
+ The Gnome Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The Gnome Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the Gnome Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef GNOME10_COMPAT_H
+#define GNOME10_COMPAT_H 1
+
+void gnomelib_init (const char *app_id,
+ const char *app_version);
+
+#endif /* GNOME10_COMPAT_H */
diff -U2 -r gnome-libs/libgnome/gnomelib-init.h /usr/local/src/Gnome/gnome-libs/libgnome/gnomelib-init.h
--- gnome-libs/libgnome/gnomelib-init.h Thu Oct 28 00:03:04 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnome/gnomelib-init.h Wed Nov 17 19:33:36 1999
@@ -43,5 +43,4 @@
#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)
END_GNOME_DECLS
diff -U2 -r gnome-libs/libgnomeui/ChangeLog /usr/local/src/Gnome/gnome-libs/libgnomeui/ChangeLog
--- gnome-libs/libgnomeui/ChangeLog Mon Nov 15 17:38:57 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnomeui/ChangeLog Wed Nov 17 18:22:29 1999
@@ -1,2 +1,6 @@
+1999-11-17 Iain Holmes <ih@csd.abdn.ac.uk>
+
+ * gnome-init.c: Replaced gnomelib_init call with gnome_program_init.
+
1999-11-15 Elliot Lee <sopwith@redhat.com>
diff -U2 -r gnome-libs/libgnomeui/gnome-init.c /usr/local/src/Gnome/gnome-libs/libgnomeui/gnome-init.c
--- gnome-libs/libgnomeui/gnome-init.c Tue Nov 9 21:38:35 1999
+++ /usr/local/src/Gnome/gnome-libs/libgnomeui/gnome-init.c Wed Nov 17 17:13:20 1999
@@ -738,5 +738,5 @@
g_return_val_if_fail(gnome_initialized == FALSE, -1);
- gnomelib_init (app_id, app_version);
+ gnome_program_init (app_id, app_version, argc, argv, NULL);
gnome_register_options();
diff -U2 -r gnome-libs/test-suite/ChangeLog /usr/local/src/Gnome/gnome-libs/test-suite/ChangeLog
--- gnome-libs/test-suite/ChangeLog Thu Aug 19 03:57:36 1999
+++ /usr/local/src/Gnome/gnome-libs/test-suite/ChangeLog Wed Nov 17 17:20:13 1999
@@ -1,2 +1,12 @@
+1999-11-17 Iain Holmes <ih@csd.abdn.ac.uk>
+
+ * tests/fileconvert.c (main): Changed gnomelib_init to
+ gnome_program_init so that the tests compile without gnome10compat
+ stuff.
+ * tests/parse-path.c (main): Likewise.
+ * tests/skel.c (main): Likewise.
+ * tests/split.c (main): Likewise.
+ * tests/trigs.c: (main): Likewise.
+
1999-08-18 Havoc Pennington <hp@pobox.com>
diff -U2 -r gnome-libs/test-suite/tests/fileconvert.c /usr/local/src/Gnome/gnome-libs/test-suite/tests/fileconvert.c
--- gnome-libs/test-suite/tests/fileconvert.c Thu Jul 29 02:26:36 1999
+++ /usr/local/src/Gnome/gnome-libs/test-suite/tests/fileconvert.c Wed Nov 17 17:14:08 1999
@@ -20,5 +20,5 @@
gchar *fn;
- gnomelib_init("fileconvert", "0.0");
+ gnome_program_init("fileconvert", "0.0", argc, argv, NULL);
fn = g_strconcat(getenv("srcdir"), "/tests", NULL);
chdir(fn);
diff -U2 -r gnome-libs/test-suite/tests/parse-path.c /usr/local/src/Gnome/gnome-libs/test-suite/tests/parse-path.c
--- gnome-libs/test-suite/tests/parse-path.c Thu Jul 29 02:26:36 1999
+++ /usr/local/src/Gnome/gnome-libs/test-suite/tests/parse-path.c Wed Nov 17 17:14:44 1999
@@ -95,5 +95,5 @@
main (int argc, char *argv[])
{
- gnomelib_init("parse-path", "0.0");
+ gnome_program_init("parse-path", "0.0", argc, argv, NULL);
gnome_user_dir = "/tmp/.gnome";
diff -U2 -r gnome-libs/test-suite/tests/skel.c /usr/local/src/Gnome/gnome-libs/test-suite/tests/skel.c
--- gnome-libs/test-suite/tests/skel.c Wed Nov 25 23:15:48 1998
+++ /usr/local/src/Gnome/gnome-libs/test-suite/tests/skel.c Wed Nov 17 17:15:08 1999
@@ -12,5 +12,5 @@
int main(int argc, char *argv[])
{
- gnomelib_init("skel", "0.0");
+ gnome_program_init("skel", "0.0", argc, argv, NULL);
fflush(stdout); /* Make sure to fflush things after you do
any output, so what you see on your terminal
diff -U2 -r gnome-libs/test-suite/tests/split.c /usr/local/src/Gnome/gnome-libs/test-suite/tests/split.c
--- gnome-libs/test-suite/tests/split.c Fri Dec 4 02:54:24 1998
+++ /usr/local/src/Gnome/gnome-libs/test-suite/tests/split.c Wed Nov 17 17:15:27 1999
@@ -15,5 +15,5 @@
char **output;
int i;
- gnomelib_init("split", "0.0");
+ gnome_program_init("split", "0.0", argc, argv, NULL);
output = g_strsplit("foo:bar:baz:qaz", ":", -1);
for(i = 0; output[i]; i++) {
diff -U2 -r gnome-libs/test-suite/tests/trigs.c /usr/local/src/Gnome/gnome-libs/test-suite/tests/trigs.c
--- gnome-libs/test-suite/tests/trigs.c Thu Jul 29 02:26:36 1999
+++ /usr/local/src/Gnome/gnome-libs/test-suite/tests/trigs.c Wed Nov 17 17:15:48 1999
@@ -25,5 +25,5 @@
trig.level = NULL;
- gnomelib_init("trigs", "0.0");
+ gnome_program_init("trigs", "0.0", argc, argv, NULL);
fn = g_strconcat(getenv("srcdir"), "/tests/trigs.in", NULL);
gnome_triggers_init();
---------------------------8K---CUT HERE--------------------------------------
diff -U2 -r gnome-libs/ChangeLog /usr/local/src/Gnome/gnome-libs/ChangeLog
--- gnome-libs/ChangeLog Mon Nov 15 17:38:55 1999
+++ /usr/local/src/Gnome/gnome-libs/ChangeLog Wed Nov 17 18:19:26 1999
@@ -1,2 +1,7 @@
+1999-11-17 Iain Holmes <ih@csd.abdn.ac.uk>
+
+ * configure.in: Add -lgnome10compat and -lgnomeui10compat onto the
+ list of libraries needed to compile with --enable-gnome-compat.
+
1999-11-15 Elliot Lee <sopwith@redhat.com>
diff -U2 -r gnome-libs/configure.in /usr/local/src/Gnome/gnome-libs/configure.in
--- gnome-libs/configure.in Mon Nov 15 17:38:56 1999
+++ /usr/local/src/Gnome/gnome-libs/configure.in Wed Nov 17 16:53:12 1999
@@ -380,5 +380,8 @@
AC_ARG_ENABLE(gnome-compat, [ --enable-gnome-compat compile the compatability library for gnome-1.0 [default=no]],[compile_gnome_compat="$enableval"],[compile_gnome_compat=no])
AM_CONDITIONAL(COMPILE_GNOME_COMPAT, test x$compile_gnome_compat = xyes)
-
+if test x$compile_gnome_compat = xyes; then
+ GNOME_LIBS="$GNOME_LIBS -lgnome10compat"
+ GNOMEUI_LIBS="$GNOMEUI_LIBS -lgnome10compat -lgnomeui10compat"
+fi
dnl hack to let people use lclint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]