Age | Commit message (Collapse) | Author |
|
handle infinite depth. Fix docs, tweak dirtree_handle_callback() semantics,
remove dirtree_start() and don't export dirtree_handle_callback(), instead
offer dirtree_flagread(). (dirtree_read() is a wrapper around dirtree_flagread
passing 0 for flags.)
|
|
under traversal. Pass through full flag set in dirtree_add_node(), add
dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot
of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
|
|
|
|
toolbox (NetBSD) chown...
new test:
and here's the patch to fix "owner:" ":group" and the ":" special case:
|
|
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
We xstrdup() an optargs string to avoid modifying our environment space
(because it can change what "ps" shows to other processes), and then parse
out colon delimited strings and save them in globals that can later be used
in the -v codepath and so on. But those globals _aren't_ strdup (no point)
which means we can't free the string while we're still using pointers into
the middle of it. So move the free to the end.
(I hardly ever test with CFG_TOYBOX_FREE switched on because even nommu
doesn't need it.)
|
|
open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
|
|
strings in sync. (todo: figure out how to make OLDTOY() automatically use macro. Still need the raw version for subset ala cp/mv though.)
|
|
|
|
other places that were setting it that no longer need to.
|
|
dirtree functions.
|
|
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
|
|
|
|
|