Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
d9b5ab868c
awk: fix a trivial bug introduced by me.
...
This is how it goes. I break stuff by doing useless 'cleanups',
people fix the fallout. :(. Thanks rockeychu!
2007-05-18 07:30:43 +00:00
Denis Vlasenko
ffba941d29
awk: make code a bit less obfuscated
2007-05-17 23:03:35 +00:00
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
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
be644a81e9
awk: support multiple -v options
2007-03-10 17:22:14 +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
a41fdf331a
preparatory patch for -Wwrite-strings #1
2007-01-29 22:51:00 +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
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
b54b208d90
Fix largefile breakage; advance version to 1.2.2
2006-10-27 09:05:40 +00:00
Denis Vlasenko
d18a3a20db
use skip_whitespace where appropriate
2006-10-25 12:46:03 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
890ac9deb2
awk: && -> & in "n->info && OPCLSMASK" - fixes bug 1067
2006-10-07 15:16:19 +00:00
Denis Vlasenko
67b23e6043
getopt_ulflags -> getopt32.
...
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
9275814a9e
lots of silly indent fixes
2006-10-03 19:56:34 +00:00
Denis Vlasenko
e175ff252f
several fixes from openWRT project
2006-09-26 17:41:00 +00:00
Denis Vlasenko
099efbf99e
awk: getopt_ulflags'isation
2006-09-22 09:02:30 +00:00
Denis Vlasenko
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +00:00
Rob Landley
88621d7398
Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damage
...
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan
to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-29 19:41:06 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
"Robert P. J. Day"
68229837ff
Remove all usage of the "register" storage class specifier.
2006-07-01 13:08:46 +00:00
Rob Landley
9ffd42317b
Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary
...
memset, collate variable declarations...
2006-05-21 18:30:35 +00:00
Bernhard Reutner-Fischer
a2a647dfc1
- include strings.h
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Rob Landley
a389651115
Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
...
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Mike Frysinger
4b7b8a58a1
touchup comment
2006-04-16 05:55:15 +00:00
Rob Landley
bc68cd14cc
Patch from Denis Vlasenko turning static const int (which gets emitted into
...
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Rob Landley
46e351d478
Patch from awk maintainer (Dmitry Zakhrov) to fix bugs 642, 663, and 667.
2006-02-14 16:05:32 +00:00
Bernhard Reutner-Fischer
86f5c9906b
- add platform.h.
...
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Rob Landley
5184336647
Bug 112, return value of awk should be /256. In reality, we should probably
...
be using WEXITSTATUS(), but until I can figure out why the heck that would
want to do (*(int *) &(status)) on the value, I'm happy just fixing the bug we
actually see.
2006-01-09 05:26:58 +00:00
"Vladimir N. Oleynik"
5cf9a03b3f
more const, attribute_noreturn saved 200 bytes
2005-10-19 09:21:51 +00:00
Bernhard Reutner-Fischer
bb20462cb3
- consume space between functionname and opening brackets
...
Fixes Rob's issue using busybox awk for building gcc-4_0 optionlist (http://busybox.net/lists/busybox/2005-October/016659.html )
2005-10-17 14:21:06 +00:00
Mike Frysinger
f87b3e30a7
as pointed out in Bug 17, use uint32_t instead of unsigned long since the code expects the size of the info variables to be 32bits and sizeof(long) on 64bit hosts is not 32bits
2005-09-27 04:16:22 +00:00
Mike Frysinger
de2b93859c
eat misappropriated whitespace
2005-09-27 03:18:00 +00:00
Mike Frysinger
10a11e23ba
uncuddle function scope brackets
2005-09-27 02:23:02 +00:00
"Vladimir N. Oleynik"
23f62fc6f3
split libbb: moved xregcomp separatelly for speed up recompile
2005-09-14 16:59:11 +00:00