From 44a3d3420660428261dd253c41ec4bec245db4fc Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 19 Mar 2004 22:37:06 +0000 Subject: Many fixes: * Disabled shared-library building, as some API breakage is still likely. (I didn't realize it was turned on by default.) If you have an existing /usr/lib/libarchive.so.2, I recommend deleting it. * Pax interchange format now correctly stores and reads UTF8 for extended attributes. In particular, pax format can portably handle arbitrarily long pathnames containing arbitrary characters. * Library compiles cleanly at -O2, -O3, and WARNS=6 on all FreeBSD-CURRENT platforms. * Minor portability improvements inspired by Juergen Lock and Greg Lewis. (Less reliance on stdint.h, isolating of various portability-challenged constructs.) * archive_entry transparently converts multi-byte <-> wide character strings, allowing clients and format handlers to deal with either one, as appropriate. * Support for reading 'L' and 'K' entries in standard tar archives for star compatibility. * Recognize (but don't yet handle) ACL entries from Solaris tar. * Pushed format-specific data for format readers down into format-specific storage and out of library-global storage. This should make it easier to maintain individual formats without mucking with the core library management. * Documentation updates to track the above changes. * Updates to tar.5 to correct a few mistakes and add some additional information about GNU tar and Solaris tar formats. Notes: * The basic 'tar' reader is getting more general; there's not much point in keeping the 'gnutar' reader separate. Merging the two would lose a bunch of duplicate code. * The libc ACL support is looking increasingly inadequate for my needs here. I might need to assemble some fairly significant code for parsing and building ACLs. --- lib/libarchive/archive_string.c | 47 ----------------------------------------- 1 file changed, 47 deletions(-) (limited to 'lib/libarchive/archive_string.c') diff --git a/lib/libarchive/archive_string.c b/lib/libarchive/archive_string.c index b100fb9c7ee8..b7a59ec305c2 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 -- cgit v1.2.3