Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-01-05 | Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format | Rob Landley | |
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts. | |||
2015-12-29 | Add strafter() to lib. | Rob Landley | |
2015-12-27 | Add scan_key_getsize() doing the ANSI probe, switch scan_key() to TAGGED_ARRAY, | Rob Landley | |
and add test_scankey. | |||
2015-11-26 | Split do_ps() into get_ps() and show_ps() as a start on implementing --sort. | Rob Landley | |
Change readfileat() to pass back length of read. | |||
2015-11-02 | If chomp() needs to test it found \n, should also test it's at end of string. | Rob Landley | |
2015-11-02 | Add ps -Z. | Elliott Hughes | |
As with ls, it doesn't seem like -Z should be guarded behind LSM availability. On a non-SELinux system, the label is always "unconfined". | |||
2015-09-29 | help_exit() tweak. | Rob Landley | |
2015-09-11 | Replace toys.exithelp with help_exit() in lib. | Rob Landley | |
2015-09-07 | Remove prompt argument from yesno(), caller can fprintf(stderr, "blah") itself. | Rob Landley | |
This fixes the build break, the change to yesno() prototype accidentally got checked in last commit. (Oops, sorry.) | |||
2015-09-06 | Switch HR_SI to HR_1000, make binary the default, make HR_B only affect bytes, | Rob Landley | |
and update the tests. | |||
2015-09-03 | Make human_readable() handle base 1024 units without floating point. | Rob Landley | |
Rounds correctly via brute force, displayed digits are decimal even when working with powers of 2, shows at most 3 significant (decimal) digits. (So no "1023M" nonsense, that's 1.0G.) | |||
2015-08-08 | Different tools have different ideas about what human-readable output | Elliott Hughes | |
looks like. dd uses "7 MB" where du uses "7M", for example. this patch adds flags, similar to the BSD humanize_number. most callers will pass 0. | |||
2015-08-08 | First pass at proper bunzip2 command line handling. | Rob Landley | |
2015-08-01 | Move strlower() from find to lib. | Rob Landley | |
2015-07-10 | Add a basename_r() and use it in names_to_pid() to avoid basename() overwriting | Rob Landley | |
itself on some inputs. (Which makes killall really impolite. Bug report from Nicholas Noury via Elliott Hughes.) | |||
2015-05-08 | Move not-curses code into interstingtimes.c | Rob Landley | |
2015-04-30 | Remove redundant numlen. | Rob Landley | |
2015-04-27 | Some infrastructure hexedit needs. (Poor man's curses.) | Rob Landley | |
2015-04-19 | Cleanup getprop, add qstrcmp() to lib for qsort (because posix-2008 broke | Rob Landley | |
alphasort), add compile-time probe for config symbol TOYBOX_ON_ANDROID. | |||
2015-04-16 | terminal_size should use LINES, not ROWS. | Elliott Hughes | |
The shell's pseudo-variable is called LINES. This is true of at least bash and mksh. | |||
2015-04-03 | Add readfileat() to lib | Rob Landley | |
2015-03-23 | Tweak of Elliott Hughes's fix for an off by one error in human_readable | Rob Landley | |
(137 returned "137 KB".) | |||
2015-01-18 | Remove trailing whitespace. | Rob Landley | |
2015-01-01 | strtol() doesn't return error indicator for overflow, it just sets errno. So ↵ | Rob Landley | |
add estrtol() (which clears errno first), and xstrtol() (which error_exit()s on overflow). | |||
2014-12-22 | Allocate space for null terminator. | Rob Landley | |
2014-12-13 | Add base64. | Rob Landley | |
The tizen guys wanted this. Yeah, I know there's base64 code in uuencode/uudecode, but that this has -i, input lines aren't of fixed length, encode/decode are in same file, there's no prefix/suffix code, it always writes to stdout... Eliminating the code duplication wouldn't be worth the if/else I'd have to add, so I just did a new one. Factored out the base64 table init into lib.c though: that was worth sharing. | |||
2014-12-13 | Remove more strncpy() calls. | Rob Landley | |
The semantics of strncat() and strncpy() are non-obvious, so let's not use 'em. Both zero all their remaining buffer space, and with strncat() the size is the space left at the _end_ of the string (not the size of the buffer) so it's way too easy to stomp memory you don't own. As long as we have to measure stuff ourselves to get it right, just use memcpy(). | |||
2014-10-27 | O_CLOEXEC was confusing the O_RDONLY test in loopfiles(), resulting in ↵ | Rob Landley | |
attempts to read from stdout instead of stdin for "-" or no arguments. | |||
2014-10-18 | Factor out printf-style escape parsing logic from echo.c. | Rob Landley | |
2014-10-14 | Use O_CLOEXEC instead of O_RDONLY to signal loopfiles_rw() to close filehandles. | Rob Landley | |
2014-08-15 | If string_to_mode() is called on a base mode with S_ISDIR() and such set, ↵ | Rob Landley | |
pass those extra bits through. | |||
2014-07-21 | Little endian and big endian versions of peek (for host.c). | Rob Landley | |
2014-07-19 | find needs "c" suffix to -size. | Rob Landley | |
2014-06-24 | find_in_path() is supposed to work with a NULL path, but didn't. Fix it. | Rob Landley | |
2014-06-09 | Forgot to check in strstart(). | Rob Landley | |
2014-05-21 | Add generic_signal() handler, which sets toys.signal and writes byte to ↵ | Rob Landley | |
toys.signalfd if set. | |||
2014-05-06 | Switch human_readable() to just outputing decimal kilo/mega/gigabytes, make ↵ | Rob Landley | |
du use it, move it from lib/pending.c to lib.c. | |||
2014-05-02 | In function readfile(), the buffer buf is free'd when readall() fails. This ↵ | Ashwini Sharma | |
free can cause a crash, if the buffer passed by user of function is not malloc'ed one. names_to_pid() is one usecase example here. | |||
2014-03-24 | Fix mkdir -p with absolute paths. | Rob Landley | |
Stripping leading / is not the right thing to do there. Broken when the code moved to lib and was genericized for use elsewhere. | |||
2014-03-11 | Move mkpathat to lib, remove redundant function used by patch. | Rob Landley | |
2014-03-11 | Add "volatile" annotation to peek/poke to stop potential optimizer overreach. | Rob Landley | |
2014-02-28 | Fix another bug reported by Ashwini Sharma. | Rob Landley | |
2014-02-16 | Various cleanups found by Tom Sparrow's static analysis. | Rob Landley | |
2013-12-19 | Move names_to_pid from pending to lib. | Rob Landley | |
2013-12-08 | Doing math on void pointers isn't portable, reported by Nathan McSween. | Rob Landley | |
2013-11-28 | Oops, cleaned up ifconfig uses atolx_range() instead of get_int_list(). ↵ | Rob Landley | |
Check that in. | |||
2013-11-07 | Tweak terminal_size to never set either to 0, and return true/false whether ↵ | Rob Landley | |
it could determine at least one coordinate. (If you set $COLUMNS but not $ROWS, we assume you're happy with the 80x25 default for the other.) | |||
2013-10-27 | Refactor terminal querying. | Rob Landley | |
2013-09-16 | Fix -t c0 and -J as reported by heehooman at gmail on the list. | Rob Landley | |
Also fix up help text, and hook up -c. | |||
2013-09-03 | Introduce libbuf analogous to toybuf but for use by lib/*.c. Change ↵ | Rob Landley | |
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL. |