From 3420365915d2a9ca75c7ec18d72ff7c1955de757 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Sep 2009 21:02:08 -0400 Subject: I'm going to come out and say it, I fucked it up :( --- wrapper/plugin.h | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'wrapper/plugin.h') diff --git a/wrapper/plugin.h b/wrapper/plugin.h index 5273866..825c8d2 100644 --- a/wrapper/plugin.h +++ b/wrapper/plugin.h @@ -21,50 +21,31 @@ #define FILE_plugin_h_SEEN #include "rvs.h" +#include "structures.h" -struct plugin -{ - char *name; - - struct plugin_command *child; - struct plugin *next; -}; - +/* a single plugin command, for use as *node in binary trees */ struct plugin_command { char *name; - - /*plugin ID*/ - struct plugin *plugin; /* which plugin does it belong to? */ - struct plugin_command *p_next; /* next command in this plugin (linked list)*/ - - /*dependancy tree*/ + struct tree_list *plugin; /* which plugin does it belong to? */ struct plugin_command *depend; /* what does this depend on? */ char *depends;/* what does this depend on? */ - struct plugin_command *child; /* what depends on this? (linked list) */ - struct plugin_command *d_next; /* next command w/ same dependancy (linked list) */ }; +/* create a blank plugin_command */ struct plugin_command * mkcommand() { struct plugin_command *command; command=(struct plugin_command *)xmalloc(sizeof(*command)); + command->name=NULL; command->plugin=NULL; - command->p_next=NULL; command->depend=NULL; command->depends=NULL; - command->child=NULL; - command->d_next=NULL; + return command; } -struct plugin_tree -{ - struct plugin *plugins; - struct plugin_command *depends; -}; - #endif -- cgit v1.2.3-2-g168b