Lines Matching defs:word

215 #define VAR_SUB_ONE	0x02	/* Apply substitution to one word */
217 #define VAR_MATCH_START 0x08 /* Match at start of word */
218 #define VAR_MATCH_END 0x10 /* Match at end of word */
232 * single big word, even if it contains
271 int start; /* first word to select */
272 int end; /* last word to select */
1117 * Remove the tail of the given word and place the result in the given
1121 * word Word to trim
1128 * added to the buffer before the next word).
1131 * The trimmed word is added to the buffer.
1137 char *word, Boolean addSpace, Buffer *buf,
1142 slash = strrchr(word, '/');
1148 Buf_AddBytes(buf, strlen(word), word);
1165 * Remove the head of the given word and place the result in the given
1169 * word Word to trim
1176 * added to the buffer before the next word).
1179 * The trimmed word is added to the buffer.
1185 char *word, Boolean addSpace, Buffer *buf,
1194 slash = strrchr(word, '/');
1200 Buf_AddBytes(buf, strlen(word), word);
1208 * Place the suffix of the given word in the given buffer.
1211 * word Word to trim
1218 * added to the buffer before the next word).
1221 * The suffix from the word is placed in the buffer.
1227 char *word, Boolean addSpace, Buffer *buf,
1232 dot = strrchr(word, '.');
1248 * Remove the suffix of the given word and place the result in the
1252 * word Word to trim
1259 * added to the buffer before the next word).
1262 * The trimmed word is added to the buffer.
1268 char *word, Boolean addSpace, Buffer *buf,
1277 dot = strrchr(word, '.');
1280 Buf_AddBytes(buf, strlen(word), word);
1283 Buf_AddBytes(buf, strlen(word), word);
1291 * Place the word in the buffer if it matches the given pattern.
1295 * word Word to examine
1297 * before adding the word, if it matches
1299 * pattern Pattern the word must match
1303 * word.
1306 * The word may be copied to the buffer.
1312 char *word, Boolean addSpace, Buffer *buf,
1316 fprintf(debug_file, "VarMatch [%s] [%s]\n", word, (char *)pattern);
1317 if (Str_Match(word, (char *)pattern)) {
1322 Buf_AddBytes(buf, strlen(word), word);
1331 * Place the word in the buffer if it matches the given pattern.
1336 * word Word to examine
1338 * before adding the word, if it matches
1340 * patp Pattern the word must match
1344 * word.
1347 * The word may be copied to the buffer.
1353 char *word, Boolean addSpace, Buffer *buf,
1366 if ((ptr = Str_SYSVMatch(word, pat->lhs, &len)) != NULL) {
1371 Buf_AddBytes(buf, strlen(word), word);
1382 * Place the word in the buffer if it doesn't match the given pattern.
1386 * word Word to examine
1388 * before adding the word, if it matches
1390 * pattern Pattern the word must match
1394 * word.
1397 * The word may be copied to the buffer.
1403 char *word, Boolean addSpace, Buffer *buf,
1406 if (!Str_Match(word, (char *)pattern)) {
1411 Buf_AddBytes(buf, strlen(word), word);
1420 * Perform a string-substitution on the given word, placing the
1424 * word Word to modify
1440 char *word, Boolean addSpace, Buffer *buf,
1443 int wordLen; /* Length of word */
1447 wordLen = strlen(word);
1455 (strncmp(word, pattern->lhs, pattern->leftLen) == 0)) {
1457 * Anchored at start and beginning of word matches pattern
1462 * Also anchored at end and matches to the end (word
1476 * Doesn't match to end -- copy word wholesale
1491 (word + pattern->leftLen));
1496 * Had to match at start of word and didn't -- copy whole word.
1502 * characters from the end of the word) and see if it does. Note
1506 cp = word + (wordLen - pattern->leftLen);
1507 if ((cp >= word) &&
1512 * stuff in the initial, unmatched part of the word followed
1515 if (((cp - word) + pattern->rightLen) != 0) {
1521 Buf_AddBytes(buf, cp - word, word);
1526 * Had to match at end and didn't. Copy entire word.
1532 * Pattern is unanchored: search for the pattern in the word using
1536 * remaining part of the word (word and wordLen are adjusted
1548 cp = Str_FindSubstring(word, pattern->lhs);
1550 if (addSpace && (((cp - word) + pattern->rightLen) != 0)){
1554 Buf_AddBytes(buf, cp-word, word);
1556 wordLen -= (cp - word) + pattern->leftLen;
1557 word = cp + pattern->leftLen;
1573 Buf_AddBytes(buf, wordLen, word);
1588 Buf_AddBytes(buf, wordLen, word);
1623 * Perform a regex substitution on the given word, placing the
1636 char *word, Boolean addSpace, Buffer *buf,
1652 wp = word;
1756 * We set the temp variable named in pattern.lhs to word and expand
1760 * word Word to modify
1776 char *word, Boolean addSpace, Buffer *buf,
1783 if (word && *word) {
1784 Var_Set(loop->tvar, word, loop->ctxt, VAR_NO_EXPORT);
1824 * word */
1825 char **av; /* word list */
1826 char *as; /* word list memory */
1834 /* fake what brk_string() would do if there were only one word */
1889 * Replace each word with the result of realpath()
1894 char *word, Boolean addSpace, Buffer *buf,
1905 rp = realpath(word, rbuf);
1907 word = rp;
1909 Buf_AddBytes(buf, strlen(word), word);
1942 * word */
1943 char **av; /* word list */
1944 char *as; /* word list memory */
1951 /* fake what brk_string() would do if there were only one word */
2000 char **av; /* word list [first word does not count] */
2001 char *as; /* word list memory */
2396 * :H Substitute the head of each word
2397 * :T Substitute the tail of each word
2399 * each word
2400 * :R Substitute the root of each word
2411 * word, even if it contains spaces.
2416 * :[index] Select a single word from the value.
2419 * word. Equivalent to :tW.
2435 * to the current value of each word in turn
2436 * and replace each word with the result of
2493 parsestate.varSpace = ' '; /* word separator */
2971 * as the word separator.
3180 * start of the word -- skip over it and flag pattern.
3606 parsestate.varSpace = ' '; /* word separator */