diff options
author | Rob Landley <rob@landley.net> | 2015-12-29 10:16:45 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-12-29 10:16:45 -0600 |
commit | 21ede0889bc585828c7dbd7023f93b491ce07944 (patch) | |
tree | 48c3985a7014af34a5607a06bdf835d554d252ae | |
parent | 4b4ab6a50998219cd94139c5669ef9a624c8f58f (diff) | |
download | toybox-21ede0889bc585828c7dbd7023f93b491ce07944.tar.gz |
Move comma_args() from ps.c to lib.
(Moved header a while ago, forgot to check in function move.)
-rw-r--r-- | toys/posix/ps.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c index 44d5b572..fda0635c 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -622,23 +622,6 @@ static int get_ps(struct dirtree *new) return ksave; } -// Traverse arg_list of csv, calling callback on each value -void comma_args(struct arg_list *al, void *data, char *err, - char *(*callback)(void *data, char *str, int len)) -{ - char *next, *arg; - int len; - - while (al) { - arg = al->arg; - while ((next = comma_iterate(&arg, &len))) - if ((next = callback(data, next, len))) - perror_exit("%s '%s'\n%*c", err, al->arg, - (int)(5+strlen(toys.which->name)+strlen(err)+next-al->arg), '^'); - al = al->next; - } -} - static char *parse_ko(void *data, char *type, int length) { struct strawberry *field; |