From c0e228864da1b2fbfc85637b5524c4c90ab62fce Mon Sep 17 00:00:00 2001 From: Greg McGary Date: Fri, 18 Apr 1997 06:37:07 +0000 Subject: imported from mkid-3.0.7 --- idfile.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'idfile.c') diff --git a/idfile.c b/idfile.c index 4979c85..15e8019 100644 --- a/idfile.c +++ b/idfile.c @@ -63,16 +63,18 @@ init_idfile (char const *id_file, struct idhead *idh, struct idarg **id_args) strings = malloc (i = idh->idh_tokens_offset - idh->idh_args_offset); fread (strings, i, 1, id_FILE); ida = *id_args = CALLOC (struct idarg, idh->idh_paths); - for (i = 0; i < idh->idh_args; i++) + for (i = 0; i < idh->idh_paths; i++) { - if (*strings != '+' && *strings != '-') + while (*strings == '+' || *strings == '-') { - ida->ida_flags = 0; - ida->ida_arg = strings; - ida->ida_next = ida + 1; - ida->ida_index = i; - ida++; + while (*strings++) + ; } + ida->ida_flags = 0; + ida->ida_arg = strings; + ida->ida_next = ida + 1; + ida->ida_index = i; + ida++; while (*strings++) ; } -- cgit v1.2.3