Denis Vlasenko
5b34083004
several *.c files:
...
move 'extern environ' up to the location of #includes
2007-05-17 23:02:14 +00:00
Denis Vlasenko
cd5c7866e3
vi: remove two globals
...
awk: some 'lineno' vars were shorts, made them ints (code got smaller)
awk: rename global t to global ttt. still an awful name, but at least
you can grep for it now.
function old new delta
ttt - 28 +28
mysleep 104 120 +16
readit 408 418 +10
lineno 2 4 +2
parse_program 338 339 +1
evaluate 6446 6445 -1
syntax_error 25 23 -2
next_token 917 915 -2
new_node 26 24 -2
tv 16 8 -8
skip_spaces 68 53 -15
t 28 - -28
rfds 128 - -128
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 4/6 up/down: 57/-186) Total: -129 bytes
2007-05-17 16:37:22 +00:00
Denis Vlasenko
389f9d52d5
awk: don't segfault on printf(%*s). Close 1337.
2007-05-09 21:57:23 +00:00
Denis Vlasenko
f71d916b60
awk: guard against empty environment
2007-05-03 22:57:56 +00:00
Denis Vlasenko
945bd3dee8
sed: fix escaped newlines in -f; fix multiple -f and -e
...
(broke when getopt32 was fixed to not reverse the list)
2007-04-12 21:20:25 +00:00
Denis Vlasenko
51742f4bb0
style fixes. No code changes
2007-04-12 00:32:05 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Denis Vlasenko
8d9f495d68
getopt32: fix llist_t options ordering. llist_rev is not unused.
...
function old new delta
tar_main 705 695 -10
sort_main 928 918 -10
decode_format_string 886 876 -10
run_parts_main 197 185 -12
ps_main 513 500 -13
wget_main 2764 2750 -14
awk_main 1014 1000 -14
od_main 2886 2866 -20
llist_rev 25 - -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
2007-04-08 15:08:42 +00:00
Denis Vlasenko
1bb552b1d9
libbb: add xunlink()
...
patch: do not try to delete same file twice
2007-04-05 21:25:15 +00:00
Denis Vlasenko
ba2fb719b9
Copyright, help text, whitespace cleanups
2007-04-01 09:39:03 +00:00
Denis Vlasenko
17a1526f9e
sed: a communal variable managed to slip past 'size'
...
('size' happily displays 0 bytes in data and bss,
but in reality sed.o used 180 bytes of it). Oh well.
function old new delta
pipe_putc 67 76 +9
sed_main 627 633 +6
get_next_line 161 166 +5
bbg 180 - -180
(add/remove: 0/1 grow/shrink: 3/0 up/down: 20/-180) Total: -160 bytes
sed: also make sed -i failure message less cryptic
2007-03-26 20:48:46 +00:00
Denis Vlasenko
55f30b05ac
inetd,ed,msh: data/bss reduction (in mss, more than 9k of it)
2007-03-24 22:42:29 +00:00
Denis Vlasenko
219d14d514
random style fixes (extra spaces deleted)
2007-03-24 15:40:16 +00:00
Denis Vlasenko
58875aefe4
assorted fixes uncovered by randomconfig runs
2007-03-22 22:22:10 +00:00
Denis Vlasenko
2a51af2579
vi: fix signed char-induced potential bugs
2007-03-21 22:31:24 +00:00
Denis Vlasenko
afa37cf508
vi: remove Byte typedef and massive amount of casts.
...
also optimize many strlen() calls.
if (strlen(buf) <= 0) goto vc1 - ??!!
2007-03-21 00:05:35 +00:00
Denis Vlasenko
f9234135f8
vi: support $EXINIT and -c
2007-03-21 00:03:42 +00:00
Denis Vlasenko
4b0bb9e0fd
sed: fix very obscure case of escaped newline in sed command
...
(needed for uclibc build, btw). Add testcase for it.
2007-03-16 23:36:58 +00:00
Denis Vlasenko
baca175912
kill superfluous returns at the end of void functions
2007-03-11 13:43:10 +00:00
Denis Vlasenko
be644a81e9
awk: support multiple -v options
2007-03-10 17:22:14 +00:00
Denis Vlasenko
8e858e2700
clean up accumulated whitespace damage
2007-03-07 09:35:43 +00:00
Denis Vlasenko
629563b5d7
awk: fix memory leak (can affect large file processing)
2007-02-24 17:05:52 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
34c4e5f0b3
silly space saving in sed
2007-01-30 22:25:16 +00:00
Denis Vlasenko
54767db8c7
micro optimization
2007-01-30 01:11:36 +00:00
Denis Vlasenko
9356b5022c
preparatory patch for -Wwrite-strings #7 : sed
...
remaining: shell (rather scary mess in msh.c)
2007-01-29 23:44:38 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
a41fdf331a
preparatory patch for -Wwrite-strings #1
2007-01-29 22:51:00 +00:00
Denis Vlasenko
86811803e3
add to testsuite and fix yet another sed corner case
2007-01-29 17:10:19 +00:00
Denis Vlasenko
c562bb7487
disable -Wold-style-definition for gcc 3.x
2007-01-29 17:08:51 +00:00
Denis Vlasenko
fe7a9f1277
sed: fix 2 bugs (one testsuite entry + one newly found)
...
but more importantly make code more understandable
2007-01-29 14:31:47 +00:00
Denis Vlasenko
826c85f382
fix all known regressions with sed and also make it simpler
2007-01-28 23:26:15 +00:00
Denis Vlasenko
4ebaf10742
strdup -> xstrdup
...
sed: de-obfuscate piece of code
2007-01-19 21:33:19 +00:00
Denis Vlasenko
ef44d9d9f2
sed,get_line_from_file: improve comments
2007-01-17 23:16:16 +00:00
Denis Vlasenko
150f402b36
whitespace fixes (leading spaces to tab)
2007-01-13 21:06:21 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
e1d3e034a9
awk: style fixes
2007-01-01 23:53:52 +00:00
Denis Vlasenko
6dc6ebbf44
awk: undo locale setting for numbers - or else parsing
...
can act quite mysteriously
date: add if(ENABLE_LOCALE_SUPPORT)
2007-01-01 23:53:12 +00:00
Denis Vlasenko
f782f52c8c
awk: style cleanup. A lot of rw data moved to ro
...
(still has quite a lot of statics etc...).
getopt32-ification.
2007-01-01 23:51:30 +00:00
Denis Vlasenko
6a5dc5d75a
next bunch of fixes for bugs found by randconfig
2006-12-30 18:42:29 +00:00
Denis Vlasenko
666da5e2c6
merge post-1.3.0 fixes
2006-12-26 18:17:42 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
4cccc03768
remove useless casts (type*) xzalloc(...)
2006-12-22 18:37:07 +00:00
Denis Vlasenko
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
Denis Vlasenko
249fabf1a3
Add option to disable command execution from vi & awk
2006-12-19 00:29:22 +00:00
Denis Vlasenko
0a10da29a7
diff: comment - explain what happens when hunk fails to apply
2006-12-17 00:49:56 +00:00
Denis Vlasenko
f7583d89b0
patch: fix double-free (bug 1120)
2006-12-17 00:33:29 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
2ea630f9a5
bb_makedev: fix for glibc 2.3.2
...
sed: fix C++ style declaration
2006-12-10 02:52:19 +00:00
Denis Vlasenko
2f8f71b20d
sed: style fixes
2006-12-10 02:09:12 +00:00