aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
AgeCommit message (Collapse)Author
2013-08-18Remove files du no longer needs.Rob Landley
2013-08-10Add daemonize function to lib for klogd and syslogdFelix Janda
2013-08-07Forgot to check in xfdopen(). My bad.Rob Landley
Failure of fdopen() is most likely failure of malloc() for the FILE structure.
2013-07-17Add timeout, factoring out common code from sleep.Rob Landley
2013-07-16Split lib/xwrap.c from lib/lib.cRob Landley
2013-07-12add grepStrake
2013-06-16Add xexit() and make error_exit() use it.Rob Landley
2013-06-02Stat 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-01Add peek/poke to header file.Rob Landley
2013-05-10Convert getmountlist() to xgetmountlist().Rob Landley
2013-04-22Add library function for the file permission formatting in ls and statFelix Janda
2013-04-26Add posix headers to toynet.h, move xioctl() to lib.c, introduce lib/net.c ↵Rob Landley
and move xsocket() to it.
2013-04-20More ifconfig cleanup.Rob Landley
2013-04-14Move guts of help command into show_help() in lib/help.c, with config ↵Rob Landley
TOYBOX_HELP controlling infrastructure.
2013-03-17Remove unused min/max macros.Rob Landley
2012-12-31Make dirtree_handle_callback() start with dirtree_ like the rest of the ↵Rob Landley
dirtree functions.
2012-12-16Extend killall with support for -v and -iElie De Brauwer
2012-12-08Adding -s (single shot) and -o (omit pids) options to pidofElie De Brauwer
2012-12-06Have dirtree_add_node() set parent so error message can provide full path.Rob Landley
2012-12-01Remove unused structure definition.Rob Landley
2012-11-23Add expand command as described in POSIX-2008.Jonathan Clairembault
Erratum: Do not handle backspace.
2012-11-22Remove readlink -m for being poorly defined ("readlink -m ↵Rob Landley
/dev/null/and/more" answers what question, exactly?), rewrite xabspath() to work right and not depend on realpath, fix subtle longstanding bug in llist_traverse().
2012-11-20Update readlink so -f works. Add -menq while there.Rob Landley
2012-11-16Add cut from Jason Kyungwan Han.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-08-26Add du command.Ashwini Kumar
2012-07-30Add signal handler to clean up tempfile.Rob Landley
2012-07-21Use "_password" instead of "_passwd" for names in lib/password.c.Rob Landley
2012-07-17Add passwd by Kyungwan Han.Rob Landley
2012-07-15Genericize llist code a bit: rename llist_free() to llist_traverse(), and no ↵Rob Landley
longer accept NULL as a synonym for free.
2012-07-15New infrastructure for od (oops).Rob Landley
2012-06-24Unify chown and chgrp, add support for -hHLP flags.0.3.1Rob Landley
2012-06-16Add dirtree_parentfd()Rob Landley
2012-06-09Implement DIRTREE_SYMFOLLOW and ls -cSHL.Rob Landley
2012-06-03Update chmod to work with new dirtree, and fix bugs in string_to_mode().Rob Landley
2012-06-01Changed my mind about the design again, now callback is dirtree_opennode() ↵Rob Landley
and recursion choice is how caller interprets flags.
2012-06-01Factor out dirtree_comeagain() callback, setting up depth-first search with ↵Rob Landley
open filehandle in node->extra.
2012-06-01Add xrealpath() at suggestion of Ashish Briggers.Rob Landley
2012-05-20dirtree logic cleanup: switch DIRTREE_NORECURSE and DIRTREE_NOSAVE to ↵Rob Landley
DIRTREE_RECURSE and DIRTREE_SAVE.
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-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-12Redo tail to use optargs and optionally support lseek. Add support to ↵Rob Landley
optargs and llist.c, plus add a test suite entry. Still no -f support though.
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-18And again, I forgot to check in a file. Oops.Rob Landley
2012-02-18Add killall by Andreas Heck, and factor out common pid code to lib.h.Rob Landley
2012-02-02Quick and dirty terminal_size() and yesno() functions, both of which need to ↵Rob Landley
be improved.
2012-02-02Commit 415 needs the other two files. (Oops.)Rob Landley
2011-12-12Forgot to check in loopfiles_rw changes needed by truncate.Rob Landley
2010-01-05Add TOYBOX_SUID.Rob Landley