0. Recent patch by Bernhard made mdev fail testsuite. Analysis led to 
config_open() which should not
fclose(unopened_file) and free(unalloced_memory), IMO.

1. Reduced the number of parameters. The idea is to have flags for finer 
"delimiting" control.
Since comment is a char, I packed it to the very first char of delims. Quite 
elegant and intuitive IMHO.

2. Introduced PARSE_DONT_TRIM flag. The problem was: how to handle the leading 
and trailing delimiters
when PARSE_DONT_REDUCE is set? If a delimiter is treated as non-reduceable then 
why on earth the leading
(and trailing) delimiters are just thrown? Thus the new flag. Those who wants 
to deal with every delimiter
should set both PARSE_DONT_TRIM and PARSE_DONT_REDUCE flags.

3. When config_read() returns 0 there NOTHING has been parsed! So using 
tokens[0] segfaults. Thus changed the
failure return value from -1 to 0 (no need to know whether there were no lines, 
or all lines were empty, IMO)
and conditions in applets.

Please comment and consider applying.

TIA,
--
Vladimir

Attachment: 62.patch
Description: Binary data

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to