diff options
Diffstat (limited to 'wrapper/runcom.c')
-rw-r--r-- | wrapper/runcom.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/wrapper/runcom.c b/wrapper/runcom.c index 0e8dad8..d1b1cf4 100644 --- a/wrapper/runcom.c +++ b/wrapper/runcom.c @@ -20,21 +20,24 @@ const char *ver="0.8c"; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +extern const char *libexecdir=LIBEXECDIR; +const char *plugin_conf=PLUGIN_CONF; + #include "rvs.h" #include "plugins.h" #include "plugin-load.h" #include "plugin-find.h" #include "plugin-depend.h" - -const char *libexecdir=LIBEXECDIR; -const char *plugin_conf=PLUGIN_CONF; +#include "plugin-run.h" int main ( int argc, char *argv[] ) { - xchdir(libexecdir); - struct plugin *plugins=load_plugins(stdin, plugin_conf); if (argc > 1) { + /*load*/ + xchdir(libexecdir); + struct plugin *plugins; + plugins=load_plugins(stdin, plugin_conf); struct plugin_command_list *list; list=plugin_find_commands(plugins,argv[1]); if (list==NULL) @@ -42,10 +45,15 @@ main ( int argc, char *argv[] ) argv[1]); struct plugin_command *root; root=plugin_depend_list(list,plugins); + + /*do*/ + plugin_run(root); + + /*free*/ plugin_free_list(list); plugin_free_command(root); + plugin_free_plugin(plugins); } - plugin_free_plugin(plugins); return 0; } |