From ed30436305ed7a7fe6170d90a453a9d04faecf52 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 7 Sep 2009 22:37:12 -0400 Subject: I think I have it back to where it was last week (although, a lot cleaner, and elagant) --- wrapper/plugin-parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'wrapper/plugin-parse.c') diff --git a/wrapper/plugin-parse.c b/wrapper/plugin-parse.c index 8560dfd..800098f 100644 --- a/wrapper/plugin-parse.c +++ b/wrapper/plugin-parse.c @@ -101,11 +101,12 @@ _plugin_parse (FILE *file) char c[2] = " \0"; char *cs = (char *)&c; - if ( (c[0]=getc(file)) == EOF ) { + + if ( (c[0]=getc(file)) == EOF ) return NULL; - } else { + else ungetc (c[0], file); - } + while ( (c[0]=getc(file)) != EOF ) { if (c[0] == '\n') { if (strlen(string)==0) { @@ -114,6 +115,7 @@ _plugin_parse (FILE *file) command=_plugin_parse(file); } else { command->name=string; + command->next=_plugin_parse(file); } break; } else { -- cgit v1.2.3-54-g00ecf