diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-09-07 22:37:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:14 -0600 |
commit | ed30436305ed7a7fe6170d90a453a9d04faecf52 (patch) | |
tree | daad9ff049fcddb5a209a9b1eb7f1de6636b51d7 /wrapper/plugin-parse.c | |
parent | e2e63f81e5ac06ecf5461cc0a8fd68077707de5d (diff) |
I think I have it back to where it was last week (although, a lot cleaner, and elagant)
Diffstat (limited to 'wrapper/plugin-parse.c')
-rw-r--r-- | wrapper/plugin-parse.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 { |