aboutsummaryrefslogtreecommitdiff
path: root/libbb/get_line_from_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Strip trailing CR in xmalloc_fgetlineRon Yorston2012-04-021-0/+4
|
* libbb: split bb_get_chunk_from_file and bb_get_chunk_with_continuationDenys Vlasenko2011-06-171-34/+8
| | | | | | | | | | | | | | | | | | This also moves bb_get_chunk_with_continuation into its sole user, parse_config.c. This allows to optimize both functions separately, they need to be optimized for speed. (this need was highlighted by slow modprobe caused in part by slow bb_get_chunk_with_continuation in config parser). function old new delta bb_get_chunk_from_file 7 130 +123 config_read 457 558 +101 bb_get_chunk_with_continuation 194 - -194 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 2/0 up/down: 224/-194) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* small fixes atop syslog config patchDenys Vlasenko2011-04-161-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anywayDenys Vlasenko2010-06-181-5/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* optimize config_read() (by Timo Teras <timo.teras AT iki.fi>)Denis Vlasenko2008-08-091-7/+23
| | | | | | | | | | | | | function old new delta bb_get_chunk_with_continuation - 176 +176 find_pair 169 187 +18 ... process_stdin 443 433 -10 config_read 549 456 -93 bb_get_chunk_from_file 139 7 -132 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/7 up/down: 215/-254) Total: -39 bytes
* grep: option to use GNU regex matching instead of POSIX one.Denis Vlasenko2008-08-091-1/+42
| | | | | | This fixes problems with NULs in files being scanned, but costs +800 bytes. The same can be done to sed (TODO).
* libbb: document plans to speed up line-based inputDenis Vlasenko2008-07-151-2/+13
|
* libbb: experimental faster string reading routines.Denis Vlasenko2008-07-151-0/+70
|
* libbb: introduce and use xrealloc_vectorDenis Vlasenko2008-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta xrealloc_vector_helper - 51 +51 create_list 84 99 +15 getopt_main 690 695 +5 passwd_main 1049 1053 +4 get_cached 85 89 +4 msh_main 1377 1380 +3 add_match 42 41 -1 read_lines 720 718 -2 grave 1068 1066 -2 fill_match_lines 143 141 -2 add_to_dirlist 67 65 -2 add_input_file 49 47 -2 act 252 250 -2 fsck_main 2252 2246 -6 man_main 765 757 -8 bb_internal_initgroups 228 220 -8 cut_main 1052 1041 -11 add_edge_to_node 55 43 -12 dpkg_main 3851 3835 -16 ifupdown_main 2202 2178 -24 sort_main 838 812 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124) Total: -42 bytes
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-3/+3
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/Denis Vlasenko2008-03-261-1/+1
|
* Fix xmalloc_fgets_str so that it really does NOT strip terminator.Denis Vlasenko2007-12-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | Add xmalloc_fgetline_str which does strip terminator, and use it in dpkg instead of xmalloc_fgets_str. netstat: use xmalloc_fgets_str - allows to eat strings with NULs (this fixes bug with some weird /proc/net/unix input) function old new delta xmalloc_fgets_internal - 191 +191 xmalloc_fgetline_str - 18 +18 do_info 116 120 +4 unix_do_one 451 447 -4 tcp_do_one 423 419 -4 send_tree 369 365 -4 xmalloc_fgets_str 178 15 -163 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175) Total: 38 bytes text data bss dec hex filename 778445 832 7344 786621 c00bd busybox_old 778483 832 7344 786659 c00e3 busybox_unstripped
* style fixes. No code changesDenis Vlasenko2007-04-121-4/+5
|
* sed,get_line_from_file: improve commentsDenis Vlasenko2007-01-171-2/+3
|
* Trailing whitespace removal over entire treeDenis Vlasenko2007-01-111-1/+1
|
* less: somewhat buggy applet, but nice. Muchly reducedDenis Vlasenko2006-12-201-2/+2
| | | | | | | | xstrdup'ing and memory consumption. Made linewrap saner. regex matching code was awful - still buggy, but not as leaky as before. Made buffer size configurable. Killed several static and on-stack buffers. Hopefully eliminated staircase effect on Ctrl-C (unable to reproduce).
* sed: improve handling of NULsDenis Vlasenko2006-12-021-5/+5
|
* passwd: rework:Denis Vlasenko2006-11-301-7/+7
| | | | | | | | | * do not make backup copy by copying (just retain old file) * correctly fall back to /etc/passwd if user is not in shadow * fix bug with overlong passwd entries * be permissive on some kinds of failures * reduce stack usage * code size: -500 bytes
* bb_get_[chomped]line_from_file wasn't descriptive enough.Denis Vlasenko2006-10-121-2/+2
| | | | Renaming...
* cut, mount: small improvementsDenis Vlasenko2006-10-121-0/+1
|
* sed: unbreak multiple -e, -f option handling (my fault)Denis Vlasenko2006-10-011-3/+3
|
* - fix bug #887, in bb_get_chomped_line_from_file(), the last char was removedBernhard Reutner-Fischer2006-06-101-9/+14
| | | | | | unconditionally, even if it was not a newline. This was apparently broken by r14254 - whitespace while at it.
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-2/+2
| | | | definitions. (That should only be on prototypes.)
* A few changes falling out from the effort to make sed handle embedded NUL bytes.Rob Landley2006-02-241-46/+20
| | | | Checking in to reduce the diff between my tree and svn...
* Sort rewrite to be SUSv3 compliant. New config option, updated help, andRob Landley2005-01-241-1/+7
| | | | a couple of infrastructure bits.
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-1/+1
|
* Configuration option to define wether to follows GNU sed's behaviour Glenn L McGrath2003-09-161-2/+1
| | | | | or the posix standard. Put the cleanup code back the way it was.
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+2
|
* Major coreutils update.Manuel Novoa III2003-03-191-16/+32
|
* Treat NUL as the end-of-line.Matt Kraai2001-11-201-1/+1
|
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-7/+2
| | | | -Erik
* Convert utility.c into libbb.a. It is now a whole pile of .cEric Andersen2001-03-161-0/+72
files. Clean up the resulting damage and fix up the makefile. -Erik