aboutsummaryrefslogtreecommitdiff
path: root/coreutils/head.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* head: report file open errors with exitcode 1 (was happily returning 0)Denis Vlasenko2008-11-111-4/+4
| | | | | head_main 409 417 +8
* *: shrink by using [f]open_or_warn_stdin where appropriateDenis Vlasenko2008-03-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta lsattr_main 62 143 +81 open_or_warn_stdin - 36 +36 fclose_if_not_stdin 20 47 +27 xfopen_stdin - 20 +20 tac_main 336 356 +20 cksum_main 249 259 +10 bb_argv_dash - 8 +8 su_main 448 455 +7 cmp_main 630 633 +3 passwd_main 1072 1074 +2 uudecode_main 317 315 -2 text_yank 110 108 -2 handle_incoming_and_exit 2653 2651 -2 flags 5 1 -4 write_leases 235 230 -5 fopen_or_warn_stdin 48 42 -6 fold_main 648 642 -6 static.argv_dash 8 - -8 sum_main 142 128 -14 tail_main 1237 1221 -16 sed_main 711 695 -16 cmp_xfopen_input 17 - -17 bb_cat 113 96 -17 catv_main 328 306 -22 strings_main 457 434 -23 hash_file 298 274 -24 sum_file 353 325 -28 sort_main 904 859 -45 expand_main 736 686 -50 cut_main 1116 1065 -51 md5_sha1_sum_main 549 493 -56 lsattr_args 90 - -90 read_stduu 408 255 -153 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 7/20 up/down: 214/-657) Total: -443 bytes text data bss dec hex filename 797417 658 7428 805503 c4a7f busybox_old 796973 658 7428 805059 c48c3 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-1/+1
| | | | | 263 bytes saved.
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-2/+2
| | | | | | | | | 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
* multiplier suffixes are short, store them directly in struct suffix_multDenis Vlasenko2007-07-271-1/+1
| | | | | | | | | | | | 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
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #1Denis Vlasenko2007-01-291-1/+1
|
* convert "negaite" config option into reversed (INCLUDE_SUSv2)Denis Vlasenko2006-12-221-3/+3
|
* Provide our own isdigit macro. saves more than 400 bytes.Denis Vlasenko2006-11-271-3/+2
|
* rename functions to more understandable namesDenis Vlasenko2006-10-261-2/+2
|
* remove bb_printf and the likeDenis Vlasenko2006-10-261-4/+5
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-19/+17
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-1/+1
| | | | | | | | 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.
* silly switch style fixDenis Vlasenko2006-09-271-1/+1
|
* whitespace cleanupDenis Vlasenko2006-09-171-3/+3
|
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-6/+1
| | | | | | | | | | 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.)
* support GNU suffixes for fancy mode: b(512), k(1024) and m(1024*1024)"Vladimir N. Oleynik"2006-01-301-0/+16
|
* Move SUSv2 obsolete feature disabling to debug menu, invert meaning ofRob Landley2006-01-301-16/+3
| | | | | | | | symbol (switched on to remove now: test your apps to make sure they _don't_ do this, because as some point we should just yank it), fixup head/tail/fold. Also tweak "make allyesconfig" so anything starting with CONFIG_DEBUG gets left switched off. Possibly other things we want to put in the debug menu?
* - Stephane Billiart writes:Bernhard Reutner-Fischer2005-12-151-1/+1
| | | | | | Fix the compilation of head and tail. thanks!
* - wrap label GET_COUNT in #if ENABLE_FEATURE_FANCY_applet to avoid warningBernhard Reutner-Fischer2005-12-131-5/+7
| | | | about unused label.
* Add build options to control SuS compatability, allows numeric Glenn L McGrath2005-12-111-0/+3
| | | | | option handling to be disabled. Defaults to enabled, so no changes in default behaviour
* Major coreutils update.Manuel Novoa III2003-03-191-59/+95
|
* Added include for isdigit(); simplified -<num> detectionRobert Griebl2002-05-271-1/+2
|
* SUpport old style -[::digit::] options for head and tailRobert Griebl2002-05-171-1/+6
| | | | Also make head behave like GNU head (-0/-n 0 is valid)
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-3/+2
| | | | -Erik
* Use ferror(3) to check for errors, rather than inspecting errno. Thanks toMatt Kraai2001-08-061-3/+1
| | | | David Douthitt for reporting, and shame on me for writing such crappy code.
* A cleanup patch from Jeff Garzik to static-ify a number ofEric Andersen2001-03-091-1/+1
| | | | namespace polluting things that really should be static.
* Patchs from Jeff Garzik <jgarzik@mandrakesoft.com> to cleanupEric Andersen2001-03-091-0/+1
| | | | | warnings with glibc 2.2 and use always use xfopen -Erik
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-1/+1
| | | | | | 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
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-1/+1
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Fix up copyright msgs. Bump version to 0.49 in preparation for0_49Eric Andersen2001-01-271-1/+1
| | | | | a release. Update the website with release details. -Erik
* Fix header file usage -- there were many unnecessary header files included inEric Andersen2001-01-271-0/+2
| | | | | | | 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
* Eliminate calls of the form "fprintf(stdout,". Thanks for the idea toMatt Kraai2001-01-181-2/+2
| | | | Vladimir N. Oleynik.
* Change calls to error_msg.* and strerror to use perror_msg.*.Matt Kraai2000-12-181-1/+1
|
* Changed names of functions in utility.c and all affected files, to makeMark Whitley2000-12-071-1/+1
| | | | compliant with the style guide. Everybody rebuild your tags file!
* Rewrote head to perservere when it can't open a file, and share codeMatt Kraai2000-09-271-50/+43
| | | | with cat.
* Renamed "internal.h" to the more sensible "busybox.h".Eric Andersen2000-09-251-2/+2
| | | | -Erik
* Extract usage information into a separate file.Matt Kraai2000-07-161-12/+1
|
* Use errorMsg rather than fprintf.Matt Kraai2000-07-141-4/+3
|
* Updates to a number of apps to remove warnings/compile errors under libc5.Eric Andersen2000-06-191-2/+2
| | | | | Tested under both libc5 and libc6 and all seems well with these fixes. -Erik
* Lots of updates. Finished implementing BB_FEATURE_TRIVIAL_HELPErik Andersen2000-05-121-4/+7
| | | | | | | | which lets you compile out most of the "--help" output, saving up to 17k. Renamed mnc to nc. -Erik
* Upates to include copyright 2000 to everythingErik Andersen2000-04-131-2/+2
| | | | -Erik
* Some formatting updates (ran the code through indent)Erik Andersen2000-02-081-65/+69
| | | | -Erik
* A few minor updates. ;-)Erik Andersen2000-02-071-1/+1
| | | | | | Seriously though, read the Changelog for busybox 0.42, which this is about to become... -Erik
* Some busybox updates. See the changelog for details if you care.Erik Andersen2000-01-251-2/+2
| | | | -Erik
* * added (and documented) "-n" option for head -Erik Andersen2000-01-231-13/+15
| | | | | | | contributed Friedrich Vedder <fwv@myrtle.lahn.de> * Cleanup for a number of usage messages -- also contributed Friedrich Vedder <fwv@myrtle.lahn.de> -Erik
* Make head --version do the right thing. Update TODO listErik Andersen1999-12-171-2/+1
| | | | -Erik
* fixed an embarrasing segfault (head w/ no argsJohn Beppu1999-12-151-2/+3
| | | | used to die (but now it lives))