aboutsummaryrefslogtreecommitdiff
path: root/miscutils/dc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dc: fix "small dc" to have standard command line APIDenys Vlasenko2018-12-081-23/+47
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix testsuiteDenys Vlasenko2018-12-061-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: re-enable "tiny dc" implementationDenys Vlasenko2018-12-061-46/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bc: new applet, throws warningGavin Howard2018-12-051-41/+43
| | | | | Signed-off-by: Gavin Howard <yzena.tech@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-4/+4
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all miscutils/* applets to "new style" applet definitionsDenys Vlasenko2016-11-221-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Split miscutils/Config.src items into miscutils/*.c filesDenys Vlasenko2016-11-221-4/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-211-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix "dc p" prinitng bogus dataDenys Vlasenko2015-05-251-2/+8
| | | | | | | | | | | function old new delta check_under - 20 +20 print_no_pop 27 32 +5 pop 33 24 -9 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 25/-9) Total: 16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use is_prefixed_with()Denys Vlasenko2015-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: tweak parsingBernhard Reutner-Fischer2015-02-161-30/+27
| | | | | | | | | | | | | | | | | | | | https://bugs.debian.org/538685 dc requires whitespace between language elements. We were requiring 1 2 + p instead of the abbreviated 1 2+p (for example). function old new delta stack_machine 97 126 +29 dc_main 117 79 -38 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-38) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: code shrinkDenys Vlasenko2013-01-181-10/+10
| | | | | | | | function old new delta stack_machine 103 101 -2 operators 176 168 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix a case where we can run off malloced spaceDenys Vlasenko2011-07-151-18/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: do not advertise ops disabled in .configDenys Vlasenko2011-05-161-1/+1
| | | | 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>
* dc: tweak help textDenys Vlasenko2010-07-291-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: make it use long longs for integer opsDenys Vlasenko2010-07-291-14/+51
| | | | | | | | | | | | | | function old new delta print_base 176 238 +62 or 91 103 +12 eor 91 103 +12 and 91 103 +12 not 60 64 +4 mod 103 105 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/0 up/down: 104/0) Total: 104 bytes 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>
* dc: make "dc -1.23 ..." workDenys Vlasenko2009-12-301-9/+8
| | | | | | | | | | function old new delta stack_machine 97 103 +6 dc_main 121 110 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 9/-58) Total: -49 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* more C standard compat fixes from Dan FandrichDenys Vlasenko2009-09-061-1/+1
| | | | | | | function old new delta docolon 207 204 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix the "base 2" patch omission of base not being setDenis Vlasenko2008-12-301-1/+3
|
* dc: support for bases 2 and 8, by Nate Case (ncase AT xes-inc.com)Denis Vlasenko2008-10-301-6/+32
| | | | | | | | | | function old new delta print_base 87 176 +89 set_output_base 81 95 +14 static.bases - 5 +5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 108/0) Total: 108 bytes
* dc: conditionalize parts which require libmDenis Vlasenko2008-10-201-0/+4
|
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* whitespace fixes. no code changesDenis Vlasenko2008-06-251-2/+1
|
* *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/Denis Vlasenko2008-03-261-1/+1
|
* brctl: eliminate stray data objectDenis Vlasenko2008-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | brctl: use constant fd to reduce parameter passing runsvdir: do not use data/bss od: reuse bb_argv_dash last: do not go into endless loop on read error mount: make it not fail scripts/find_bad_common_bufsiz check dc: add INIT_G() (no-op for dc, but we want uniform usage of "G trick") function old new delta runsvdir_main 1646 1672 +26 set_pgrp 1 - -1 exitsoon 1 - -1 check 679 678 -1 svnum 4 - -4 svdir 4 - -4 sv 4 - -4 stamplog 4 - -4 rploglen 4 - -4 rplog 4 - -4 mount_main 995 988 -7 static.default_file_list 8 - -8 pfd 8 - -8 logpipe 8 - -8 static.info 20 - -20 brctl_main 767 739 -28 ------------------------------------------------------------------------------ (add/remove: 0/12 grow/shrink: 1/3 up/down: 26/-106) Total: -80 bytes text data bss dec hex filename 793327 662 7412 801401 c3a79 busybox_old 793329 641 7372 801342 c3a3e busybox_unstripped
* *: fix various kinds of damage to letter 'c' in Arkadiusz Mickiewicz' surname.Denis Vlasenko2008-03-171-51/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chrt,taskset,dc,eject: shrink crontab: call "vi" with just name, no path watchdog: intercept all fatal signals function old new delta xstrtoull_range - 35 +35 static.sg_commands - 18 +18 packed_usage 23698 23712 +14 watchdog_main 148 151 +3 crontab_main 637 638 +1 base 1 - -1 static.ps 4 - -4 pointer 4 - -4 stack_machine 99 92 -7 run_command 273 260 -13 eject_main 360 343 -17 static.C 30 12 -18 ptok 61 38 -23 xstrtol_range 27 - -27 get_token 35 - -35 taskset_main 586 550 -36 chrt_main 411 372 -39 dc_main 158 117 -41 time_main 1127 1037 -90 ------------------------------------------------------------------------------ (add/remove: 2/5 grow/shrink: 3/9 up/down: 71/-355) Total: -284 bytes text data bss dec hex filename 793680 662 7420 801762 c3be2 busybox_old 793327 662 7412 801401 c3a79 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
* Audit bb_common_bufsiz usage, add script which looks for misuse.Denis Vlasenko2007-06-041-1/+1
| | | | | | tr: stop using globals needlessly. code: -103 bytes
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* - use skip_non_whitespace() where appropriateBernhard Reutner-Fischer2007-04-101-3/+1
|
* dc: use common_bufsiz1 for evaluation stackDenis Vlasenko2007-03-241-18/+17
| | | | | msh: fix "underscore bug" (a_b=1111 didn't work) dnsd: openlog(), so that applet's name is logged
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* use skip_whitespace where appropriateDenis Vlasenko2006-10-251-3/+3
|
* bb_get_[chomped]line_from_file wasn't descriptive enough.Denis Vlasenko2006-10-121-1/+1
| | | | Renaming...
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-1/+1
|
* Add one-line GPL boilerplate to numerous (but not all yet) source files."Robert P. J. Day"2006-07-121-0/+4
|
* - remove superfluous call of stack_machine(0) upon exit.Bernhard Reutner-Fischer2006-06-031-1/+0
|
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-031-1/+1
| | | | and eventual platform specific includes in early.
* Patch by Paul Whittaker, make busybox dc compatable with GNU dc. Glenn L McGrath2004-07-241-8/+1
| | | | the following example was broken, echo "1 1 +" | dc
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-3/+3
|
* Goetz Bock writes:Eric Andersen2003-10-221-0/+20
| | | | | | | | | | Dear list, during my quest do pack busybox into an RPM, I've fixed a small bug (missing \n) in dc's usage. And added two additional operations: mod and exp/power. Feel free to drop them.
* "Typo and/or thinko: scanning till the end of NUL terminated stringGlenn L McGrath2003-08-281-1/+1
| | | | should check the byte pointed at not the pointer itself." -junkio@
* Major coreutils update.Manuel Novoa III2003-03-191-5/+5
|
* Support the o, f and p options, patch by Magnus M�rtenssonGlenn L McGrath2002-12-121-1/+34
|
* Patch to avoid warningsAaron Lehmann2001-12-061-11/+11
|
* 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