UTF-8: Reuse the translation table if it is from the same charset.

This change makes ELinks more efficient and causes bug 782 to occur
far less often.  (That does not mean the bug should not be fixed.)

---
commit 0b7cee1e6e763b9de3e49846ecc14f41ed9a6fdb
tree 8396aabcb8e0522f03fcddee2c7af241d2fbe999
parent 5d88a5dc49a87d3abfbd14653ce7de6a88014135
author Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Mon, 31 Jul 2006 20:21:10 +0300
committer Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Mon, 31 Jul 2006 20:21:10 +0300

 src/intl/charsets.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/intl/charsets.c b/src/intl/charsets.c
index dd0ee5b..33bc507 100644
--- a/src/intl/charsets.c
+++ b/src/intl/charsets.c
@@ -527,6 +527,7 @@ get_translation_table_to_utf_8(int from)
 	if (from == -1) return NULL;
 	from &= ~SYSTEM_CHARSET_FLAG;
 	if (from == lfr) return utf_table;
+	lfr = from;
 	if (utf_table_init)
 		memset(utf_table, 0, sizeof(utf_table)),
 		utf_table_init = 0;

Attachment: pgpt5nOUkuC5v.pgp
Description: PGP signature

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to