rem: char *ptr=str;
context: build_argv(char *str, int *argc){    int table_size = 16, _argc;    char *ptr=str;    char **argv;    if (argc == NULL)        argc = &_argc;    *argc = 0;    argv  = (char **)calloc(table_size, sizeof(char *));    if (argv == NULL)        return NULL;        while(*str) {        /* skip intervening white space */        while(*str != '\0' && (*str == ' ' || *str == '\t' || *str == '\n'))            str++;                if (*str == '\0')            break;                if (*str == DOUBLE_QUOTE) {            argv[*argc] = ++str;            while(*str && *str != DOUBLE_QUOTE) {                if (*str == BACK_SLASH)                    strcpy(str, str+1);  /* copy everything down */                str++;            }        } else if (*str == SINGLE_QUOTE) {            argv[*argc] = ++str;            while(*str && *str != SINGLE_QUOTE) {                if (*str == BACK_SLASH)                    strcpy(str, str+1);  /* copy everything down */                str++;            }        } else {            argv[*argc] = str;            while(*str && *str != ' ' && *str != '\t' && *str != '\n') {                if (*str == BACK_SLASH)                    strcpy(str, str+1);  /* copy everything down */                str++;            }        }                if (*str != '\0')            *str++ = '\0';   /* chop the string */                *argc = *argc + 1;        if (*argc >= table_size-1) {            char **nargv;                        table_size = table_size * 2;            nargv = (char **)calloc(table_size, sizeof(char *));                        if (nargv == NULL) {   /* drats! failure. */                free(argv);                return NULL;            }                        memcpy(nargv, argv, (*argc) * sizeof(char *));            free(argv);            argv = nargv;        }    }        return argv;}