]> mj.ucw.cz Git - libucw.git/blobdiff - lib/url.c
Fixed compilation rules for Perl modules to avoid unnecessary rebuilds.
[libucw.git] / lib / url.c
index d5cbcea21a34d718b7e9b70f6ee09131574deaa4..c4662372c99fc5afc493e83e486496a756b46890 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -33,19 +33,20 @@ static byte *url_component_separators = "";
 static uns url_min_repeat_count = 0x7fffffff;
 static uns url_max_repeat_length = 0;
 
 static uns url_min_repeat_count = 0x7fffffff;
 static uns url_max_repeat_length = 0;
 
-static struct cfitem url_config[] = {
-  { "URL",                             CT_SECTION,     NULL },
-  { "IgnoreSpaces",                    CT_INT,         &url_ignore_spaces },
-  { "IgnoreUnderflow",                 CT_INT,         &url_ignore_underflow },
-  { "ComponentSeparators",             CT_STRING,      &url_component_separators },
-  { "MinRepeatCount",                  CT_INT,         &url_min_repeat_count },
-  { "MaxRepeatLength",                 CT_INT,         &url_max_repeat_length },
-  { NULL,                              CT_STOP,        NULL }
+static struct cf_section url_config = {
+  CF_ITEMS {
+    CF_UNS("IgnoreSpaces", &url_ignore_spaces),
+    CF_UNS("IgnoreUnderflow", &url_ignore_underflow),
+    CF_STRING("ComponentSeparators", &url_component_separators),
+    CF_UNS("MinRepeatCount", &url_min_repeat_count),
+    CF_UNS("MaxRepeatLength", &url_max_repeat_length),
+    CF_END
+  }
 };
 
 static void CONSTRUCTOR url_init_config(void)
 {
 };
 
 static void CONSTRUCTOR url_init_config(void)
 {
-  cf_register(url_config);
+  cf_declare_section("URL", &url_config, 0);
 }
 
 /* Escaping and de-escaping */
 }
 
 /* Escaping and de-escaping */