From bddd6fb07906e660260ef0fced05440ecac8d9e9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 24 Oct 2009 02:23:22 -0400 Subject: switching to git --- wrapper/runcom.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'wrapper/runcom.c') diff --git a/wrapper/runcom.c b/wrapper/runcom.c index d1b1cf4..10e9919 100644 --- a/wrapper/runcom.c +++ b/wrapper/runcom.c @@ -1,6 +1,6 @@ -const char *name="rvs"; -const char *ver="0.8c"; -/* Copyright (C) 2009 Luke Shumaker +/* wrapper/runcom.c -- main program loop + system depends: this file is truly system-independant + Copyright (C) 2009 Luke Shumaker This file is part of rvs. @@ -20,8 +20,8 @@ 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; +const char *name=NAME; +const char *ver=VER; #include "rvs.h" #include "plugins.h" @@ -35,9 +35,10 @@ main ( int argc, char *argv[] ) { if (argc > 1) { /*load*/ + char *cwd=getcwd(NULL,0); xchdir(libexecdir); struct plugin *plugins; - plugins=load_plugins(stdin, plugin_conf); + plugins=load_plugins(stdin); struct plugin_command_list *list; list=plugin_find_commands(plugins,argv[1]); if (list==NULL) @@ -47,7 +48,18 @@ main ( int argc, char *argv[] ) root=plugin_depend_list(list,plugins); /*do*/ - plugin_run(root); + xchdir(cwd); + int nbytes=10; + char *args=xmalloc(nbytes); + args[0]='\0'; + int i; + for (i=2; i