Lines Matching defs:word

237 #define VAR_SUB_ONE	0x02	/* Apply substitution to one word */
239 #define VAR_MATCH_START 0x08 /* Match at start of word */
240 #define VAR_MATCH_END 0x10 /* Match at end of word */
254 * single big word, even if it contains
293 int start; /* first word to select */
294 int end; /* last word to select */
1163 * Remove the tail of the given word and place the result in the given
1167 * word Word to trim
1174 * added to the buffer before the next word).
1177 * The trimmed word is added to the buffer.
1183 char *word, Boolean addSpace, Buffer *buf,
1188 slash = strrchr(word, '/');
1194 Buf_AddBytes(buf, strlen(word), word);
1211 * Remove the head of the given word and place the result in the given
1215 * word Word to trim
1222 * added to the buffer before the next word).
1225 * The trimmed word is added to the buffer.
1231 char *word, Boolean addSpace, Buffer *buf,
1240 slash = strrchr(word, '/');
1246 Buf_AddBytes(buf, strlen(word), word);
1254 * Place the suffix of the given word in the given buffer.
1257 * word Word to trim
1264 * added to the buffer before the next word).
1267 * The suffix from the word is placed in the buffer.
1273 char *word, Boolean addSpace, Buffer *buf,
1278 dot = strrchr(word, '.');
1294 * Remove the suffix of the given word and place the result in the
1298 * word Word to trim
1305 * added to the buffer before the next word).
1308 * The trimmed word is added to the buffer.
1314 char *word, Boolean addSpace, Buffer *buf,
1323 dot = strrchr(word, '.');
1326 Buf_AddBytes(buf, strlen(word), word);
1329 Buf_AddBytes(buf, strlen(word), word);
1337 * Place the word in the buffer if it matches the given pattern.
1341 * word Word to examine
1343 * before adding the word, if it matches
1345 * pattern Pattern the word must match
1349 * word.
1352 * The word may be copied to the buffer.
1358 char *word, Boolean addSpace, Buffer *buf,
1362 fprintf(debug_file, "VarMatch [%s] [%s]\n", word, (char *)pattern);
1363 if (Str_Match(word, (char *)pattern)) {
1368 Buf_AddBytes(buf, strlen(word), word);
1377 * Place the word in the buffer if it matches the given pattern.
1382 * word Word to examine
1384 * before adding the word, if it matches
1386 * patp Pattern the word must match
1390 * word.
1393 * The word may be copied to the buffer.
1399 char *word, Boolean addSpace, Buffer *buf,
1412 if ((ptr = Str_SYSVMatch(word, pat->lhs, &len)) != NULL) {
1417 Buf_AddBytes(buf, strlen(word), word);
1428 * Place the word in the buffer if it doesn't match the given pattern.
1432 * word Word to examine
1434 * before adding the word, if it matches
1436 * pattern Pattern the word must match
1440 * word.
1443 * The word may be copied to the buffer.
1449 char *word, Boolean addSpace, Buffer *buf,
1452 if (!Str_Match(word, (char *)pattern)) {
1457 Buf_AddBytes(buf, strlen(word), word);
1466 * Perform a string-substitution on the given word, placing the
1470 * word Word to modify
1486 char *word, Boolean addSpace, Buffer *buf,
1489 int wordLen; /* Length of word */
1493 wordLen = strlen(word);
1501 (strncmp(word, pattern->lhs, pattern->leftLen) == 0)) {
1503 * Anchored at start and beginning of word matches pattern
1508 * Also anchored at end and matches to the end (word
1522 * Doesn't match to end -- copy word wholesale
1537 (word + pattern->leftLen));
1542 * Had to match at start of word and didn't -- copy whole word.
1548 * characters from the end of the word) and see if it does. Note
1552 cp = word + (wordLen - pattern->leftLen);
1553 if ((cp >= word) &&
1558 * stuff in the initial, unmatched part of the word followed
1561 if (((cp - word) + pattern->rightLen) != 0) {
1567 Buf_AddBytes(buf, cp - word, word);
1572 * Had to match at end and didn't. Copy entire word.
1578 * Pattern is unanchored: search for the pattern in the word using
1582 * remaining part of the word (word and wordLen are adjusted
1594 cp = Str_FindSubstring(word, pattern->lhs);
1596 if (addSpace && (((cp - word) + pattern->rightLen) != 0)){
1600 Buf_AddBytes(buf, cp-word, word);
1602 wordLen -= (cp - word) + pattern->leftLen;
1603 word = cp + pattern->leftLen;
1619 Buf_AddBytes(buf, wordLen, word);
1634 Buf_AddBytes(buf, wordLen, word);
1669 * Perform a regex substitution on the given word, placing the
1683 char *word, Boolean addSpace, Buffer *buf,
1699 wp = word;
1803 * We set the temp variable named in pattern.lhs to word and expand
1807 * word Word to modify
1824 char *word, Boolean addSpace, Buffer *buf,
1831 if (word && *word) {
1832 Var_Set(loop->tvar, word, loop->ctxt, VAR_NO_EXPORT);
1872 * word */
1873 char **av; /* word list */
1874 char *as; /* word list memory */
1882 /* fake what brk_string() would do if there were only one word */
1937 * Replace each word with the result of realpath()
1942 char *word, Boolean addSpace, Buffer *buf,
1953 rp = cached_realpath(word, rbuf);
1955 word = rp;
1957 Buf_AddBytes(buf, strlen(word), word);
1990 * word */
1991 char **av; /* word list */
1992 char *as; /* word list memory */
1999 /* fake what brk_string() would do if there were only one word */
2048 char **av; /* word list [first word does not count] */
2049 char *as; /* word list memory */
2408 * :H Substitute the head of each word
2409 * :T Substitute the tail of each word
2411 * each word
2412 * :R Substitute the root of each word
2423 * word, even if it contains spaces.
2428 * :[index] Select a single word from the value.
2431 * word. Equivalent to :tW.
2447 * to the current value of each word in turn
2448 * and replace each word with the result of
2505 parsestate.varSpace = ' '; /* word separator */
2993 * as the word separator.
3221 * start of the word -- skip over it and flag pattern.