Lines Matching refs:str
10 s64 perf_atoll(const char *str) in perf_atoll() argument
15 if (!isdigit(str[0])) in perf_atoll()
18 for (i = 1; i < strlen(str); i++) { in perf_atoll()
19 switch (str[i]) { in perf_atoll()
24 if (str[i + 1] != 'B') in perf_atoll()
29 if (str[i + 1] != 'b') in perf_atoll()
35 if (str[i + 1] != 'B') in perf_atoll()
40 if (str[i + 1] != 'b') in perf_atoll()
46 if (str[i + 1] != 'B') in perf_atoll()
51 if (str[i + 1] != 'b') in perf_atoll()
57 if (str[i + 1] != 'B') in perf_atoll()
62 if (str[i + 1] != 'b') in perf_atoll()
71 if (!isdigit(str[i])) in perf_atoll()
77 length = atoll(str) * unit; in perf_atoll()
106 static int count_argc(const char *str) in count_argc() argument
110 while (*str) { in count_argc()
111 str = skip_sep(str); in count_argc()
112 if (*str) { in count_argc()
114 str = skip_arg(str); in count_argc()
148 char **argv_split(const char *str, int *argcp) in argv_split() argument
150 int argc = count_argc(str); in argv_split()
162 while (*str) { in argv_split()
163 str = skip_sep(str); in argv_split()
165 if (*str) { in argv_split()
166 const char *p = str; in argv_split()
169 str = skip_arg(str); in argv_split()
171 t = strndup(p, str-p); in argv_split()
226 static bool __match_glob(const char *str, const char *pat, bool ignore_space) in __match_glob() argument
228 while (*str && *pat && *pat != '*') { in __match_glob()
231 if (isspace(*str)) { in __match_glob()
232 str++; in __match_glob()
241 str++; in __match_glob()
245 if (__match_charclass(pat + 1, *str, &pat)) { in __match_glob()
246 str++; in __match_glob()
252 if (*str++ != *pat++) in __match_glob()
261 while (*str) in __match_glob()
262 if (__match_glob(str++, pat, ignore_space)) in __match_glob()
265 return !*str && !*pat; in __match_glob()
280 bool strglobmatch(const char *str, const char *pat) in strglobmatch() argument
282 return __match_glob(str, pat, false); in strglobmatch()
293 bool strlazymatch(const char *str, const char *pat) in strlazymatch() argument
295 return __match_glob(str, pat, true); in strlazymatch()