From be546c20cb08f9c25a6bd98bcdf44394e3e8a846 Mon Sep 17 00:00:00 2001 From: Saint Xavier Date: Thu, 19 Jun 2008 23:53:03 +0200 Subject: [PATCH] Set an initial value for IRIs options and some minor additions in iri.c --- src/ChangeLog | 8 ++++++++ src/init.c | 8 ++++++++ src/iri.c | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ef69dca6..7ad7c8ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-06-19 Xavier Saint + + * iri.c : Include missing stringprep.h file and add a + cast. + + * init.c : set a default initial value for opt.enable_iri, + opt.locale and opt.encoding_remote. + 2008-06-19 Xavier Saint * iri.c, iri.h : Add a new function find_locale() to find diff --git a/src/init.c b/src/init.c index a7a4ee01..f56aa652 100644 --- a/src/init.c +++ b/src/init.c @@ -333,6 +333,14 @@ defaults (void) opt.restrict_files_case = restrict_no_case_restriction; opt.max_redirect = 20; + +#ifdef ENABLE_IRI + opt.enable_iri = true; +#else + opt.enable_iri = false; +#endif + opt.locale = NULL; + opt.encoding_remote = NULL; } /* Return the user's home directory (strdup-ed), or NULL if none is diff --git a/src/iri.c b/src/iri.c index 797ffa44..b87e6ebe 100644 --- a/src/iri.c +++ b/src/iri.c @@ -35,6 +35,8 @@ as that of the covered work. */ #include #include +#include + #include "utils.h" #include "iri.h" @@ -73,7 +75,7 @@ char * find_locale (void) { /* sXXXav, made our own function or use libidn one ?! */ - return stringprep_locale_charset (); + return (char *) stringprep_locale_charset (); } -- 2.39.2