Lines Matching +defs:string +defs:match
7 /* simple string or host pattern matching
11 /* int match_string(list, string, pattern)
13 /* const char *string;
26 /* This module implements simple string and host name or address
28 /* has the form type:name, table lookup is used instead of string
31 /* match_string() matches the string against the pattern, requiring
32 /* an exact (case-insensitive) match. The flags argument is not used.
75 #include <string.h>
113 /* match_string - match a string literal */
115 int match_string(MATCH_LIST *list, const char *string, const char *pattern)
121 msg_info("%s: %s: %s ~? %s", myname, list->pname, string, pattern);
124 * Try dictionary lookup: exact match.
129 if (dict_get(dict, string) != 0)
138 * Try an exact string match. Note that the string and pattern are
141 if (strcmp(string, pattern) == 0) {
146 * No match found.
151 /* match_hostname - match a host by name */
159 int match;
166 * Try dictionary lookup: exact match and parent domains.
173 match = 0;
176 match = (dict_get(dict, entry) != 0);
180 entry, match ? "found" : "notfound");
181 if (match != 0)
192 return (match);
196 * Try an exact match with the host name. Note that the name and the
221 /* match_hostaddr - match host by address */
256 * Try an exact match with the host address. Note that the address and
281 * unambiguous and they did not match in the strcmp() calls above.