Commit Graph

33 Commits

Author SHA1 Message Date
Denis Vlasenko
bb98db2ed2 echo: fix yet another buglet in non-fancy echo 2007-06-19 23:04:17 +00:00
Bernhard Reutner-Fischer
def8260219 - fix invocation without any argument 2007-06-08 12:52:17 +00:00
Denis Vlasenko
c084d2f205 echo: fix non-fancy echo 2007-06-06 07:50:51 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
335b63d8d1 make a few struct bb_applet members conditional
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Denis Vlasenko
a9d7d24e1f echo: fix regression ("echo" with no arguments didn't print newline.
echo: use fputs if no options are given. Code growth ~15 bytes.

Old:
# time ./busybox find $bigdir -exec echo {} \; >/dev/null
real    0m2.038s
user    0m0.761s
sys     0m0.953s

New:
# time ./busybox find $bigdir -exec echo {} \; >/dev/null
real    0m1.781s
user    0m0.781s
sys     0m0.939s

For comparison: without NOFORK:
# time find $bigdir -exec echo {} \; >/dev/null
real    1m51.129s
user    0m38.442s
sys     1m3.350s
2007-04-10 16:34:00 +00:00
Denis Vlasenko
7e754f12d3 Implement first instance of NOFORK applet - echo
find: use NOFORK/NOEXEC; small -exec buglet also eliminated
vfork_daemon_rexec: honor PREFER_APPLETS
echo: small size improvements

find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
2007-04-09 13:04:50 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
bf66fbc8e2 introduce LONE_CHAR (optimized strcmp with one-char string) 2006-12-21 13:23:14 +00:00
Denis Vlasenko
f0ed376eda remove bb_printf and the like 2006-10-26 23:21:47 +00:00
"Robert P. J. Day"
68229837ff Remove all usage of the "register" storage class specifier. 2006-07-01 13:08:46 +00:00
Paul Fox
6ab037872f made "test" an ash built-in.
moved the contents of libbb/bb_echo.c back into coreutils/echo.c,
which is a more reasonable place for them than libbb.  this
forces anyone who wants echo and test to be builtin to ash to
also have them available as applets.  their cost is very small,
and the number of people who wouldn't want them as applets is
also very small.

added warning about shell builtins vs. CONFIG_FEATURE_SH_STANDALONE_SHELL,
which conflicts with their use.

thanks to nathanael copa for debugging help.

some string size optimization in test.c may have been lost with
this commit, but this is a good new baseline.
2006-06-08 21:37:26 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Paul Fox
0b62158475 implemented a builtin echo command in ash. moved the guts of the
echo applet into libbb, and now call bb_echo() from both echo.c
and ash.c
2005-08-09 19:38:05 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
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
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
e5dfced23a Apply Vladimir's latest cleanup patch.
-Erik
2001-04-09 22:48:12 +00:00
Eric Andersen
1ca20a7747 A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
2001-03-21 07:34:27 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
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
2001-02-20 06:14:08 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
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
2001-01-27 08:24:39 +00:00
Matt Kraai
3e856ce428 Stop using TRUE and FALSE for exit status. 2000-12-01 02:55:13 +00:00
Eric Andersen
8fff78d66e Apply the BSD echo version submitted by Jonas Holmberg <jonas.holmberg@axis.com> 2000-11-29 22:40:59 +00:00
Eric Andersen
4e573f4729 Remove the BSD advertising clause, and replace it with a link to how
the advertising clause has been retroactivly declared null and void.
2000-11-14 23:29:24 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Pavel Roskin
47d4926244 The result of getopt() is "int" and should be treated as such 2000-07-17 16:17:19 +00:00
Matt Kraai
bf181b9338 Extract usage information into a separate file. 2000-07-16 20:57:15 +00:00
Eric Andersen
add09fd558 Getopt'ed by Marc Nijdam <marc_nijdam@hp.com>
-Erik
2000-07-14 18:39:08 +00:00
Eric Andersen
f7cf2f7ef9 * Fix to tr so it recognizes standard escape sequences. Merged common
escape seq. code from tr and echo into utility.c.  Fix thanks to
    Matt Kraai <kraai@alumni.carnegiemellon.edu>.
* This should close Bug #1015.  Please test.
 -Erik
2000-07-05 17:26:35 +00:00
Eric Andersen
b610615be9 Updates to a number of apps to remove warnings/compile errors under libc5.
Tested under both libc5 and libc6 and all seems well with these fixes.
 -Erik
2000-06-19 17:25:40 +00:00
Erik Andersen
59b9e87024 * cp -fa now works as expected for symlinks (it didn't before)
* zcat works again (wasn't working since option parsing was broken)
* more doc updates/more support for BB_FEATURE_SIMPLE_HELP
 -Erik
2000-05-10 05:05:45 +00:00
Erik Andersen
9cf3bfa7c1 More doc updates for BusyBox, with fixes to apps for bugs revealed
while trying to write docs . :-)
 -Erik
2000-04-13 18:49:43 +00:00
Erik Andersen
13456d1fcd Forgot these files...
-Erik
2000-03-16 08:09:57 +00:00