Lines Matching defs:pattern
61 char *pattern; /* name pattern */
73 const char *pattern, const char *encoding);
77 const char *pattern, const char *encoding);
79 static int match(const char *pattern, const char *str);
81 static idn_result_t create_item(const char *pattern, const char *encoding,
115 if (current->pattern != NULL) {
116 free(current->pattern);
172 const char *pattern, const char *encoding,
175 return additem_to_top(list, pattern, encoding);
177 return additem_to_bottom(list, pattern, encoding);
183 const char *pattern, const char *encoding) {
190 assert(pattern != NULL);
193 if ((r = create_item(pattern, encoding, &new_item))
211 const char *pattern, const char *encoding) {
218 assert(pattern != NULL);
221 r = create_item(pattern, encoding, &new_item);
245 const char *pattern, char **encodingp) {
251 assert(pattern != NULL);
254 DUMP(("target pattern: %s\n", pattern));
259 DUMP(("current pattern: %s, encoding: %s\n",
260 current->pattern, current->encoding));
262 if (match(current->pattern, pattern)) {
270 *encodingp = (char *)pattern;
278 match(const char *pattern, const char *str) {
282 switch (c = *pattern++) {
286 while (!match(pattern, str)) {
303 * pattern and encoding must not be NULL.
306 create_item(const char *pattern, const char *encoding,
310 assert(pattern != NULL);
316 if (((*itemp)->pattern = malloc(strlen(pattern) + 1)) == NULL) {
323 free((*itemp)->pattern);
329 (void)strcpy((*itemp)->pattern, pattern);
350 DUMP(("%d: %s\t%s\n", i, item->pattern, item->encoding));