From: Saint Xavier Date: Sun, 20 Jul 2008 17:29:51 +0000 (+0200) Subject: Make get_utf8_encode() directly aware of ugly_no_encode and remove get_ugly_no_encode() X-Git-Tag: v1.13~338^2~7^2~6^2~13^2~5 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=169a16fc7ddb348cc4f0a5ebd149f754b5042478 Make get_utf8_encode() directly aware of ugly_no_encode and remove get_ugly_no_encode() --- diff --git a/src/iri.c b/src/iri.c index 5108d999..1f421d43 100644 --- a/src/iri.c +++ b/src/iri.c @@ -381,7 +381,7 @@ void set_utf8_encode (bool encode) bool get_utf8_encode (void) { - return utf8_encode; + return (!ugly_no_encode && utf8_encode); } void set_ugly_no_encode (bool ugly) @@ -389,8 +389,3 @@ void set_ugly_no_encode (bool ugly) ugly_no_encode = ugly; } -bool get_ugly_no_encode (void) -{ - return ugly_no_encode; -} - diff --git a/src/iri.h b/src/iri.h index 413fb2f6..58389813 100644 --- 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); -bool get_ugly_no_encode (void); #else /* ENABLE_IRI */ diff --git a/src/url.c b/src/url.c index c9489597..beaf0fb2 100644 --- a/src/url.c +++ b/src/url.c @@ -671,7 +671,7 @@ url_parse (const char *url, int *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;