Lines Matching refs:string
54 fnmatch(const char *pattern, const char *string, int flags)
60 for (stringstart = string;;)
63 if ((flags & FNM_LEADING_DIR) && *string == '/')
65 return (*string == EOS ? 0 : FNM_NOMATCH);
67 if (*string == EOS)
69 if (*string == '/' && (flags & FNM_PATHNAME))
71 if (*string == '.' && (flags & FNM_PERIOD) &&
72 (string == stringstart ||
73 ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
75 ++string;
83 if (*string == '.' && (flags & FNM_PERIOD) &&
84 (string == stringstart ||
85 ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
92 strchr(string, '/') == NULL ?
97 if ((string = strchr(string, '/')) == NULL)
103 while ((test = *string) != EOS) {
104 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
108 ++string;
112 if (*string == EOS)
114 if (*string == '/' && (flags & FNM_PATHNAME))
116 if (*string == '.' && (flags & FNM_PERIOD) &&
117 (string == stringstart ||
118 ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
121 switch (rangematch(pattern, *string, flags, &newp)) {
130 ++string;
142 if (c == *string)
146 tolower((unsigned char)*string)))
150 string++;