1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00

added wtokennext()

This commit is contained in:
kojima
2000-09-26 22:44:38 +00:00
parent ce8b816c5d
commit 3de3009cee
2 changed files with 5 additions and 3 deletions

View File

@@ -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);

View File

@@ -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**));