Lines Matching refs:buf
101 match_inst(cmdline_parse_inst_t *inst, const char *buf, in match_inst() argument
120 while (isblank2(*buf)) { in match_inst()
121 buf++; in match_inst()
125 if ( isendofline(*buf) || iscomment(*buf) ) in match_inst()
129 n = token_hdr.ops->parse(token_p, buf, NULL, 0); in match_inst()
142 n = token_hdr.ops->parse(token_p, buf, (char *)resbuf + in match_inst()
151 buf += n; in match_inst()
172 while (isblank2(*buf)) { in match_inst()
173 buf++; in match_inst()
177 if ( isendofline(*buf) || iscomment(*buf) ) in match_inst()
186 cmdline_parse(struct cmdline *cl, const char * buf) in cmdline_parse() argument
192 char buf[CMDLINE_PARSE_RESULT_BUFSIZE]; in cmdline_parse() member
203 char *result_buf = result.buf; in cmdline_parse()
205 if (!cl || !buf) in cmdline_parse()
215 curbuf = buf; in cmdline_parse()
232 while (isendofline(buf[linelen])) { in cmdline_parse()
243 linelen, linelen > 64 ? 64 : linelen, buf); in cmdline_parse()
251 tok = match_inst(inst, buf, 0, result_buf, in cmdline_parse()
269 result_buf = tmp_result.buf; in cmdline_parse()
287 f(result.buf, cl, data); in cmdline_parse()
300 cmdline_complete(struct cmdline *cl, const char *buf, int *state, in cmdline_complete() argument
303 const char *partial_tok = buf; in cmdline_complete()
321 if (!cl || !buf || !state || !dst) in cmdline_complete()
330 for (i=0 ; buf[i] ; i++) { in cmdline_complete()
331 if (!isblank2(buf[i]) && isblank2(buf[i+1])) in cmdline_complete()
333 if (isblank2(buf[i]) && !isblank2(buf[i+1])) in cmdline_complete()
334 partial_tok = buf+i+1; in cmdline_complete()
340 debug_printf("try complete <%s>\n", buf); in cmdline_complete()
351 match_inst(inst, buf, nb_token, NULL, 0)) in cmdline_complete()
447 match_inst(inst, buf, nb_token, NULL, 0)) in cmdline_complete()