#include <stdio.h>
#include <stdlib.h>
#include <string.h>

const char white_space[] = { 011, 012, 013, 014, 015, 040, NULL};

char ** parse(char buf[])
{
	int i=0;
	char **p;
	p = malloc(sizeof(char*));
	p[i] = strtok(buf,white_space);
	while((p[++i] = strtok(NULL,white_space)))
		 p = realloc(p,sizeof(char*)*(i+1));
	return p;
}

int main(void)
{
	int i=0;
	char **p, test[] = "this is a test";
	p = parse(test);
	while(p[i])
		printf("{%s}",p[i++]);
	printf("\n");
	free(p);
	return 0;
}
