gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3270 - in GNUnet: . src/include src/setup src/setup/lib


From: grothoff
Subject: [GNUnet-SVN] r3270 - in GNUnet: . src/include src/setup src/setup/lib
Date: Sun, 20 Aug 2006 13:27:53 -0700 (PDT)

Author: grothoff
Date: 2006-08-20 13:27:50 -0700 (Sun, 20 Aug 2006)
New Revision: 3270

Modified:
   GNUnet/src/include/gnunet_setup_lib.h
   GNUnet/src/setup/Makefile.am
   GNUnet/src/setup/gnunet-setup.c
   GNUnet/src/setup/lib/tree.c
   GNUnet/todo
Log:
better

Modified: GNUnet/src/include/gnunet_setup_lib.h
===================================================================
--- GNUnet/src/include/gnunet_setup_lib.h       2006-08-20 20:22:12 UTC (rev 
3269)
+++ GNUnet/src/include/gnunet_setup_lib.h       2006-08-20 20:27:50 UTC (rev 
3270)
@@ -46,11 +46,6 @@
 #include "gnunet_util.h"
 
 /**
- * Register GNUnet setup functions with scheme (call only once).
- */ 
-void gns_scheme_register(void);
-
-/**
  * Types of nodes and values in the configuration tree.
  */
 typedef enum {

Modified: GNUnet/src/setup/Makefile.am
===================================================================
--- GNUnet/src/setup/Makefile.am        2006-08-20 20:22:12 UTC (rev 3269)
+++ GNUnet/src/setup/Makefile.am        2006-08-20 20:27:50 UTC (rev 3270)
@@ -25,15 +25,12 @@
 gnunet_setup_SOURCES = \
  gnunet-setup.c
 
-gnunet_setup_LDADD = @GUILE_LDFLAGS@ \
+gnunet_setup_LDADD = \
  $(top_builddir)/src/setup/lib/libgnunetsetup.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/util/loggers/libgnunetutil_logging.la \
  $(top_builddir)/src/util/config_impl/libgnunetutil_config.la 
 
-gnunet_setup_CFLAGS = \
- @GUILE_CFLAGS@ -I$(top_scrdir)/include 
-
 gnunet_win_tool_SOURCE = \
  gnunet-win-tool.c
 

Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c     2006-08-20 20:22:12 UTC (rev 3269)
+++ GNUnet/src/setup/gnunet-setup.c     2006-08-20 20:27:50 UTC (rev 3270)
@@ -31,7 +31,6 @@
 #include "gnunet_util_error_loggers.h"
 
 #include "platform.h"
-#include <libguile.h>
 
 typedef int (*ConfigurationPluginMain)(int argc,
                                       const char ** argv,
@@ -86,7 +85,7 @@
        library,
        ectx, 
        cfg,
-       filename,
+       gns,
        config_daemon); 
   os_plugin_unload(library);  
   return YES;
@@ -117,9 +116,8 @@
 };
 
 
-int real_main(void * unused,
-             int argc, 
-             const char *argv[]) {
+int main(int argc, 
+        const char * argv[]) {
   const char * operation;
   int done;
   char * filename;
@@ -127,7 +125,6 @@
   char * specname;
   int i; 
 
-  gns_scheme_register();
   ectx = GE_create_context_stderr(NO, 
                                  GE_WARNING | GE_ERROR | GE_FATAL |
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
@@ -263,12 +260,3 @@
   GE_free_context(ectx);
   return 0;
 }
-
-/**
- * Guile's gh_enter sucks.
- */
-int main(int argc, 
-        const char *argv[]) {
-  scm_boot_guile(argc, argv, real_main, NULL);
-  return 0; /* never reached */ 
-}

Modified: GNUnet/src/setup/lib/tree.c
===================================================================
--- GNUnet/src/setup/lib/tree.c 2006-08-20 20:22:12 UTC (rev 3269)
+++ GNUnet/src/setup/lib/tree.c 2006-08-20 20:27:50 UTC (rev 3270)
@@ -277,27 +277,6 @@
   return box_tree(tree);
 }
 
-void gns_scheme_register() {
-  tc_tag = scm_make_smob_type ("tc", sizeof (TC));
-  scm_set_smob_mark (tc_tag, NULL);
-  scm_set_smob_free (tc_tag, free_box);
-  scm_set_smob_print (tc_tag, print_tc);
-
-  tree_tag = scm_make_smob_type ("tc", sizeof (struct GNS_Tree));
-  scm_set_smob_mark (tree_tag, NULL);
-  scm_set_smob_free (tree_tag, free_box);
-  scm_set_smob_print (tree_tag, print_tree);
-  scm_c_define_gsubr("change-visible",
-                    4, 0, 0, 
-                    &change_visible);
-  scm_c_define_gsubr("build-tree-node",
-                    8, 0, 0,
-                    &build_tree_node);
-  scm_c_define_gsubr("get-option",
-                    3, 0, 0,
-                    &get_option);
-}
-
 /**
  * Parse the specification file and create the tree.
  * Set all values to defaults.
@@ -336,4 +315,28 @@
   scm_apply_3(proc, smob_ctx, smob_root, smob_chng, SCM_EOL);
 }
 
+
+void __attribute__ ((constructor)) gns_scheme_init() {
+  scm_init_guile();
+  tc_tag = scm_make_smob_type ("tc", sizeof (TC));
+  scm_set_smob_mark (tc_tag, NULL);
+  scm_set_smob_free (tc_tag, free_box);
+  scm_set_smob_print (tc_tag, print_tc);
+
+  tree_tag = scm_make_smob_type ("tc", sizeof (struct GNS_Tree));
+  scm_set_smob_mark (tree_tag, NULL);
+  scm_set_smob_free (tree_tag, free_box);
+  scm_set_smob_print (tree_tag, print_tree);
+  scm_c_define_gsubr("change-visible",
+                    4, 0, 0, 
+                    &change_visible);
+  scm_c_define_gsubr("build-tree-node",
+                    8, 0, 0,
+                    &build_tree_node);
+  scm_c_define_gsubr("get-option",
+                    3, 0, 0,
+                    &get_option);
+}
+
+
 /* end of tree.c */

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-08-20 20:22:12 UTC (rev 3269)
+++ GNUnet/todo 2006-08-20 20:27:50 UTC (rev 3270)
@@ -32,8 +32,8 @@
       sqstore_mysql, topology_f2f, rpc, kvstore_sqlite compile
     + fs/fsui, fs/collection, fs/uritrack, fs/namespace
       must still be revised to match new API!
-    + rest: dht, vpn
-    + low priority: chat, testbed
+    + rest: vpn
+    + low priority: chat, dht, testbed
   * setup:
     + main binary compiles, plugins are missing
       consider reorganization (subdirectories):





reply via email to

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