From 21ede0889bc585828c7dbd7023f93b491ce07944 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 29 Dec 2015 10:16:45 -0600 Subject: Move comma_args() from ps.c to lib. (Moved header a while ago, forgot to check in function move.) --- toys/posix/ps.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'toys/posix') 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; -- cgit v1.2.3