Commit Graph

301 Commits

Author SHA1 Message Date
Denys Vlasenko
1d7ad7a022 tweak help texts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21 09:45:11 +02:00
Denys Vlasenko
37ca36a711 sed: yet another fix on top of zero length match code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-08 10:25:31 +02:00
Denys Vlasenko
84406e459b sed: fix breakage added by zero length match code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-07 16:34:57 +02:00
Denys Vlasenko
c35545a100 sed: code shrink
function                                             old     new   delta
process_files                                       2181    2173      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-04 14:45:09 +02:00
Denys Vlasenko
21f6fbf545 sed: fix zero chars match/replace
function                                             old     new   delta
process_files                                       2099    2181     +82

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-04 14:44:47 +02:00
Simon B
8c3439554a sed: support long opts and -iSFX
function                                             old     new   delta
static.sed_longopts                                    -      67     +67
sed_main                                             618     682     +64
packed_usage                                       29179   29236     +57
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 188/0)             Total: 188 bytes

Signed-off-by: Simon B <sburnet@hotmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-06 14:01:41 +02:00
Denys Vlasenko
b84dafb5e5 sed: slightly better fix for prev commit's problem
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-24 19:27:34 +02:00
Denys Vlasenko
e39afe1fbd sed: fix handling of s/// which has empty matches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-24 19:21:16 +02:00
Denys Vlasenko
d29ae7e071 sed: fix possible case of signed char bug; expand debugging printouts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15 20:06:03 +01:00
Denys Vlasenko
a221bc5f99 sed: better help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-13 18:40:22 +02:00
Denys Vlasenko
a7d6bb3b5d sed: fix range handling for sed -i. Closes 4069
function                                             old     new   delta
sed_main                                             606     618     +12
add_cmd                                             1099    1101      +2
process_files                                       2108    2099      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 14/-9)               Total: 5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-16 13:29:34 +02:00
Denys Vlasenko
66426760be *: remove "Options:" string from help texts
function                                             old     new   delta
packed_usage                                       28706   28623     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Pascal Bellard
d3e4be3ccb sed: shrink by 17 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-05 00:26:37 +02:00
Denys Vlasenko
6a0abcc02f sed: support \r in s command
function                                             old     new   delta
copy_parsing_escapes                                  65      91     +26

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03 00:52:22 +02:00
Denys Vlasenko
52d8370836 sed: code shrink
text    data     bss     dec     hex filename
 876354     493    7584  884431   d7ecf busybox_old
 876323     493    7584  884400   d7eb0 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03 00:51:43 +02:00
Pere Orga
6a3e01d5a9 move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03 01:33:55 +02:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Alexander Shishkin
6722737ece *: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:27:16 +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
Denys Vlasenko
0d555fc951 sed: make N command behave as in GNU sed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 16:26:33 +02:00
Denys Vlasenko
2e284a40bc sed: fix sed -i: unlike without -i, it does not forget ranges
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01 04:14:46 +02:00
Denys Vlasenko
eb08b6ed5c sed: trivial code shrink -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19 17:51:06 +02:00
Denys Vlasenko
e329089c62 Revert "sed: trivial code shrink"
This reverts commit c2c7aa4b0d.
2010-06-19 17:50:23 +02:00
Denys Vlasenko
c2c7aa4b0d sed: trivial code shrink
function                                             old     new   delta
sed_main                                             685     667     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19 17:47:46 +02:00
Denys Vlasenko
3b727ccb70 add a comment about sed and suid bits
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 02:12:56 +02:00
Denys Vlasenko
c46792492f typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 01:31:48 +02:00
Denys Vlasenko
bf5f99ffb2 sed: fix a case when one-line range matches past lines. Closes bug 1867.
function                                             old     new   delta
process_files                                       2096    2107     +11
add_cmd                                             1142    1132     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-10)              Total: 1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 01:29:52 +02:00
Denys Vlasenko
a2215b98f7 sed: fix a command with multible trailing backslashes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-12 01:49:04 +02:00
Denys Vlasenko
f2c16edf99 sed: fix nested {} case
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-20 04:00:03 -04:00
Denys Vlasenko
96a1833231 sed: fix c cmd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-19 22:36:07 -04:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
9037787eae *: fix places where we were still using malloc/realloc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 09:07:50 +01:00
Denys Vlasenko
a7ccdeef39 libbb: added xfdopen_for_read/write
function                                             old     new   delta
xfdopen_helper                                         -      40     +40
logdir_open                                         1163    1184     +21
process_stdin                                        433     443     +10
xfdopen_for_write                                      -       9      +9
doCommands                                          2465    2474      +9
patch_main                                          1214    1222      +8
bbunpack                                             457     465      +8
xfdopen_for_read                                       -       7      +7
scan_tree                                            258     262      +4
xstrtoul_range_sfx                                   230     231      +1
sendmail_main                                        957     955      -2
passwd_main                                         1027    1023      -4
parse                                                969     964      -5
test_main                                            253     247      -6
sed_main                                             655     649      -6
dos2unix_main                                        437     429      -8
fbsplash_main                                        950     938     -12
handle_dir_common                                    371     354     -17
expand_vars_to_list                                 2197    2169     -28
update_passwd                                       1275    1246     -29
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117)           Total: 0 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 23:28:11 +01:00
Denys Vlasenko
5799248976 sed: on output file, set not only mode, but owner too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:09:07 +01:00
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
c0dab37d0a *: remove last function calls to isspace
function                                             old     new   delta
xstrtoul_range_sfx                                   232     231      -1
xstrtoull_range_sfx                                  295     293      -2
trim                                                  82      80      -2
trim_trailing_spaces_and_print                        57      52      -5
isspace                                               18       -     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 22:28:08 +02:00
Denys Vlasenko
6935ec9c0b networking/interface.c: tiny code shrink
function                                             old     new   delta
if_readlist_proc                                     634     631      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 19:42:26 +02:00
Denys Vlasenko
11c8238d1b sed: fix bug 623 (SEGV on some sed commands)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 03:02:21 +02:00
Denys Vlasenko
90a9904e9e remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)
function                                             old     new   delta
logdirs_reopen                                      1310    1308      -2
read_line_input                                     4757    4753      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6)               Total: -6 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:36:23 +02:00
Denys Vlasenko
f210cff601 sed: fix " echo /usr/lib | sed 's,\(^/\|\)[^/][^/]*,..,g' " bug
function                                             old     new   delta
process_files                                       2102    2091     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-17 01:35:04 +02:00
Denys Vlasenko
8e96b5b531 sed: simpler fix for recent GNU compat stuff (by Rob Landley)
function                                             old     new   delta
process_files                                       2120    2102     -18

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-14 01:02:57 +02:00
Denys Vlasenko
ae68f1133f sed: deal with peculiar behavior of '2d;2,1p' in GNU sed
function                                             old     new   delta
process_files                                       2173    2120     -53

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-10 11:55:20 +02:00
Denys Vlasenko
8bca3e20b9 sed: fix handling of 1d;1,3p and 1d;1,REGEXp
function                                             old     new   delta
process_files                                       2084    2173     +89

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-30 19:19:37 +02:00
Denis Vlasenko
0f293b96dc fix all cases of strcpy on overlapping strings. 2008-07-22 20:16:55 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
deeed59de0 libbb: introduce and use xrealloc_vector
function                                             old     new   delta
xrealloc_vector_helper                                 -      51     +51
create_list                                           84      99     +15
getopt_main                                          690     695      +5
passwd_main                                         1049    1053      +4
get_cached                                            85      89      +4
msh_main                                            1377    1380      +3
add_match                                             42      41      -1
read_lines                                           720     718      -2
grave                                               1068    1066      -2
fill_match_lines                                     143     141      -2
add_to_dirlist                                        67      65      -2
add_input_file                                        49      47      -2
act                                                  252     250      -2
fsck_main                                           2252    2246      -6
man_main                                             765     757      -8
bb_internal_initgroups                               228     220      -8
cut_main                                            1052    1041     -11
add_edge_to_node                                      55      43     -12
dpkg_main                                           3851    3835     -16
ifupdown_main                                       2202    2178     -24
sort_main                                            838     812     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124)          Total: -42 bytes
2008-07-08 05:14:36 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
d50dda8c35 *: use llist_pop for traverse-and-free list operation
function                                             old     new   delta
append_file_list_to_list                             109     111      +2
udhcpc_main                                         2414    2413      -1
run_parts_main                                       325     324      -1
od_main                                             2324    2323      -1
getopt_main                                          709     707      -2
env_main                                             253     251      -2
sed_main                                             659     656      -3
ps_main                                              522     519      -3
traceroute_main                                     3960    3954      -6
sort_main                                            844     838      -6
diff_main                                            866     858      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33)            Total: -31 bytes
2008-06-15 05:40:56 +00:00