Lines Matching refs:tw_cmd_state
72 } tw_cmd_state;
368 tw_cmd_state.cur = 0;
369 CLRDIR(tw_cmd_state.dfd)
373 tw_cmd_state.pathv = vp->vec;
375 tw_cmd_state.pathv = defpath;
378 tw_cmd_state.pathv = defpath;
392 if (tw_cmd_state.cur < tw_cmd.nlist) {
394 Strbuf_append(res, tw_cmd.list[tw_cmd_state.cur++]);
401 while ((tw_cmd_state.dfd == NULL ||
402 (res->len = 0, ret = tw_dir_next(res, tw_cmd_state.dfd)) == 0) &&
403 *tw_cmd_state.pathv != NULL) {
405 CLRDIR(tw_cmd_state.dfd)
407 while (*tw_cmd_state.pathv && tw_cmd_state.pathv[0][0] == '/')
408 tw_cmd_state.pathv++;
409 if ((ptr = *tw_cmd_state.pathv) != 0) {
419 tw_cmd_state.dfd = opendir(".");
423 Strbuf_append(dir, *tw_cmd_state.pathv);
425 tw_cmd_state.dfd = opendir(short2str(*tw_cmd_state.pathv));
429 tw_cmd_state.pathv++;
772 CLRDIR(tw_cmd_state.dfd)