diff options
Diffstat (limited to 'rvs/wrapper')
-rw-r--r-- | rvs/wrapper/main.mk.in | 2 | ||||
-rw-r--r-- | rvs/wrapper/runcom.c | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/rvs/wrapper/main.mk.in b/rvs/wrapper/main.mk.in index 7959612..7d9cc19 100644 --- a/rvs/wrapper/main.mk.in +++ b/rvs/wrapper/main.mk.in @@ -28,7 +28,7 @@ CFLAGS = -g \ -Dplugin_conf=\"plugin.conf\" # phony targets #################################################### -all : rvs runcom Makefiles +all : Makefiles rvs runcom .PHONY : install uninstall clean distclean dist install-runcom .SUFFIXES : .c .o VPATH = $(srcdir)/wrapper diff --git a/rvs/wrapper/runcom.c b/rvs/wrapper/runcom.c index 5928bb3..30603a2 100644 --- a/rvs/wrapper/runcom.c +++ b/rvs/wrapper/runcom.c @@ -41,15 +41,20 @@ main ( int argc, char *argv[] ) plugins=load_plugins(stdin); struct plugin_command_list *list; if ( strchr(argv[1],'/') == NULL ) + /* this is a normal command */ list=plugin_find_commands(plugins,argv[1]); else { /* this is a command for a specific plugin */ - list=xmalloc(sizeof(*list)); - list->command=plugin_depend_parse(stralloc(argv[1])); - list->next=NULL; + + list=xmalloc(sizeof(*list)); list->next=NULL; + + list->command=plugin_depend_parse( + // | command-name |plugins|ret if name==""| + stralloc(argv[1]),plugins,NULL); if ( list->command == NULL ) { - /* plugin_depend_parse should fail the program*\ - \* on its own, but just to be safe... */ + // `command->list' should be NULL if + // no plugin/command was found + // no command was specified (argv[1]=="") plugin_free_list(list); list=NULL; } |