diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-09-14 22:19:48 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:15 -0600 |
commit | 1eddff249b2c7ce54544b840562e782501d47924 (patch) | |
tree | 2c2f728872a8c8dc8a9e013bc0afac5379eb29e1 /wrapper/runcom.c | |
parent | 1aae71a1c7365d56aa6b0549bde6e8af07513f5f (diff) |
well, launching plugins is written, too bad it segfaults
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; } |