summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libarchive/archive_string.c')
-rw-r--r--lib/libarchive/archive_string.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/libarchive/archive_string.c b/lib/libarchive/archive_string.c
index b100fb9..b7a59ec 100644
--- a/lib/libarchive/archive_string.c
+++ b/lib/libarchive/archive_string.c
@@ -97,50 +97,3 @@ __archive_strappend_char(struct archive_string *as, char c)
{
return (__archive_string_append(as, &c, 1));
}
-
-#if 0
-/* Append Unicode character to string using UTF8 encoding */
-struct archive_string *
-__archive_strappend_char_UTF8(struct archive_string *as, int c)
-{
- char buff[6];
-
- if (c <= 0x7f) {
- buff[0] = c;
- return (__archive_string_append(as, buff, 1));
- } else if (c <= 0x7ff) {
- buff[0] = 0xc0 | (c >> 6);
- buff[1] = 0x80 | (c & 0x3f);
- return (__archive_string_append(as, buff, 2));
- } else if (c <= 0xffff) {
- buff[0] = 0xe0 | (c >> 12);
- buff[1] = 0x80 | ((c >> 6) & 0x3f);
- buff[2] = 0x80 | (c & 0x3f);
- return (__archive_string_append(as, buff, 3));
- } else if (c <= 0x1fffff) {
- buff[0] = 0xf0 | (c >> 18);
- buff[1] = 0x80 | ((c >> 12) & 0x3f);
- buff[2] = 0x80 | ((c >> 6) & 0x3f);
- buff[3] = 0x80 | (c & 0x3f);
- return (__archive_string_append(as, buff, 4));
- } else if (c <= 0x3ffffff) {
- buff[0] = 0xf8 | (c >> 24);
- buff[1] = 0x80 | ((c >> 18) & 0x3f);
- buff[2] = 0x80 | ((c >> 12) & 0x3f);
- buff[3] = 0x80 | ((c >> 6) & 0x3f);
- buff[4] = 0x80 | (c & 0x3f);
- return (__archive_string_append(as, buff, 5));
- } else if (c <= 0x7fffffff) {
- buff[0] = 0xfc | (c >> 30);
- buff[1] = 0x80 | ((c >> 24) & 0x3f);
- buff[1] = 0x80 | ((c >> 18) & 0x3f);
- buff[2] = 0x80 | ((c >> 12) & 0x3f);
- buff[3] = 0x80 | ((c >> 6) & 0x3f);
- buff[4] = 0x80 | (c & 0x3f);
- return (__archive_string_append(as, buff, 6));
- } else {
- /* TODO: Handle this error?? */
- return (as);
- }
-}
-#endif
OpenPOWER on IntegriCloud