diff options
Diffstat (limited to 'wrapper/plugins.h')
-rw-r--r-- | wrapper/plugins.h | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/wrapper/plugins.h b/wrapper/plugins.h index c5fb53d..2b5a96e 100644 --- a/wrapper/plugins.h +++ b/wrapper/plugins.h @@ -1,7 +1,7 @@ /* wrapper/plugins.h -- struct definitions and basic functions for rvs plugins system depends: this file is truly system-independant Copyright (C) 2009 Luke Shumaker - system depends: this file is completely system-independant + This file is part of rvs. rvs is free software; you can redistribute it and/or modify it @@ -53,49 +53,17 @@ struct plugin_command }; /* create a blank plugin_command */ +extern struct plugin_command * -plugin_mk_command() -{ - struct plugin_command *command; - command=(struct plugin_command *)xmalloc(sizeof(*command)); - - /* node */ - command->name=NULL; - command->plugin=NULL; - command->depend=NULL; - command->depends=NULL; - - /* linked list */ - command->next=NULL; - - /* depends */ - command->d_child=NULL; - command->d_next=NULL; - - return command; -} +plugin_mk_command(); +extern void -plugin_free_command(struct plugin_command *command) -{ - if (command!=NULL) { - plugin_free_command(command->next); - xfree(command->name); - xfree(command->depends); - xfree(command); - } -} +plugin_free_command(struct plugin_command *command); +extern void -plugin_free_plugin(struct plugin *plugin) -{ - if (plugin!=NULL) { - xfree(plugin->name); - plugin_free_command(plugin->commands); - plugin_free_plugin(plugin->next); - xfree(plugin); - } -} +plugin_free_plugin(struct plugin *plugin); #endif |