Lines Matching full:words
107 * Fracture a string into an array of words (as delineated by tabs or spaces)
117 * Returns the fractured words, which must be freed later using Words_Free,
118 * unless the returned Words.words was NULL.
126 Substring *words; in Substring_Words() local
136 /* words_buf holds the words, separated by '\0'. */ in Substring_Words()
141 words = bmake_malloc((words_cap + 1) * sizeof(words[0])); in Substring_Words()
191 * end of a token -- make sure there's enough words in Substring_Words()
200 words = bmake_realloc(words, in Substring_Words()
201 (words_cap + 1) * sizeof(words[0])); in Substring_Words()
203 words[words_len++] = in Substring_Words()
210 free(words); in Substring_Words()
213 res.words = NULL; in Substring_Words()
263 words[words_len] = Substring_Init(NULL, NULL); /* useful for argv */ in Substring_Words()
268 result.words = words; in Substring_Words()
275 Words
279 Words words; in Str_Words() local
283 if (swords.words == NULL) { in Str_Words()
284 words.words = NULL; in Str_Words()
285 words.len = 0; in Str_Words()
286 words.freeIt = NULL; in Str_Words()
287 return words; in Str_Words()
290 words.words = bmake_malloc((swords.len + 1) * sizeof(words.words[0])); in Str_Words()
291 words.len = swords.len; in Str_Words()
292 words.freeIt = swords.freeIt; in Str_Words()
294 words.words[i] = UNCONST(swords.words[i].start); in Str_Words()
295 free(swords.words); in Str_Words()
296 return words; in Str_Words()