aboutsummaryrefslogtreecommitdiff
path: root/editors/awk.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* awk: skip whitespace between array name and subscriptAlexander Shishkin2010-02-261-1/+1
| | | | | | | | | | | | | It is supported in both mawk and gawk and there are actually scripts out there that use this "flexibility". function old new delta next_token 1144 1152 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: remove wrong commentDenys Vlasenko2010-02-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko2010-02-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: fix an incorrect casting to string (bug 725). -44 bytes.Denys Vlasenko2009-11-301-6/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: preparatory patch, no essential code changes. -13 bytes.Denys Vlasenko2009-11-301-30/+43
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use ffulsh_all()Denys Vlasenko2009-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* small optimizations of toupper/tolowerDenys Vlasenko2009-10-231-8/+5
| | | | | | | function old new delta in_ib 191 172 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use {i,u}toa() where appropriateDenys Vlasenko2009-10-061-3/+1
| | | | | | | | | | | function old new delta startservice 377 363 -14 setari_u 54 40 -14 ash_main 1375 1361 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-42) Total: -42 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: fix typo in prev commitDenys Vlasenko2009-09-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: implement mktimeLeonid Lisovskiy2009-09-211-4/+36
| | | | | | | | | | | | | | function old new delta exec_builtin - 1466 +1466 do_mktime - 116 +116 tokenlist 441 448 +7 tokeninfo 396 400 +4 evaluate 5395 3755 -1640 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/1 up/down: 1593/-1640) Total: -47 bytes Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* a few more GCC-isms removedDenys Vlasenko2009-09-091-1/+1
| | | | | | | | text data bss dec hex filename 824641 458 6956 832055 cb237 busybox_old 824631 458 6956 832045 cb22d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)Denys Vlasenko2009-09-061-1/+1
| | | | | | | | | | function old new delta logdirs_reopen 1310 1308 -2 read_line_input 4757 4753 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: put at least one NUL between $n. Hopefully closes 337.Denys Vlasenko2009-05-181-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mdev: Rob's #if forest removalDenis Vlasenko2009-04-191-2/+2
| | | | | *: remove superfluous conts in "f(type *const param)"
* awk: fix long field separators case. By Ian Wienand (ianw AT vmware.com)Denis Vlasenko2009-04-121-1/+4
|
* awk: fix compat issue found by gpm buildDenis Vlasenko2009-03-151-3/+14
| | | | | | | | | function old new delta as_regex 105 131 +26 hash_find 247 233 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 26/-14) Total: 12 bytes
* unzip: fix thinko with le/be conv and size (closes bug 129)Denis Vlasenko2009-02-261-6/+9
| | | | | awk: make "struct global" hack more robust wrt alignment (closes bug 131)
* awk: in BEGIN section $0 should be "", not "0".Denis Vlasenko2009-01-251-13/+9
|
* build system cleanup: rename FEATURE_AWK_MATH to FEATURE_AWK_LIBM;Denis Vlasenko2008-10-241-4/+4
| | | | | disable parsing test applet.
* awk: fix typo in atan2 code. closes bug 5594.Denis Vlasenko2008-10-211-1/+1
|
* awk: add a commentDenis Vlasenko2008-09-051-0/+1
|
* awk: improve nadling of negative numbers in bitwise ops;Denis Vlasenko2008-09-021-14/+33
| | | | | | | | | | | | | | | fix handling of octal costants. add test for it function old new delta getvar_i_int - 93 +93 my_strtod - 84 +84 qrealloc 33 36 +3 getvar_i 99 95 -4 next_token 979 919 -60 evaluate 6359 5627 -732 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/3 up/down: 180/-796) Total: -616 bytes
* awk: bitwise ops cast oprands and results to unsigned long,Denis Vlasenko2008-08-281-6/+8
| | | | | not signed. closes 4774.
* awk: support hex constantsDenis Vlasenko2008-08-281-1/+6
|
* libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko2008-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
* libbb: introduce and use xrealloc_vectorDenis Vlasenko2008-07-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-2/+2
|
* awk: another smallish code shrinkDenis Vlasenko2008-07-021-3/+1
|
* uname,individual: fix improper printf usageDenis Vlasenko2008-07-021-4/+4
| | | | | | | | | | | | uname,awk: small code shrink function old new delta uname_main 175 166 -9 nvalloc 167 157 -10 evaluate 6381 6370 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-30) Total: -30 bytes
* awk: fix a case with multiple -f options. simplify -f file reading.Denis Vlasenko2008-07-011-27/+21
| | | | | | | | | | | | | | | | | | function old new delta parse_expr 833 841 +8 qrealloc 33 36 +3 next_input_file 203 198 -5 afopen 22 - -22 ftello 41 - -41 ftell 41 - -41 __GI_ftell 41 - -41 awk_main 1002 944 -58 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 2/2 up/down: 11/-208) Total: -197 bytes text data bss dec hex filename 804232 610 6804 811646 c627e busybox_old 804120 610 6804 811534 c620e busybox_unstripped
* more -Wall warning fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko2008-05-131-3/+3
| | | | | | | | | | | | | 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
* *: add optimization barrier to all "G trick" locationsDenis Vlasenko2008-02-271-3/+4
|
* *: tidy up usage of char **environDenis Vlasenko2008-01-281-1/+0
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (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
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-19/+18
| | | | | | | | | 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
* awk: fix -F 'regex' bug (miscounted fields if last field is empty)Denis Vlasenko2007-07-181-17/+25
|
* awk: style fixes; remove one xstrdup/free pair; testsuiteDenis Vlasenko2007-07-181-13/+17
|
* Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ↵Denis Vlasenko2007-06-251-2/+2
| | | | <wharms@bfs.de>)
* diff: shrink code (-85 bytes):Denis Vlasenko2007-06-121-1/+1
| | | | | | | | | | | | function old new delta fiddle_sum 8 - -8 diffreg 2717 2690 -27 prepare 334 284 -50 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-85) Total: -85 bytes s/ATTRIBUTE_ALWAYS_INLINE/ALWAYS_INLINE/g
* awk: experimentally modify "global" trick to make code smallerDenis Vlasenko2007-06-071-50/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by minimizing data offsets function old new delta parse_expr 752 782 +30 syntax_error 23 26 +3 nvfree 151 154 +3 nvalloc 172 175 +3 fsrealloc 111 114 +3 chain_node 99 102 +3 chain_loop 121 124 +3 chain_group 628 631 +3 awk_main 1002 1005 +3 awk_exit 99 102 +3 parse_program 308 310 +2 split_f0 172 170 -2 awk_split 510 507 -3 getvar_s 108 102 -6 awk_sub 643 637 -6 awk_getline 706 700 -6 next_token 943 927 -16 handle_special 470 446 -24 next_input_file 252 213 -39 evaluate 6703 6633 -70 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 11/9 up/down: 59/-172) Total: -113 bytes # size */*/awk.o text data bss dec hex filename 18247 0 0 18247 4747 busybox.t0/editors/awk.o 18134 0 0 18134 46d6 busybox.t1/editors/awk.o
* awk: move all data to malloc spaceDenis Vlasenko2007-06-061-156/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta evaluate 6448 6728 +280 awk_getline 676 705 +29 parse_expr 726 752 +26 next_token 917 943 +26 next_input_file 237 252 +15 awk_split 498 510 +12 awk_sub 632 643 +11 split_f0 160 170 +10 getvar_s 98 108 +10 ... chain_loop 128 121 -7 nvalloc 179 171 -8 chain_node 107 99 -8 mainseq 12 - -12 endseq 12 - -12 chain_group 640 628 -12 beginseq 12 - -12 awk_exit 112 100 -12 fsrealloc 127 110 -17 static.v 20 - -20 static.rsm 24 - -24 ttt 28 - -28 parse_program 339 311 -28 static.sreg 32 - -32 intvar 76 - -76 static.tspl 84 - -84 rsplitter 84 - -84 fsplitter 84 - -84 ------------------------------------------------------------------------------ (add/remove: 0/39 grow/shrink: 16/11 up/down: 439/-685) Total: -246 bytes
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* awk: fix a trivial bug introduced by me.Denis Vlasenko2007-05-181-1/+1
| | | | | | This is how it goes. I break stuff by doing useless 'cleanups', people fix the fallout. :(. Thanks rockeychu!
* awk: make code a bit less obfuscatedDenis Vlasenko2007-05-171-240/+251
|
* several *.c files:Denis Vlasenko2007-05-171-2/+1
| | | | move 'extern environ' up to the location of #includes
* vi: remove two globalsDenis Vlasenko2007-05-171-66/+72
| | | | | | | | | | | | | | | | | | | | | | | | awk: some 'lineno' vars were shorts, made them ints (code got smaller) awk: rename global t to global ttt. still an awful name, but at least you can grep for it now. function old new delta ttt - 28 +28 mysleep 104 120 +16 readit 408 418 +10 lineno 2 4 +2 parse_program 338 339 +1 evaluate 6446 6445 -1 syntax_error 25 23 -2 next_token 917 915 -2 new_node 26 24 -2 tv 16 8 -8 skip_spaces 68 53 -15 t 28 - -28 rfds 128 - -128 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 4/6 up/down: 57/-186) Total: -129 bytes
* awk: don't segfault on printf(%*s). Close 1337.Denis Vlasenko2007-05-091-1/+4
|
* awk: guard against empty environmentDenis Vlasenko2007-05-031-1/+2
|
* style fixes. No code changesDenis Vlasenko2007-04-121-1/+2
|