From 169a16fc7ddb348cc4f0a5ebd149f754b5042478 Mon Sep 17 00:00:00 2001 From: Saint Xavier Date: Sun, 20 Jul 2008 19:29:51 +0200 Subject: [PATCH] Make get_utf8_encode() directly aware of ugly_no_encode and remove get_ugly_no_encode() --- src/iri.c | 7 +------ src/iri.h | 1 - src/url.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) 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; -- 2.39.2