search for: ap_new

Displaying 1 result from an estimated 1 matches for "ap_new".

Did you mean: p_new
2006 Apr 01
0
sftp tab completion patch (First release - NOT FOR INCLUDING YET)
...(char *)malloc(len); + strlcpy(line, lf->buffer, len); + pos = len - (lf->lastchar - lf->cursor); + + /* build an array of items */ + for (ap = argv; ap < &argv[MAXARG - 1] && + (*ap = strsep(&line, " ")) != NULL; ) { + if (**ap != '\0') { + int ap_new; + + ap_new = ap_loc + strlen(*ap); + if (ap_new >= pos && ap_loc <= pos) + ap_cur = argc; + ap_loc = ap_new; + ap++; + argc++; + } + } + *ap = NULL; + + if (argc == 0) + return(CC_ERROR); + + if (pos == len) + ap_cur = argc - 1; + + /* Complete Stuff */ + if (ap_cur...