/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* parse_cmd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: dkaiser next; result = malloc(sizeof(char *) * (i + 1)); if (result == NULL) return (free_tokens(*tokens), NULL); cur = *tokens; i = 0; while (cur != NULL && cur->type == STRING_TOKEN) { if (cur->previous) free_token(cur->previous); result[i] = cur->content.string; i++; cur = cur->next; } result[i] = NULL; return (result); }