summaryrefslogtreecommitdiff
path: root/wrapper
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-09-12 22:32:44 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:15 -0600
commitd9c1caf91aa18dfe383a678f618ca644cbba01ef (patch)
treebc13f438858e7fbe8fd4dd264c7265b1095e4fe4 /wrapper
parent069d217aaa49e9dc285a264d2dce7eeb554a84e2 (diff)
this doesn't work/run, but it seems like /progress/
I'm beginning to get depressed about this :|
Diffstat (limited to 'wrapper')
-rw-r--r--wrapper/plugin-depend.h9
-rw-r--r--wrapper/plugin-find.h14
-rw-r--r--wrapper/plugin-load.h1
-rw-r--r--wrapper/plugins.h11
-rwxr-xr-xwrapper/rvsbin25759 -> 24788 bytes
-rw-r--r--wrapper/rvs.c4
6 files changed, 11 insertions, 28 deletions
diff --git a/wrapper/plugin-depend.h b/wrapper/plugin-depend.h
index 7dc7f29..6b18bde 100644
--- a/wrapper/plugin-depend.h
+++ b/wrapper/plugin-depend.h
@@ -91,9 +91,6 @@ plugin_depend_command (struct plugin_command *command,
struct plugin_command *root, int ind)
{
if (command!=NULL) {
- #ifdef DEBUG
- plugin_print_command(command,ind);
- #endif
if (command->depend == NULL) {
/* the depend still needs to be parsed */
command->depend=plugin_depend_parse(
@@ -131,10 +128,6 @@ _plugin_depend_list (struct plugin_command_list *commands,
struct plugin_command *root,int ind)
{
if (commands!=NULL) {
- #ifdef DEBUG
- plugin_print_command(commands->command,ind);
- printf("%p\n",commands->next);
- #endif
plugin_depend_command(commands->command,plugins,root,ind++);
_plugin_depend_list(commands->next,plugins,root,ind++);
}
@@ -145,7 +138,7 @@ plugin_depend_list (struct plugin_command_list *commands,
struct plugin *plugins)
{
struct plugin_command *root=plugin_mk_command();
- _plugin_depend_list(commands->next,plugins,root,0);
+ _plugin_depend_list(commands,plugins,root,0);
return root;
}
diff --git a/wrapper/plugin-find.h b/wrapper/plugin-find.h
index afd2e2c..9444f55 100644
--- a/wrapper/plugin-find.h
+++ b/wrapper/plugin-find.h
@@ -84,18 +84,20 @@ plugin_find_command(struct plugin *plugin, char *name)
struct plugin_command_list *
plugin_find_commands(struct plugin *plugin, char *name)
{
- struct plugin_command_list *command=xmalloc( sizeof *command );
- command->command=plugin_find_command(plugin,name);
if (plugin==NULL)
- command->next=NULL;
- else
+ return NULL;
+ else {
+ struct plugin_command_list *command;
+ command=xmalloc( sizeof *command );
+ command->command=plugin_find_command(plugin,name);
command->next=plugin_find_commands(plugin->next,name);
- return command;
+ return command;
+ }
}
#ifdef DEBUG
void
-plugin_print_command_list(struct command_list *list, ind)
+plugin_print_command_list(struct plugin_command_list *list, int ind)
{
}
diff --git a/wrapper/plugin-load.h b/wrapper/plugin-load.h
index 504057c..cb7399d 100644
--- a/wrapper/plugin-load.h
+++ b/wrapper/plugin-load.h
@@ -35,7 +35,6 @@ plugin_load (const char *plug_name, const char *plugin_conf)
{
struct plugin *plugin=xmalloc( sizeof(*plugin) );
plugin->name=stralloc(plug_name);
- puts(plugin->name);
plugin->next=NULL;
xchdir(plug_name);
diff --git a/wrapper/plugins.h b/wrapper/plugins.h
index a643715..f1b01a2 100644
--- a/wrapper/plugins.h
+++ b/wrapper/plugins.h
@@ -52,10 +52,6 @@ struct plugin_command
struct plugin_command *d_next;
};
-#ifdef DEBUG
-#include "plugin-debug.h"
-#endif
-
/* create a blank plugin_command */
struct plugin_command *
plugin_mk_command()
@@ -83,9 +79,7 @@ void
plugin_free_command(struct plugin_command *command)
{
if (command!=NULL) {
- #ifdef DEBUG
- plugin_print_command(command,2);
- #endif
+ printf("%p\n",command->next);
plugin_free_command(command->next);
xfree(command->name);
xfree(command->depends);
@@ -98,9 +92,6 @@ void
plugin_free_plugin(struct plugin *plugin)
{
if (plugin!=NULL) {
- #ifdef DEBUG
- plugin_print_plugin(plugin,1);
- #endif
xfree(plugin->name);
plugin_free_command(plugin->commands);
plugin_free_plugin(plugin->next);
diff --git a/wrapper/rvs b/wrapper/rvs
index e186226..5f04700 100755
--- a/wrapper/rvs
+++ b/wrapper/rvs
Binary files differ
diff --git a/wrapper/rvs.c b/wrapper/rvs.c
index 9414475..cf2b708 100644
--- a/wrapper/rvs.c
+++ b/wrapper/rvs.c
@@ -30,8 +30,6 @@ const char *ver="0.8c";
const char *libexecdir="./plugins";
const char *plugin_conf="plugin.conf";
-void foobar(){puts("");}
-
int
main ( int argc, char *argv[] )
{
@@ -40,10 +38,10 @@ main ( int argc, char *argv[] )
struct plugin_command_list *list;
list=plugin_find_commands(plugins,argv[1]);
plugin_depend_list(list,plugins);
+ puts("");
}
puts("freeing...");
plugin_free_plugin(plugins);
- foobar();
return 0;
}