Commit Graph

6 Commits

Author SHA1 Message Date
Denys Vlasenko
da94760762 fix false positive in parse test
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 09:29:21 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Mike Frysinger
caa79406aa tests: fix POSIX shell source style
The source command does not search $PWD, and bash recently fixed itself to
follow this behavior for /bin/sh.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-04 18:41:22 -05:00
Denis Vlasenko
084266ed52 fix several problems with config parser:
a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes
2008-07-26 23:08:31 +00:00
Denis Vlasenko
9b366f4136 libbb/parse_config.c: fix small buglet (by Vladimir) 2008-07-20 17:50:58 +00:00
Denis Vlasenko
2e157ddf9e libbb: updated config_parse() from Vladimir
function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes
2008-07-19 09:27:19 +00:00