A helper function for parsing vanilla config files is added.
I see mdev, crond and others can use it to uniformly process their configs.

Typical usage:

----- CUT -----
void *data;
char **token = parse_config(filename, 128, &data); // 128 tokens at most

while (*token) {
        bb_error_msg("LINE---------");
        while (*token) {
                bb_error_msg("TOKEN [%s]", *token);
                token++;
        }
        token++;
}

free(token);
free(data);
----- CUT -----

Please, comment and consider applying.

TIA,
--
Vladimir

Attachment: parse.patch
Description: Binary data

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to