Denys Vlasenko
800ff7cc75
stty: code shrink -44 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 15:00:17 +01:00
Denys Vlasenko
9f5a577a32
stty: fix columns command. closes bug 791.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 14:17:02 +01:00
Denys Vlasenko
e992bae6f9
*: remove a few more cases of argc usage. -89 bytes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-28 15:18:53 +01:00
Denys Vlasenko
ab19ede655
tidy up O_NONBLOCK usage. use libbb functions in stty.
...
Added O_RDONLY where improves readability. Note: O_RDONLY == 0,
so it is there even if not specified.
function old new delta
stty_main 1289 1235 -54
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-11 21:05:42 +01:00
Bernhard Reutner-Fischer
a48308701a
add and use xopen_nonblocking (-18b)
...
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 17:17:34 +01:00
Denys Vlasenko
043b1e5d99
more C standard compat fixes from Dan Fandrich
...
function old new delta
docolon 207 204 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 12:47:55 +02:00
Denys Vlasenko
da49f58524
move libc related stuff out of platform.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-08 02:58:38 +02:00
Denys Vlasenko
9b1b62adc4
Patches to enable FreeBSD build
...
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.
Code seems to not be affected in my testing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 03:34:12 +02:00
Denis Vlasenko
c7cc5a9432
mdev: Rob's #if forest removal
...
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
7049ff8696
whitespace fixes. no code changes
2008-06-25 09:53:17 +00:00
Denis Vlasenko
77ad97f199
more -Wall warning fixes from Cristian Ionescu-Idbohrn.
...
This time it resulted in small code changes:
function old new delta
nexpr 820 828 +8
tail_main 1200 1202 +2
wrapf 166 167 +1
parse_mount_options 227 209 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
2008-05-13 02:27:31 +00:00
Denis Vlasenko
da42bd5bbe
stty: fix mishandling of 'control' keywords (Ralf Friedl <Ralf.Friedl@online.de>)
2008-01-27 23:24:31 +00:00
Denis Vlasenko
dd8bbfd084
stty: reorganize data tables - save 0.5k
...
function old new delta
mode_name - 496 +496
control_name - 91 +91
stty_main 1235 1255 +20
find_mode 45 63 +18
find_control 45 63 +18
do_display 482 493 +11
wrapf 165 166 +1
set_mode 761 759 -2
max_col 4 - -4
device_name 4 - -4
control_info 153 34 -119
mode_info 1700 680 -1020
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 5/3 up/down: 655/-1149) Total: -494 bytes
text data bss dec hex filename
777037 937 9100 787074 c0282 busybox_old
776551 929 9100 786580 c0094 busybox_unstripped
2007-11-24 04:32:49 +00:00
Denis Vlasenko
2a587df80a
stty: mark variable as static
2007-11-18 11:47:25 +00:00
Denis Vlasenko
2ea8c40e8f
stty: incorporate strings into struct instead of keeping pointers there.
...
static:
text data bss dec hex filename
767535 974 9420 777929 bdec9 busybox_old
767403 974 9420 777797 bde45 busybox_unstripped
dynamic -fpic:
text data bss dec hex filename
718954 14030 12032 745016 b5e38 busybox_old
720278 12534 12032 744844 b5d8c busybox_unstripped
2007-10-11 16:02:36 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
4daad9004d
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
2007-09-27 10:20:47 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
f868963c67
multiplier suffixes are short, store them directly in struct suffix_mult
...
function old new delta
xstrtoul_range_sfx 226 217 -9
xstrtoull_range_sfx 291 280 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-20) Total: -20 bytes
text data bss dec hex filename
669128 2668 13616 685412 a7564 busybox_old
669108 2668 13616 685392 a7550 busybox_unstripped
2007-07-27 15:06:25 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
80b8b39899
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
2007-06-25 10:55:35 +00:00
Denis Vlasenko
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +00:00
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
9ace613406
stty: fix option parsing bug (spotted by Sascha Hauer <s.hauer@pengutronix.de>)
2007-04-19 19:55:54 +00:00
Denis Vlasenko
ff131b980d
style fixes. No code changes.
2007-04-10 15:42:06 +00:00
Denis Vlasenko
240a1cfbbe
add some missed statics on constant objects.
...
fix few #ifndef ENABLE_xxx
# size busybox_old busybox_unstripped
text data bss dec hex filename
677152 2920 18208 698280 aa7a8 busybox_old
676420 2920 18208 697548 aa4cc busybox_unstripped
2007-04-08 16:07:02 +00:00
Bernhard Reutner-Fischer
3a60244ae9
- remove some bss users.
...
text data bss dec hex filename
6220 8 14 6242 1862 stty.o.oorig
6219 8 0 6227 1853 stty.o
2007-04-04 13:59:49 +00:00
Bernhard Reutner-Fischer
cbd6e65744
- fix buglet introduced in r17351 in find_param(). Closes #1193
2007-02-04 11:13:57 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Bernhard Reutner-Fischer
1a250d9f32
- reinstate paranoia check in wrapf().
2007-01-18 08:41:22 +00:00
Denis Vlasenko
41aaefce71
stop using global variable needlessly
2007-01-18 00:53:35 +00:00
Bernhard Reutner-Fischer
79cc55975f
- remove superfluous define that expanded to "!strcmp"
...
- remove some dead code
2007-01-17 19:46:46 +00:00
Bernhard Reutner-Fischer
8eb0549e5d
- reuse return code of vsnprintf to avoid pulling in strlen
2007-01-17 19:46:33 +00:00
Bernhard Reutner-Fischer
94feb1c807
- merge display_changed() and display_all()
...
This one is a bit risky but did work for me in cursory testing..
2007-01-17 19:46:12 +00:00
Bernhard Reutner-Fischer
d4a745c3d4
- peruse get_terminal_width_height and remove legacy code for ancient
...
slowaris versions.
2007-01-17 19:45:36 +00:00
Bernhard Reutner-Fischer
a6e31ad834
- rewrite find_param to use index_in_str_array
2007-01-17 19:45:14 +00:00
Bernhard Reutner-Fischer
4950f010f3
- manually inline tty_value_to_baud and remove string_to_baud_or_die
...
(cleanup)
2007-01-17 19:44:59 +00:00
Bernhard Reutner-Fischer
21fc740023
- constify some read-only members and remove superfluous casts
...
(cleanup)
2007-01-17 19:44:24 +00:00
Bernhard Reutner-Fischer
4fa566d4ad
- reuse option_mask32 for state-handling in main
...
- improve check for errors from fcntl
2007-01-17 19:42:30 +00:00
Denis Vlasenko
21b080daa8
stty: fix bug reported by Paul Albrecht <albrecht@rdi1.com> -
...
stty -echo didn't work. Introduced by me :(
2007-01-12 21:03:07 +00:00
Denis Vlasenko
f8abc100cc
stty: rearrange functions, avoiding the need in forward declarations.
...
No other code chages.
2007-01-12 21:02:04 +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
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
a959588b80
Yet another silly little byte saving. couldn't -> cannot
2006-09-29 21:30:43 +00:00
Denis Vlasenko
79deb66c35
stty: fix few bugs found in testing
2006-09-19 15:12:12 +00:00
Denis Vlasenko
debaf2fe02
stty: reorder code, reducing need in forward declarations.
...
added few missed bits of error checking for parameters.
2006-09-19 14:31:44 +00:00
Denis Vlasenko
20b253d2d8
stty: convert "enum mode_type" into unnamed enum
...
(reduces code obfuscation); deindent set_mode;
add _or_die suffixes to few functions
2006-09-19 14:24:23 +00:00
Denis Vlasenko
8971cdaeca
stty: reduce #ifdef forest
2006-09-19 14:20:22 +00:00