summaryrefslogtreecommitdiff
path: root/coreutils/expr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: 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>
* *: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko2010-07-261-1/+0
| | | | 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>
* 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>
* expr: a bit more robust handling of regexps with groups (closes bug 87)Denis Vlasenko2009-03-031-6/+6
|
* expr: on error, exit with exitcode 2Denis Vlasenko2008-11-111-7/+4
| | | | | expr_main 101 110 +9
* expr: fix comparisons 'a < b' where we were overflowing a-bDenis Vlasenko2008-04-021-87/+84
| | | | | | | | | | | | | | | | | | | (not to mention that we used int, not arith_t). closes bug 2744. Also, shrink a bit and add testsuite entry function old new delta nextarg 75 84 +9 tostring 38 35 -3 toarith 89 86 -3 str_value 35 32 -3 eval6 555 552 -3 int_value 29 23 -6 eval4 128 120 -8 eval3 112 104 -8 eval2 512 417 -95 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/8 up/down: 9/-129) Total: -120 bytes
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* expand, unexpand: new applets from Tito <farmatito@tiscali.it>Denis Vlasenko2007-08-131-2/+0
|
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-1/+1
| | | | | | | | | 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
* Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko2007-07-241-4/+3
| | | | | | | | | which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes. text data bss dec hex filename 781266 1328 11844 794438 c1f46 busybox_old 781010 1328 11844 794182 c1e46 busybox_unstripped
* expr: small code shrinkDenis Vlasenko2007-07-011-4/+7
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* add some missed statics on constant objects.Denis Vlasenko2007-04-081-1/+1
| | | | | | | | | | fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped
* - use bb_error_msgBernhard Reutner-Fischer2007-04-021-1/+1
|
* - use xregcomp. Untested. vda, isn't there a regfree missing here?Bernhard Reutner-Fischer2007-04-021-2/+2
| | | | | | text data bss dec hex filename 2522 0 0 2522 9da expr.o.r18305 2478 0 0 2478 9ae expr.o
* - remove some unneeded forward declarations. No obj-code changes.Bernhard Reutner-Fischer2007-04-021-30/+26
|
* - remove args from bss, minor misc shrinkage while at it.Bernhard Reutner-Fischer2007-04-021-40/+45
| | | | | | text data bss dec hex filename 2577 0 4 2581 a15 expr.o 2522 0 0 2522 9da expr.o
* chown: support -H -L -P if ENABLE_DESKTOPDenis Vlasenko2007-03-081-8/+8
| | | | | chmod: cosmetic fixes expr: smallish help for dumb compilers
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #1Denis Vlasenko2007-01-291-4/+4
|
* introduce LONE_CHAR (optimized strcmp with one-char string)Denis Vlasenko2006-12-211-1/+1
|
* safe_strtoXX interface proved to be a bit unconvenient.Denis Vlasenko2006-11-271-0/+2
| | | | | Remove it, introduce saner bb_strtoXX. Saved ~350 bytes.
* remove bb_printf and the likeDenis Vlasenko2006-10-261-2/+2
|
* message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko2006-10-201-1/+1
|
* - pull from busybox_scratch: r15829:15850Bernhard Reutner-Fischer2006-08-281-211/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes, cleanups and shrinkage: saves 952 Bytes: text data bss dec hex filename 1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old 1086790 15853 790632 1893275 1ce39b busybox via: # scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped function old new delta ipcrm_main 756 822 +66 getval - 61 +61 maybe_set_utc - 40 +40 udhcpc_main 2896 2912 +16 md5_hash_block 428 437 +9 opt 8 16 +8 qgravechar 106 110 +4 make_bitmap 292 295 +3 inflate_unzip 2056 2059 +3 add_partition 1412 1414 +2 __parsespent 156 158 +2 qrealloc 41 42 +1 format - 1 +1 catv_main 313 314 +1 watch_main 293 292 -1 varunset 81 80 -1 part 1 - -1 check_if_skip 837 836 -1 start_stop_daemon_main 840 837 -3 create_lost_and_found 175 172 -3 supress_non_delimited_lines 4 - -4 static.l 4 - -4 static.c 5 1 -4 bsd_sum_file 237 233 -4 eval2 338 332 -6 arithmetic_common 166 158 -8 cmpfunc 22 5 -17 cksum_main 294 275 -19 cmp_main 465 439 -26 dd_main 1535 1508 -27 rmmod_main 376 333 -43 cut_file 727 644 -83 ipcs_main 3809 3721 -88 cut_main 722 614 -108 date_main 1443 1263 -180 remove_ids 222 - -222 ------------------------------------------------------------------------------ (add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-11/+5
| | | | | | | | | | 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.)
* Add one-line GPL boilerplate to numerous (but not all yet) source files."Robert P. J. Day"2006-07-121-14/+1
|
* clean up yet more annoying signed/unsigned mismatches and fixupEric Andersen2006-01-301-2/+4
| | | | yet more incorrect types
* support 64 arith. Close bug 136"Vladimir N. Oleynik"2006-01-251-18/+33
|
* just whitespaceTim Riker2006-01-251-1/+1
|
* change interface to bb_xasprintf() - more perfect for me."Vladimir N. Oleynik"2005-09-291-1/+1
| | | | | ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
* Patch from Shaun Jackman:Rob Landley2005-05-091-22/+15
| | | | | | | | | | | | | | | | | | > This patch modfies expr to use portable POSIX regex rather than BSD > regex. ... > This updated patch implements an anchored regex by checking that the > match starts at offset 0. More to the point, this patch uses the same regex that sed.c is already using (opportunity to suck in less library code), and even building a dynamically linked busybox with just expr the result is a slightly smaller binary (by 94 bytes, I dunno what nm --size-sort has to say about it because I didn't build with debug info, since that changes the binary size a lot by disabling optimization...) Your mileage may vary. Handle with caution. Do not taunt happy fun ball.
* Larry Doolittle writes:Eric Andersen2004-04-141-11/+11
| | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-1/+1
|
* Use bb_xstrdup() instead of strdup().Manuel Novoa III2004-02-011-1/+1
|
* Be stricter when converting strings to integers. Should fix the problemManuel Novoa III2004-01-251-9/+11
| | | | reported by Rob.
* Patch from Jean WolterGlenn L McGrath2003-09-081-1/+1
| | | | expr currently always adds even if told to subtract
* vodz, last patch 103Glenn L McGrath2003-08-291-72/+69
|
* Major coreutils update.Manuel Novoa III2003-03-191-12/+12
|
* Applied vodz' patches #49 and #50 (with a small correction in runshell.c)Robert Griebl2002-07-191-8/+2
| | | | | | | | | #49: I found one memory overflow and memory leak in "ln" applet. Last patch reduced also 54 bytes. ;) #50: I found bug in loginutils/Makefile.in. New patch have also new function to libbb and aplied this to applets and other cosmetic changes.
* Fixup some silly prototype warningsEric Andersen2001-10-311-6/+6
|
* Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.cMatt Kraai2001-05-161-2/+2
| | | | by Larry Doolittle.
* Another cleanup patch from Jeff Garzik <jgarzik@mandrakesoft.com>Eric Andersen2001-03-191-1/+1
|
* Added some more '/* getopt not needed */' lines.Mark Whitley2001-03-091-0/+2
|
* 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
* Removed trailing \n from error_msg{,_and_die} messages.Matt Kraai2001-01-311-10/+10
|
* Fix header file usage -- there were many unnecessary header files included inEric Andersen2001-01-271-1/+3
| | | | | | | 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
* Changed names of functions in utility.c and all affected files, to makeMark Whitley2000-12-071-10/+10
| | | | compliant with the style guide. Everybody rebuild your tags file!
* Renamed "internal.h" to the more sensible "busybox.h".Eric Andersen2000-09-251-1/+1
| | | | -Erik