Set an initial value for IRIs options and some minor additions in iri.c

This commit is contained in:
Saint Xavier 2008-06-19 23:53:03 +02:00
parent 2baf323933
commit be546c20cb
3 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2008-06-19 Xavier Saint <wget@sxav.eu>
* 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 <wget@sxav.eu> 2008-06-19 Xavier Saint <wget@sxav.eu>
* iri.c, iri.h : Add a new function find_locale() to find * iri.c, iri.h : Add a new function find_locale() to find

View File

@ -333,6 +333,14 @@ defaults (void)
opt.restrict_files_case = restrict_no_case_restriction; opt.restrict_files_case = restrict_no_case_restriction;
opt.max_redirect = 20; 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 /* Return the user's home directory (strdup-ed), or NULL if none is

View File

@ -35,6 +35,8 @@ as that of the covered work. */
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stringprep.h>
#include "utils.h" #include "utils.h"
#include "iri.h" #include "iri.h"
@ -73,7 +75,7 @@ char *
find_locale (void) find_locale (void)
{ {
/* sXXXav, made our own function or use libidn one ?! */ /* sXXXav, made our own function or use libidn one ?! */
return stringprep_locale_charset (); return (char *) stringprep_locale_charset ();
} }