attributes ok now
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 May 2003 16:11:12 +0000 (16:11 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 29 May 2003 16:11:12 +0000 (16:11 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@36 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/main.c
ltt/branches/poly/lttv/option.c

index 2ec66f74dd1e2ab059fb43ead5b0346a41bd7aed..db28acf3db6c909cf6796f53a4fa1654e06a2777 100644 (file)
@@ -124,6 +124,12 @@ int main(int argc, char **argv) {
   
 }
 
+lttv_attributes *lttv_global_attributes()
+{
+       return attributes_global;
+}
+
+
 void lttv_module_option(void *hook_data)
 { 
   lttv_module_load(aModule,aArgc,aArgv,STANDALONE);
index fc5bc26f0a6f4451280d6237810264412fc044a3..4a42f747531fb54158504b1d9a0fc1f8625b5b3e 100644 (file)
@@ -1,8 +1,8 @@
+#include <popt.h>
 
 #include "lttv.h"
 #include "option.h"
 #include "hook.h"
-#include <popt.h>
 
 /* Extensible array of popt command line options. Modules add options as
    they are loaded and initialized. */
@@ -12,8 +12,6 @@ typedef struct _lttv_option {
   void *hook_data;
 } lttv_option;
 
-extern lttv_attributes *attributes_global;
-
 static GArray *lttv_options_command;
 
 static GArray *lttv_options_command_popt;
@@ -48,16 +46,16 @@ void lttv_option_init(int argc, char **argv) {
   hooks_options_before = lttv_hooks_new();
   hooks_options_after = lttv_hooks_new();
 
-  lttv_attributes_set_pointer_pathname(attributes_global
+  lttv_attributes_set_pointer_pathname(lttv_global_attributes()
       "hooks/options/before", hooks_options_before);
 
-  lttv_attributes_set_pointer_pathname(attributes_global,
+  lttv_attributes_set_pointer_pathname(lttv_global_attributes(),
       "hooks/options/after",  hooks_options_after);
 
   lttv_options_command_popt = g_array_new(0,0,sizeof(struct poptOption));
   lttv_options_command = g_array_new(0,0,sizeof(lttv_option));
 
-  hooks_init_after = lttv_attributes_get_pointer_pathname(attributes_global,
+  hooks_init_after = lttv_attributes_get_pointer_pathname(lttv_global_attributes(),
                  "hooks/init/after");
   lttv_hooks_add(hooks_init_after, lttv_options_command_parse, NULL);
 
@@ -68,10 +66,10 @@ void lttv_option_destroy() {
   g_array_free(lttv_options_command_popt,TRUE) ;
   g_array_free(lttv_options_command,TRUE) ;
 
-  lttv_attributes_set_pointer_pathname(attributes_global
+  lttv_attributes_set_pointer_pathname(lttv_global_attributes()
       "hooks/options/before", NULL);
 
-  lttv_attributes_set_pointer_pathname(attributes_global,
+  lttv_attributes_set_pointer_pathname(lttv_global_attributes(),
       "hooks/options/after",  NULL);
 
   lttv_hooks_destroy(hooks_options_before);
This page took 0.024761 seconds and 4 git commands to generate.