Deleted Added
full compact
42c42
< __FBSDID("$FreeBSD: head/usr.bin/make/str.c 105826 2002-10-23 23:16:43Z jmallett $");
---
> __FBSDID("$FreeBSD: head/usr.bin/make/str.c 106106 2002-10-28 23:33:57Z jmallett $");
256,293d255
< * Str_FindSubstring -- See if a string contains a particular substring.
< *
< * Results: If string contains substring, the return value is the location of
< * the first matching instance of substring in string. If string doesn't
< * contain substring, the return value is NULL. Matching is done on an exact
< * character-for-character basis with no wildcards or special characters.
< *
< * Side effects: None.
< *
< * XXX should be strstr(3).
< */
< char *
< Str_FindSubstring(char *string, char *substring)
< {
< char *a, *b;
<
< /*
< * First scan quickly through the two strings looking for a single-
< * character match. When it's found, then compare the rest of the
< * substring.
< */
<
< for (b = substring; *string != 0; string += 1) {
< if (*string != *b)
< continue;
< a = string;
< for (;;) {
< if (*b == 0)
< return(string);
< if (*a++ != *b++)
< break;
< }
< b = substring;
< }
< return((char *) NULL);
< }
<
< /*
305c267
< Str_Match(char *string, char *pattern)
---
> Str_Match(const char *string, const char *pattern)
407,408c369,370
< char *
< Str_SYSVMatch(char *word, char *pattern, int *len)
---
> const char *
> Str_SYSVMatch(const char *word, const char *pattern, int *len)
410,412c372
< char *p = pattern;
< char *w = word;
< char *m;
---
> const char *m, *p, *w;
413a374,376
> p = pattern;
> w = word;
>
471c434
< Str_SYSVSubst(Buffer buf, char *pat, char *src, int len)
---
> Str_SYSVSubst(Buffer buf, const char *pat, const char *src, int len)
473c436
< char *m;
---
> const char *m;