Lines Matching refs:we
26 static int do_wordexp(const char *s, wordexp_t *we, int flags) in do_wordexp() argument
41 if (flags & WRDE_REUSE) wordfree(we); in do_wordexp()
86 wc = we->we_wordc; in do_wordexp()
87 wv = we->we_wordv; in do_wordexp()
92 if (we->we_offs > SIZE_MAX/sizeof(void *)/4) in do_wordexp()
94 i += we->we_offs; in do_wordexp()
96 we->we_offs = 0; in do_wordexp()
152 we->we_wordv = wv; in do_wordexp()
153 we->we_wordc = i; in do_wordexp()
156 if (wv) for (i=we->we_offs; i; i--) in do_wordexp()
157 we->we_wordv[i-1] = 0; in do_wordexp()
158 we->we_wordc -= we->we_offs; in do_wordexp()
164 we->we_wordc = 0; in do_wordexp()
165 we->we_wordv = 0; in do_wordexp()
170 int wordexp(const char *restrict s, wordexp_t *restrict we, int flags) in wordexp() argument
174 r = do_wordexp(s, we, flags); in wordexp()
179 void wordfree(wordexp_t *we) in wordfree() argument
182 if (!we->we_wordv) return; in wordfree()
183 for (i=0; i<we->we_wordc; i++) free(we->we_wordv[we->we_offs+i]); in wordfree()
184 free(we->we_wordv); in wordfree()
185 we->we_wordv = 0; in wordfree()
186 we->we_wordc = 0; in wordfree()