aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* crc32: cleanups, no code changesDenys Vlasenko2010-10-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use common crc32 routineDenys Vlasenko2010-10-271-0/+24
| | | | | | | | | | | | | | | | | | function old new delta crc32_block_endian1 - 37 +37 crc32_block_endian0 - 34 +34 global_crc32_table - 8 +8 file_read 82 87 +5 gzip_main 211 214 +3 xz_crc32 40 35 -5 crc32_table 8 - -8 calculate_gunzip_crc 54 34 -20 lzo_crc32 54 25 -29 cksum_main 298 211 -87 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149) Total: -62 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb/process_escape_sequence.c: fix recently broken handling of \\Denys Vlasenko2010-10-251-4/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* powertop: new appletMarek Polacek2010-10-251-0/+11
| | | | | Signed-off-by: Marek Polacek <mmpolacek@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: initial stab at GPT partition supportKevin Cernekee2010-10-251-2/+2
| | | | | Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha1: small tweak for clearer code, no logic changesDenys Vlasenko2010-10-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha1: use Rob's code, it's smaller and fasterDenys Vlasenko2010-10-241-54/+51
| | | | | | | | | | function old new delta static.rconsts - 16 +16 sha1_process_block64 460 298 -162 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 16/-162) Total: -146 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: fix breakage in last commitDenys Vlasenko2010-10-241-23/+23
| | | | | | | | | | | | | | | While at it, made bb_process_escape_sequence faster (same size) function old new delta nextchar 49 53 +4 bb_process_escape_sequence 138 140 +2 next_token 838 839 +1 static.charmap 20 18 -2 is_assignment 143 135 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 7/-10) Total: -3 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use strcpy_and_process_escape_sequencesDenys Vlasenko2010-10-232-27/+31
| | | | | | | | | | | | function old new delta strcpy_and_process_escape_sequences - 50 +50 bb_process_escape_sequence 148 138 -10 printf_main 789 776 -13 getty_main 1897 1831 -66 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use xmkstemp. -65 bytes.Alexander Shishkin2010-10-221-0/+8
| | | | | Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* klogd: do not log partial linesDenys Vlasenko2010-10-191-3/+8
| | | | | | | | function old new delta overlapping_strcpy 15 18 +3 klogd_main 438 436 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5: remove outdated commentDenys Vlasenko2010-10-191-3/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256Denys Vlasenko2010-10-191-482/+416
| | | | | | | | | | | | | | function old new delta sha256_process_block64 421 433 +12 md5_crypt 578 587 +9 md5_begin 43 50 +7 md5_hash 99 97 -2 sha1_end 85 82 -3 md5_end 36 31 -5 common64_end 93 86 -7 sha1_hash 97 - -97 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytesDenys Vlasenko2010-10-181-78/+85
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb/hash_sha.c -> libbb/hash_md5_sha.cDenys Vlasenko2010-10-182-2/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb: move md5 and shaN into a common source file. no code changesDenys Vlasenko2010-10-183-450/+451
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* md5: length should be stored in *little-endian* order! fixing...Denys Vlasenko2010-10-181-2/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bitsDenys Vlasenko2010-10-183-15/+22
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: use SWAP_BE64 instead of open-coding itDenys Vlasenko2010-10-182-10/+8
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb: rename hash source files. no code changesDenys Vlasenko2010-10-184-3/+3
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: replace xopen3 with xopen where makes senseDenys Vlasenko2010-10-181-1/+1
| | | | | | | | | | 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>
* md5: fix biuld failure on big-endian machinesDenys Vlasenko2010-10-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5: code shrink -5 bytesDenys Vlasenko2010-10-171-40/+35
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bring md5 and sha1 names closer. no code changesDenys Vlasenko2010-10-172-50/+42
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5: code shrinkDenys Vlasenko2010-10-172-30/+25
| | | | | | | function old new delta md5_end 125 104 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shaN: code shrinkDenys Vlasenko2010-10-171-5/+10
| | | | | | | | | | | | function old new delta init512_lo 32 40 +8 init256 32 40 +8 sha256_begin 42 28 -14 sha512_begin 81 53 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-42) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixDenys Vlasenko2010-10-161-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha512: inline rotr64Denys Vlasenko2010-10-161-57/+51
| | | | | | | function old new delta sha1_process_block64 461 446 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shaN: small code shrinkDenys Vlasenko2010-10-162-50/+126
| | | | | | | | function old new delta sha512_hash 134 128 -6 sha1_hash 114 106 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5: fix "fast" md5 broken by prev commitDenys Vlasenko2010-10-161-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5: code shrink; and use 64-byte temp buf, not 128-byte.Denys Vlasenko2010-10-161-26/+25
| | | | | | | | | | | | | | function old new delta md5_hash 111 108 -3 md5_end 129 125 -4 md5_hash_block 459 454 -5 filter_rename_config 250 244 -6 md5_crypt 587 578 -9 popmaildir_main 828 816 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: pass md5/shaN context pointer as 1st arg, not lastDenys Vlasenko2010-10-163-26/+26
| | | | | | | | | function old new delta md5_hash_block 458 459 +1 filter_rename_config 252 250 -2 md5_crypt 591 587 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/md5: code shrinkDenys Vlasenko2010-10-161-22/+26
| | | | | | | | | function old new delta md5_end 123 117 -6 md5_begin 49 42 -7 md5_hash 119 104 -15 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb/md5: small code shrinkDenys Vlasenko2010-10-151-22/+26
| | | | | | | function old new delta md5_end 151 123 -28 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* tweaks to build system, mainly making menuconfig text and order clearerDenys Vlasenko2010-10-121-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix build failure for pmapDan Fandrich2010-09-191-1/+1
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* move read_base64 to libbb/uuencode.cDenys Vlasenko2010-09-162-79/+75
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb: merge mail and uudecode's base64 decodersDenys Vlasenko2010-09-161-0/+78
| | | | | | | | | | | | | | | function old new delta read_base64 - 378 +378 uudecode_main 306 315 +9 parse 953 958 +5 read_stduu 250 254 +4 base64_main 217 219 +2 read_base64 358 - -358 decode_base64 371 - -371 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729) Total: -331 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* hush: optional support for history savingDenys Vlasenko2010-09-121-2/+2
| | | | | | | function old new delta hush_main 945 995 +50 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* busybox: add "busybox --list[-full]" to help textDenys Vlasenko2010-09-121-0/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: do not hang on error, but return error indicator.Denys Vlasenko2010-09-071-6/+6
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: on tab completion, show filenames obly in all cases (bash compat)Denys Vlasenko2010-09-031-13/+9
| | | | | | | function old new delta complete_cmd_dir_file 731 730 -1 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: allocate matchBuf only temporarily: saves MAX_LINELEN bytesDenys Vlasenko2010-09-031-45/+48
| | | | | | | | | | function old new delta input_tab 1027 1041 +14 build_match_prefix 590 562 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-28) Total: -14 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: de-indent large block in input_tab. No logic changes.Denys Vlasenko2010-09-031-131/+131
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: rename tmp -> chosen_match; small code shrinkDenys Vlasenko2010-09-031-26/+23
| | | | | | | function old new delta input_tab 1016 1012 -4 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: stop using permanent int_buf[] (16k!): allocate itDenys Vlasenko2010-09-031-14/+13
| | | | | | | | | | | | | Now it is allocated temporarily only for the duretion of prefix generation, and also we only allocate the needed size, not maximally possible. function old new delta build_match_prefix 579 590 +11 remove_chunk 43 28 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-15) Total: -4 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: remove pos_buf[] array (up to 16k!); fix compat bugsDenys Vlasenko2010-09-031-83/+49
| | | | | | | | | | | | | | | pos_buf is a strange hack, easy to do without it. This also allows lines >32k long to be handled. Also simplified match prefix generations and made behavior more like bash. function old new delta remove_chunk - 43 +43 collapse_pos 79 - -79 build_match_prefix 804 579 -225 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 43/-304) Total: -261 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: return prefix len from tab completion helpersDenys Vlasenko2010-09-031-36/+50
| | | | | | | | | | | | | | This kills horrific logic which deletes and re-adds prefix (!) function old new delta complete_cmd_dir_file 705 731 +26 complete_username 121 124 +3 input_tab 1041 1016 -25 build_match_prefix 838 804 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 29/-59) Total: -30 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* lineedit: clean up tab completion code (variable reuse, comments)Denys Vlasenko2010-09-031-69/+85
| | | | | | | | | | | | | | | | Noted bugs in behavior. Added debugging machinery. Decoupled variables reused for unrelated purposes: apparently, when not forced to use liveness analysis, gcc fares better. function old new delta complete_cmd_dir_file 699 705 +6 collapse_pos 75 79 +4 build_match_prefix 892 838 -54 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 10/-54) Total: -44 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* preparatory cleanup patch for tab completion fixesDenys Vlasenko2010-09-031-61/+65
| | | | | | | | | | | | | | | renames and deinlines a few functions function old new delta input_tab - 1041 +1041 complete_cmd_dir_file - 699 +699 complete_username - 121 +121 username_completion 121 - -121 read_line_input 5002 3313 -1689 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/1 up/down: 1861/-1810) Total: 51 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>