]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
14 years agoImprove test_read_format_zip_filename for Windows platform.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 07:21:45 +0000 (03:21 -0400)] 
Improve test_read_format_zip_filename for Windows platform.
 - some tests work on both POSIX and Windows platform.
 - add test_read_format_zip_filename_CP866_CP1251_win to check the automatic filename translation.

SVN-Revision: 3193

14 years agoFix the automatic filename translation on Windows and add a test for it.
Michihiro NAKAJIMA [Sun, 10 Apr 2011 07:16:21 +0000 (03:16 -0400)] 
Fix the automatic filename translation on Windows and add a test for it.

When reading CP866 filenames in the zip file on Russian Windows platform,
which its ACP is not equal to its OEMCP, We should automatically translate
CP866(OEMCP of Russian) filenames to CP1251(ACP of Russian) filenames because
other archiver application on Windows have stored the filenames in CP866
through WideCharToMultiByte() with CP_OEMCP.

SVN-Revision: 3192

14 years agoremove stuff covered by #if ARCHIVE_VERSION_NUMBER < 3000000
Roman Neuhauser [Sat, 9 Apr 2011 08:07:11 +0000 (04:07 -0400)] 
remove stuff covered by #if ARCHIVE_VERSION_NUMBER < 3000000

archive.h says #define ARCHIVE_VERSION_NUMBER 3000000, and it's
not going to decrease.

SVN-Revision: 3191

14 years agotest.h: leave __LIBARCHIVE_TEST up to individual test files
Roman Neuhauser [Sat, 9 Apr 2011 08:07:04 +0000 (04:07 -0400)] 
test.h: leave __LIBARCHIVE_TEST up to individual test files

per Tim's request, tests should be very explicit about using
libarchive's internals.

SVN-Revision: 3190

14 years agotest_archive_string.c: drop assertEqualArchiveString
Roman Neuhauser [Sat, 9 Apr 2011 08:06:57 +0000 (04:06 -0400)] 
test_archive_string.c: drop assertEqualArchiveString

the interesting bit about the archive_string* returning functions
is the returned address (these must return their first argument),
the value pointed at is tested separately.

SVN-Revision: 3189

14 years agoAdd a filename encoding test for zip.
Michihiro NAKAJIMA [Sat, 9 Apr 2011 06:52:32 +0000 (02:52 -0400)] 
Add a filename encoding test for zip.

SVN-Revision: 3188

14 years agoChoose the charset described in the archive file when it's available even if hdrchars...
Michihiro NAKAJIMA [Sat, 9 Apr 2011 04:10:02 +0000 (00:10 -0400)] 
Choose the charset described in the archive file when it's available even if hdrcharset option is used.

SVN-Revision: 3187

14 years agoCorrectly get the OEM CodePage(OEMCP) of the current locale set by setlocale().
Michihiro NAKAJIMA [Sat, 9 Apr 2011 03:23:24 +0000 (23:23 -0400)] 
Correctly get the OEM CodePage(OEMCP) of the current locale set by setlocale().
GetOEMCP() returns system default OEMCP not current locale's.

SVN-Revision: 3186

14 years agoUse of mbrtowc/wcrtomb is slower than use of WideCharToMultiByte/MultiByteToWideChar.
Michihiro NAKAJIMA [Fri, 8 Apr 2011 14:53:15 +0000 (10:53 -0400)] 
Use of mbrtowc/wcrtomb is slower than use of WideCharToMultiByte/MultiByteToWideChar.
So we should use WideCharToMultiByte/MultiByteToWideChar and
simulate CRT mbrtowc/wcrtomb handling in "C" locale.

SVN-Revision: 3185

14 years agoPax format uses only both BINARY and UTF-8 to its header data.
Michihiro NAKAJIMA [Fri, 8 Apr 2011 14:41:17 +0000 (10:41 -0400)] 
Pax format uses only both BINARY and UTF-8 to its header data.
So we should not overwrite it by the hdrcharset option.

SVN-Revision: 3184

14 years agoFollowing tests are now for all platform not only Windows.
Michihiro NAKAJIMA [Fri, 8 Apr 2011 11:58:02 +0000 (07:58 -0400)] 
Following tests are now for all platform not only Windows.
  test_read_format_zip_filename_CP932_CP932
  test_read_format_zip_filename_UTF8_CP932
  test_read_format_zip_filename_CP866_CP1251
  test_read_format_zip_filename_KOI8R_CP1251
  test_read_format_zip_filename_UTF8_CP1251

SVN-Revision: 3183

14 years agoSimplify sparse test code.
Michihiro NAKAJIMA [Fri, 8 Apr 2011 09:44:52 +0000 (05:44 -0400)] 
Simplify sparse test code.
Avoid the effect of current locale state to the current working directory in multi-byte name
for the directory traversals on Windows.

SVN-Revision: 3182

14 years agoUse of archive_strcat() in archive_string_append_from_wcs_to_mbs() is slightly ineffi...
Michihiro NAKAJIMA [Fri, 8 Apr 2011 08:59:20 +0000 (04:59 -0400)] 
Use of archive_strcat() in archive_string_append_from_wcs_to_mbs() is slightly inefficient.
We can trust a contents of buffer, so we should use archive_string_append() instead.

SVN-Revision: 3181

14 years agoOn Windows Correctly handle a directory file at archive_read_disk_entry_from_file().
Michihiro NAKAJIMA [Fri, 8 Apr 2011 08:23:15 +0000 (04:23 -0400)] 
On Windows Correctly handle a directory file at archive_read_disk_entry_from_file().

SVN-Revision: 3180

14 years agoUse mbstowcs() at __la_win_permissive_name() instead of MultiByteToWideChar() with...
Michihiro NAKAJIMA [Fri, 8 Apr 2011 07:45:20 +0000 (03:45 -0400)] 
Use mbstowcs() at __la_win_permissive_name() instead of MultiByteToWideChar() with CP_ACP, and
Reduce the effect of locale from the functions which used __la_win_permissive_name().

SVN-Revision: 3179

14 years agoOn Windows, Improve a conversion MBS<==>WCS to be related with setlocale().
Michihiro NAKAJIMA [Fri, 8 Apr 2011 06:37:01 +0000 (02:37 -0400)] 
On Windows, Improve a conversion MBS<==>WCS to be related with setlocale().
use of _get_current_locale() was good but msys does not provide, use of CP_ACP
mostly worked well but it ignored the locale set by setlocale().
I was finding the best solution for that issue and I finally found that
setlocale(LC_CTYPE, NULL) always returned current CodePage like this
"English_United States.1252", so we can get the current CodePage through
setlocale().

SVN-Revision: 3178

14 years agoAdd filenames conversion tests for Windows.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 16:26:12 +0000 (12:26 -0400)] 
Add filenames conversion tests for Windows.
We have to check WCS(UTF-16) filenames for those tests because MBS
byte sequence cab be different if the current locale is different.
For example, MBS in CP932 can together describe CP866 by using
escape sequence so you can see a CP866 specific character in non
CP866 CodePage but cannot compare byte sequence to formal CP866 byte
sequence because of the escape sequence.

SVN-Revision: 3177

14 years agoAdd some test for zip reader.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 14:17:14 +0000 (10:17 -0400)] 
Add some test for zip reader.
 - read Russian filenames in KOI8-R.
 - read Russian filenames in CP866.
 - read Russian filenames in UTF-8.

SVN-Revision: 3176

14 years agoThe filenames in pax should be written in UTF-8 without hdrcharset=UTF-8 option.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 12:01:19 +0000 (08:01 -0400)] 
The filenames in pax should be written in UTF-8 without hdrcharset=UTF-8 option.

SVN-Revision: 3175

14 years agoRemove old, redundant test code.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 11:49:02 +0000 (07:49 -0400)] 
Remove old, redundant test code.

SVN-Revision: 3174

14 years agoUpdate Windows CodePage look-up table.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 10:27:14 +0000 (06:27 -0400)] 
Update Windows CodePage look-up table.

SVN-Revision: 3173

14 years agoIntroduce
Michihiro NAKAJIMA [Thu, 7 Apr 2011 09:52:51 +0000 (05:52 -0400)] 
Introduce
   archive_string_default_conversion_for_read() and
   archive_string_default_conversion_for_write()
for conversion CP_ACP <==> CP_OEMCP(as charset for archive file) on Windows platform.
Those functions on non-Windows platform always return NULL.

SVN-Revision: 3172

14 years agoDrop a use of CRL function _get_current_locale(), which msys does not provide.
Michihiro NAKAJIMA [Thu, 7 Apr 2011 06:14:23 +0000 (02:14 -0400)] 
Drop a use of CRL function _get_current_locale(), which msys does not provide.
We should use GetACP() instead. This is simple and fast, and would work well
for the application using libarchive.
I changed my idea it is better that a use of GetOEMCP() is only in reader and writer.

SVN-Revision: 3171

14 years agoAllow hdrcharset=UTF-8 to pax writer because libarchive_test needs that for its test...
Michihiro NAKAJIMA [Thu, 7 Apr 2011 05:47:08 +0000 (01:47 -0400)] 
Allow hdrcharset=UTF-8 to pax writer because libarchive_test needs that for its test to check
if the running platform support the string conversion or not.

SVN-Revision: 3170

14 years agoUnbreak build on msys.
Michihiro NAKAJIMA [Wed, 6 Apr 2011 13:04:12 +0000 (09:04 -0400)] 
Unbreak build on msys.

SVN-Revision: 3169

14 years agoCopy lib-link.m4,lib-prefix.m4 and lib-ld.m4 from
Michihiro NAKAJIMA [Wed, 6 Apr 2011 10:42:46 +0000 (06:42 -0400)] 
Copy lib-link.m4,lib-prefix.m4 and lib-ld.m4 from
http://git.savannah.gnu.org/cgit/gnulib.git/tree/m4 into build/autoconf
so that iconv.m4 can be used without error on Ubuntu or other platforms.

SVN-Revision: 3168

14 years agoRename archive_string_append_from_unicode_to_mbs back to archive_string_append_from_w...
Michihiro NAKAJIMA [Wed, 6 Apr 2011 05:25:24 +0000 (01:25 -0400)] 
Rename archive_string_append_from_unicode_to_mbs back to archive_string_append_from_wcs_to_mbs
since we have changed the handling of WCS. we are free from WCS format.

SVN-Revision: 3167

14 years agoSimply choose a header encoding on pax writer.
Michihiro NAKAJIMA [Wed, 6 Apr 2011 05:07:14 +0000 (01:07 -0400)] 
Simply choose a header encoding on pax writer.
Do not initialize a string conversion object if unneeded.

SVN-Revision: 3166

14 years agoRename "charset" option to "hdrcharset" since the name "charset" is not clear,
Michihiro NAKAJIMA [Wed, 6 Apr 2011 04:31:40 +0000 (00:31 -0400)] 
Rename "charset" option to "hdrcharset" since the name "charset" is not clear,
in particular reading or writing pax format, the "charset" option can be used to
a content of the file stored in pax archive file, and then "hdrcharset" described
for its metadata such as filename.

SVN-Revision: 3165

14 years agotest_archive_string.c tests archive_string_sprintf a bit
Roman Neuhauser [Mon, 4 Apr 2011 22:32:58 +0000 (18:32 -0400)] 
test_archive_string.c tests archive_string_sprintf a bit

mostly concerned with storage allocation

SVN-Revision: 3164

14 years agotest_archive_string.c tests archive_strncpy
Roman Neuhauser [Mon, 4 Apr 2011 22:32:52 +0000 (18:32 -0400)] 
test_archive_string.c tests archive_strncpy

SVN-Revision: 3163

14 years agotest_archive_string.c: tests for some archive_string operations
Roman Neuhauser [Mon, 4 Apr 2011 11:36:36 +0000 (07:36 -0400)] 
test_archive_string.c: tests for some archive_string operations

SVN-Revision: 3162

14 years agoarchive_read_support_format_xar.c: multiple fixes based on Tim's comments
Roman Neuhauser [Mon, 4 Apr 2011 11:36:14 +0000 (07:36 -0400)] 
archive_read_support_format_xar.c: multiple fixes based on Tim's comments

* various helper functions take archive_read* so that they can
  call archive_set_error()
* the expat-based TOC parser should now behave correctly on errors

SVN-Revision: 3161

14 years agoarchive_read_support_format_tar.c: fix looming buffer overflow
Roman Neuhauser [Mon, 4 Apr 2011 11:35:46 +0000 (07:35 -0400)] 
archive_read_support_format_tar.c: fix looming buffer overflow

plus:

* archive_set_error right at failure
* gnu_add_sparse_entry is a function again

SVN-Revision: 3160

14 years agoarchive_read_support_format_cpio.c: archive_set_error right at failure
Roman Neuhauser [Mon, 4 Apr 2011 11:35:35 +0000 (07:35 -0400)] 
archive_read_support_format_cpio.c: archive_set_error right at failure

record_hardlink() calls archive_set_error() itself

SVN-Revision: 3159

14 years agoarchive_read_support_format_iso9660.c: plug looming buffer overflows
Roman Neuhauser [Mon, 4 Apr 2011 11:35:09 +0000 (07:35 -0400)] 
archive_read_support_format_iso9660.c: plug looming buffer overflows

all heap_add_entry(), add_entry() and relocate_dir() calls are
checked now.

heap_add_entry() takes archive_read* and calls archive_set_error()
itself so that error reporting sits right next to the error cause.

SVN-Revision: 3158

14 years agoremove archive_read_get_bidder macro again
Roman Neuhauser [Mon, 4 Apr 2011 11:34:24 +0000 (07:34 -0400)] 
remove archive_read_get_bidder macro again

Tim dislikes the hidden return statement

SVN-Revision: 3157

14 years agoGive the API caller a memory allocation failure of a string conversion object by...
Michihiro NAKAJIMA [Mon, 4 Apr 2011 07:12:16 +0000 (03:12 -0400)] 
Give the API caller a memory allocation failure of a string conversion object by returning ARCHIVE_FATAL
instead of use of __archive_errx().

SVN-Revision: 3156

14 years agoThis change almost revert r3148,r3149 because of my misunderstanding.
Michihiro NAKAJIMA [Mon, 4 Apr 2011 05:54:44 +0000 (01:54 -0400)] 
This change almost revert r3148,r3149 because of my misunderstanding.
We should use both BINARY and UTF-8(default) only to a charset for PAX header.
- Pax writer allow charset=BINARY option only.
- For Reader side, Pax header encoding does not affect other tar header, and
  Pax header parser allow only both BINARY and "ISO-IR 10646 2000 UTF-8" for hdrcharset.

SVN-Revision: 3155

14 years agoIf someone disables ENABLE_ACL or ENABLE_XATTR, we need
Tim Kientzle [Sun, 3 Apr 2011 18:31:04 +0000 (14:31 -0400)] 
If someone disables ENABLE_ACL or ENABLE_XATTR, we need
to override the cached values for the various ACL orn
xattr functions.

SVN-Revision: 3154

14 years agoChange the charset to codepage translation to be
Tim Kientzle [Sun, 3 Apr 2011 17:46:04 +0000 (13:46 -0400)] 
Change the charset to codepage translation to be
(mostly) just a lookup table.

SVN-Revision: 3153

14 years agoAdd a few charset to be translated into Windows codepage.
Michihiro NAKAJIMA [Sun, 3 Apr 2011 13:25:34 +0000 (09:25 -0400)] 
Add a few charset to be translated into Windows codepage.

SVN-Revision: 3152

14 years agoProperly check a character-set name in hdrcharset of pax header.
Michihiro NAKAJIMA [Sat, 2 Apr 2011 05:37:48 +0000 (01:37 -0400)] 
Properly check a character-set name in hdrcharset of pax header.

SVN-Revision: 3149

14 years agoAccording to IEEE Std 1003.1-2001, we can use following charset to pax writer.
Michihiro NAKAJIMA [Sat, 2 Apr 2011 05:10:30 +0000 (01:10 -0400)] 
According to IEEE Std 1003.1-2001, we can use following charset to pax writer.
 UTF-8
 BINARY
 ISO-8859-1  ISO8859-1
 ISO-8859-2  ISO8859-2
 ISO-8859-3  ISO8859-3
 ISO-8859-4  ISO8859-4
 ISO-8859-5  ISO8859-5
 ISO-8859-6  ISO8859-6
 ISO-8859-7  ISO8859-7
 ISO-8859-8  ISO8859-8
 ISO-8859-9  ISO8859-9
 ISO-8859-10 ISO8859-10
 ISO-8859-13 ISO8859-13
 ISO-8859-14 ISO8859-14
 ISO-8859-15 ISO8859-15

We should not allow other charset to a charset option of pax writer.

SVN-Revision: 3148

14 years agoFix a replacement of Windows path separator in CP932 locale.
Michihiro NAKAJIMA [Fri, 1 Apr 2011 12:07:43 +0000 (08:07 -0400)] 
Fix a replacement of Windows path separator in CP932 locale.
And update related comment.

SVN-Revision: 3147

14 years agoAdd a new line to the end of archive_read_disk_entry_from_file.c to avoid build error.
Michihiro NAKAJIMA [Fri, 1 Apr 2011 08:21:30 +0000 (04:21 -0400)] 
Add a new line to the end of archive_read_disk_entry_from_file.c to avoid build error.

SVN-Revision: 3146

14 years agoImprove the windows version of archive_read_disk_entry_from_file() to avoid using...
Michihiro NAKAJIMA [Fri, 1 Apr 2011 06:04:40 +0000 (02:04 -0400)] 
Improve the windows version of archive_read_disk_entry_from_file() to avoid using stat() family.
- Transfer the windows version of archive_read_disk_entry_from_file() into
  archive_read_disk_windows.c because there are same utility functions in
  archive_read_disk_windows.c and calling archive_read_disk_entry_from_file() from
  directory traversals is inefficient through its API.
- Use WCS for pathname to exceed the PATH_MAX limitation.
- Properly detect if the file is symbolic linked file like lstat().

SVN-Revision: 3145

14 years agoCorrect a type of a file offset;s/off_t/int64_t/
Michihiro NAKAJIMA [Fri, 1 Apr 2011 05:30:18 +0000 (01:30 -0400)] 
Correct a type of a file offset;s/off_t/int64_t/

SVN-Revision: 3144

14 years agoIf futimens() defined in POSIX.1-2008 is available, use it for linux.
Michihiro NAKAJIMA [Thu, 31 Mar 2011 05:29:45 +0000 (01:29 -0400)] 
If futimens() defined in POSIX.1-2008 is available, use it for linux.

SVN-Revision: 3140

14 years agoDetect futimesat.
Michihiro NAKAJIMA [Thu, 31 Mar 2011 02:05:06 +0000 (22:05 -0400)] 
Detect futimesat.

SVN-Revision: 3139

14 years agoarchive_write_set_format_pax.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:43:11 +0000 (17:43 -0400)] 
archive_write_set_format_pax.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3138

14 years agoarchive_write_set_format_pax.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:43:05 +0000 (17:43 -0400)] 
archive_write_set_format_pax.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3137

14 years agoarchive_read_support_format_tar.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:42:58 +0000 (17:42 -0400)] 
archive_read_support_format_tar.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3136

14 years agoarchive_write_set_format_shar.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:42:52 +0000 (17:42 -0400)] 
archive_write_set_format_shar.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3135

14 years agoarchive_read_support_format_iso9660.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:42:45 +0000 (17:42 -0400)] 
archive_read_support_format_iso9660.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3134

14 years agoarchive_read_support_format_cpio.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:42:38 +0000 (17:42 -0400)] 
archive_read_support_format_cpio.c: s/__archive_errx/archive_set_error/

SVN-Revision: 3133

14 years agoarchive_read.c: s/__archive_errx/archive_set_error/
Roman Neuhauser [Wed, 30 Mar 2011 21:42:29 +0000 (17:42 -0400)] 
archive_read.c: s/__archive_errx/archive_set_error/

the last two calls were in __archive_read_get_bidder() and
__archive_read_register_format().  __archive_read_get_bidder()
required a change in interface (not really, but if it calls
archive_set_error(), it should return ARCHIVE_*); i added
a wrapper macro ala archive_check_magic() to keep it DRY.

some but not all archive_read_support_compression_*() functions
called archive_clear_error() right after __archive_read_get_bidder.
the reason isn't clear to me and no tests break without these
calls, so i've removed them.

SVN-Revision: 3132

14 years agoarchive_read.c: s/__archive_errx/archive_set_error/ in tested code
Roman Neuhauser [Wed, 30 Mar 2011 21:42:24 +0000 (17:42 -0400)] 
archive_read.c: s/__archive_errx/archive_set_error/ in tested code

'Fatal Internal Error' abort -> ARCHIVE_FATAL

SVN-Revision: 3131

14 years agotest argument handling in archive_read_open2
Roman Neuhauser [Wed, 30 Mar 2011 21:42:16 +0000 (17:42 -0400)] 
test argument handling in archive_read_open2

results in aborts when archive_read_callback == NULL

SVN-Revision: 3130

14 years agoconfig.h.in~ should not be versioned
Roman Neuhauser [Wed, 30 Mar 2011 21:42:10 +0000 (17:42 -0400)] 
config.h.in~ should not be versioned

SVN-Revision: 3129

14 years agoCorrect a print format of test failure log for file times. its type is `long long...
Michihiro NAKAJIMA [Wed, 30 Mar 2011 12:55:58 +0000 (08:55 -0400)] 
Correct a print format of test failure log for file times. its type is `long long' not `long'.

SVN-Revision: 3128

14 years agoarchive_string.c: 2x uninitialized variable in utf16 conversions
Roman Neuhauser [Wed, 30 Mar 2011 08:43:16 +0000 (04:43 -0400)] 
archive_string.c: 2x uninitialized variable in utf16 conversions

hopefully this is the right fix; tests pass here

SVN-Revision: 3127

14 years agoOn Windows, use _fseeki64() instead of fseek() for 64 bits file access.
Michihiro NAKAJIMA [Tue, 29 Mar 2011 11:13:48 +0000 (07:13 -0400)] 
On Windows, use _fseeki64() instead of fseek() for 64 bits file access.

SVN-Revision: 3123

14 years agoRemove unused definitions in archive_windows.h
Michihiro NAKAJIMA [Tue, 29 Mar 2011 10:56:21 +0000 (06:56 -0400)] 
Remove unused definitions in archive_windows.h

SVN-Revision: 3122

14 years agoGet the current codepage through _get_current_locale() and use it for
Michihiro NAKAJIMA [Tue, 29 Mar 2011 10:35:13 +0000 (06:35 -0400)] 
Get the current codepage through _get_current_locale() and use it for
MultiByteToWideChar and WideCharToMultiByte instead of CP_OEMCP or CP_ACP.
This simulates the CRT version of mbrtowc/wcrtomb.

SVN-Revision: 3121

14 years agoSpace ==> Tab.
Michihiro NAKAJIMA [Tue, 29 Mar 2011 09:12:07 +0000 (05:12 -0400)] 
Space ==> Tab.

SVN-Revision: 3120

14 years agoOn Windows, improve a replacement of '\' character to reduce use of mbrtowc.
Michihiro NAKAJIMA [Tue, 29 Mar 2011 09:11:10 +0000 (05:11 -0400)] 
On Windows, improve a replacement of  '\' character to reduce use of mbrtowc.

SVN-Revision: 3119

14 years agoUse of mbrtowc is wasteful to check if all MBS can be converted to WCS On Windows.
Michihiro NAKAJIMA [Tue, 29 Mar 2011 08:56:45 +0000 (04:56 -0400)] 
Use of mbrtowc is wasteful to check if all MBS can be converted to WCS On Windows.
So we should directly use MultiByteToWideChar for performance.

SVN-Revision: 3118

14 years agoUse archive_string_conv object for the test to know if current locale is
Michihiro NAKAJIMA [Tue, 29 Mar 2011 08:03:16 +0000 (04:03 -0400)] 
Use archive_string_conv object for the test to know if current locale is
UTF-8.
Delay the initialization of variables in strncpy_to_utf16be and
strncpy_from_utf16be until those are really needed.

SVN-Revision: 3117

14 years agodoc/update.sh does not break on missing output dirs pt.2
Roman Neuhauser [Mon, 28 Mar 2011 23:33:24 +0000 (19:33 -0400)] 
doc/update.sh does not break on missing output dirs pt.2

SVN-Revision: 3116

14 years agoclient and example programs use archive_read_support_filter_*()
Roman Neuhauser [Mon, 28 Mar 2011 23:18:57 +0000 (19:18 -0400)] 
client and example programs use archive_read_support_filter_*()

the archive_read_support_compression_* -> archive_read_support_filter
change should now be complete.

SVN-Revision: 3115

14 years agotests use archive_read_support_filter_*()
Roman Neuhauser [Mon, 28 Mar 2011 23:18:10 +0000 (19:18 -0400)] 
tests use archive_read_support_filter_*()

SVN-Revision: 3114

14 years agoarchive_read_support_compression_*() -> archive_read_support_filter_*()
Roman Neuhauser [Mon, 28 Mar 2011 23:18:00 +0000 (19:18 -0400)] 
archive_read_support_compression_*() -> archive_read_support_filter_*()

maintain BC aliases (ARCHIVE_VERSION_NUMBER < 4000000).  if fact,
the new names are wrappers around the old ones as i want to switch
the tests to the new names and have the old names still tested.

the wrappers revealed a mismatch between
archive_read_support_compression_program_signature declaration in
archive.h and its definition (const void* vs void*), i'm going with
const void*.

SVN-Revision: 3113

14 years agoarchive_read_support_compression_*.c -> archive_read_support_filter_*.c
Roman Neuhauser [Mon, 28 Mar 2011 23:17:40 +0000 (19:17 -0400)] 
archive_read_support_compression_*.c -> archive_read_support_filter_*.c

begins a move to symmetry with archive_write, function aliases will
follow shortly.

SVN-Revision: 3112

14 years agoClean up archive_windows.c and update its comment.
Michihiro NAKAJIMA [Mon, 28 Mar 2011 13:25:43 +0000 (09:25 -0400)] 
Clean up archive_windows.c and update its comment.
No feature changes.

SVN-Revision: 3111

14 years agoRemove a use of WideChartoMultiByte/MultiByteToWideChar from archive_read_disk_windows.c.
Michihiro NAKAJIMA [Mon, 28 Mar 2011 12:29:16 +0000 (08:29 -0400)] 
Remove a use of WideChartoMultiByte/MultiByteToWideChar from archive_read_disk_windows.c.

SVN-Revision: 3110

14 years agoFix a memory free bug.
Michihiro NAKAJIMA [Mon, 28 Mar 2011 12:22:55 +0000 (08:22 -0400)] 
Fix a memory free bug.

SVN-Revision: 3109

14 years agoImprove character-set conversion functions.
Michihiro NAKAJIMA [Mon, 28 Mar 2011 10:59:20 +0000 (06:59 -0400)] 
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

14 years agoarchive_errno, archive_error_string info in man pages unified a bit
Roman Neuhauser [Mon, 28 Mar 2011 09:19:08 +0000 (05:19 -0400)] 
archive_errno, archive_error_string info in man pages unified a bit

SVN-Revision: 3107

14 years agoman pages: document archive_read_support_filter_XXX
Roman Neuhauser [Mon, 28 Mar 2011 09:19:02 +0000 (05:19 -0400)] 
man pages: document archive_read_support_filter_XXX

not the deprecated archive_read_support_compression_XXX

SVN-Revision: 3106

14 years agodoc/update.sh does not break on missing output dirs
Roman Neuhauser [Mon, 28 Mar 2011 09:18:56 +0000 (05:18 -0400)] 
doc/update.sh does not break on missing output dirs

SVN-Revision: 3105

14 years agolibarchive_changes.3: changes in libarchive interface
Roman Neuhauser [Mon, 28 Mar 2011 09:18:49 +0000 (05:18 -0400)] 
libarchive_changes.3: changes in libarchive interface

this is meant to be the target of 'man removed_function' and
'man deprecated_function'.  we don't have the needed machinery (yet).

the FreeBSD-bundled copy of libarchive installs many links using
a FreeBSD-provided mechanism, we could probably get that into
Makefile.am (http://sources.redhat.com/automake/automake.html#Extending
sadly doesn't mention install-man in the list of extensible targets..).

not sure about cmake.  spotted nothing interesting in the 2.8 manual,
google returned nothing relevant.

SVN-Revision: 3104

14 years agoarchive_entry.3: two typos
Roman Neuhauser [Mon, 28 Mar 2011 09:18:32 +0000 (05:18 -0400)] 
archive_entry.3: two typos

SVN-Revision: 3103

14 years agoarchive_write.3: indentation fixes in example
Roman Neuhauser [Mon, 28 Mar 2011 09:18:21 +0000 (05:18 -0400)] 
archive_write.3: indentation fixes in example

SVN-Revision: 3102

14 years agoarchive_write.3: narrative moved from libarchive.3, edited
Roman Neuhauser [Mon, 28 Mar 2011 09:18:09 +0000 (05:18 -0400)] 
archive_write.3: narrative moved from libarchive.3, edited

SVN-Revision: 3101

14 years agoarchive_write.3: w/o stuff that's now documented elsewhere
Roman Neuhauser [Mon, 28 Mar 2011 09:18:03 +0000 (05:18 -0400)] 
archive_write.3: w/o stuff that's now documented elsewhere

SVN-Revision: 3100

14 years agoarchive_write_free.3: archive_write_{close,free}
Roman Neuhauser [Mon, 28 Mar 2011 09:17:56 +0000 (05:17 -0400)] 
archive_write_free.3: archive_write_{close,free}

SVN-Revision: 3099

14 years agoarchive_write_finish_entry.3: separate man page
Roman Neuhauser [Mon, 28 Mar 2011 09:17:47 +0000 (05:17 -0400)] 
archive_write_finish_entry.3: separate man page

this moves archive_write_finish_entry() out of sight a bit:
its description says it's not normally necessary, so the man page
is referenced only from archive_write_data.3 (for now)

SVN-Revision: 3098

14 years agoarchive_write_data.3: archive_write_data man page
Roman Neuhauser [Mon, 28 Mar 2011 09:17:40 +0000 (05:17 -0400)] 
archive_write_data.3: archive_write_data man page

SVN-Revision: 3097

14 years agoarchive_write_header.3: archive_write_header man page
Roman Neuhauser [Mon, 28 Mar 2011 09:17:33 +0000 (05:17 -0400)] 
archive_write_header.3: archive_write_header man page

SVN-Revision: 3096

14 years agoarchive_write_open.3: archive_write_open et al
Roman Neuhauser [Mon, 28 Mar 2011 09:17:27 +0000 (05:17 -0400)] 
archive_write_open.3: archive_write_open et al

SVN-Revision: 3095

14 years agoarchive_write_blocksize.3: archive_write_set_bytes_per_block et al
Roman Neuhauser [Mon, 28 Mar 2011 09:17:20 +0000 (05:17 -0400)] 
archive_write_blocksize.3: archive_write_set_bytes_per_block et al

SVN-Revision: 3094

14 years agoarchive_write_filter.3: archive_write_set_filter_XXX
Roman Neuhauser [Mon, 28 Mar 2011 09:17:12 +0000 (05:17 -0400)] 
archive_write_filter.3: archive_write_set_filter_XXX

SVN-Revision: 3093

14 years agoarchive_write_format.3: archive_write_set_format_XXX
Roman Neuhauser [Mon, 28 Mar 2011 09:17:05 +0000 (05:17 -0400)] 
archive_write_format.3: archive_write_set_format_XXX

SVN-Revision: 3092

14 years agoarchive_write_new.3: archive_write_new has its own man page
Roman Neuhauser [Mon, 28 Mar 2011 09:16:58 +0000 (05:16 -0400)] 
archive_write_new.3: archive_write_new has its own man page

SVN-Revision: 3091

14 years agoarchive_read.3: reading archives narrative moved from libarchive.3
Roman Neuhauser [Mon, 28 Mar 2011 09:16:50 +0000 (05:16 -0400)] 
archive_read.3: reading archives narrative moved from libarchive.3

SVN-Revision: 3090

14 years agoarchive_read_header.3: archive_read_next_header* functions
Roman Neuhauser [Mon, 28 Mar 2011 09:16:43 +0000 (05:16 -0400)] 
archive_read_header.3: archive_read_next_header* functions

for symmetry: neither archive_read_data.3 nor archive_read_extract.3
is a better home for these, so they should have their own man page.

SVN-Revision: 3089

14 years agoarchive_read_extract.3: archive_read_extract* functions
Roman Neuhauser [Mon, 28 Mar 2011 09:16:25 +0000 (05:16 -0400)] 
archive_read_extract.3: archive_read_extract* functions

moved out from archive_read_data.3 per suggestion from Tim.

SVN-Revision: 3088

14 years agoarchive_read_free.3: archive_read_{close,free}
Roman Neuhauser [Mon, 28 Mar 2011 09:16:03 +0000 (05:16 -0400)] 
archive_read_free.3: archive_read_{close,free}

SVN-Revision: 3087

14 years agoarchive_read_new.3: archive_read_new has its own man page
Roman Neuhauser [Mon, 28 Mar 2011 09:15:29 +0000 (05:15 -0400)] 
archive_read_new.3: archive_read_new has its own man page

SVN-Revision: 3086