aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
AgeCommit message (Collapse)Author
2012-11-16Add rebound support to intercept error_exit() and longjmp instead.Rob Landley
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
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.
2012-10-07Fix thinko in xpidfile()Rob Landley
2012-08-26Add du command.Ashwini Kumar
2012-07-30Add signal handler to clean up tempfile.Rob Landley
2012-07-23Workaround longstanding glibc/ld bug, ala ↵0.4.0Rob Landley
http://sources.redhat.com/bugzilla/show_bug.cgi?id=3400, which prevents "./toybox | wc" from producing any output when toybox was statically linked.
2012-07-21Make chmod +w respect umask, implement +s and +t, fix ls to show ↵Rob Landley
suid/sgid/stid without x bit.
2012-07-15New infrastructure for od (oops).Rob Landley
2012-06-30Add NOP b (byte) suffix to atolx() since od needs it.Rob Landley
2012-06-22Minor code refactoring.Rob Landley
2012-06-09Feeding -1 to xdup() isn't an error.Rob Landley
2012-06-03Update chmod to work with new dirtree, and fix bugs in string_to_mode().Rob Landley
2012-06-01Add xrealpath() at suggestion of Ashish Briggers.Rob Landley
2012-05-16First pass at a complete rewrite of string_to_mode(). (It compiled!)Rob Landley
2012-04-14Rewrite dirtree so we don't need readdir, scandir, and fts.h. Rewrite ls ↵Rob Landley
(from scratch) to use new dirtree infrastructure. (This breaks everything else that currently uses dirtree.)
2012-03-20Using /dev/tty for yesno() is wrong because yes 'n' | cp -ial needs to work.Rob Landley
2012-03-19Unwind gratuitous macros.Rob Landley
2012-03-19Add string to mode_t parserDaniel Walter
added new function string_to_mode(char *m_string, mode_t base) which parses a given string and converts it to a mode_t. If either + or - are part of m_string the permissions are either added or removed from base. Currently support for permision copy is missing (e.g. g=u), but all other flags should work. Format for m_string: either symbolic modes or octal representation. symbolic modes: [auog][[+-=][rwxst]*] examples: string_to_mode("u=rwx,g=rw,o=r", 0); string_to_mode("a-x", 0777); string_to_mode("0744", 0);
2012-03-19Remove "feature test macros", replace non-portable fdprintf() with standard ↵Rob Landley
fprintf().
2012-03-08More stabs at getting #includes right, and moving off of deprecated functions.Rob Landley
2012-02-27Upgrade yesno() and make cp -i use it.Rob Landley
2012-02-26Factor out common code between killall/kill and move it to lib/lib.c, plus ↵Rob Landley
cleanups on kill.c.
2012-02-18Nathan McSween convinced me compilers that inline memset() can optimize the ↵Rob Landley
bzero case pretty well.
2012-02-18Cleanups to pidof (including some global infrastructure shared with killall).Rob Landley
2012-02-18Add killall by Andreas Heck, and factor out common pid code to lib.h.Rob Landley
2012-02-09Make atolx() error_exit() if fed a string that doesn't convert entirely into ↵Rob Landley
an integer.
2012-02-02Quick and dirty terminal_size() and yesno() functions, both of which need to ↵Rob Landley
be improved.
2011-12-28Bugfix (spotted by Nathan McSween): xread can't detect <0 if the return type ↵Rob Landley
is stored in an unsigned variable.
2011-12-12Forgot to check in loopfiles_rw changes needed by truncate.Rob Landley
2011-11-13xreadall() returns void... how does that even compile?Rob Landley
2010-01-05Add TOYBOX_SUID.Rob Landley
2010-01-05Correct return types of xstrdup() and xstrndup()Rob Landley
2009-04-16Fix bug spotted by Jean-Christphe Dubois: reserve space for null terminator.Rob Landley
2009-01-25Fix thinko.Rob Landley
2009-01-18Add mkswap.Rob Landley
2009-01-05Add -N, -I, -L, and -P options to cksum.Rob Landley
2009-01-03Check in crc_init needed by cksum. (Oops.)Rob Landley
2008-07-18Tweak from Roberto Foglietta.Rob Landley
2008-07-18Roberto Foglietta pointed out that readall() needs fdlength() to restoreRob Landley
the original position before exiting.
2008-07-18Bug spotted by Roberto Foglietta: at EOF readall() should return count, not len.Rob Landley
2008-07-03Add "tee" command.Rob Landley
2008-05-17Fix which (the meaning of -a was reversed, and it was finding the _last_ hit).Rob Landley
2008-05-12Update mdev to work around the newest sysfs api breakage in the 2.6.25 kernel.Rob Landley
(Yeah, I know sysfs hasn't actually got an API, but I like to pretend...)
2008-04-13Teach get_rawline() to continue until a configurable char, and xstrndup()Rob Landley
shouldn't die when it's told to chop out a subsection of a string.
2008-01-27Add spaces after some commas (from Charlie Shepherd).Rob Landley
2008-01-25Remove extra newlines on error_pathsCharlie Shepherd
2008-01-25Fix filename in headerCharlie Shepherd
2008-01-27Teach perror_exit() to take a NULL argument when we just want "command: error".Rob Landley
2008-01-19Move NEWTOY() list from end of toylist.h to generated/newtoys.h.Rob Landley
2008-01-01Fix loopfiles to not call function() on file not found.0.0.4Rob Landley