-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.23 2008/04/05 12:19:20 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.24 2008/04/06 14:54:26 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
+ * Revision 1.24 2008/04/06 14:54:26 fabiankeil
+ * Use PCRE syntax in host patterns when configured
+ * with --enable-pcre-host-patterns.
+ *
* Revision 1.23 2008/04/05 12:19:20 fabiankeil
* Factor compile_host_pattern() out of create_url_spec().
*
}
-#ifdef FEATURE_PCRE_HOST_PATTERNS
+#ifdef FEATURE_EXTENDED_HOST_PATTERNS
/*********************************************************************
*
* Function : compile_host_pattern
}
}
-#endif /* def FEATURE_PCRE_HOST_PATTERNS */
+#endif /* def FEATURE_EXTENDED_HOST_PATTERNS */
/*********************************************************************
if (url == NULL) return;
freez(url->spec);
-#ifdef FEATURE_PCRE_HOST_PATTERNS
+#ifdef FEATURE_EXTENDED_HOST_PATTERNS
if (url->host_regex)
{
regfree(url->host_regex);
#else
freez(url->dbuffer);
freez(url->dvec);
-#endif /* ndef FEATURE_PCRE_HOST_PATTERNS */
+#endif /* ndef FEATURE_EXTENDED_HOST_PATTERNS */
freez(url->path);
freez(url->port_list);
if (url->preg)
{
/* XXX: these should probably be functions. */
#define PORT_MATCHES ((NULL == pattern->port_list) || match_portlist(pattern->port_list, url->port))
-#ifdef FEATURE_PCRE_HOST_PATTERNS
+#ifdef FEATURE_EXTENDED_HOST_PATTERNS
#define DOMAIN_MATCHES ((NULL == pattern->host_regex) || (0 == regexec(pattern->host_regex, url->host, 0, NULL, 0)))
#else
#define DOMAIN_MATCHES ((NULL == pattern->dbuffer) || (0 == domain_match(pattern, url)))