Denis Vlasenko
703e20235a
cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
...
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED",
removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22 14:12:08 +00:00
Denis Vlasenko
95fef7071e
move shell/cmdedit.c -> libbb/lineedit.c
2007-01-22 09:03:42 +00:00
Denis Vlasenko
38f6319421
cmdedit is not a 'command' editing anymore, it's just editing (generic),
...
so rename stuff accordingly.
2007-01-22 09:03:07 +00:00
Denis Vlasenko
253ce00296
cmdedit: fix breakage
2007-01-22 08:34:44 +00:00
Denis Vlasenko
b01b4e2a1f
cmdedit.h: remove
2007-01-22 08:17:14 +00:00
Denis Vlasenko
6258fd3454
cmdedit: stop playing dirty games with atexit
2007-01-22 07:30:26 +00:00
Denis Vlasenko
8e1c71529c
Convert cmdedit into more generic line input facility
...
(make history and completion optional at runtime).
Use it for fdisk, as an example.
Some unrelated fixes in fdisk are also here.
2007-01-22 07:21:38 +00:00
Denis Vlasenko
00cdbd8fc2
Introduce FEATURE_EDITING_FANCY_KEYS, so that user can disable
...
less-known keys (e.g. Ctrl-B/E/F)
2007-01-21 19:21:21 +00:00
Denis Vlasenko
5592fac308
cmdedit: more optimizations
2007-01-21 19:19:46 +00:00
Denis Vlasenko
47bdb3ac48
cmdedit: small optimizations
2007-01-21 19:18:59 +00:00
Denis Vlasenko
82b39e83ab
sanitize cmdedit a bit (group functions by task etc)
2007-01-21 19:18:19 +00:00
Denis Vlasenko
2f0c0d0b88
Introduce FEATURE_EXEC_PREFER_APPLETS = "re-execute our own
...
executable if we asked to exec someting with argv[0] == known_applet"
Use it in init. Also respect PATH in init, remove explicit "/sbin" etc
from exec. Patch by Gabriel L. Somlo <somlo@cmu.edu>
2007-01-21 00:41:04 +00:00
Denis Vlasenko
9af7c9d6b6
openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
...
(will close all fd's > 2 on daemonization now)
getty: fix "getty -" support, and also do not try to chown/chmod "-"
telnetd: fix "lost ctty" bug
Yet another attempt on saner function names:
bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2007-01-19 21:19:35 +00:00
Denis Vlasenko
7f0d7ae4f5
fix subtle bug inherited from dash
2007-01-18 01:12:57 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
62a6983a81
execute "safe applets" exev if not standalone shell
...
(patch by "Eric Spakman" <E.Spakman@inter.nl.net>)
2007-01-10 00:24:50 +00:00
Denis Vlasenko
b2abef3e54
stty: fix width of a field for ppc32
...
sort: fix -u to match coreutils 6.3
msh: compile fix (my fault)
2007-01-01 18:18:04 +00:00
Denis Vlasenko
e27f15615f
msh: double "static char line[LINELIM]" etc deleted.
...
massive amounts of assignments-in-ifs deleted
(some of which were VERY nasty)
2007-01-01 06:00:38 +00:00
Mike Frysinger
57ec574af7
* precision requires the argument be an integer, not size_t
2006-12-28 21:41:09 +00:00
Denis Vlasenko
8f27c34c28
ash: is_safe_applet mustn't affect disabled applets
2006-12-26 21:31:11 +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
0ee3999d13
random tiny size savings
2006-12-24 15:23:28 +00:00
Denis Vlasenko
f4dff77355
less: implement waiting for input using select(). Rather tricky business.
...
But we do not read entire input anymore up-front.
2006-12-24 07:14:17 +00:00
Denis Vlasenko
7e46cf748e
#define FEATURE_GETUSERNAME_AND_HOMEDIR should be always #defined
2006-12-23 01:21:55 +00:00
Denis Vlasenko
4cccc03768
remove useless casts (type*) xzalloc(...)
2006-12-22 18:37:07 +00:00
Denis Vlasenko
afc9ff99fd
removal of commented-out cruft
2006-12-22 00:45:27 +00:00
Denis Vlasenko
0a8a774179
cmdedit: reformat code a bit, no algorithm changes
2006-12-21 22:27:10 +00:00
Denis Vlasenko
d56b47f9a6
fix type character mixup in command completion
2006-12-21 22:24:46 +00:00
Denis Vlasenko
bf66fbc8e2
introduce LONE_CHAR (optimized strcmp with one-char string)
2006-12-21 13:23:14 +00:00
Denis Vlasenko
f58906b646
cmdedit: fix my bug, improve code a bit
2006-12-19 19:30:37 +00:00
Denis Vlasenko
7f1dc21a5d
cmdedit: use qsort for sorting command completion results; style fixes
2006-12-19 01:10:25 +00:00
Denis Vlasenko
15b213ef5a
su: make /etc/shells check configurable
...
ash: missing ';'
2006-12-19 00:20:20 +00:00
Denis Vlasenko
7cfecc4b36
xfuncs.c: dietlibc actually HAS fdprintf!
...
platform.h: define strchrnul for dietlibc
ash: stop using few non-standard functions
2006-12-18 22:32:45 +00:00
Denis Vlasenko
83e5d6f772
A bunch of defined(__GLIBC__) added. static-linking warning expanded
2006-12-18 21:49:06 +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
097c324f59
fix remaining survivors of the return(a) cleanup
2006-11-27 16:59:15 +00:00
Denis Vlasenko
d9e15f2068
style cleanup: return(a) -> return a, part 2
2006-11-27 16:49:55 +00:00
Denis Vlasenko
079f8afa0a
style cleanup: return(a) -> return a, part 1
2006-11-27 16:49:31 +00:00
Denis Vlasenko
d398ecab9d
hunt down improper include <>, make mkswap output 4Gb+ friendly
2006-11-24 15:38:03 +00:00
Denis Vlasenko
fcdb00f735
httpd: LC_TIME locale _must_ be POSIX to httpd! We speak over the net!
2006-11-21 00:09:37 +00:00
Denis Vlasenko
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
a7189f01a4
add -Wundef, fix uncovered bugs
2006-11-17 20:29:00 +00:00
Mike Frysinger
3672fe9e91
remove duplicate flag decls
2006-11-15 21:52:10 +00:00
Denis Vlasenko
9d4533ede1
Fix kbuild bugs noticed by Bernhard Fischer <rep.nop@aon.at>
2006-11-02 22:09:37 +00:00
Denis Vlasenko
966ec7c067
#if CONFIG_xxx -> #if ENABLE_xxx
2006-11-01 09:13:26 +00:00
Denis Vlasenko
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +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