]> sjero.net Git - wget/commitdiff
Set an initial value for IRIs options and some minor additions in iri.c
authorSaint Xavier <wget@sxav.eu>
Thu, 19 Jun 2008 21:53:03 +0000 (23:53 +0200)
committerSaint Xavier <wget@sxav.eu>
Thu, 19 Jun 2008 21:53:03 +0000 (23:53 +0200)
src/ChangeLog
src/init.c
src/iri.c

index ef69dca6f18c4f5ed98d69942f3ac236edbcf079..7ad7c8cab77d8af42d3a76bfc1c1347a8b9f09d7 100644 (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>
 
        * iri.c, iri.h : Add a new function find_locale() to find
index a7a4ee01e5eda918aaeba5eb97ccec9d103a1722..f56aa65282c94f46a7469eb92cce3a504f9197ad 100644 (file)
@@ -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;
 }
 \f
 /* Return the user's home directory (strdup-ed), or NULL if none is
index 797ffa44a6825f550333209b5c9b7f5684b45ff6..b87e6ebeb467decb8fba2614033593e5032ad28d 100644 (file)
--- a/src/iri.c
+++ b/src/iri.c
@@ -35,6 +35,8 @@ as that of the covered work.  */
 #include <assert.h>
 #include <string.h>
 
+#include <stringprep.h>
+
 #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 ();
 }