From 3405803280c9cafab0a4ef229faa4bc447e4c953 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 7 Nov 2014 12:33:34 +0000 Subject: Improve content encoding information API Extend the content_get_encoding() API to retrieve the source of the encoding as well as the actual encoding. --- riscos/window.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'riscos') diff --git a/riscos/window.c b/riscos/window.c index 1c8d8bd95..b2a46fc02 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -3825,12 +3825,10 @@ void ro_gui_window_prepare_pageinfo(struct gui_window *g) sprintf(icon_buf, "file_xxx"); if (content_get_type(h) == CONTENT_HTML) { - if (content_get_encoding(h)) { - char enc_token[10] = "Encoding0"; - enc_token[8] = '0' + html_get_encoding_source(h); + if (content_get_encoding(h, CONTENT_ENCODING_NORMAL)) { snprintf(enc_buf, sizeof enc_buf, "%s (%s)", - content_get_encoding(h), - messages_get(enc_token)); + content_get_encoding(h, CONTENT_ENCODING_NORMAL), + content_get_encoding(h, CONTENT_ENCODING_SOURCE)); enc = enc_buf; } else { enc = messages_get("EncodingUnk"); -- cgit v1.2.3