diff options
author | Greg McGary <greg@mcgary.org> | 1997-04-18 06:37:07 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 1997-04-18 06:37:07 +0000 |
commit | c0e228864da1b2fbfc85637b5524c4c90ab62fce (patch) | |
tree | c30081f0af75ba51194bd672180690d6524b0448 /idfile.c | |
parent | ad89a5d46547cb45b918926269ca2883eccf5e23 (diff) | |
download | idutils-c0e228864da1b2fbfc85637b5524c4c90ab62fce.tar.gz idutils-c0e228864da1b2fbfc85637b5524c4c90ab62fce.tar.bz2 idutils-c0e228864da1b2fbfc85637b5524c4c90ab62fce.zip |
imported from mkid-3.0.7r3_0_7
Diffstat (limited to 'idfile.c')
-rw-r--r-- | idfile.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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++) ; } |