src/cforth/linenoise.c
void linenoiseAddCompletion(linenoiseCompletions *lc, char *str) {
    size_t len = strlen(str);
    char *copy = malloc(len+1);
    memcpy(copy,str,len+1);
    lc->cvec = realloc(lc->cvec,sizeof(char*)*(lc->len+1));
    lc->cvec[lc->len++] = copy;
}
/* This function is used by the callback function registered by the user
 * in order to add completion options given the input string when the
 * user typed <tab>. See the example.c source code for a very easy to
 * understand example. */
This function is used by the callback function registered by the user
in order to add completion options given the input string when the
user typed . See the example.c source code for a very easy to
understand example.
This function is used by the callback function registered by the user in order to add completion options given the input string when the user typed . See the example . c source code for a very easy to understand example .
void linenoiseAddCompletion(linenoiseCompletions *lc, char *str) {
    size_t len = strlen(str);
    char *copy = malloc(len+1);
    memcpy(copy,str,len+1);
    lc->cvec = realloc(lc->cvec,sizeof(char*)*(lc->len+1));
    lc->cvec[lc->len++] = copy;
}
void linenoiseAddCompletion ( linenoiseCompletions * lc , char * str ) { size_t len = strlen ( str ) ; char * copy = malloc ( len + 1 ) ; memcpy ( copy , str , len + 1 ) ; lc -> cvec = realloc ( lc -> cvec , sizeof ( char * ) * ( lc -> len + 1 ) ) ; lc -> cvec [ lc -> len ++ ] = copy ; }
This function is used by the callback function registered by the user
 in order to add completion options given the input string when the
 user typed <tab>.
This function is used by the callback function registered by the user in order to add completion options given the input string when the user typed <tab > .