platform/upstream/toybox.git
9 years agoRename a function to better describe what it does.
Rob Landley [Mon, 16 Mar 2015 18:25:29 +0000 (13:25 -0500)]
Rename a function to better describe what it does.

9 years agoI added error handling code in write_rotate().
Hyejin Kim [Mon, 16 Mar 2015 00:29:15 +0000 (19:29 -0500)]
I added error handling code in write_rotate().
I think that it is better to check tf->logfd before doing
truncate()/write() and getting error.

9 years agoMore ps cleanup, mostly refactoring.
Rob Landley [Sat, 14 Mar 2015 17:34:14 +0000 (12:34 -0500)]
More ps cleanup, mostly refactoring.

9 years agoMinor ps refactoring.
Rob Landley [Sat, 14 Mar 2015 02:33:34 +0000 (21:33 -0500)]
Minor ps refactoring.

9 years agoClean up sort help text.
Rob Landley [Sat, 14 Mar 2015 02:17:33 +0000 (21:17 -0500)]
Clean up sort help text.

Use tabs for option indent and don't have -g show up in menu (TOYBOX_FLOAT is
the decision).

9 years agoSwitch nsenter to default y.
Rob Landley [Thu, 12 Mar 2015 20:34:03 +0000 (15:34 -0500)]
Switch nsenter to default y.

9 years agoImplement shred -u and switch to default y in defconfig.
Rob Landley [Thu, 12 Mar 2015 20:32:50 +0000 (15:32 -0500)]
Implement shred -u and switch to default y in defconfig.

9 years agoRemove cat -v help text debris.
Rob Landley [Thu, 12 Mar 2015 20:16:13 +0000 (15:16 -0500)]
Remove cat -v help text debris.

9 years agoThe time command depends on floating point support.
Rob Landley [Thu, 12 Mar 2015 19:27:36 +0000 (14:27 -0500)]
The time command depends on floating point support.

9 years agoMake find accept numeric uid/gid, and simplify makedevs using the new infrastructure.
Rob Landley [Thu, 12 Mar 2015 19:21:33 +0000 (14:21 -0500)]
Make find accept numeric uid/gid, and simplify makedevs using the new infrastructure.

9 years agoMake install support numeric uid/gids (reported by Kylie McClain).
Rob Landley [Thu, 12 Mar 2015 19:20:10 +0000 (14:20 -0500)]
Make install support numeric uid/gids (reported by Kylie McClain).

9 years agoFactor out xgetgrnamid() and xgetpwnamid() into xwrap.c.
Rob Landley [Thu, 12 Mar 2015 16:11:08 +0000 (11:11 -0500)]
Factor out xgetgrnamid() and xgetpwnamid() into xwrap.c.

9 years agoFix mktemp when TMPDIR is set to empty string, reported by Kylie McClain.
Rob Landley [Thu, 12 Mar 2015 04:05:54 +0000 (23:05 -0500)]
Fix mktemp when TMPDIR is set to empty string, reported by Kylie McClain.

9 years agoAdd -m to mknod
Rob Landley [Tue, 10 Mar 2015 19:37:03 +0000 (14:37 -0500)]
Add -m to mknod

9 years agoUse xsignal() instead of signal().
Rob Landley [Tue, 10 Mar 2015 16:07:28 +0000 (11:07 -0500)]
Use xsignal() instead of signal().

9 years agoFix thinko (don't &toybuf to get scratch space) and add -v option.
Rob Landley [Mon, 9 Mar 2015 20:06:10 +0000 (15:06 -0500)]
Fix thinko (don't &toybuf to get scratch space) and add -v option.

9 years agoUpgrade oneit with -r (restart), -3 (send exiting PID values to child), and signal...
Rob Landley [Mon, 9 Mar 2015 19:52:32 +0000 (14:52 -0500)]
Upgrade oneit with -r (restart), -3 (send exiting PID values to child), and signal handling.

9 years agosed depends on -r to be rightmost flag to simplify the REG_EXTENDED test.
Rob Landley [Fri, 6 Mar 2015 22:50:54 +0000 (16:50 -0600)]
sed depends on -r to be rightmost flag to simplify the REG_EXTENDED test.

(If a flag is 1, you can multiply it by the value you want and get that value
else zero without a branch or conditional assignment.) So move -E one to the
left so FLAG_r is 1 again, and add a [+Er] suffix instead of testing
FLAG_r | FLAG_E in the users.

9 years agoThe "no }" error with find | xargs sed is because toy_init() wasn't blanking the...
Rob Landley [Fri, 6 Mar 2015 21:12:52 +0000 (15:12 -0600)]
The "no }" error with find | xargs sed is because toy_init() wasn't blanking the GLOBALS() block on a recursive call. (How that ever worked...)

9 years agoYank $STRIP from config (and STRIP=no weirdness) and just allow strip to fail.
Rob Landley [Fri, 6 Mar 2015 21:11:38 +0000 (15:11 -0600)]
Yank $STRIP from config (and STRIP=no weirdness) and just allow strip to fail.

9 years agoscripts/mkflags.c : main function need return 0 if normal exit
Hyejin Kim [Wed, 4 Mar 2015 13:29:57 +0000 (07:29 -0600)]
scripts/mkflags.c : main function need return 0 if normal exit

9 years agoQuick cleanup pass on tar.
Rob Landley [Wed, 4 Mar 2015 04:06:55 +0000 (22:06 -0600)]
Quick cleanup pass on tar.

9 years agoOn 64 bit, subtracting two pointers produces a long result. On 32 bit, it's an int...
Rob Landley [Tue, 3 Mar 2015 02:27:50 +0000 (20:27 -0600)]
On 64 bit, subtracting two pointers produces a long result. On 32 bit, it's an int. Even though long _is_ 32 bits on a 32 bit systems, gcc warns about it because reasons.

Also, the warning being that "expects int, but type is wchar_t"... no, type
is not wchar_t. Type is probably long. Specify the ACTUAL TYPE, not the random
typedef alias for it. If the translated type _did_ match, there wouldn't
be a warning! (This is why c89 promoted all arguments to int, precisely
so this wasn't a problem.)

9 years agoFix several printf_format warnings.
Rob Landley [Sun, 1 Mar 2015 22:43:01 +0000 (16:43 -0600)]
Fix several printf_format warnings.

9 years agoOnly switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG...
Rob Landley [Sun, 1 Mar 2015 22:35:05 +0000 (16:35 -0600)]
Only switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG enabled.

One again gcc manages to be incompetent about producing warnings. For example,
in bzcat we error_exit() with a message that's an error code fed into an
array of string constants, and apparently dereferencing an array of string
literals doesn't give you a string literal according to -Wformat-security.

Not breaking the code to humor the compiler here, the compiler is wrong.

9 years agolet the compiler check format strings
Elliott Hughes [Sun, 1 Mar 2015 22:16:50 +0000 (16:16 -0600)]
let the compiler check format strings

i'll be AFK for a week, so here's the patch i've been using this
evening to find other format string mistakes. BSD uses __printflike
and takes two arguments instead of hard-coding (1,2), but i figured
that as long as you don't need the generality you'd prefer not to have
it. and it's easy enough to retrofit if we ever do have a formatting
function that takes other arguments.

9 years agofix format problems in tar.c
Elliott Hughes [Sun, 1 Mar 2015 22:11:50 +0000 (16:11 -0600)]
fix format problems in tar.c

%o is unsigned, but off_t is signed.
* takes an int.
an error_msg call was missing an argument.

only one of these is an actual error, but i'd like to fix the others
too so that we (toybox, but if not, then Android) can turn on format
string warnings to prevent future bugs like the stat.c LP32 ones.

9 years agoPatches from Elliott Hughes to fix various printf() format strings.
Rob Landley [Sun, 1 Mar 2015 22:08:51 +0000 (16:08 -0600)]
Patches from Elliott Hughes to fix various printf() format strings.

(Don't specify the space flag when it's the default behavior. The ifconfig
stuff was actual bugs.)

9 years agoPatches from Elliott Hughes to add missing arguments to error_exit() calls.
Rob Landley [Sun, 1 Mar 2015 21:58:40 +0000 (15:58 -0600)]
Patches from Elliott Hughes to add missing arguments to error_exit() calls.

9 years agoremove accidental space in format string
Elliott Hughes [Sun, 1 Mar 2015 21:48:49 +0000 (15:48 -0600)]
remove accidental space in format string

the ' ' flag makes no sense for %c.

9 years agofix copy/paste-o in useradd.test
Elliott Hughes [Sun, 1 Mar 2015 21:35:48 +0000 (15:35 -0600)]
fix copy/paste-o in useradd.test

9 years agoCleanup pass on ps.
Rob Landley [Fri, 27 Feb 2015 18:17:30 +0000 (12:17 -0600)]
Cleanup pass on ps.

9 years ago0.5.2 release notes.
Rob Landley [Fri, 27 Feb 2015 14:13:24 +0000 (08:13 -0600)]
0.5.2 release notes.

9 years agoMinor toysh cleanup: remove another unnecessary option.
Rob Landley [Sun, 1 Mar 2015 01:54:03 +0000 (19:54 -0600)]
Minor toysh cleanup: remove another unnecessary option.

9 years agoBSD sed uses -E instead of -r to enable ERE.
Isabella Bosia [Sat, 28 Feb 2015 21:21:13 +0000 (15:21 -0600)]
BSD sed uses -E instead of -r to enable ERE.
GNU sed silently supports -E as an alias for -r too.

9 years agoAdd LDFLAGS and STRIP=no support.
Rob Landley [Sat, 28 Feb 2015 18:39:16 +0000 (12:39 -0600)]
Add LDFLAGS and STRIP=no support.

9 years agoAdd "make change" output to .hgignore
Rob Landley [Sat, 28 Feb 2015 18:35:12 +0000 (12:35 -0600)]
Add "make change" output to .hgignore

9 years agoMore 'splaining.
Rob Landley [Fri, 27 Feb 2015 03:07:33 +0000 (21:07 -0600)]
More 'splaining.

9 years agoAdded tag 0.5.2 for changeset 8ce8c5365f8b upstream/0.5.2
Rob Landley [Thu, 26 Feb 2015 02:42:24 +0000 (20:42 -0600)]
Added tag 0.5.2 for changeset 8ce8c5365f8b

9 years agostat -f didn't work on 32 bit systems because type sizes wrong (fix from Elliott...
Rob Landley [Wed, 25 Feb 2015 06:45:50 +0000 (00:45 -0600)]
stat -f didn't work on 32 bit systems because type sizes wrong (fix from Elliott Hughes).

9 years agoPatch from Isaac Dunham to add -r, fixed up so it doesn't try to include two flag...
Rob Landley [Wed, 18 Feb 2015 21:19:15 +0000 (15:19 -0600)]
Patch from Isaac Dunham to add -r, fixed up so it doesn't try to include two flag contexts simultaneously.

9 years agoSeparate 'userdel' from testing syntax.
Yeongdeok Suh [Wed, 18 Feb 2015 19:06:26 +0000 (13:06 -0600)]
Separate 'userdel' from testing syntax.

When I test toybox with toybox/tests/*.test scripts,
I got many false FAILs from it. So, I tried to fix useradd.test file.

9 years agoAdd --remove-destination longopt for -F because the host version doesn't have a short...
Rob Landley [Sun, 15 Feb 2015 21:44:26 +0000 (15:44 -0600)]
Add --remove-destination longopt for -F because the host version doesn't have a shortopt for it.

9 years agoOnly discard optargs in toy_exec() after finding the command to run (otherwise the...
Rob Landley [Sun, 15 Feb 2015 21:27:43 +0000 (15:27 -0600)]
Only discard optargs in toy_exec() after finding the command to run (otherwise the fallback exevp() segfaults).

9 years agoMake egrep and fgrep build standalone.
Rob Landley [Sat, 14 Feb 2015 20:59:30 +0000 (14:59 -0600)]
Make egrep and fgrep build standalone.

9 years agoFix --help for single.sh builds.
Rob Landley [Sat, 14 Feb 2015 20:54:36 +0000 (14:54 -0600)]
Fix --help for single.sh builds.

9 years agoSplit out unix2dos so scripts/single.sh and "make change" can build it standalone.
Rob Landley [Sat, 14 Feb 2015 20:05:00 +0000 (14:05 -0600)]
Split out unix2dos so scripts/single.sh and "make change" can build it standalone.

9 years agoMove guts of "make change" to scripts/change.sh, don't try to build sh or help standa...
Rob Landley [Sat, 14 Feb 2015 07:08:15 +0000 (01:08 -0600)]
Move guts of "make change" to scripts/change.sh, don't try to build sh or help standalone.

sh builtin commands need multiplexer, help describes other enabled commands.

9 years agoFix bug introduced by last commit (print template instead of toybuf).
Rob Landley [Thu, 12 Feb 2015 22:41:59 +0000 (16:41 -0600)]
Fix bug introduced by last commit (print template instead of toybuf).

Also, xstrdup() the unmodified template because changing the environment string
could make the changed version show up in "ps".

9 years agoOnly apply mktemp directory to targets that aren't already paths.
Rob Landley [Wed, 11 Feb 2015 23:10:28 +0000 (17:10 -0600)]
Only apply mktemp directory to targets that aren't already paths.

9 years agoFix longopts (pointed out by Hyejin Kim).
Rob Landley [Wed, 11 Feb 2015 04:51:23 +0000 (22:51 -0600)]
Fix longopts (pointed out by Hyejin Kim).

9 years agoOne more cleanup pass on hwclock factoring out common code.
Rob Landley [Mon, 9 Feb 2015 23:47:29 +0000 (17:47 -0600)]
One more cleanup pass on hwclock factoring out common code.

9 years agoInline rtc_open() and get_rtc_seconds(), perform resulting cleanups.
Rob Landley [Mon, 9 Feb 2015 23:33:59 +0000 (17:33 -0600)]
Inline rtc_open() and get_rtc_seconds(), perform resulting cleanups.

9 years agoCleanup/refactoring pass on hwclock.
Rob Landley [Mon, 9 Feb 2015 22:34:24 +0000 (16:34 -0600)]
Cleanup/refactoring pass on hwclock.

Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(),
inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(),
and set_sysclock_timezone().

/etc/adjtime is short enough we don't need to bother with a break.

The final "else" case in main() should always trigger because >0 in optstr
says "at most zero arguments", so the || at the end is always true, so
take the test off.

9 years agoPromote chcon to "other".
Rob Landley [Sun, 8 Feb 2015 22:38:38 +0000 (16:38 -0600)]
Promote chcon to "other".

9 years agoCleanup pass on chcon.
Rob Landley [Sun, 8 Feb 2015 22:38:11 +0000 (16:38 -0600)]
Cleanup pass on chcon.

9 years agoRewrite of a patch from Elliott Hughes to implement touch -h and switch API to utimen...
Rob Landley [Sun, 8 Feb 2015 22:33:24 +0000 (16:33 -0600)]
Rewrite of a patch from Elliott Hughes to implement touch -h and switch API to utimensat() which offers nanosecond granularity and UTIME_OMIT/UTIME_NOW.

9 years agoFor some reason, ifconfig was explicitly excluding "ifconfig lo:0 127.0.0.2" style...
Rob Landley [Sun, 8 Feb 2015 22:27:30 +0000 (16:27 -0600)]
For some reason, ifconfig was explicitly excluding "ifconfig lo:0 127.0.0.2" style alias address assignments. No idea why.

9 years agonetcfg is being removed, but shows up in the toybox roadmap.
Elliott Hughes [Sun, 8 Feb 2015 01:51:27 +0000 (19:51 -0600)]
netcfg is being removed, but shows up in the toybox roadmap.

9 years agoShameless meddling.
Rob Landley [Sun, 8 Feb 2015 01:45:23 +0000 (19:45 -0600)]
Shameless meddling.

9 years agoUse $TMPDIR if set (necessary on Android, where there is no /tmp).
Elliot Hughes [Sun, 8 Feb 2015 01:27:59 +0000 (19:27 -0600)]
Use $TMPDIR if set (necessary on Android, where there is no /tmp).
Include full template in error messages.
Don't report success on failure with -q.
Avoid unnecessary allocation.
Fix "xxxxxx" versus "XXXXXX" confusion.

9 years agoBuild standalone commands where "depends on" config entries need to be switched on.
Rob Landley [Sat, 7 Feb 2015 23:20:23 +0000 (17:20 -0600)]
Build standalone commands where "depends on" config entries need to be switched on.

9 years agoClean up the output of "make change".
Rob Landley [Sat, 7 Feb 2015 23:19:38 +0000 (17:19 -0600)]
Clean up the output of "make change".

9 years agoRemove xexec_optargs().
Rob Landley [Sat, 7 Feb 2015 22:23:59 +0000 (16:23 -0600)]
Remove xexec_optargs().

9 years agoCleanup pass on env, removing exec_optargs().
Rob Landley [Sat, 7 Feb 2015 22:23:03 +0000 (16:23 -0600)]
Cleanup pass on env, removing exec_optargs().

9 years agoMake toy_exec() check if argc is in optargs and deal with it there so we don't need...
Rob Landley [Sat, 7 Feb 2015 22:17:44 +0000 (16:17 -0600)]
Make toy_exec() check if argc is in optargs and deal with it there so we don't need a separate xexec_optargs().

9 years agoMerge unshare and nsenter (promoting and cleaning up nsenter).
Rob Landley [Sat, 7 Feb 2015 21:32:22 +0000 (15:32 -0600)]
Merge unshare and nsenter (promoting and cleaning up nsenter).

Needs more testing, don't have a test environment set up for this yet...

9 years agoIn rm, init using to AT_REMOVEDIR in the dir case earlier.
Rob Landley [Fri, 6 Feb 2015 23:31:52 +0000 (17:31 -0600)]
In rm, init using to AT_REMOVEDIR in the dir case earlier.

(If you had a chmod 000 directory and did rm -r on it without -f, after the prompt it would complain it was a directory.)

9 years agoAlright, the Android guys agree with the musl guys: faccessat(AT_SYMLINK_NOFOLLOW...
Rob Landley [Fri, 6 Feb 2015 22:42:44 +0000 (16:42 -0600)]
Alright, the Android guys agree with the musl guys: faccessat(AT_SYMLINK_NOFOLLOW) is not supported.

9 years agoCommit 1061 said "this gets expand off my to-review list". Remove it from the list.
Rob Landley [Sun, 25 Jan 2015 20:04:51 +0000 (14:04 -0600)]
Commit 1061 said "this gets expand off my to-review list". Remove it from the list.

9 years agoCleanup mountpoint and remove it from the pending README.
Rob Landley [Sun, 25 Jan 2015 19:11:58 +0000 (13:11 -0600)]
Cleanup mountpoint and remove it from the pending README.

9 years agobootchartd: Removing wrong free call to non-malloc'ed string.
Luis Felipe Strano Moraes [Thu, 22 Jan 2015 22:29:34 +0000 (16:29 -0600)]
bootchartd: Removing wrong free call to non-malloc'ed string.

9 years agoFix sed s//\[newline]/ line continuations.
Rob Landley [Thu, 22 Jan 2015 08:18:30 +0000 (02:18 -0600)]
Fix sed s//\[newline]/ line continuations.

The problem was that readline() was returning a newline at the end of each
string, which wasn't getting stripped in the parser and thus \ wasn't at the
end of a line for -f, it was escaping a literal newline, so the continuation
logic didn't trigger. Remove some redundant null checks while we're at it,
and don't bother terminating a string we don't return (yes we leak memory
in an error path, but it's about to error_exit() anyway).

9 years agofix hwclock's rtc selection
Elliott Hughes [Tue, 20 Jan 2015 22:03:29 +0000 (16:03 -0600)]
fix hwclock's rtc selection

For systems using /dev/rtcN, /dev/rtc0 isn't necessarily the RTC
that's used to provide the system time at boot time. We need to search
for the RTC whose /sys/class/rtc/rtcN/hctosys contains "1".

9 years agofix typo in printf
Elliott Hughes [Tue, 20 Jan 2015 21:52:41 +0000 (15:52 -0600)]
fix typo in printf

9 years agoRemove trailing whitespace.
Rob Landley [Sun, 18 Jan 2015 20:06:14 +0000 (14:06 -0600)]
Remove trailing whitespace.

9 years agoLift the basename/libgen.h shenanigans back out of portability.c and make it a static...
Rob Landley [Sun, 18 Jan 2015 19:44:24 +0000 (13:44 -0600)]
Lift the basename/libgen.h shenanigans back out of portability.c and make it a static inline in portability.h, and prototype dirname() while we're at it.

9 years agofix non-glibc basename(3) usage
Elliott Hughes [Sun, 18 Jan 2015 19:36:31 +0000 (13:36 -0600)]
fix non-glibc basename(3) usage

I considered a #else on the big #ifdef __GLIBC__ above, but that
seemed harder to follow.

9 years agoMove pty.h back to toys.h (under LSB 4.1 headers).
Rob Landley [Fri, 16 Jan 2015 19:55:32 +0000 (13:55 -0600)]
Move pty.h back to toys.h (under LSB 4.1 headers).

9 years agoAOSP master has <pty.h> and builds netcat/nc.
Elliott Hughes [Fri, 16 Jan 2015 19:49:23 +0000 (13:49 -0600)]
AOSP master has <pty.h> and builds netcat/nc.

9 years agoid.c #ifdefectomy. (ifdefs belong in headers, not in C code.)
Rob Landley [Fri, 16 Jan 2015 19:43:09 +0000 (13:43 -0600)]
id.c #ifdefectomy. (ifdefs belong in headers, not in C code.)

9 years agoThis patch adds a TOYBOX_SELINUX configuration option to control both
Elliott Hughes [Fri, 16 Jan 2015 19:36:53 +0000 (13:36 -0600)]
This patch adds a TOYBOX_SELINUX configuration option to control both
the SELinux commands (such as chcon) and the SELinux-specific options
to regular commands (such as ls -Z).

This lets us #include <selinux/selinux.h> in portability.h.

I've also fixed chcon to insist on being given the a context argument.

This patch also adds -Z to id and fixes id's regular output (-G should
be separated by spaces, non-G output should be separated by commas,
and you don't want a double comma where the egid is omitted from the
list of groups).

9 years agoAdded tag 0.5.1 for changeset 62a7d617e1ce
Rob Landley [Fri, 16 Jan 2015 01:09:08 +0000 (19:09 -0600)]
Added tag 0.5.1 for changeset 62a7d617e1ce

9 years agoSwitch netcat to stop parsing command line at first nonoption argument instead of...
Rob Landley [Wed, 14 Jan 2015 19:59:10 +0000 (13:59 -0600)]
Switch netcat to stop parsing command line at first nonoption argument instead of stopping after -l or -L.

Hyejin Kim tried "toyboxd nc nc -p 1234 -l rm mv ps" (which attempted to run
"nc rm mv ps") and "toybox nc -l -p 1234" (which attempted to run "-p 1234")
and found the behavior confusing. So make it work like xargs, where all
netcat options have to come before the start of any child command.

9 years agoMake touch -d miliseconds work. (Still only 6 digits precision instead of 9, but...
Rob Landley [Wed, 14 Jan 2015 19:54:34 +0000 (13:54 -0600)]
Make touch -d miliseconds work. (Still only 6 digits precision instead of 9, but it's a start.)

9 years agoi found a few problems while manually smoke testing toybox chown versus toolbox ...
Elliott Hughes [Wed, 14 Jan 2015 09:43:49 +0000 (03:43 -0600)]
i found a few problems while manually smoke testing toybox chown versus toolbox (NetBSD) chown...

new test:

and here's the patch to fix "owner:" ":group" and the ":" special case:

9 years agoLet chown build standalone.
Rob Landley [Wed, 14 Jan 2015 06:31:06 +0000 (00:31 -0600)]
Let chown build standalone.

9 years agosed bugfix: N or n at end of script would save the terminating NULL as the resume...
Rob Landley [Tue, 13 Jan 2015 10:28:19 +0000 (04:28 -0600)]
sed bugfix: N or n at end of script would save the terminating NULL as the resume position, so the script would restart from beginning.

9 years agosed s/// can have line continuations in the replacement part, with or without a ...
Rob Landley [Tue, 13 Jan 2015 09:35:37 +0000 (03:35 -0600)]
sed s/// can have line continuations in the replacement part, with or without a \ escaping the newline.

9 years agoPromote printf.
Rob Landley [Sun, 11 Jan 2015 16:17:58 +0000 (10:17 -0600)]
Promote printf.

9 years agoOne more bugfix for printf.c, with test suite entry. (Make %-3d etc work.)
Rob Landley [Sun, 11 Jan 2015 16:16:38 +0000 (10:16 -0600)]
One more bugfix for printf.c, with test suite entry. (Make %-3d etc work.)

9 years agoCleanup pass on printf.
Rob Landley [Sun, 11 Jan 2015 07:22:36 +0000 (01:22 -0600)]
Cleanup pass on printf.

Alas, passing a union as the last argument to printf does not appear to work
reliably, and there's no obvious way to manually assemble varargs in a portable
manner. So I have to repeat the printf once for each data type. Oh well.

9 years agoMore half-finished cleanup of printf.c, and more test suite entries.
Rob Landley [Sun, 11 Jan 2015 02:02:21 +0000 (20:02 -0600)]
More half-finished cleanup of printf.c, and more test suite entries.

9 years agoSince "printf" is a shell builtin, printf.test wasn't actually testing anything.
Rob Landley [Tue, 6 Jan 2015 21:06:51 +0000 (15:06 -0600)]
Since "printf" is a shell builtin, printf.test wasn't actually testing anything.

9 years agoMore printf cleanup, and test suite entries.
Rob Landley [Tue, 6 Jan 2015 18:07:20 +0000 (12:07 -0600)]
More printf cleanup, and test suite entries.

Fixes bug introduced last time where toys.optargs was both snapshotted and used
directly and the two fell out of sync.

9 years agoFix sed backslash parsing in square bracket pattern sections.
Rob Landley [Sun, 4 Jan 2015 09:50:52 +0000 (03:50 -0600)]
Fix sed backslash parsing in square bracket pattern sections.

9 years agoAnother cleanup pass on printf.
Rob Landley [Sun, 4 Jan 2015 02:31:41 +0000 (20:31 -0600)]
Another cleanup pass on printf.

9 years agoMove fflush() checking to xexit() and have exit paths in main() call that.
Rob Landley [Sat, 3 Jan 2015 22:25:36 +0000 (16:25 -0600)]
Move fflush() checking to xexit() and have exit paths in main() call that.

9 years agoCleanup pass on printf.
Rob Landley [Sat, 3 Jan 2015 03:28:39 +0000 (21:28 -0600)]
Cleanup pass on printf.

9 years agoNeed to update install.c for the changed OLDTOY() argument list.
Rob Landley [Fri, 2 Jan 2015 06:44:27 +0000 (00:44 -0600)]
Need to update install.c for the changed OLDTOY() argument list.