diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-28 06:59:20 -0400 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2011-03-28 06:59:20 -0400 |
commit | 15cf835cc555018bed865071cb9f5bcdb6b75060 (patch) | |
tree | 69c3312f104e2ff1a60255b63fc7f6ae34cae494 /libarchive/archive_util.c | |
parent | f74c5f05faccec9b0946faa3f3fbe41fab276a26 (diff) | |
download | libarchive-15cf835cc555018bed865071cb9f5bcdb6b75060.tar.gz |
Improve character-set conversion functions.
- Change the interface in order to reduece the comparison of
charset names. Previous version always did it when the functions
were called; it was very inefficient. So I have made a conversion
object, struct archive_string_conv, to resolve that issue.
- Integrate *_from_charset and *_to_charset into *_in_locale because
of above.
- Integrate *_from_utf16be and *_to_utf16be into *in_locale.
- On Windows, Make a codepage from a charset name to know whether
current codepage and specified charset are the same or not.
SVN-Revision: 3108
Diffstat (limited to 'libarchive/archive_util.c')
-rw-r--r-- | libarchive/archive_util.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c index 38d2c362..f6bec3bb 100644 --- a/libarchive/archive_util.c +++ b/libarchive/archive_util.c @@ -51,19 +51,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_util.c 201098 2009-12-28 02:58:1 int __archive_clean(struct archive *a) { -#if HAVE_ICONV - int i; - - free(a->current_code); - - for (i = 0; i < ICONV_TABLE_SIZE; i++) { - free(a->iconv_table[i].charset); - if (a->iconv_table[i].to_current != (iconv_t)0) - iconv_close(a->iconv_table[i].to_current); - if (a->iconv_table[i].from_current != (iconv_t)0) - iconv_close(a->iconv_table[i].from_current); - } -#endif + archive_string_conversion_free(a); return (ARCHIVE_OK); } |