Age | Commit message (Collapse) | Author | |
---|---|---|---|
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. | |||
2013-09-03 | Remove itoa/utoa, let libc do this with sprintf. | Rob Landley | |
2013-08-27 | Rewrite pmap to be simpler and match other implementation's output more closely. | Rob Landley | |
2013-08-08 | Achille Fouilleul pointed out that fdlength wasn't returning the right ↵ | Rob Landley | |
length in the binary search case. (This code was originally written for mke2fs, and applies to block devices. The regular file case should just return the length from stat. The ioctl is left commented out in case I want to add back code to check the size of CDROMs without spinning them up again; not sure the sector size is always right these days.) | |||
2013-07-16 | Split lib/xwrap.c from lib/lib.c | Rob Landley | |
2013-07-14 | New stuff added to lib.c needs review too, so make a lib/pending.c and move ↵ | Rob Landley | |
several functions to it. | |||
2013-07-12 | add grep | Strake | |
2013-06-16 | Add xexit() and make error_exit() use it. | Rob Landley | |
2013-06-02 | Stat cleanup. | Rob Landley | |
lib: rename format_mode() to mode_to_string() (echoing string_to_mode), make it take a normal char * argument. stat: collapse big switch/case statements that only have one line each into if/else staircase (much fewer lines of code). Remove return type (other stat implementations print ? for unknown escapes, so do that here). Inline do_stat() and do_statfs(). Set default string in normal local variable "format". Remove unnecessary struct d. Restructure stat logic to "if (flagf && !statfs()) else if (!flagf && !stat()) else perror_msg();" Teach %N to add -> symlink. Judicious use of putchar() instead of xputc to let FILE * do its job collating output. | |||
2013-06-01 | Enable readfile() and add peek() and poke() functions. | Rob Landley | |
2013-05-19 | xioctl() error message should use hex ioctl number; that's what headers list. | Rob Landley | |
2013-04-29 | Fix xabspath when last path component exists but we haven't got permissions ↵ | Rob Landley | |
to open it (ala readlink -f /dev/sda as a normal user). Spotted by Ashwini Sharma. |