unsigned int make_argument_array(char ***buf, const char *str) {
unsigned int make_argument_array(char ***bufp, const char *str) {
unsigned int make_argument_array(char ***buf, const char *str) {    unsigned int x = 0, y = 0, z = 0, count = 0, length;    char *temp, *backptr;    char **argv;        if(blankstr(str))        return 0;        length = strlen(str);        while(str[x++] == ' ') z++;    if(z >= length)        return 0;        for(;x < length;x++) {        if((str[x] == ' ') && (str[x+1] != ' ') && (str[x+1] != 0))            count++;    }    count++;        argv = (char**)mallocm(count*sizeof(char*));    if(argv == NULL) {        make_warning("Couldn't allocate space needed for make_argument_array()");        return 0;    }        temp = (char*)callocm(length+1, sizeof(char));    if(temp == NULL) {        freem(argv);        return 0;    }    backptr = temp;            xstrcpy(temp, str, length+1);        temp += z;    for(x = z, count = 0;str[x];count++) {        if(x > z)            x++;        temp += y;        for(y = 0;str[x];x++, y++) {            if(str[x] == ' ') {                if((str[x+1] == ' ') || (str[x+1] == 0))                    temp[y] = 0;                else                    break;            }        }        temp[y] = 0;        argv[count] = (char*)callocm(strlen(temp)+1, sizeof(char));        if(argv[count] == NULL) {            make_warning("Couldn't allocate space needed for make_argument_array()");            freem(argv);            freem(temp);            return 0;        }        xstrcpy(argv[count], temp, y+1);        y++;    }        *buf = argv;        freem(backptr);    return count;}