Commit Graph

62 Commits

Author SHA1 Message Date
Denys Vlasenko
b097a84d62 config: update size information
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-28 03:20:17 +01:00
Denys Vlasenko
72089cf6b4 config: deindent all help texts
Those two spaces after tab have no effect, and always a nuisance when editing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21 09:50:55 +02:00
Denys Vlasenko
4eed2c6c50 Update menuconfig items with approximate applet sizes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18 22:01:24 +02:00
Jody Bruchon
19578b4edf Add help text for 'uniq -i'
Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-05 18:51:27 +02:00
Jody Bruchon
8808f7fc2e uniq: add -i option to ignore case
Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-03-30 18:15:54 +02:00
Denys Vlasenko
af3f420116 Convert all coreutils/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23 14:46:56 +01:00
Denys Vlasenko
237bedd499 getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LIST
In many cases, this aqllows to drop use of opt_complementary.
Approximately -400 bytes:

function                                             old     new   delta
getopt32                                            1423    1502     +79
opt_string                                            17      18      +1
OPT_STR                                               24      25      +1
uniq_main                                            416     406     -10
timeout_main                                         279     269     -10
sulogin_main                                         270     260     -10
readprofile_main                                    1825    1815     -10
ps_main                                              543     533     -10
pidof_main                                           245     235     -10
pgrep_main                                           611     601     -10
od_main                                             2600    2590     -10
mkfs_minix_main                                     2684    2674     -10
mkfs_ext2_main                                      2603    2593     -10
microcom_main                                        712     702     -10
makemime_main                                        315     305     -10
ionice_main                                          282     272     -10
inetd_main                                          2074    2064     -10
ifplugd_main                                        1144    1134     -10
halt_main                                            353     343     -10
getopt_main                                          636     626     -10
fdisk_main                                          2854    2844     -10
env_main                                             206     196     -10
dmesg_main                                           319     309     -10
conspy_main                                         1214    1204     -10
awk_main                                             981     971     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220)         Total: -139 bytes
   text	   data	    bss	    dec	    hex	filename
 919373	    906	  14060	 934339	  e41c3	busybox_old
 918969	    906	  14060	 933935	  e402f	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-06 21:58:02 +02:00
Denys Vlasenko
d60752f8c9 build system: -fno-builtin-printf
Benefits are: drops reference to out-of-line putchar(), fixes a few cases
of failed string merge.

function                                             old     new   delta
i2cdump_main                                        1488    1502     +14
sha256_process_block64                               423     433     +10
sendmail_main                                       1183    1185      +2
list_table                                          1114    1116      +2
i2cdetect_main                                      1235    1237      +2
fdisk_main                                          2852    2854      +2
builtin_type                                         119     121      +2
unicode_conv_to_printable2                           325     324      -1
scan_recursive                                       380     378      -2
mkfs_minix_main                                     2687    2684      -3
buffer_fill_and_print                                178     169      -9
putchar                                              152       -    -152
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 7/4 up/down: 34/-167)          Total: -133 bytes
   text    data     bss     dec     hex filename
 937788     932   17676  956396   e97ec busybox_old
 937564     932   17676  956172   e970c busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-07 22:42:45 +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
Pere Orga
34425389e0 move help text from include/usage.src.h to coreutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31 14:43:25 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
c05387d5de *: replace xopen3 with xopen where makes sense
function                                             old     new   delta
uniq_main                                            421     416      -5
sort_main                                            803     798      -5
patch_main                                          2051    2046      -5
cpio_main                                            547     542      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 02:38:27 +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
44f174e61b uniq: shave off whole 10 bytes off, oh my
text    data     bss     dec     hex filename
 823673     458    6956  831087   cae6f busybox_old
 823663     458    6956  831077   cae65 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-31 05:15:21 +02:00
Denys Vlasenko
1249dbb2c7 uniq: code shrink
function                                             old     new   delta
xgetoptfile_uniq_s                                    44      51      +7
uniq_main                                            389     368     -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-21)             Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:35:06 +02:00
Denys Vlasenko
a9c9bf5055 uniq: plug memory leak (patch from OpenWRT project)
function                                             old     new   delta
uniq_main                                            371     389     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:34:09 +02:00
Denys Vlasenko
0aec9ff6b8 uniq: rename some variables. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:32:45 +02:00
Denis Vlasenko
1a6adbd71b uniq: strncmp(a,b, -1) might be problematic, use INT_MAX instead 2009-03-09 16:43:28 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
96b99b860c uniq: support -w. closes bug 3094.
function                                             old     new   delta
packed_usage                                       24136   24132      -4
uniq_main                                            399     384     -15
2008-05-03 07:21:27 +00:00
Denis Vlasenko
8ee649a02e *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/ 2008-03-26 20:04:27 +00:00
Denis Vlasenko
68404f13d4 *: add -Wunused-parameter; fix resulting breakage
function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped
2008-03-17 09:00:54 +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
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +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
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Bernhard Reutner-Fischer
de17ece1db - use skip_non_whitespace() where appropriate 2007-04-10 09:38:35 +00:00
Denis Vlasenko
4caa09a782 uniq: getopt32-ization. -38 bytes. 2007-03-31 10:19:11 +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
f0ed376eda remove bb_printf and the like 2006-10-26 23:21:47 +00:00
Denis Vlasenko
2d5ca60bfb bb_get_[chomped]line_from_file wasn't descriptive enough.
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +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
Rob Landley
ea224be6aa skip_whitespace() shouldn't claim its return value is const, it doesn't know
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +00:00
Bernhard Reutner-Fischer
ab1878245c * uniq.c: remove unneeded include and use short boilerplate.
* coreutils.h: remove prototype of non-existing xgetoptfile_sort_uniq
	and add boilerplate.
	* networking/{ipaddr,ip,iplink,iproute,iptunnel}.c: touch includes
	and use short boilerplate.
	* libiproute/iproute.c: rename round to avoid clashes with older
	SuSE gcc and use short boilerplate.
2005-10-26 10:47:26 +00:00
Manuel Novoa III
84b93f7ef1 Get rid of warnings, remove compat with older gnu uniq to truly conform to susv3, and cut size a bit. 2005-09-15 08:06:42 +00:00
Manuel Novoa III
415f6c9628 Rob, I don't know why you feel some unexplainable compulsion to get rid of
a meaningless warning.  But I do expect you preserve the coding style
and variable names when all you're doing is tweaking some of my code.

I repeat... do NOT change whitespace, variable names, or coding style in
any of my code simply to conform to your coding style.
2005-09-08 06:02:49 +00:00
Rob Landley
14efdc58ce Don't comment warnings. Don't put #warnings about warnings. _FIX_ warnings.
This fixes the warning, and makes the binary smaller out of sheer pique.
(Yes, since Manuel did this one it's nice tight code that took several
attempts to shrink, but I was ticked.)

Add the start of a test for uniq; this is about the first 1/3 of the
tests we need for full susv3 coverage of uniq.
2005-09-07 04:18:36 +00:00
Rob Landley
1283a150ae Whitespace-level changes. Replace s0,s1,e0,e1 with real variable names and
clean up whitespace and curly brackets a bit.  Resulting binary should be
identical.
2005-09-06 01:57:11 +00:00
Mike Frysinger
0d3ca7289e tell people to ignore the dups/e0 warnings 2005-07-30 08:59:38 +00:00
Eric Andersen
b225e2a76b Fixup some warnings 2004-08-28 00:43:07 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
8ec10a9483 Fix up copyright msgs. Bump version to 0.49 in preparation for
a release.  Update the website with release details.
 -Erik
2001-01-27 09:33:39 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
5b5db38a7d Patch from Matt Kraai to implement uniq -[cdu] 2000-12-09 16:37:53 +00:00
Matt Kraai
e0bcce09ba Rewrote uniq to be less than a third of the size, and fixed some other
minor problems.
2000-09-27 02:29:39 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Matt Kraai
bf181b9338 Extract usage information into a separate file. 2000-07-16 20:57:15 +00:00