Lines Matching +defs:match +defs:string
15 /* int (*func)(int flags, const char *string, const char *pattern);
17 /* int match_list_match(list, string,...)
19 /* const char *string;
28 /* is either a string, a file name (in which case the contents
31 /* a pattern match, precede a pattern with an exclamation point (!).
43 /* argument specifies how many match functions follow.
46 /* list, passing the first string to the first function given to
47 /* match_list_init(), the second string to the second function, and
55 /* host_match(3) match hosts by name or by address
71 #include <string.h>
94 int match_count; /* match function/argument count */
95 MATCH_LIST_FN *match_func; /* match functions */
96 const char **match_args; /* match arguments */
104 static ARGV *match_list_parse(ARGV *list, char *string, int init_match)
110 char *bp = string;
114 int match;
126 for (match = init_match, item = start; *item == '!'; item++)
127 match = !match;
135 list = match_list_parse(list, vstring_str(buf), match);
142 vstring_sprintf(buf, "%s%s(%o,%s)", match ? "" : "!",
144 map_type_name_flags = STR(buf) + (match == 0);
150 argv_add(list, match ? item :
191 /* match_list_match - match strings against pattern list */
198 int match;
203 * Iterate over all patterns in the list, stop at the first match.
211 for (match = 1; *pat == '!'; pat++)
212 match = !match;
215 return (match);
219 msg_info("%s: %s: no match", myname, list->match_args[i]);