From 3de3009cee93fe0e2e0b2cb2b3d24d7923316fe5 Mon Sep 17 00:00:00 2001 From: kojima Date: Tue, 26 Sep 2000 22:44:38 +0000 Subject: [PATCH] added wtokennext() --- WINGs/WUtil.h | 2 ++ WINGs/string.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WINGs/WUtil.h b/WINGs/WUtil.h index 0cbdec86..04a33407 100644 --- a/WINGs/WUtil.h +++ b/WINGs/WUtil.h @@ -242,6 +242,8 @@ char *wstrappend(char *dst, char *src); void wtokensplit(char *command, char ***argv, int *argc); +char *wtokennext(char *word, char **next); + char *wtokenjoin(char **list, int count); void wtokenfree(char **tokens, int count); diff --git a/WINGs/string.c b/WINGs/string.c index ec4f0b50..172216ac 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -32,8 +32,8 @@ static DFA mtable[9][6] = { {{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */ }; -static char* -next_token(char *word, char **next) +char* +wtokennext(char *word, char **next) { char *ptr; char *ret, *t; @@ -95,7 +95,7 @@ wtokensplit(char *command, char ***argv, int *argc) count = 0; line = command; do { - token = next_token(line, &line); + token = wtokennext(line, &line); if (token) { if (count == 0) *argv = wmalloc(sizeof(char**)); -- 2.11.4.GIT