Lines Matching +full:bat +full:- +full:temp
4 /*-
109 if (sl->tlist <= sl->nlist) { in tw_str_add()
111 sl->tlist += TW_INCR; in tw_str_add()
112 sl->list = xrealloc(sl->list, sl->tlist * sizeof(Char *)); in tw_str_add()
115 if (sl->tbuff <= sl->nbuff + len) { in tw_str_add()
118 ptr = sl->buff; in tw_str_add()
120 sl->tbuff += TW_INCR + len; in tw_str_add()
121 sl->buff = xrealloc(sl->buff, sl->tbuff * sizeof(Char)); in tw_str_add()
122 /* Re-thread the new pointer list, if changed */ in tw_str_add()
123 if (ptr != NULL && ptr != sl->buff) { in tw_str_add()
124 for (i = 0; i < sl->nlist; i++) in tw_str_add()
125 sl->list[i] = sl->buff + (sl->list[i] - ptr); in tw_str_add()
129 ptr = sl->list[sl->nlist++] = &sl->buff[sl->nbuff]; in tw_str_add()
130 sl->nbuff += len; in tw_str_add()
142 if (sl->list) { in tw_str_free()
143 xfree(sl->list); in tw_str_free()
144 sl->list = NULL; in tw_str_free()
145 sl->tlist = sl->nlist = 0; in tw_str_free()
147 if (sl->buff) { in tw_str_free()
148 xfree(sl->buff); in tw_str_free()
149 sl->buff = NULL; in tw_str_free()
150 sl->tbuff = sl->nbuff = 0; in tw_str_free()
165 Strbuf_append(res, str2short(dirp->d_name)); in tw_dir_next()
211 if (v == NULL || v->vec == NULL) /* if no path */ in tw_cmd_cmd()
214 for (pv = v->vec; *pv; pv++) { in tw_cmd_cmd()
230 /* Turn foo.{exe,com,bat} into foo since UWIN's readdir returns in tw_cmd_cmd()
231 * the file with the .exe, .com, .bat extension in tw_cmd_cmd()
235 len = strlen(dp->d_name); in tw_cmd_cmd()
236 if (len > 4 && (strcmp(&dp->d_name[len - 4], ".exe") == 0 || in tw_cmd_cmd()
238 strcmp(&dp->d_name[len - 4], ".bat") == 0 || in tw_cmd_cmd()
240 strcmp(&dp->d_name[len - 4], ".com") == 0)) in tw_cmd_cmd()
241 dp->d_name[len - 4] = '\0'; in tw_cmd_cmd()
244 name = str2short(dp->d_name); in tw_cmd_cmd()
245 if (dp->d_ino == 0 || (recexec && !executable(dir, name, 0))) in tw_cmd_cmd()
248 if (name[0] == '#' || /* emacs temp files */ in tw_cmd_cmd()
250 name[len - 1] == '~' || /* emacs backups */ in tw_cmd_cmd()
251 name[len - 1] == '%') /* textedit backups */ in tw_cmd_cmd()
269 if (bptr->bname) in tw_cmd_builtin()
270 tw_cmd_add(str2short(bptr->bname)); in tw_cmd_builtin()
273 if (bptr->bname) in tw_cmd_builtin()
274 tw_cmd_add(str2short(bptr->bname)); in tw_cmd_builtin()
290 while (p->v_left) in tw_cmd_alias()
291 p = p->v_left; in tw_cmd_alias()
293 if (p->v_parent == 0) /* is it the header? */ in tw_cmd_alias()
295 if (p->v_name) in tw_cmd_alias()
296 tw_cmd_add(p->v_name); in tw_cmd_alias()
297 if (p->v_right) { in tw_cmd_alias()
298 p = p->v_right; in tw_cmd_alias()
303 p = p->v_parent; in tw_cmd_alias()
304 } while (p->v_right == c); in tw_cmd_alias()
327 tw_cmd.list[i - fwd] = tw_cmd.list[i]; in tw_cmd_sort()
329 /* Fix fencepost error -- Theodore Ts'o <tytso@athena.mit.edu> */ in tw_cmd_sort()
331 tw_cmd.list[i - fwd] = tw_cmd.list[i]; in tw_cmd_sort()
332 tw_cmd.nlist -= fwd; in tw_cmd_sort()
372 if (vp && vp->vec) in tw_cmd_start()
373 tw_cmd_state.pathv = vp->vec; in tw_cmd_start()
402 (res->len = 0, ret = tw_dir_next(res, tw_cmd_state.dfd)) == 0) && in tw_cmd_next()
410 res->len = 0; in tw_cmd_next()
417 dir->len = 0; in tw_cmd_next()
445 while (tw_vptr->v_left) in tw_vptr_start()
446 tw_vptr = tw_vptr->v_left; in tw_vptr_start()
448 if (tw_vptr->v_parent == 0) { /* is it the header? */ in tw_vptr_start()
452 if (tw_vptr->v_name) in tw_vptr_start()
454 if (tw_vptr->v_right) { in tw_vptr_start()
455 tw_vptr = tw_vptr->v_right; in tw_vptr_start()
460 tw_vptr = tw_vptr->v_parent; in tw_vptr_start()
461 } while (tw_vptr->v_right == c); in tw_vptr_start()
482 Strbuf_append(res, p->v_name); /* we know that this name is here now */ in tw_shvar_next()
486 if (p->v_right) { /* if we can go right */ in tw_shvar_next()
487 p = p->v_right; in tw_shvar_next()
488 while (p->v_left) in tw_shvar_next()
489 p = p->v_left; in tw_shvar_next()
494 p = p->v_parent; in tw_shvar_next()
495 } while (p->v_right == c); in tw_shvar_next()
497 if (p->v_parent == 0) { /* is it the header? */ in tw_shvar_next()
501 if (p->v_name) { in tw_shvar_next()
524 Strbuf_appendn(res, *tw_env, ps - *tw_env); in tw_envvar_next()
634 Strbuf_append(res, str2short(pw->pw_name)); in tw_logname_next()
704 Strbuf_append(res, str2short(gr->gr_name)); in tw_grpname_next()
734 tw_env = vp->vec; in tw_file_start()
754 dir->len = 0; in tw_file_next()
804 p = tw_str_add(&tw_item, s->len + 1); in tw_item_add()
805 Strcpy(p, s->s); in tw_item_add()
836 tw_env = tw_vptr->vec; in tw_vl_start()
875 Strbuf_appendn(res, p, tw_word - p); in tw_wl_next()
904 if (tw_bind && tw_bind->name) { in tw_bind_next()
907 for (ptr = tw_bind->name; *ptr != '\0'; ptr++) in tw_bind_next()
941 if (tw_limit && tw_limit->limname) { in tw_limit_next()
944 for (ptr = tw_limit->limname; *ptr != '\0'; ptr++) in tw_limit_next()
1016 for (j = proclist.p_next; j != NULL; j = j->p_next) in tw_job_next()
1017 if (j->p_index == tw_index && j->p_procid == j->p_jobid) in tw_job_next()
1021 Strbuf_append(res, j->p_command); in tw_job_next()