summaryrefslogtreecommitdiff
path: root/lib/lib.c
AgeCommit message (Expand)AuthorFilesLines
2015-08-01Move strlower() from find to lib.Rob Landley1-0/+35
2015-07-10Add a basename_r() and use it in names_to_pid() to avoid basename() overwritingRob Landley1-1/+9
2015-05-08Move not-curses code into interstingtimes.cRob Landley1-118/+0
2015-04-30Remove redundant numlen.Rob Landley1-10/+0
2015-04-27Some infrastructure hexedit needs. (Poor man's curses.)Rob Landley1-0/+98
2015-04-19Cleanup getprop, add qstrcmp() to lib for qsort (because posix-2008 brokeRob Landley1-0/+8
2015-04-16terminal_size should use LINES, not ROWS.Elliott Hughes1-1/+1
2015-04-03Add readfileat() to libRob Landley1-4/+7
2015-03-23Tweak of Elliott Hughes's fix for an off by one error in human_readableRob Landley1-2/+2
2015-01-18Remove trailing whitespace.Rob Landley1-1/+1
2015-01-01strtol() doesn't return error indicator for overflow, it just sets errno. So ...Rob Landley1-5/+23
2014-12-22Allocate space for null terminator.Rob Landley1-2/+1
2014-12-13Add base64.Rob Landley1-0/+15
2014-12-13Remove more strncpy() calls.Rob Landley1-2/+3
2014-10-27O_CLOEXEC was confusing the O_RDONLY test in loopfiles(), resulting in attemp...Rob Landley1-2/+2
2014-10-18Factor out printf-style escape parsing logic from echo.c.Rob Landley1-0/+8
2014-10-14Use O_CLOEXEC instead of O_RDONLY to signal loopfiles_rw() to close filehandles.Rob Landley1-5/+5
2014-08-15If string_to_mode() is called on a base mode with S_ISDIR() and such set, pas...Rob Landley1-4/+6
2014-07-21Little endian and big endian versions of peek (for host.c).Rob Landley1-14/+24
2014-07-19find needs "c" suffix to -size.Rob Landley1-3/+3
2014-06-24find_in_path() is supposed to work with a NULL path, but didn't. Fix it.Rob Landley1-2/+5
2014-06-09Forgot to check in strstart().Rob Landley1-0/+10
2014-05-21Add generic_signal() handler, which sets toys.signal and writes byte to toys....Rob Landley1-0/+12
2014-05-06Switch human_readable() to just outputing decimal kilo/mega/gigabytes, make d...Rob Landley1-0/+23
2014-05-02In function readfile(), the buffer buf is free'd when readall() fails. This ...Ashwini Sharma1-3/+5
2014-03-24Fix mkdir -p with absolute paths.Rob Landley1-6/+3
2014-03-11Move mkpathat to lib, remove redundant function used by patch.Rob Landley1-0/+49
2014-03-11Add "volatile" annotation to peek/poke to stop potential optimizer overreach.Rob Landley1-8/+8
2014-02-28Fix another bug reported by Ashwini Sharma.Rob Landley1-1/+1
2014-02-16Various cleanups found by Tom Sparrow's static analysis.Rob Landley1-1/+1
2013-12-19Move names_to_pid from pending to lib.Rob Landley1-0/+25
2013-12-08Doing math on void pointers isn't portable, reported by Nathan McSween.Rob Landley1-1/+1
2013-11-28Oops, cleaned up ifconfig uses atolx_range() instead of get_int_list(). Check...Rob Landley1-0/+10
2013-11-07Tweak terminal_size to never set either to 0, and return true/false whether i...Rob Landley1-6/+10
2013-10-27Refactor terminal querying.Rob Landley1-16/+15
2013-09-16Fix -t c0 and -J as reported by heehooman at gmail on the list.Rob Landley1-12/+19
2013-09-03Introduce libbuf analogous to toybuf but for use by lib/*.c. Change readfile(...Rob Landley1-12/+19
2013-09-03Remove itoa/utoa, let libc do this with sprintf.Rob Landley1-56/+0
2013-08-27Rewrite pmap to be simpler and match other implementation's output more closely.Rob Landley1-0/+2
2013-08-08Achille Fouilleul pointed out that fdlength wasn't returning the right length...Rob Landley1-18/+18
2013-07-16Split lib/xwrap.c from lib/lib.cRob Landley1-468/+1
2013-07-14New stuff added to lib.c needs review too, so make a lib/pending.c and move s...Rob Landley1-109/+0
2013-07-12add grepStrake1-0/+22
2013-06-16Add xexit() and make error_exit() use it.Rob Landley1-4/+8
2013-06-02Stat cleanup.Rob Landley1-5/+5
2013-06-01Enable readfile() and add peek() and poke() functions.Rob Landley1-6/+34
2013-05-19xioctl() error message should use hex ioctl number; that's what headers list.Rob Landley1-1/+1
2013-04-29Fix xabspath when last path component exists but we haven't got permissions t...Rob Landley1-0/+1
2013-04-22Add library function for the file permission formatting in ls and statFelix Janda1-0/+26
2013-04-26Add posix headers to toynet.h, move xioctl() to lib.c, introduce lib/net.c an...Rob Landley1-0/+22