platform/upstream/toybox.git
12 years agoMinor code cleanup and typo fix.
Rob Landley [Tue, 14 Feb 2012 03:13:05 +0000 (21:13 -0600)]
Minor code cleanup and typo fix.

12 years agoAdd test for basename, fix issue where suffix is wrongfully applied if it appears...
Elie De Brauwer [Sun, 12 Feb 2012 13:14:58 +0000 (14:14 +0100)]
Add test for basename, fix issue where suffix is wrongfully applied if it appears in the middle of the filename

12 years agoThe unshare test needs $CC defined, source configure to get it.
Rob Landley [Mon, 13 Feb 2012 14:44:32 +0000 (08:44 -0600)]
The unshare test needs $CC defined, source configure to get it.

12 years agoAdded tag 0.2.0 for changeset e708e8933a50
Rob Landley [Mon, 13 Feb 2012 13:46:36 +0000 (07:46 -0600)]
Added tag 0.2.0 for changeset e708e8933a50

12 years agoAdd clear (wrapper). 0.2.0
Rob Landley [Mon, 13 Feb 2012 00:04:15 +0000 (18:04 -0600)]
Add clear (wrapper).

12 years agoAdd tests for head
Timothy Elliott [Sat, 11 Feb 2012 05:59:57 +0000 (21:59 -0800)]
Add tests for head

This exposed one issue in head.c -- printf was not flushing and
file names could appear after file contents instead of before.

The issue is fixed by calling xflush after xprintf.

12 years agoMinor cleanups to echo: collapse together three tolower() calls, make indent/brackets...
Rob Landley [Sat, 11 Feb 2012 19:42:24 +0000 (13:42 -0600)]
Minor cleanups to echo: collapse together three tolower() calls, make indent/brackets a bit more regular/obvious, and replace some spaces with tabs in help text (in a way that won't matter until I finish rewriting scripts/config2help.py in C).

12 years agoFix overflow in octal formatting in echo, add support for hexadecimal input, add...
Elie De Brauwer [Sat, 11 Feb 2012 13:58:50 +0000 (14:58 +0100)]
Fix overflow in octal formatting in echo, add support for hexadecimal input, add tests for octal and hexadecimal formatting

12 years agoAdd tests for cksum
Elie De Brauwer [Sat, 11 Feb 2012 12:46:49 +0000 (13:46 +0100)]
Add tests for cksum

12 years agoCorrect cksum parameters and clarify -N option
Elie De Brauwer [Sat, 11 Feb 2012 12:48:04 +0000 (13:48 +0100)]
Correct cksum parameters and clarify -N option

12 years agoCorrect description of nice levels in help of nice
Elie De Brauwer [Fri, 10 Feb 2012 12:36:48 +0000 (13:36 +0100)]
Correct description of nice levels in help of nice

12 years agoCleanups for head.
Rob Landley [Thu, 9 Feb 2012 12:36:42 +0000 (06:36 -0600)]
Cleanups for head.

12 years agoImplement head
Timothy Elliott [Tue, 7 Feb 2012 01:35:59 +0000 (17:35 -0800)]
Implement head

12 years agoMake atolx() error_exit() if fed a string that doesn't convert entirely into an integer.
Rob Landley [Thu, 9 Feb 2012 12:09:27 +0000 (06:09 -0600)]
Make atolx() error_exit() if fed a string that doesn't convert entirely into an integer.

12 years agoUse stpcpy() (posix 2008) for slight code shrink.
Rob Landley [Thu, 9 Feb 2012 01:29:39 +0000 (19:29 -0600)]
Use stpcpy() (posix 2008) for slight code shrink.

12 years agoSwitch from deprecated function to gratuitously renamed identical non-depricated...
Rob Landley [Thu, 9 Feb 2012 01:29:14 +0000 (19:29 -0600)]
Switch from deprecated function to gratuitously renamed identical non-depricated function.  *shrug*

12 years agoMore cmp.c shrinkage.
Rob Landley [Wed, 8 Feb 2012 04:25:59 +0000 (22:25 -0600)]
More cmp.c shrinkage.

Abuse loopfiles() to handle both arguments, caching the first pass in globals.
That eliminates get_fd() since loopfiles already knows how to handle "-" arg.
Chop toybuf in half and use half for each file, eliminating malloc/free.
main() becomes just a call to loopfiles(), which does all open/close.

12 years agoIterative cleanups on cmp.c: silence warnings, only free if TOYBOX_FREE, use xopen...
Rob Landley [Wed, 8 Feb 2012 03:32:32 +0000 (21:32 -0600)]
Iterative cleanups on cmp.c: silence warnings, only free if TOYBOX_FREE, use xopen(), style cleanup on curly brackets.

12 years agoSwitching who default to 'n' since it's not yet fully implemented.
Luis Felipe Strano Moraes [Tue, 7 Feb 2012 20:13:41 +0000 (12:13 -0800)]
Switching who default to 'n' since it's not yet fully implemented.

12 years agoAdded time to the output of who command.
Luis Felipe Strano Moraes [Tue, 7 Feb 2012 17:15:17 +0000 (09:15 -0800)]
Added time to the output of who command.

12 years agoInitial version of who command.
Luis Felipe Strano Moraes [Tue, 7 Feb 2012 00:29:09 +0000 (16:29 -0800)]
Initial version of who command.

12 years agoSilence really boring compiler warning.
Luis Felipe Strano Moraes [Mon, 6 Feb 2012 22:36:56 +0000 (14:36 -0800)]
Silence really boring compiler warning.

12 years agoImplement cmp
Timothy Elliott [Mon, 6 Feb 2012 09:28:40 +0000 (01:28 -0800)]
Implement cmp

12 years agoFix sort -uc (pointer vs pointer to pointer confusion, covered by typecast).
Rob Landley [Tue, 7 Feb 2012 06:31:37 +0000 (00:31 -0600)]
Fix sort -uc (pointer vs pointer to pointer confusion, covered by typecast).

12 years agoDocument that optflags is always an int (so 32 bit and 64 bit platforms behave the...
Rob Landley [Tue, 7 Feb 2012 03:15:19 +0000 (21:15 -0600)]
Document that optflags is always an int (so 32 bit and 64 bit platforms behave the same).

12 years agoBugfix for -x, add CONFIG_SORT_FLOAT, and new test suite entry.
Rob Landley [Tue, 7 Feb 2012 03:14:22 +0000 (21:14 -0600)]
Bugfix for -x, add CONFIG_SORT_FLOAT, and new test suite entry.

12 years agoThis id implementation is not remotely SUSv4 compliant, default n until I get a chanc...
Rob Landley [Sun, 5 Feb 2012 21:25:17 +0000 (15:25 -0600)]
This id implementation is not remotely SUSv4 compliant, default n until I get a chance to finish it.

12 years agoAdd a basic README and an example to "make help".
Rob Landley [Sat, 4 Feb 2012 18:20:39 +0000 (12:20 -0600)]
Add a basic README and an example to "make help".

12 years agoTweak help command's help text, and remove unimplemented option.
Rob Landley [Sat, 4 Feb 2012 17:23:18 +0000 (11:23 -0600)]
Tweak help command's help text, and remove unimplemented option.

12 years agoCleaning out one more old gpl notice that no longer applies after the switch to BSD...
Rob Landley [Sat, 4 Feb 2012 16:39:17 +0000 (10:39 -0600)]
Cleaning out one more old gpl notice that no longer applies after the switch to BSD in november.

12 years agoAdd autodetect for container support.
Rob Landley [Sat, 4 Feb 2012 05:16:28 +0000 (23:16 -0600)]
Add autodetect for container support.

12 years agoFix bad link that was confusing people. (Oops.)
Rob Landley [Sat, 4 Feb 2012 04:39:55 +0000 (22:39 -0600)]
Fix bad link that was confusing people.  (Oops.)

12 years agoRemoving unecessary allocation.
Luis Felipe Strano Moraes [Fri, 3 Feb 2012 13:17:48 +0000 (11:17 -0200)]
Removing unecessary allocation.

12 years agoImplement xargs -E.
Rob Landley [Thu, 2 Feb 2012 13:44:04 +0000 (07:44 -0600)]
Implement xargs -E.

12 years agoVery slight efficiency tweak.
Rob Landley [Thu, 2 Feb 2012 13:42:31 +0000 (07:42 -0600)]
Very slight efficiency tweak.

12 years agoTest suite comment tweaks.
Rob Landley [Thu, 2 Feb 2012 13:29:09 +0000 (07:29 -0600)]
Test suite comment tweaks.

12 years agoBasename and env are usable, default them to y.
Rob Landley [Thu, 2 Feb 2012 13:28:06 +0000 (07:28 -0600)]
Basename and env are usable, default them to y.

12 years agoQuick and dirty terminal_size() and yesno() functions, both of which need to be improved.
Rob Landley [Thu, 2 Feb 2012 13:27:35 +0000 (07:27 -0600)]
Quick and dirty terminal_size() and yesno() functions, both of which need to be improved.

12 years agoUpdate web page a bit.
Rob Landley [Thu, 2 Feb 2012 13:27:05 +0000 (07:27 -0600)]
Update web page a bit.

12 years agoCommit 415 needs the other two files. (Oops.)
Rob Landley [Thu, 2 Feb 2012 13:26:39 +0000 (07:26 -0600)]
Commit 415 needs the other two files.  (Oops.)

12 years agoMore work on xargs: bugfix and tests.
Rob Landley [Mon, 30 Jan 2012 13:40:32 +0000 (07:40 -0600)]
More work on xargs: bugfix and tests.

12 years agoAdd <>= to lib/args.c, with documentation.
Rob Landley [Sun, 29 Jan 2012 19:54:13 +0000 (13:54 -0600)]
Add <>= to lib/args.c, with documentation.

12 years agoImplement xargs (first pass, not full SUSv4 yet).
Rob Landley [Sat, 28 Jan 2012 18:07:45 +0000 (12:07 -0600)]
Implement xargs (first pass, not full SUSv4 yet).

12 years agoAdd id command from Tim Bird.
Rob Landley [Fri, 27 Jan 2012 12:49:28 +0000 (06:49 -0600)]
Add id command from Tim Bird.

12 years agoPatch shouldn't be bothered by DOS newlines.
Rob Landley [Mon, 23 Jan 2012 04:28:04 +0000 (22:28 -0600)]
Patch shouldn't be bothered by DOS newlines.

12 years agoAdd three commands that can be done as simple shell scripts (one sed is in, anyway...
Rob Landley [Mon, 23 Jan 2012 02:33:15 +0000 (20:33 -0600)]
Add three commands that can be done as simple shell scripts (one sed is in, anyway), and don't need to be implemented in C.

12 years agoAdd wiki link and make about less stale.
Rob Landley [Mon, 23 Jan 2012 01:41:42 +0000 (19:41 -0600)]
Add wiki link and make about less stale.

12 years ago'env' and 'basename' refactored
Tryn Mirell [Fri, 20 Jan 2012 06:02:37 +0000 (00:02 -0600)]
'env' and 'basename' refactored

12 years agoComment changes, and add a blank line to the help text.
Rob Landley [Thu, 19 Jan 2012 02:32:52 +0000 (20:32 -0600)]
Comment changes, and add a blank line to the help text.

12 years agoAdd -x option to sort (like -n, but hexadecimal), because I needed it for something.
Rob Landley [Thu, 19 Jan 2012 02:31:59 +0000 (20:31 -0600)]
Add -x option to sort (like -n, but hexadecimal), because I needed it for something.

12 years ago'env' implementation - Initial
Tryn Mirell [Mon, 16 Jan 2012 07:48:51 +0000 (01:48 -0600)]
'env' implementation - Initial

12 years ago'basename': Handle where we have no / passed
Tryn Mirell [Mon, 16 Jan 2012 05:27:22 +0000 (23:27 -0600)]
'basename': Handle where we have no / passed

12 years agoInitial 'basename' implementation
Tryn Mirell [Mon, 16 Jan 2012 05:20:06 +0000 (23:20 -0600)]
Initial 'basename' implementation

12 years agoFluff out documentation and skeleton code.
Rob Landley [Mon, 16 Jan 2012 07:44:17 +0000 (01:44 -0600)]
Fluff out documentation and skeleton code.

12 years agoExpand comments.
Rob Landley [Sun, 15 Jan 2012 05:28:15 +0000 (23:28 -0600)]
Expand comments.

12 years agoDon't make toysh default to y until it does something useful.
Rob Landley [Wed, 28 Dec 2011 22:50:16 +0000 (16:50 -0600)]
Don't make toysh default to y until it does something useful.

12 years agoFix "make help".
Rob Landley [Wed, 28 Dec 2011 22:17:13 +0000 (16:17 -0600)]
Fix "make help".

12 years agoBugfix (spotted by Nathan McSween): xread can't detect <0 if the return type is store...
Rob Landley [Wed, 28 Dec 2011 19:01:12 +0000 (13:01 -0600)]
Bugfix (spotted by Nathan McSween): xread can't detect <0 if the return type is stored in an unsigned variable.

12 years agoImplement unshare.
Rob Landley [Tue, 13 Dec 2011 05:49:55 +0000 (23:49 -0600)]
Implement unshare.

12 years agoForgot to check in loopfiles_rw changes needed by truncate.
Rob Landley [Mon, 12 Dec 2011 21:19:52 +0000 (15:19 -0600)]
Forgot to check in loopfiles_rw changes needed by truncate.

12 years agoImplement truncate.
Rob Landley [Sun, 11 Dec 2011 09:58:43 +0000 (03:58 -0600)]
Implement truncate.

12 years agoWhitespace/wordwrap changes.
Rob Landley [Sun, 11 Dec 2011 09:54:58 +0000 (03:54 -0600)]
Whitespace/wordwrap changes.

12 years agoImplment cal.
Rob Landley [Sun, 11 Dec 2011 08:36:01 +0000 (02:36 -0600)]
Implment cal.

12 years agoSplit out parse_optflaglist(), and move local variables to optflagstate.
Rob Landley [Wed, 30 Nov 2011 13:21:23 +0000 (07:21 -0600)]
Split out parse_optflaglist(), and move local variables to optflagstate.

12 years agoFix "tar cvjfC file dir", make @ not eat an argument, add debug check for (as yet...
Rob Landley [Mon, 28 Nov 2011 06:22:15 +0000 (00:22 -0600)]
Fix "tar cvjfC file dir", make @ not eat an argument, add debug check for (as yet) unsupported multi-function option (ala "x*@").

12 years agoDon't complain about "possibly reversed" hunks that merely moved later in the file...
Rob Landley [Tue, 22 Nov 2011 12:08:26 +0000 (06:08 -0600)]
Don't complain about "possibly reversed" hunks that merely moved later in the file, just give a potential reason if it failed to apply.

13 years agoImplement unlink.
Rob Landley [Mon, 21 Nov 2011 03:36:37 +0000 (21:36 -0600)]
Implement unlink.

13 years agoImplement nohup.
Rob Landley [Mon, 21 Nov 2011 03:13:47 +0000 (21:13 -0600)]
Implement nohup.

13 years agoAdd link.
Rob Landley [Sun, 20 Nov 2011 17:39:13 +0000 (11:39 -0600)]
Add link.

13 years agoAdd dirname, and typo fixes to wc header.
Rob Landley [Fri, 18 Nov 2011 12:21:29 +0000 (06:21 -0600)]
Add dirname, and typo fixes to wc header.

13 years agoAdd wc.
Rob Landley [Thu, 17 Nov 2011 13:26:22 +0000 (07:26 -0600)]
Add wc.

13 years agoMore GPL->BSD debris.
Rob Landley [Tue, 15 Nov 2011 09:01:41 +0000 (03:01 -0600)]
More GPL->BSD debris.

13 years agoSwitch license.html to BSD, and delete the old "FSF screwed over Mepis" rant (which...
Rob Landley [Tue, 15 Nov 2011 08:59:50 +0000 (02:59 -0600)]
Switch license.html to BSD, and delete the old "FSF screwed over Mepis" rant (which while still true, is no longer relevant).

13 years agoNew mailing list.
Rob Landley [Tue, 15 Nov 2011 08:38:13 +0000 (02:38 -0600)]
New mailing list.

13 years agoSwitch to 2-clause BSD license (with caveat about scripts directory).
Rob Landley [Tue, 15 Nov 2011 08:24:44 +0000 (02:24 -0600)]
Switch to 2-clause BSD license (with caveat about scripts directory).

13 years agoSUSv4 is out, update template link.
Rob Landley [Tue, 15 Nov 2011 07:09:27 +0000 (01:09 -0600)]
SUSv4 is out, update template link.

13 years agoImplement tty command.
Rob Landley [Tue, 15 Nov 2011 06:57:45 +0000 (00:57 -0600)]
Implement tty command.

13 years agoxreadall() returns void... how does that even compile?
Rob Landley [Mon, 14 Nov 2011 03:05:28 +0000 (21:05 -0600)]
xreadall() returns void... how does that even compile?

13 years agoPrepare for license switch by (regrettably) removing Charlie Shepherd's code, at...
Rob Landley [Mon, 14 Nov 2011 02:02:47 +0000 (20:02 -0600)]
Prepare for license switch by (regrettably) removing Charlie Shepherd's code, at least until I can get in touch with him to to get permission to relicense it.

Charlie's @gentoo address bounces, and he hasn't replied to his @gmail address.
I welcome him as a contributor but can't _find_ him, so I can't ship his
basename, dirname, mkfifo, touch, and tty command code  under a non-GPL license.
This essentially reverts the following commits:

147: implement touch
157: implement mkfifo
160: tweak touch
161: touch bugfix
162: touch -l
176: implement basename, dirname
179: implement tty

I also looked at these commits, which Charlie contributed to but which
don't need to be reverted.  (Mostly whitespace changes and typo fixes,
plus some minor changes to build infrastructure that don't affect the
resulting code.)

*149: add null pointer check
*154: add .hgignore
*155: whitespace
*156: whitespace (the rest is by me)
*158: add toys/help.h to makefile dependencies
*159: fix typo in description
*164: typo in df (dereference pointer)
*180: .hgignore
*182: whitespace in error messages
*183: add headers to make dependencies
*244: comment and whitespace cleanups
*247: build tweak: error checking
*248: typo in comment
*249: .hgignore
*250: wrong word in comment
*251: whitespace
*252: whitespace

Several files in the "scripts" directory are still GPLv2 (kconfig,
bloat-o-meter, Robert Foglietta's bash version of config2help.sh), but
they're just build infrastructure that doesn't wind up in the resulting
binary.  I plan to address this later on general principles, but it's
"mere aggregation" and not an immediate priority.)

13 years agoThe @@ -1,2 +3,4 @@ lines treat ,1 as implied, so the format isn't regular.
Rob Landley [Sun, 22 May 2011 03:54:21 +0000 (22:54 -0500)]
The @@ -1,2 +3,4 @@ lines treat ,1 as implied, so the format isn't regular.
(Yes, this was designed by the FSF, what gave it away?)

14 years agoFor CFG_TOYBOX_DEBUG add -x option to patch to dump lots of debug output about the...
Rob Landley [Sun, 28 Feb 2010 20:11:41 +0000 (14:11 -0600)]
For CFG_TOYBOX_DEBUG add -x option to patch to dump lots of debug output about the search and match.

14 years agoOne more little tweak to patch: unrecognized date format != delete file.
Rob Landley [Sun, 28 Feb 2010 18:16:43 +0000 (12:16 -0600)]
One more little tweak to patch: unrecognized date format != delete file.

14 years agoAdd command "nice".
Rob Landley [Wed, 6 Jan 2010 11:29:53 +0000 (05:29 -0600)]
Add command "nice".

14 years agoMake toy_init() reentrant, or else xexec() has funky errors.
Rob Landley [Wed, 6 Jan 2010 11:29:17 +0000 (05:29 -0600)]
Make toy_init() reentrant, or else xexec() has funky errors.

14 years agoShut up even MORE gcc/glibc spurious warnings.
Rob Landley [Wed, 6 Jan 2010 11:28:32 +0000 (05:28 -0600)]
Shut up even MORE gcc/glibc spurious warnings.

14 years agoAdd setsid.
Rob Landley [Tue, 5 Jan 2010 19:17:47 +0000 (13:17 -0600)]
Add setsid.

14 years agoAdd TOYBOX_SUID.
Rob Landley [Tue, 5 Jan 2010 18:17:05 +0000 (12:17 -0600)]
Add TOYBOX_SUID.

14 years agoCorrect return types of xstrdup() and xstrndup()
Rob Landley [Tue, 5 Jan 2010 16:48:32 +0000 (10:48 -0600)]
Correct return types of xstrdup() and xstrndup()

14 years agomenuconfig indentation should be handled by dependencies, not whitespace in description.
Rob Landley [Tue, 5 Jan 2010 16:46:16 +0000 (10:46 -0600)]
menuconfig indentation should be handled by dependencies, not whitespace in description.

14 years agoUse fdlength() instead of lseek(SEEK_END).
Rob Landley [Tue, 5 Jan 2010 16:45:16 +0000 (10:45 -0600)]
Use fdlength() instead of lseek(SEEK_END).

14 years agoTypo fix in comment.
Rob Landley [Tue, 5 Jan 2010 16:43:36 +0000 (10:43 -0600)]
Typo fix in comment.

14 years agoMinor web page updates (put header/footer back, add a few <hr> tags).
Rob Landley [Tue, 5 Jan 2010 16:41:52 +0000 (10:41 -0600)]
Minor web page updates (put header/footer back, add a few <hr> tags).

14 years agoThe "strip" in gcc 4.4 doesn't set the executable bit on its output, despite what...
Rob Landley [Sun, 13 Dec 2009 06:12:26 +0000 (00:12 -0600)]
The "strip" in gcc 4.4 doesn't set the executable bit on its output, despite what SUSv4 says it should do, so cope with buggy FSF tools.

14 years agoLet the minicom script take the speed as an optional second argument.
Rob Landley [Sun, 13 Dec 2009 06:11:30 +0000 (00:11 -0600)]
Let the minicom script take the speed as an optional second argument.

14 years agoFix reversed patch detection logic, remove unused variables, rename variables, better...
Rob Landley [Mon, 30 Nov 2009 04:14:06 +0000 (22:14 -0600)]
Fix reversed patch detection logic, remove unused variables, rename variables, better comments.

15 years agoAdd .tar.bz2 to tarball links.
Rob Landley [Fri, 23 Oct 2009 22:42:13 +0000 (17:42 -0500)]
Add .tar.bz2 to tarball links.

15 years agoRemove header/footer includes to prepare for css instead.
Rob Landley [Thu, 1 Oct 2009 04:30:26 +0000 (23:30 -0500)]
Remove header/footer includes to prepare for css instead.

15 years agoMake a warning go away on Fedora 11.
Rob Landley [Fri, 7 Aug 2009 01:39:28 +0000 (20:39 -0500)]
Make a warning go away on Fedora 11.

15 years agoUnconditionally add the $CROSS_COMPILE prefix to $CC, even if it's already set.
Rob Landley [Fri, 7 Aug 2009 01:38:24 +0000 (20:38 -0500)]
Unconditionally add the $CROSS_COMPILE prefix to $CC, even if it's already set.

15 years agoFix broken links spotted by Cedric Duval.
Rob Landley [Fri, 5 Jun 2009 20:58:48 +0000 (15:58 -0500)]
Fix broken links spotted by Cedric Duval.