summaryrefslogtreecommitdiff
path: root/wrapper/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper/plugin.h')
-rw-r--r--wrapper/plugin.h31
1 files changed, 6 insertions, 25 deletions
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