mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-07 06:47:52 +00:00
Formerly function.c.~21~
This commit is contained in:
parent
0fad0bd5c5
commit
3c660b4d55
1 changed files with 5 additions and 4 deletions
|
@ -265,7 +265,7 @@ int
|
||||||
pattern_matches (pattern, percent, word)
|
pattern_matches (pattern, percent, word)
|
||||||
register char *pattern, *percent, *word;
|
register char *pattern, *percent, *word;
|
||||||
{
|
{
|
||||||
unsigned int len;
|
unsigned int sfxlen, wordlen;
|
||||||
|
|
||||||
if (percent == 0)
|
if (percent == 0)
|
||||||
{
|
{
|
||||||
|
@ -278,13 +278,14 @@ pattern_matches (pattern, percent, word)
|
||||||
return streq (pattern, word);
|
return streq (pattern, word);
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen (percent + 1);
|
sfxlen = strlen (percent + 1);
|
||||||
|
wordlen = strlen (word);
|
||||||
|
|
||||||
if (strlen (word) < (percent - pattern) + len
|
if (wordlen < (percent - pattern) + sfxlen
|
||||||
|| strncmp (pattern, word, percent - pattern))
|
|| strncmp (pattern, word, percent - pattern))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return !strcmp (percent + 1, word + (strlen (word) - len));
|
return !strcmp (percent + 1, word + (wordlen - sfxlen));
|
||||||
}
|
}
|
||||||
|
|
||||||
int shell_function_pid = 0, shell_function_completed;
|
int shell_function_pid = 0, shell_function_completed;
|
||||||
|
|
Loading…
Reference in a new issue