]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
15 years agoMove macros in archive_string.c to the top of the file.
Michihiro NAKAJIMA [Tue, 17 May 2011 03:55:26 +0000 (23:55 -0400)] 
Move macros in archive_string.c to the top of the file.
Use macro for set byte sequence of U+FFFD for UTF-8.

SVN-Revision: 3347

15 years agoRework UTF-16 conversion functions.
Michihiro NAKAJIMA [Tue, 17 May 2011 03:19:07 +0000 (23:19 -0400)] 
Rework UTF-16 conversion functions.
 - rename strncpy_from_utf16be to strncat_from_utf16be and its feature is slightly changed as strcat.
 - rename strncpy_to_utf16be to strncat_to_utf16be and its feature is slightly changed as strcat.
 - use U+FFFD for invalid character if destination charset is UTF-8.
 - proper handle surrogate pair on Windows version.

SVN-Revision: 3346

15 years agoRework a handling of memory allocation failure in string conversion;
Michihiro NAKAJIMA [Mon, 16 May 2011 11:52:47 +0000 (07:52 -0400)] 
Rework a handling of memory allocation failure in string conversion;
report the failure to the caller as much as we can instead of calling __archive_errx().

SVN-Revision: 3345

15 years agoFix segmentation fault on Mac OS.
Michihiro NAKAJIMA [Mon, 16 May 2011 07:31:55 +0000 (03:31 -0400)] 
Fix segmentation fault on Mac OS.

SVN-Revision: 3344

15 years agoFix the warning Boarland C compiler complains of and some style.
Michihiro NAKAJIMA [Mon, 16 May 2011 04:37:47 +0000 (00:37 -0400)] 
Fix the warning Boarland C compiler complains of and some style.

SVN-Revision: 3343

15 years agoClean up the code Borland C compiler complains of at cab reader.
Michihiro NAKAJIMA [Mon, 16 May 2011 04:28:32 +0000 (00:28 -0400)] 
Clean up the code Borland C compiler complains of at cab reader.

SVN-Revision: 3342

15 years agoctime and ctime_nanos are not used in set_times() on Windows.
Michihiro NAKAJIMA [Mon, 16 May 2011 04:18:20 +0000 (00:18 -0400)] 
ctime and ctime_nanos are not used in set_times() on Windows.

SVN-Revision: 3341

15 years agoAvoid some warnings on Borland C compiler.
Michihiro NAKAJIMA [Mon, 16 May 2011 04:07:59 +0000 (00:07 -0400)] 
Avoid some warnings on Borland C compiler.

SVN-Revision: 3340

15 years agoProper prototype for get_current_codepage and get_current_oemcp; Borland C compiler...
Michihiro NAKAJIMA [Mon, 16 May 2011 03:51:26 +0000 (23:51 -0400)] 
Proper prototype for get_current_codepage and get_current_oemcp; Borland C compiler complains of this.

SVN-Revision: 3339

15 years agoFix the return code of archive_string_append_from_wcs_in_codepage().
Michihiro NAKAJIMA [Mon, 16 May 2011 03:44:15 +0000 (23:44 -0400)] 
Fix the return code of archive_string_append_from_wcs_in_codepage().

SVN-Revision: 3338

15 years agoRemove unused wmemcpy definition.
Michihiro NAKAJIMA [Mon, 16 May 2011 03:38:55 +0000 (23:38 -0400)] 
Remove unused wmemcpy definition.

SVN-Revision: 3337

15 years agoUse wmemcpy at archive_wstring_append().
Michihiro NAKAJIMA [Mon, 16 May 2011 03:38:15 +0000 (23:38 -0400)] 
Use wmemcpy at archive_wstring_append().

SVN-Revision: 3336

15 years agoRemove unneeded code in archive_write_set_format_cpio.c
Michihiro NAKAJIMA [Sun, 15 May 2011 15:21:42 +0000 (11:21 -0400)] 
Remove unneeded code in archive_write_set_format_cpio.c

SVN-Revision: 3335

15 years agoRemove unneeded code in archive_write_set_format_cpio_newc.c
Michihiro NAKAJIMA [Sun, 15 May 2011 15:20:17 +0000 (11:20 -0400)] 
Remove unneeded code in archive_write_set_format_cpio_newc.c

SVN-Revision: 3334

15 years agoUse en_US.UTF-8 locale for tests instead of ru_RU.UTF-8 or ja_JP.UTF-8
Michihiro NAKAJIMA [Sun, 15 May 2011 14:39:47 +0000 (10:39 -0400)] 
Use en_US.UTF-8 locale for tests instead of ru_RU.UTF-8 or ja_JP.UTF-8
since some platform do not install those locales by default.

SVN-Revision: 3333

15 years agoDetect readlinkat() on linux by CMake; linux requires fcntl.h for AT_FDCWD.
Michihiro NAKAJIMA [Sun, 15 May 2011 14:08:23 +0000 (10:08 -0400)] 
Detect readlinkat() on linux by CMake; linux requires fcntl.h for AT_FDCWD.

SVN-Revision: 3332

15 years agoFix build failure.
Michihiro NAKAJIMA [Sun, 15 May 2011 14:04:30 +0000 (10:04 -0400)] 
Fix build failure.

SVN-Revision: 3331

15 years agoImprove string conversion functions of UTF-16 about invalid characters.
Michihiro NAKAJIMA [Sun, 15 May 2011 11:41:02 +0000 (07:41 -0400)] 
Improve string conversion functions of UTF-16 about invalid characters.

SVN-Revision: 3330

15 years agoProperly check if archive_string_ensure() succeeded or not.
Michihiro NAKAJIMA [Sun, 15 May 2011 08:11:38 +0000 (04:11 -0400)] 
Properly check if archive_string_ensure() succeeded or not.

SVN-Revision: 3329

15 years agoApparently, both input and output data type should be UTF-16 for ConvertFromUnicodeTo...
Michihiro NAKAJIMA [Sun, 15 May 2011 08:01:59 +0000 (04:01 -0400)] 
Apparently, both input and output data type should be UTF-16 for ConvertFromUnicodeToText()
when converting NFC to NFD.

SVN-Revision: 3328

15 years agoAvoid local conversion code in iso9660 writer.
Michihiro NAKAJIMA [Sun, 15 May 2011 06:14:55 +0000 (02:14 -0400)] 
Avoid local conversion code in iso9660 writer.

SVN-Revision: 3327

15 years agoFix a name of timezone global variable for Borland.
Michihiro NAKAJIMA [Sun, 15 May 2011 04:09:14 +0000 (00:09 -0400)] 
Fix a name of timezone global variable for Borland.

SVN-Revision: 3326

15 years agoClean up best_effort_strncat_in_locale().
Michihiro NAKAJIMA [Sun, 15 May 2011 04:02:19 +0000 (00:02 -0400)] 
Clean up best_effort_strncat_in_locale().
 - merge is_all_ascii_code() and best_effort_strncat_to_utf8() into best_effort_strncat_in_locale().
 - assign '?' character if a character code > 127.
 - update comment.

SVN-Revision: 3325

15 years agoDo not set error status when a struct archive object is NULL.
Michihiro NAKAJIMA [Sat, 14 May 2011 16:12:26 +0000 (12:12 -0400)] 
Do not set error status when a struct archive object is NULL.

SVN-Revision: 3324

15 years agoFix wrong calculation of converted bytes and return code on character replacement.
Michihiro NAKAJIMA [Sat, 14 May 2011 08:35:06 +0000 (04:35 -0400)] 
Fix wrong calculation of converted bytes and return code on character replacement.

SVN-Revision: 3323

15 years agoThe source data type for ConvertFromUnicodeToText() should be UniChar, UTF-16
Michihiro NAKAJIMA [Sat, 14 May 2011 08:22:48 +0000 (04:22 -0400)] 
The source data type for ConvertFromUnicodeToText() should be UniChar, UTF-16
so we have to do pre-conversion that translates a UTF-8 string to UTF-16's
before calling ConvertFromUnicodeToText() and pass that UTF-16 string.

SVN-Revision: 3322

15 years agoImprove MBS<=>WCS functions.
Michihiro NAKAJIMA [Fri, 13 May 2011 04:14:34 +0000 (00:14 -0400)] 
Improve MBS<=>WCS functions.
 - split archive_wstring_append_from_mbs into mbsnrtowcs version and mbrtowc/mbtowc version.
 - POSIX version of archive_string_append_from_wcs behavior simulates Windows version's.
   That is to continue conversion even if there is illegal WC.
 - set the terminator '\0' to destination buffer even if conversion failed.

SVN-Revision: 3320

15 years agoUse archive_mstring_*_l interface in archive_acl_* functions
Michihiro NAKAJIMA [Thu, 12 May 2011 14:21:05 +0000 (10:21 -0400)] 
Use archive_mstring_*_l interface in archive_acl_* functions
since archive_mstring knows how to treat UTF-8 characters and
what way is efficient on the platform and what way reduces or
avoid dependence on current locale.

SVN-Revision: 3319

15 years agoAdd temporary debug code for Mac OS to check status at CDash.
Michihiro NAKAJIMA [Thu, 12 May 2011 09:52:46 +0000 (05:52 -0400)] 
Add temporary debug code for Mac OS to check status at CDash.

SVN-Revision: 3318

15 years agoOn Mac OS, compare NFD string instead of NFC string
Michihiro NAKAJIMA [Thu, 12 May 2011 08:34:19 +0000 (04:34 -0400)] 
On Mac OS, compare NFD string instead of NFC string
at test_read_format_zip_filename and test_read_format_cab_filename.

SVN-Revision: 3317

15 years agoUse assertEqualMem instead of assert(0 == memcmp(xxx....)).
Michihiro NAKAJIMA [Thu, 12 May 2011 08:13:54 +0000 (04:13 -0400)] 
Use assertEqualMem instead of assert(0 == memcmp(xxx....)).

SVN-Revision: 3316

15 years agoImprove the check that FS_IOC_FIEMAP operation is supported on the filesystem.
Michihiro NAKAJIMA [Thu, 12 May 2011 07:48:44 +0000 (03:48 -0400)] 
Improve the check that FS_IOC_FIEMAP operation is supported on the filesystem.

SVN-Revision: 3315

15 years agoIf FS_IOC_FIEMAP operation fails by EOPNOTSUPP, the operation is not supported.
Michihiro NAKAJIMA [Thu, 12 May 2011 07:43:54 +0000 (03:43 -0400)] 
If FS_IOC_FIEMAP operation fails by EOPNOTSUPP, the operation is not supported.

SVN-Revision: 3314

15 years agoAssign U+FFFD(Replacement Character) for unknown character in UTF-8
Michihiro NAKAJIMA [Thu, 12 May 2011 05:21:45 +0000 (01:21 -0400)] 
Assign U+FFFD(Replacement Character) for unknown character in UTF-8
even if the platform has no conversion function.

SVN-Revision: 3313

15 years agoIncrease robustness for an empty filename or an invalid filename on Windows,
Michihiro NAKAJIMA [Thu, 12 May 2011 02:55:54 +0000 (22:55 -0400)] 
Increase robustness for an empty filename or an invalid filename on Windows,
which cannot be completely converted from WCS to MBS.
Correctly detect invalid UTF-8 string on Windows.

SVN-Revision: 3312

15 years agoUse archive_entry_*_l functions at zip format writer.
Michihiro NAKAJIMA [Thu, 12 May 2011 00:30:11 +0000 (20:30 -0400)] 
Use archive_entry_*_l functions at zip format writer.

SVN-Revision: 3311

15 years agoUse archive_entry_*_l functions at xar format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 15:49:37 +0000 (11:49 -0400)] 
Use archive_entry_*_l functions at xar format writer.

SVN-Revision: 3310

15 years agoUse archive_entry_*_l functions at pax format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 15:33:57 +0000 (11:33 -0400)] 
Use archive_entry_*_l functions at pax format writer.

SVN-Revision: 3309

15 years agoUse archive_entry_*_l functions at ustar format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 13:56:41 +0000 (09:56 -0400)] 
Use archive_entry_*_l functions at ustar format writer.

SVN-Revision: 3308

15 years agoUse archive_entry_*_l functions at gnutar format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 13:40:51 +0000 (09:40 -0400)] 
Use archive_entry_*_l functions at gnutar format writer.

SVN-Revision: 3307

15 years agoUse archive_entry_*_l functions at cpio newc format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 13:02:36 +0000 (09:02 -0400)] 
Use archive_entry_*_l functions at cpio newc format writer.

SVN-Revision: 3306

15 years agoUse archive_entry_*_l functions at cpio format writer.
Michihiro NAKAJIMA [Wed, 11 May 2011 12:47:19 +0000 (08:47 -0400)] 
Use archive_entry_*_l functions at cpio format writer.

SVN-Revision: 3305

15 years agoUse archive_entry_copy_*_l functions at zip format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 12:27:11 +0000 (08:27 -0400)] 
Use archive_entry_copy_*_l functions at zip format reader.

SVN-Revision: 3304

15 years agoUse archive_entry_copy_*_l functions at xar format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 12:12:04 +0000 (08:12 -0400)] 
Use archive_entry_copy_*_l functions at xar format reader.

SVN-Revision: 3303

15 years agoUse archive_entry_copy_*_l functions at tar format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 10:49:07 +0000 (06:49 -0400)] 
Use archive_entry_copy_*_l functions at tar format reader.

SVN-Revision: 3302

15 years agoUse archive_entry_copy_*_l functions at lha format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 10:07:53 +0000 (06:07 -0400)] 
Use archive_entry_copy_*_l functions at lha format reader.

SVN-Revision: 3301

15 years agoUse archive_entry_copy_*_l functions at cpio format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 09:39:04 +0000 (05:39 -0400)] 
Use archive_entry_copy_*_l functions at cpio format reader.

SVN-Revision: 3300

15 years agoUse archive_entry_copy_*_l functions at cab format reader.
Michihiro NAKAJIMA [Wed, 11 May 2011 09:28:26 +0000 (05:28 -0400)] 
Use archive_entry_copy_*_l functions at cab format reader.

SVN-Revision: 3299

15 years agoCorrect winioctl to winioctl.h in configure.ac.
Michihiro NAKAJIMA [Wed, 11 May 2011 05:49:52 +0000 (01:49 -0400)] 
Correct winioctl to winioctl.h in configure.ac.
Fix comment about winioctl.h in build/cmake/config.h.in.

SVN-Revision: 3298

15 years agoIn configure, SSIZE_MAX requires limits.h
Michihiro NAKAJIMA [Wed, 11 May 2011 05:42:01 +0000 (01:42 -0400)] 
In configure, SSIZE_MAX requires limits.h

SVN-Revision: 3297

15 years agoCorrect macro names in CMakeLists.txt.
Michihiro NAKAJIMA [Wed, 11 May 2011 05:18:59 +0000 (01:18 -0400)] 
Correct macro names in CMakeLists.txt.
  HAVE_ACL_LIB ==> HAVE_LIBACL
  HAVE_ATTR_LIB ==> HAVE_LIBATTR

SVN-Revision: 3296

15 years agoSpecify -fno-builtin to gcc during detecting functions because use of
Michihiro NAKAJIMA [Wed, 11 May 2011 04:39:24 +0000 (00:39 -0400)] 
Specify -fno-builtin to gcc during detecting functions because use of
-Werror on CMake prevent the detection of built-in functions of gcc by
compiling failure which is conflicting types for built-in function.

SVN-Revision: 3295

15 years agoDetect readdir_r with cmake on linux.
Michihiro NAKAJIMA [Tue, 10 May 2011 15:35:19 +0000 (11:35 -0400)] 
Detect readdir_r with cmake on linux.

SVN-Revision: 3294

15 years agoFix build failure through cmake on linux.
Michihiro NAKAJIMA [Tue, 10 May 2011 14:53:42 +0000 (10:53 -0400)] 
Fix build failure through cmake on linux.
It needs some macro such as _GNU_SOURCE to use extension functions.

including previous changes of build/cmake/config.h.in.

SVN-Revision: 3293

15 years agoProperly detect iconv with cmake on linux.
Michihiro NAKAJIMA [Tue, 10 May 2011 14:34:44 +0000 (10:34 -0400)] 
Properly detect iconv with cmake on linux.

SVN-Revision: 3292

15 years agoAccording to Public Review Issue #121 at unicode.org http://unicode.org/review/pr...
Michihiro NAKAJIMA [Tue, 10 May 2011 12:55:01 +0000 (08:55 -0400)] 
According to Public Review Issue #121 at unicode.org http://unicode.org/review/pr-121.html , we should use U+FFFD for ill-formed subsequences.

SVN-Revision: 3291

15 years agoContinue a string conversion even if the normalization failed.
Michihiro NAKAJIMA [Tue, 10 May 2011 07:28:50 +0000 (03:28 -0400)] 
Continue a string conversion even if the normalization failed.

SVN-Revision: 3290

15 years agoDump unicode code points when comparing UTF-8 strings fail at
Michihiro NAKAJIMA [Mon, 9 May 2011 12:19:07 +0000 (08:19 -0400)] 
Dump unicode code points when comparing UTF-8 strings fail at
test_read_format_cab_filename and test_read_format_zip_filename.

SVN-Revision: 3289

15 years agoImplement a string conversion interface to archive_entry and archive_mstring
Michihiro NAKAJIMA [Mon, 9 May 2011 12:07:31 +0000 (08:07 -0400)] 
Implement a string conversion interface to archive_entry and archive_mstring
for efficient string conversion. Some platform have to do a string conversion
through wide characters. And then Windows platform cannot make locale UTF-8,
so it means use of wide characters is only way to make a internationalization
program.

SVN-Revision: 3288

15 years agoThe text conversion functions are in CoreServices.framework
Tim Kientzle [Sun, 8 May 2011 16:40:39 +0000 (12:40 -0400)] 
The text conversion functions are in CoreServices.framework

SVN-Revision: 3287

15 years agoOn Mac OS, Link CoreFoundation to avoid build failure.
Michihiro NAKAJIMA [Sat, 7 May 2011 12:49:28 +0000 (08:49 -0400)] 
On Mac OS, Link CoreFoundation to avoid build failure.

SVN-Revision: 3286

15 years agoOn Windows, merge two versions of the string conversion code between WCS and MBS.
Michihiro NAKAJIMA [Fri, 6 May 2011 06:41:08 +0000 (02:41 -0400)] 
On Windows, merge two versions of the string conversion code between WCS and MBS.

SVN-Revision: 3285

15 years agoFix build failure on Mac OS X.
Michihiro NAKAJIMA [Fri, 6 May 2011 04:47:55 +0000 (00:47 -0400)] 
Fix build failure on Mac OS X.

SVN-Revision: 3284

15 years agoChange the interface of archive_mstring_get_{utf8,mbs,wcs} so that we will be able...
Michihiro NAKAJIMA [Thu, 5 May 2011 12:52:14 +0000 (08:52 -0400)] 
Change the interface of archive_mstring_get_{utf8,mbs,wcs} so that we will be able to know the conversion result.

SVN-Revision: 3283

15 years agoChange a return code of archive_mstring_update_utf8() function;
Michihiro NAKAJIMA [Thu, 5 May 2011 11:38:18 +0000 (07:38 -0400)] 
Change a return code of archive_mstring_update_utf8() function;
  1 ==> 0 : success.
  0 ==> -1: failure.

SVN-Revision: 3282

15 years agoOn Mac OS, Use ConvertFromUnicodeToText() for decomposition instead of iconv.
Michihiro NAKAJIMA [Thu, 5 May 2011 06:36:24 +0000 (02:36 -0400)] 
On Mac OS, Use ConvertFromUnicodeToText() for decomposition instead of iconv.

SVN-Revision: 3281

15 years agoAdd assertEqualUTF8String. If two strings are not equal, that will dump their code...
Michihiro NAKAJIMA [Wed, 4 May 2011 11:05:49 +0000 (07:05 -0400)] 
Add assertEqualUTF8String. If two strings are not equal, that will dump their code points.

SVN-Revision: 3280

15 years agoEliminate an unused variable.
Michihiro NAKAJIMA [Wed, 4 May 2011 10:07:58 +0000 (06:07 -0400)] 
Eliminate an unused variable.

SVN-Revision: 3279

15 years agoDo not lose some conversion error.
Michihiro NAKAJIMA [Wed, 4 May 2011 09:26:25 +0000 (05:26 -0400)] 
Do not lose some conversion error.

SVN-Revision: 3278

15 years agoIssue 106.
Michihiro NAKAJIMA [Wed, 4 May 2011 06:00:59 +0000 (02:00 -0400)] 
Issue 106.
Check the result of FIEMAP because there is a possibility the result
has adjacent extents though the file is not sparse. So we should
clear the sparse data if it indicates the whole file.

SVN-Revision: 3277

15 years agoRemove local string conversion code from xar writer. I forgot and missed that code.
Michihiro NAKAJIMA [Tue, 3 May 2011 12:43:50 +0000 (08:43 -0400)] 
Remove local string conversion code from xar writer. I forgot and missed that code.

SVN-Revision: 3276

15 years agoIf the character-set of filenames in archives is UTF-8, we should automatically
Michihiro NAKAJIMA [Tue, 3 May 2011 09:37:31 +0000 (05:37 -0400)] 
If the character-set of filenames in archives is UTF-8, we should automatically
normalize it to avoid the scene that two filenames in one directory are, of course,
different byte sequence but they have the same sight because of NFD and NFC.
Second reason is that iconv cannot correctly convert NFD characters to other
character-set so we have to convert NFD to NFC before iconv handle it unless
iconv supports UTF-8-MAC. Third reason is for matching filenames, if filenames
in archives are NFD and the platform is not MAC OS, the uses cannot specify
the filename the uses want to extract although the users can see the filename
by listing. Recently NFD can be displayed on some platforms but creating NFD
requires character-set conversion utility, in particular that input of NFD
string is hard on Windows platform.

SVN-Revision: 3275

15 years agoProperly check if something error occured and report it after calling
Michihiro NAKAJIMA [Fri, 29 Apr 2011 03:49:07 +0000 (23:49 -0400)] 
Properly check if something error occured and report it after calling
readdir_r() and readdir().

SVN-Revision: 3274

15 years agoFix build failure when readdir_r() is not available.
Michihiro NAKAJIMA [Fri, 29 Apr 2011 03:48:02 +0000 (23:48 -0400)] 
Fix build failure when readdir_r() is not available.

SVN-Revision: 3273

15 years agoRefactor the read_open() routines into a collection of
Tim Kientzle [Tue, 26 Apr 2011 06:02:43 +0000 (02:02 -0400)] 
Refactor the read_open() routines into a collection of
single setters to set the callbacks, and a simple
archive_read_open1(a) that uses the callbacks already
registered.
In particular, this will make it easier to extend the
API in the future with new callbacks.

SVN-Revision: 3272

15 years agoCorrect a length argument to invalid_mbs().
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:44:29 +0000 (06:44 -0400)] 
Correct a length argument to invalid_mbs().

SVN-Revision: 3271

15 years agoReduce redundancy code about a NULL check of a string object value.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:42:43 +0000 (06:42 -0400)] 
Reduce redundancy code about a NULL check of a string object value.

SVN-Revision: 3270

15 years agoRename IS_SURROGATE macro to IS_SURROGATE_PAIR_LA.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:03:52 +0000 (06:03 -0400)] 
Rename IS_SURROGATE macro to IS_SURROGATE_PAIR_LA.

SVN-Revision: 3269

15 years agoRename strncat_from_utf8_utf8 function to strncat_from_utf8_to_utf8.
Michihiro NAKAJIMA [Mon, 25 Apr 2011 10:00:58 +0000 (06:00 -0400)] 
Rename strncat_from_utf8_utf8 function to strncat_from_utf8_to_utf8.

SVN-Revision: 3268

15 years agoGet rid of a hdrcharset option support from xar reader. It is almost useless for xar
Michihiro NAKAJIMA [Mon, 25 Apr 2011 09:48:25 +0000 (05:48 -0400)] 
Get rid of a hdrcharset option support from xar reader. It is almost useless for xar
since the options would be used only when the users needed to convert filenames
from UTF-8-MAC to UTF-8, but, unfortunately, UTF-8-MAC is not usually supported
by iconv/libiconv(including packages system such as FreeBSD ports or NetBSD pkgsrc)
except MAC OS, while the patch for libiconv has been available for many years.
That means users will not use UTF-8-MAC unless the users could build libiconv with
custom libiconv for UTF-8-MAC.

SVN-Revision: 3267

15 years agoUse en_US.UTF-8 instead of de_DE.UTF-8 at test_entry and test_pax_filename_encoding
Michihiro NAKAJIMA [Mon, 25 Apr 2011 09:11:42 +0000 (05:11 -0400)] 
Use en_US.UTF-8 instead of de_DE.UTF-8 at test_entry and test_pax_filename_encoding
because  it seems en_US.UTF-8 is widely supported by default more than de_DE.UTF-8.
For example, Ubuntu has installed "C" and en_*.UTF-8 locales whatever locale would
be selected by default but de_DE.UTF-8 is not.

SVN-Revision: 3266

15 years agoSuppress leading zeros: Print version as "3.0.0a" instead of "3.000.000a"
Tim Kientzle [Sun, 24 Apr 2011 07:13:03 +0000 (03:13 -0400)] 
Suppress leading zeros:  Print version as "3.0.0a" instead of "3.000.000a"

SVN-Revision: 3265

15 years agoProperly initialize a string conversion object.
Michihiro NAKAJIMA [Fri, 22 Apr 2011 08:12:09 +0000 (04:12 -0400)] 
Properly initialize a string conversion object.

SVN-Revision: 3264

15 years agoSkip test_compat_pax_libarchive_2x when the WCS of the platform is not Unicode.
Michihiro NAKAJIMA [Thu, 21 Apr 2011 08:29:00 +0000 (04:29 -0400)] 
Skip test_compat_pax_libarchive_2x when the WCS of the platform is not Unicode.

SVN-Revision: 3263

15 years agoAvoid a conflict of macro names on Visual Studio 9 and MSYS.
Michihiro NAKAJIMA [Thu, 21 Apr 2011 07:38:48 +0000 (03:38 -0400)] 
Avoid a conflict of macro names on Visual Studio 9 and MSYS.

SVN-Revision: 3262

15 years agoUpdate comments and rename a macro SCONV_UTF8_UTF8_COPY to SCONV_COPY_UTF8_TO_UTF8.
Michihiro NAKAJIMA [Wed, 20 Apr 2011 17:28:50 +0000 (13:28 -0400)] 
Update comments and rename a macro SCONV_UTF8_UTF8_COPY to SCONV_COPY_UTF8_TO_UTF8.

SVN-Revision: 3261

15 years agoRemove a unused variable.
Michihiro NAKAJIMA [Wed, 20 Apr 2011 15:53:20 +0000 (11:53 -0400)] 
Remove a unused variable.

SVN-Revision: 3260

15 years agoAdd a check for surrogate pairs in UTF-8; Prevent surrogate pairs in UTF-8
Michihiro NAKAJIMA [Wed, 20 Apr 2011 11:28:51 +0000 (07:28 -0400)] 
Add a check for surrogate pairs in UTF-8; Prevent surrogate pairs in UTF-8
from importing and exporting even if using iconv.

SVN-Revision: 3259

15 years agoApparently, locale_charset() is broken on Mac OS.
Tim Kientzle [Wed, 20 Apr 2011 06:18:46 +0000 (02:18 -0400)] 
Apparently, locale_charset() is broken on Mac OS.

SVN-Revision: 3258

15 years agoFix probe for readlinkat(). In particular, it was
Tim Kientzle [Wed, 20 Apr 2011 05:49:49 +0000 (01:49 -0400)] 
Fix probe for readlinkat().  In particular, it was
mis-probed on some older versions of GNU libc.

SVN-Revision: 3257

15 years agoCorrectly disable OpenSSL support even after it's
Tim Kientzle [Wed, 20 Apr 2011 05:42:21 +0000 (01:42 -0400)] 
Correctly disable OpenSSL support even after it's
been enabled.  This requires carefully overriding
CMake cached values.

SVN-Revision: 3256

15 years agoImprove Unicode handling.
Michihiro NAKAJIMA [Tue, 19 Apr 2011 14:51:35 +0000 (10:51 -0400)] 
Improve Unicode handling.
1. The conversion will fail when following conditions since those are not legal Unicode.
 - The code point larger than 0x10FFFF.
 - The code point consist of overlong sequence.
 - There is a surrogate pair in UTF-8 strings. we currently use iconv
   if available, and it does not allow a surrogate pair in UTF-8, so the behavior
   of string_append_from_utf8_to_utf16be() function should match it.
 - There is a incomplete surrogate pair in UTF-16 strings.
2. Use a table for getting bytes of UTF-8 sequence from first byte.
   It is easy to know what code is wrong and how many bytes are following.

SVN-Revision: 3255

15 years agoIntroudce "tar:utf8type=libarchive2x" option for the incorrect UTF-8 string
Michihiro NAKAJIMA [Tue, 19 Apr 2011 07:55:44 +0000 (03:55 -0400)] 
Introudce "tar:utf8type=libarchive2x" option for the incorrect UTF-8 string
which libarchive 2.x makes in wrong assumption about wchar_t. The option works
only for pax format.

Currently libarchive 3 correctly translates UTF-8 string from/to current locale
string, but we cannot accordingly handle the incorrect UTF-8 on the some
platforms wchar_t of which is not Unicode and users are not using UTF-8 locale.
So we should support the UTF-8 string to be properly translated to current
locale string.

SVN-Revision: 3254

15 years agoStyle fix.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 09:42:02 +0000 (05:42 -0400)] 
Style fix.

SVN-Revision: 3253

15 years agoImprove test_pax_filename_encoding.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 05:23:17 +0000 (01:23 -0400)] 
Improve test_pax_filename_encoding.
 - add a test for hdrcharset=BINARY.
 - add a test for unacceptalbe names to the hdrcharset option.

SVN-Revision: 3252

15 years agoAdd a test of hdrcharset option for ustar format.
Michihiro NAKAJIMA [Mon, 18 Apr 2011 04:53:34 +0000 (00:53 -0400)] 
Add a test of hdrcharset option for ustar format.

SVN-Revision: 3251

15 years agoChange some of sample files which I recently added, to match its test name.
Michihiro NAKAJIMA [Sun, 17 Apr 2011 16:22:54 +0000 (12:22 -0400)] 
Change some of sample files which I recently added, to match its test name.

SVN-Revision: 3250

15 years agoAdd "else" statement. it's not necessary but it should be.
Michihiro NAKAJIMA [Sun, 17 Apr 2011 08:01:43 +0000 (04:01 -0400)] 
Add "else" statement. it's not necessary but it should be.

SVN-Revision: 3249

15 years agoarchive_read_support_compression_all() is deprecated and will be
Tim Kientzle [Sun, 17 Apr 2011 03:57:56 +0000 (23:57 -0400)] 
archive_read_support_compression_all() is deprecated and will be
removed in libarchive 4.0.

SVN-Revision: 3248

15 years agoIssue 153: Clear error before returning, as found
Tim Kientzle [Sun, 17 Apr 2011 03:57:27 +0000 (23:57 -0400)] 
Issue 153:  Clear error before returning, as found
by Roman Neuhauser's recent testing.

SVN-Revision: 3247