• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/Libc-1044.1.2/gen/FreeBSD/

Lines Matching defs:we

66  * To maintain backwards compatibility with wordexp_t, we can't put
67 * we_strings and we_nbytes in wordexp_t. So we create a new structure,
77 * Normally, we_wordv will point to wi_wordv, so we need macros to convert
81 #define WE_STRINGS(we) (WE_INT_T((we)->we_wordv)->wi_strings)
86 * to stderr. So we need to capture stderr, and see if it contains this error.
99 * of words in `we'. See wordexp(3).
107 wordexp(const char * __restrict words, wordexp_t * __restrict we, int flags)
113 wordexp_t *we = &temp;
116 we->we_offs = we0->we_offs;
134 we->we_wordc = we0->we_wordc;
135 we->we_wordv = WE_WORDV(wi);
137 we->we_wordc = 0;
138 we->we_wordv = NULL;
142 wordfree(we);
144 we->we_wordc = 0;
145 we->we_wordv = NULL;
146 we->we_strings = NULL;
147 we->we_nbytes = 0;
150 wordfree(we);
154 if ((error = we_askshell(words, we, flags)) != 0) {
159 *we0 = *we;
161 wordfree(we);
164 wordfree(we);
171 *we0 = *we;
201 we_askshell(const char *words, wordexp_t *we, int flags)
208 size_t sofs; /* Offset into we->we_strings */
209 size_t vofs; /* Offset into we->we_wordv */
352 * and string storage buffers for the expanded words we're about to
356 sofs = we->we_nbytes;
358 vofs = we->we_wordc;
360 vofs += we->we_offs;
361 we->we_wordc += nwords;
363 we->we_nbytes += nbytes;
366 if ((nwv = realloc(we->we_wordv ? WE_INT_T(we->we_wordv) : NULL, (we->we_wordc + 1 +
367 (flags & WRDE_DOOFFS ? we->we_offs : 0)) *
370 if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 +
371 (flags & WRDE_DOOFFS ? we->we_offs : 0)) *
379 if (!we->we_wordv) {
385 we->we_wordv = WE_WORDV(nwv);
387 we->we_wordv = nwv;
392 if ((nstrings = realloc(we->we_strings, we->we_nbytes)) == NULL)
399 if (we->we_wordv[i] != NULL)
401 we->we_wordv[i] += nstrings - nwv->wi_strings;
403 we->we_wordv[i] += nstrings - we->we_strings;
408 we->we_strings = nstrings;
414 if (we_read_fully(pdes[0], we->we_strings + sofs, nbytes) != nbytes)
464 while (vofs < we->we_offs)
465 we->we_wordv[vofs++] = NULL;
469 p = we->we_strings + sofs;
472 we->we_wordv[vofs++] = p;
478 we->we_wordv[vofs] = NULL;
576 wordfree(wordexp_t *we)
579 if (we == NULL)
582 if (we->we_wordv) {
583 free(WE_STRINGS(we));
584 free(WE_INT_T(we->we_wordv));
587 free(we->we_wordv);
590 free(we->we_strings);
592 we->we_wordv = NULL;
594 we->we_strings = NULL;
595 we->we_nbytes = 0;
597 we->we_wordc = 0;