]> sjero.net Git - wget/commitdiff
Make get_utf8_encode() directly aware of ugly_no_encode and remove get_ugly_no_encode()
authorSaint Xavier <wget@sxav.eu>
Sun, 20 Jul 2008 17:29:51 +0000 (19:29 +0200)
committerSaint Xavier <wget@sxav.eu>
Sun, 20 Jul 2008 17:29:51 +0000 (19:29 +0200)
src/iri.c
src/iri.h
src/url.c

index 5108d999c01561832f81dbe2f20e0b634bbe4e15..1f421d43f9cc3856cabb9ea944f05eb0f4112efc 100644 (file)
--- a/src/iri.c
+++ b/src/iri.c
@@ -381,7 +381,7 @@ void set_utf8_encode (bool encode)
 
 bool get_utf8_encode (void)
 {
 
 bool get_utf8_encode (void)
 {
-  return utf8_encode;
+  return (!ugly_no_encode && utf8_encode);
 }
 
 void set_ugly_no_encode (bool ugly)
 }
 
 void set_ugly_no_encode (bool ugly)
@@ -389,8 +389,3 @@ void set_ugly_no_encode (bool ugly)
   ugly_no_encode = ugly;
 }
 
   ugly_no_encode = ugly;
 }
 
-bool get_ugly_no_encode (void)
-{
-  return ugly_no_encode;
-}
-
index 413fb2f614f2c569569fd721cb5e768b8e4f3bb3..58389813500a46bddbf69a57475122311d8d2aec 100644 (file)
--- a/src/iri.h
+++ b/src/iri.h
@@ -52,7 +52,6 @@ bool get_utf8_encode (void);
 
 /* ugly ugly ugly */
 void set_ugly_no_encode (bool ugly);
 
 /* ugly ugly ugly */
 void set_ugly_no_encode (bool ugly);
-bool get_ugly_no_encode (void);
 
 #else /* ENABLE_IRI */
 
 
 #else /* ENABLE_IRI */
 
index c94895979a7c9f532f6497fcf9c0659efd55c18a..beaf0fb204e67c2941a03c6cad6d87cd11b3d2b5 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -671,7 +671,7 @@ url_parse (const char *url, int *error)
       goto error;
     }
 
       goto error;
     }
 
-  if (opt.enable_iri && get_utf8_encode () && !get_ugly_no_encode ())
+  if (opt.enable_iri && get_utf8_encode ())
     {
       const char *new;
       bool utf8_encode;
     {
       const char *new;
       bool utf8_encode;