]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
15 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

15 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

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

SVN-Revision: 3139

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

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

SVN-Revision: 3120

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 years agoarchive_read_data.3: consumers extracted from archive_read.3
Roman Neuhauser [Mon, 28 Mar 2011 09:15:02 +0000 (05:15 -0400)] 
archive_read_data.3: consumers extracted from archive_read.3

SVN-Revision: 3085

15 years agoarchive_read_open.3: archive_read_open et al
Roman Neuhauser [Mon, 28 Mar 2011 09:14:47 +0000 (05:14 -0400)] 
archive_read_open.3: archive_read_open et al

SVN-Revision: 3084

15 years agoarchive_read_format.3: archive_read_support_format_XXX
Roman Neuhauser [Mon, 28 Mar 2011 09:14:17 +0000 (05:14 -0400)] 
archive_read_format.3: archive_read_support_format_XXX

SVN-Revision: 3083

15 years agoarchive_read_filter.3: archive_read_support_compression_XXX
Roman Neuhauser [Mon, 28 Mar 2011 09:13:52 +0000 (05:13 -0400)] 
archive_read_filter.3: archive_read_support_compression_XXX

SVN-Revision: 3082

15 years agoOn Windows test_fuzz sometimes failed by fopen error that it opened image data.
Michihiro NAKAJIMA [Sun, 27 Mar 2011 04:57:53 +0000 (00:57 -0400)] 
On Windows test_fuzz sometimes failed by fopen error that it opened image data.
It seems previous close operation did not completely end at that time.
I think it some security soft was grabbing the file handle for its check
of file access. So we should take a wait for a time while the operation
running.

SVN-Revision: 3081

15 years agoAdd support for charset option to xar reader although we expect
Michihiro NAKAJIMA [Sat, 26 Mar 2011 06:13:43 +0000 (02:13 -0400)] 
Add support for charset option to xar reader although we expect
charset=UTF-8-MAC is specified.

SVN-Revision: 3080

15 years agoIssue 151: clients and filters are now guaranteed to have their
Tim Kientzle [Sat, 26 Mar 2011 05:53:58 +0000 (01:53 -0400)] 
Issue 151: clients and filters are now guaranteed to have their
close() function invoked exactly once in all cases.
In particular, this avoids a leak when read_open_filename()
fails because of format errors.

SVN-Revision: 3079

15 years agoIn Zip writer, set bit 11(stored filename charset is UTF-8) to general
Michihiro NAKAJIMA [Sat, 26 Mar 2011 05:31:10 +0000 (01:31 -0400)] 
In Zip writer, set bit 11(stored filename charset is UTF-8) to general
purpose flags when the filename has non ASCII code and writing charset
is UTF-8. it is useful for Zip reader not only for ours that that would
help Zip reader know what a filename encoding is. This is the same behaviour
Info-ZIP does.

SVN-Revision: 3078

15 years agoWe should use mbrtowc/mbtowc at archive_wstring_append_from_mbs instead of
Michihiro NAKAJIMA [Sat, 26 Mar 2011 03:21:44 +0000 (23:21 -0400)] 
We should use mbrtowc/mbtowc at archive_wstring_append_from_mbs instead of
mbsrtowcs/mbstowcs because we cannot check the MBS limit specified by
a caller with a parameter 'len', and it is possible that mbsrtowcs/mbstowcs
convert extra MBS when strlen(MBS) > 'len'.

SVN-Revision: 3077

15 years agoUpdate comment about the return code of conversion functions.
Michihiro NAKAJIMA [Sat, 26 Mar 2011 01:13:24 +0000 (21:13 -0400)] 
Update comment about the return code of conversion functions.
archive_string_append_from_unicode_to_mbs always returns -1
if the platform have neither wctomb nor wcrtomb.

SVN-Revision: 3076

15 years agoImprove archive_wstring_append_from_mbs function; use mbsnrtowcs or
Michihiro NAKAJIMA [Sat, 26 Mar 2011 00:47:09 +0000 (20:47 -0400)] 
Improve archive_wstring_append_from_mbs function; use mbsnrtowcs or
mbsrtowcs for thread safe if available.

SVN-Revision: 3075

15 years agoRemove UTF-8 <===> WCS conversion code, which was highly based on the wrog
Michihiro NAKAJIMA [Fri, 25 Mar 2011 12:08:06 +0000 (08:08 -0400)] 
Remove UTF-8 <===> WCS conversion code, which was highly based on the wrog
assumption that WCS was UNICODE. What format WCS has is deeply dependent on
platform, and WCS must be converted to/from locale dependent MBS on every
platform through mbstowcs/wcstombs or related functions, which the platforms
provide. We should, thus, respect the platform policy about WCS for potability.

SVN-Revision: 3074

15 years agoAdd an mbs version of ACL control functions in order to reduce
Michihiro NAKAJIMA [Fri, 25 Mar 2011 09:36:27 +0000 (05:36 -0400)] 
Add an mbs version of ACL control functions in order to reduce
extra character conversion.
  previous:
    Create : Disk -> MBS -> WCS -> MBS -> UTF-8 -> Pax archive file.
    Extract: Pax archive file -> UTF-8 -> MBS -> WCS ->MBS -> Disk.

  after:
    Create : Disk -> MBS -> UTF-8 -> Pax archive file.
    Extract: Pax archive file -> UTF-8 -> MBS -> Disk.

SVN-Revision: 3073

15 years agoWindows platform can convert string in local locale to/from UTF-8 without iconv.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 23:50:35 +0000 (19:50 -0400)] 
Windows platform can convert string in local locale to/from UTF-8 without iconv.

SVN-Revision: 3072

15 years agoTake care of '\' character in multi-byte character-set when replacing '\' by '/'.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 12:06:47 +0000 (08:06 -0400)] 
Take care of '\' character in multi-byte character-set when replacing '\' by '/'.

SVN-Revision: 3071

15 years agoFix a behavior of character conversion functions on Windows.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 11:29:01 +0000 (07:29 -0400)] 
Fix a behavior of character conversion functions on Windows.
Simulates other platform behavior in order to pass our test programs.

SVN-Revision: 3070

15 years agoIn ZIP archive file, a filename and comments field is UTF-8 when Language
Michihiro NAKAJIMA [Thu, 24 Mar 2011 09:41:01 +0000 (05:41 -0400)] 
In ZIP archive file, a filename and comments field is UTF-8 when Language
encoding flag (Bit 11 of the general purpose bit flag) is set.
So we should convert filenames from UTF-8 to current locale.

SVN-Revision: 3069

15 years agoFix a error message.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 07:33:52 +0000 (03:33 -0400)] 
Fix a error message.

SVN-Revision: 3068

15 years agoRemove canConvertCharset from test/main.c and test_pax_filename_encoding.c
Michihiro NAKAJIMA [Thu, 24 Mar 2011 06:13:02 +0000 (02:13 -0400)] 
Remove canConvertCharset from test/main.c and test_pax_filename_encoding.c
We can finally use archive_write_set_options(a, "charset=UTF-8") instead.

SVN-Revision: 3067

15 years agoAdd support for charset option to zip writer.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 05:58:39 +0000 (01:58 -0400)] 
Add support for charset option to zip writer.

SVN-Revision: 3066

15 years agoAdd support for charset option to ustar writer.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 05:01:05 +0000 (01:01 -0400)] 
Add support for charset option to ustar writer.

SVN-Revision: 3065

15 years agoAdd support for charset option to gnutar writer.
Michihiro NAKAJIMA [Thu, 24 Mar 2011 04:59:15 +0000 (00:59 -0400)] 
Add support for charset option to gnutar writer.

SVN-Revision: 3064

15 years agoAdd support for charset option to pax writer.
Michihiro NAKAJIMA [Wed, 23 Mar 2011 23:45:48 +0000 (19:45 -0400)] 
Add support for charset option to pax writer.
This option accepts binary mode by charset=BINARY.

SVN-Revision: 3063

15 years agoImprove character-set conversion functions on the platform which does not have
Michihiro NAKAJIMA [Wed, 23 Mar 2011 22:35:19 +0000 (18:35 -0400)] 
Improve character-set conversion functions on the platform which does not have
iconv.
Even if current locale and specified locale are the same, we should
whether the MBS has all correct bytes, in order to simulate iconv's behavior.

SVN-Revision: 3062

15 years agoRemove local character-set conversion code from archive_write_set_format_pax.c.
Michihiro NAKAJIMA [Wed, 23 Mar 2011 22:25:29 +0000 (18:25 -0400)] 
Remove local character-set conversion code from archive_write_set_format_pax.c.
Use archive_strcpy_to_locale() function instead.

SVN-Revision: 3061

15 years agoRemove unneeded statement.
Michihiro NAKAJIMA [Wed, 23 Mar 2011 01:06:24 +0000 (21:06 -0400)] 
Remove unneeded statement.
wchar.h is no longer neeeded at archive_read_support_format_tar.c.

SVN-Revision: 3054

15 years agoRemove local character-set conversion code from archive_read_support_format_tar.c.
Michihiro NAKAJIMA [Wed, 23 Mar 2011 00:57:46 +0000 (20:57 -0400)] 
Remove local character-set conversion code from archive_read_support_format_tar.c.
We should use common functions defined in archive_string.c instead.

SVN-Revision: 3053

15 years agoAdd support for a charset option to tar/pax format reader.
Michihiro NAKAJIMA [Tue, 22 Mar 2011 23:00:39 +0000 (19:00 -0400)] 
Add support for a charset option to tar/pax format reader.

SVN-Revision: 3052

15 years agoInstead of canConvertCharset(), use archive_read_set_options("charset=xxxx")
Michihiro NAKAJIMA [Tue, 22 Mar 2011 18:13:23 +0000 (14:13 -0400)] 
Instead of canConvertCharset(), use archive_read_set_options("charset=xxxx")
to check what a conversion of character-set is supported.
It is better only libarchive knows if a character-set conversion works,
but at this time a use of canConvertCharset() still remains in
test_pax_filename_encoding.

SVN-Revision: 3051

15 years agoAdd a check that a conversion specified by a charset option works on the platform.
Michihiro NAKAJIMA [Tue, 22 Mar 2011 17:25:00 +0000 (13:25 -0400)] 
Add a check that a conversion specified by a charset option works on the platform.

SVN-Revision: 3050

15 years agoImprove character-set conversion functions.
Michihiro NAKAJIMA [Tue, 22 Mar 2011 04:39:41 +0000 (00:39 -0400)] 
Improve character-set conversion functions.
 - rename archive_strncpy_from_specific_locale to archive_strncat_from_locale.
 - rename archive_strncpy_to_specific_locale to archive_strncat_to_locale.
 - add archive_strncpy_[to/from]_locale functions.
 - add archive_strcpy_[to/from]_locale functions.

SVN-Revision: 3049

15 years agoSome plaform will not use max_skip and so its initialization is unneeded.
Michihiro NAKAJIMA [Mon, 21 Mar 2011 20:56:03 +0000 (16:56 -0400)] 
Some plaform will not use max_skip and so its initialization is unneeded.

Found with Clang Static Analyzer.

SVN-Revision: 3048

15 years agoAdd a check of a null pointer in order to eliminate what Clang complains.
Michihiro NAKAJIMA [Mon, 21 Mar 2011 20:39:16 +0000 (16:39 -0400)] 
Add a check of a null pointer in order to eliminate what Clang complains.

Found with Clang Static Analyzer.

SVN-Revision: 3047

15 years agoDo not ignore a fatal error.
Michihiro NAKAJIMA [Mon, 21 Mar 2011 20:27:11 +0000 (16:27 -0400)] 
Do not ignore a fatal error.

Found with Clang Static Analyzer.

SVN-Revision: 3046

15 years agoProperly return an error code; do not overwirte an error code with a return code
Michihiro NAKAJIMA [Mon, 21 Mar 2011 20:21:39 +0000 (16:21 -0400)] 
Properly return an error code; do not overwirte an error code with a return code
of __archive_write_close_filter();

Found with Clang Static Analyzer.

SVN-Revision: 3045

15 years agoRemove a unneeded initialization of extdsize.
Michihiro NAKAJIMA [Mon, 21 Mar 2011 20:14:00 +0000 (16:14 -0400)] 
Remove a unneeded initialization of extdsize.

Found with Clang Static Analyzer.

SVN-Revision: 3044

15 years agoDo the best effort for the conversion of character-set without iconv.
Michihiro NAKAJIMA [Mon, 21 Mar 2011 19:48:43 +0000 (15:48 -0400)] 
Do the best effort for the conversion of character-set without iconv.
We can make a conversion UTF-16BE <===> UTF-8 when current locale is UTF-8.

SVN-Revision: 3043

15 years agoInstead of Info-ZIP UNIX "Ux" 7855(16 bits UID/GIDs), Use Info-ZIP New Unix
Michihiro NAKAJIMA [Mon, 21 Mar 2011 02:55:16 +0000 (22:55 -0400)] 
Instead of Info-ZIP UNIX "Ux" 7855(16 bits UID/GIDs), Use Info-ZIP New Unix
Extra Field "ux" 7875 in order to store 32 bits UID/GIDs.

SVN-Revision: 3042

15 years agoUpdate the documentation for archive_read_data_skip to
Tim Kientzle [Mon, 21 Mar 2011 01:25:11 +0000 (21:25 -0400)] 
Update the documentation for archive_read_data_skip to
indicate that it's called automatically.

SVN-Revision: 3041

15 years agoAdd support for Info-ZIP New Unix Extra Field "ux".
Michihiro NAKAJIMA [Mon, 21 Mar 2011 01:13:09 +0000 (21:13 -0400)] 
Add support for Info-ZIP New Unix Extra Field "ux".

SVN-Revision: 3040

15 years agoTest from Roman Neuhauser for the "raw" format to verify that it
Tim Kientzle [Mon, 21 Mar 2011 00:41:14 +0000 (20:41 -0400)] 
Test from Roman Neuhauser for the "raw" format to verify that it
correctly handles read_next_header and read_data_skip.  Fix the bug
this uncovers (a second header request should return EOF but didn't).

SVN-Revision: 3039

15 years agoFix some use-after-free bugs.
Tim Kientzle [Mon, 21 Mar 2011 00:24:40 +0000 (20:24 -0400)] 
Fix some use-after-free bugs.

SVN-Revision: 3038

15 years agoFix a bug that xar writer did not properly store a multibyte filename to its archive...
Michihiro NAKAJIMA [Sun, 20 Mar 2011 23:57:29 +0000 (19:57 -0400)] 
Fix a bug that xar writer did not properly store a multibyte filename to its archive file.

SVN-Revision: 3037

15 years agoInitialize the mtree_entry when we allocate it.
Tim Kientzle [Sun, 20 Mar 2011 23:33:47 +0000 (19:33 -0400)] 
Initialize the mtree_entry when we allocate it.

SVN-Revision: 3036

15 years agoSkip the tests which perform a character-set conversion if the platform
Michihiro NAKAJIMA [Sun, 20 Mar 2011 16:36:38 +0000 (12:36 -0400)] 
Skip the tests which perform a character-set conversion if the platform
does not support.

SVN-Revision: 3035

15 years agoAdd support for charset option to zip format reader.
Michihiro NAKAJIMA [Sun, 20 Mar 2011 03:39:06 +0000 (23:39 -0400)] 
Add support for charset option to zip format reader.

SVN-Revision: 3034

15 years agoAdd support for charset option to cab format reader.
Michihiro NAKAJIMA [Sun, 20 Mar 2011 02:27:03 +0000 (22:27 -0400)] 
Add support for charset option to cab format reader.

SVN-Revision: 3033