commit-gnue
[Top][All Lists]
Advanced

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

gnue/geas/src/methods Makefile.am methods.c met...


From: Neil Tiffin
Subject: gnue/geas/src/methods Makefile.am methods.c met...
Date: Fri, 14 Sep 2001 20:20:18 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Neil Tiffin <address@hidden>    01/09/14 20:20:18

Modified files:
        geas/src/methods: Makefile.am methods.c 
Added files:
        geas/src/methods: methods_glibmodule.c methods_python.c 
                          methods_python.h 
Removed files:
        geas/src/methods: methods_glibmodule.h methods_oaf.h 
                          methods_unstable.h 

Log message:
        Start method revisions, most likely geas is broke for a few hours.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_glibmodule.c?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_python.c?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_python.h?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/Makefile.am.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods.c.diff?cvsroot=OldCVS&tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: gnue/geas/src/methods/Makefile.am
diff -u gnue/geas/src/methods/Makefile.am:1.7 
gnue/geas/src/methods/Makefile.am:1.8
--- gnue/geas/src/methods/Makefile.am:1.7       Wed May 16 11:55:16 2001
+++ gnue/geas/src/methods/Makefile.am   Fri Sep 14 20:20:18 2001
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.7 2001/05/16 15:55:16 reinhard Exp $
+## $Id: Makefile.am,v 1.8 2001/09/15 00:20:18 ntiffin Exp $
 
 noinst_LIBRARIES = libmethods.a
 
@@ -9,4 +9,4 @@
            -I$(top_srcdir)/src
 
 libmethods_a_SOURCES = methods.c methods.h \
-                       methods_glibmodule.h methods_oaf.h methods_unstable.h
+                       methods_glibmodule.c methods_python.c
Index: gnue/geas/src/methods/methods.c
diff -u gnue/geas/src/methods/methods.c:1.11 
gnue/geas/src/methods/methods.c:1.12
--- gnue/geas/src/methods/methods.c:1.11        Tue Aug 21 17:20:24 2001
+++ gnue/geas/src/methods/methods.c     Fri Sep 14 20:20:18 2001
@@ -1,5 +1,5 @@
 /*
-  methods.c - Dummy file if method support is not compiled in.
+  methods.c - Dispatch methods.
 
   Copyright (C) 2001 Free Software Foundation
 
@@ -19,32 +19,31 @@
   along with GEAS; if not, write to the Free Software Foundation, Inc.,
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-  $Id: methods.c,v 1.11 2001/08/21 21:20:24 reinhard Exp $
+  $Id: methods.c,v 1.12 2001/09/15 00:20:18 ntiffin Exp $
 */
 
 #include "config.h"
-
 #include <glib.h>
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-
 #include "geas-server.h"
 #include "classdata.h"
 #include "config/configuration.h"
 #include "methods.h"
 #include "exceptions.h"
 
+#include "methods_python.h"
+
 /* base data structures and related private utility methods */
 typedef struct
 {
-  char *classname;              /* full class name      */
-  char *methodname;             /* name of method field */
-  char *cid;
-  CORBA_Object object;
-  void *extra;                  /* misc */
-  void *function;               /* glib */
+  char         *classname;              /* full class name      */
+  char         *methodname;             /* name of method field */
+  char         *cid;
+  CORBA_Object  object;
+  void         *extra;                  /* misc */
+  void         *function;               /* glib */
 }
 provider_t;
 
@@ -54,26 +53,29 @@
 
 static void free_provider_data (provider_t * p);
 
-#if USE_OAF
-/* use the OAF technique for locating objects */
-#include "methods_oaf.h"
-#elif USE_PYTHON_METHODS
-/* use a somewhat unreliable fallback technique */
-#include "methods_unstable.h"
-#elif USE_GLIBMODULE_METHODS
-/* loads glib modules as method sources */
-#include "methods_glibmodule.h"
-#else
+// #if USE_PYTHON_METHODS
 
-/* default functions, if no method code system is selected */
+// #elif USE_GLIBMODULE_METHODS
 
 gboolean
 initialise_method_handling (configuration config)
 {
-  /* this doesn't really do much exciting stuff */
+  gboolean status = FALSE;
+
+#if USE_PYTHON_METHODS  
+  status = python_initialise_method_handling (configuration config);
+#endif
+
+#if USE_GLIBMODULE_METHODS
+  status = status || gmodule_initialise_method_handling(configuration config);
+#endif
+
+#if ! USE_PYTHON_METHODS && ! USE_GLIBMODULE_METHODS
   criticalerror ("No method code handling has been compiled.");
   message ("No business class methods will work.");
-  return (FALSE);
+#endif
+
+  return (status);
 }
 
 gboolean
@@ -100,9 +102,8 @@
   fatal_error ("No method code handling has been compiled.");
   return (NULL);
 }
-
-#endif
 
+// end of general dispatch routines
 
 static provider_t *
 alloc_provider_data (const char *classname, const char *cid,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]