X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Furl.c;h=c4662372c99fc5afc493e83e486496a756b46890;hb=d9e3b9f0bdd257d6287c5ba32cab5f648a98ed55;hp=d5cbcea21a34d718b7e9b70f6ee09131574deaa4;hpb=7c1f135f887cb0cab4e17cc9b97c1d83e0139ca6;p=libucw.git diff --git a/lib/url.c b/lib/url.c index d5cbcea2..c4662372 100644 --- 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 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) { - cf_register(url_config); + cf_declare_section("URL", &url_config, 0); } /* Escaping and de-escaping */