Sat Feb 20 03:50:18 2010 UTC ()
Import libarchive 2.8.0:
- Infrastructure:
  - Allow command line tools as fallback for missing compression
    libraries. If compiled without gzip for example, gunzip will
    be used automatically.
  - Improved support for a number of platforms like high-resolution
    timestamps and Extended Attributes on various Unix systems
  - New convience interface for creating archives based on disk content,
    complement of the archive_write_disk interface.
- Frontends:
  - bsdcpio ready for public consumption
  - hand-written date parser replaces the yacc code
- Filter system:
  - Simplified read filter chains
  - Option support for filters
  - LZMA, XZ, uudecode handled
- Format support:
  - Write support for mtree files based on file system or archive
    content
  - Basic read support for Joliet
  - Write support for zip files
  - Write support for shar archives, both text-only and binary-safe

Status:

Vendor Tag:	KIENTZLE
Release Tags:	libarchive-2-8-8


(joerg)
diff -r0 -r0 pkgsrc/archivers/libarchive/files/README
diff -r0 -r0 pkgsrc/archivers/libarchive/files/configure.ac
diff -r0 -r0 pkgsrc/archivers/libarchive/files/aclocal.m4
diff -r0 -r0 pkgsrc/archivers/libarchive/files/Makefile.am
diff -r0 -r0 pkgsrc/archivers/libarchive/files/Makefile.in
diff -r0 -r0 pkgsrc/archivers/libarchive/files/config.h.in
diff -r0 -r0 pkgsrc/archivers/libarchive/files/configure
diff -r0 -r0 pkgsrc/archivers/libarchive/files/COPYING
diff -r0 -r0 pkgsrc/archivers/libarchive/files/INSTALL
diff -r0 -r0 pkgsrc/archivers/libarchive/files/NEWS
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/CMakeLists.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autogen.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/bump-version.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/clean.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/version
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/check_stdcall_func.m4
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/la_uid_t.m4
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/compile
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/config.guess
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/config.sub
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/depcomp
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/install-sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/ltmain.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/autoconf/missing
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/FindLZMA.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/config.h.in
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckFileOffsetBits.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckStructMember.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckFuncs.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckHeaderDirent.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckTypeExists.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckFuncs_stub.c.in
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/CheckFileOffsetBits.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/cmake/AddTest28.cmake
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/mvcpp.nt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/wccpp.nt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc71/libarchive.vcproj
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc71/libarchive.sln
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc80/libarchive.vcproj
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc80/libarchive.sln
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc80/libarchive_test/libarchive_test.vcproj
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc90/libarchive.vcproj
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc90/libarchive.sln
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/build/windows/vc90/libarchive_test/libarchive_test.vcproj
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/cmdline.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/cpio.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/cpio.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/cpio_platform.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/cpio_windows.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/cpio_windows.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/bsdcpio.1
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/config_freebsd.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/main.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_0.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_basic.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_cmdline.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_format_newc.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_B_upper.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_C_upper.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_J_upper.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_L_upper.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_Z_upper.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_a.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_c.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_d.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_f.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_help.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_l.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_m.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_option_lzma.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_u.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_version.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_y.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_z.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_owner_parse.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_passthrough_dotdot.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/test_passthrough_reverse.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_pathmatch.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/list.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.bin.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.crc.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.newc.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.ustar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/cpio/test/CMakeLists.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_f.cpio.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_m.cpio.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.cpio.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.stdout.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/cpio/test/test_option_tv.stdout.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_check_magic.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_endian.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_stat.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_stat.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_strmode.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_xattr.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_hash.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_private.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_set_standard_lookup.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_extract.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_memory.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_private.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_all.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_gzip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_compress.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_none.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_program.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_rpm.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_uu.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_compression_xz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_all.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_empty.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_string.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_raw.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_string.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_string_sprintf.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_util.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_virtual.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_private.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_fd.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_set_standard_lookup.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_file.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_filename.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_memory.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_private.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_bzip2.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_compress.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_gzip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_none.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_program.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_compression_xz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/config_freebsd.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/filter_fork.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/filter_fork.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/filter_fork_windows.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_entry.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_read.3
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_util.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/cpio.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/libarchive.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/libarchive_internals.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/mtree.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/tar.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/main.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_basic.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_freebsd.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_pax.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_api_feature.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_bad_fd.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_cpio.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gtar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_solaris_tar_acl.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_tar_hardlink.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_xz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_zip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/list.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_empty_write.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_entry.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_extattr_freebsd.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_fuzz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_entry_strmode.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_link_resolver.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_open_fd.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_open_file.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_open_filename.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_pax_filename_encoding.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_compress_program.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_data_large.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_disk.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_disk_entry_from_file.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_extract.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_ar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_file_nonexistent.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_Z.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_be.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_bz2.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_gz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_lzma.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_xz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_odc.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/README
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_uu.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4c_Z.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_empty.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_gz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_lzma.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_gz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_multi_extent.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_bz2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_long.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_rr.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_bz2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_ce.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_new_bz2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_rr_moved.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isozisofs_bz2.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_pax_bz2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tbz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tgz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tlz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_txz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tz.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_xar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_large.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_position.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_truncated.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_filenames.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_ustar_filenames.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress_bzip2.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress_gzip.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress_lzma.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress_program.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_compress_xz.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_failures.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_secure.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_sparse.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_symlink.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_times.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_ar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_odc.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_newc.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_mtree.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_pax.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar_empty.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_empty.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_no_compression.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_open_memory.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2_1.tbz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2_2.tbz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_cpio_1.cpio.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gtar_1.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip_1.tgz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip_2.tgz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_1.tlz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_2.tlz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_3.tlz.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_solaris_tar_acl.tar.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_tar_hardlink_1.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_xz_1.txz.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_zip_1.zip.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_fuzz_1.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_pax_filename_encoding.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_ar.ar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_be.cpio.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.zip.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_mtree.mtree.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.data.Z.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.data.uu
diff -r0 -r0 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/err.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/err.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/lafe_platform.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/line_reader.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/line_reader.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/matching.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/matching.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/pathmatch.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/libarchive_fe/pathmatch.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/bsdtar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/bsdtar.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/bsdtar_platform.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/cmdline.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/getdate.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/read.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/subst.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/tree.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/tree.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/util.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/bsdtar.1
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/config_freebsd.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/main.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_0.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_basic.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_copy.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_empty_mtree.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_getdate.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_help.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_option_T_upper.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_option_q.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_option_r.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_option_s.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_patterns.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_stdio.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_strip_components.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_symlink_dir.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/tar/test/test_version.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_windows.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/list.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_patterns_2.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_patterns_3.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/test_patterns_4.tar.uu
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/untar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/libarchive_autodetect-st_lib_archive.m4
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/libarchive.1aix53.spec
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/libarchive.spec
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/README
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/shar/tree.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/shar/shar.1
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/shar/tree_config.h
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/shar/shar.c
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/contrib/shar/tree.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/results.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/mdoc2wiki.awk
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/mdoc2man.awk
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/update.sh
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/Makefile
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/tar.5.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/Makefile
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/Makefile
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/cpio.5.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/mtree.5.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/tar.5.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/Makefile
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/archive_entry.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/archive_read.3.txt
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/text/archive_read_disk.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/archive_util.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/archive_write.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/archive_write_disk.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/cpio.5.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/libarchive.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/libarchive_internals.3.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/mtree.5.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/tar.5.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/text/bsdcpio.1.txt
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/Makefile
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/archive_entry.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/archive_read.3
diff -r0 -r1.1.1.1 pkgsrc/archivers/libarchive/files/doc/man/archive_read_disk.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/archive_util.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/archive_write.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/archive_write_disk.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/cpio.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/libarchive.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/libarchive_internals.3
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/mtree.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/tar.5
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1
diff -r0 -r0 pkgsrc/archivers/libarchive/files/doc/man/bsdcpio.1
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/tarfilter.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/untar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/minitar/minitar.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/minitar/tree.c
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/minitar/tree.h
diff -r0 -r0 pkgsrc/archivers/libarchive/files/examples/minitar/README

File Deleted: pkgsrc/archivers/libarchive/files/Attic/README

File Deleted: pkgsrc/archivers/libarchive/files/configure.ac

File Deleted: pkgsrc/archivers/libarchive/files/aclocal.m4

File Deleted: pkgsrc/archivers/libarchive/files/Makefile.am

File Deleted: pkgsrc/archivers/libarchive/files/Makefile.in

File Deleted: pkgsrc/archivers/libarchive/files/config.h.in

File Deleted: pkgsrc/archivers/libarchive/files/configure

File Deleted: pkgsrc/archivers/libarchive/files/COPYING

File Deleted: pkgsrc/archivers/libarchive/files/INSTALL

File Deleted: pkgsrc/archivers/libarchive/files/NEWS

File Added: pkgsrc/archivers/libarchive/files/CMakeLists.txt
#
#
PROJECT(libarchive C)
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin)
endif()

#
# Version - read from 'version' file.
#
FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version)
STRING(REGEX REPLACE
 "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]?$" "\\1" _major ${_version})
STRING(REGEX REPLACE
 "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]?$" "\\1" _minor ${_version})
STRING(REGEX REPLACE
 "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]?$" "\\1" _revision ${_version})
STRING(REGEX REPLACE
 "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]?)$" "\\1" _quality ${_version})
SET(_version_number ${_major}${_minor}${_revision})
STRING(REGEX REPLACE "[0]*([^0][0-9]*)$" "\\1" _minor ${_minor})
STRING(REGEX REPLACE "[0]*([^0][0-9]*)$" "\\1" _revision ${_revision})
#
SET(VERSION                    "${_major}.${_minor}.${_revision}${_quality}")
SET(BSDCPIO_VERSION_STRING     "${VERSION}")
SET(BSDTAR_VERSION_STRING      "${VERSION}")
SET(LIBARCHIVE_VERSION_NUMBER  "${_version_number}")
SET(LIBARCHIVE_VERSION_STRING  "${VERSION}")
# Shared library number
SET(SOVERSION                   8)

# Enable CTest/CDash support
include(CTest)

# Provide ADD_TEST_28 macro to approximate CMake 2.8 ADD_TEST(NAME).
# TODO: Require CMake 2.8 and drop this workaround (perhaps late 2010).
INCLUDE(AddTest28)

OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON)
OPTION(ENABLE_TAR "Enable tar building" ON)
OPTION(ENABLE_TAR_SHARED "Enable dynamic build of tar" OFF)
OPTION(ENABLE_CPIO "Enable cpio building" ON)
OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" OFF)
OPTION(ENABLE_XATTR "Enable extended attribute support" ON)
OPTION(ENABLE_ACL "Enable ACL support" ON)
OPTION(ENABLE_TEST "Enable unit and regression tests" ON)

IF(ENABLE_TEST)
	ENABLE_TESTING()
ENDIF(ENABLE_TEST)
IF(WIN32 AND NOT CYGWIN)
  # Currently, dynamic build only.
  SET(ENABLE_TAR_SHARED ON)
  SET(ENABLE_CPIO_SHARED ON)
ENDIF(WIN32 AND NOT CYGWIN)

IF(WIN32)
  SET(_WIN32_WINNT 0x0500 CACHE INTERNAL "Setting _WIN32_WINNT to 0x0500 for Windows 2000 APIs")
  SET(WINVER 0x0500 CACHE INTERNAL "Setting WINVER to 0x0500 for Windows 2000 APIs")
ENDIF(WIN32)

#
INCLUDE(CheckCSourceRuns)
INCLUDE(CheckFileOffsetBits)
INCLUDE(CheckFuncs)
INCLUDE(CheckHeaderDirent)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
INCLUDE(CheckStructMember)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckTypeExists)
INCLUDE(CheckTypeSize)

#
# Generate list.h
#
MACRO (GENERATE_LIST_H _listfile _cmlist __list_sources)
  SET(_argv ${ARGV})
  # Remove _listfile and _cmlist from _argv
  LIST(REMOVE_AT _argv 0 1)
  IF (NOT EXISTS "${_listfile}" OR
     ${_cmlist} IS_NEWER_THAN "${_listfile}")

    MESSAGE(STATUS "Generating ${_listfile}")
    FILE(WRITE ${_listfile} "")
    FOREACH (testfile ${_argv})
      IF (testfile MATCHES "^test_[^/]+[.]c$")
        FILE(STRINGS ${testfile} testvar REGEX "^DEFINE_TEST")
        FOREACH (deftest ${testvar})
          FILE(APPEND ${_listfile} "${deftest}\n")
        ENDFOREACH (deftest)
      ENDIF (testfile MATCHES "^test_[^/]+[.]c$")
    ENDFOREACH (testfile)

  ENDIF (NOT EXISTS "${_listfile}" OR
     ${_cmlist} IS_NEWER_THAN "${_listfile}")
ENDMACRO (GENERATE_LIST_H)
#
# Generate installation rules for man pages.
#
MACRO (INSTALL_MAN __mans)
  FOREACH (_man ${ARGV})
    STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man})
    INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}")
  ENDFOREACH (_man)
ENDMACRO (INSTALL_MAN __mans)

#
# Check compress/decompress libraries
#
IF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN)
  # GnuWin32 is only for Win32, not Win64.
  SET(__GNUWIN32PATH "C:/Program Files/GnuWin32")
ENDIF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN)
IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
  # You have to add a path availabel DLL file into PATH environment variable.
  # Maybe DLL path is "C:/Program Files/GnuWin32/bin".
  # The zlib and the bzip2 Setup program have installed programs and DLLs into
  # "C:/Program Files/GnuWin32" by default.
  # This is convenience setting for Windows.
  SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH))
  #
  # If you didn't use Setup program or installed into nonstandard path,
  # cmake cannot find out your zlib or bzip2 libraries and include files,
  # you should execute cmake with  -DCMAKE_PREFIX_PATH option.
  #   e.g.
  #     cmake -DCMAKE_PREFIX_PATH=<your-GnuWin32-path> <path-to-source>
  #
  # If compiling error occured in zconf.h, You may need patch to zconf.h.
  #--- zconf.h.orig	2005-07-21 00:40:26.000000000
  #+++ zconf.h	2009-01-19 11:39:10.093750000
  #@@ -286,7 +286,7 @@
  # 
  # #if 1           /* HAVE_UNISTD_H -- this line is updated by ./configure */
  # #  include <sys/types.h> /* for off_t */
  #-#  include <unistd.h>    /* for SEEK_* and off_t */
  #+#  include <stdio.h>    /* for SEEK_* and off_t */
  # #  ifdef VMS
  # #    include <unixio.h>   /* for off_t */
  # #  endif
ENDIF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")

SET(ADDITIONAL_LIBS "")
#
# Find ZLIB
#
FIND_PACKAGE(ZLIB)
IF(ZLIB_FOUND)
  SET(HAVE_LIBZ 1)
  SET(HAVE_ZLIB_H 1)
  INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES})
ENDIF(ZLIB_FOUND)
MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY)
#
# Find BZip2
#
FIND_PACKAGE(BZip2)
IF(BZIP2_FOUND)
  SET(HAVE_LIBBZ2 1)
  SET(HAVE_BZLIB_H 1)
  INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES})
ENDIF(BZIP2_FOUND)
MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARY)
#
# Find LZMA
#
FIND_PACKAGE(LZMA)
IF(LZMA_FOUND)
  SET(HAVE_LIBLZMA 1)
  SET(HAVE_LZMA_H 1)
  INCLUDE_DIRECTORIES(${LZMA_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${LZMA_LIBRARIES})
  MARK_AS_ADVANCED(CLEAR LZMA_INCLUDE_DIR)
  MARK_AS_ADVANCED(CLEAR LZMA_LIBRARY)
ELSEIF(LZMADEC_FOUND)
  SET(HAVE_LIBLZMADEC 1)
  SET(HAVE_LZMADEC_H 1)
  INCLUDE_DIRECTORIES(${LZMADEC_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${LZMADEC_LIBRARIES})
  MARK_AS_ADVANCED(CLEAR LZMADEC_INCLUDE_DIR)
  MARK_AS_ADVANCED(CLEAR LZMADEC_LIBRARY)
ELSE(LZMA_FOUND)
  MARK_AS_ADVANCED(CLEAR LZMA_INCLUDE_DIR)
  MARK_AS_ADVANCED(CLEAR LZMA_LIBRARY)
ENDIF(LZMA_FOUND)

#
# Check headers
#
CHECK_HEADER_DIRENT()

SET(INCLUDES "")
MACRO (LA_CHECK_INCLUDE_FILE header var)
      CHECK_INCLUDE_FILES("${INCLUDES};${header}" ${var})
      IF (${var})
      	 SET(INCLUDES ${INCLUDES} ${header})
      ENDIF (${var})
ENDMACRO (LA_CHECK_INCLUDE_FILE)

# Few headers that must precede other headers
# Must precede sys/extattr.h on FreeBSD
LA_CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)

# Alphabetize the rest unless there's a compelling reason
LA_CHECK_INCLUDE_FILE("acl/libacl.h" HAVE_ACL_LIBACL_H)
LA_CHECK_INCLUDE_FILE("attr/xattr.h" HAVE_ATTR_XATTR_H)
LA_CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H)
LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H)
LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H)
LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H)
LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H)
LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H)
LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H)
LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H)
LA_CHECK_INCLUDE_FILE("process.h" HAVE_PROCESS_H)
LA_CHECK_INCLUDE_FILE("pwd.h" HAVE_PWD_H)
LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H)
LA_CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H)
LA_CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H)
LA_CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
LA_CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H)
LA_CHECK_INCLUDE_FILE("sys/acl.h" HAVE_SYS_ACL_H)
LA_CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H)
LA_CHECK_INCLUDE_FILE("sys/extattr.h" HAVE_SYS_EXTATTR_H)
LA_CHECK_INCLUDE_FILE("sys/ioctl.h" HAVE_SYS_IOCTL_H)
LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H)
LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H)
LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H)
LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
LA_CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H)
LA_CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H)
LA_CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H)
LA_CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
LA_CHECK_INCLUDE_FILE("utime.h" HAVE_UTIME_H)
LA_CHECK_INCLUDE_FILE("wchar.h" HAVE_WCHAR_H)
LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H)
LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H)


#
# Some headers require extra includes when they're available.
#

#
# Find OpenSSL
#
IF(ENABLE_OPENSSL)
  FIND_PACKAGE(OpenSSL)
ELSE()
  SET(OPENSSL_FOUND 0)
ENDIF()
IF(OPENSSL_FOUND)
  INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES})
ELSE()
  # Block OpenSSL checks and override cached results.
  SET(HAVE_OPENSSL_MD5_H 0)
  SET(HAVE_OPENSSL_RIPEMD_H 0)
  SET(HAVE_OPENSSL_SHA_H 0)
  SET(HAVE_OPENSSL_SHA256_INIT 0)
  SET(HAVE_OPENSSL_SHA384_INIT 0)
  SET(HAVE_OPENSSL_SHA512_INIT 0)
ENDIF()
#
# Check MD5/RMD160/SHA headers
#
LA_CHECK_INCLUDE_FILE("md5.h" HAVE_MD5_H)
LA_CHECK_INCLUDE_FILE("openssl/md5.h" HAVE_OPENSSL_MD5_H)
LA_CHECK_INCLUDE_FILE("openssl/ripemd.h" HAVE_OPENSSL_RIPEMD_H)
LA_CHECK_INCLUDE_FILE("openssl/sha.h" HAVE_OPENSSL_SHA_H)
LA_CHECK_INCLUDE_FILE("ripemd.h" HAVE_RIPEMD_H)
LA_CHECK_INCLUDE_FILE("rmd160.h" HAVE_RMD160_H)
LA_CHECK_INCLUDE_FILE("sha.h" HAVE_SHA_H)
LA_CHECK_INCLUDE_FILE("sha1.h" HAVE_SHA1_H)
LA_CHECK_INCLUDE_FILE("sha2.h" HAVE_SHA2_H)
LA_CHECK_INCLUDE_FILE("sha256.h" HAVE_SHA256_H)

#
# Find MD5/RMD160/SHA library
#
FIND_LIBRARY(CRYPTO_LIBRARY NAMES crypto)
IF(CRYPTO_LIBRARY)
  LIST(APPEND ADDITIONAL_LIBS ${CRYPTO_LIBRARY})
ELSE(CRYPTO_LIBRARY)
  IF(NOT OPENSSL_FOUND)
    FIND_LIBRARY(MD_LIBRARY NAMES md)
    IF(MD_LIBRARY)
      LIST(APPEND ADDITIONAL_LIBS ${MD_LIBRARY})
    ENDIF(MD_LIBRARY)
  ENDIF(NOT OPENSSL_FOUND)
ENDIF(CRYPTO_LIBRARY)
#
# Check MD5/RMD160/SHA functions
#
SET(CMAKE_REQUIRED_LIBRARIES ${ADDITIONAL_LIBS})
IF(HAVE_MD5_H)
  CHECK_SYMBOL_EXISTS(MD5Init			"md5.h"		HAVE_MD5INIT)
ENDIF(HAVE_MD5_H)
IF(HAVE_RMD160_H)
  CHECK_SYMBOL_EXISTS(RMD160Init		"rmd160.h"	HAVE_RMD160INIT)
ENDIF(HAVE_RMD160_H)
IF(HAVE_SHA2_H)
  CHECK_SYMBOL_EXISTS(SHA256Init		"sha2.h"	HAVE_SHA256INIT)
  CHECK_SYMBOL_EXISTS(SHA384Init		"sha2.h"	HAVE_SHA384INIT)
  CHECK_SYMBOL_EXISTS(SHA512Init		"sha2.h"	HAVE_SHA512INIT)
  CHECK_SYMBOL_EXISTS(SHA256_Init		"sha2.h"	HAVE_SHA256_INIT)
  CHECK_SYMBOL_EXISTS(SHA384_Init		"sha2.h"	HAVE_SHA384_INIT)
  CHECK_SYMBOL_EXISTS(SHA512_Init		"sha2.h"	HAVE_SHA512_INIT)
ELSEIF(HAVE_OPENSSL_SHA_H)
  CHECK_SYMBOL_EXISTS(SHA256_Init		"openssl/sha.h"	HAVE_OPENSSL_SHA256_INIT)
  CHECK_SYMBOL_EXISTS(SHA384_Init		"openssl/sha.h"	HAVE_OPENSSL_SHA384_INIT)
  CHECK_SYMBOL_EXISTS(SHA512_Init		"openssl/sha.h"	HAVE_OPENSSL_SHA512_INIT)
ENDIF()
SET(CMAKE_REQUIRED_LIBRARIES "")

#
# Find Libxml2
#
FIND_PACKAGE(LibXml2)
IF(LIBXML2_FOUND)
  INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
  LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES})
  SET(HAVE_LIBXML2 1)
  # libxml2's include files use iconv.h
  # We need a directory path of iconv.h so that it won't fail to check
  # "libxml/xmlreader.h".
  FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
  SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
  CHECK_INCLUDE_FILES("libxml/xmlreader.h" HAVE_LIBXML_XMLREADER_H)
  SET(CMAKE_REQUIRED_INCLUDES "")
ELSE(LIBXML2_FOUND)
  #
  # Find Expat
  #
  FIND_PACKAGE(EXPAT)
  IF(EXPAT_FOUND)
    INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
    LIST(APPEND ADDITIONAL_LIBS ${EXPAT_LIBRARIES})
    SET(HAVE_LIBEXPAT 1)
    LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H)
  ENDIF(EXPAT_FOUND)
ENDIF(LIBXML2_FOUND)

#
# Check functions
#
CHECK_SYMBOL_EXISTS(CreateHardLinkA "windows.h" HAVE_CREATEHARDLINKA)
CHECK_SYMBOL_EXISTS(CreateHardLinkW "windows.h" HAVE_CREATEHARDLINKW)
CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(chroot HAVE_CHROOT)
CHECK_FUNCTION_EXISTS_GLIBC(fchdir HAVE_FCHDIR)
CHECK_FUNCTION_EXISTS_GLIBC(fchflags HAVE_FCHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(fchmod HAVE_FCHMOD)
CHECK_FUNCTION_EXISTS_GLIBC(fchown HAVE_FCHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(fcntl HAVE_FCNTL)
CHECK_FUNCTION_EXISTS_GLIBC(fork HAVE_FORK)
CHECK_FUNCTION_EXISTS_GLIBC(fstat HAVE_FSTAT)
CHECK_FUNCTION_EXISTS_GLIBC(ftruncate HAVE_FTRUNCATE)
CHECK_FUNCTION_EXISTS_GLIBC(futimens HAVE_FUTIMENS)
CHECK_FUNCTION_EXISTS_GLIBC(futimes HAVE_FUTIMES)
CHECK_FUNCTION_EXISTS_GLIBC(geteuid HAVE_GETEUID)
CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID)
CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK)
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD)
CHECK_FUNCTION_EXISTS_GLIBC(nl_langinfo HAVE_NL_LANGINFO)
CHECK_FUNCTION_EXISTS_GLIBC(pipe HAVE_PIPE)
CHECK_FUNCTION_EXISTS_GLIBC(poll HAVE_POLL)
CHECK_FUNCTION_EXISTS_GLIBC(readlink HAVE_READLINK)
CHECK_FUNCTION_EXISTS_GLIBC(select HAVE_SELECT)
CHECK_FUNCTION_EXISTS_GLIBC(setenv HAVE_SETENV)
CHECK_FUNCTION_EXISTS_GLIBC(setlocale HAVE_SETLOCALE)
CHECK_FUNCTION_EXISTS_GLIBC(sigaction HAVE_SIGACTION)
CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR)
CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP)
CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR)
CHECK_FUNCTION_EXISTS_GLIBC(strncpy_s HAVE_STRNCPY_S)
CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR)
CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK)
CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM)
CHECK_FUNCTION_EXISTS_GLIBC(tzset HAVE_TZSET)
CHECK_FUNCTION_EXISTS_GLIBC(unsetenv HAVE_UNSETENV)
CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME)
CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES)
CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT)
CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK)
CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
CHECK_SYMBOL_EXISTS(wmemcmp "wchar.h" HAVE_WMEMCMP)
CHECK_SYMBOL_EXISTS(wmemcpy "wchar.h" HAVE_WMEMCPY)

SET(CMAKE_REQUIRED_LIBRARIES "")
CHECK_SYMBOL_EXISTS(fseeko           "stdio.h"    HAVE_FSEEKO)
CHECK_SYMBOL_EXISTS(strerror_r       "string.h"   HAVE_STRERROR_R)
CHECK_SYMBOL_EXISTS(strftime         "time.h"     HAVE_STRFTIME)
CHECK_SYMBOL_EXISTS(vprintf          "stdio.h"    HAVE_VPRINTF)
CHECK_SYMBOL_EXISTS(cygwin_conv_path "sys/cygwin.h" HAVE_CYGWIN_CONV_PATH)

CHECK_SYMBOL_EXISTS(major            "sys/mkdev.h"     MAJOR_IN_MKDEV)
CHECK_SYMBOL_EXISTS(major            "sys/sysmacros.h" MAJOR_IN_SYSMACROS)

IF(HAVE_STRERROR_R)
  SET(HAVE_DECL_STRERROR_R 1)
ENDIF(HAVE_STRERROR_R)

#
# Check defines
#
SET(headers "limits.h")
IF(HAVE_STDINT_H)
  LIST(APPEND headers "stdint.h")
ENDIF(HAVE_STDINT_H)
IF(HAVE_INTTYPES_H)
  LIST(APPEND headers "inttypes.h")
ENDIF(HAVE_INTTYPES_H)
CHECK_SYMBOL_EXISTS(EFTYPE           "errno.h"    HAVE_EFTYPE)
CHECK_SYMBOL_EXISTS(EILSEQ           "errno.h"    HAVE_EILSEQ)
CHECK_SYMBOL_EXISTS(D_MD_ORDER       "langinfo.h" HAVE_D_MD_ORDER)
CHECK_SYMBOL_EXISTS(optarg           "unistd.h"   HAVE_DECL_OPTARG)
CHECK_SYMBOL_EXISTS(optind           "unistd.h"   HAVE_DECL_OPTIND)
CHECK_SYMBOL_EXISTS(INT64_MAX        "${headers}" HAVE_DECL_INT64_MAX)
CHECK_SYMBOL_EXISTS(INT64_MIN        "${headers}" HAVE_DECL_INT64_MIN)
CHECK_SYMBOL_EXISTS(UINT32_MAX       "${headers}" HAVE_DECL_UINT32_MAX)
CHECK_SYMBOL_EXISTS(UINT64_MAX       "${headers}" HAVE_DECL_UINT64_MAX)
CHECK_SYMBOL_EXISTS(SIZE_MAX         "${headers}" HAVE_DECL_SIZE_MAX)
CHECK_SYMBOL_EXISTS(SSIZE_MAX        "limits.h"   HAVE_DECL_SSIZE_MAX)

#
# Check struct members
#
# Check for birthtime in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_birthtime
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIME)

# Check for high-resolution timestamps in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_birthtimespec.tv_nsec
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtimespec.tv_nsec
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtim.tv_nsec
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtime_n
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_N)
CHECK_STRUCT_MEMBER("struct stat" st_umtime
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_UMTIME)
CHECK_STRUCT_MEMBER("struct stat" st_mtime_usec
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_USEC)
# Check for block size support in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_blksize
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BLKSIZE)
# Check for st_flags in struct stat (BSD fflags)
CHECK_STRUCT_MEMBER("struct stat" st_flags
    "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_FLAGS)
#
#
CHECK_STRUCT_MEMBER("struct tm" tm_sec
    "sys/types.h;sys/time.h;time.h" TIME_WITH_SYS_TIME)

#
# Check for integer types
#
# XXX There must be a way to make this simpler <sigh> XXXX
#
CHECK_TYPE_SIZE("long long int"            LONG_LONG_INT)
CHECK_TYPE_SIZE("unsigned long long"       UNSIGNED_LONG_LONG)
CHECK_TYPE_SIZE("unsigned long long int"   UNSIGNED_LONG_LONG_INT)

#
CHECK_TYPE_SIZE(dev_t       DEV_T)
IF(NOT HAVE_DEV_T)
  IF(MSVC)
    SET(dev_t "unsigned int")
  ENDIF(MSVC)
ENDIF(NOT HAVE_DEV_T)
#
CHECK_TYPE_SIZE(gid_t       GID_T)
IF(NOT HAVE_GID_T)
  IF(WIN32)
    SET(gid_t "short")
  ELSE(WIN32)
    SET(gid_t "unsigned int")
  ENDIF(WIN32)
ENDIF(NOT HAVE_GID_T)
#
CHECK_TYPE_SIZE(id_t        ID_T)
IF(NOT HAVE_ID_T)
  IF(WIN32)
    SET(id_t "short")
  ELSE(WIN32)
    SET(id_t "unsigned int")
  ENDIF(WIN32)
ENDIF(NOT HAVE_ID_T)
#
CHECK_TYPE_SIZE(int32_t    INT32_T)
IF(NOT HAVE_INT32_T)
  SET(int32_t "int")
ENDIF(NOT HAVE_INT32_T)
#
CHECK_TYPE_SIZE(int64_t     INT64_T)
IF(NOT HAVE_INT64_T)
  IF(WIN32)
    SET(int64_t __int64)
  ENDIF(WIN32)
ENDIF(NOT HAVE_INT64_T)
#
CHECK_TYPE_SIZE(intmax_t    INTMAX_T)
IF(NOT HAVE_INTMAX_T)
  SET(intmax_t "int64_t")
ENDIF(NOT HAVE_INTMAX_T)
#
CHECK_TYPE_SIZE(mode_t      MODE_T)
IF(NOT HAVE_MODE_T)
  IF(WIN32)
    SET(mode_t "unsigned short")
  ELSE(WIN32)
    SET(mode_t "int")
  ENDIF(WIN32)
ENDIF(NOT HAVE_MODE_T)
#
CHECK_TYPE_SIZE(off_t       OFF_T)
IF(NOT HAVE_OFF_T)
  SET(off_t "__int64")
ENDIF(NOT HAVE_OFF_T)
#
CHECK_TYPE_SIZE(size_t      SIZE_T)
IF(NOT HAVE_SIZE_T)
  IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(size_t "uint64_t")
  ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(size_t   "uint32_t")
  ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
ENDIF(NOT HAVE_SIZE_T)
#
CHECK_TYPE_SIZE(ssize_t     SSIZE_T)
IF(NOT HAVE_SSIZE_T)
  IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(ssize_t "int64_t")
  ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(ssize_t "long")
  ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
ENDIF(NOT HAVE_SSIZE_T)
#
CHECK_TYPE_SIZE(uid_t       UID_T)
IF(NOT HAVE_UID_T)
  IF(WIN32)
    SET(uid_t "short")
  ELSE(WIN32)
    SET(uid_t "unsigned int")
  ENDIF(WIN32)
ENDIF(NOT HAVE_UID_T)
#
CHECK_TYPE_SIZE(pid_t       PID_T)
IF(NOT HAVE_PID_T)
  IF(WIN32)
    SET(pid_t "int")
  ELSE(WIN32)
    MESSAGE(FATAL_ERROR "pid_t doesn't exist on this platform?")
  ENDIF(WIN32)
ENDIF(NOT HAVE_PID_T)
#
CHECK_TYPE_SIZE(uint16_t    UINT16_T)
IF(NOT HAVE_UINT16_T)
  SET(uint16_t "unsigned short")
ENDIF(NOT HAVE_UINT16_T)
#
CHECK_TYPE_SIZE(uint32_t    UINT32_T)
IF(NOT HAVE_UINT32_T)
  SET(uint32_t "unsigned int")
ENDIF(NOT HAVE_UINT32_T)
#
CHECK_TYPE_SIZE(uint64_t    UINT64_T)
IF(NOT HAVE_UINT64_T)
  IF(WIN32)
    SET(uint64_t "unsigned __int64")
  ENDIF(WIN32)
ENDIF(NOT HAVE_UINT64_T)
#
CHECK_TYPE_SIZE(uintmax_t   UINTMAX_T)
IF(NOT HAVE_UINTMAX_T)
  SET(uintmax_t "uint64_t")
ENDIF(NOT HAVE_UINTMAX_T)
#
CHECK_TYPE_SIZE(intptr_t   INTPTR_T)
IF(NOT HAVE_INTPTR_T)
  IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(intptr_t "int64_t")
  ELSE()
    SET(intptr_t "int32_t")
  ENDIF()
ENDIF(NOT HAVE_INTPTR_T)
#
CHECK_TYPE_SIZE(uintptr_t   UINTPTR_T)
IF(NOT HAVE_UINTPTR_T)
  IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
    SET(uintptr_t "uint64_t")
  ELSE()
    SET(uintptr_t "uint32_t")
  ENDIF()
ENDIF(NOT HAVE_UINTPTR_T)
#
CHECK_TYPE_SIZE(wchar_t     SIZEOF_WCHAR_T)
IF(HAVE_SIZEOF_WCHAR_T)
  SET(HAVE_WCHAR_T 1)
ENDIF(HAVE_SIZEOF_WCHAR_T)
#
# Check if _FILE_OFFSET_BITS macro needed for large files
#
CHECK_FILE_OFFSET_BITS()



#
# Check for Extended Attribute libraries, headers, and functions
#
IF(ENABLE_XATTR)
  LA_CHECK_INCLUDE_FILE(attr/xattr.h     HAVE_ATTR_XATTR_H)
  LA_CHECK_INCLUDE_FILE(sys/xattr.h      HAVE_SYS_XATTR_H)
  CHECK_LIBRARY_EXISTS(attr "setxattr" "" HAVE_ATTR_LIB)
  IF(HAVE_ATTR_LIB)
    SET(CMAKE_REQUIRED_LIBRARIES "attr")
  ENDIF(HAVE_ATTR_LIB)
  CHECK_FUNCTION_EXISTS_GLIBC(extattr_get_file HAVE_EXTATTR_GET_FILE)
  CHECK_FUNCTION_EXISTS_GLIBC(extattr_list_file HAVE_EXTATTR_LIST_FILE)
  CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_fd HAVE_EXTATTR_SET_FD)
  CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_file HAVE_EXTATTR_SET_FILE)
  CHECK_FUNCTION_EXISTS_GLIBC(fsetxattr HAVE_FSETXATTR)
  CHECK_FUNCTION_EXISTS_GLIBC(getxattr HAVE_GETXATTR)
  CHECK_FUNCTION_EXISTS_GLIBC(lgetxattr HAVE_LGETXATTR)
  CHECK_FUNCTION_EXISTS_GLIBC(listxattr HAVE_LISTXATTR)
  CHECK_FUNCTION_EXISTS_GLIBC(llistxattr HAVE_LLISTXATTR)
  CHECK_FUNCTION_EXISTS_GLIBC(lsetxattr HAVE_LSETXATTR)
ENDIF(ENABLE_XATTR)

#
# Check for ACL libraries, headers, and functions
#
# The ACL support in libarchive is written against the POSIX1e draft,
# which was never officially approved and varies quite a bit across
# platforms.  Worse, some systems have completely non-POSIX acl functions,
# which makes the following checks rather more complex than I would like.
#
IF(ENABLE_ACL)
  CHECK_LIBRARY_EXISTS(acl "acl_get_file" "" HAVE_ACL_LIB)
  IF(HAVE_ACL_LIB)
    SET(CMAKE_REQUIRED_LIBRARIES "acl")
    FIND_LIBRARY(ACL_LIBRARY NAMES acl)
    LIST(APPEND ADDITIONAL_LIBS ${ACL_LIBRARY})
  ENDIF(HAVE_ACL_LIB)
  #
  CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY)
  CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT)
  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD)
  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd_np HAVE_ACL_SET_FD_NP)
  CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE)
  CHECK_TYPE_EXISTS(acl_permset_t "${INCLUDES}"    HAVE_ACL_PERMSET_T)

  # The "acl_get_perm()" function was omitted from the POSIX draft.
  # (It's a pretty obvious oversight; otherwise, there's no way to
  # test for specific permissions in a permset.)  Linux uses the obvious
  # name, FreeBSD adds _np to mark it as "non-Posix extension."
  # Test for both as a double-check that we really have POSIX-style ACL support.
  CHECK_SYMBOL_EXISTS(acl_get_perm "${INCLUDES}" HAVE_ACL_GET_PERM)
  CHECK_SYMBOL_EXISTS(acl_get_perm_np "${INCLUDES}" HAVE_ACL_GET_PERM_NP)
  CHECK_SYMBOL_EXISTS(acl_get_link "${INCLUDES}" HAVE_ACL_GET_LINK)
  CHECK_SYMBOL_EXISTS(acl_get_link_np "${INCLUDES}" HAVE_ACL_GET_LINK_NP)

  # MacOS has an acl.h that isn't POSIX.  It can be detected by
  # checking for ACL_USER
  CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_ACL_USER)
ENDIF(ENABLE_ACL)

# Generate "config.h" from "build/cmake/config.h.in"
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in
	${CMAKE_CURRENT_BINARY_DIR}/config.h)
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
ADD_DEFINITIONS(-DHAVE_CONFIG_H)

#
# Register installation of PDF documents.
#
IF(WIN32 AND NOT CYGWIN)
  #
  # On Windows platform, It's better that we install PDF documents
  # on one's computer.
  # These PDF documents are available in the release package.
  #
  IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf)
    INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf
            DESTINATION share/man
            FILES_MATCHING PATTERN "*.pdf"
    )
  ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf)
ENDIF(WIN32 AND NOT CYGWIN)
#
#
#
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libarchive)
#
IF(MSVC)
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
ENDIF(MSVC)
# Especially for early development, we want to be a little
# aggressive about diagnosing build problems; this can get
# relaxed somewhat in final shipping versions.
IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
  ADD_DEFINITIONS(-Wall -Werror)
ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")

IF(ENABLE_TEST)
ADD_CUSTOM_TARGET(run_all_tests)
ENDIF(ENABLE_TEST)

add_subdirectory(libarchive)
add_subdirectory(tar)
add_subdirectory(cpio)

File Added: pkgsrc/archivers/libarchive/files/build/autogen.sh
#!/bin/sh

PATH=/usr/local/gnu-autotools/bin/:$PATH
export PATH

# Start from one level above the build directory
if [ -f version ]; then
    cd ..
fi

if [ \! -f build/version ]; then
    echo "Can't find source directory"
    exit 1
fi

# BSD make's "OBJDIR" support freaks out the automake-generated
# Makefile.  Effectively disable it.
export MAKEOBJDIRPREFIX=/junk

# Start from the build directory, where the version file is located
if [ -f build/version ]; then
    cd build
fi

if [ \! -f version ]; then
    echo "Can't find version file"
    exit 1
fi

# Update the build number in the 'version' file.
# Separate number from additional alpha/beta/etc marker
MARKER=`cat version | sed 's/[0-9.]//g'`
# Bump the number
VN=`cat version | sed 's/[^0-9.]//g'`
# Build out the string.
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"

cd ..

# Clean up the source dir as much as we can.
/bin/sh build/clean.sh

# Substitute the integer version into Libarchive's archive.h
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive.h
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_STRING).*/\$1 \"libarchive $VS\"/" libarchive/archive.h
# Substitute versions into configure.ac as well
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_S\]),.*\)/$1,['"$VS"'])/' configure.ac
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' configure.ac

set -xe
aclocal -I build/autoconf

# Note: --automake flag needed only for libtoolize from
# libtool 1.5.x; in libtool 2.2.x it is a synonym for --quiet
case `uname` in
Darwin) glibtoolize --automake -c;;
*) libtoolize --automake -c;;
esac
autoconf
autoheader
automake -a -c

./configure
make distcheck

File Added: pkgsrc/archivers/libarchive/files/build/bump-version.sh
#!/bin/sh +v

# Start from the build directory, where the version file is located
if [ -f build/version ]; then
    cd build
fi

if [ \! -f version ]; then
    echo "Can't find version file"
    exit 1
fi

# Update the build number in the 'version' file.
# Separate number from additional alpha/beta/etc marker
MARKER=`cat version | sed 's/[0-9.]//g'`
# Bump the number
VN=`cat version | sed 's/[^0-9.]//g'`
# Reassemble and write back out
VN=$(($VN + 1))
rm -f version.old
mv version version.old
chmod +w version.old
echo $VN$MARKER > version
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
cd ..

ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"

echo $ANNOUNCE

# Add a version notice to NEWS
mv NEWS NEWS.bak
chmod +w NEWS.bak
echo > NEWS
echo $ANNOUNCE >> NEWS
cat NEWS.bak >> NEWS

File Added: pkgsrc/archivers/libarchive/files/build/clean.sh
#!/bin/sh

if [ \! -f build/version ]; then
    echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
    exit 1
fi

#
# The automake-generated 'maintainer-clean' target does clean up a
# lot.  If that fails, try plain 'clean' in case we're using the cmake
# or other makefile.  But don't worry if we can't...
#
make maintainer-clean || make clean || true

# If we're on BSD, blow away the build dir under /usr/obj
rm -rf /usr/obj`pwd`

#
# Try to clean up a bit more...
#

find . -name '*.So' | xargs rm
find . -name '*.a' | xargs rm
find . -name '*.la' | xargs rm
find . -name '*.lo' | xargs rm
find . -name '*.o' | xargs rm
find . -name '*.orig' | xargs rm
find . -name '*.po' | xargs rm
find . -name '*.rej' | xargs rm
find . -name '*~' | xargs rm
find . -name '.depend' | xargs rm
find . -name '.deps' | xargs rm -rf
find . -name '.dirstamp' | xargs rm
find . -name '.libs' | xargs rm -rf

rm -rf autom4te.cache

rm -f Makefile.in
rm -f aclocal.m4
rm -f bsdcpio
rm -f bsdcpio_test
rm -f bsdtar
rm -f bsdtar_test
rm -f build/autoconf/compile
rm -f build/autoconf/config.*
rm -f build/autoconf/depcomp
rm -f build/autoconf/install-sh
rm -f build/autoconf/libtool.m4
rm -f build/autoconf/ltmain.sh
rm -f build/autoconf/ltoptions.m4
rm -f build/autoconf/ltsugar.m4
rm -f build/autoconf/ltversion.m4
rm -f build/autoconf/lt~obsolete.m4
rm -f build/autoconf/missing
rm -f build/pkgconfig/libarchive.pc
rm -f build/version.old
rm -f config.h
rm -f config.h.in
rm -f config.log
rm -f config.status
rm -f configure
rm -f cpio/*.1.gz
rm -f cpio/bsdcpio
rm -f cpio/test/bsdcpio_test
rm -f cpio/test/list.h
rm -f doc/html/*
rm -f doc/man/*
rm -f doc/pdf/*
rm -f doc/text/*
rm -f doc/wiki/*
rm -f libarchive/*.[35].gz
rm -f libarchive/libarchive.so*
rm -f libarchive/test/libarchive_test
rm -f libarchive/test/list.h
rm -f libarchive_test
rm -f libtool
rm -f stamp-h1
rm -f tar/*.1.gz
rm -f tar/bsdtar
rm -f tar/test/bsdtar_test
rm -f tar/test/list.h

File Added: pkgsrc/archivers/libarchive/files/build/version
2008000

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/check_stdcall_func.m4
# AC_LANG_STDCALL_FUNC_LINK_TRY(FUNCTION, SIGNATURE)
# -------------------------------
# Produce a source which links correctly iff the FUNCTION exists.
AC_DEFUN([AC_LANG_STDCALL_FUNC_LINK_TRY],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])

# AC_CHECK_STDCALL_FUNC(FUNCTION, SIGNATURE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -----------------------------------------------------------------
AC_DEFUN([AC_CHECK_STDCALL_FUNC],
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
AC_CACHE_CHECK([for $1], ac_var,
[AC_LINK_IFELSE([AC_LANG_STDCALL_FUNC_LINK_TRY([$1],[$2])],
                [AS_VAR_SET(ac_var, yes)],
                [AS_VAR_SET(ac_var, no)])])
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])# AC_CHECK_FUNC

# AC_LANG_STDCALL_FUNC_LINK_TRY(C)(FUNCTION, SIGNATURE)
# ----------------------------------
# Don't include <ctype.h> because on OSF/1 3.0 it includes
# <sys/types.h> which includes <sys/select.h> which contains a
# prototype for select.  Similarly for bzero.
m4_define([AC_LANG_STDCALL_FUNC_LINK_TRY(C)],
[AC_LANG_PROGRAM(
[/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char __stdcall $1 ( $2 ) below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char __stdcall $1 ( $2 );
char (*f) ( $2 );
],
[/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$1) || defined (__stub___$1)
choke me
#else
f = $1;
#endif
])])

# AC_LANG_STDCALL_FUNC_LINK_TRY(C++)(FUNCTION)
# ------------------------------------
m4_copy([AC_LANG_STDCALL_FUNC_LINK_TRY(C)], [AC_LANG_STDCALL_FUNC_LINK_TRY(C++)])


File Added: pkgsrc/archivers/libarchive/files/build/autoconf/la_uid_t.m4
# la_TYPE_UID_T
# -------------
AC_DEFUN([la_TYPE_UID_T],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_CACHE_CHECK(for uid_t in sys/types.h, la_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h,
  la_cv_type_uid_t=yes, la_cv_type_uid_t=no)])
if test $la_cv_type_uid_t = no; then
  case $host in
    *mingw*) def_uid_t=short ;;
    *) def_uid_t=int ;;
  esac
  AC_DEFINE_UNQUOTED(uid_t, [$def_uid_t],
	[Define to match typeof st_uid field of struct stat if <sys/types.h> doesn't define.])
  AC_DEFINE_UNQUOTED(gid_t, [$def_uid_t],
	[Define to match typeof st_gid field of struct stat if <sys/types.h> doesn't define.])
fi
])
AU_ALIAS([AC_TYPE_UID_T], [la_TYPE_UID_T])


File Added: pkgsrc/archivers/libarchive/files/build/autoconf/compile
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.

scriptversion=2005-05-14.22

# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.

case $1 in
  '')
     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
     exit 1;
     ;;
  -h | --h*)
    cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]

Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.

If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.

Report bugs to <bug-automake@gnu.org>.
EOF
    exit $?
    ;;
  -v | --v*)
    echo "compile $scriptversion"
    exit $?
    ;;
esac

ofile=
cfile=
eat=

for arg
do
  if test -n "$eat"; then
    eat=
  else
    case $1 in
      -o)
	# configure might choose to run compile as `compile cc -o foo foo.c'.
	# So we strip `-o arg' only if arg is an object.
	eat=1
	case $2 in
	  *.o | *.obj)
	    ofile=$2
	    ;;
	  *)
	    set x "$@" -o "$2"
	    shift
	    ;;
	esac
	;;
      *.c)
	cfile=$1
	set x "$@" "$1"
	shift
	;;
      *)
	set x "$@" "$1"
	shift
	;;
    esac
  fi
  shift
done

if test -z "$ofile" || test -z "$cfile"; then
  # If no `-o' option was seen then we might have been invoked from a
  # pattern rule where we don't need one.  That is ok -- this is a
  # normal compilation that the losing compiler can handle.  If no
  # `.c' file was seen then we are probably linking.  That is also
  # ok.
  exec "$@"
fi

# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`

# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file.  Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
  if mkdir "$lockdir" >/dev/null 2>&1; then
    break
  fi
  sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15

# Run the compile.
"$@"
ret=$?

if test -f "$cofile"; then
  mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
  mv "${cofile}bj" "$ofile"
fi

rmdir "$lockdir"
exit $ret

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/config.guess
#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.

timestamp='2003-07-02'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>.  Submit a context
# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub.  If it succeeds, it prints the system name on stdout, and
# exits with 0.  Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.

me=`echo "$0" | sed -e 's,.*/,,'`

usage="\
Usage: $0 [OPTION]

Output the configuration name of the system \`$me' is run on.

Operation modes:
  -h, --help         print this help, then exit
  -t, --time-stamp   print date of last modification, then exit
  -v, --version      print version number, then exit

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."

# Parse command line
while test $# -gt 0 ; do
  case $1 in
    --time-stamp | --time* | -t )
       echo "$timestamp" ; exit 0 ;;
    --version | -v )
       echo "$version" ; exit 0 ;;
    --help | --h* | -h )
       echo "$usage"; exit 0 ;;
    -- )     # Stop option processing
       shift; break ;;
    - )	# Use stdin as input.
       break ;;
    -* )
       echo "$me: invalid option $1$help" >&2
       exit 1 ;;
    * )
       break ;;
  esac
done

if test $# != 0; then
  echo "$me: too many arguments$help" >&2
  exit 1
fi

trap 'exit 1' 1 2 15

# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.

# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.

# Portable tmp directory creation inspired by the Autoconf team.

set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > $dummy.c ;
	for c in cc gcc c89 c99 ; do
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
	     CC_FOR_BUILD="$c"; break ;
	  fi ;
	done ;
	if test x"$CC_FOR_BUILD" = x ; then
	  CC_FOR_BUILD=no_compiler_found ;
	fi
	;;
 ,,*)   CC_FOR_BUILD=$CC ;;
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
esac ;'

# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
	PATH=$PATH:/.attbin ; export PATH
fi

UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

# Note: order is significant - the case branches are not exclusive.

case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    *:NetBSD:*:*)
	# NetBSD (nbsd) targets should (where applicable) match one or
	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
	# switched to ELF, *-*-netbsd* would select the old
	# object file format.  This provides both forward
	# compatibility and a consistent mechanism for selecting the
	# object file format.
	#
	# Note: NetBSD doesn't particularly care about the vendor
	# portion of the name.  We always set it to "unknown".
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
	case "${UNAME_MACHINE_ARCH}" in
	    armeb) machine=armeb-unknown ;;
	    arm*) machine=arm-unknown ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
	esac
	# The Operating System including object format, if it has switched
	# to ELF recently, or will in the future.
	case "${UNAME_MACHINE_ARCH}" in
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
		eval $set_cc_for_build
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
			| grep __ELF__ >/dev/null
		then
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
		    # Return netbsd for either.  FIX?
		    os=netbsd
		else
		    os=netbsdelf
		fi
		;;
	    *)
	        os=netbsd
		;;
	esac
	# The OS release
	# Debian GNU/NetBSD machines have a different userland, and
	# thus, need a distinct triplet. However, they do not need
	# kernel version information, so it can be replaced with a
	# suitable tag, in the style of linux-gnu.
	case "${UNAME_VERSION}" in
	    Debian*)
		release='-gnu'
		;;
	    *)
		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
		;;
	esac
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
	# contains redundant information, the shorter form:
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
	echo "${machine}-${os}${release}"
	exit 0 ;;
    amiga:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    arc:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    hp300:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mac68k:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    macppc:OpenBSD:*:*)
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvme68k:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvme88k:OpenBSD:*:*)
	echo m88k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvmeppc:OpenBSD:*:*)
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    pmax:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    sgi:OpenBSD:*:*)
	echo mipseb-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    sun3:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    wgrisc:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    *:OpenBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    alpha:OSF1:*:*)
	if test $UNAME_RELEASE = "V4.0"; then
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
	fi
	# According to Compaq, /usr/sbin/psrinfo has been available on
	# OSF/1 and Tru64 systems produced since 1995.  I hope that
	# covers most systems running today.  This code pipes the CPU
	# types through head -n 1, so we only detect the type of CPU 0.
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
	case "$ALPHA_CPU_TYPE" in
	    "EV4 (21064)")
		UNAME_MACHINE="alpha" ;;
	    "EV4.5 (21064)")
		UNAME_MACHINE="alpha" ;;
	    "LCA4 (21066/21068)")
		UNAME_MACHINE="alpha" ;;
	    "EV5 (21164)")
		UNAME_MACHINE="alphaev5" ;;
	    "EV5.6 (21164A)")
		UNAME_MACHINE="alphaev56" ;;
	    "EV5.6 (21164PC)")
		UNAME_MACHINE="alphapca56" ;;
	    "EV5.7 (21164PC)")
		UNAME_MACHINE="alphapca57" ;;
	    "EV6 (21264)")
		UNAME_MACHINE="alphaev6" ;;
	    "EV6.7 (21264A)")
		UNAME_MACHINE="alphaev67" ;;
	    "EV6.8CB (21264C)")
		UNAME_MACHINE="alphaev68" ;;
	    "EV6.8AL (21264B)")
		UNAME_MACHINE="alphaev68" ;;
	    "EV6.8CX (21264D)")
		UNAME_MACHINE="alphaev68" ;;
	    "EV6.9A (21264/EV69A)")
		UNAME_MACHINE="alphaev69" ;;
	    "EV7 (21364)")
		UNAME_MACHINE="alphaev7" ;;
	    "EV7.9 (21364A)")
		UNAME_MACHINE="alphaev79" ;;
	esac
	# A Vn.n version is a released version.
	# A Tn.n version is a released field test version.
	# A Xn.n version is an unreleased experimental baselevel.
	# 1.2 uses "1.2" for uname -r.
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
	exit 0 ;;
    Alpha*:OpenVMS:*:*)
	echo alpha-hp-vms
	exit 0 ;;
    Alpha\ *:Windows_NT*:*)
	# How do we know it's Interix rather than the generic POSIX subsystem?
	# Should we change UNAME_MACHINE based on the output of uname instead
	# of the specific Alpha model?
	echo alpha-pc-interix
	exit 0 ;;
    21064:Windows_NT:50:3)
	echo alpha-dec-winnt3.5
	exit 0 ;;
    Amiga*:UNIX_System_V:4.0:*)
	echo m68k-unknown-sysv4
	exit 0;;
    *:[Aa]miga[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-amigaos
	exit 0 ;;
    *:[Mm]orph[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-morphos
	exit 0 ;;
    *:OS/390:*:*)
	echo i370-ibm-openedition
	exit 0 ;;
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
	echo arm-acorn-riscix${UNAME_RELEASE}
	exit 0;;
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
	echo hppa1.1-hitachi-hiuxmpp
	exit 0;;
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
		echo pyramid-pyramid-sysv3
	else
		echo pyramid-pyramid-bsd
	fi
	exit 0 ;;
    NILE*:*:*:dcosx)
	echo pyramid-pyramid-svr4
	exit 0 ;;
    DRS?6000:unix:4.0:6*)
	echo sparc-icl-nx6
	exit 0 ;;
    DRS?6000:UNIX_SV:4.2*:7*)
	case `/usr/bin/uname -p` in
	    sparc) echo sparc-icl-nx7 && exit 0 ;;
	esac ;;
    sun4H:SunOS:5.*:*)
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit 0 ;;
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit 0 ;;
    i86pc:SunOS:5.*:*)
	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit 0 ;;
    sun4*:SunOS:6*:*)
	# According to config.sub, this is the proper way to canonicalize
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
	# it's likely to be more like Solaris than SunOS4.
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit 0 ;;
    sun4*:SunOS:*:*)
	case "`/usr/bin/arch -k`" in
	    Series*|S4*)
		UNAME_RELEASE=`uname -v`
		;;
	esac
	# Japanese Language versions have a version number like `4.1.3-JL'.
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
	exit 0 ;;
    sun3*:SunOS:*:*)
	echo m68k-sun-sunos${UNAME_RELEASE}
	exit 0 ;;
    sun*:*:4.2BSD:*)
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
	case "`/bin/arch`" in
	    sun3)
		echo m68k-sun-sunos${UNAME_RELEASE}
		;;
	    sun4)
		echo sparc-sun-sunos${UNAME_RELEASE}
		;;
	esac
	exit 0 ;;
    aushp:SunOS:*:*)
	echo sparc-auspex-sunos${UNAME_RELEASE}
	exit 0 ;;
    # The situation for MiNT is a little confusing.  The machine name
    # can be virtually everything (everything which is not
    # "atarist" or "atariste" at least should have a processor
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    # to the lowercase version "mint" (or "freemint").  Finally
    # the system name "TOS" denotes a system which is actually not
    # MiNT.  But MiNT is downward compatible to TOS, so this should
    # be no problem.
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
	exit 0 ;;
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
        exit 0 ;;
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
	exit 0 ;;
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
        echo m68k-milan-mint${UNAME_RELEASE}
        exit 0 ;;
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
        echo m68k-hades-mint${UNAME_RELEASE}
        exit 0 ;;
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
        echo m68k-unknown-mint${UNAME_RELEASE}
        exit 0 ;;
    powerpc:machten:*:*)
	echo powerpc-apple-machten${UNAME_RELEASE}
	exit 0 ;;
    RISC*:Mach:*:*)
	echo mips-dec-mach_bsd4.3
	exit 0 ;;
    RISC*:ULTRIX:*:*)
	echo mips-dec-ultrix${UNAME_RELEASE}
	exit 0 ;;
    VAX*:ULTRIX*:*:*)
	echo vax-dec-ultrix${UNAME_RELEASE}
	exit 0 ;;
    2020:CLIX:*:* | 2430:CLIX:*:*)
	echo clipper-intergraph-clix${UNAME_RELEASE}
	exit 0 ;;
    mips:*:*:UMIPS | mips:*:*:RISCos)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h>  /* for printf() prototype */
	int main (int argc, char *argv[]) {
#else
	int main (argc, argv) int argc; char *argv[]; {
#endif
	#if defined (host_mips) && defined (MIPSEB)
	#if defined (SYSTYPE_SYSV)
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_SVR4)
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
	#endif
	#endif
	  exit (-1);
	}
EOF
	$CC_FOR_BUILD -o $dummy $dummy.c \
	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
	  && exit 0
	echo mips-mips-riscos${UNAME_RELEASE}
	exit 0 ;;
    Motorola:PowerMAX_OS:*:*)
	echo powerpc-motorola-powermax
	exit 0 ;;
    Motorola:*:4.3:PL8-*)
	echo powerpc-harris-powermax
	exit 0 ;;
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
	echo powerpc-harris-powermax
	exit 0 ;;
    Night_Hawk:Power_UNIX:*:*)
	echo powerpc-harris-powerunix
	exit 0 ;;
    m88k:CX/UX:7*:*)
	echo m88k-harris-cxux7
	exit 0 ;;
    m88k:*:4*:R4*)
	echo m88k-motorola-sysv4
	exit 0 ;;
    m88k:*:3*:R3*)
	echo m88k-motorola-sysv3
	exit 0 ;;
    AViiON:dgux:*:*)
        # DG/UX returns AViiON for all architectures
        UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
	then
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
	    then
		echo m88k-dg-dgux${UNAME_RELEASE}
	    else
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
	    fi
	else
	    echo i586-dg-dgux${UNAME_RELEASE}
	fi
 	exit 0 ;;
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
	echo m88k-dolphin-sysv3
	exit 0 ;;
    M88*:*:R3*:*)
	# Delta 88k system running SVR3
	echo m88k-motorola-sysv3
	exit 0 ;;
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
	echo m88k-tektronix-sysv3
	exit 0 ;;
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
	echo m68k-tektronix-bsd
	exit 0 ;;
    *:IRIX*:*:*)
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
	exit 0 ;;
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    i*86:AIX:*:*)
	echo i386-ibm-aix
	exit 0 ;;
    ia64:AIX:*:*)
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
	fi
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
	exit 0 ;;
    *:AIX:2:3)
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
		eval $set_cc_for_build
		sed 's/^		//' << EOF >$dummy.c
		#include <sys/systemcfg.h>

		main()
			{
			if (!__power_pc())
				exit(1);
			puts("powerpc-ibm-aix3.2.5");
			exit(0);
			}
EOF
		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
		echo rs6000-ibm-aix3.2.5
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
		echo rs6000-ibm-aix3.2.4
	else
		echo rs6000-ibm-aix3.2
	fi
	exit 0 ;;
    *:AIX:*:[45])
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
		IBM_ARCH=rs6000
	else
		IBM_ARCH=powerpc
	fi
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
	fi
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
	exit 0 ;;
    *:AIX:*:*)
	echo rs6000-ibm-aix
	exit 0 ;;
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
	echo romp-ibm-bsd4.4
	exit 0 ;;
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
	exit 0 ;;                           # report: romp-ibm BSD 4.3
    *:BOSX:*:*)
	echo rs6000-bull-bosx
	exit 0 ;;
    DPX/2?00:B.O.S.:*:*)
	echo m68k-bull-sysv3
	exit 0 ;;
    9000/[34]??:4.3bsd:1.*:*)
	echo m68k-hp-bsd
	exit 0 ;;
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
	echo m68k-hp-bsd4.4
	exit 0 ;;
    9000/[34678]??:HP-UX:*:*)
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "${UNAME_MACHINE}" in
	    9000/31? )            HP_ARCH=m68000 ;;
	    9000/[34]?? )         HP_ARCH=m68k ;;
	    9000/[678][0-9][0-9])
		if [ -x /usr/bin/getconf ]; then
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
                          32) HP_ARCH="hppa2.0n" ;;
                          64) HP_ARCH="hppa2.0w" ;;
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                        esac ;;
                    esac
		fi
		if [ "${HP_ARCH}" = "" ]; then
		    eval $set_cc_for_build
		    sed 's/^              //' << EOF >$dummy.c

              #define _HPUX_SOURCE
              #include <stdlib.h>
              #include <unistd.h>

              int main ()
              {
              #if defined(_SC_KERNEL_BITS)
                  long bits = sysconf(_SC_KERNEL_BITS);
              #endif
                  long cpu  = sysconf (_SC_CPU_VERSION);

                  switch (cpu)
              	{
              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
              	case CPU_PA_RISC2_0:
              #if defined(_SC_KERNEL_BITS)
              	    switch (bits)
              		{
              		case 64: puts ("hppa2.0w"); break;
              		case 32: puts ("hppa2.0n"); break;
              		default: puts ("hppa2.0"); break;
              		} break;
              #else  /* !defined(_SC_KERNEL_BITS) */
              	    puts ("hppa2.0"); break;
              #endif
              	default: puts ("hppa1.0"); break;
              	}
                  exit (0);
              }
EOF
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
		    test -z "$HP_ARCH" && HP_ARCH=hppa
		fi ;;
	esac
	if [ ${HP_ARCH} = "hppa2.0w" ]
	then
	    # avoid double evaluation of $set_cc_for_build
	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
	    then
		HP_ARCH="hppa2.0w"
	    else
		HP_ARCH="hppa64"
	    fi
	fi
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
	exit 0 ;;
    ia64:HP-UX:*:*)
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux${HPUX_REV}
	exit 0 ;;
    3050*:HI-UX:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <unistd.h>
	int
	main ()
	{
	  long cpu = sysconf (_SC_CPU_VERSION);
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
	     results, however.  */
	  if (CPU_IS_PA_RISC (cpu))
	    {
	      switch (cpu)
		{
		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
		  default: puts ("hppa-hitachi-hiuxwe2"); break;
		}
	    }
	  else if (CPU_IS_HP_MC68K (cpu))
	    puts ("m68k-hitachi-hiuxwe2");
	  else puts ("unknown-hitachi-hiuxwe2");
	  exit (0);
	}
EOF
	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
	echo unknown-hitachi-hiuxwe2
	exit 0 ;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
	echo hppa1.1-hp-bsd
	exit 0 ;;
    9000/8??:4.3bsd:*:*)
	echo hppa1.0-hp-bsd
	exit 0 ;;
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
	echo hppa1.0-hp-mpeix
	exit 0 ;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
	echo hppa1.1-hp-osf
	exit 0 ;;
    hp8??:OSF1:*:*)
	echo hppa1.0-hp-osf
	exit 0 ;;
    i*86:OSF1:*:*)
	if [ -x /usr/sbin/sysversion ] ; then
	    echo ${UNAME_MACHINE}-unknown-osf1mk
	else
	    echo ${UNAME_MACHINE}-unknown-osf1
	fi
	exit 0 ;;
    parisc*:Lites*:*:*)
	echo hppa1.1-hp-lites
	exit 0 ;;
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
	echo c1-convex-bsd
        exit 0 ;;
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
	if getsysinfo -f scalar_acc
	then echo c32-convex-bsd
	else echo c2-convex-bsd
	fi
        exit 0 ;;
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
	echo c34-convex-bsd
        exit 0 ;;
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
	echo c38-convex-bsd
        exit 0 ;;
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
	echo c4-convex-bsd
        exit 0 ;;
    CRAY*Y-MP:*:*:*)
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
    CRAY*[A-Z]90:*:*:*)
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
	      -e 's/\.[^.]*$/.X/'
	exit 0 ;;
    CRAY*TS:*:*:*)
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
    CRAY*T3E:*:*:*)
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
    CRAY*SV1:*:*:*)
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
    *:UNICOS/mp:*:*)
	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
	exit 0 ;;
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit 0 ;;
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
	exit 0 ;;
    sparc*:BSD/OS:*:*)
	echo sparc-unknown-bsdi${UNAME_RELEASE}
	exit 0 ;;
    *:BSD/OS:*:*)
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
	exit 0 ;;
    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
	# Determine whether the default compiler uses glibc.
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <features.h>
	#if __GLIBC__ >= 2
	LIBC=gnu
	#else
	LIBC=
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
	# GNU/FreeBSD systems have a "k" prefix to indicate we are using
	# FreeBSD's kernel, but not the complete OS.
	case ${LIBC} in gnu) kernel_only='k' ;; esac
	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
	exit 0 ;;
    i*:CYGWIN*:*)
	echo ${UNAME_MACHINE}-pc-cygwin
	exit 0 ;;
    i*:MINGW*:*)
	echo ${UNAME_MACHINE}-pc-mingw32
	exit 0 ;;
    i*:PW*:*)
	echo ${UNAME_MACHINE}-pc-pw32
	exit 0 ;;
    x86:Interix*:[34]*)
	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
	exit 0 ;;
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
	echo i${UNAME_MACHINE}-pc-mks
	exit 0 ;;
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
	# How do we know it's Interix rather than the generic POSIX subsystem?
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
	# UNAME_MACHINE based on the output of uname instead of i386?
	echo i586-pc-interix
	exit 0 ;;
    i*:UWIN*:*)
	echo ${UNAME_MACHINE}-pc-uwin
	exit 0 ;;
    p*:CYGWIN*:*)
	echo powerpcle-unknown-cygwin
	exit 0 ;;
    prep*:SunOS:5.*:*)
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit 0 ;;
    *:GNU:*:*)
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
	exit 0 ;;
    i*86:Minix:*:*)
	echo ${UNAME_MACHINE}-pc-minix
	exit 0 ;;
    arm*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    cris:Linux:*:*)
	echo cris-axis-linux-gnu
	exit 0 ;;
    ia64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    m68*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    mips:Linux:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#undef CPU
	#undef mips
	#undef mipsel
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=mipsel
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=mips
	#else
	CPU=
	#endif
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
	;;
    mips64:Linux:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#undef CPU
	#undef mips64
	#undef mips64el
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=mips64el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=mips64
	#else
	CPU=
	#endif
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
	;;
    ppc:Linux:*:*)
	echo powerpc-unknown-linux-gnu
	exit 0 ;;
    ppc64:Linux:*:*)
	echo powerpc64-unknown-linux-gnu
	exit 0 ;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
	  EV5)   UNAME_MACHINE=alphaev5 ;;
	  EV56)  UNAME_MACHINE=alphaev56 ;;
	  PCA56) UNAME_MACHINE=alphapca56 ;;
	  PCA57) UNAME_MACHINE=alphapca56 ;;
	  EV6)   UNAME_MACHINE=alphaev6 ;;
	  EV67)  UNAME_MACHINE=alphaev67 ;;
	  EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
	exit 0 ;;
    parisc:Linux:*:* | hppa:Linux:*:*)
	# Look for CPU level
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
	  *)    echo hppa-unknown-linux-gnu ;;
	esac
	exit 0 ;;
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	echo hppa64-unknown-linux-gnu
	exit 0 ;;
    s390:Linux:*:* | s390x:Linux:*:*)
	echo ${UNAME_MACHINE}-ibm-linux
	exit 0 ;;
    sh64*:Linux:*:*)
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    sh*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    sparc:Linux:*:* | sparc64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit 0 ;;
    x86_64:Linux:*:*)
	echo x86_64-unknown-linux-gnu
	exit 0 ;;
    i*86:Linux:*:*)
	# The BFD linker knows what the default object file format is, so
	# first see if it will tell us. cd to the root directory to prevent
	# problems with other programs or directories called `ld' in the path.
	# Set LC_ALL=C to ensure ld outputs messages in English.
	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
			 | sed -ne '/supported targets:/!d
				    s/[ 	][ 	]*/ /g
				    s/.*supported targets: *//
				    s/ .*//
				    p'`
        case "$ld_supported_targets" in
	  elf32-i386)
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
		;;
	  a.out-i386-linux)
		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
		exit 0 ;;
	  coff-i386)
		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
		exit 0 ;;
	  "")
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
		# one that does not give us useful --help.
		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
		exit 0 ;;
	esac
	# Determine whether the default compiler is a.out or elf
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <features.h>
	#ifdef __ELF__
	# ifdef __GLIBC__
	#  if __GLIBC__ >= 2
	LIBC=gnu
	#  else
	LIBC=gnulibc1
	#  endif
	# else
	LIBC=gnulibc1
	# endif
	#else
	#ifdef __INTEL_COMPILER
	LIBC=gnu
	#else
	LIBC=gnuaout
	#endif
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
	;;
    i*86:DYNIX/ptx:4*:*)
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
	# earlier versions are messed up and put the nodename in both
	# sysname and nodename.
	echo i386-sequent-sysv4
	exit 0 ;;
    i*86:UNIX_SV:4.2MP:2.*)
        # Unixware is an offshoot of SVR4, but it has its own version
        # number series starting with 2...
        # I am not positive that other SVR4 systems won't match this,
	# I just have to hope.  -- rms.
        # Use sysv4.2uw... so that sysv4* matches it.
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
	exit 0 ;;
    i*86:OS/2:*:*)
	# If we were able to find `uname', then EMX Unix compatibility
	# is probably installed.
	echo ${UNAME_MACHINE}-pc-os2-emx
	exit 0 ;;
    i*86:XTS-300:*:STOP)
	echo ${UNAME_MACHINE}-unknown-stop
	exit 0 ;;
    i*86:atheos:*:*)
	echo ${UNAME_MACHINE}-unknown-atheos
	exit 0 ;;
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
	echo i386-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
    i*86:*DOS:*:*)
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
	exit 0 ;;
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
	else
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
	fi
	exit 0 ;;
    i*86:*:5:[78]*)
	case `/bin/uname -X | grep "^Machine"` in
	    *486*)	     UNAME_MACHINE=i486 ;;
	    *Pentium)	     UNAME_MACHINE=i586 ;;
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
	esac
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	exit 0 ;;
    i*86:*:3.2:*)
	if test -f /usr/options/cb.name; then
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
			&& UNAME_MACHINE=i586
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
			&& UNAME_MACHINE=i686
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
			&& UNAME_MACHINE=i686
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
	else
		echo ${UNAME_MACHINE}-pc-sysv32
	fi
	exit 0 ;;
    pc:*:*:*)
	# Left here for compatibility:
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i386.
	echo i386-pc-msdosdjgpp
        exit 0 ;;
    Intel:Mach:3*:*)
	echo i386-pc-mach3
	exit 0 ;;
    paragon:*:*:*)
	echo i860-intel-osf1
	exit 0 ;;
    i860:*:4.*:*) # i860-SVR4
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
	else # Add other i860-SVR4 vendors below as they are discovered.
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
	fi
	exit 0 ;;
    mini*:CTIX:SYS*5:*)
	# "miniframe"
	echo m68010-convergent-sysv
	exit 0 ;;
    mc68k:UNIX:SYSTEM5:3.51m)
	echo m68k-convergent-sysv
	exit 0 ;;
    M680?0:D-NIX:5.3:*)
	echo m68k-diab-dnix
	exit 0 ;;
    M68*:*:R3V[567]*:*)
	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
	OS_REL=''
	test -r /etc/.relid \
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
          && echo i486-ncr-sysv4 && exit 0 ;;
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
	echo m68k-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
    mc68030:UNIX_System_V:4.*:*)
	echo m68k-atari-sysv4
	exit 0 ;;
    TSUNAMI:LynxOS:2.*:*)
	echo sparc-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
    rs6000:LynxOS:2.*:*)
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
    SM[BE]S:UNIX_SV:*:*)
	echo mips-dde-sysv${UNAME_RELEASE}
	exit 0 ;;
    RM*:ReliantUNIX-*:*:*)
	echo mips-sni-sysv4
	exit 0 ;;
    RM*:SINIX-*:*:*)
	echo mips-sni-sysv4
	exit 0 ;;
    *:SINIX-*:*:*)
	if uname -p 2>/dev/null >/dev/null ; then
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		echo ${UNAME_MACHINE}-sni-sysv4
	else
		echo ns32k-sni-sysv
	fi
	exit 0 ;;
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
        echo i586-unisys-sysv4
        exit 0 ;;
    *:UNIX_System_V:4*:FTX*)
	# From Gerald Hewes <hewes@openmarket.com>.
	# How about differentiating between stratus architectures? -djm
	echo hppa1.1-stratus-sysv4
	exit 0 ;;
    *:*:*:FTX*)
	# From seanf@swdc.stratus.com.
	echo i860-stratus-sysv4
	exit 0 ;;
    *:VOS:*:*)
	# From Paul.Green@stratus.com.
	echo hppa1.1-stratus-vos
	exit 0 ;;
    mc68*:A/UX:*:*)
	echo m68k-apple-aux${UNAME_RELEASE}
	exit 0 ;;
    news*:NEWS-OS:6*:*)
	echo mips-sony-newsos6
	exit 0 ;;
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
	if [ -d /usr/nec ]; then
	        echo mips-nec-sysv${UNAME_RELEASE}
	else
	        echo mips-unknown-sysv${UNAME_RELEASE}
	fi
        exit 0 ;;
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
	echo powerpc-be-beos
	exit 0 ;;
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
	echo powerpc-apple-beos
	exit 0 ;;
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
	echo i586-pc-beos
	exit 0 ;;
    SX-4:SUPER-UX:*:*)
	echo sx4-nec-superux${UNAME_RELEASE}
	exit 0 ;;
    SX-5:SUPER-UX:*:*)
	echo sx5-nec-superux${UNAME_RELEASE}
	exit 0 ;;
    SX-6:SUPER-UX:*:*)
	echo sx6-nec-superux${UNAME_RELEASE}
	exit 0 ;;
    Power*:Rhapsody:*:*)
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
	exit 0 ;;
    *:Rhapsody:*:*)
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
	exit 0 ;;
    *:Darwin:*:*)
	case `uname -p` in
	    *86) UNAME_PROCESSOR=i686 ;;
	    powerpc) UNAME_PROCESSOR=powerpc ;;
	esac
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
	exit 0 ;;
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
	UNAME_PROCESSOR=`uname -p`
	if test "$UNAME_PROCESSOR" = "x86"; then
		UNAME_PROCESSOR=i386
		UNAME_MACHINE=pc
	fi
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
	exit 0 ;;
    *:QNX:*:4*)
	echo i386-pc-qnx
	exit 0 ;;
    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk${UNAME_RELEASE}
	exit 0 ;;
    *:NonStop-UX:*:*)
	echo mips-compaq-nonstopux
	exit 0 ;;
    BS2000:POSIX*:*:*)
	echo bs2000-siemens-sysv
	exit 0 ;;
    DS/*:UNIX_System_V:*:*)
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
	exit 0 ;;
    *:Plan9:*:*)
	# "uname -m" is not consistent, so use $cputype instead. 386
	# is converted to i386 for consistency with other x86
	# operating systems.
	if test "$cputype" = "386"; then
	    UNAME_MACHINE=i386
	else
	    UNAME_MACHINE="$cputype"
	fi
	echo ${UNAME_MACHINE}-unknown-plan9
	exit 0 ;;
    *:TOPS-10:*:*)
	echo pdp10-unknown-tops10
	exit 0 ;;
    *:TENEX:*:*)
	echo pdp10-unknown-tenex
	exit 0 ;;
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
	echo pdp10-dec-tops20
	exit 0 ;;
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
	echo pdp10-xkl-tops20
	exit 0 ;;
    *:TOPS-20:*:*)
	echo pdp10-unknown-tops20
	exit 0 ;;
    *:ITS:*:*)
	echo pdp10-unknown-its
	exit 0 ;;
    SEI:*:*:SEIUX)
        echo mips-sei-seiux${UNAME_RELEASE}
	exit 0 ;;
esac

#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2

eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
     I don't know....  */
  printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
  printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
          "4"
#else
	  ""
#endif
         ); exit (0);
#endif
#endif

#if defined (__arm) && defined (__acorn) && defined (__unix)
  printf ("arm-acorn-riscix"); exit (0);
#endif

#if defined (hp300) && !defined (hpux)
  printf ("m68k-hp-bsd\n"); exit (0);
#endif

#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
  int version;
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  if (version < 4)
    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  else
    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  exit (0);
#endif

#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
  printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
  printf ("ns32k-encore-mach\n"); exit (0);
#else
  printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif

#if defined (__386BSD__)
  printf ("i386-pc-bsd\n"); exit (0);
#endif

#if defined (sequent)
#if defined (i386)
  printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
  printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif

#if defined (_SEQUENT_)
    struct utsname un;

    uname(&un);

    if (strncmp(un.version, "V2", 2) == 0) {
	printf ("i386-sequent-ptx2\n"); exit (0);
    }
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
	printf ("i386-sequent-ptx1\n"); exit (0);
    }
    printf ("i386-sequent-ptx\n"); exit (0);

#endif

#if defined (vax)
# if !defined (ultrix)
#  include <sys/param.h>
#  if defined (BSD)
#   if BSD == 43
      printf ("vax-dec-bsd4.3\n"); exit (0);
#   else
#    if BSD == 199006
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
#    else
      printf ("vax-dec-bsd\n"); exit (0);
#    endif
#   endif
#  else
    printf ("vax-dec-bsd\n"); exit (0);
#  endif
# else
    printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif

#if defined (alliant) && defined (i860)
  printf ("i860-alliant-bsd\n"); exit (0);
#endif

  exit (1);
}
EOF

$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0

# Apollos put the system type in the environment.

test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }

# Convex versions that predate uname can use getsysinfo(1)

if [ -x /usr/convex/getsysinfo ]
then
    case `getsysinfo -f cpu_type` in
    c1*)
	echo c1-convex-bsd
	exit 0 ;;
    c2*)
	if getsysinfo -f scalar_acc
	then echo c32-convex-bsd
	else echo c2-convex-bsd
	fi
	exit 0 ;;
    c34*)
	echo c34-convex-bsd
	exit 0 ;;
    c38*)
	echo c38-convex-bsd
	exit 0 ;;
    c4*)
	echo c4-convex-bsd
	exit 0 ;;
    esac
fi

cat >&2 <<EOF
$0: unable to guess system type

This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

    ftp://ftp.gnu.org/pub/gnu/config/

If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = $timestamp

uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`

hostinfo               = `(hostinfo) 2>/dev/null`
/bin/universe          = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch              = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`

UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM  = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF

exit 1

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/config.sub
#! /bin/sh
# Configuration validation subroutine script.
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.

timestamp='2003-07-04'

# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine.  It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# Please send patches to <config-patches@gnu.org>.  Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.

# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support.  The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.

# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.

me=`echo "$0" | sed -e 's,.*/,,'`

usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
       $0 [OPTION] ALIAS

Canonicalize a configuration name.

Operation modes:
  -h, --help         print this help, then exit
  -t, --time-stamp   print date of last modification, then exit
  -v, --version      print version number, then exit

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.sub ($timestamp)

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."

# Parse command line
while test $# -gt 0 ; do
  case $1 in
    --time-stamp | --time* | -t )
       echo "$timestamp" ; exit 0 ;;
    --version | -v )
       echo "$version" ; exit 0 ;;
    --help | --h* | -h )
       echo "$usage"; exit 0 ;;
    -- )     # Stop option processing
       shift; break ;;
    - )	# Use stdin as input.
       break ;;
    -* )
       echo "$me: invalid option $1$help"
       exit 1 ;;

    *local*)
       # First pass through any local machine types.
       echo $1
       exit 0;;

    * )
       break ;;
  esac
done

case $# in
 0) echo "$me: missing argument$help" >&2
    exit 1;;
 1) ;;
 *) echo "$me: too many arguments$help" >&2
    exit 1;;
esac

# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
  nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    os=-$maybe_os
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    ;;
  *)
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    if [ $basic_machine != $1 ]
    then os=`echo $1 | sed 's/.*-/-/'`
    else os=; fi
    ;;
esac

### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work.  We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
	-sun*os*)
		# Prevent following clause from handling this invalid input.
		;;
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
	-apple | -axis)
		os=
		basic_machine=$1
		;;
	-sim | -cisco | -oki | -wec | -winbond)
		os=
		basic_machine=$1
		;;
	-scout)
		;;
	-wrs)
		os=-vxworks
		basic_machine=$1
		;;
	-chorusos*)
		os=-chorusos
		basic_machine=$1
		;;
 	-chorusrdb)
 		os=-chorusrdb
		basic_machine=$1
 		;;
	-hiux*)
		os=-hiuxwe2
		;;
	-sco5)
		os=-sco3.2v5
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco4)
		os=-sco3.2v4
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2.[4-9]*)
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2v[4-9]*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco*)
		os=-sco3.2v2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-udk*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-isc)
		os=-isc2.2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-clix*)
		basic_machine=clipper-intergraph
		;;
	-isc*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-lynx*)
		os=-lynxos
		;;
	-ptx*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
		;;
	-windowsnt*)
		os=`echo $os | sed -e 's/windowsnt/winnt/'`
		;;
	-psos*)
		os=-psos
		;;
	-mint | -mint[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
esac

# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
	# Recognize the basic CPU types without company name.
	# Some are omitted here because they have special meanings below.
	1750a | 580 \
	| a29k \
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
	| c4x | clipper \
	| d10v | d30v | dlx | dsp16xx \
	| fr30 | frv \
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
	| i370 | i860 | i960 | ia64 \
	| ip2k \
	| m32r | m68000 | m68k | m88k | mcore \
	| mips | mipsbe | mipseb | mipsel | mipsle \
	| mips16 \
	| mips64 | mips64el \
	| mips64vr | mips64vrel \
	| mips64orion | mips64orionel \
	| mips64vr4100 | mips64vr4100el \
	| mips64vr4300 | mips64vr4300el \
	| mips64vr5000 | mips64vr5000el \
	| mipsisa32 | mipsisa32el \
	| mipsisa32r2 | mipsisa32r2el \
	| mipsisa64 | mipsisa64el \
	| mipsisa64sb1 | mipsisa64sb1el \
	| mipsisa64sr71k | mipsisa64sr71kel \
	| mipstx39 | mipstx39el \
	| mn10200 | mn10300 \
	| msp430 \
	| ns16k | ns32k \
	| openrisc | or32 \
	| pdp10 | pdp11 | pj | pjl \
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
	| pyramid \
	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
	| sh64 | sh64le \
	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
	| strongarm \
	| tahoe | thumb | tic4x | tic80 | tron \
	| v850 | v850e \
	| we32k \
	| x86 | xscale | xstormy16 | xtensa \
	| z8k)
		basic_machine=$basic_machine-unknown
		;;
	m6811 | m68hc11 | m6812 | m68hc12)
		# Motorola 68HC11/12.
		basic_machine=$basic_machine-unknown
		os=-none
		;;
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
		;;

	# We use `pc' rather than `unknown'
	# because (1) that's what they normally are, and
	# (2) the word "unknown" tends to confuse beginning users.
	i*86 | x86_64)
	  basic_machine=$basic_machine-pc
	  ;;
	# Object if more than one company name word.
	*-*-*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
	# Recognize the basic CPU types with company name.
	580-* \
	| a29k-* \
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
	| avr-* \
	| bs2000-* \
	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
	| clipper-* | cydra-* \
	| d10v-* | d30v-* | dlx-* \
	| elxsi-* \
	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
	| h8300-* | h8500-* \
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
	| i*86-* | i860-* | i960-* | ia64-* \
	| ip2k-* \
	| m32r-* \
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
	| m88110-* | m88k-* | mcore-* \
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
	| mips16-* \
	| mips64-* | mips64el-* \
	| mips64vr-* | mips64vrel-* \
	| mips64orion-* | mips64orionel-* \
	| mips64vr4100-* | mips64vr4100el-* \
	| mips64vr4300-* | mips64vr4300el-* \
	| mips64vr5000-* | mips64vr5000el-* \
	| mipsisa32-* | mipsisa32el-* \
	| mipsisa32r2-* | mipsisa32r2el-* \
	| mipsisa64-* | mipsisa64el-* \
	| mipsisa64sb1-* | mipsisa64sb1el-* \
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
	| mipstx39-* | mipstx39el-* \
	| msp430-* \
	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
	| orion-* \
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
	| pyramid-* \
	| romp-* | rs6000-* \
	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
	| tahoe-* | thumb-* \
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
	| tron-* \
	| v850-* | v850e-* | vax-* \
	| we32k-* \
	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
	| xtensa-* \
	| ymp-* \
	| z8k-*)
		;;
	# Recognize the various machine names and aliases which stand
	# for a CPU type and a company and sometimes even an OS.
	386bsd)
		basic_machine=i386-unknown
		os=-bsd
		;;
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
		basic_machine=m68000-att
		;;
	3b*)
		basic_machine=we32k-att
		;;
	a29khif)
		basic_machine=a29k-amd
		os=-udi
		;;
	adobe68k)
		basic_machine=m68010-adobe
		os=-scout
		;;
	alliant | fx80)
		basic_machine=fx80-alliant
		;;
	altos | altos3068)
		basic_machine=m68k-altos
		;;
	am29k)
		basic_machine=a29k-none
		os=-bsd
		;;
	amd64)
		basic_machine=x86_64-pc
		;;
	amdahl)
		basic_machine=580-amdahl
		os=-sysv
		;;
	amiga | amiga-*)
		basic_machine=m68k-unknown
		;;
	amigaos | amigados)
		basic_machine=m68k-unknown
		os=-amigaos
		;;
	amigaunix | amix)
		basic_machine=m68k-unknown
		os=-sysv4
		;;
	apollo68)
		basic_machine=m68k-apollo
		os=-sysv
		;;
	apollo68bsd)
		basic_machine=m68k-apollo
		os=-bsd
		;;
	aux)
		basic_machine=m68k-apple
		os=-aux
		;;
	balance)
		basic_machine=ns32k-sequent
		os=-dynix
		;;
	c90)
		basic_machine=c90-cray
		os=-unicos
		;;
	convex-c1)
		basic_machine=c1-convex
		os=-bsd
		;;
	convex-c2)
		basic_machine=c2-convex
		os=-bsd
		;;
	convex-c32)
		basic_machine=c32-convex
		os=-bsd
		;;
	convex-c34)
		basic_machine=c34-convex
		os=-bsd
		;;
	convex-c38)
		basic_machine=c38-convex
		os=-bsd
		;;
	cray | j90)
		basic_machine=j90-cray
		os=-unicos
		;;
	crds | unos)
		basic_machine=m68k-crds
		;;
	cris | cris-* | etrax*)
		basic_machine=cris-axis
		;;
	da30 | da30-*)
		basic_machine=m68k-da30
		;;
	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
		basic_machine=mips-dec
		;;
	decsystem10* | dec10*)
		basic_machine=pdp10-dec
		os=-tops10
		;;
	decsystem20* | dec20*)
		basic_machine=pdp10-dec
		os=-tops20
		;;
	delta | 3300 | motorola-3300 | motorola-delta \
	      | 3300-motorola | delta-motorola)
		basic_machine=m68k-motorola
		;;
	delta88)
		basic_machine=m88k-motorola
		os=-sysv3
		;;
	dpx20 | dpx20-*)
		basic_machine=rs6000-bull
		os=-bosx
		;;
	dpx2* | dpx2*-bull)
		basic_machine=m68k-bull
		os=-sysv3
		;;
	ebmon29k)
		basic_machine=a29k-amd
		os=-ebmon
		;;
	elxsi)
		basic_machine=elxsi-elxsi
		os=-bsd
		;;
	encore | umax | mmax)
		basic_machine=ns32k-encore
		;;
	es1800 | OSE68k | ose68k | ose | OSE)
		basic_machine=m68k-ericsson
		os=-ose
		;;
	fx2800)
		basic_machine=i860-alliant
		;;
	genix)
		basic_machine=ns32k-ns
		;;
	gmicro)
		basic_machine=tron-gmicro
		os=-sysv
		;;
	go32)
		basic_machine=i386-pc
		os=-go32
		;;
	h3050r* | hiux*)
		basic_machine=hppa1.1-hitachi
		os=-hiuxwe2
		;;
	h8300hms)
		basic_machine=h8300-hitachi
		os=-hms
		;;
	h8300xray)
		basic_machine=h8300-hitachi
		os=-xray
		;;
	h8500hms)
		basic_machine=h8500-hitachi
		os=-hms
		;;
	harris)
		basic_machine=m88k-harris
		os=-sysv3
		;;
	hp300-*)
		basic_machine=m68k-hp
		;;
	hp300bsd)
		basic_machine=m68k-hp
		os=-bsd
		;;
	hp300hpux)
		basic_machine=m68k-hp
		os=-hpux
		;;
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hp9k2[0-9][0-9] | hp9k31[0-9])
		basic_machine=m68000-hp
		;;
	hp9k3[2-9][0-9])
		basic_machine=m68k-hp
		;;
	hp9k6[0-9][0-9] | hp6[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hp9k7[0-79][0-9] | hp7[0-79][0-9])
		basic_machine=hppa1.1-hp
		;;
	hp9k78[0-9] | hp78[0-9])
		# FIXME: really hppa2.0-hp
		basic_machine=hppa1.1-hp
		;;
	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
		# FIXME: really hppa2.0-hp
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][13679] | hp8[0-9][13679])
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hppa-next)
		os=-nextstep3
		;;
	hppaosf)
		basic_machine=hppa1.1-hp
		os=-osf
		;;
	hppro)
		basic_machine=hppa1.1-hp
		os=-proelf
		;;
	i370-ibm* | ibm*)
		basic_machine=i370-ibm
		;;
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
	i*86v32)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv32
		;;
	i*86v4*)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv4
		;;
	i*86v)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv
		;;
	i*86sol2)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-solaris2
		;;
	i386mach)
		basic_machine=i386-mach
		os=-mach
		;;
	i386-vsta | vsta)
		basic_machine=i386-unknown
		os=-vsta
		;;
	iris | iris4d)
		basic_machine=mips-sgi
		case $os in
		    -irix*)
			;;
		    *)
			os=-irix4
			;;
		esac
		;;
	isi68 | isi)
		basic_machine=m68k-isi
		os=-sysv
		;;
	m88k-omron*)
		basic_machine=m88k-omron
		;;
	magnum | m3230)
		basic_machine=mips-mips
		os=-sysv
		;;
	merlin)
		basic_machine=ns32k-utek
		os=-sysv
		;;
	mingw32)
		basic_machine=i386-pc
		os=-mingw32
		;;
	miniframe)
		basic_machine=m68000-convergent
		;;
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
	mips3*-*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
		;;
	mips3*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
		;;
	mmix*)
		basic_machine=mmix-knuth
		os=-mmixware
		;;
	monitor)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	morphos)
		basic_machine=powerpc-unknown
		os=-morphos
		;;
	msdos)
		basic_machine=i386-pc
		os=-msdos
		;;
	mvs)
		basic_machine=i370-ibm
		os=-mvs
		;;
	ncr3000)
		basic_machine=i486-ncr
		os=-sysv4
		;;
	netbsd386)
		basic_machine=i386-unknown
		os=-netbsd
		;;
	netwinder)
		basic_machine=armv4l-rebel
		os=-linux
		;;
	news | news700 | news800 | news900)
		basic_machine=m68k-sony
		os=-newsos
		;;
	news1000)
		basic_machine=m68030-sony
		os=-newsos
		;;
	news-3600 | risc-news)
		basic_machine=mips-sony
		os=-newsos
		;;
	necv70)
		basic_machine=v70-nec
		os=-sysv
		;;
	next | m*-next )
		basic_machine=m68k-next
		case $os in
		    -nextstep* )
			;;
		    -ns2*)
		      os=-nextstep2
			;;
		    *)
		      os=-nextstep3
			;;
		esac
		;;
	nh3000)
		basic_machine=m68k-harris
		os=-cxux
		;;
	nh[45]000)
		basic_machine=m88k-harris
		os=-cxux
		;;
	nindy960)
		basic_machine=i960-intel
		os=-nindy
		;;
	mon960)
		basic_machine=i960-intel
		os=-mon960
		;;
	nonstopux)
		basic_machine=mips-compaq
		os=-nonstopux
		;;
	np1)
		basic_machine=np1-gould
		;;
	nv1)
		basic_machine=nv1-cray
		os=-unicosmp
		;;
	nsr-tandem)
		basic_machine=nsr-tandem
		;;
	op50n-* | op60c-*)
		basic_machine=hppa1.1-oki
		os=-proelf
		;;
	or32 | or32-*)
		basic_machine=or32-unknown
		os=-coff
		;;
	OSE68000 | ose68000)
		basic_machine=m68000-ericsson
		os=-ose
		;;
	os68k)
		basic_machine=m68k-none
		os=-os68k
		;;
	pa-hitachi)
		basic_machine=hppa1.1-hitachi
		os=-hiuxwe2
		;;
	paragon)
		basic_machine=i860-intel
		os=-osf
		;;
	pbd)
		basic_machine=sparc-tti
		;;
	pbb)
		basic_machine=m68k-tti
		;;
	pc532 | pc532-*)
		basic_machine=ns32k-pc532
		;;
	pentium | p5 | k5 | k6 | nexgen | viac3)
		basic_machine=i586-pc
		;;
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
		basic_machine=i686-pc
		;;
	pentiumii | pentium2 | pentiumiii | pentium3)
		basic_machine=i686-pc
		;;
	pentium4)
		basic_machine=i786-pc
		;;
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentium4-*)
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pn)
		basic_machine=pn-gould
		;;
	power)	basic_machine=power-ibm
		;;
	ppc)	basic_machine=powerpc-unknown
		;;
	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppcle | powerpclittle | ppc-le | powerpc-little)
		basic_machine=powerpcle-unknown
		;;
	ppcle-* | powerpclittle-*)
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64)	basic_machine=powerpc64-unknown
		;;
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
		basic_machine=powerpc64le-unknown
		;;
	ppc64le-* | powerpc64little-*)
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ps2)
		basic_machine=i386-ibm
		;;
	pw32)
		basic_machine=i586-unknown
		os=-pw32
		;;
	rom68k)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	rm[46]00)
		basic_machine=mips-siemens
		;;
	rtpc | rtpc-*)
		basic_machine=romp-ibm
		;;
	s390 | s390-*)
		basic_machine=s390-ibm
		;;
	s390x | s390x-*)
		basic_machine=s390x-ibm
		;;
	sa29200)
		basic_machine=a29k-amd
		os=-udi
		;;
	sb1)
		basic_machine=mipsisa64sb1-unknown
		;;
	sb1el)
		basic_machine=mipsisa64sb1el-unknown
		;;
	sei)
		basic_machine=mips-sei
		os=-seiux
		;;
	sequent)
		basic_machine=i386-sequent
		;;
	sh)
		basic_machine=sh-hitachi
		os=-hms
		;;
	sh64)
		basic_machine=sh64-unknown
		;;
	sparclite-wrs | simso-wrs)
		basic_machine=sparclite-wrs
		os=-vxworks
		;;
	sps7)
		basic_machine=m68k-bull
		os=-sysv2
		;;
	spur)
		basic_machine=spur-unknown
		;;
	st2000)
		basic_machine=m68k-tandem
		;;
	stratus)
		basic_machine=i860-stratus
		os=-sysv4
		;;
	sun2)
		basic_machine=m68000-sun
		;;
	sun2os3)
		basic_machine=m68000-sun
		os=-sunos3
		;;
	sun2os4)
		basic_machine=m68000-sun
		os=-sunos4
		;;
	sun3os3)
		basic_machine=m68k-sun
		os=-sunos3
		;;
	sun3os4)
		basic_machine=m68k-sun
		os=-sunos4
		;;
	sun4os3)
		basic_machine=sparc-sun
		os=-sunos3
		;;
	sun4os4)
		basic_machine=sparc-sun
		os=-sunos4
		;;
	sun4sol2)
		basic_machine=sparc-sun
		os=-solaris2
		;;
	sun3 | sun3-*)
		basic_machine=m68k-sun
		;;
	sun4)
		basic_machine=sparc-sun
		;;
	sun386 | sun386i | roadrunner)
		basic_machine=i386-sun
		;;
	sv1)
		basic_machine=sv1-cray
		os=-unicos
		;;
	symmetry)
		basic_machine=i386-sequent
		os=-dynix
		;;
	t3e)
		basic_machine=alphaev5-cray
		os=-unicos
		;;
	t90)
		basic_machine=t90-cray
		os=-unicos
		;;
	tic54x | c54x*)
		basic_machine=tic54x-unknown
		os=-coff
		;;
	tic55x | c55x*)
		basic_machine=tic55x-unknown
		os=-coff
		;;
	tic6x | c6x*)
		basic_machine=tic6x-unknown
		os=-coff
		;;
	tx39)
		basic_machine=mipstx39-unknown
		;;
	tx39el)
		basic_machine=mipstx39el-unknown
		;;
	toad1)
		basic_machine=pdp10-xkl
		os=-tops20
		;;
	tower | tower-32)
		basic_machine=m68k-ncr
		;;
	udi29k)
		basic_machine=a29k-amd
		os=-udi
		;;
	ultra3)
		basic_machine=a29k-nyu
		os=-sym1
		;;
	v810 | necv810)
		basic_machine=v810-nec
		os=-none
		;;
	vaxv)
		basic_machine=vax-dec
		os=-sysv
		;;
	vms)
		basic_machine=vax-dec
		os=-vms
		;;
	vpp*|vx|vx-*)
		basic_machine=f301-fujitsu
		;;
	vxworks960)
		basic_machine=i960-wrs
		os=-vxworks
		;;
	vxworks68)
		basic_machine=m68k-wrs
		os=-vxworks
		;;
	vxworks29k)
		basic_machine=a29k-wrs
		os=-vxworks
		;;
	w65*)
		basic_machine=w65-wdc
		os=-none
		;;
	w89k-*)
		basic_machine=hppa1.1-winbond
		os=-proelf
		;;
	xps | xps100)
		basic_machine=xps100-honeywell
		;;
	ymp)
		basic_machine=ymp-cray
		os=-unicos
		;;
	z8k-*-coff)
		basic_machine=z8k-unknown
		os=-sim
		;;
	none)
		basic_machine=none-none
		os=-none
		;;

# Here we handle the default manufacturer of certain CPU types.  It is in
# some cases the only manufacturer, in others, it is the most popular.
	w89k)
		basic_machine=hppa1.1-winbond
		;;
	op50n)
		basic_machine=hppa1.1-oki
		;;
	op60c)
		basic_machine=hppa1.1-oki
		;;
	romp)
		basic_machine=romp-ibm
		;;
	rs6000)
		basic_machine=rs6000-ibm
		;;
	vax)
		basic_machine=vax-dec
		;;
	pdp10)
		# there are many clones, so DEC is not a safe bet
		basic_machine=pdp10-unknown
		;;
	pdp11)
		basic_machine=pdp11-dec
		;;
	we32k)
		basic_machine=we32k-att
		;;
	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
		basic_machine=sh-unknown
		;;
	sh64)
		basic_machine=sh64-unknown
		;;
	sparc | sparcv9 | sparcv9b)
		basic_machine=sparc-sun
		;;
	cydra)
		basic_machine=cydra-cydrome
		;;
	orion)
		basic_machine=orion-highlevel
		;;
	orion105)
		basic_machine=clipper-highlevel
		;;
	mac | mpw | mac-mpw)
		basic_machine=m68k-apple
		;;
	pmac | pmac-mpw)
		basic_machine=powerpc-apple
		;;
	*-unknown)
		# Make sure to match an already-canonicalized machine name.
		;;
	*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
esac

# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
	*-digital*)
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
		;;
	*-commodore*)
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
		;;
	*)
		;;
esac

# Decode manufacturer-specific aliases for certain operating systems.

if [ x"$os" != x"" ]
then
case $os in
        # First match some system type aliases
        # that might get confused with valid system types.
	# -solaris* is a basic system type, with this one exception.
	-solaris1 | -solaris1.*)
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
		;;
	-solaris)
		os=-solaris2
		;;
	-svr4*)
		os=-sysv4
		;;
	-unixware*)
		os=-sysv4.2uw
		;;
	-gnu/linux*)
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
		;;
	# First accept the basic system types.
	# The portable systems comes first.
	# Each alternative MUST END IN A *, to match a version number.
	# -sysv* is not here because it comes later, after sysvr4.
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
	      | -aos* \
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
	      | -chorusos* | -chorusrdb* \
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
	# Remember, each alternative MUST END IN *, to match a version number.
		;;
	-qnx*)
		case $basic_machine in
		    x86-* | i*86-*)
			;;
		    *)
			os=-nto$os
			;;
		esac
		;;
	-nto-qnx*)
		;;
	-nto*)
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
		;;
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
		;;
	-mac*)
		os=`echo $os | sed -e 's|mac|macos|'`
		;;
	-linux*)
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
		;;
	-sunos5*)
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
		;;
	-sunos6*)
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
		;;
	-opened*)
		os=-openedition
		;;
	-wince*)
		os=-wince
		;;
	-osfrose*)
		os=-osfrose
		;;
	-osf*)
		os=-osf
		;;
	-utek*)
		os=-bsd
		;;
	-dynix*)
		os=-bsd
		;;
	-acis*)
		os=-aos
		;;
	-atheos*)
		os=-atheos
		;;
	-386bsd)
		os=-bsd
		;;
	-ctix* | -uts*)
		os=-sysv
		;;
	-nova*)
		os=-rtmk-nova
		;;
	-ns2 )
		os=-nextstep2
		;;
	-nsk*)
		os=-nsk
		;;
	# Preserve the version number of sinix5.
	-sinix5.*)
		os=`echo $os | sed -e 's|sinix|sysv|'`
		;;
	-sinix*)
		os=-sysv4
		;;
	-triton*)
		os=-sysv3
		;;
	-oss*)
		os=-sysv3
		;;
	-svr4)
		os=-sysv4
		;;
	-svr3)
		os=-sysv3
		;;
	-sysvr4)
		os=-sysv4
		;;
	# This must come after -sysvr4.
	-sysv*)
		;;
	-ose*)
		os=-ose
		;;
	-es1800*)
		os=-ose
		;;
	-xenix)
		os=-xenix
		;;
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
		os=-mint
		;;
	-aros*)
		os=-aros
		;;
	-kaos*)
		os=-kaos
		;;
	-none)
		;;
	*)
		# Get rid of the `-' at the beginning of $os.
		os=`echo $os | sed 's/[^-]*-//'`
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
		exit 1
		;;
esac
else

# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.

# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system.  Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.

case $basic_machine in
	*-acorn)
		os=-riscix1.2
		;;
	arm*-rebel)
		os=-linux
		;;
	arm*-semi)
		os=-aout
		;;
    c4x-* | tic4x-*)
        os=-coff
        ;;
	# This must come before the *-dec entry.
	pdp10-*)
		os=-tops20
		;;
	pdp11-*)
		os=-none
		;;
	*-dec | vax-*)
		os=-ultrix4.2
		;;
	m68*-apollo)
		os=-domain
		;;
	i386-sun)
		os=-sunos4.0.2
		;;
	m68000-sun)
		os=-sunos3
		# This also exists in the configure program, but was not the
		# default.
		# os=-sunos4
		;;
	m68*-cisco)
		os=-aout
		;;
	mips*-cisco)
		os=-elf
		;;
	mips*-*)
		os=-elf
		;;
	or32-*)
		os=-coff
		;;
	*-tti)	# must be before sparc entry or we get the wrong os.
		os=-sysv3
		;;
	sparc-* | *-sun)
		os=-sunos4.1.1
		;;
	*-be)
		os=-beos
		;;
	*-ibm)
		os=-aix
		;;
	*-wec)
		os=-proelf
		;;
	*-winbond)
		os=-proelf
		;;
	*-oki)
		os=-proelf
		;;
	*-hp)
		os=-hpux
		;;
	*-hitachi)
		os=-hiux
		;;
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
		os=-sysv
		;;
	*-cbm)
		os=-amigaos
		;;
	*-dg)
		os=-dgux
		;;
	*-dolphin)
		os=-sysv3
		;;
	m68k-ccur)
		os=-rtu
		;;
	m88k-omron*)
		os=-luna
		;;
	*-next )
		os=-nextstep
		;;
	*-sequent)
		os=-ptx
		;;
	*-crds)
		os=-unos
		;;
	*-ns)
		os=-genix
		;;
	i370-*)
		os=-mvs
		;;
	*-next)
		os=-nextstep3
		;;
	*-gould)
		os=-sysv
		;;
	*-highlevel)
		os=-bsd
		;;
	*-encore)
		os=-bsd
		;;
	*-sgi)
		os=-irix
		;;
	*-siemens)
		os=-sysv4
		;;
	*-masscomp)
		os=-rtu
		;;
	f30[01]-fujitsu | f700-fujitsu)
		os=-uxpv
		;;
	*-rom68k)
		os=-coff
		;;
	*-*bug)
		os=-coff
		;;
	*-apple)
		os=-macos
		;;
	*-atari*)
		os=-mint
		;;
	*)
		os=-none
		;;
esac
fi

# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer.  We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
	*-unknown)
		case $os in
			-riscix*)
				vendor=acorn
				;;
			-sunos*)
				vendor=sun
				;;
			-aix*)
				vendor=ibm
				;;
			-beos*)
				vendor=be
				;;
			-hpux*)
				vendor=hp
				;;
			-mpeix*)
				vendor=hp
				;;
			-hiux*)
				vendor=hitachi
				;;
			-unos*)
				vendor=crds
				;;
			-dgux*)
				vendor=dg
				;;
			-luna*)
				vendor=omron
				;;
			-genix*)
				vendor=ns
				;;
			-mvs* | -opened*)
				vendor=ibm
				;;
			-ptx*)
				vendor=sequent
				;;
			-vxsim* | -vxworks* | -windiss*)
				vendor=wrs
				;;
			-aux*)
				vendor=apple
				;;
			-hms*)
				vendor=hitachi
				;;
			-mpw* | -macos*)
				vendor=apple
				;;
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
				vendor=atari
				;;
			-vos*)
				vendor=stratus
				;;
		esac
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
		;;
esac

echo $basic_machine$os
exit 0

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/depcomp
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects

scriptversion=2007-03-29.01

# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.

case $1 in
  '')
     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
     exit 1;
     ;;
  -h | --h*)
    cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]

Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.

Environment variables:
  depmode     Dependency tracking mode.
  source      Source file read by `PROGRAMS ARGS'.
  object      Object file output by `PROGRAMS ARGS'.
  DEPDIR      directory where to store dependencies.
  depfile     Dependency file to output.
  tmpdepfile  Temporary file to use when outputing dependencies.
  libtool     Whether libtool is used (yes/no).

Report bugs to <bug-automake@gnu.org>.
EOF
    exit $?
    ;;
  -v | --v*)
    echo "depcomp $scriptversion"
    exit $?
    ;;
esac

if test -z "$depmode" || test -z "$source" || test -z "$object"; then
  echo "depcomp: Variables source, object and depmode must be set" 1>&2
  exit 1
fi

# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}

rm -f "$tmpdepfile"

# Some modes work just like other modes, but use different flags.  We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write.  Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
  # HP compiler uses -M and no extra arg.
  gccflag=-M
  depmode=gcc
fi

if test "$depmode" = dashXmstdout; then
   # This is just like dashmstdout with a different argument.
   dashmflag=-xM
   depmode=dashmstdout
fi

case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff.  Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am.  Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
  for arg
  do
    case $arg in
    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
    *)  set fnord "$@" "$arg" ;;
    esac
    shift # fnord
    shift # $arg
  done
  "$@"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  mv "$tmpdepfile" "$depfile"
  ;;

gcc)
## There are various ways to get dependency output from gcc.  Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
##   up in a subdir.  Having to rename by hand is ugly.
##   (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
##   -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
##   than renaming).
  if test -z "$gccflag"; then
    gccflag=-MD,
  fi
  "$@" -Wp,"$gccflag$tmpdepfile"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
  sed -e 's/^[^:]*: / /' \
      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header).  We avoid this by adding
## dummy dependencies for each header file.  Too bad gcc doesn't do
## this for us directly.
  tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'.  On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

hp)
  # This case exists only to let depend.m4 do its work.  It works by
  # looking at the text of this script.  This case will never be run,
  # since it is checked for above.
  exit 1
  ;;

sgi)
  if test "$libtool" = yes; then
    "$@" "-Wp,-MDupdate,$tmpdepfile"
  else
    "$@" -MDupdate "$tmpdepfile"
  fi
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"

  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
    echo "$object : \\" > "$depfile"

    # Clip off the initial element (the dependent).  Don't try to be
    # clever and replace this with sed code, as IRIX sed won't handle
    # lines with more than a fixed number of characters (4096 in
    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
    # the IRIX cc adds comments like `#:fec' to the end of the
    # dependency line.
    tr ' ' '
' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
    tr '
' ' ' >> $depfile
    echo >> $depfile

    # The second pass generates a dummy entry for each header file.
    tr ' ' '
' < "$tmpdepfile" \
   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
   >> $depfile
  else
    # The sourcefile does not contain any dependencies, so just
    # store a dummy comment line, to avoid errors with the Makefile
    # "include basename.Plo" scheme.
    echo "#dummy" > "$depfile"
  fi
  rm -f "$tmpdepfile"
  ;;

aix)
  # The C for AIX Compiler uses -M and outputs the dependencies
  # in a .u file.  In older versions, this file always lives in the
  # current directory.  Also, the AIX compiler puts `$object:' at the
  # start of each line; $object doesn't have directory information.
  # Version 6 uses the directory in both cases.
  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  test "x$dir" = "x$object" && dir=
  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  if test "$libtool" = yes; then
    tmpdepfile1=$dir$base.u
    tmpdepfile2=$base.u
    tmpdepfile3=$dir.libs/$base.u
    "$@" -Wc,-M
  else
    tmpdepfile1=$dir$base.u
    tmpdepfile2=$dir$base.u
    tmpdepfile3=$dir$base.u
    "$@" -M
  fi
  stat=$?

  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
    exit $stat
  fi

  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
  do
    test -f "$tmpdepfile" && break
  done
  if test -f "$tmpdepfile"; then
    # Each line is of the form `foo.o: dependent.h'.
    # Do two passes, one to just change these to
    # `$object: dependent.h' and one to simply `dependent.h:'.
    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
    # That's a tab and a space in the [].
    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
  else
    # The sourcefile does not contain any dependencies, so just
    # store a dummy comment line, to avoid errors with the Makefile
    # "include basename.Plo" scheme.
    echo "#dummy" > "$depfile"
  fi
  rm -f "$tmpdepfile"
  ;;

icc)
  # Intel's C compiler understands `-MD -MF file'.  However on
  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
  # ICC 7.0 will fill foo.d with something like
  #    foo.o: sub/foo.c
  #    foo.o: sub/foo.h
  # which is wrong.  We want:
  #    sub/foo.o: sub/foo.c
  #    sub/foo.o: sub/foo.h
  #    sub/foo.c:
  #    sub/foo.h:
  # ICC 7.1 will output
  #    foo.o: sub/foo.c sub/foo.h
  # and will wrap long lines using \ :
  #    foo.o: sub/foo.c ... \
  #     sub/foo.h ... \
  #     ...

  "$@" -MD -MF "$tmpdepfile"
  stat=$?
  if test $stat -eq 0; then :
  else
    rm -f "$tmpdepfile"
    exit $stat
  fi
  rm -f "$depfile"
  # Each line is of the form `foo.o: dependent.h',
  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
  # Do two passes, one to just change these to
  # `$object: dependent.h' and one to simply `dependent.h:'.
  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
  # Some versions of the HPUX 10.20 sed can't process this invocation
  # correctly.  Breaking it into two sed invocations is a workaround.
  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
    sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

hp2)
  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
  # compilers, which have integrated preprocessors.  The correct option
  # to use with these is +Maked; it writes dependencies to a file named
  # 'foo.d', which lands next to the object file, wherever that
  # happens to be.
  # Much of this is similar to the tru64 case; see comments there.
  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
  test "x$dir" = "x$object" && dir=
  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
  if test "$libtool" = yes; then
    tmpdepfile1=$dir$base.d
    tmpdepfile2=$dir.libs/$base.d
    "$@" -Wc,+Maked
  else
    tmpdepfile1=$dir$base.d
    tmpdepfile2=$dir$base.d
    "$@" +Maked
  fi
  stat=$?
  if test $stat -eq 0; then :
  else
     rm -f "$tmpdepfile1" "$tmpdepfile2"
     exit $stat
  fi

  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
  do
    test -f "$tmpdepfile" && break
  done
  if test -f "$tmpdepfile"; then
    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
    # Add `dependent.h:' lines.
    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
  else
    echo "#dummy" > "$depfile"
  fi
  rm -f "$tmpdepfile" "$tmpdepfile2"
  ;;

tru64)
   # The Tru64 compiler uses -MD to generate dependencies as a side
   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
   # dependencies in `foo.d' instead, so we check for that too.
   # Subdirectories are respected.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
   test "x$dir" = "x$object" && dir=
   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`

   if test "$libtool" = yes; then
      # With Tru64 cc, shared objects can also be used to make a
      # static library.  This mechanism is used in libtool 1.4 series to
      # handle both shared and static libraries in a single compilation.
      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
      #
      # With libtool 1.5 this exception was removed, and libtool now
      # generates 2 separate objects for the 2 libraries.  These two
      # compilations output dependencies in $dir.libs/$base.o.d and
      # in $dir$base.o.d.  We have to check for both files, because
      # one of the two compilations can be disabled.  We should prefer
      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
      # automatically cleaned when .libs/ is deleted, while ignoring
      # the former would cause a distcleancheck panic.
      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
      tmpdepfile2=$dir$base.o.d          # libtool 1.5
      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
      "$@" -Wc,-MD
   else
      tmpdepfile1=$dir$base.o.d
      tmpdepfile2=$dir$base.d
      tmpdepfile3=$dir$base.d
      tmpdepfile4=$dir$base.d
      "$@" -MD
   fi

   stat=$?
   if test $stat -eq 0; then :
   else
      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
      exit $stat
   fi

   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
   do
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
      # That's a tab and a space in the [].
      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
      echo "#dummy" > "$depfile"
   fi
   rm -f "$tmpdepfile"
   ;;

#nosideeffect)
  # This comment above is used by automake to tell side-effect
  # dependency tracking mechanisms from slower ones.

dashmstdout)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout, regardless of -o.
  "$@" || exit $?

  # Remove the call to Libtool.
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi

  # Remove `-o $object'.
  IFS=" "
  for arg
  do
    case $arg in
    -o)
      shift
      ;;
    $object)
      shift
      ;;
    *)
      set fnord "$@" "$arg"
      shift # fnord
      shift # $arg
      ;;
    esac
  done

  test -z "$dashmflag" && dashmflag=-M
  # Require at least two characters before searching for `:'
  # in the target name.  This is to cope with DOS-style filenames:
  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
  "$@" $dashmflag |
    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
  rm -f "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

dashXmstdout)
  # This case only exists to satisfy depend.m4.  It is never actually
  # run, as this mode is specially recognized in the preamble.
  exit 1
  ;;

makedepend)
  "$@" || exit $?
  # Remove any Libtool call
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi
  # X makedepend
  shift
  cleared=no
  for arg in "$@"; do
    case $cleared in
    no)
      set ""; shift
      cleared=yes ;;
    esac
    case "$arg" in
    -D*|-I*)
      set fnord "$@" "$arg"; shift ;;
    # Strip any option that makedepend may not understand.  Remove
    # the object too, otherwise makedepend will parse it as a source file.
    -*|$object)
      ;;
    *)
      set fnord "$@" "$arg"; shift ;;
    esac
  done
  obj_suffix="`echo $object | sed 's/^.*\././'`"
  touch "$tmpdepfile"
  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  rm -f "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly.  Breaking it into two sed invocations is a workaround.
    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile" "$tmpdepfile".bak
  ;;

cpp)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout.
  "$@" || exit $?

  # Remove the call to Libtool.
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
      shift
    done
    shift
  fi

  # Remove `-o $object'.
  IFS=" "
  for arg
  do
    case $arg in
    -o)
      shift
      ;;
    $object)
      shift
      ;;
    *)
      set fnord "$@" "$arg"
      shift # fnord
      shift # $arg
      ;;
    esac
  done

  "$@" -E |
    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
    sed '$ s: \\$::' > "$tmpdepfile"
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  cat < "$tmpdepfile" >> "$depfile"
  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

msvisualcpp)
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout, regardless of -o,
  # because we must use -o when running libtool.
  "$@" || exit $?
  IFS=" "
  for arg
  do
    case "$arg" in
    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
	set fnord "$@"
	shift
	shift
	;;
    *)
	set fnord "$@" "$arg"
	shift
	shift
	;;
    esac
  done
  "$@" -E |
  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
  echo "	" >> "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  rm -f "$tmpdepfile"
  ;;

none)
  exec "$@"
  ;;

*)
  echo "Unknown depmode $depmode" 1>&2
  exit 1
  ;;
esac

exit 0

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/install-sh
#!/bin/sh
# install - install a program, script, or datafile

scriptversion=2006-12-25.00

# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.

nl='
'
IFS=" ""	$nl"

# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
  doit_exec=exec
else
  doit_exec=$doit
fi

# Put in absolute file names if you don't have them in your path;
# or use environment vars.

chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}

posix_glob='?'
initialize_posix_glob='
  test "$posix_glob" != "?" || {
    if (set -f) 2>/dev/null; then
      posix_glob=
    else
      posix_glob=:
    fi
  }
'

posix_mkdir=

# Desired mode of installed file.
mode=0755

chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=

src=
dst=
dir_arg=
dst_arg=

copy_on_change=false
no_target_directory=

usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
   or: $0 [OPTION]... SRCFILES... DIRECTORY
   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
   or: $0 [OPTION]... -d DIRECTORIES...

In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.

Options:
     --help     display this help and exit.
     --version  display version info and exit.

  -c            (ignored)
  -C            install only if different (preserve the last data modification time)
  -d            create directories instead of installing files.
  -g GROUP      $chgrpprog installed files to GROUP.
  -m MODE       $chmodprog installed files to MODE.
  -o USER       $chownprog installed files to USER.
  -s            $stripprog installed files.
  -t DIRECTORY  install into DIRECTORY.
  -T            report an error if DSTFILE is a directory.

Environment variables override the default commands:
  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
  RMPROG STRIPPROG
"

while test $# -ne 0; do
  case $1 in
    -c) ;;

    -C) copy_on_change=true;;

    -d) dir_arg=true;;

    -g) chgrpcmd="$chgrpprog $2"
	shift;;

    --help) echo "$usage"; exit $?;;

    -m) mode=$2
	case $mode in
	  *' '* | *'	'* | *'
'*	  | *'*'* | *'?'* | *'['*)
	    echo "$0: invalid mode: $mode" >&2
	    exit 1;;
	esac
	shift;;

    -o) chowncmd="$chownprog $2"
	shift;;

    -s) stripcmd=$stripprog;;

    -t) dst_arg=$2
	shift;;

    -T) no_target_directory=true;;

    --version) echo "$0 $scriptversion"; exit $?;;

    --)	shift
	break;;

    -*)	echo "$0: invalid option: $1" >&2
	exit 1;;

    *)  break;;
  esac
  shift
done

if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
  # When -d is used, all remaining arguments are directories to create.
  # When -t is used, the destination is already specified.
  # Otherwise, the last argument is the destination.  Remove it from $@.
  for arg
  do
    if test -n "$dst_arg"; then
      # $@ is not empty: it contains at least $arg.
      set fnord "$@" "$dst_arg"
      shift # fnord
    fi
    shift # arg
    dst_arg=$arg
  done
fi

if test $# -eq 0; then
  if test -z "$dir_arg"; then
    echo "$0: no input file specified." >&2
    exit 1
  fi
  # It's OK to call `install-sh -d' without argument.
  # This can happen when creating conditional directories.
  exit 0
fi

if test -z "$dir_arg"; then
  trap '(exit $?); exit' 1 2 13 15

  # Set umask so as not to create temps with too-generous modes.
  # However, 'strip' requires both read and write access to temps.
  case $mode in
    # Optimize common cases.
    *644) cp_umask=133;;
    *755) cp_umask=22;;

    *[0-7])
      if test -z "$stripcmd"; then
	u_plus_rw=
      else
	u_plus_rw='% 200'
      fi
      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
    *)
      if test -z "$stripcmd"; then
	u_plus_rw=
      else
	u_plus_rw=,u+rw
      fi
      cp_umask=$mode$u_plus_rw;;
  esac
fi

for src
do
  # Protect names starting with `-'.
  case $src in
    -*) src=./$src;;
  esac

  if test -n "$dir_arg"; then
    dst=$src
    dstdir=$dst
    test -d "$dstdir"
    dstdir_status=$?
  else

    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
    # might cause directories to be created, which would be especially bad
    # if $src (and thus $dsttmp) contains '*'.
    if test ! -f "$src" && test ! -d "$src"; then
      echo "$0: $src does not exist." >&2
      exit 1
    fi

    if test -z "$dst_arg"; then
      echo "$0: no destination specified." >&2
      exit 1
    fi

    dst=$dst_arg
    # Protect names starting with `-'.
    case $dst in
      -*) dst=./$dst;;
    esac

    # If destination is a directory, append the input filename; won't work
    # if double slashes aren't ignored.
    if test -d "$dst"; then
      if test -n "$no_target_directory"; then
	echo "$0: $dst_arg: Is a directory" >&2
	exit 1
      fi
      dstdir=$dst
      dst=$dstdir/`basename "$src"`
      dstdir_status=0
    else
      # Prefer dirname, but fall back on a substitute if dirname fails.
      dstdir=`
	(dirname "$dst") 2>/dev/null ||
	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	     X"$dst" : 'X\(//\)[^/]' \| \
	     X"$dst" : 'X\(//\)$' \| \
	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
	echo X"$dst" |
	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
		   s//\1/
		   q
		 }
		 /^X\(\/\/\)[^/].*/{
		   s//\1/
		   q
		 }
		 /^X\(\/\/\)$/{
		   s//\1/
		   q
		 }
		 /^X\(\/\).*/{
		   s//\1/
		   q
		 }
		 s/.*/./; q'
      `

      test -d "$dstdir"
      dstdir_status=$?
    fi
  fi

  obsolete_mkdir_used=false

  if test $dstdir_status != 0; then
    case $posix_mkdir in
      '')
	# Create intermediate dirs using mode 755 as modified by the umask.
	# This is like FreeBSD 'install' as of 1997-10-28.
	umask=`umask`
	case $stripcmd.$umask in
	  # Optimize common cases.
	  *[2367][2367]) mkdir_umask=$umask;;
	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;

	  *[0-7])
	    mkdir_umask=`expr $umask + 22 \
	      - $umask % 100 % 40 + $umask % 20 \
	      - $umask % 10 % 4 + $umask % 2
	    `;;
	  *) mkdir_umask=$umask,go-w;;
	esac

	# With -d, create the new directory with the user-specified mode.
	# Otherwise, rely on $mkdir_umask.
	if test -n "$dir_arg"; then
	  mkdir_mode=-m$mode
	else
	  mkdir_mode=
	fi

	posix_mkdir=false
	case $umask in
	  *[123567][0-7][0-7])
	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
	    ;;
	  *)
	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0

	    if (umask $mkdir_umask &&
		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
	    then
	      if test -z "$dir_arg" || {
		   # Check for POSIX incompatibilities with -m.
		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
		   # other-writeable bit of parent directory when it shouldn't.
		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
		   case $ls_ld_tmpdir in
		     d????-?r-*) different_mode=700;;
		     d????-?--*) different_mode=755;;
		     *) false;;
		   esac &&
		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
		   }
		 }
	      then posix_mkdir=:
	      fi
	      rmdir "$tmpdir/d" "$tmpdir"
	    else
	      # Remove any dirs left behind by ancient mkdir implementations.
	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
	    fi
	    trap '' 0;;
	esac;;
    esac

    if
      $posix_mkdir && (
	umask $mkdir_umask &&
	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
      )
    then :
    else

      # The umask is ridiculous, or mkdir does not conform to POSIX,
      # or it failed possibly due to a race condition.  Create the
      # directory the slow way, step by step, checking for races as we go.

      case $dstdir in
	/*) prefix='/';;
	-*) prefix='./';;
	*)  prefix='';;
      esac

      eval "$initialize_posix_glob"

      oIFS=$IFS
      IFS=/
      $posix_glob set -f
      set fnord $dstdir
      shift
      $posix_glob set +f
      IFS=$oIFS

      prefixes=

      for d
      do
	test -z "$d" && continue

	prefix=$prefix$d
	if test -d "$prefix"; then
	  prefixes=
	else
	  if $posix_mkdir; then
	    (umask=$mkdir_umask &&
	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
	    # Don't fail if two instances are running concurrently.
	    test -d "$prefix" || exit 1
	  else
	    case $prefix in
	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
	      *) qprefix=$prefix;;
	    esac
	    prefixes="$prefixes '$qprefix'"
	  fi
	fi
	prefix=$prefix/
      done

      if test -n "$prefixes"; then
	# Don't fail if two instances are running concurrently.
	(umask $mkdir_umask &&
	 eval "\$doit_exec \$mkdirprog $prefixes") ||
	  test -d "$dstdir" || exit 1
	obsolete_mkdir_used=true
      fi
    fi
  fi

  if test -n "$dir_arg"; then
    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
  else

    # Make a couple of temp file names in the proper directory.
    dsttmp=$dstdir/_inst.$$_
    rmtmp=$dstdir/_rm.$$_

    # Trap to clean up those temp files at exit.
    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0

    # Copy the file name to the temp name.
    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&

    # and set any options; do chmod last to preserve setuid bits.
    #
    # If any of these fail, we abort the whole thing.  If we want to
    # ignore errors from any of these, just make sure not to ignore
    # errors from the above "$doit $cpprog $src $dsttmp" command.
    #
    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&

    # If -C, don't bother to copy if it wouldn't change the file.
    if $copy_on_change &&
       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&

       eval "$initialize_posix_glob" &&
       $posix_glob set -f &&
       set X $old && old=:$2:$4:$5:$6 &&
       set X $new && new=:$2:$4:$5:$6 &&
       $posix_glob set +f &&

       test "$old" = "$new" &&
       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
    then
      rm -f "$dsttmp"
    else
      # Rename the file to the real destination.
      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||

      # The rename failed, perhaps because mv can't rename something else
      # to itself, or perhaps because mv is so ancient that it does not
      # support -f.
      {
	# Now remove or move aside any old file at destination location.
	# We try this two ways since rm can't unlink itself on some
	# systems and the destination file might be busy for other
	# reasons.  In this case, the final cleanup might fail but the new
	# file should still install successfully.
	{
	  test ! -f "$dst" ||
	  $doit $rmcmd -f "$dst" 2>/dev/null ||
	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
	  } ||
	  { echo "$0: cannot unlink or rename $dst" >&2
	    (exit 1); exit 1
	  }
	} &&

	# Now rename the file to the real destination.
	$doit $mvcmd "$dsttmp" "$dst"
      }
    fi || exit 1

    trap '' 0
  fi
done

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/autoconf/ltmain.sh
# Generated from ltmain.m4sh.

# ltmain.sh (GNU libtool) 2.2.6b
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# GNU Libtool is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License,
# if you distribute this file as part of a program or library that
# is built using GNU Libtool, you may include this file under the
# same distribution terms that you use for the rest of that program.
#
# GNU Libtool is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Libtool; see the file COPYING.  If not, a copy
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
# or obtained by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Usage: $progname [OPTION]... [MODE-ARG]...
#
# Provide generalized library-building support services.
#
#     --config             show all configuration variables
#     --debug              enable verbose shell tracing
# -n, --dry-run            display commands without modifying any files
#     --features           display basic configuration information and exit
#     --mode=MODE          use operation mode MODE
#     --preserve-dup-deps  don't remove duplicate dependency libraries
#     --quiet, --silent    don't print informational messages
#     --tag=TAG            use configuration variables from tag TAG
# -v, --verbose            print informational messages (default)
#     --version            print version information
# -h, --help               print short or long help message
#
# MODE must be one of the following:
#
#       clean              remove files from the build directory
#       compile            compile a source file into a libtool object
#       execute            automatically set library path, then run a program
#       finish             complete the installation of libtool libraries
#       install            install libraries or executables
#       link               create a library or an executable
#       uninstall          remove libraries from an installed directory
#
# MODE-ARGS vary depending on the MODE.
# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
#
# When reporting a bug, please describe a test case to reproduce it and
# include the following information:
#
#       host-triplet:	$host
#       shell:		$SHELL
#       compiler:		$LTCC
#       compiler flags:		$LTCFLAGS
#       linker:		$LD (gnu? $with_gnu_ld)
#       $progname:		(GNU libtool) 2.2.6b
#       automake:		$automake_version
#       autoconf:		$autoconf_version
#
# Report bugs to <bug-libtool@gnu.org>.

PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=2.2.6b
TIMESTAMP=""
package_revision=1.3017

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

# NLS nuisances: We save the old values to restore during execute mode.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
lt_user_locale=
lt_safe_locale=
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
  eval "if test \"\${$lt_var+set}\" = set; then
          save_$lt_var=\$$lt_var
          $lt_var=C
	  export $lt_var
	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
	fi"
done

$lt_unset CDPATH





: ${CP="cp -f"}
: ${ECHO="echo"}
: ${EGREP="/bin/grep -E"}
: ${FGREP="/bin/grep -F"}
: ${GREP="/bin/grep"}
: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
: ${SED="/bin/sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}

# Global variables:
EXIT_SUCCESS=0
EXIT_FAILURE=1
EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.

exit_status=$EXIT_SUCCESS

# Make sure IFS has a sensible default
lt_nl='
'
IFS=" 	$lt_nl"

dirname="s,/[^/]*$,,"
basename="s,^.*/,,"

# func_dirname_and_basename file append nondir_replacement
# perform func_basename and func_dirname in a single function
# call:
#   dirname:  Compute the dirname of FILE.  If nonempty,
#             add APPEND to the result, otherwise set result
#             to NONDIR_REPLACEMENT.
#             value returned in "$func_dirname_result"
#   basename: Compute filename of FILE.
#             value retuned in "$func_basename_result"
# Implementation must be kept synchronized with func_dirname
# and func_basename. For efficiency, we do not delegate to
# those functions but instead duplicate the functionality here.
func_dirname_and_basename ()
{
  # Extract subdirectory from the argument.
  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
  if test "X$func_dirname_result" = "X${1}"; then
    func_dirname_result="${3}"
  else
    func_dirname_result="$func_dirname_result${2}"
  fi
  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
}

# Generated shell functions inserted here.

# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
# the _XPG environment variable is not equal to 1 (one), the special
# positional parameter $0, within a function call, is the name of the
# function.
progpath="$0"

# The name of this program:
# In the unlikely event $progname began with a '-', it would play havoc with
# func_echo (imagine progname=-n), so we prepend ./ in that case:
func_dirname_and_basename "$progpath"
progname=$func_basename_result
case $progname in
  -*) progname=./$progname ;;
esac

# Make sure we have an absolute path for reexecution:
case $progpath in
  [\\/]*|[A-Za-z]:\\*) ;;
  *[\\/]*)
     progdir=$func_dirname_result
     progdir=`cd "$progdir" && pwd`
     progpath="$progdir/$progname"
     ;;
  *)
     save_IFS="$IFS"
     IFS=:
     for progdir in $PATH; do
       IFS="$save_IFS"
       test -x "$progdir/$progname" && break
     done
     IFS="$save_IFS"
     test -n "$progdir" || progdir=`pwd`
     progpath="$progdir/$progname"
     ;;
esac

# Sed substitution that helps us do robust quoting.  It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'

# Same as above, but do not quote variable references.
double_quote_subst='s/\(["`\\]\)/\\\1/g'

# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.
# Since each input `\' is now two `\'s, look for any number of runs of
# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
bs='\\'
bs2='\\\\'
bs4='\\\\\\\\'
dollar='\$'
sed_double_backslash="\
  s/$bs4/&\\
/g
  s/^$bs2$dollar/$bs&/
  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
  s/\n//g"

# Standard options:
opt_dry_run=false
opt_help=false
opt_quiet=false
opt_verbose=false
opt_warning=:

# func_echo arg...
# Echo program name prefixed message, along with the current mode
# name if it has been set yet.
func_echo ()
{
    $ECHO "$progname${mode+: }$mode: $*"
}

# func_verbose arg...
# Echo program name prefixed message in verbose mode only.
func_verbose ()
{
    $opt_verbose && func_echo ${1+"$@"}

    # A bug in bash halts the script if the last line of a function
    # fails when set -e is in force, so we need another command to
    # work around that:
    :
}

# func_error arg...
# Echo program name prefixed message to standard error.
func_error ()
{
    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
}

# func_warning arg...
# Echo program name prefixed warning message to standard error.
func_warning ()
{
    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2

    # bash bug again:
    :
}

# func_fatal_error arg...
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
    func_error ${1+"$@"}
    exit $EXIT_FAILURE
}

# func_fatal_help arg...
# Echo program name prefixed message to standard error, followed by
# a help hint, and exit.
func_fatal_help ()
{
    func_error ${1+"$@"}
    func_fatal_error "$help"
}
help="Try \`$progname --help' for more information."  ## default


# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
    $GREP "$1" "$2" >/dev/null 2>&1
}


# func_mkdir_p directory-path
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
{
    my_directory_path="$1"
    my_dir_list=

    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then

      # Protect directory names starting with `-'
      case $my_directory_path in
        -*) my_directory_path="./$my_directory_path" ;;
      esac

      # While some portion of DIR does not yet exist...
      while test ! -d "$my_directory_path"; do
        # ...make a list in topmost first order.  Use a colon delimited
	# list incase some portion of path contains whitespace.
        my_dir_list="$my_directory_path:$my_dir_list"

        # If the last portion added has no slash in it, the list is done
        case $my_directory_path in */*) ;; *) break ;; esac

        # ...otherwise throw away the child directory and loop
        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
      done
      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`

      save_mkdir_p_IFS="$IFS"; IFS=':'
      for my_dir in $my_dir_list; do
	IFS="$save_mkdir_p_IFS"
        # mkdir can fail with a `File exist' error if two processes
        # try to create one of the directories concurrently.  Don't
        # stop in that case!
        $MKDIR "$my_dir" 2>/dev/null || :
      done
      IFS="$save_mkdir_p_IFS"

      # Bail out if we (or some other process) failed to create a directory.
      test -d "$my_directory_path" || \
        func_fatal_error "Failed to create \`$1'"
    fi
}


# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible.  If
# given, STRING is the basename for that directory.
func_mktempdir ()
{
    my_template="${TMPDIR-/tmp}/${1-$progname}"

    if test "$opt_dry_run" = ":"; then
      # Return a directory name, but don't create it in dry-run mode
      my_tmpdir="${my_template}-$$"
    else

      # If mktemp works, use that first and foremost
      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`

      if test ! -d "$my_tmpdir"; then
        # Failing that, at least try and use $RANDOM to avoid a race
        my_tmpdir="${my_template}-${RANDOM-0}$$"

        save_mktempdir_umask=`umask`
        umask 0077
        $MKDIR "$my_tmpdir"
        umask $save_mktempdir_umask
      fi

      # If we're not in dry-run mode, bomb out on failure
      test -d "$my_tmpdir" || \
        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
    fi

    $ECHO "X$my_tmpdir" | $Xsed
}


# func_quote_for_eval arg
# Aesthetically quote ARG to be evaled later.
# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
# is double-quoted, suitable for a subsequent eval, whereas
# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
# which are still active within double quotes backslashified.
func_quote_for_eval ()
{
    case $1 in
      *[\\\`\"\$]*)
	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
      *)
        func_quote_for_eval_unquoted_result="$1" ;;
    esac

    case $func_quote_for_eval_unquoted_result in
      # Double-quote args containing shell metacharacters to delay
      # word splitting, command substitution and and variable
      # expansion for a subsequent eval.
      # Many Bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
        ;;
      *)
        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
    esac
}


# func_quote_for_expand arg
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
{
    case $1 in
      *[\\\`\"]*)
	my_arg=`$ECHO "X$1" | $Xsed \
	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
      *)
        my_arg="$1" ;;
    esac

    case $my_arg in
      # Double-quote args containing shell metacharacters to delay
      # word splitting and command substitution for a subsequent eval.
      # Many Bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        my_arg="\"$my_arg\""
        ;;
    esac

    func_quote_for_expand_result="$my_arg"
}


# func_show_eval cmd [fail_exp]
# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
    my_cmd="$1"
    my_fail_exp="${2-:}"

    ${opt_silent-false} || {
      func_quote_for_expand "$my_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    if ${opt_dry_run-false}; then :; else
      eval "$my_cmd"
      my_status=$?
      if test "$my_status" -eq 0; then :; else
	eval "(exit $my_status); $my_fail_exp"
      fi
    fi
}


# func_show_eval_locale cmd [fail_exp]
# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.  Use the saved locale for evaluation.
func_show_eval_locale ()
{
    my_cmd="$1"
    my_fail_exp="${2-:}"

    ${opt_silent-false} || {
      func_quote_for_expand "$my_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    if ${opt_dry_run-false}; then :; else
      eval "$lt_user_locale
	    $my_cmd"
      my_status=$?
      eval "$lt_safe_locale"
      if test "$my_status" -eq 0; then :; else
	eval "(exit $my_status); $my_fail_exp"
      fi
    fi
}





# func_version
# Echo version message to standard output and exit.
func_version ()
{
    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
        s/^# //
	s/^# *$//
        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
        p
     }' < "$progpath"
     exit $?
}

# func_usage
# Echo short help message to standard output and exit.
func_usage ()
{
    $SED -n '/^# Usage:/,/# -h/ {
        s/^# //
	s/^# *$//
	s/\$progname/'$progname'/
	p
    }' < "$progpath"
    $ECHO
    $ECHO "run \`$progname --help | more' for full usage"
    exit $?
}

# func_help
# Echo long help message to standard output and exit.
func_help ()
{
    $SED -n '/^# Usage:/,/# Report bugs to/ {
        s/^# //
	s/^# *$//
	s*\$progname*'$progname'*
	s*\$host*'"$host"'*
	s*\$SHELL*'"$SHELL"'*
	s*\$LTCC*'"$LTCC"'*
	s*\$LTCFLAGS*'"$LTCFLAGS"'*
	s*\$LD*'"$LD"'*
	s/\$with_gnu_ld/'"$with_gnu_ld"'/
	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
	p
     }' < "$progpath"
    exit $?
}

# func_missing_arg argname
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
    func_error "missing argument for $1"
    exit_cmd=exit
}

exit_cmd=:





# Check that we have a working $ECHO.
if test "X$1" = X--no-reexec; then
  # Discard the --no-reexec flag, and continue.
  shift
elif test "X$1" = X--fallback-echo; then
  # Avoid inline document here, it may be left over
  :
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
  # Yippee, $ECHO works!
  :
else
  # Restart under the correct shell, and then maybe $ECHO will work.
  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi

if test "X$1" = X--fallback-echo; then
  # used as fallback echo
  shift
  cat <<EOF
$*
EOF
  exit $EXIT_SUCCESS
fi

magic="%%%MAGIC variable%%%"
magic_exe="%%%MAGIC EXE variable%%%"

# Global variables.
# $mode is unset
nonopt=
execute_dlfiles=
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0

opt_dry_run=false
opt_duplicate_deps=false
opt_silent=false
opt_debug=:

# If this variable is set in any of the actions, the command in it
# will be execed at the end.  This prevents here-documents from being
# left over by shells.
exec_cmd=

# func_fatal_configuration arg...
# Echo program name prefixed message to standard error, followed by
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
    func_error ${1+"$@"}
    func_error "See the $PACKAGE documentation for more information."
    func_fatal_error "Fatal configuration error."
}


# func_config
# Display the configuration for all the tags in this script.
func_config ()
{
    re_begincf='^# ### BEGIN LIBTOOL'
    re_endcf='^# ### END LIBTOOL'

    # Default configuration.
    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"

    # Now print the configurations for the tags.
    for tagname in $taglist; do
      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
    done

    exit $?
}

# func_features
# Display the features supported by this script.
func_features ()
{
    $ECHO "host: $host"
    if test "$build_libtool_libs" = yes; then
      $ECHO "enable shared libraries"
    else
      $ECHO "disable shared libraries"
    fi
    if test "$build_old_libs" = yes; then
      $ECHO "enable static libraries"
    else
      $ECHO "disable static libraries"
    fi

    exit $?
}

# func_enable_tag tagname
# Verify that TAGNAME is valid, and either flag an error and exit, or
# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
# variable here.
func_enable_tag ()
{
  # Global variable:
  tagname="$1"

  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
  sed_extractcf="/$re_begincf/,/$re_endcf/p"

  # Validate tagname.
  case $tagname in
    *[!-_A-Za-z0-9,/]*)
      func_fatal_error "invalid tag name: $tagname"
      ;;
  esac

  # Don't test for the "default" C tag, as we know it's
  # there but not specially marked.
  case $tagname in
    CC) ;;
    *)
      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
	taglist="$taglist $tagname"

	# Evaluate the configuration.  Be careful to quote the path
	# and the sed script, to avoid splitting on whitespace, but
	# also don't use non-portable quotes within backquotes within
	# quotes we have to do it in 2 steps:
	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
	eval "$extractedcf"
      else
	func_error "ignoring unknown tag $tagname"
      fi
      ;;
  esac
}

# Parse options once, thoroughly.  This comes as soon as possible in
# the script to make things like `libtool --version' happen quickly.
{

  # Shorthand for --mode=foo, only valid as the first argument
  case $1 in
  clean|clea|cle|cl)
    shift; set dummy --mode clean ${1+"$@"}; shift
    ;;
  compile|compil|compi|comp|com|co|c)
    shift; set dummy --mode compile ${1+"$@"}; shift
    ;;
  execute|execut|execu|exec|exe|ex|e)
    shift; set dummy --mode execute ${1+"$@"}; shift
    ;;
  finish|finis|fini|fin|fi|f)
    shift; set dummy --mode finish ${1+"$@"}; shift
    ;;
  install|instal|insta|inst|ins|in|i)
    shift; set dummy --mode install ${1+"$@"}; shift
    ;;
  link|lin|li|l)
    shift; set dummy --mode link ${1+"$@"}; shift
    ;;
  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
    shift; set dummy --mode uninstall ${1+"$@"}; shift
    ;;
  esac

  # Parse non-mode specific arguments:
  while test "$#" -gt 0; do
    opt="$1"
    shift

    case $opt in
      --config)		func_config					;;

      --debug)		preserve_args="$preserve_args $opt"
			func_echo "enabling shell trace mode"
			opt_debug='set -x'
			$opt_debug
			;;

      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
			execute_dlfiles="$execute_dlfiles $1"
			shift
			;;

      --dry-run | -n)	opt_dry_run=:					;;
      --features)       func_features					;;
      --finish)		mode="finish"					;;

      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
			case $1 in
			  # Valid mode arguments:
			  clean)	;;
			  compile)	;;
			  execute)	;;
			  finish)	;;
			  install)	;;
			  link)		;;
			  relink)	;;
			  uninstall)	;;

			  # Catch anything else as an error
			  *) func_error "invalid argument for $opt"
			     exit_cmd=exit
			     break
			     ;;
		        esac

			mode="$1"
			shift
			;;

      --preserve-dup-deps)
			opt_duplicate_deps=:				;;

      --quiet|--silent)	preserve_args="$preserve_args $opt"
			opt_silent=:
			;;

      --verbose| -v)	preserve_args="$preserve_args $opt"
			opt_silent=false
			;;

      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
			preserve_args="$preserve_args $opt $1"
			func_enable_tag "$1"	# tagname is set here
			shift
			;;

      # Separate optargs to long options:
      -dlopen=*|--mode=*|--tag=*)
			func_opt_split "$opt"
			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
			shift
			;;

      -\?|-h)		func_usage					;;
      --help)		opt_help=:					;;
      --version)	func_version					;;

      -*)		func_fatal_help "unrecognized option \`$opt'"	;;

      *)		nonopt="$opt"
			break
			;;
    esac
  done


  case $host in
    *cygwin* | *mingw* | *pw32* | *cegcc*)
      # don't eliminate duplications in $postdeps and $predeps
      opt_duplicate_compiler_generated_deps=:
      ;;
    *)
      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
      ;;
  esac

  # Having warned about all mis-specified options, bail out if
  # anything was wrong.
  $exit_cmd $EXIT_FAILURE
}

# func_check_version_match
# Ensure that we are using m4 macros, and libtool script from the same
# release of libtool.
func_check_version_match ()
{
  if test "$package_revision" != "$macro_revision"; then
    if test "$VERSION" != "$macro_version"; then
      if test -z "$macro_version"; then
        cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
      else
        cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
      fi
    else
      cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
    fi

    exit $EXIT_MISMATCH
  fi
}


## ----------- ##
##    Main.    ##
## ----------- ##

$opt_help || {
  # Sanity checks first:
  func_check_version_match

  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    func_fatal_configuration "not configured to build any kind of library"
  fi

  test -z "$mode" && func_fatal_error "error: you must specify a MODE."


  # Darwin sucks
  eval std_shrext=\"$shrext_cmds\"


  # Only execute mode is allowed to have -dlopen flags.
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
    func_error "unrecognized option \`-dlopen'"
    $ECHO "$help" 1>&2
    exit $EXIT_FAILURE
  fi

  # Change the help message to a mode-specific one.
  generic_help="$help"
  help="Try \`$progname --help --mode=$mode' for more information."
}


# func_lalib_p file
# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_lalib_p ()
{
    test -f "$1" &&
      $SED -e 4q "$1" 2>/dev/null \
        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
}

# func_lalib_unsafe_p file
# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function implements the same check as func_lalib_p without
# resorting to external programs.  To this end, it redirects stdin and
# closes it afterwards, without saving the original file descriptor.
# As a safety measure, use it only where a negative result would be
# fatal anyway.  Works if `file' does not exist.
func_lalib_unsafe_p ()
{
    lalib_p=no
    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
	for lalib_p_l in 1 2 3 4
	do
	    read lalib_p_line
	    case "$lalib_p_line" in
		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
	    esac
	done
	exec 0<&5 5<&-
    fi
    test "$lalib_p" = yes
}

# func_ltwrapper_script_p file
# True iff FILE is a libtool wrapper script
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_script_p ()
{
    func_lalib_p "$1"
}

# func_ltwrapper_executable_p file
# True iff FILE is a libtool wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_executable_p ()
{
    func_ltwrapper_exec_suffix=
    case $1 in
    *.exe) ;;
    *) func_ltwrapper_exec_suffix=.exe ;;
    esac
    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
}

# func_ltwrapper_scriptname file
# Assumes file is an ltwrapper_executable
# uses $file to determine the appropriate filename for a
# temporary ltwrapper_script.
func_ltwrapper_scriptname ()
{
    func_ltwrapper_scriptname_result=""
    if func_ltwrapper_executable_p "$1"; then
	func_dirname_and_basename "$1" "" "."
	func_stripname '' '.exe' "$func_basename_result"
	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
    fi
}

# func_ltwrapper_p file
# True iff FILE is a libtool wrapper script or wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_p ()
{
    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
}


# func_execute_cmds commands fail_cmd
# Execute tilde-delimited COMMANDS.
# If FAIL_CMD is given, eval that upon failure.
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
    $opt_debug
    save_ifs=$IFS; IFS='~'
    for cmd in $1; do
      IFS=$save_ifs
      eval cmd=\"$cmd\"
      func_show_eval "$cmd" "${2-:}"
    done
    IFS=$save_ifs
}


# func_source file
# Source FILE, adding directory component if necessary.
# Note that it is not necessary on cygwin/mingw to append a dot to
# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)!  Also, sourcing
# `FILE.' does not work on cygwin managed mounts.
func_source ()
{
    $opt_debug
    case $1 in
    */* | *\\*)	. "$1" ;;
    *)		. "./$1" ;;
    esac
}


# func_infer_tag arg
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
    $opt_debug

    # FreeBSD-specific: where we install compilers with non-standard names
    tag_compilers_CC="*cc cc* *gcc gcc*"
    tag_compilers_CXX="*c++ c++* *g++ g++*"
    base_compiler=`set -- "$@"; echo $1`

    # If $tagname isn't set, then try to infer if the default "CC" tag applies
    if test -z "$tagname"; then
      for zp in $tag_compilers_CC; do
        case $base_compiler in
	 $zp) tagname="CC"; break;;
	esac
      done
    fi

    if test -n "$available_tags" && test -z "$tagname"; then
      CC_quoted=
      for arg in $CC; do
        func_quote_for_eval "$arg"
	CC_quoted="$CC_quoted $func_quote_for_eval_result"
      done
      case $@ in
      # Blanks in the command may have been stripped by the calling shell,
      # but not from the CC environment variable when configure was run.
      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
      # Blanks at the start of $base_compile will cause this to fail
      # if we don't check for them as well.
      *)
	for z in $available_tags; do
	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
	    # Evaluate the configuration.
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
	    CC_quoted=
	    for arg in $CC; do
	      # Double-quote args containing other shell metacharacters.
	      func_quote_for_eval "$arg"
	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
	    done
	    case "$@ " in
	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
	      # The compiler in the base compile command matches
	      # the one in the tagged configuration.
	      # Assume this is the tagged configuration we want.
	      tagname=$z
	      break
	      ;;
	    esac

	    # FreeBSD-specific: try compilers based on inferred tag
	    if test -z "$tagname"; then
	      eval "tag_compilers=\$tag_compilers_${z}"
	      if test -n "$tag_compilers"; then
		for zp in $tag_compilers; do
		  case $base_compiler in   
		    $zp) tagname=$z; break;;
		  esac
		done
		if test -n "$tagname"; then
		  break
		fi
	      fi
            fi
          fi
	done
	# If $tagname still isn't set, then no tagged configuration
	# was found and let the user know that the "--tag" command
	# line option must be used.
	if test -z "$tagname"; then
	  func_echo "unable to infer tagged configuration"
	  func_fatal_error "specify a tag with \`--tag'"
#	else
#	  func_verbose "using $tagname tagged configuration"
	fi
	;;
      esac
    fi
}



# func_write_libtool_object output_name pic_name nonpic_name
# Create a libtool object file (analogous to a ".la" file),
# but don't create it if we're doing a dry run.
func_write_libtool_object ()
{
    write_libobj=${1}
    if test "$build_libtool_libs" = yes; then
      write_lobj=\'${2}\'
    else
      write_lobj=none
    fi

    if test "$build_old_libs" = yes; then
      write_oldobj=\'${3}\'
    else
      write_oldobj=none
    fi

    $opt_dry_run || {
      cat >${write_libobj}T <<EOF
# $write_libobj - a libtool object file
# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# Name of the PIC object.
pic_object=$write_lobj

# Name of the non-PIC object
non_pic_object=$write_oldobj

EOF
      $MV "${write_libobj}T" "${write_libobj}"
    }
}

# func_mode_compile arg...
func_mode_compile ()
{
    $opt_debug
    # Get the compilation command and the source file.
    base_compile=
    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
    suppress_opt=yes
    suppress_output=
    arg_mode=normal
    libobj=
    later=
    pie_flag=

    for arg
    do
      case $arg_mode in
      arg  )
	# do not "continue".  Instead, add this to base_compile
	lastarg="$arg"
	arg_mode=normal
	;;

      target )
	libobj="$arg"
	arg_mode=normal
	continue
	;;

      normal )
	# Accept any command-line options.
	case $arg in
	-o)
	  test -n "$libobj" && \
	    func_fatal_error "you cannot specify \`-o' more than once"
	  arg_mode=target
	  continue
	  ;;

	-pie | -fpie | -fPIE)
          pie_flag="$pie_flag $arg"
	  continue
	  ;;

	-shared | -static | -prefer-pic | -prefer-non-pic)
	  later="$later $arg"
	  continue
	  ;;

	-no-suppress)
	  suppress_opt=no
	  continue
	  ;;

	-Xcompiler)
	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
	  continue      #  The current "srcfile" will either be retained or
	  ;;            #  replaced later.  I would guess that would be a bug.

	-Wc,*)
	  func_stripname '-Wc,' '' "$arg"
	  args=$func_stripname_result
	  lastarg=
	  save_ifs="$IFS"; IFS=','
	  for arg in $args; do
	    IFS="$save_ifs"
	    func_quote_for_eval "$arg"
	    lastarg="$lastarg $func_quote_for_eval_result"
	  done
	  IFS="$save_ifs"
	  func_stripname ' ' '' "$lastarg"
	  lastarg=$func_stripname_result

	  # Add the arguments to base_compile.
	  base_compile="$base_compile $lastarg"
	  continue
	  ;;

	*)
	  # Accept the current argument as the source file.
	  # The previous "srcfile" becomes the current argument.
	  #
	  lastarg="$srcfile"
	  srcfile="$arg"
	  ;;
	esac  #  case $arg
	;;
      esac    #  case $arg_mode

      # Aesthetically quote the previous argument.
      func_quote_for_eval "$lastarg"
      base_compile="$base_compile $func_quote_for_eval_result"
    done # for arg

    case $arg_mode in
    arg)
      func_fatal_error "you must specify an argument for -Xcompile"
      ;;
    target)
      func_fatal_error "you must specify a target with \`-o'"
      ;;
    *)
      # Get the name of the library object.
      test -z "$libobj" && {
	func_basename "$srcfile"
	libobj="$func_basename_result"
      }
      ;;
    esac

    # Recognize several different file suffixes.
    # If the user specifies -o file.o, it is replaced with file.lo
    case $libobj in
    *.[cCFSifmso] | \
    *.ada | *.adb | *.ads | *.asm | \
    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
      func_xform "$libobj"
      libobj=$func_xform_result
      ;;
    esac

    case $libobj in
    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
    *)
      func_fatal_error "cannot determine name of library object from \`$libobj'"
      ;;
    esac

    func_infer_tag $base_compile

    for arg in $later; do
      case $arg in
      -shared)
	test "$build_libtool_libs" != yes && \
	  func_fatal_configuration "can not build a shared library"
	build_old_libs=no
	continue
	;;

      -static)
	build_libtool_libs=no
	build_old_libs=yes
	continue
	;;

      -prefer-pic)
	pic_mode=yes
	continue
	;;

      -prefer-non-pic)
	pic_mode=no
	continue
	;;
      esac
    done

    func_quote_for_eval "$libobj"
    test "X$libobj" != "X$func_quote_for_eval_result" \
      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
      && func_warning "libobj name \`$libobj' may not contain shell special characters."
    func_dirname_and_basename "$obj" "/" ""
    objname="$func_basename_result"
    xdir="$func_dirname_result"
    lobj=${xdir}$objdir/$objname

    test -z "$base_compile" && \
      func_fatal_help "you must specify a compilation command"

    # Delete any leftover library objects.
    if test "$build_old_libs" = yes; then
      removelist="$obj $lobj $libobj ${libobj}T"
    else
      removelist="$lobj $libobj ${libobj}T"
    fi

    # On Cygwin there's no "real" PIC flag so we must build both object types
    case $host_os in
    cygwin* | mingw* | pw32* | os2* | cegcc*)
      pic_mode=default
      ;;
    esac
    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
      # non-PIC code in shared libraries is not supported
      pic_mode=default
    fi

    # Calculate the filename of the output object if compiler does
    # not support -o with -c
    if test "$compiler_c_o" = no; then
      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
      lockfile="$output_obj.lock"
    else
      output_obj=
      need_locks=no
      lockfile=
    fi

    # Lock this critical section if it is needed
    # We use this script file to make the link, it avoids creating a new file
    if test "$need_locks" = yes; then
      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
	func_echo "Waiting for $lockfile to be removed"
	sleep 2
      done
    elif test "$need_locks" = warn; then
      if test -f "$lockfile"; then
	$ECHO "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi
      removelist="$removelist $output_obj"
      $ECHO "$srcfile" > "$lockfile"
    fi

    $opt_dry_run || $RM $removelist
    removelist="$removelist $lockfile"
    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15

    if test -n "$fix_srcfile_path"; then
      eval srcfile=\"$fix_srcfile_path\"
    fi
    func_quote_for_eval "$srcfile"
    qsrcfile=$func_quote_for_eval_result

    # Only build a PIC object if we are building libtool libraries.
    if test "$build_libtool_libs" = yes; then
      # Without this assignment, base_compile gets emptied.
      fbsd_hideous_sh_bug=$base_compile

      if test "$pic_mode" != no; then
	command="$base_compile $qsrcfile $pic_flag"
      else
	# Don't build PIC code
	command="$base_compile $qsrcfile"
      fi

      func_mkdir_p "$xdir$objdir"

      if test -z "$output_obj"; then
	# Place PIC objects in $objdir
	command="$command -o $lobj"
      fi

      func_show_eval_locale "$command"	\
          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'

      if test "$need_locks" = warn &&
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
	$ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`

but it should contain:
$srcfile

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi

      # Just move the object if needed, then go on to compile the next one
      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
	func_show_eval '$MV "$output_obj" "$lobj"' \
	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
      fi

      # Allow error messages only from the first compilation.
      if test "$suppress_opt" = yes; then
	suppress_output=' >/dev/null 2>&1'
      fi
    fi

    # Only build a position-dependent object if we build old libraries.
    if test "$build_old_libs" = yes; then
      if test "$pic_mode" != yes; then
	# Don't build PIC code
	command="$base_compile $qsrcfile$pie_flag"
      else
	command="$base_compile $qsrcfile $pic_flag"
      fi
      if test "$compiler_c_o" = yes; then
	command="$command -o $obj"
      fi

      # Suppress compiler output if we already did a PIC compilation.
      command="$command$suppress_output"
      func_show_eval_locale "$command" \
        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'

      if test "$need_locks" = warn &&
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
	$ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`

but it should contain:
$srcfile

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi

      # Just move the object if needed
      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
	func_show_eval '$MV "$output_obj" "$obj"' \
	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
      fi
    fi

    $opt_dry_run || {
      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"

      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
	removelist=$lockfile
        $RM "$lockfile"
      fi
    }

    exit $EXIT_SUCCESS
}

$opt_help || {
test "$mode" = compile && func_mode_compile ${1+"$@"}
}

func_mode_help ()
{
    # We need to display help for each of the modes.
    case $mode in
      "")
        # Generic help is extracted from the usage comments
        # at the start of this file.
        func_help
        ;;

      clean)
        $ECHO \
"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...

Remove files from the build directory.

RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
to RM.

If FILE is a libtool library, object or program, all the files associated
with it are deleted. Otherwise, only FILE itself is deleted using RM."
        ;;

      compile)
      $ECHO \
"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE

Compile a source file into a libtool library object.

This mode accepts the following additional options:

  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  -no-suppress      do not suppress compiler output for multiple passes
  -prefer-pic       try to building PIC objects only
  -prefer-non-pic   try to building non-PIC objects only
  -shared           do not build a \`.o' file suitable for static linking
  -static           only build a \`.o' file suitable for static linking

COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.

The output file name is determined by removing the directory component from
SOURCEFILE, then substituting the C source code suffix \`.c' with the
library object suffix, \`.lo'."
        ;;

      execute)
        $ECHO \
"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...

Automatically set library path, then run a program.

This mode accepts the following additional options:

  -dlopen FILE      add the directory containing FILE to the library path

This mode sets the library path environment variable according to \`-dlopen'
flags.

If any of the ARGS are libtool executable wrappers, then they are translated
into their corresponding uninstalled binary, and any of their required library
directories are added to the library path.

Then, COMMAND is executed, with ARGS as arguments."
        ;;

      finish)
        $ECHO \
"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...

Complete the installation of libtool libraries.

Each LIBDIR is a directory that contains libtool libraries.

The commands that this mode executes may require superuser privileges.  Use
the \`--dry-run' option if you just want to see what would be executed."
        ;;

      install)
        $ECHO \
"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...

Install executables or libraries.

INSTALL-COMMAND is the installation command.  The first component should be
either the \`install' or \`cp' program.

The following components of INSTALL-COMMAND are treated specially:

  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation

The rest of the components are interpreted as arguments to that command (only
BSD-compatible install options are recognized)."
        ;;

      link)
        $ECHO \
"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...

Link object files or libraries together to form another library, or to
create an executable program.

LINK-COMMAND is a command using the C compiler that you would use to create
a program from several object files.

The following components of LINK-COMMAND are treated specially:

  -all-static       do not do any dynamic linking at all
  -avoid-version    do not add a version suffix if possible
  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  -export-symbols SYMFILE
                    try to export only the symbols listed in SYMFILE
  -export-symbols-regex REGEX
                    try to export only the symbols matching REGEX
  -LLIBDIR          search LIBDIR for required installed libraries
  -lNAME            OUTPUT-FILE requires the installed library libNAME
  -module           build a library that can dlopened
  -no-fast-install  disable the fast-install mode
  -no-install       link a not-installable executable
  -no-undefined     declare that a library does not refer to external symbols
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  -objectlist FILE  Use a list of object files found in FILE to specify objects
  -precious-files-regex REGEX
                    don't remove output files matching REGEX
  -release RELEASE  specify package release information
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  -shared           only do dynamic linking of libtool libraries
  -shrext SUFFIX    override the standard shared library file extension
  -static           do not do any dynamic linking of uninstalled libtool libraries
  -static-libtool-libs
                    do not do any dynamic linking of libtool libraries
  -version-info CURRENT[:REVISION[:AGE]]
                    specify library version info [each variable defaults to 0]
  -weak LIBNAME     declare that the target provides the LIBNAME interface

All other options (arguments beginning with \`-') are ignored.

Every other argument is treated as a filename.  Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.

If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
only library objects (\`.lo' files) may be specified, and \`-rpath' is
required, except when creating a convenience library.

If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
using \`ar' and \`ranlib', or on Windows using \`lib'.

If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."
        ;;

      uninstall)
        $ECHO \
"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...

Remove libraries from an installation directory.

RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
to RM.

If FILE is a libtool library, all the files associated with it are deleted.
Otherwise, only FILE itself is deleted using RM."
        ;;

      *)
        func_fatal_help "invalid operation mode \`$mode'"
        ;;
    esac

    $ECHO
    $ECHO "Try \`$progname --help' for more information about other modes."

    exit $?
}

  # Now that we've collected a possible --mode arg, show help if necessary
  $opt_help && func_mode_help


# func_mode_execute arg...
func_mode_execute ()
{
    $opt_debug
    # The first argument is the command name.
    cmd="$nonopt"
    test -z "$cmd" && \
      func_fatal_help "you must specify a COMMAND"

    # Handle -dlopen flags immediately.
    for file in $execute_dlfiles; do
      test -f "$file" \
	|| func_fatal_help "\`$file' is not a file"

      dir=
      case $file in
      *.la)
	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$file" \
	  || func_fatal_help "\`$lib' is not a valid libtool archive"

	# Read the libtool library.
	dlname=
	library_names=
	func_source "$file"

	# Skip this library if it cannot be dlopened.
	if test -z "$dlname"; then
	  # Warn if it was a shared library.
	  test -n "$library_names" && \
	    func_warning "\`$file' was not linked with \`-export-dynamic'"
	  continue
	fi

	func_dirname "$file" "" "."
	dir="$func_dirname_result"

	if test -f "$dir/$objdir/$dlname"; then
	  dir="$dir/$objdir"
	else
	  if test ! -f "$dir/$dlname"; then
	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
	  fi
	fi
	;;

      *.lo)
	# Just add the directory containing the .lo file.
	func_dirname "$file" "" "."
	dir="$func_dirname_result"
	;;

      *)
	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
	continue
	;;
      esac

      # Get the absolute pathname.
      absdir=`cd "$dir" && pwd`
      test -n "$absdir" && dir="$absdir"

      # Now add the directory to shlibpath_var.
      if eval "test -z \"\$$shlibpath_var\""; then
	eval "$shlibpath_var=\"\$dir\""
      else
	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
      fi
    done

    # This variable tells wrapper scripts just to set shlibpath_var
    # rather than running their programs.
    libtool_execute_magic="$magic"

    # Check if any of the arguments is a wrapper script.
    args=
    for file
    do
      case $file in
      -*) ;;
      *)
	# Do a test to see if this is really a libtool program.
	if func_ltwrapper_script_p "$file"; then
	  func_source "$file"
	  # Transform arg to wrapped name.
	  file="$progdir/$program"
	elif func_ltwrapper_executable_p "$file"; then
	  func_ltwrapper_scriptname "$file"
	  func_source "$func_ltwrapper_scriptname_result"
	  # Transform arg to wrapped name.
	  file="$progdir/$program"
	fi
	;;
      esac
      # Quote arguments (to preserve shell metacharacters).
      func_quote_for_eval "$file"
      args="$args $func_quote_for_eval_result"
    done

    if test "X$opt_dry_run" = Xfalse; then
      if test -n "$shlibpath_var"; then
	# Export the shlibpath_var.
	eval "export $shlibpath_var"
      fi

      # Restore saved environment variables
      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
      do
	eval "if test \"\${save_$lt_var+set}\" = set; then
                $lt_var=\$save_$lt_var; export $lt_var
	      else
		$lt_unset $lt_var
	      fi"
      done

      # Now prepare to actually exec the command.
      exec_cmd="\$cmd$args"
    else
      # Display what would be done.
      if test -n "$shlibpath_var"; then
	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
	$ECHO "export $shlibpath_var"
      fi
      $ECHO "$cmd$args"
      exit $EXIT_SUCCESS
    fi
}

test "$mode" = execute && func_mode_execute ${1+"$@"}


# func_mode_finish arg...
func_mode_finish ()
{
    $opt_debug
    libdirs="$nonopt"
    admincmds=

    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
      for dir
      do
	libdirs="$libdirs $dir"
      done

      for libdir in $libdirs; do
	if test -n "$finish_cmds"; then
	  # Do each command in the finish commands.
	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
'"$cmd"'"'
	fi
	if test -n "$finish_eval"; then
	  # Do the single finish_eval.
	  eval cmds=\"$finish_eval\"
	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
       $cmds"
	fi
      done
    fi

    # Exit here if they wanted silent mode.
    $opt_silent && exit $EXIT_SUCCESS

    $ECHO "X----------------------------------------------------------------------" | $Xsed
    $ECHO "Libraries have been installed in:"
    for libdir in $libdirs; do
      $ECHO "   $libdir"
    done
    $ECHO
    $ECHO "If you ever happen to want to link against installed libraries"
    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
    $ECHO "flag during linking and do at least one of the following:"
    if test -n "$shlibpath_var"; then
      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
      $ECHO "     during execution"
    fi
    if test -n "$runpath_var"; then
      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
      $ECHO "     during linking"
    fi
    if test -n "$hardcode_libdir_flag_spec"; then
      libdir=LIBDIR
      eval flag=\"$hardcode_libdir_flag_spec\"

      $ECHO "   - use the \`$flag' linker flag"
    fi
    if test -n "$admincmds"; then
      $ECHO "   - have your system administrator run these commands:$admincmds"
    fi
    if test -f /etc/ld.so.conf; then
      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
    fi
    $ECHO

    $ECHO "See any operating system documentation about shared libraries for"
    case $host in
      solaris2.[6789]|solaris2.1[0-9])
        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
	$ECHO "pages."
	;;
      *)
        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
        ;;
    esac
    $ECHO "X----------------------------------------------------------------------" | $Xsed
    exit $EXIT_SUCCESS
}

test "$mode" = finish && func_mode_finish ${1+"$@"}


# func_mode_install arg...
func_mode_install ()
{
    $opt_debug
    # There may be an optional sh(1) argument at the beginning of
    # install_prog (especially on Windows NT).
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
       # Allow the use of GNU shtool's install command.
       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
      # Aesthetically quote it.
      func_quote_for_eval "$nonopt"
      install_prog="$func_quote_for_eval_result "
      arg=$1
      shift
    else
      install_prog=
      arg=$nonopt
    fi

    # The real first argument should be the name of the installation program.
    # Aesthetically quote it.
    func_quote_for_eval "$arg"
    install_prog="$install_prog$func_quote_for_eval_result"

    # We need to accept at least all the BSD install flags.
    dest=
    files=
    opts=
    prev=
    install_type=
    isdir=no
    stripme=
    for arg
    do
      if test -n "$dest"; then
	files="$files $dest"
	dest=$arg
	continue
      fi

      case $arg in
      -d) isdir=yes ;;
      -f)
	case " $install_prog " in
	*[\\\ /]cp\ *) ;;
	*) prev=$arg ;;
	esac
	;;
      -g | -m | -o)
	prev=$arg
	;;
      -s)
	stripme=" -s"
	continue
	;;
      -*)
	;;
      *)
	# If the previous option needed an argument, then skip it.
	if test -n "$prev"; then
	  prev=
	else
	  dest=$arg
	  continue
	fi
	;;
      esac

      # Aesthetically quote the argument.
      func_quote_for_eval "$arg"
      install_prog="$install_prog $func_quote_for_eval_result"
    done

    test -z "$install_prog" && \
      func_fatal_help "you must specify an install program"

    test -n "$prev" && \
      func_fatal_help "the \`$prev' option requires an argument"

    if test -z "$files"; then
      if test -z "$dest"; then
	func_fatal_help "no file or destination specified"
      else
	func_fatal_help "you must specify a destination"
      fi
    fi

    # Strip any trailing slash from the destination.
    func_stripname '' '/' "$dest"
    dest=$func_stripname_result

    # Check to see that the destination is a directory.
    test -d "$dest" && isdir=yes
    if test "$isdir" = yes; then
      destdir="$dest"
      destname=
    else
      func_dirname_and_basename "$dest" "" "."
      destdir="$func_dirname_result"
      destname="$func_basename_result"

      # Not a directory, so check to see that there is only one file specified.
      set dummy $files; shift
      test "$#" -gt 1 && \
	func_fatal_help "\`$dest' is not a directory"
    fi
    case $destdir in
    [\\/]* | [A-Za-z]:[\\/]*) ;;
    *)
      for file in $files; do
	case $file in
	*.lo) ;;
	*)
	  func_fatal_help "\`$destdir' must be an absolute directory name"
	  ;;
	esac
      done
      ;;
    esac

    # This variable tells wrapper scripts just to set variables rather
    # than running their programs.
    libtool_install_magic="$magic"

    staticlibs=
    future_libdirs=
    current_libdirs=
    for file in $files; do

      # Do each installation.
      case $file in
      *.$libext)
	# Do the static libraries later.
	staticlibs="$staticlibs $file"
	;;

      *.la)
	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$file" \
	  || func_fatal_help "\`$file' is not a valid libtool archive"

	library_names=
	old_library=
	relink_command=
	func_source "$file"

	# Add the libdir to current_libdirs if it is the destination.
	if test "X$destdir" = "X$libdir"; then
	  case "$current_libdirs " in
	  *" $libdir "*) ;;
	  *) current_libdirs="$current_libdirs $libdir" ;;
	  esac
	else
	  # Note the libdir as a future libdir.
	  case "$future_libdirs " in
	  *" $libdir "*) ;;
	  *) future_libdirs="$future_libdirs $libdir" ;;
	  esac
	fi

	func_dirname "$file" "/" ""
	dir="$func_dirname_result"
	dir="$dir$objdir"

	if test -n "$relink_command"; then
	  # Determine the prefix the user has applied to our future dir.
	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`

	  # Don't allow the user to place us outside of our expected
	  # location b/c this prevents finding dependent libraries that
	  # are installed to the same prefix.
	  # At present, this check doesn't affect windows .dll's that
	  # are installed into $libdir/../bin (currently, that works fine)
	  # but it's something to keep an eye on.
	  test "$inst_prefix_dir" = "$destdir" && \
	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"

	  if test -n "$inst_prefix_dir"; then
	    # Stick the inst_prefix_dir data into the link command.
	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
	  else
	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
	  fi

	  func_warning "relinking \`$file'"
	  func_show_eval "$relink_command" \
	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
	fi

	# See the names of the shared library.
	set dummy $library_names; shift
	if test -n "$1"; then
	  realname="$1"
	  shift

	  srcname="$realname"
	  test -n "$relink_command" && srcname="$realname"T

	  # Install the shared library and build the symlinks.
	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
	      'exit $?'
	  tstripme="$stripme"
	  case $host_os in
	  cygwin* | mingw* | pw32* | cegcc*)
	    case $realname in
	    *.dll.a)
	      tstripme=""
	      ;;
	    esac
	    ;;
	  esac
	  if test -n "$tstripme" && test -n "$striplib"; then
	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
	  fi

	  if test "$#" -gt 0; then
	    # Delete the old symlinks, and create new ones.
	    # Try `ln -sf' first, because the `ln' binary might depend on
	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
	    # so we also need to try rm && ln -s.
	    for linkname
	    do
	      test "$linkname" != "$realname" \
		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
	    done
	  fi

	  # Do each command in the postinstall commands.
	  lib="$destdir/$realname"
	  func_execute_cmds "$postinstall_cmds" 'exit $?'
	fi

	# Install the pseudo-library for information purposes.
	func_basename "$file"
	name="$func_basename_result"
	instname="$dir/$name"i
	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'

	# Maybe install the static library, too.
	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
	;;

      *.lo)
	# Install (i.e. copy) a libtool object.

	# Figure out destination file name, if it wasn't already specified.
	if test -n "$destname"; then
	  destfile="$destdir/$destname"
	else
	  func_basename "$file"
	  destfile="$func_basename_result"
	  destfile="$destdir/$destfile"
	fi

	# Deduce the name of the destination old-style object file.
	case $destfile in
	*.lo)
	  func_lo2o "$destfile"
	  staticdest=$func_lo2o_result
	  ;;
	*.$objext)
	  staticdest="$destfile"
	  destfile=
	  ;;
	*)
	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
	  ;;
	esac

	# Install the libtool object if requested.
	test -n "$destfile" && \
	  func_show_eval "$install_prog $file $destfile" 'exit $?'

	# Install the old object if enabled.
	if test "$build_old_libs" = yes; then
	  # Deduce the name of the old-style object file.
	  func_lo2o "$file"
	  staticobj=$func_lo2o_result
	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
	fi
	exit $EXIT_SUCCESS
	;;

      *)
	# Figure out destination file name, if it wasn't already specified.
	if test -n "$destname"; then
	  destfile="$destdir/$destname"
	else
	  func_basename "$file"
	  destfile="$func_basename_result"
	  destfile="$destdir/$destfile"
	fi

	# If the file is missing, and there is a .exe on the end, strip it
	# because it is most likely a libtool script we actually want to
	# install
	stripped_ext=""
	case $file in
	  *.exe)
	    if test ! -f "$file"; then
	      func_stripname '' '.exe' "$file"
	      file=$func_stripname_result
	      stripped_ext=".exe"
	    fi
	    ;;
	esac

	# Do a test to see if this is really a libtool program.
	case $host in
	*cygwin* | *mingw*)
	    if func_ltwrapper_executable_p "$file"; then
	      func_ltwrapper_scriptname "$file"
	      wrapper=$func_ltwrapper_scriptname_result
	    else
	      func_stripname '' '.exe' "$file"
	      wrapper=$func_stripname_result
	    fi
	    ;;
	*)
	    wrapper=$file
	    ;;
	esac
	if func_ltwrapper_script_p "$wrapper"; then
	  notinst_deplibs=
	  relink_command=

	  func_source "$wrapper"

	  # Check the variables that should have been set.
	  test -z "$generated_by_libtool_version" && \
	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"

	  finalize=yes
	  for lib in $notinst_deplibs; do
	    # Check to see that each library is installed.
	    libdir=
	    if test -f "$lib"; then
	      func_source "$lib"
	    fi
	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
	    if test -n "$libdir" && test ! -f "$libfile"; then
	      func_warning "\`$lib' has not been installed in \`$libdir'"
	      finalize=no
	    fi
	  done

	  relink_command=
	  func_source "$wrapper"

	  outputname=
	  if test "$fast_install" = no && test -n "$relink_command"; then
	    $opt_dry_run || {
	      if test "$finalize" = yes; then
	        tmpdir=`func_mktempdir`
		func_basename "$file$stripped_ext"
		file="$func_basename_result"
	        outputname="$tmpdir/$file"
	        # Replace the output file specification.
	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`

	        $opt_silent || {
	          func_quote_for_expand "$relink_command"
		  eval "func_echo $func_quote_for_expand_result"
	        }
	        if eval "$relink_command"; then :
	          else
		  func_error "error: relink \`$file' with the above command before installing it"
		  $opt_dry_run || ${RM}r "$tmpdir"
		  continue
	        fi
	        file="$outputname"
	      else
	        func_warning "cannot relink \`$file'"
	      fi
	    }
	  else
	    # Install the binary that we compiled earlier.
	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
	  fi
	fi

	# remove .exe since cygwin /usr/bin/install will append another
	# one anyway
	case $install_prog,$host in
	*/usr/bin/install*,*cygwin*)
	  case $file:$destfile in
	  *.exe:*.exe)
	    # this is ok
	    ;;
	  *.exe:*)
	    destfile=$destfile.exe
	    ;;
	  *:*.exe)
	    func_stripname '' '.exe' "$destfile"
	    destfile=$func_stripname_result
	    ;;
	  esac
	  ;;
	esac
	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
	$opt_dry_run || if test -n "$outputname"; then
	  ${RM}r "$tmpdir"
	fi
	;;
      esac
    done

    for file in $staticlibs; do
      func_basename "$file"
      name="$func_basename_result"

      # Set up the ranlib parameters.
      oldlib="$destdir/$name"

      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'

      if test -n "$stripme" && test -n "$old_striplib"; then
	func_show_eval "$old_striplib $oldlib" 'exit $?'
      fi

      # Do each command in the postinstall commands.
      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
    done

    test -n "$future_libdirs" && \
      func_warning "remember to run \`$progname --finish$future_libdirs'"

    if test -n "$current_libdirs"; then
      # Maybe just do a dry run.
      $opt_dry_run && current_libdirs=" -n$current_libdirs"
      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
    else
      exit $EXIT_SUCCESS
    fi
}

test "$mode" = install && func_mode_install ${1+"$@"}


# func_generate_dlsyms outputname originator pic_p
# Extract symbols from dlprefiles and create ${outputname}S.o with
# a dlpreopen symbol table.
func_generate_dlsyms ()
{
    $opt_debug
    my_outputname="$1"
    my_originator="$2"
    my_pic_p="${3-no}"
    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
    my_dlsyms=

    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
      if test -n "$NM" && test -n "$global_symbol_pipe"; then
	my_dlsyms="${my_outputname}S.c"
      else
	func_error "not configured to extract global symbols from dlpreopened files"
      fi
    fi

    if test -n "$my_dlsyms"; then
      case $my_dlsyms in
      "") ;;
      *.c)
	# Discover the nlist of each of the dlfiles.
	nlist="$output_objdir/${my_outputname}.nm"

	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"

	# Parse the name list into a source file.
	func_verbose "creating $output_objdir/$my_dlsyms"

	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */

#ifdef __cplusplus
extern \"C\" {
#endif

/* External symbol declarations for the compiler. */\
"

	if test "$dlself" = yes; then
	  func_verbose "generating symbol list for \`$output'"

	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"

	  # Add our own program objects to the symbol list.
	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
	  for progfile in $progfiles; do
	    func_verbose "extracting global C symbols from \`$progfile'"
	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
	  done

	  if test -n "$exclude_expsyms"; then
	    $opt_dry_run || {
	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	    }
	  fi

	  if test -n "$export_symbols_regex"; then
	    $opt_dry_run || {
	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	    }
	  fi

	  # Prepare the list of exported symbols
	  if test -z "$export_symbols"; then
	    export_symbols="$output_objdir/$outputname.exp"
	    $opt_dry_run || {
	      $RM $export_symbols
	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
	      case $host in
	      *cygwin* | *mingw* | *cegcc* )
                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
	        ;;
	      esac
	    }
	  else
	    $opt_dry_run || {
	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	      case $host in
	        *cygwin | *mingw* | *cegcc* )
	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
	          ;;
	      esac
	    }
	  fi
	fi

	for dlprefile in $dlprefiles; do
	  func_verbose "extracting global C symbols from \`$dlprefile'"
	  func_basename "$dlprefile"
	  name="$func_basename_result"
	  $opt_dry_run || {
	    eval '$ECHO ": $name " >> "$nlist"'
	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
	  }
	done

	$opt_dry_run || {
	  # Make sure we have at least an empty file.
	  test -f "$nlist" || : > "$nlist"

	  if test -n "$exclude_expsyms"; then
	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
	    $MV "$nlist"T "$nlist"
	  fi

	  # Try sorting and uniquifying the output.
	  if $GREP -v "^: " < "$nlist" |
	      if sort -k 3 </dev/null >/dev/null 2>&1; then
		sort -k 3
	      else
		sort +2
	      fi |
	      uniq > "$nlist"S; then
	    :
	  else
	    $GREP -v "^: " < "$nlist" > "$nlist"S
	  fi

	  if test -f "$nlist"S; then
	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
	  else
	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
	  fi

	  $ECHO >> "$output_objdir/$my_dlsyms" "\

/* The mapping between symbol names and symbols.  */
typedef struct {
  const char *name;
  void *address;
} lt_dlsymlist;
"
	  case $host in
	  *cygwin* | *mingw* | *cegcc* )
	    $ECHO >> "$output_objdir/$my_dlsyms" "\
/* DATA imports from DLLs on WIN32 con't be const, because
   runtime relocations are performed -- see ld's documentation
   on pseudo-relocs.  */"
	    lt_dlsym_const= ;;
	  *osf5*)
	    echo >> "$output_objdir/$my_dlsyms" "\
/* This system does not cope well with relocations in const data */"
	    lt_dlsym_const= ;;
	  *)
	    lt_dlsym_const=const ;;
	  esac

	  $ECHO >> "$output_objdir/$my_dlsyms" "\
extern $lt_dlsym_const lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[];
$lt_dlsym_const lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[] =
{\
  { \"$my_originator\", (void *) 0 },"

	  case $need_lib_prefix in
	  no)
	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
	    ;;
	  *)
	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
	    ;;
	  esac
	  $ECHO >> "$output_objdir/$my_dlsyms" "\
  {0, (void *) 0}
};

/* This works around a problem in FreeBSD linker */
#ifdef FREEBSD_WORKAROUND
static const void *lt_preloaded_setup() {
  return lt_${my_prefix}_LTX_preloaded_symbols;
}
#endif

#ifdef __cplusplus
}
#endif\
"
	} # !$opt_dry_run

	pic_flag_for_symtable=
	case "$compile_command " in
	*" -static "*) ;;
	*)
	  case $host in
	  # compiling the symbol table file with pic_flag works around
	  # a FreeBSD bug that causes programs to crash when -lm is
	  # linked before any other PIC object.  But we must not use
	  # pic_flag when linking with -static.  The problem exists in
	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
	  *-*-hpux*)
	    pic_flag_for_symtable=" $pic_flag"  ;;
	  *)
	    if test "X$my_pic_p" != Xno; then
	      pic_flag_for_symtable=" $pic_flag"
	    fi
	    ;;
	  esac
	  ;;
	esac
	symtab_cflags=
	for arg in $LTCFLAGS; do
	  case $arg in
	  -pie | -fpie | -fPIE) ;;
	  *) symtab_cflags="$symtab_cflags $arg" ;;
	  esac
	done

	# Now compile the dynamic symbol file.
	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'

	# Clean up the generated files.
	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'

	# Transform the symbol file into the correct name.
	symfileobj="$output_objdir/${my_outputname}S.$objext"
	case $host in
	*cygwin* | *mingw* | *cegcc* )
	  if test -f "$output_objdir/$my_outputname.def"; then
	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
	  else
	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
	  fi
	  ;;
	*)
	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
	  ;;
	esac
	;;
      *-*-freebsd*)
	# FreeBSD doesn't need this...
	;;
      *)
	func_fatal_error "unknown suffix for \`$my_dlsyms'"
	;;
      esac
    else
      # We keep going just in case the user didn't refer to
      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
      # really was required.

      # Nullify the symbol file.
      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
    fi
}

# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
func_win32_libid ()
{
  $opt_debug
  win32_libid_type="unknown"
  win32_fileres=`file -L $1 2>/dev/null`
  case $win32_fileres in
  *ar\ archive\ import\ library*) # definitely import
    win32_libid_type="x86 archive import"
    ;;
  *ar\ archive*) # could be an import, or static
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
      win32_nmres=`eval $NM -f posix -A $1 |
	$SED -n -e '
	    1,100{
		/ I /{
		    s,.*,import,
		    p
		    q
		}
	    }'`
      case $win32_nmres in
      import*)  win32_libid_type="x86 archive import";;
      *)        win32_libid_type="x86 archive static";;
      esac
    fi
    ;;
  *DLL*)
    win32_libid_type="x86 DLL"
    ;;
  *executable*) # but shell scripts are "executable" too...
    case $win32_fileres in
    *MS\ Windows\ PE\ Intel*)
      win32_libid_type="x86 DLL"
      ;;
    esac
    ;;
  esac
  $ECHO "$win32_libid_type"
}



# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
    $opt_debug
    f_ex_an_ar_dir="$1"; shift
    f_ex_an_ar_oldlib="$1"
    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
     :
    else
      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
    fi
}


# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
    $opt_debug
    my_gentop="$1"; shift
    my_oldlibs=${1+"$@"}
    my_oldobjs=""
    my_xlib=""
    my_xabs=""
    my_xdir=""

    for my_xlib in $my_oldlibs; do
      # Extract the objects.
      case $my_xlib in
	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
	*) my_xabs=`pwd`"/$my_xlib" ;;
      esac
      func_basename "$my_xlib"
      my_xlib="$func_basename_result"
      my_xlib_u=$my_xlib
      while :; do
        case " $extracted_archives " in
	*" $my_xlib_u "*)
	  func_arith $extracted_serial + 1
	  extracted_serial=$func_arith_result
	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
	*) break ;;
	esac
      done
      extracted_archives="$extracted_archives $my_xlib_u"
      my_xdir="$my_gentop/$my_xlib_u"

      func_mkdir_p "$my_xdir"

      case $host in
      *-darwin*)
	func_verbose "Extracting $my_xabs"
	# Do not bother doing anything if just a dry run
	$opt_dry_run || {
	  darwin_orig_dir=`pwd`
	  cd $my_xdir || exit $?
	  darwin_archive=$my_xabs
	  darwin_curdir=`pwd`
	  darwin_base_archive=`basename "$darwin_archive"`
	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
	  if test -n "$darwin_arches"; then
	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
	    darwin_arch=
	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
	    for darwin_arch in  $darwin_arches ; do
	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
	      cd "$darwin_curdir"
	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
	    done # $darwin_arches
            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
	    darwin_file=
	    darwin_files=
	    for darwin_file in $darwin_filelist; do
	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
	      $LIPO -create -output "$darwin_file" $darwin_files
	    done # $darwin_filelist
	    $RM -rf unfat-$$
	    cd "$darwin_orig_dir"
	  else
	    cd $darwin_orig_dir
	    func_extract_an_archive "$my_xdir" "$my_xabs"
	  fi # $darwin_arches
	} # !$opt_dry_run
	;;
      *)
        func_extract_an_archive "$my_xdir" "$my_xabs"
	;;
      esac
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
    done

    func_extract_archives_result="$my_oldobjs"
}



# func_emit_wrapper_part1 [arg=no]
#
# Emit the first part of a libtool wrapper script on stdout.
# For more information, see the description associated with
# func_emit_wrapper(), below.
func_emit_wrapper_part1 ()
{
	func_emit_wrapper_part1_arg1=no
	if test -n "$1" ; then
	  func_emit_wrapper_part1_arg1=$1
	fi

	$ECHO "\
#! $SHELL

# $output - temporary wrapper script for $objdir/$outputname
# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.

# Sed substitution that helps us do robust quoting.  It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'

# Be Bourne compatible
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

relink_command=\"$relink_command\"

# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
  # install mode needs the following variables:
  generated_by_libtool_version='$macro_version'
  notinst_deplibs='$notinst_deplibs'
else
  # When we are sourced in execute mode, \$file and \$ECHO are already set.
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
    ECHO=\"$qecho\"
    file=\"\$0\"
    # Make sure echo works.
    if test \"X\$1\" = X--no-reexec; then
      # Discard the --no-reexec flag, and continue.
      shift
    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
      # Yippee, \$ECHO works!
      :
    else
      # Restart under the correct shell, and then maybe \$ECHO will work.
      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
    fi
  fi\
"
	$ECHO "\

  # Find the directory that this script lives in.
  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.

  # Follow symbolic links until we get to the real thisdir.
  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
  while test -n \"\$file\"; do
    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`

    # If there was a directory component, then change thisdir.
    if test \"x\$destdir\" != \"x\$file\"; then
      case \"\$destdir\" in
      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
      *) thisdir=\"\$thisdir/\$destdir\" ;;
      esac
    fi

    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
  done
"
}
# end: func_emit_wrapper_part1

# func_emit_wrapper_part2 [arg=no]
#
# Emit the second part of a libtool wrapper script on stdout.
# For more information, see the description associated with
# func_emit_wrapper(), below.
func_emit_wrapper_part2 ()
{
	func_emit_wrapper_part2_arg1=no
	if test -n "$1" ; then
	  func_emit_wrapper_part2_arg1=$1
	fi

	$ECHO "\

  # Usually 'no', except on cygwin/mingw when embedded into
  # the cwrapper.
  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
    # special case for '.'
    if test \"\$thisdir\" = \".\"; then
      thisdir=\`pwd\`
    fi
    # remove .libs from thisdir
    case \"\$thisdir\" in
    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
    $objdir )   thisdir=. ;;
    esac
  fi

  # Try to get the absolute directory name.
  absdir=\`cd \"\$thisdir\" && pwd\`
  test -n \"\$absdir\" && thisdir=\"\$absdir\"
"

	if test "$fast_install" = yes; then
	  $ECHO "\
  program=lt-'$outputname'$exeext
  progdir=\"\$thisdir/$objdir\"

  if test ! -f \"\$progdir/\$program\" ||
     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
       test \"X\$file\" != \"X\$progdir/\$program\"; }; then

    file=\"\$\$-\$program\"

    if test ! -d \"\$progdir\"; then
      $MKDIR \"\$progdir\"
    else
      $RM \"\$progdir/\$file\"
    fi"

	  $ECHO "\

    # relink executable if necessary
    if test -n \"\$relink_command\"; then
      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
      else
	$ECHO \"\$relink_command_output\" >&2
	$RM \"\$progdir/\$file\"
	exit 1
      fi
    fi

    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
    { $RM \"\$progdir/\$program\";
      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
    $RM \"\$progdir/\$file\"
  fi"
	else
	  $ECHO "\
  program='$outputname'
  progdir=\"\$thisdir/$objdir\"
"
	fi

	$ECHO "\

  if test -f \"\$progdir/\$program\"; then"

	# Export our shlibpath_var if we have one.
	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
	  $ECHO "\
    # Add our own library path to $shlibpath_var
    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"

    # Some systems cannot cope with colon-terminated $shlibpath_var
    # The second colon is a workaround for a bug in BeOS R4 sed
    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`

    export $shlibpath_var
"
	fi

	# fixup the dll searchpath if we need to.
	if test -n "$dllsearchpath"; then
	  $ECHO "\
    # Add the dll search path components to the executable PATH
    PATH=$dllsearchpath:\$PATH
"
	fi

	$ECHO "\
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
      # Run the actual program with our arguments.
"
	case $host in
	# Backslashes separate directories on plain windows
	*-*-mingw | *-*-os2* | *-cegcc*)
	  $ECHO "\
      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
	  ;;

	*)
	  $ECHO "\
      exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
	  ;;
	esac
	$ECHO "\
      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
      exit 1
    fi
  else
    # The program doesn't exist.
    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
    exit 1
  fi
fi\
"
}
# end: func_emit_wrapper_part2


# func_emit_wrapper [arg=no]
#
# Emit a libtool wrapper script on stdout.
# Don't directly open a file because we may want to
# incorporate the script contents within a cygwin/mingw
# wrapper executable.  Must ONLY be called from within
# func_mode_link because it depends on a number of variables
# set therein.
#
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take.  If 'yes', then the emitted script
# will assume that the directory in which it is stored is
# the $objdir directory.  This is a cygwin/mingw-specific
# behavior.
func_emit_wrapper ()
{
	func_emit_wrapper_arg1=no
	if test -n "$1" ; then
	  func_emit_wrapper_arg1=$1
	fi

	# split this up so that func_emit_cwrapperexe_src
	# can call each part independently.
	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
}


# func_to_host_path arg
#
# Convert paths to host format when used with build tools.
# Intended for use with "native" mingw (where libtool itself
# is running under the msys shell), or in the following cross-
# build environments:
#    $build          $host
#    mingw (msys)    mingw  [e.g. native]
#    cygwin          mingw
#    *nix + wine     mingw
# where wine is equipped with the `winepath' executable.
# In the native mingw case, the (msys) shell automatically
# converts paths for any non-msys applications it launches,
# but that facility isn't available from inside the cwrapper.
# Similar accommodations are necessary for $host mingw and
# $build cygwin.  Calling this function does no harm for other
# $host/$build combinations not listed above.
#
# ARG is the path (on $build) that should be converted to
# the proper representation for $host. The result is stored
# in $func_to_host_path_result.
func_to_host_path ()
{
  func_to_host_path_result="$1"
  if test -n "$1" ; then
    case $host in
      *mingw* )
        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
        case $build in
          *mingw* ) # actually, msys
            # awkward: cmd appends spaces to result
            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
              $SED -e "$lt_sed_naive_backslashify"`
            ;;
          *cygwin* )
            func_to_host_path_tmp1=`cygpath -w "$1"`
            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
              $SED -e "$lt_sed_naive_backslashify"`
            ;;
          * )
            # Unfortunately, winepath does not exit with a non-zero
            # error code, so we are forced to check the contents of
            # stdout. On the other hand, if the command is not
            # found, the shell will set an exit code of 127 and print
            # *an error message* to stdout. So we must check for both
            # error code of zero AND non-empty stdout, which explains
            # the odd construction:
            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
                $SED -e "$lt_sed_naive_backslashify"`
            else
              # Allow warning below.
              func_to_host_path_result=""
            fi
            ;;
        esac
        if test -z "$func_to_host_path_result" ; then
          func_error "Could not determine host path corresponding to"
          func_error "  '$1'"
          func_error "Continuing, but uninstalled executables may not work."
          # Fallback:
          func_to_host_path_result="$1"
        fi
        ;;
    esac
  fi
}
# end: func_to_host_path

# func_to_host_pathlist arg
#
# Convert pathlists to host format when used with build tools.
# See func_to_host_path(), above. This function supports the
# following $build/$host combinations (but does no harm for
# combinations not listed here):
#    $build          $host
#    mingw (msys)    mingw  [e.g. native]
#    cygwin          mingw
#    *nix + wine     mingw
#
# Path separators are also converted from $build format to
# $host format. If ARG begins or ends with a path separator
# character, it is preserved (but converted to $host format)
# on output.
#
# ARG is a pathlist (on $build) that should be converted to
# the proper representation on $host. The result is stored
# in $func_to_host_pathlist_result.
func_to_host_pathlist ()
{
  func_to_host_pathlist_result="$1"
  if test -n "$1" ; then
    case $host in
      *mingw* )
        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
        # Remove leading and trailing path separator characters from
        # ARG. msys behavior is inconsistent here, cygpath turns them
        # into '.;' and ';.', and winepath ignores them completely.
        func_to_host_pathlist_tmp2="$1"
        # Once set for this call, this variable should not be
        # reassigned. It is used in tha fallback case.
        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
          $SED -e 's|^:*||' -e 's|:*$||'`
        case $build in
          *mingw* ) # Actually, msys.
            # Awkward: cmd appends spaces to result.
            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
              $SED -e "$lt_sed_naive_backslashify"`
            ;;
          *cygwin* )
            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
              $SED -e "$lt_sed_naive_backslashify"`
            ;;
          * )
            # unfortunately, winepath doesn't convert pathlists
            func_to_host_pathlist_result=""
            func_to_host_pathlist_oldIFS=$IFS
            IFS=:
            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
              IFS=$func_to_host_pathlist_oldIFS
              if test -n "$func_to_host_pathlist_f" ; then
                func_to_host_path "$func_to_host_pathlist_f"
                if test -n "$func_to_host_path_result" ; then
                  if test -z "$func_to_host_pathlist_result" ; then
                    func_to_host_pathlist_result="$func_to_host_path_result"
                  else
                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
                  fi
                fi
              fi
              IFS=:
            done
            IFS=$func_to_host_pathlist_oldIFS
            ;;
        esac
        if test -z "$func_to_host_pathlist_result" ; then
          func_error "Could not determine the host path(s) corresponding to"
          func_error "  '$1'"
          func_error "Continuing, but uninstalled executables may not work."
          # Fallback. This may break if $1 contains DOS-style drive
          # specifications. The fix is not to complicate the expression
          # below, but for the user to provide a working wine installation
          # with winepath so that path translation in the cross-to-mingw
          # case works properly.
          lt_replace_pathsep_nix_to_dos="s|:|;|g"
          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
            $SED -e "$lt_replace_pathsep_nix_to_dos"`
        fi
        # Now, add the leading and trailing path separators back
        case "$1" in
          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
            ;;
        esac
        case "$1" in
          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
            ;;
        esac
        ;;
    esac
  fi
}
# end: func_to_host_pathlist

# func_emit_cwrapperexe_src
# emit the source code for a wrapper executable on stdout
# Must ONLY be called from within func_mode_link because
# it depends on a number of variable set therein.
func_emit_cwrapperexe_src ()
{
	cat <<EOF

/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION

   The $output program cannot be directly executed until all the libtool
   libraries that it depends on are installed.

   This wrapper executable should never be moved out of the build directory.
   If it is, it will not operate correctly.

   Currently, it simply execs the wrapper *script* "$SHELL $output",
   but could eventually absorb all of the scripts functionality and
   exec $objdir/$outputname directly.
*/
EOF
	    cat <<"EOF"
#include <stdio.h>
#include <stdlib.h>
#ifdef _MSC_VER
# include <direct.h>
# include <process.h>
# include <io.h>
# define setmode _setmode
#else
# include <unistd.h>
# include <stdint.h>
# ifdef __CYGWIN__
#  include <io.h>
#  define HAVE_SETENV
#  ifdef __STRICT_ANSI__
char *realpath (const char *, char *);
int putenv (char *);
int setenv (const char *, const char *, int);
#  endif
# endif
#endif
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>

#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
#elif defined(MAXPATHLEN)
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
#endif

#ifndef S_IXOTH
# define S_IXOTH 0
#endif
#ifndef S_IXGRP
# define S_IXGRP 0
#endif

#ifdef _MSC_VER
# define S_IXUSR _S_IEXEC
# define stat _stat
# ifndef _INTPTR_T_DEFINED
#  define intptr_t int
# endif
#endif

#ifndef DIR_SEPARATOR
# define DIR_SEPARATOR '/'
# define PATH_SEPARATOR ':'
#endif

#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  defined (__OS2__)
# define HAVE_DOS_BASED_FILE_SYSTEM
# define FOPEN_WB "wb"
# ifndef DIR_SEPARATOR_2
#  define DIR_SEPARATOR_2 '\\'
# endif
# ifndef PATH_SEPARATOR_2
#  define PATH_SEPARATOR_2 ';'
# endif
#endif

#ifndef DIR_SEPARATOR_2
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
#else /* DIR_SEPARATOR_2 */
# define IS_DIR_SEPARATOR(ch) \
	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */

#ifndef PATH_SEPARATOR_2
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
#else /* PATH_SEPARATOR_2 */
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
#endif /* PATH_SEPARATOR_2 */

#ifdef __CYGWIN__
# define FOPEN_WB "wb"
#endif

#ifndef FOPEN_WB
# define FOPEN_WB "w"
#endif
#ifndef _O_BINARY
# define _O_BINARY 0
#endif

#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
  if (stale) { free ((void *) stale); stale = 0; } \
} while (0)

#undef LTWRAPPER_DEBUGPRINTF
#if defined DEBUGWRAPPER
# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
static void
ltwrapper_debugprintf (const char *fmt, ...)
{
    va_list args;
    va_start (args, fmt);
    (void) vfprintf (stderr, fmt, args);
    va_end (args);
}
#else
# define LTWRAPPER_DEBUGPRINTF(args)
#endif

const char *program_name = NULL;

void *xmalloc (size_t num);
char *xstrdup (const char *string);
const char *base_name (const char *name);
char *find_executable (const char *wrapper);
char *chase_symlinks (const char *pathspec);
int make_executable (const char *path);
int check_executable (const char *path);
char *strendzap (char *str, const char *pat);
void lt_fatal (const char *message, ...);
void lt_setenv (const char *name, const char *value);
char *lt_extend_str (const char *orig_value, const char *add, int to_end);
void lt_opt_process_env_set (const char *arg);
void lt_opt_process_env_prepend (const char *arg);
void lt_opt_process_env_append (const char *arg);
int lt_split_name_value (const char *arg, char** name, char** value);
void lt_update_exe_path (const char *name, const char *value);
void lt_update_lib_path (const char *name, const char *value);

static const char *script_text_part1 =
EOF

	    func_emit_wrapper_part1 yes |
	        $SED -e 's/\([\\"]\)/\\\1/g' \
	             -e 's/^/  "/' -e 's/$/\\n"/'
	    echo ";"
	    cat <<EOF

static const char *script_text_part2 =
EOF
	    func_emit_wrapper_part2 yes |
	        $SED -e 's/\([\\"]\)/\\\1/g' \
	             -e 's/^/  "/' -e 's/$/\\n"/'
	    echo ";"

	    cat <<EOF
const char * MAGIC_EXE = "$magic_exe";
const char * LIB_PATH_VARNAME = "$shlibpath_var";
EOF

	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
              func_to_host_pathlist "$temp_rpath"
	      cat <<EOF
const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
EOF
	    else
	      cat <<"EOF"
const char * LIB_PATH_VALUE   = "";
EOF
	    fi

	    if test -n "$dllsearchpath"; then
              func_to_host_pathlist "$dllsearchpath:"
	      cat <<EOF
const char * EXE_PATH_VARNAME = "PATH";
const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
EOF
	    else
	      cat <<"EOF"
const char * EXE_PATH_VARNAME = "";
const char * EXE_PATH_VALUE   = "";
EOF
	    fi

	    if test "$fast_install" = yes; then
	      cat <<EOF
const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
EOF
	    else
	      cat <<EOF
const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
EOF
	    fi


	    cat <<"EOF"

#define LTWRAPPER_OPTION_PREFIX         "--lt-"
#define LTWRAPPER_OPTION_PREFIX_LENGTH  5

static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;

static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";

static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
  /* argument is putenv-style "foo=bar", value of foo is set to bar */

static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */

static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */

int
main (int argc, char *argv[])
{
  char **newargz;
  int  newargc;
  char *tmp_pathspec;
  char *actual_cwrapper_path;
  char *actual_cwrapper_name;
  char *target_name;
  char *lt_argv_zero;
  intptr_t rval = 127;

  int i;

  program_name = (char *) xstrdup (base_name (argv[0]));
  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));

  /* very simple arg parsing; don't want to rely on getopt */
  for (i = 1; i < argc; i++)
    {
      if (strcmp (argv[i], dumpscript_opt) == 0)
	{
EOF
	    case "$host" in
	      *mingw* | *cygwin* )
		# make stdout use "unix" line endings
		echo "          setmode(1,_O_BINARY);"
		;;
	      esac

	    cat <<"EOF"
	  printf ("%s", script_text_part1);
	  printf ("%s", script_text_part2);
	  return 0;
	}
    }

  newargz = XMALLOC (char *, argc + 1);
  tmp_pathspec = find_executable (argv[0]);
  if (tmp_pathspec == NULL)
    lt_fatal ("Couldn't find %s", argv[0]);
  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
			  tmp_pathspec));

  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
			  actual_cwrapper_path));
  XFREE (tmp_pathspec);

  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
  strendzap (actual_cwrapper_path, actual_cwrapper_name);

  /* wrapper name transforms */
  strendzap (actual_cwrapper_name, ".exe");
  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
  XFREE (actual_cwrapper_name);
  actual_cwrapper_name = tmp_pathspec;
  tmp_pathspec = 0;

  /* target_name transforms -- use actual target program name; might have lt- prefix */
  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
  strendzap (target_name, ".exe");
  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
  XFREE (target_name);
  target_name = tmp_pathspec;
  tmp_pathspec = 0;

  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
			  target_name));
EOF

	    cat <<EOF
  newargz[0] =
    XMALLOC (char, (strlen (actual_cwrapper_path) +
		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
  strcpy (newargz[0], actual_cwrapper_path);
  strcat (newargz[0], "$objdir");
  strcat (newargz[0], "/");
EOF

	    cat <<"EOF"
  /* stop here, and copy so we don't have to do this twice */
  tmp_pathspec = xstrdup (newargz[0]);

  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
  strcat (newargz[0], actual_cwrapper_name);

  /* DO want the lt- prefix here if it exists, so use target_name */
  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
  XFREE (tmp_pathspec);
  tmp_pathspec = NULL;
EOF

	    case $host_os in
	      mingw*)
	    cat <<"EOF"
  {
    char* p;
    while ((p = strchr (newargz[0], '\\')) != NULL)
      {
	*p = '/';
      }
    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
      {
	*p = '/';
      }
  }
EOF
	    ;;
	    esac

	    cat <<"EOF"
  XFREE (target_name);
  XFREE (actual_cwrapper_path);
  XFREE (actual_cwrapper_name);

  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);

  newargc=0;
  for (i = 1; i < argc; i++)
    {
      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
        {
          if (argv[i][env_set_opt_len] == '=')
            {
              const char *p = argv[i] + env_set_opt_len + 1;
              lt_opt_process_env_set (p);
            }
          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
            {
              lt_opt_process_env_set (argv[++i]); /* don't copy */
            }
          else
            lt_fatal ("%s missing required argument", env_set_opt);
          continue;
        }
      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
        {
          if (argv[i][env_prepend_opt_len] == '=')
            {
              const char *p = argv[i] + env_prepend_opt_len + 1;
              lt_opt_process_env_prepend (p);
            }
          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
            {
              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
            }
          else
            lt_fatal ("%s missing required argument", env_prepend_opt);
          continue;
        }
      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
        {
          if (argv[i][env_append_opt_len] == '=')
            {
              const char *p = argv[i] + env_append_opt_len + 1;
              lt_opt_process_env_append (p);
            }
          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
            {
              lt_opt_process_env_append (argv[++i]); /* don't copy */
            }
          else
            lt_fatal ("%s missing required argument", env_append_opt);
          continue;
        }
      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
        {
          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
             namespace, but it is not one of the ones we know about and
             have already dealt with, above (inluding dump-script), then
             report an error. Otherwise, targets might begin to believe
             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
             namespace. The first time any user complains about this, we'll
             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
             or a configure.ac-settable value.
           */
          lt_fatal ("Unrecognized option in %s namespace: '%s'",
                    ltwrapper_option_prefix, argv[i]);
        }
      /* otherwise ... */
      newargz[++newargc] = xstrdup (argv[i]);
    }
  newargz[++newargc] = NULL;

  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
  for (i = 0; i < newargc; i++)
    {
      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
    }

EOF

	    case $host_os in
	      mingw*)
		cat <<"EOF"
  /* execv doesn't actually work on mingw as expected on unix */
  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
  if (rval == -1)
    {
      /* failed to start process */
      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
      return 127;
    }
  return rval;
EOF
		;;
	      *)
		cat <<"EOF"
  execv (lt_argv_zero, newargz);
  return rval; /* =127, but avoids unused variable warning */
EOF
		;;
	    esac

	    cat <<"EOF"
}

void *
xmalloc (size_t num)
{
  void *p = (void *) malloc (num);
  if (!p)
    lt_fatal ("Memory exhausted");

  return p;
}

char *
xstrdup (const char *string)
{
  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
			  string) : NULL;
}

const char *
base_name (const char *name)
{
  const char *base;

#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  /* Skip over the disk name in MSDOS pathnames. */
  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
    name += 2;
#endif

  for (base = name; *name; name++)
    if (IS_DIR_SEPARATOR (*name))
      base = name + 1;
  return base;
}

int
check_executable (const char *path)
{
  struct stat st;

  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
			  path ? (*path ? path : "EMPTY!") : "NULL!"));
  if ((!path) || (!*path))
    return 0;

  if ((stat (path, &st) >= 0)
      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
    return 1;
  else
    return 0;
}

int
make_executable (const char *path)
{
  int rval = 0;
  struct stat st;

  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
			  path ? (*path ? path : "EMPTY!") : "NULL!"));
  if ((!path) || (!*path))
    return 0;

  if (stat (path, &st) >= 0)
    {
      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
    }
  return rval;
}

/* Searches for the full path of the wrapper.  Returns
   newly allocated full path name if found, NULL otherwise
   Does not chase symlinks, even on platforms that support them.
*/
char *
find_executable (const char *wrapper)
{
  int has_slash = 0;
  const char *p;
  const char *p_next;
  /* static buffer for getcwd */
  char tmp[LT_PATHMAX + 1];
  int tmp_len;
  char *concat_name;

  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));

  if ((wrapper == NULL) || (*wrapper == '\0'))
    return NULL;

  /* Absolute path? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
    {
      concat_name = xstrdup (wrapper);
      if (check_executable (concat_name))
	return concat_name;
      XFREE (concat_name);
    }
  else
    {
#endif
      if (IS_DIR_SEPARATOR (wrapper[0]))
	{
	  concat_name = xstrdup (wrapper);
	  if (check_executable (concat_name))
	    return concat_name;
	  XFREE (concat_name);
	}
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    }
#endif

  for (p = wrapper; *p; p++)
    if (*p == '/')
      {
	has_slash = 1;
	break;
      }
  if (!has_slash)
    {
      /* no slashes; search PATH */
      const char *path = getenv ("PATH");
      if (path != NULL)
	{
	  for (p = path; *p; p = p_next)
	    {
	      const char *q;
	      size_t p_len;
	      for (q = p; *q; q++)
		if (IS_PATH_SEPARATOR (*q))
		  break;
	      p_len = q - p;
	      p_next = (*q == '\0' ? q : q + 1);
	      if (p_len == 0)
		{
		  /* empty path: current directory */
		  if (getcwd (tmp, LT_PATHMAX) == NULL)
		    lt_fatal ("getcwd failed");
		  tmp_len = strlen (tmp);
		  concat_name =
		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
		  memcpy (concat_name, tmp, tmp_len);
		  concat_name[tmp_len] = '/';
		  strcpy (concat_name + tmp_len + 1, wrapper);
		}
	      else
		{
		  concat_name =
		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
		  memcpy (concat_name, p, p_len);
		  concat_name[p_len] = '/';
		  strcpy (concat_name + p_len + 1, wrapper);
		}
	      if (check_executable (concat_name))
		return concat_name;
	      XFREE (concat_name);
	    }
	}
      /* not found in PATH; assume curdir */
    }
  /* Relative path | not found in path: prepend cwd */
  if (getcwd (tmp, LT_PATHMAX) == NULL)
    lt_fatal ("getcwd failed");
  tmp_len = strlen (tmp);
  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
  memcpy (concat_name, tmp, tmp_len);
  concat_name[tmp_len] = '/';
  strcpy (concat_name + tmp_len + 1, wrapper);

  if (check_executable (concat_name))
    return concat_name;
  XFREE (concat_name);
  return NULL;
}

char *
chase_symlinks (const char *pathspec)
{
#ifndef S_ISLNK
  return xstrdup (pathspec);
#else
  char buf[LT_PATHMAX];
  struct stat s;
  char *tmp_pathspec = xstrdup (pathspec);
  char *p;
  int has_symlinks = 0;
  while (strlen (tmp_pathspec) && !has_symlinks)
    {
      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
			      tmp_pathspec));
      if (lstat (tmp_pathspec, &s) == 0)
	{
	  if (S_ISLNK (s.st_mode) != 0)
	    {
	      has_symlinks = 1;
	      break;
	    }

	  /* search backwards for last DIR_SEPARATOR */
	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
	    p--;
	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
	    {
	      /* no more DIR_SEPARATORS left */
	      break;
	    }
	  *p = '\0';
	}
      else
	{
	  char *errstr = strerror (errno);
	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
	}
    }
  XFREE (tmp_pathspec);

  if (!has_symlinks)
    {
      return xstrdup (pathspec);
    }

  tmp_pathspec = realpath (pathspec, buf);
  if (tmp_pathspec == 0)
    {
      lt_fatal ("Could not follow symlinks for %s", pathspec);
    }
  return xstrdup (tmp_pathspec);
#endif
}

char *
strendzap (char *str, const char *pat)
{
  size_t len, patlen;

  assert (str != NULL);
  assert (pat != NULL);

  len = strlen (str);
  patlen = strlen (pat);

  if (patlen <= len)
    {
      str += len - patlen;
      if (strcmp (str, pat) == 0)
	*str = '\0';
    }
  return str;
}

static void
lt_error_core (int exit_status, const char *mode,
	       const char *message, va_list ap)
{
  fprintf (stderr, "%s: %s: ", program_name, mode);
  vfprintf (stderr, message, ap);
  fprintf (stderr, ".\n");

  if (exit_status >= 0)
    exit (exit_status);
}

void
lt_fatal (const char *message, ...)
{
  va_list ap;
  va_start (ap, message);
  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
  va_end (ap);
}

void
lt_setenv (const char *name, const char *value)
{
  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
                          (name ? name : "<NULL>"),
                          (value ? value : "<NULL>")));
  {
#ifdef HAVE_SETENV
    /* always make a copy, for consistency with !HAVE_SETENV */
    char *str = xstrdup (value);
    setenv (name, str, 1);
#else
    int len = strlen (name) + 1 + strlen (value) + 1;
    char *str = XMALLOC (char, len);
    sprintf (str, "%s=%s", name, value);
    if (putenv (str) != EXIT_SUCCESS)
      {
        XFREE (str);
      }
#endif
  }
}

char *
lt_extend_str (const char *orig_value, const char *add, int to_end)
{
  char *new_value;
  if (orig_value && *orig_value)
    {
      int orig_value_len = strlen (orig_value);
      int add_len = strlen (add);
      new_value = XMALLOC (char, add_len + orig_value_len + 1);
      if (to_end)
        {
          strcpy (new_value, orig_value);
          strcpy (new_value + orig_value_len, add);
        }
      else
        {
          strcpy (new_value, add);
          strcpy (new_value + add_len, orig_value);
        }
    }
  else
    {
      new_value = xstrdup (add);
    }
  return new_value;
}

int
lt_split_name_value (const char *arg, char** name, char** value)
{
  const char *p;
  int len;
  if (!arg || !*arg)
    return 1;

  p = strchr (arg, (int)'=');

  if (!p)
    return 1;

  *value = xstrdup (++p);

  len = strlen (arg) - strlen (*value);
  *name = XMALLOC (char, len);
  strncpy (*name, arg, len-1);
  (*name)[len - 1] = '\0';

  return 0;
}

void
lt_opt_process_env_set (const char *arg)
{
  char *name = NULL;
  char *value = NULL;

  if (lt_split_name_value (arg, &name, &value) != 0)
    {
      XFREE (name);
      XFREE (value);
      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
    }

  lt_setenv (name, value);
  XFREE (name);
  XFREE (value);
}

void
lt_opt_process_env_prepend (const char *arg)
{
  char *name = NULL;
  char *value = NULL;
  char *new_value = NULL;

  if (lt_split_name_value (arg, &name, &value) != 0)
    {
      XFREE (name);
      XFREE (value);
      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
    }

  new_value = lt_extend_str (getenv (name), value, 0);
  lt_setenv (name, new_value);
  XFREE (new_value);
  XFREE (name);
  XFREE (value);
}

void
lt_opt_process_env_append (const char *arg)
{
  char *name = NULL;
  char *value = NULL;
  char *new_value = NULL;

  if (lt_split_name_value (arg, &name, &value) != 0)
    {
      XFREE (name);
      XFREE (value);
      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
    }

  new_value = lt_extend_str (getenv (name), value, 1);
  lt_setenv (name, new_value);
  XFREE (new_value);
  XFREE (name);
  XFREE (value);
}

void
lt_update_exe_path (const char *name, const char *value)
{
  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
                          (name ? name : "<NULL>"),
                          (value ? value : "<NULL>")));

  if (name && *name && value && *value)
    {
      char *new_value = lt_extend_str (getenv (name), value, 0);
      /* some systems can't cope with a ':'-terminated path #' */
      int len = strlen (new_value);
      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
        {
          new_value[len-1] = '\0';
        }
      lt_setenv (name, new_value);
      XFREE (new_value);
    }
}

void
lt_update_lib_path (const char *name, const char *value)
{
  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
                          (name ? name : "<NULL>"),
                          (value ? value : "<NULL>")));

  if (name && *name && value && *value)
    {
      char *new_value = lt_extend_str (getenv (name), value, 0);
      lt_setenv (name, new_value);
      XFREE (new_value);
    }
}


EOF
}
# end: func_emit_cwrapperexe_src

# func_mode_link arg...
func_mode_link ()
{
    $opt_debug
    case $host in
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
      # It is impossible to link a dll without this setting, and
      # we shouldn't force the makefile maintainer to figure out
      # which system we are compiling for in order to pass an extra
      # flag for every libtool invocation.
      # allow_undefined=no

      # FIXME: Unfortunately, there are problems with the above when trying
      # to make a dll which has undefined symbols, in which case not
      # even a static library is built.  For now, we need to specify
      # -no-undefined on the libtool link line when we can be certain
      # that all symbols are satisfied, otherwise we get a static library.
      allow_undefined=yes
      ;;
    *)
      allow_undefined=yes
      ;;
    esac
    libtool_args=$nonopt
    base_compile="$nonopt $@"
    compile_command=$nonopt
    finalize_command=$nonopt

    compile_rpath=
    finalize_rpath=
    compile_shlibpath=
    finalize_shlibpath=
    convenience=
    old_convenience=
    deplibs=
    old_deplibs=
    compiler_flags=
    linker_flags=
    dllsearchpath=
    lib_search_path=`pwd`
    inst_prefix_dir=
    new_inherited_linker_flags=

    avoid_version=no
    dlfiles=
    dlprefiles=
    dlself=no
    export_dynamic=no
    export_symbols=
    export_symbols_regex=
    generated=
    libobjs=
    ltlibs=
    module=no
    no_install=no
    objs=
    non_pic_objects=
    precious_files_regex=
    prefer_static_libs=no
    preload=no
    prev=
    prevarg=
    release=
    rpath=
    xrpath=
    perm_rpath=
    temp_rpath=
    thread_safe=no
    vinfo=
    vinfo_number=no
    weak_libs=
    single_module="${wl}-single_module"
    func_infer_tag $base_compile

    # We need to know -static, to get the right output filenames.
    for arg
    do
      case $arg in
      -shared)
	test "$build_libtool_libs" != yes && \
	  func_fatal_configuration "can not build a shared library"
	build_old_libs=no
	break
	;;
      -all-static | -static | -static-libtool-libs)
	case $arg in
	-all-static)
	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
	    func_warning "complete static linking is impossible in this configuration"
	  fi
	  if test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=yes
	  ;;
	-static)
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=built
	  ;;
	-static-libtool-libs)
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=yes
	  ;;
	esac
	build_libtool_libs=no
	build_old_libs=yes
	break
	;;
      esac
    done

    # See if our shared archives depend on static archives.
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes

    # Go through the arguments, transforming them on the way.
    while test "$#" -gt 0; do
      arg="$1"
      shift
      func_quote_for_eval "$arg"
      qarg=$func_quote_for_eval_unquoted_result
      func_append libtool_args " $func_quote_for_eval_result"

      # If the previous option needs an argument, assign it.
      if test -n "$prev"; then
	case $prev in
	output)
	  func_append compile_command " @OUTPUT@"
	  func_append finalize_command " @OUTPUT@"
	  ;;
	esac

	case $prev in
	dlfiles|dlprefiles)
	  if test "$preload" = no; then
	    # Add the symbol object into the linking commands.
	    func_append compile_command " @SYMFILE@"
	    func_append finalize_command " @SYMFILE@"
	    preload=yes
	  fi
	  case $arg in
	  *.la | *.lo) ;;  # We handle these cases below.
	  force)
	    if test "$dlself" = no; then
	      dlself=needless
	      export_dynamic=yes
	    fi
	    prev=
	    continue
	    ;;
	  self)
	    if test "$prev" = dlprefiles; then
	      dlself=yes
	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
	      dlself=yes
	    else
	      dlself=needless
	      export_dynamic=yes
	    fi
	    prev=
	    continue
	    ;;
	  *)
	    if test "$prev" = dlfiles; then
	      dlfiles="$dlfiles $arg"
	    else
	      dlprefiles="$dlprefiles $arg"
	    fi
	    prev=
	    continue
	    ;;
	  esac
	  ;;
	expsyms)
	  export_symbols="$arg"
	  test -f "$arg" \
	    || func_fatal_error "symbol file \`$arg' does not exist"
	  prev=
	  continue
	  ;;
	expsyms_regex)
	  export_symbols_regex="$arg"
	  prev=
	  continue
	  ;;
	framework)
	  case $host in
	    *-*-darwin*)
	      case "$deplibs " in
		*" $qarg.ltframework "*) ;;
		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
		   ;;
	      esac
	      ;;
	  esac
	  prev=
	  continue
	  ;;
	inst_prefix)
	  inst_prefix_dir="$arg"
	  prev=
	  continue
	  ;;
	objectlist)
	  if test -f "$arg"; then
	    save_arg=$arg
	    moreargs=
	    for fil in `cat "$save_arg"`
	    do
#	      moreargs="$moreargs $fil"
	      arg=$fil
	      # A libtool-controlled object.

	      # Check to see that this really is a libtool object.
	      if func_lalib_unsafe_p "$arg"; then
		pic_object=
		non_pic_object=

		# Read the .lo file
		func_source "$arg"

		if test -z "$pic_object" ||
		   test -z "$non_pic_object" ||
		   test "$pic_object" = none &&
		   test "$non_pic_object" = none; then
		  func_fatal_error "cannot find name of object for \`$arg'"
		fi

		# Extract subdirectory from the argument.
		func_dirname "$arg" "/" ""
		xdir="$func_dirname_result"

		if test "$pic_object" != none; then
		  # Prepend the subdirectory the object is found in.
		  pic_object="$xdir$pic_object"

		  if test "$prev" = dlfiles; then
		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
		      dlfiles="$dlfiles $pic_object"
		      prev=
		      continue
		    else
		      # If libtool objects are unsupported, then we need to preload.
		      prev=dlprefiles
		    fi
		  fi

		  # CHECK ME:  I think I busted this.  -Ossama
		  if test "$prev" = dlprefiles; then
		    # Preload the old-style object.
		    dlprefiles="$dlprefiles $pic_object"
		    prev=
		  fi

		  # A PIC object.
		  func_append libobjs " $pic_object"
		  arg="$pic_object"
		fi

		# Non-PIC object.
		if test "$non_pic_object" != none; then
		  # Prepend the subdirectory the object is found in.
		  non_pic_object="$xdir$non_pic_object"

		  # A standard non-PIC object
		  func_append non_pic_objects " $non_pic_object"
		  if test -z "$pic_object" || test "$pic_object" = none ; then
		    arg="$non_pic_object"
		  fi
		else
		  # If the PIC object exists, use it instead.
		  # $xdir was prepended to $pic_object above.
		  non_pic_object="$pic_object"
		  func_append non_pic_objects " $non_pic_object"
		fi
	      else
		# Only an error if not doing a dry-run.
		if $opt_dry_run; then
		  # Extract subdirectory from the argument.
		  func_dirname "$arg" "/" ""
		  xdir="$func_dirname_result"

		  func_lo2o "$arg"
		  pic_object=$xdir$objdir/$func_lo2o_result
		  non_pic_object=$xdir$func_lo2o_result
		  func_append libobjs " $pic_object"
		  func_append non_pic_objects " $non_pic_object"
	        else
		  func_fatal_error "\`$arg' is not a valid libtool object"
		fi
	      fi
	    done
	  else
	    func_fatal_error "link input file \`$arg' does not exist"
	  fi
	  arg=$save_arg
	  prev=
	  continue
	  ;;
	precious_regex)
	  precious_files_regex="$arg"
	  prev=
	  continue
	  ;;
	release)
	  release="-$arg"
	  prev=
	  continue
	  ;;
	rpath | xrpath)
	  # We need an absolute path.
	  case $arg in
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
	  *)
	    func_fatal_error "only absolute run-paths are allowed"
	    ;;
	  esac
	  if test "$prev" = rpath; then
	    case "$rpath " in
	    *" $arg "*) ;;
	    *) rpath="$rpath $arg" ;;
	    esac
	  else
	    case "$xrpath " in
	    *" $arg "*) ;;
	    *) xrpath="$xrpath $arg" ;;
	    esac
	  fi
	  prev=
	  continue
	  ;;
	shrext)
	  shrext_cmds="$arg"
	  prev=
	  continue
	  ;;
	weak)
	  weak_libs="$weak_libs $arg"
	  prev=
	  continue
	  ;;
	xcclinker)
	  linker_flags="$linker_flags $qarg"
	  compiler_flags="$compiler_flags $qarg"
	  prev=
	  func_append compile_command " $qarg"
	  func_append finalize_command " $qarg"
	  continue
	  ;;
	xcompiler)
	  compiler_flags="$compiler_flags $qarg"
	  prev=
	  func_append compile_command " $qarg"
	  func_append finalize_command " $qarg"
	  continue
	  ;;
	xlinker)
	  linker_flags="$linker_flags $qarg"
	  compiler_flags="$compiler_flags $wl$qarg"
	  prev=
	  func_append compile_command " $wl$qarg"
	  func_append finalize_command " $wl$qarg"
	  continue
	  ;;
	*)
	  eval "$prev=\"\$arg\""
	  prev=
	  continue
	  ;;
	esac
      fi # test -n "$prev"

      prevarg="$arg"

      case $arg in
      -all-static)
	if test -n "$link_static_flag"; then
	  # See comment for -static flag below, for more details.
	  func_append compile_command " $link_static_flag"
	  func_append finalize_command " $link_static_flag"
	fi
	continue
	;;

      -allow-undefined)
	# FIXME: remove this flag sometime in the future.
	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
	;;

      -avoid-version)
	avoid_version=yes
	continue
	;;

      -dlopen)
	prev=dlfiles
	continue
	;;

      -dlpreopen)
	prev=dlprefiles
	continue
	;;

      -export-dynamic)
	export_dynamic=yes
	continue
	;;

      -export-symbols | -export-symbols-regex)
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
	  func_fatal_error "more than one -exported-symbols argument is not allowed"
	fi
	if test "X$arg" = "X-export-symbols"; then
	  prev=expsyms
	else
	  prev=expsyms_regex
	fi
	continue
	;;

      -framework)
	prev=framework
	continue
	;;

      -inst-prefix-dir)
	prev=inst_prefix
	continue
	;;

      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
      # so, if we see these flags be careful not to treat them like -L
      -L[A-Z][A-Z]*:*)
	case $with_gcc/$host in
	no/*-*-irix* | /*-*-irix*)
	  func_append compile_command " $arg"
	  func_append finalize_command " $arg"
	  ;;
	esac
	continue
	;;

      -L*)
	func_stripname '-L' '' "$arg"
	dir=$func_stripname_result
	if test -z "$dir"; then
	  if test "$#" -gt 0; then
	    func_fatal_error "require no space between \`-L' and \`$1'"
	  else
	    func_fatal_error "need path for \`-L' option"
	  fi
	fi
	# We need an absolute path.
	case $dir in
	[\\/]* | [A-Za-z]:[\\/]*) ;;
	*)
	  absdir=`cd "$dir" && pwd`
	  test -z "$absdir" && \
	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
	  dir="$absdir"
	  ;;
	esac
	case "$deplibs " in
	*" -L$dir "*) ;;
	*)
	  deplibs="$deplibs -L$dir"
	  lib_search_path="$lib_search_path $dir"
	  ;;
	esac
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
	  case :$dllsearchpath: in
	  *":$dir:"*) ;;
	  ::) dllsearchpath=$dir;;
	  *) dllsearchpath="$dllsearchpath:$dir";;
	  esac
	  case :$dllsearchpath: in
	  *":$testbindir:"*) ;;
	  ::) dllsearchpath=$testbindir;;
	  *) dllsearchpath="$dllsearchpath:$testbindir";;
	  esac
	  ;;
	esac
	continue
	;;

      -l*)
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
	  case $host in
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
	    # These systems don't actually have a C or math library (as such)
	    continue
	    ;;
	  *-*-os2*)
	    # These systems don't actually have a C library (as such)
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	    # Do not include libc due to us having libc/libc_r.
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-rhapsody* | *-*-darwin1.[012])
	    # Rhapsody C and math libraries are in the System framework
	    deplibs="$deplibs System.ltframework"
	    continue
	    ;;
	  *-*-sco3.2v5* | *-*-sco5v6*)
	    # Causes problems with __ctype
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
	    # Compiler inserts libc in the correct place for threads to work
	    test "X$arg" = "X-lc" && continue
	    ;;
	  esac
	elif test "X$arg" = "X-lc_r"; then
	 case $host in
	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	   # Do not include libc_r directly, use -pthread flag.
	   continue
	   ;;
	 esac
	fi
	deplibs="$deplibs $arg"
	continue
	;;

      -module)
	module=yes
	continue
	;;

      # Tru64 UNIX uses -model [arg] to determine the layout of C++
      # classes, name mangling, and exception handling.
      # Darwin uses the -arch flag to determine output architecture.
      -model|-arch|-isysroot)
	compiler_flags="$compiler_flags $arg"
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
	prev=xcompiler
	continue
	;;

      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
	compiler_flags="$compiler_flags $arg"
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
	case "$new_inherited_linker_flags " in
	    *" $arg "*) ;;
	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
	esac
	deplibs="$deplibs $arg"
	continue
	;;

      -multi_module)
	single_module="${wl}-multi_module"
	continue
	;;

      -no-fast-install)
	fast_install=no
	continue
	;;

      -no-install)
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
	  # The PATH hackery in wrapper scripts is required on Windows
	  # and Darwin in order for the loader to find any dlls it needs.
	  func_warning "\`-no-install' is ignored for $host"
	  func_warning "assuming \`-no-fast-install' instead"
	  fast_install=no
	  ;;
	*) no_install=yes ;;
	esac
	continue
	;;

      -no-undefined)
	allow_undefined=no
	continue
	;;

      -objectlist)
	prev=objectlist
	continue
	;;

      -o) prev=output ;;

      -precious-files-regex)
	prev=precious_regex
	continue
	;;

      -release)
	prev=release
	continue
	;;

      -rpath)
	prev=rpath
	continue
	;;

      -R)
	prev=xrpath
	continue
	;;

      -R*)
	func_stripname '-R' '' "$arg"
	dir=$func_stripname_result
	# We need an absolute path.
	case $dir in
	[\\/]* | [A-Za-z]:[\\/]*) ;;
	*)
	  func_fatal_error "only absolute run-paths are allowed"
	  ;;
	esac
	case "$xrpath " in
	*" $dir "*) ;;
	*) xrpath="$xrpath $dir" ;;
	esac
	continue
	;;

      -shared)
	# The effects of -shared are defined in a previous loop.
	continue
	;;

      -shrext)
	prev=shrext
	continue
	;;

      -static | -static-libtool-libs)
	# The effects of -static are defined in a previous loop.
	# We used to do the same as -all-static on platforms that
	# didn't have a PIC flag, but the assumption that the effects
	# would be equivalent was wrong.  It would break on at least
	# Digital Unix and AIX.
	continue
	;;

      -thread-safe)
	thread_safe=yes
	continue
	;;

      -version-info)
	prev=vinfo
	continue
	;;

      -version-number)
	prev=vinfo
	vinfo_number=yes
	continue
	;;

      -weak)
        prev=weak
	continue
	;;

      -Wc,*)
	func_stripname '-Wc,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs="$IFS"; IFS=','
	for flag in $args; do
	  IFS="$save_ifs"
          func_quote_for_eval "$flag"
	  arg="$arg $wl$func_quote_for_eval_result"
	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
	done
	IFS="$save_ifs"
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Wl,*)
	func_stripname '-Wl,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs="$IFS"; IFS=','
	for flag in $args; do
	  IFS="$save_ifs"
          func_quote_for_eval "$flag"
	  arg="$arg $wl$func_quote_for_eval_result"
	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
	  linker_flags="$linker_flags $func_quote_for_eval_result"
	done
	IFS="$save_ifs"
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Xcompiler)
	prev=xcompiler
	continue
	;;

      -Xlinker)
	prev=xlinker
	continue
	;;

      -XCClinker)
	prev=xcclinker
	continue
	;;

      # -msg_* for osf cc
      -msg_*)
	func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;

      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
      # -r[0-9][0-9]* specifies the processor on the SGI compiler
      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
      # +DA*, +DD* enable 64-bit mode on the HP compiler
      # -q* pass through compiler args for the IBM compiler
      # -m*, -t[45]*, -txscale* pass through architecture-specific
      # compiler args for GCC
      # -F/path gives path to uninstalled frameworks, gcc on darwin
      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
      # @file GCC response files
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
        func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        compiler_flags="$compiler_flags $arg"
        continue
        ;;

      # Some other compiler flag.
      -* | +*)
        func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;

      *.$objext)
	# A standard object.
	objs="$objs $arg"
	;;

      *.lo)
	# A libtool-controlled object.

	# Check to see that this really is a libtool object.
	if func_lalib_unsafe_p "$arg"; then
	  pic_object=
	  non_pic_object=

	  # Read the .lo file
	  func_source "$arg"

	  if test -z "$pic_object" ||
	     test -z "$non_pic_object" ||
	     test "$pic_object" = none &&
	     test "$non_pic_object" = none; then
	    func_fatal_error "cannot find name of object for \`$arg'"
	  fi

	  # Extract subdirectory from the argument.
	  func_dirname "$arg" "/" ""
	  xdir="$func_dirname_result"

	  if test "$pic_object" != none; then
	    # Prepend the subdirectory the object is found in.
	    pic_object="$xdir$pic_object"

	    if test "$prev" = dlfiles; then
	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
		dlfiles="$dlfiles $pic_object"
		prev=
		continue
	      else
		# If libtool objects are unsupported, then we need to preload.
		prev=dlprefiles
	      fi
	    fi

	    # CHECK ME:  I think I busted this.  -Ossama
	    if test "$prev" = dlprefiles; then
	      # Preload the old-style object.
	      dlprefiles="$dlprefiles $pic_object"
	      prev=
	    fi

	    # A PIC object.
	    func_append libobjs " $pic_object"
	    arg="$pic_object"
	  fi

	  # Non-PIC object.
	  if test "$non_pic_object" != none; then
	    # Prepend the subdirectory the object is found in.
	    non_pic_object="$xdir$non_pic_object"

	    # A standard non-PIC object
	    func_append non_pic_objects " $non_pic_object"
	    if test -z "$pic_object" || test "$pic_object" = none ; then
	      arg="$non_pic_object"
	    fi
	  else
	    # If the PIC object exists, use it instead.
	    # $xdir was prepended to $pic_object above.
	    non_pic_object="$pic_object"
	    func_append non_pic_objects " $non_pic_object"
	  fi
	else
	  # Only an error if not doing a dry-run.
	  if $opt_dry_run; then
	    # Extract subdirectory from the argument.
	    func_dirname "$arg" "/" ""
	    xdir="$func_dirname_result"

	    func_lo2o "$arg"
	    pic_object=$xdir$objdir/$func_lo2o_result
	    non_pic_object=$xdir$func_lo2o_result
	    func_append libobjs " $pic_object"
	    func_append non_pic_objects " $non_pic_object"
	  else
	    func_fatal_error "\`$arg' is not a valid libtool object"
	  fi
	fi
	;;

      *.$libext)
	# An archive.
	deplibs="$deplibs $arg"
	old_deplibs="$old_deplibs $arg"
	continue
	;;

      *.la)
	# A libtool-controlled library.

	if test "$prev" = dlfiles; then
	  # This library was specified with -dlopen.
	  dlfiles="$dlfiles $arg"
	  prev=
	elif test "$prev" = dlprefiles; then
	  # The library was specified with -dlpreopen.
	  dlprefiles="$dlprefiles $arg"
	  prev=
	else
	  deplibs="$deplibs $arg"
	fi
	continue
	;;

      # Some other compiler argument.
      *)
	# Unknown arguments in both finalize_command and compile_command need
	# to be aesthetically quoted because they are evaled later.
	func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;
      esac # arg

      # Now actually substitute the argument into the commands.
      if test -n "$arg"; then
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
      fi
    done # argument parsing loop

    test -n "$prev" && \
      func_fatal_help "the \`$prevarg' option requires an argument"

    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
      eval arg=\"$export_dynamic_flag_spec\"
      func_append compile_command " $arg"
      func_append finalize_command " $arg"
    fi

    oldlibs=
    # calculate the name of the file, without its directory
    func_basename "$output"
    outputname="$func_basename_result"
    libobjs_save="$libobjs"

    if test -n "$shlibpath_var"; then
      # get the directories listed in $shlibpath_var
      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
    else
      shlib_search_path=
    fi
    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"

    func_dirname "$output" "/" ""
    output_objdir="$func_dirname_result$objdir"
    # Create the object directory.
    func_mkdir_p "$output_objdir"

    # Determine the type of output
    case $output in
    "")
      func_fatal_help "you must specify an output file"
      ;;
    *.$libext) linkmode=oldlib ;;
    *.lo | *.$objext) linkmode=obj ;;
    *.la) linkmode=lib ;;
    *) linkmode=prog ;; # Anything else should be a program.
    esac

    specialdeplibs=

    libs=
    # Find all interdependent deplibs by searching for libraries
    # that are linked more than once (e.g. -la -lb -la)
    for deplib in $deplibs; do
      if $opt_duplicate_deps ; then
	case "$libs " in
	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
	esac
      fi
      libs="$libs $deplib"
    done

    if test "$linkmode" = lib; then
      libs="$predeps $libs $compiler_lib_search_path $postdeps"

      # Compute libraries that are listed more than once in $predeps
      # $postdeps and mark them as special (i.e., whose duplicates are
      # not to be eliminated).
      pre_post_deps=
      if $opt_duplicate_compiler_generated_deps; then
	for pre_post_dep in $predeps $postdeps; do
	  case "$pre_post_deps " in
	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
	  esac
	  pre_post_deps="$pre_post_deps $pre_post_dep"
	done
      fi
      pre_post_deps=
    fi

    deplibs=
    newdependency_libs=
    newlib_search_path=
    need_relink=no # whether we're linking any uninstalled libtool libraries
    notinst_deplibs= # not-installed libtool libraries
    notinst_path= # paths that contain not-installed libtool libraries

    case $linkmode in
    lib)
	passes="conv dlpreopen link"
	for file in $dlfiles $dlprefiles; do
	  case $file in
	  *.la) ;;
	  *)
	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
	    ;;
	  esac
	done
	;;
    prog)
	compile_deplibs=
	finalize_deplibs=
	alldeplibs=no
	newdlfiles=
	newdlprefiles=
	passes="conv scan dlopen dlpreopen link"
	;;
    *)  passes="conv"
	;;
    esac

    for pass in $passes; do
      # The preopen pass in lib mode reverses $deplibs; put it back here
      # so that -L comes before libs that need it for instance...
      if test "$linkmode,$pass" = "lib,link"; then
	## FIXME: Find the place where the list is rebuilt in the wrong
	##        order, and fix it there properly
        tmp_deplibs=
	for deplib in $deplibs; do
	  tmp_deplibs="$deplib $tmp_deplibs"
	done
	deplibs="$tmp_deplibs"
      fi

      if test "$linkmode,$pass" = "lib,link" ||
	 test "$linkmode,$pass" = "prog,scan"; then
	libs="$deplibs"
	deplibs=
      fi
      if test "$linkmode" = prog; then
	case $pass in
	dlopen) libs="$dlfiles" ;;
	dlpreopen) libs="$dlprefiles" ;;
	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
	esac
      fi
      if test "$linkmode,$pass" = "lib,dlpreopen"; then
	# Collect and forward deplibs of preopened libtool libs
	for lib in $dlprefiles; do
	  # Ignore non-libtool-libs
	  dependency_libs=
	  case $lib in
	  *.la)	func_source "$lib" ;;
	  esac

	  # Collect preopened libtool deplibs, except any this library
	  # has declared as weak libs
	  for deplib in $dependency_libs; do
            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
	    case " $weak_libs " in
	    *" $deplib_base "*) ;;
	    *) deplibs="$deplibs $deplib" ;;
	    esac
	  done
	done
	libs="$dlprefiles"
      fi
      if test "$pass" = dlopen; then
	# Collect dlpreopened libraries
	save_deplibs="$deplibs"
	deplibs=
      fi

      for deplib in $libs; do
	lib=
	found=no
	case $deplib in
	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
	  if test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$deplib $compile_deplibs"
	    finalize_deplibs="$deplib $finalize_deplibs"
	  else
	    compiler_flags="$compiler_flags $deplib"
	  fi

	  case $linkmode in
	  lib)
	    deplibs="$deplib $deplibs"
	    test "$pass" = conv && continue
	    newdependency_libs="$deplib $newdependency_libs"
	    ;;
	  prog)
	    if test "$pass" = conv; then
	      deplibs="$deplib $deplibs"
	      continue
	    fi
	    if test "$pass" = scan; then
	      deplibs="$deplib $deplibs"
	    else
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    fi
	    ;;
	  *)
	    ;;
	  esac # linkmode

	  continue
	  ;;
	-l*)
	  if test "$linkmode" != lib && test "$linkmode" != prog; then
	    func_warning "\`-l' is ignored for archives/objects"
	    continue
	  fi
	  func_stripname '-l' '' "$deplib"
	  name=$func_stripname_result
	  if test "$linkmode" = lib; then
	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
	  else
	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
	  fi
	  for searchdir in $searchdirs; do
	    for search_ext in .la $std_shrext .so .a; do
	      # Search the libtool library
	      lib="$searchdir/lib${name}${search_ext}"
	      if test -f "$lib"; then
		if test "$search_ext" = ".la"; then
		  found=yes
		else
		  found=no
		fi
		break 2
	      fi
	    done
	  done
	  if test "$found" != yes; then
	    # deplib doesn't seem to be a libtool library
	    if test "$linkmode,$pass" = "prog,link"; then
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    else
	      deplibs="$deplib $deplibs"
	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
	    fi
	    continue
	  else # deplib is a libtool library
	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
	    # We need to do some special things here, and not later.
	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
	      case " $predeps $postdeps " in
	      *" $deplib "*)
		if func_lalib_p "$lib"; then
		  library_names=
		  old_library=
		  func_source "$lib"
		  for l in $old_library $library_names; do
		    ll="$l"
		  done
		  if test "X$ll" = "X$old_library" ; then # only static version available
		    found=no
		    func_dirname "$lib" "" "."
		    ladir="$func_dirname_result"
		    lib=$ladir/$old_library
		    if test "$linkmode,$pass" = "prog,link"; then
		      compile_deplibs="$deplib $compile_deplibs"
		      finalize_deplibs="$deplib $finalize_deplibs"
		    else
		      deplibs="$deplib $deplibs"
		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
		    fi
		    continue
		  fi
		fi
		;;
	      *) ;;
	      esac
	    fi
	  fi
	  ;; # -l
	*.ltframework)
	  if test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$deplib $compile_deplibs"
	    finalize_deplibs="$deplib $finalize_deplibs"
	  else
	    deplibs="$deplib $deplibs"
	    if test "$linkmode" = lib ; then
		case "$new_inherited_linker_flags " in
		    *" $deplib "*) ;;
		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
		esac
	    fi
	  fi
	  continue
	  ;;
	-L*)
	  case $linkmode in
	  lib)
	    deplibs="$deplib $deplibs"
	    test "$pass" = conv && continue
	    newdependency_libs="$deplib $newdependency_libs"
	    func_stripname '-L' '' "$deplib"
	    newlib_search_path="$newlib_search_path $func_stripname_result"
	    ;;
	  prog)
	    if test "$pass" = conv; then
	      deplibs="$deplib $deplibs"
	      continue
	    fi
	    if test "$pass" = scan; then
	      deplibs="$deplib $deplibs"
	    else
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    fi
	    func_stripname '-L' '' "$deplib"
	    newlib_search_path="$newlib_search_path $func_stripname_result"
	    ;;
	  *)
	    func_warning "\`-L' is ignored for archives/objects"
	    ;;
	  esac # linkmode
	  continue
	  ;; # -L
	-R*)
	  if test "$pass" = link; then
	    func_stripname '-R' '' "$deplib"
	    dir=$func_stripname_result
	    # Make sure the xrpath contains only unique directories.
	    case "$xrpath " in
	    *" $dir "*) ;;
	    *) xrpath="$xrpath $dir" ;;
	    esac
	  fi
	  deplibs="$deplib $deplibs"
	  continue
	  ;;
	*.la) lib="$deplib" ;;
	*.$libext)
	  if test "$pass" = conv; then
	    deplibs="$deplib $deplibs"
	    continue
	  fi
	  case $linkmode in
	  lib)
	    # Linking convenience modules into shared libraries is allowed,
	    # but linking other static libraries is non-portable.
	    case " $dlpreconveniencelibs " in
	    *" $deplib "*) ;;
	    *)
	      valid_a_lib=no
	      case $deplibs_check_method in
		match_pattern*)
		  set dummy $deplibs_check_method; shift
		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
		    | $EGREP "$match_pattern_regex" > /dev/null; then
		    valid_a_lib=yes
		  fi
		;;
		pass_all)
		  valid_a_lib=yes
		;;
	      esac
	      if test "$valid_a_lib" != yes; then
		$ECHO
		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
		$ECHO "*** I have the capability to make that library automatically link in when"
		$ECHO "*** you link to this library.  But I can only do this if you have a"
		$ECHO "*** shared version of the library, which you do not appear to have"
		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
		$ECHO "*** that it is just a static archive that I should not use here."
	      else
		$ECHO
		$ECHO "*** Warning: Linking the shared library $output against the"
		$ECHO "*** static library $deplib is not portable!"
		deplibs="$deplib $deplibs"
	      fi
	      ;;
	    esac
	    continue
	    ;;
	  prog)
	    if test "$pass" != link; then
	      deplibs="$deplib $deplibs"
	    else
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    fi
	    continue
	    ;;
	  esac # linkmode
	  ;; # *.$libext
	*.lo | *.$objext)
	  if test "$pass" = conv; then
	    deplibs="$deplib $deplibs"
	  elif test "$linkmode" = prog; then
	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
	      # If there is no dlopen support or we're linking statically,
	      # we need to preload.
	      newdlprefiles="$newdlprefiles $deplib"
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    else
	      newdlfiles="$newdlfiles $deplib"
	    fi
	  fi
	  continue
	  ;;
	%DEPLIBS%)
	  alldeplibs=yes
	  continue
	  ;;
	esac # case $deplib

	if test "$found" = yes || test -f "$lib"; then :
	else
	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
	fi

	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$lib" \
	  || func_fatal_error "\`$lib' is not a valid libtool archive"

	func_dirname "$lib" "" "."
	ladir="$func_dirname_result"

	dlname=
	dlopen=
	dlpreopen=
	libdir=
	library_names=
	old_library=
	inherited_linker_flags=
	# If the library was installed with an old release of libtool,
	# it will not redefine variables installed, or shouldnotlink
	installed=yes
	shouldnotlink=no
	avoidtemprpath=


	# Read the .la file
	func_source "$lib"

	# Convert "-framework foo" to "foo.ltframework"
	if test -n "$inherited_linker_flags"; then
	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
	    case " $new_inherited_linker_flags " in
	      *" $tmp_inherited_linker_flag "*) ;;
	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
	    esac
	  done
	fi
	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	if test "$linkmode,$pass" = "lib,link" ||
	   test "$linkmode,$pass" = "prog,scan" ||
	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
	fi

	if test "$pass" = conv; then
	  # Only check for convenience libraries
	  deplibs="$lib $deplibs"
	  if test -z "$libdir"; then
	    if test -z "$old_library"; then
	      func_fatal_error "cannot find name of link library for \`$lib'"
	    fi
	    # It is a libtool convenience library, so add in its objects.
	    convenience="$convenience $ladir/$objdir/$old_library"
	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
	    func_fatal_error "\`$lib' is not a convenience library"
	  fi
	  tmp_libs=
	  for deplib in $dependency_libs; do
	    deplibs="$deplib $deplibs"
	    if $opt_duplicate_deps ; then
	      case "$tmp_libs " in
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
	      esac
	    fi
	    tmp_libs="$tmp_libs $deplib"
	  done
	  continue
	fi # $pass = conv


	# Get the name of the library we link against.
	linklib=
	for l in $old_library $library_names; do
	  linklib="$l"
	done
	if test -z "$linklib"; then
	  func_fatal_error "cannot find name of link library for \`$lib'"
	fi

	# This library was specified with -dlopen.
	if test "$pass" = dlopen; then
	  if test -z "$libdir"; then
	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
	  fi
	  if test -z "$dlname" ||
	     test "$dlopen_support" != yes ||
	     test "$build_libtool_libs" = no; then
	    # If there is no dlname, no dlopen support or we're linking
	    # statically, we need to preload.  We also need to preload any
	    # dependent libraries so libltdl's deplib preloader doesn't
	    # bomb out in the load deplibs phase.
	    dlprefiles="$dlprefiles $lib $dependency_libs"
	  else
	    newdlfiles="$newdlfiles $lib"
	  fi
	  continue
	fi # $pass = dlopen

	# We need an absolute path.
	case $ladir in
	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
	*)
	  abs_ladir=`cd "$ladir" && pwd`
	  if test -z "$abs_ladir"; then
	    func_warning "cannot determine absolute directory name of \`$ladir'"
	    func_warning "passing it literally to the linker, although it might fail"
	    abs_ladir="$ladir"
	  fi
	  ;;
	esac
	func_basename "$lib"
	laname="$func_basename_result"

	# Find the relevant object directory and library name.
	if test "X$installed" = Xyes; then
	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
	    func_warning "library \`$lib' was moved."
	    dir="$ladir"
	    absdir="$abs_ladir"
	    libdir="$abs_ladir"
	  else
	    dir="$libdir"
	    absdir="$libdir"
	  fi
	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
	else
	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
	    dir="$ladir"
	    absdir="$abs_ladir"
	    # Remove this search path later
	    notinst_path="$notinst_path $abs_ladir"
	  else
	    dir="$ladir/$objdir"
	    absdir="$abs_ladir/$objdir"
	    # Remove this search path later
	    notinst_path="$notinst_path $abs_ladir"
	  fi
	fi # $installed = yes
	func_stripname 'lib' '.la' "$laname"
	name=$func_stripname_result

	# This library was specified with -dlpreopen.
	if test "$pass" = dlpreopen; then
	  if test -z "$libdir" && test "$linkmode" = prog; then
	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
	  fi
	  # Prefer using a static library (so that no silly _DYNAMIC symbols
	  # are required to link).
	  if test -n "$old_library"; then
	    newdlprefiles="$newdlprefiles $dir/$old_library"
	    # Keep a list of preopened convenience libraries to check
	    # that they are being used correctly in the link pass.
	    test -z "$libdir" && \
		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
	  # Otherwise, use the dlname, so that lt_dlopen finds it.
	  elif test -n "$dlname"; then
	    newdlprefiles="$newdlprefiles $dir/$dlname"
	  else
	    newdlprefiles="$newdlprefiles $dir/$linklib"
	  fi
	fi # $pass = dlpreopen

	if test -z "$libdir"; then
	  # Link the convenience library
	  if test "$linkmode" = lib; then
	    deplibs="$dir/$old_library $deplibs"
	  elif test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$dir/$old_library $compile_deplibs"
	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
	  else
	    deplibs="$lib $deplibs" # used for prog,scan pass
	  fi
	  continue
	fi


	if test "$linkmode" = prog && test "$pass" != link; then
	  newlib_search_path="$newlib_search_path $ladir"
	  deplibs="$lib $deplibs"

	  linkalldeplibs=no
	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
	     test "$build_libtool_libs" = no; then
	    linkalldeplibs=yes
	  fi

	  tmp_libs=
	  for deplib in $dependency_libs; do
	    case $deplib in
	    -L*) func_stripname '-L' '' "$deplib"
	         newlib_search_path="$newlib_search_path $func_stripname_result"
		 ;;
	    esac
	    # Need to link against all dependency_libs?
	    if test "$linkalldeplibs" = yes; then
	      deplibs="$deplib $deplibs"
	    else
	      # Need to hardcode shared library paths
	      # or/and link against static libraries
	      newdependency_libs="$deplib $newdependency_libs"
	    fi
	    if $opt_duplicate_deps ; then
	      case "$tmp_libs " in
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
	      esac
	    fi
	    tmp_libs="$tmp_libs $deplib"
	  done # for deplib
	  continue
	fi # $linkmode = prog...

	if test "$linkmode,$pass" = "prog,link"; then
	  if test -n "$library_names" &&
	     { { test "$prefer_static_libs" = no ||
	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
	       test -z "$old_library"; }; then
	    # We need to hardcode the library path
	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
	      # Make sure the rpath contains only unique directories.
	      case "$temp_rpath:" in
	      *"$absdir:"*) ;;
	      *) temp_rpath="$temp_rpath$absdir:" ;;
	      esac
	    fi

	    # Hardcode the library path.
	    # Skip directories that are in the system default run-time
	    # search path.
	    case " $sys_lib_dlsearch_path " in
	    *" $absdir "*) ;;
	    *)
	      case "$compile_rpath " in
	      *" $absdir "*) ;;
	      *) compile_rpath="$compile_rpath $absdir"
	      esac
	      ;;
	    esac
	    case " $sys_lib_dlsearch_path " in
	    *" $libdir "*) ;;
	    *)
	      case "$finalize_rpath " in
	      *" $libdir "*) ;;
	      *) finalize_rpath="$finalize_rpath $libdir"
	      esac
	      ;;
	    esac
	  fi # $linkmode,$pass = prog,link...

	  if test "$alldeplibs" = yes &&
	     { test "$deplibs_check_method" = pass_all ||
	       { test "$build_libtool_libs" = yes &&
		 test -n "$library_names"; }; }; then
	    # We only need to search for static libraries
	    continue
	  fi
	fi

	link_static=no # Whether the deplib will be linked statically
	use_static_libs=$prefer_static_libs
	if test "$use_static_libs" = built && test "$installed" = yes; then
	  use_static_libs=no
	fi
	if test -n "$library_names" &&
	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
	  case $host in
	  *cygwin* | *mingw* | *cegcc*)
	      # No point in relinking DLLs because paths are not encoded
	      notinst_deplibs="$notinst_deplibs $lib"
	      need_relink=no
	    ;;
	  *)
	    if test "$installed" = no; then
	      notinst_deplibs="$notinst_deplibs $lib"
	      need_relink=yes
	    fi
	    ;;
	  esac
	  # This is a shared library

	  # Warn about portability, can't link against -module's on some
	  # systems (darwin).  Don't bleat about dlopened modules though!
	  dlopenmodule=""
	  for dlpremoduletest in $dlprefiles; do
	    if test "X$dlpremoduletest" = "X$lib"; then
	      dlopenmodule="$dlpremoduletest"
	      break
	    fi
	  done
	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
	    $ECHO
	    if test "$linkmode" = prog; then
	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
	    else
	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
	    fi
	    $ECHO "*** $linklib is not portable!"
	  fi
	  if test "$linkmode" = lib &&
	     test "$hardcode_into_libs" = yes; then
	    # Hardcode the library path.
	    # Skip directories that are in the system default run-time
	    # search path.
	    case " $sys_lib_dlsearch_path " in
	    *" $absdir "*) ;;
	    *)
	      case "$compile_rpath " in
	      *" $absdir "*) ;;
	      *) compile_rpath="$compile_rpath $absdir"
	      esac
	      ;;
	    esac
	    case " $sys_lib_dlsearch_path " in
	    *" $libdir "*) ;;
	    *)
	      case "$finalize_rpath " in
	      *" $libdir "*) ;;
	      *) finalize_rpath="$finalize_rpath $libdir"
	      esac
	      ;;
	    esac
	  fi

	  if test -n "$old_archive_from_expsyms_cmds"; then
	    # figure out the soname
	    set dummy $library_names
	    shift
	    realname="$1"
	    shift
	    libname=`eval "\\$ECHO \"$libname_spec\""`
	    # use dlname if we got it. it's perfectly good, no?
	    if test -n "$dlname"; then
	      soname="$dlname"
	    elif test -n "$soname_spec"; then
	      # bleh windows
	      case $host in
	      *cygwin* | mingw* | *cegcc*)
	        func_arith $current - $age
		major=$func_arith_result
		versuffix="-$major"
		;;
	      esac
	      eval soname=\"$soname_spec\"
	    else
	      soname="$realname"
	    fi

	    # Make a new name for the extract_expsyms_cmds to use
	    soroot="$soname"
	    func_basename "$soroot"
	    soname="$func_basename_result"
	    func_stripname 'lib' '.dll' "$soname"
	    newlib=libimp-$func_stripname_result.a

	    # If the library has no export list, then create one now
	    if test -f "$output_objdir/$soname-def"; then :
	    else
	      func_verbose "extracting exported symbol list from \`$soname'"
	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
	    fi

	    # Create $newlib
	    if test -f "$output_objdir/$newlib"; then :; else
	      func_verbose "generating import library for \`$soname'"
	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
	    fi
	    # make sure the library variables are pointing to the new library
	    dir=$output_objdir
	    linklib=$newlib
	  fi # test -n "$old_archive_from_expsyms_cmds"

	  if test "$linkmode" = prog || test "$mode" != relink; then
	    add_shlibpath=
	    add_dir=
	    add=
	    lib_linked=yes
	    case $hardcode_action in
	    immediate | unsupported)
	      if test "$hardcode_direct" = no; then
		add="$dir/$linklib"
		case $host in
		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
		    *-*-unixware7*) add_dir="-L$dir" ;;
		  *-*-darwin* )
		    # if the lib is a (non-dlopened) module then we can not
		    # link against it, someone is ignoring the earlier warnings
		    if /usr/bin/file -L $add 2> /dev/null |
			 $GREP ": [^:]* bundle" >/dev/null ; then
		      if test "X$dlopenmodule" != "X$lib"; then
			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
			if test -z "$old_library" ; then
			  $ECHO
			  $ECHO "*** And there doesn't seem to be a static archive available"
			  $ECHO "*** The link will probably fail, sorry"
			else
			  add="$dir/$old_library"
			fi
		      elif test -n "$old_library"; then
			add="$dir/$old_library"
		      fi
		    fi
		esac
	      elif test "$hardcode_minus_L" = no; then
		case $host in
		*-*-sunos*) add_shlibpath="$dir" ;;
		esac
		add_dir="-L$dir"
		add="-l$name"
	      elif test "$hardcode_shlibpath_var" = no; then
		add_shlibpath="$dir"
		add="-l$name"
	      else
		lib_linked=no
	      fi
	      ;;
	    relink)
	      if test "$hardcode_direct" = yes &&
	         test "$hardcode_direct_absolute" = no; then
		add="$dir/$linklib"
	      elif test "$hardcode_minus_L" = yes; then
		add_dir="-L$dir"
		# Try looking first in the location we're being installed to.
		if test -n "$inst_prefix_dir"; then
		  case $libdir in
		    [\\/]*)
		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
		      ;;
		  esac
		fi
		add="-l$name"
	      elif test "$hardcode_shlibpath_var" = yes; then
		add_shlibpath="$dir"
		add="-l$name"
	      else
		lib_linked=no
	      fi
	      ;;
	    *) lib_linked=no ;;
	    esac

	    if test "$lib_linked" != yes; then
	      func_fatal_configuration "unsupported hardcode properties"
	    fi

	    if test -n "$add_shlibpath"; then
	      case :$compile_shlibpath: in
	      *":$add_shlibpath:"*) ;;
	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
	      esac
	    fi
	    if test "$linkmode" = prog; then
	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
	    else
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
	      test -n "$add" && deplibs="$add $deplibs"
	      if test "$hardcode_direct" != yes &&
		 test "$hardcode_minus_L" != yes &&
		 test "$hardcode_shlibpath_var" = yes; then
		case :$finalize_shlibpath: in
		*":$libdir:"*) ;;
		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
		esac
	      fi
	    fi
	  fi

	  if test "$linkmode" = prog || test "$mode" = relink; then
	    add_shlibpath=
	    add_dir=
	    add=
	    # Finalize command for both is simple: just hardcode it.
	    if test "$hardcode_direct" = yes &&
	       test "$hardcode_direct_absolute" = no; then
	      add="$libdir/$linklib"
	    elif test "$hardcode_minus_L" = yes; then
	      add_dir="-L$libdir"
	      add="-l$name"
	    elif test "$hardcode_shlibpath_var" = yes; then
	      case :$finalize_shlibpath: in
	      *":$libdir:"*) ;;
	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
	      esac
	      add="-l$name"
	    elif test "$hardcode_automatic" = yes; then
	      if test -n "$inst_prefix_dir" &&
		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
		add="$inst_prefix_dir$libdir/$linklib"
	      else
		add="$libdir/$linklib"
	      fi
	    else
	      # We cannot seem to hardcode it, guess we'll fake it.
	      add_dir="-L$libdir"
	      # Try looking first in the location we're being installed to.
	      if test -n "$inst_prefix_dir"; then
		case $libdir in
		  [\\/]*)
		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
		    ;;
		esac
	      fi
	      add="-l$name"
	    fi

	    if test "$linkmode" = prog; then
	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
	    else
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
	      test -n "$add" && deplibs="$add $deplibs"
	    fi
	  fi
	elif test "$linkmode" = prog; then
	  # Here we assume that one of hardcode_direct or hardcode_minus_L
	  # is not unsupported.  This is valid on all known static and
	  # shared platforms.
	  if test "$hardcode_direct" != unsupported; then
	    test -n "$old_library" && linklib="$old_library"
	    compile_deplibs="$dir/$linklib $compile_deplibs"
	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
	  else
	    compile_deplibs="-l$name -L$dir $compile_deplibs"
	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
	  fi
	elif test "$build_libtool_libs" = yes; then
	  # Not a shared library
	  if test "$deplibs_check_method" != pass_all; then
	    # We're trying link a shared library against a static one
	    # but the system doesn't support it.

	    # Just print a warning and add the library to dependency_libs so
	    # that the program can be linked against the static library.
	    $ECHO
	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
	    $ECHO "*** I have the capability to make that library automatically link in when"
	    $ECHO "*** you link to this library.  But I can only do this if you have a"
	    $ECHO "*** shared version of the library, which you do not appear to have."
	    if test "$module" = yes; then
	      $ECHO "*** But as you try to build a module library, libtool will still create "
	      $ECHO "*** a static module, that should work as long as the dlopening application"
	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
	      if test -z "$global_symbol_pipe"; then
		$ECHO
		$ECHO "*** However, this would only work if libtool was able to extract symbol"
		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
		$ECHO "*** not find such a program.  So, this module is probably useless."
		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
	      fi
	      if test "$build_old_libs" = no; then
		build_libtool_libs=module
		build_old_libs=yes
	      else
		build_libtool_libs=no
	      fi
	    fi
	  else
	    deplibs="$dir/$old_library $deplibs"
	    link_static=yes
	  fi
	fi # link shared/static library?

	if test "$linkmode" = lib; then
	  if test -n "$dependency_libs" &&
	     { test "$hardcode_into_libs" != yes ||
	       test "$build_old_libs" = yes ||
	       test "$link_static" = yes; }; then
	    # Extract -R from dependency_libs
	    temp_deplibs=
	    for libdir in $dependency_libs; do
	      case $libdir in
	      -R*) func_stripname '-R' '' "$libdir"
	           temp_xrpath=$func_stripname_result
		   case " $xrpath " in
		   *" $temp_xrpath "*) ;;
		   *) xrpath="$xrpath $temp_xrpath";;
		   esac;;
	      *) temp_deplibs="$temp_deplibs $libdir";;
	      esac
	    done
	    dependency_libs="$temp_deplibs"
	  fi

	  newlib_search_path="$newlib_search_path $absdir"
	  # Link against this library
	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
	  # ... and its dependency_libs
	  tmp_libs=
	  for deplib in $dependency_libs; do
	    newdependency_libs="$deplib $newdependency_libs"
	    if $opt_duplicate_deps ; then
	      case "$tmp_libs " in
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
	      esac
	    fi
	    tmp_libs="$tmp_libs $deplib"
	  done

	  if test "$link_all_deplibs" != no; then
	    # Add the search paths of all dependency libraries
	    for deplib in $dependency_libs; do
	      case $deplib in
	      -L*) path="$deplib" ;;
	      *.la)
	        func_dirname "$deplib" "" "."
		dir="$func_dirname_result"
		# We need an absolute path.
		case $dir in
		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
		*)
		  absdir=`cd "$dir" && pwd`
		  if test -z "$absdir"; then
		    func_warning "cannot determine absolute directory name of \`$dir'"
		    absdir="$dir"
		  fi
		  ;;
		esac
		if $GREP "^installed=no" $deplib > /dev/null; then
		case $host in
		*-*-darwin*)
		  depdepl=
		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
		  if test -n "$deplibrary_names" ; then
		    for tmp in $deplibrary_names ; do
		      depdepl=$tmp
		    done
		    if test -f "$absdir/$objdir/$depdepl" ; then
		      depdepl="$absdir/$objdir/$depdepl"
		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                      if test -z "$darwin_install_name"; then
                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                      fi
		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
		      path=
		    fi
		  fi
		  ;;
		*)
		  path="-L$absdir/$objdir"
		  ;;
		esac
		else
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
		  test -z "$libdir" && \
		    func_fatal_error "\`$deplib' is not a valid libtool archive"
		  test "$absdir" != "$libdir" && \
		    func_warning "\`$deplib' seems to be moved"

		  path="-L$absdir"
		fi
		;;
	      esac
	      case " $deplibs " in
	      *" $path "*) ;;
	      *) deplibs="$path $deplibs" ;;
	      esac
	    done
	  fi # link_all_deplibs != no
	fi # linkmode = lib
      done # for deplib in $libs
      if test "$pass" = link; then
	if test "$linkmode" = "prog"; then
	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
	else
	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	fi
      fi
      dependency_libs="$newdependency_libs"
      if test "$pass" = dlpreopen; then
	# Link the dlpreopened libraries before other libraries
	for deplib in $save_deplibs; do
	  deplibs="$deplib $deplibs"
	done
      fi
      if test "$pass" != dlopen; then
	if test "$pass" != conv; then
	  # Make sure lib_search_path contains only unique directories.
	  lib_search_path=
	  for dir in $newlib_search_path; do
	    case "$lib_search_path " in
	    *" $dir "*) ;;
	    *) lib_search_path="$lib_search_path $dir" ;;
	    esac
	  done
	  newlib_search_path=
	fi

	if test "$linkmode,$pass" != "prog,link"; then
	  vars="deplibs"
	else
	  vars="compile_deplibs finalize_deplibs"
	fi
	for var in $vars dependency_libs; do
	  # Add libraries to $var in reverse order
	  eval tmp_libs=\"\$$var\"
	  new_libs=
	  for deplib in $tmp_libs; do
	    # FIXME: Pedantically, this is the right thing to do, so
	    #        that some nasty dependency loop isn't accidentally
	    #        broken:
	    #new_libs="$deplib $new_libs"
	    # Pragmatically, this seems to cause very few problems in
	    # practice:
	    case $deplib in
	    -L*) new_libs="$deplib $new_libs" ;;
	    -R*) ;;
	    *)
	      # And here is the reason: when a library appears more
	      # than once as an explicit dependence of a library, or
	      # is implicitly linked in more than once by the
	      # compiler, it is considered special, and multiple
	      # occurrences thereof are not removed.  Compare this
	      # with having the same library being listed as a
	      # dependency of multiple other libraries: in this case,
	      # we know (pedantically, we assume) the library does not
	      # need to be listed more than once, so we keep only the
	      # last copy.  This is not always right, but it is rare
	      # enough that we require users that really mean to play
	      # such unportable linking tricks to link the library
	      # using -Wl,-lname, so that libtool does not consider it
	      # for duplicate removal.
	      case " $specialdeplibs " in
	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
	      *)
		case " $new_libs " in
		*" $deplib "*) ;;
		*) new_libs="$deplib $new_libs" ;;
		esac
		;;
	      esac
	      ;;
	    esac
	  done
	  tmp_libs=
	  for deplib in $new_libs; do
	    case $deplib in
	    -L*)
	      case " $tmp_libs " in
	      *" $deplib "*) ;;
	      *) tmp_libs="$tmp_libs $deplib" ;;
	      esac
	      ;;
	    *) tmp_libs="$tmp_libs $deplib" ;;
	    esac
	  done
	  eval $var=\"$tmp_libs\"
	done # for var
      fi
      # Last step: remove runtime libs from dependency_libs
      # (they stay in deplibs)
      tmp_libs=
      for i in $dependency_libs ; do
	case " $predeps $postdeps $compiler_lib_search_path " in
	*" $i "*)
	  i=""
	  ;;
	esac
	if test -n "$i" ; then
	  tmp_libs="$tmp_libs $i"
	fi
      done
      dependency_libs=$tmp_libs
    done # for pass
    if test "$linkmode" = prog; then
      dlfiles="$newdlfiles"
    fi
    if test "$linkmode" = prog || test "$linkmode" = lib; then
      dlprefiles="$newdlprefiles"
    fi

    case $linkmode in
    oldlib)
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
	func_warning "\`-dlopen' is ignored for archives"
      fi

      case " $deplibs" in
      *\ -l* | *\ -L*)
	func_warning "\`-l' and \`-L' are ignored for archives" ;;
      esac

      test -n "$rpath" && \
	func_warning "\`-rpath' is ignored for archives"

      test -n "$xrpath" && \
	func_warning "\`-R' is ignored for archives"

      test -n "$vinfo" && \
	func_warning "\`-version-info/-version-number' is ignored for archives"

      test -n "$release" && \
	func_warning "\`-release' is ignored for archives"

      test -n "$export_symbols$export_symbols_regex" && \
	func_warning "\`-export-symbols' is ignored for archives"

      # Now set the variables for building old libraries.
      build_libtool_libs=no
      oldlibs="$output"
      objs="$objs$old_deplibs"
      ;;

    lib)
      # Make sure we only generate libraries of the form `libNAME.la'.
      case $outputname in
      lib*)
	func_stripname 'lib' '.la' "$outputname"
	name=$func_stripname_result
	eval shared_ext=\"$shrext_cmds\"
	eval libname=\"$libname_spec\"
	;;
      *)
	test "$module" = no && \
	  func_fatal_help "libtool library \`$output' must begin with \`lib'"

	if test "$need_lib_prefix" != no; then
	  # Add the "lib" prefix for modules if required
	  func_stripname '' '.la' "$outputname"
	  name=$func_stripname_result
	  eval shared_ext=\"$shrext_cmds\"
	  eval libname=\"$libname_spec\"
	else
	  func_stripname '' '.la' "$outputname"
	  libname=$func_stripname_result
	fi
	;;
      esac

      if test -n "$objs"; then
	if test "$deplibs_check_method" != pass_all; then
	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
	else
	  $ECHO
	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
	  $ECHO "*** objects $objs is not portable!"
	  libobjs="$libobjs $objs"
	fi
      fi

      test "$dlself" != no && \
	func_warning "\`-dlopen self' is ignored for libtool libraries"

      set dummy $rpath
      shift
      test "$#" -gt 1 && \
	func_warning "ignoring multiple \`-rpath's for a libtool library"

      install_libdir="$1"

      oldlibs=
      if test -z "$rpath"; then
	if test "$build_libtool_libs" = yes; then
	  # Building a libtool convenience library.
	  # Some compilers have problems with a `.al' extension so
	  # convenience libraries should have the same extension an
	  # archive normally would.
	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
	  build_libtool_libs=convenience
	  build_old_libs=yes
	fi

	test -n "$vinfo" && \
	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"

	test -n "$release" && \
	  func_warning "\`-release' is ignored for convenience libraries"
      else

	# Parse the version information argument.
	save_ifs="$IFS"; IFS=':'
	set dummy $vinfo 0 0 0
	shift
	IFS="$save_ifs"

	test -n "$7" && \
	  func_fatal_help "too many parameters to \`-version-info'"

	# convert absolute version numbers to libtool ages
	# this retains compatibility with .la files and attempts
	# to make the code below a bit more comprehensible

	case $vinfo_number in
	yes)
	  number_major="$1"
	  number_minor="$2"
	  number_revision="$3"
	  #
	  # There are really only two kinds -- those that
	  # use the current revision as the major version
	  # and those that subtract age and use age as
	  # a minor version.  But, then there is irix
	  # which has an extra 1 added just for fun
	  #
	  case $version_type in
	  darwin|linux|osf|windows|none)
	    func_arith $number_major + $number_minor
	    current=$func_arith_result
	    age="$number_minor"
	    revision="$number_revision"
	    ;;
	  freebsd-aout|freebsd-elf|sunos)
	    current="$number_major"
	    revision="$number_minor"
	    age="0"
	    ;;
	  irix|nonstopux)
	    func_arith $number_major + $number_minor
	    current=$func_arith_result
	    age="$number_minor"
	    revision="$number_minor"
	    lt_irix_increment=no
	    ;;
	  esac
	  ;;
	no)
	  current="$1"
	  revision="$2"
	  age="$3"
	  ;;
	esac

	# Check that each of the things are valid numbers.
	case $current in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "CURRENT \`$current' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	case $revision in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "REVISION \`$revision' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	case $age in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "AGE \`$age' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	if test "$age" -gt "$current"; then
	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
	  func_fatal_error "\`$vinfo' is not valid version information"
	fi

	# Calculate the version variables.
	major=
	versuffix=
	verstring=
	case $version_type in
	none) ;;

	darwin)
	  # Like Linux, but with the current version available in
	  # verstring for coding it into the library header
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix="$major.$age.$revision"
	  # Darwin ld doesn't like 0 for these options...
	  func_arith $current + 1
	  minor_current=$func_arith_result
	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
	  ;;

	freebsd-aout)
	  major=".$current"
	  versuffix=".$current.$revision";
	  ;;

	freebsd-elf)
	  major=".$current"
	  versuffix=".$current"
	  ;;

	irix | nonstopux)
	  if test "X$lt_irix_increment" = "Xno"; then
	    func_arith $current - $age
	  else
	    func_arith $current - $age + 1
	  fi
	  major=$func_arith_result

	  case $version_type in
	    nonstopux) verstring_prefix=nonstopux ;;
	    *)         verstring_prefix=sgi ;;
	  esac
	  verstring="$verstring_prefix$major.$revision"

	  # Add in all the interfaces that we are compatible with.
	  loop=$revision
	  while test "$loop" -ne 0; do
	    func_arith $revision - $loop
	    iface=$func_arith_result
	    func_arith $loop - 1
	    loop=$func_arith_result
	    verstring="$verstring_prefix$major.$iface:$verstring"
	  done

	  # Before this point, $major must not contain `.'.
	  major=.$major
	  versuffix="$major.$revision"
	  ;;

	linux)
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix="$major.$age.$revision"
	  ;;

	osf)
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix=".$current.$age.$revision"
	  verstring="$current.$age.$revision"

	  # Add in all the interfaces that we are compatible with.
	  loop=$age
	  while test "$loop" -ne 0; do
	    func_arith $current - $loop
	    iface=$func_arith_result
	    func_arith $loop - 1
	    loop=$func_arith_result
	    verstring="$verstring:${iface}.0"
	  done

	  # Make executables depend on our current version.
	  verstring="$verstring:${current}.0"
	  ;;

	qnx)
	  major=".$current"
	  versuffix=".$current"
	  ;;

	sunos)
	  major=".$current"
	  versuffix=".$current.$revision"
	  ;;

	windows)
	  # Use '-' rather than '.', since we only want one
	  # extension on DOS 8.3 filesystems.
	  func_arith $current - $age
	  major=$func_arith_result
	  versuffix="-$major"
	  ;;

	*)
	  func_fatal_configuration "unknown library version type \`$version_type'"
	  ;;
	esac

	# Clear the version info if we defaulted, and they specified a release.
	if test -z "$vinfo" && test -n "$release"; then
	  major=
	  case $version_type in
	  darwin)
	    # we can't check for "0.0" in archive_cmds due to quoting
	    # problems, so we reset it completely
	    verstring=
	    ;;
	  *)
	    verstring="0.0"
	    ;;
	  esac
	  if test "$need_version" = no; then
	    versuffix=
	  else
	    versuffix=".0.0"
	  fi
	fi

	# Remove version info from name if versioning should be avoided
	if test "$avoid_version" = yes && test "$need_version" = no; then
	  major=
	  versuffix=
	  verstring=""
	fi

	# Check to see if the archive will have undefined symbols.
	if test "$allow_undefined" = yes; then
	  if test "$allow_undefined_flag" = unsupported; then
	    func_warning "undefined symbols not allowed in $host shared libraries"
	    build_libtool_libs=no
	    build_old_libs=yes
	  fi
	else
	  # Don't allow undefined symbols.
	  allow_undefined_flag="$no_undefined_flag"
	fi

      fi

      func_generate_dlsyms "$libname" "$libname" "yes"
      libobjs="$libobjs $symfileobj"
      test "X$libobjs" = "X " && libobjs=

      if test "$mode" != relink; then
	# Remove our outputs, but don't remove object files since they
	# may have been created when compiling PIC objects.
	removelist=
	tempremovelist=`$ECHO "$output_objdir/*"`
	for p in $tempremovelist; do
	  case $p in
	    *.$objext | *.gcno)
	       ;;
	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
	       if test "X$precious_files_regex" != "X"; then
		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
		 then
		   continue
		 fi
	       fi
	       removelist="$removelist $p"
	       ;;
	    *) ;;
	  esac
	done
	test -n "$removelist" && \
	  func_show_eval "${RM}r \$removelist"
      fi

      # Now set the variables for building old libraries.
      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
	oldlibs="$oldlibs $output_objdir/$libname.$libext"

	# Transform .lo files to .o files.
	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
      fi

      # Eliminate all temporary directories.
      #for path in $notinst_path; do
      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
      #done

      if test -n "$xrpath"; then
	# If the user specified any rpath flags, then add them.
	temp_xrpath=
	for libdir in $xrpath; do
	  temp_xrpath="$temp_xrpath -R$libdir"
	  case "$finalize_rpath " in
	  *" $libdir "*) ;;
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
	  esac
	done
	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
	  dependency_libs="$temp_xrpath $dependency_libs"
	fi
      fi

      # Make sure dlfiles contains only unique files that won't be dlpreopened
      old_dlfiles="$dlfiles"
      dlfiles=
      for lib in $old_dlfiles; do
	case " $dlprefiles $dlfiles " in
	*" $lib "*) ;;
	*) dlfiles="$dlfiles $lib" ;;
	esac
      done

      # Make sure dlprefiles contains only unique files
      old_dlprefiles="$dlprefiles"
      dlprefiles=
      for lib in $old_dlprefiles; do
	case "$dlprefiles " in
	*" $lib "*) ;;
	*) dlprefiles="$dlprefiles $lib" ;;
	esac
      done

      if test "$build_libtool_libs" = yes; then
	if test -n "$rpath"; then
	  case $host in
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
	    # these systems don't actually have a c library (as such)!
	    ;;
	  *-*-rhapsody* | *-*-darwin1.[012])
	    # Rhapsody C library is in the System framework
	    deplibs="$deplibs System.ltframework"
	    ;;
	  *-*-netbsd*)
	    # Don't link with libc until the a.out ld.so is fixed.
	    ;;
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	    # Do not include libc due to us having libc/libc_r.
	    ;;
	  *-*-sco3.2v5* | *-*-sco5v6*)
	    # Causes problems with __ctype
	    ;;
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
	    # Compiler inserts libc in the correct place for threads to work
	    ;;
	  *)
	    # Add libc to deplibs on all other systems if necessary.
	    if test "$build_libtool_need_lc" = "yes"; then
	      deplibs="$deplibs -lc"
	    fi
	    ;;
	  esac
	fi

	# Transform deplibs into only deplibs that can be linked in shared.
	name_save=$name
	libname_save=$libname
	release_save=$release
	versuffix_save=$versuffix
	major_save=$major
	# I'm not sure if I'm treating the release correctly.  I think
	# release should show up in the -l (ie -lgmp5) so we don't want to
	# add it in twice.  Is that correct?
	release=""
	versuffix=""
	major=""
	newdeplibs=
	droppeddeps=no
	case $deplibs_check_method in
	pass_all)
	  # Don't check for shared/static.  Everything works.
	  # This might be a little naive.  We might want to check
	  # whether the library exists or not.  But this is on
	  # osf3 & osf4 and I'm not really sure... Just
	  # implementing what was already the behavior.
	  newdeplibs=$deplibs
	  ;;
	test_compile)
	  # This code stresses the "libraries are programs" paradigm to its
	  # limits. Maybe even breaks it.  We compile a program, linking it
	  # against the deplibs as a proxy for the library.  Then we can check
	  # whether they linked in statically or dynamically with ldd.
	  $opt_dry_run || $RM conftest.c
	  cat > conftest.c <<EOF
	  int main() { return 0; }
EOF
	  $opt_dry_run || $RM conftest
	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
	    ldd_output=`ldd conftest`
	    for i in $deplibs; do
	      case $i in
	      -l*)
		func_stripname -l '' "$i"
		name=$func_stripname_result
		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
		  case " $predeps $postdeps " in
		  *" $i "*)
		    newdeplibs="$newdeplibs $i"
		    i=""
		    ;;
		  esac
		fi
		if test -n "$i" ; then
		  libname=`eval "\\$ECHO \"$libname_spec\""`
		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
		  set dummy $deplib_matches; shift
		  deplib_match=$1
		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
		    newdeplibs="$newdeplibs $i"
		  else
		    droppeddeps=yes
		    $ECHO
		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
		    $ECHO "*** I have the capability to make that library automatically link in when"
		    $ECHO "*** you link to this library.  But I can only do this if you have a"
		    $ECHO "*** shared version of the library, which I believe you do not have"
		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
		  fi
		fi
		;;
	      *)
		newdeplibs="$newdeplibs $i"
		;;
	      esac
	    done
	  else
	    # Error occurred in the first compile.  Let's try to salvage
	    # the situation: Compile a separate program for each library.
	    for i in $deplibs; do
	      case $i in
	      -l*)
		func_stripname -l '' "$i"
		name=$func_stripname_result
		$opt_dry_run || $RM conftest
		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
		  ldd_output=`ldd conftest`
		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
		    case " $predeps $postdeps " in
		    *" $i "*)
		      newdeplibs="$newdeplibs $i"
		      i=""
		      ;;
		    esac
		  fi
		  if test -n "$i" ; then
		    libname=`eval "\\$ECHO \"$libname_spec\""`
		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
		    set dummy $deplib_matches; shift
		    deplib_match=$1
		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
		      newdeplibs="$newdeplibs $i"
		    else
		      droppeddeps=yes
		      $ECHO
		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
		      $ECHO "*** I have the capability to make that library automatically link in when"
		      $ECHO "*** you link to this library.  But I can only do this if you have a"
		      $ECHO "*** shared version of the library, which you do not appear to have"
		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
		    fi
		  fi
		else
		  droppeddeps=yes
		  $ECHO
		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
		  $ECHO "*** make it link in!  You will probably need to install it or some"
		  $ECHO "*** library that it depends on before this library will be fully"
		  $ECHO "*** functional.  Installing it before continuing would be even better."
		fi
		;;
	      *)
		newdeplibs="$newdeplibs $i"
		;;
	      esac
	    done
	  fi
	  ;;
	file_magic*)
	  set dummy $deplibs_check_method; shift
	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
	  for a_deplib in $deplibs; do
	    case $a_deplib in
	    -l*)
	      func_stripname -l '' "$a_deplib"
	      name=$func_stripname_result
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
		case " $predeps $postdeps " in
		*" $a_deplib "*)
		  newdeplibs="$newdeplibs $a_deplib"
		  a_deplib=""
		  ;;
		esac
	      fi
	      if test -n "$a_deplib" ; then
		libname=`eval "\\$ECHO \"$libname_spec\""`
		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
		  for potent_lib in $potential_libs; do
		      # Follow soft links.
		      if ls -lLd "$potent_lib" 2>/dev/null |
			 $GREP " -> " >/dev/null; then
			continue
		      fi
		      # The statement above tries to avoid entering an
		      # endless loop below, in case of cyclic links.
		      # We might still enter an endless loop, since a link
		      # loop can be closed while we follow links,
		      # but so what?
		      potlib="$potent_lib"
		      while test -h "$potlib" 2>/dev/null; do
			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
			case $potliblink in
			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
			esac
		      done
		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
			 $SED -e 10q |
			 $EGREP "$file_magic_regex" > /dev/null; then
			newdeplibs="$newdeplibs $a_deplib"
			a_deplib=""
			break 2
		      fi
		  done
		done
	      fi
	      if test -n "$a_deplib" ; then
		droppeddeps=yes
		$ECHO
		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
		$ECHO "*** I have the capability to make that library automatically link in when"
		$ECHO "*** you link to this library.  But I can only do this if you have a"
		$ECHO "*** shared version of the library, which you do not appear to have"
		$ECHO "*** because I did check the linker path looking for a file starting"
		if test -z "$potlib" ; then
		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
		else
		  $ECHO "*** with $libname and none of the candidates passed a file format test"
		  $ECHO "*** using a file magic. Last file checked: $potlib"
		fi
	      fi
	      ;;
	    *)
	      # Add a -L argument.
	      newdeplibs="$newdeplibs $a_deplib"
	      ;;
	    esac
	  done # Gone through all deplibs.
	  ;;
	match_pattern*)
	  set dummy $deplibs_check_method; shift
	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
	  for a_deplib in $deplibs; do
	    case $a_deplib in
	    -l*)
	      func_stripname -l '' "$a_deplib"
	      name=$func_stripname_result
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
		case " $predeps $postdeps " in
		*" $a_deplib "*)
		  newdeplibs="$newdeplibs $a_deplib"
		  a_deplib=""
		  ;;
		esac
	      fi
	      if test -n "$a_deplib" ; then
		libname=`eval "\\$ECHO \"$libname_spec\""`
		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
		  for potent_lib in $potential_libs; do
		    potlib="$potent_lib" # see symlink-check above in file_magic test
		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
		       $EGREP "$match_pattern_regex" > /dev/null; then
		      newdeplibs="$newdeplibs $a_deplib"
		      a_deplib=""
		      break 2
		    fi
		  done
		done
	      fi
	      if test -n "$a_deplib" ; then
		droppeddeps=yes
		$ECHO
		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
		$ECHO "*** I have the capability to make that library automatically link in when"
		$ECHO "*** you link to this library.  But I can only do this if you have a"
		$ECHO "*** shared version of the library, which you do not appear to have"
		$ECHO "*** because I did check the linker path looking for a file starting"
		if test -z "$potlib" ; then
		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
		else
		  $ECHO "*** with $libname and none of the candidates passed a file format test"
		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
		fi
	      fi
	      ;;
	    *)
	      # Add a -L argument.
	      newdeplibs="$newdeplibs $a_deplib"
	      ;;
	    esac
	  done # Gone through all deplibs.
	  ;;
	none | unknown | *)
	  newdeplibs=""
	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
	    for i in $predeps $postdeps ; do
	      # can't use Xsed below, because $i might contain '/'
	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
	    done
	  fi
	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
	     $GREP . >/dev/null; then
	    $ECHO
	    if test "X$deplibs_check_method" = "Xnone"; then
	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
	    else
	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
	    fi
	    $ECHO "*** All declared inter-library dependencies are being dropped."
	    droppeddeps=yes
	  fi
	  ;;
	esac
	versuffix=$versuffix_save
	major=$major_save
	release=$release_save
	libname=$libname_save
	name=$name_save

	case $host in
	*-*-rhapsody* | *-*-darwin1.[012])
	  # On Rhapsody replace the C library with the System framework
	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
	  ;;
	esac

	if test "$droppeddeps" = yes; then
	  if test "$module" = yes; then
	    $ECHO
	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
	    $ECHO "*** a static module, that should work as long as the dlopening"
	    $ECHO "*** application is linked with the -dlopen flag."
	    if test -z "$global_symbol_pipe"; then
	      $ECHO
	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
	      $ECHO "*** not find such a program.  So, this module is probably useless."
	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
	    fi
	    if test "$build_old_libs" = no; then
	      oldlibs="$output_objdir/$libname.$libext"
	      build_libtool_libs=module
	      build_old_libs=yes
	    else
	      build_libtool_libs=no
	    fi
	  else
	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
	    $ECHO "*** automatically added whenever a program is linked with this library"
	    $ECHO "*** or is declared to -dlopen it."

	    if test "$allow_undefined" = no; then
	      $ECHO
	      $ECHO "*** Since this library must not contain undefined symbols,"
	      $ECHO "*** because either the platform does not support them or"
	      $ECHO "*** it was explicitly requested with -no-undefined,"
	      $ECHO "*** libtool will only create a static version of it."
	      if test "$build_old_libs" = no; then
		oldlibs="$output_objdir/$libname.$libext"
		build_libtool_libs=module
		build_old_libs=yes
	      else
		build_libtool_libs=no
	      fi
	    fi
	  fi
	fi
	# Done checking deplibs!
	deplibs=$newdeplibs
      fi
      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
      case $host in
	*-*-darwin*)
	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	  ;;
      esac

      # move library search paths that coincide with paths to not yet
      # installed libraries to the beginning of the library search list
      new_libs=
      for path in $notinst_path; do
	case " $new_libs " in
	*" -L$path/$objdir "*) ;;
	*)
	  case " $deplibs " in
	  *" -L$path/$objdir "*)
	    new_libs="$new_libs -L$path/$objdir" ;;
	  esac
	  ;;
	esac
      done
      for deplib in $deplibs; do
	case $deplib in
	-L*)
	  case " $new_libs " in
	  *" $deplib "*) ;;
	  *) new_libs="$new_libs $deplib" ;;
	  esac
	  ;;
	*) new_libs="$new_libs $deplib" ;;
	esac
      done
      deplibs="$new_libs"

      # All the library-specific variables (install_libdir is set above).
      library_names=
      old_library=
      dlname=

      # Test again, we may have decided not to build it any more
      if test "$build_libtool_libs" = yes; then
	if test "$hardcode_into_libs" = yes; then
	  # Hardcode the library paths
	  hardcode_libdirs=
	  dep_rpath=
	  rpath="$finalize_rpath"
	  test "$mode" != relink && rpath="$compile_rpath$rpath"
	  for libdir in $rpath; do
	    if test -n "$hardcode_libdir_flag_spec"; then
	      if test -n "$hardcode_libdir_separator"; then
		if test -z "$hardcode_libdirs"; then
		  hardcode_libdirs="$libdir"
		else
		  # Just accumulate the unique libdirs.
		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		    ;;
		  *)
		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
		    ;;
		  esac
		fi
	      else
		eval flag=\"$hardcode_libdir_flag_spec\"
		dep_rpath="$dep_rpath $flag"
	      fi
	    elif test -n "$runpath_var"; then
	      case "$perm_rpath " in
	      *" $libdir "*) ;;
	      *) perm_rpath="$perm_rpath $libdir" ;;
	      esac
	    fi
	  done
	  # Substitute the hardcoded libdirs into the rpath.
	  if test -n "$hardcode_libdir_separator" &&
	     test -n "$hardcode_libdirs"; then
	    libdir="$hardcode_libdirs"
	    if test -n "$hardcode_libdir_flag_spec_ld"; then
	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
	    else
	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
	    fi
	  fi
	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
	    # We should set the runpath_var.
	    rpath=
	    for dir in $perm_rpath; do
	      rpath="$rpath$dir:"
	    done
	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
	  fi
	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
	fi

	shlibpath="$finalize_shlibpath"
	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
	if test -n "$shlibpath"; then
	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
	fi

	# Get the real and link names of the library.
	eval shared_ext=\"$shrext_cmds\"
	eval library_names=\"$library_names_spec\"
	set dummy $library_names
	shift
	realname="$1"
	shift

	if test -n "$soname_spec"; then
	  eval soname=\"$soname_spec\"
	else
	  soname="$realname"
	fi
	if test -z "$dlname"; then
	  dlname=$soname
	fi

	lib="$output_objdir/$realname"
	linknames=
	for link
	do
	  linknames="$linknames $link"
	done

	# Use standard objects if they are pic
	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
	test "X$libobjs" = "X " && libobjs=

	delfiles=
	if test -n "$export_symbols" && test -n "$include_expsyms"; then
	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
	  export_symbols="$output_objdir/$libname.uexp"
	  delfiles="$delfiles $export_symbols"
	fi

	orig_export_symbols=
	case $host_os in
	cygwin* | mingw* | cegcc*)
	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
	    # exporting using user supplied symfile
	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
	      # and it's NOT already a .def file. Must figure out
	      # which of the given symbols are data symbols and tag
	      # them as such. So, trigger use of export_symbols_cmds.
	      # export_symbols gets reassigned inside the "prepare
	      # the list of exported symbols" if statement, so the
	      # include_expsyms logic still works.
	      orig_export_symbols="$export_symbols"
	      export_symbols=
	      always_export_symbols=yes
	    fi
	  fi
	  ;;
	esac

	# Prepare the list of exported symbols
	if test -z "$export_symbols"; then
	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
	    func_verbose "generating symbol list for \`$libname.la'"
	    export_symbols="$output_objdir/$libname.exp"
	    $opt_dry_run || $RM $export_symbols
	    cmds=$export_symbols_cmds
	    save_ifs="$IFS"; IFS='~'
	    for cmd in $cmds; do
	      IFS="$save_ifs"
	      eval cmd=\"$cmd\"
	      func_len " $cmd"
	      len=$func_len_result
	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
		func_show_eval "$cmd" 'exit $?'
		skipped_export=false
	      else
		# The command line is too long to execute in one step.
		func_verbose "using reloadable object file for export list..."
		skipped_export=:
		# Break out early, otherwise skipped_export may be
		# set to false by a later but shorter cmd.
		break
	      fi
	    done
	    IFS="$save_ifs"
	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
	    fi
	  fi
	fi

	if test -n "$export_symbols" && test -n "$include_expsyms"; then
	  tmp_export_symbols="$export_symbols"
	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
	fi

	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
	  # The given exports_symbols file has to be filtered, so filter it.
	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
	  # 's' commands which not all seds can handle. GNU sed should be fine
	  # though. Also, the filter scales superlinearly with the number of
	  # global variables. join(1) would be nice here, but unfortunately
	  # isn't a blessed tool.
	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
	  export_symbols=$output_objdir/$libname.def
	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
	fi

	tmp_deplibs=
	for test_deplib in $deplibs; do
	  case " $convenience " in
	  *" $test_deplib "*) ;;
	  *)
	    tmp_deplibs="$tmp_deplibs $test_deplib"
	    ;;
	  esac
	done
	deplibs="$tmp_deplibs"

	if test -n "$convenience"; then
	  if test -n "$whole_archive_flag_spec" &&
	    test "$compiler_needs_object" = yes &&
	    test -z "$libobjs"; then
	    # extract the archives, so we have objects to list.
	    # TODO: could optimize this to just extract one archive.
	    whole_archive_flag_spec=
	  fi
	  if test -n "$whole_archive_flag_spec"; then
	    save_libobjs=$libobjs
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
	    test "X$libobjs" = "X " && libobjs=
	  else
	    gentop="$output_objdir/${outputname}x"
	    generated="$generated $gentop"

	    func_extract_archives $gentop $convenience
	    libobjs="$libobjs $func_extract_archives_result"
	    test "X$libobjs" = "X " && libobjs=
	  fi
	fi

	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
	  eval flag=\"$thread_safe_flag_spec\"
	  linker_flags="$linker_flags $flag"
	fi

	# Make a backup of the uninstalled library when relinking
	if test "$mode" = relink; then
	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
	fi

	# Do each of the archive commands.
	if test "$module" = yes && test -n "$module_cmds" ; then
	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
	    eval test_cmds=\"$module_expsym_cmds\"
	    cmds=$module_expsym_cmds
	  else
	    eval test_cmds=\"$module_cmds\"
	    cmds=$module_cmds
	  fi
	else
	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
	    eval test_cmds=\"$archive_expsym_cmds\"
	    cmds=$archive_expsym_cmds
	  else
	    eval test_cmds=\"$archive_cmds\"
	    cmds=$archive_cmds
	  fi
	fi

	if test "X$skipped_export" != "X:" &&
	   func_len " $test_cmds" &&
	   len=$func_len_result &&
	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
	  :
	else
	  # The command line is too long to link in one step, link piecewise
	  # or, if using GNU ld and skipped_export is not :, use a linker
	  # script.

	  # Save the value of $output and $libobjs because we want to
	  # use them later.  If we have whole_archive_flag_spec, we
	  # want to use save_libobjs as it was before
	  # whole_archive_flag_spec was expanded, because we can't
	  # assume the linker understands whole_archive_flag_spec.
	  # This may have to be revisited, in case too many
	  # convenience libraries get linked in and end up exceeding
	  # the spec.
	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
	    save_libobjs=$libobjs
	  fi
	  save_output=$output
	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`

	  # Clear the reloadable object creation command queue and
	  # initialize k to one.
	  test_cmds=
	  concat_cmds=
	  objlist=
	  last_robj=
	  k=1

	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
	    output=${output_objdir}/${output_la}.lnkscript
	    func_verbose "creating GNU ld script: $output"
	    $ECHO 'INPUT (' > $output
	    for obj in $save_libobjs
	    do
	      $ECHO "$obj" >> $output
	    done
	    $ECHO ')' >> $output
	    delfiles="$delfiles $output"
	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
	    output=${output_objdir}/${output_la}.lnk
	    func_verbose "creating linker input file list: $output"
	    : > $output
	    set x $save_libobjs
	    shift
	    firstobj=
	    if test "$compiler_needs_object" = yes; then
	      firstobj="$1 "
	      shift
	    fi
	    for obj
	    do
	      $ECHO "$obj" >> $output
	    done
	    delfiles="$delfiles $output"
	    output=$firstobj\"$file_list_spec$output\"
	  else
	    if test -n "$save_libobjs"; then
	      func_verbose "creating reloadable object files..."
	      output=$output_objdir/$output_la-${k}.$objext
	      eval test_cmds=\"$reload_cmds\"
	      func_len " $test_cmds"
	      len0=$func_len_result
	      len=$len0

	      # Loop over the list of objects to be linked.
	      for obj in $save_libobjs
	      do
		func_len " $obj"
		func_arith $len + $func_len_result
		len=$func_arith_result
		if test "X$objlist" = X ||
		   test "$len" -lt "$max_cmd_len"; then
		  func_append objlist " $obj"
		else
		  # The command $test_cmds is almost too long, add a
		  # command to the queue.
		  if test "$k" -eq 1 ; then
		    # The first file doesn't have a previous command to add.
		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
		  else
		    # All subsequent reloadable object files will link in
		    # the last one created.
		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
		  fi
		  last_robj=$output_objdir/$output_la-${k}.$objext
		  func_arith $k + 1
		  k=$func_arith_result
		  output=$output_objdir/$output_la-${k}.$objext
		  objlist=$obj
		  func_len " $last_robj"
		  func_arith $len0 + $func_len_result
		  len=$func_arith_result
		fi
	      done
	      # Handle the remaining objects by creating one last
	      # reloadable object file.  All subsequent reloadable object
	      # files will link in the last one created.
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
	      if test -n "$last_robj"; then
	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
	      fi
	      delfiles="$delfiles $output"

	    else
	      output=
	    fi

	    if ${skipped_export-false}; then
	      func_verbose "generating symbol list for \`$libname.la'"
	      export_symbols="$output_objdir/$libname.exp"
	      $opt_dry_run || $RM $export_symbols
	      libobjs=$output
	      # Append the command to create the export file.
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
	      if test -n "$last_robj"; then
		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
	      fi
	    fi

	    test -n "$save_libobjs" &&
	      func_verbose "creating a temporary reloadable object file: $output"

	    # Loop through the commands generated above and execute them.
	    save_ifs="$IFS"; IFS='~'
	    for cmd in $concat_cmds; do
	      IFS="$save_ifs"
	      $opt_silent || {
		  func_quote_for_expand "$cmd"
		  eval "func_echo $func_quote_for_expand_result"
	      }
	      $opt_dry_run || eval "$cmd" || {
		lt_exit=$?

		# Restore the uninstalled library and exit
		if test "$mode" = relink; then
		  ( cd "$output_objdir" && \
		    $RM "${realname}T" && \
		    $MV "${realname}U" "$realname" )
		fi

		exit $lt_exit
	      }
	    done
	    IFS="$save_ifs"

	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
	    fi
	  fi

          if ${skipped_export-false}; then
	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
	      tmp_export_symbols="$export_symbols"
	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
	    fi

	    if test -n "$orig_export_symbols"; then
	      # The given exports_symbols file has to be filtered, so filter it.
	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
	      # 's' commands which not all seds can handle. GNU sed should be fine
	      # though. Also, the filter scales superlinearly with the number of
	      # global variables. join(1) would be nice here, but unfortunately
	      # isn't a blessed tool.
	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
	      export_symbols=$output_objdir/$libname.def
	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
	    fi
	  fi

	  libobjs=$output
	  # Restore the value of output.
	  output=$save_output

	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
	    test "X$libobjs" = "X " && libobjs=
	  fi
	  # Expand the library linking commands again to reset the
	  # value of $libobjs for piecewise linking.

	  # Do each of the archive commands.
	  if test "$module" = yes && test -n "$module_cmds" ; then
	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
	      cmds=$module_expsym_cmds
	    else
	      cmds=$module_cmds
	    fi
	  else
	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
	      cmds=$archive_expsym_cmds
	    else
	      cmds=$archive_cmds
	    fi
	  fi
	fi

	if test -n "$delfiles"; then
	  # Append the command to remove temporary files to $cmds.
	  eval cmds=\"\$cmds~\$RM $delfiles\"
	fi

	# Add any objects from preloaded convenience libraries
	if test -n "$dlprefiles"; then
	  gentop="$output_objdir/${outputname}x"
	  generated="$generated $gentop"

	  func_extract_archives $gentop $dlprefiles
	  libobjs="$libobjs $func_extract_archives_result"
	  test "X$libobjs" = "X " && libobjs=
	fi

	save_ifs="$IFS"; IFS='~'
	for cmd in $cmds; do
	  IFS="$save_ifs"
	  eval cmd=\"$cmd\"
	  $opt_silent || {
	    func_quote_for_expand "$cmd"
	    eval "func_echo $func_quote_for_expand_result"
	  }
	  $opt_dry_run || eval "$cmd" || {
	    lt_exit=$?

	    # Restore the uninstalled library and exit
	    if test "$mode" = relink; then
	      ( cd "$output_objdir" && \
	        $RM "${realname}T" && \
		$MV "${realname}U" "$realname" )
	    fi

	    exit $lt_exit
	  }
	done
	IFS="$save_ifs"

	# Restore the uninstalled library and exit
	if test "$mode" = relink; then
	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?

	  if test -n "$convenience"; then
	    if test -z "$whole_archive_flag_spec"; then
	      func_show_eval '${RM}r "$gentop"'
	    fi
	  fi

	  exit $EXIT_SUCCESS
	fi

	# Create links to the real library.
	for linkname in $linknames; do
	  if test "$realname" != "$linkname"; then
	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
	  fi
	done

	# If -module or -export-dynamic was specified, set the dlname.
	if test "$module" = yes || test "$export_dynamic" = yes; then
	  # On all known operating systems, these are identical.
	  dlname="$soname"
	fi
      fi
      ;;

    obj)
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
	func_warning "\`-dlopen' is ignored for objects"
      fi

      case " $deplibs" in
      *\ -l* | *\ -L*)
	func_warning "\`-l' and \`-L' are ignored for objects" ;;
      esac

      test -n "$rpath" && \
	func_warning "\`-rpath' is ignored for objects"

      test -n "$xrpath" && \
	func_warning "\`-R' is ignored for objects"

      test -n "$vinfo" && \
	func_warning "\`-version-info' is ignored for objects"

      test -n "$release" && \
	func_warning "\`-release' is ignored for objects"

      case $output in
      *.lo)
	test -n "$objs$old_deplibs" && \
	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"

	libobj=$output
	func_lo2o "$libobj"
	obj=$func_lo2o_result
	;;
      *)
	libobj=
	obj="$output"
	;;
      esac

      # Delete the old objects.
      $opt_dry_run || $RM $obj $libobj

      # Objects from convenience libraries.  This assumes
      # single-version convenience libraries.  Whenever we create
      # different ones for PIC/non-PIC, this we'll have to duplicate
      # the extraction.
      reload_conv_objs=
      gentop=
      # reload_cmds runs $LD directly, so let us get rid of
      # -Wl from whole_archive_flag_spec and hope we can get by with
      # turning comma into space..
      wl=

      if test -n "$convenience"; then
	if test -n "$whole_archive_flag_spec"; then
	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
	else
	  gentop="$output_objdir/${obj}x"
	  generated="$generated $gentop"

	  func_extract_archives $gentop $convenience
	  reload_conv_objs="$reload_objs $func_extract_archives_result"
	fi
      fi

      # Create the old-style object.
      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test

      output="$obj"
      func_execute_cmds "$reload_cmds" 'exit $?'

      # Exit if we aren't doing a library object file.
      if test -z "$libobj"; then
	if test -n "$gentop"; then
	  func_show_eval '${RM}r "$gentop"'
	fi

	exit $EXIT_SUCCESS
      fi

      if test "$build_libtool_libs" != yes; then
	if test -n "$gentop"; then
	  func_show_eval '${RM}r "$gentop"'
	fi

	# Create an invalid libtool object if no PIC, so that we don't
	# accidentally link it into a program.
	# $show "echo timestamp > $libobj"
	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
	exit $EXIT_SUCCESS
      fi

      if test -n "$pic_flag" || test "$pic_mode" != default; then
	# Only do commands if we really have different PIC objects.
	reload_objs="$libobjs $reload_conv_objs"
	output="$libobj"
	func_execute_cmds "$reload_cmds" 'exit $?'
      fi

      if test -n "$gentop"; then
	func_show_eval '${RM}r "$gentop"'
      fi

      exit $EXIT_SUCCESS
      ;;

    prog)
      case $host in
	*cygwin*) func_stripname '' '.exe' "$output"
	          output=$func_stripname_result.exe;;
      esac
      test -n "$vinfo" && \
	func_warning "\`-version-info' is ignored for programs"

      test -n "$release" && \
	func_warning "\`-release' is ignored for programs"

      test "$preload" = yes \
        && test "$dlopen_support" = unknown \
	&& test "$dlopen_self" = unknown \
	&& test "$dlopen_self_static" = unknown && \
	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."

      case $host in
      *-*-rhapsody* | *-*-darwin1.[012])
	# On Rhapsody replace the C library is the System framework
	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
	;;
      esac

      case $host in
      *-*-darwin*)
	# Don't allow lazy linking, it breaks C++ global constructors
	# But is supposedly fixed on 10.4 or later (yay!).
	if test "$tagname" = CXX ; then
	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
	    10.[0123])
	      compile_command="$compile_command ${wl}-bind_at_load"
	      finalize_command="$finalize_command ${wl}-bind_at_load"
	    ;;
	  esac
	fi
	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
	;;
      esac


      # move library search paths that coincide with paths to not yet
      # installed libraries to the beginning of the library search list
      new_libs=
      for path in $notinst_path; do
	case " $new_libs " in
	*" -L$path/$objdir "*) ;;
	*)
	  case " $compile_deplibs " in
	  *" -L$path/$objdir "*)
	    new_libs="$new_libs -L$path/$objdir" ;;
	  esac
	  ;;
	esac
      done
      for deplib in $compile_deplibs; do
	case $deplib in
	-L*)
	  case " $new_libs " in
	  *" $deplib "*) ;;
	  *) new_libs="$new_libs $deplib" ;;
	  esac
	  ;;
	*) new_libs="$new_libs $deplib" ;;
	esac
      done
      compile_deplibs="$new_libs"


      compile_command="$compile_command $compile_deplibs"
      finalize_command="$finalize_command $finalize_deplibs"

      if test -n "$rpath$xrpath"; then
	# If the user specified any rpath flags, then add them.
	for libdir in $rpath $xrpath; do
	  # This is the magic to use -rpath.
	  case "$finalize_rpath " in
	  *" $libdir "*) ;;
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
	  esac
	done
      fi

      # Now hardcode the library paths
      rpath=
      hardcode_libdirs=
      for libdir in $compile_rpath $finalize_rpath; do
	if test -n "$hardcode_libdir_flag_spec"; then
	  if test -n "$hardcode_libdir_separator"; then
	    if test -z "$hardcode_libdirs"; then
	      hardcode_libdirs="$libdir"
	    else
	      # Just accumulate the unique libdirs.
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		;;
	      *)
		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
		;;
	      esac
	    fi
	  else
	    eval flag=\"$hardcode_libdir_flag_spec\"
	    rpath="$rpath $flag"
	  fi
	elif test -n "$runpath_var"; then
	  case "$perm_rpath " in
	  *" $libdir "*) ;;
	  *) perm_rpath="$perm_rpath $libdir" ;;
	  esac
	fi
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
	  case :$dllsearchpath: in
	  *":$libdir:"*) ;;
	  ::) dllsearchpath=$libdir;;
	  *) dllsearchpath="$dllsearchpath:$libdir";;
	  esac
	  case :$dllsearchpath: in
	  *":$testbindir:"*) ;;
	  ::) dllsearchpath=$testbindir;;
	  *) dllsearchpath="$dllsearchpath:$testbindir";;
	  esac
	  ;;
	esac
      done
      # Substitute the hardcoded libdirs into the rpath.
      if test -n "$hardcode_libdir_separator" &&
	 test -n "$hardcode_libdirs"; then
	libdir="$hardcode_libdirs"
	eval rpath=\" $hardcode_libdir_flag_spec\"
      fi
      compile_rpath="$rpath"

      rpath=
      hardcode_libdirs=
      for libdir in $finalize_rpath; do
	if test -n "$hardcode_libdir_flag_spec"; then
	  if test -n "$hardcode_libdir_separator"; then
	    if test -z "$hardcode_libdirs"; then
	      hardcode_libdirs="$libdir"
	    else
	      # Just accumulate the unique libdirs.
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		;;
	      *)
		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
		;;
	      esac
	    fi
	  else
	    eval flag=\"$hardcode_libdir_flag_spec\"
	    rpath="$rpath $flag"
	  fi
	elif test -n "$runpath_var"; then
	  case "$finalize_perm_rpath " in
	  *" $libdir "*) ;;
	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
	  esac
	fi
      done
      # Substitute the hardcoded libdirs into the rpath.
      if test -n "$hardcode_libdir_separator" &&
	 test -n "$hardcode_libdirs"; then
	libdir="$hardcode_libdirs"
	eval rpath=\" $hardcode_libdir_flag_spec\"
      fi
      finalize_rpath="$rpath"

      if test -n "$libobjs" && test "$build_old_libs" = yes; then
	# Transform all the library objects into standard objects.
	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
      fi

      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"

      # template prelinking step
      if test -n "$prelink_cmds"; then
	func_execute_cmds "$prelink_cmds" 'exit $?'
      fi

      wrappers_required=yes
      case $host in
      *cygwin* | *mingw* )
        if test "$build_libtool_libs" != yes; then
          wrappers_required=no
        fi
        ;;
      *cegcc)
        # Disable wrappers for cegcc, we are cross compiling anyway.
        wrappers_required=no
        ;;
      *)
        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
          wrappers_required=no
        fi
        ;;
      esac
      if test "$wrappers_required" = no; then
	# Replace the output file specification.
	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
	link_command="$compile_command$compile_rpath"

	# We have no uninstalled library dependencies, so finalize right now.
	exit_status=0
	func_show_eval "$link_command" 'exit_status=$?'

	# Delete the generated files.
	if test -f "$output_objdir/${outputname}S.${objext}"; then
	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
	fi

	exit $exit_status
      fi

      if test -n "$compile_shlibpath$finalize_shlibpath"; then
	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
      fi
      if test -n "$finalize_shlibpath"; then
	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
      fi

      compile_var=
      finalize_var=
      if test -n "$runpath_var"; then
	if test -n "$perm_rpath"; then
	  # We should set the runpath_var.
	  rpath=
	  for dir in $perm_rpath; do
	    rpath="$rpath$dir:"
	  done
	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
	fi
	if test -n "$finalize_perm_rpath"; then
	  # We should set the runpath_var.
	  rpath=
	  for dir in $finalize_perm_rpath; do
	    rpath="$rpath$dir:"
	  done
	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
	fi
      fi

      if test "$no_install" = yes; then
	# We don't need to create a wrapper script.
	link_command="$compile_var$compile_command$compile_rpath"
	# Replace the output file specification.
	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
	# Delete the old output file.
	$opt_dry_run || $RM $output
	# Link the executable and exit
	func_show_eval "$link_command" 'exit $?'
	exit $EXIT_SUCCESS
      fi

      if test "$hardcode_action" = relink; then
	# Fast installation is not supported
	link_command="$compile_var$compile_command$compile_rpath"
	relink_command="$finalize_var$finalize_command$finalize_rpath"

	func_warning "this platform does not like uninstalled shared libraries"
	func_warning "\`$output' will be relinked during installation"
      else
	if test "$fast_install" != no; then
	  link_command="$finalize_var$compile_command$finalize_rpath"
	  if test "$fast_install" = yes; then
	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
	  else
	    # fast_install is set to needless
	    relink_command=
	  fi
	else
	  link_command="$compile_var$compile_command$compile_rpath"
	  relink_command="$finalize_var$finalize_command$finalize_rpath"
	fi
      fi

      # Replace the output file specification.
      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`

      # Delete the old output files.
      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname

      func_show_eval "$link_command" 'exit $?'

      # Now create the wrapper script.
      func_verbose "creating $output"

      # Quote the relink command for shipping.
      if test -n "$relink_command"; then
	# Preserve any variables that may affect compiler behavior
	for var in $variables_saved_for_relink; do
	  if eval test -z \"\${$var+set}\"; then
	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	  elif eval var_value=\$$var; test -z "$var_value"; then
	    relink_command="$var=; export $var; $relink_command"
	  else
	    func_quote_for_eval "$var_value"
	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	  fi
	done
	relink_command="(cd `pwd`; $relink_command)"
	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
      fi

      # Quote $ECHO for shipping.
      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
	case $progpath in
	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
	esac
	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
      else
	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
      fi

      # Only actually do things if not in dry run mode.
      $opt_dry_run || {
	# win32 will think the script is a binary if it has
	# a .exe suffix, so we strip it off here.
	case $output in
	  *.exe) func_stripname '' '.exe' "$output"
	         output=$func_stripname_result ;;
	esac
	# test for cygwin because mv fails w/o .exe extensions
	case $host in
	  *cygwin*)
	    exeext=.exe
	    func_stripname '' '.exe' "$outputname"
	    outputname=$func_stripname_result ;;
	  *) exeext= ;;
	esac
	case $host in
	  *cygwin* | *mingw* )
	    func_dirname_and_basename "$output" "" "."
	    output_name=$func_basename_result
	    output_path=$func_dirname_result
	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
	    cwrapper="$output_path/$output_name.exe"
	    $RM $cwrappersource $cwrapper
	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15

	    func_emit_cwrapperexe_src > $cwrappersource

	    # The wrapper executable is built using the $host compiler,
	    # because it contains $host paths and files. If cross-
	    # compiling, it, like the target executable, must be
	    # executed on the $host or under an emulation environment.
	    $opt_dry_run || {
	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
	      $STRIP $cwrapper
	    }

	    # Now, create the wrapper script for func_source use:
	    func_ltwrapper_scriptname $cwrapper
	    $RM $func_ltwrapper_scriptname_result
	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
	    $opt_dry_run || {
	      # note: this script will not be executed, so do not chmod.
	      if test "x$build" = "x$host" ; then
		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
	      else
		func_emit_wrapper no > $func_ltwrapper_scriptname_result
	      fi
	    }
	  ;;
	  * )
	    $RM $output
	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15

	    func_emit_wrapper no > $output
	    chmod +x $output
	  ;;
	esac
      }
      exit $EXIT_SUCCESS
      ;;
    esac

    # See if we need to build an old-fashioned archive.
    for oldlib in $oldlibs; do

      if test "$build_libtool_libs" = convenience; then
	oldobjs="$libobjs_save $symfileobj"
	addlibs="$convenience"
	build_libtool_libs=no
      else
	if test "$build_libtool_libs" = module; then
	  oldobjs="$libobjs_save"
	  build_libtool_libs=no
	else
	  oldobjs="$old_deplibs $non_pic_objects"
	  if test "$preload" = yes && test -f "$symfileobj"; then
	    oldobjs="$oldobjs $symfileobj"
	  fi
	fi
	addlibs="$old_convenience"
      fi

      if test -n "$addlibs"; then
	gentop="$output_objdir/${outputname}x"
	generated="$generated $gentop"

	func_extract_archives $gentop $addlibs
	oldobjs="$oldobjs $func_extract_archives_result"
      fi

      # Do each command in the archive commands.
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
	cmds=$old_archive_from_new_cmds
      else

	# Add any objects from preloaded convenience libraries
	if test -n "$dlprefiles"; then
	  gentop="$output_objdir/${outputname}x"
	  generated="$generated $gentop"

	  func_extract_archives $gentop $dlprefiles
	  oldobjs="$oldobjs $func_extract_archives_result"
	fi

	# POSIX demands no paths to be encoded in archives.  We have
	# to avoid creating archives with duplicate basenames if we
	# might have to extract them afterwards, e.g., when creating a
	# static archive out of a convenience library, or when linking
	# the entirety of a libtool archive into another (currently
	# not supported by libtool).
	if (for obj in $oldobjs
	    do
	      func_basename "$obj"
	      $ECHO "$func_basename_result"
	    done | sort | sort -uc >/dev/null 2>&1); then
	  :
	else
	  $ECHO "copying selected object files to avoid basename conflicts..."
	  gentop="$output_objdir/${outputname}x"
	  generated="$generated $gentop"
	  func_mkdir_p "$gentop"
	  save_oldobjs=$oldobjs
	  oldobjs=
	  counter=1
	  for obj in $save_oldobjs
	  do
	    func_basename "$obj"
	    objbase="$func_basename_result"
	    case " $oldobjs " in
	    " ") oldobjs=$obj ;;
	    *[\ /]"$objbase "*)
	      while :; do
		# Make sure we don't pick an alternate name that also
		# overlaps.
		newobj=lt$counter-$objbase
		func_arith $counter + 1
		counter=$func_arith_result
		case " $oldobjs " in
		*[\ /]"$newobj "*) ;;
		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
		esac
	      done
	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
	      oldobjs="$oldobjs $gentop/$newobj"
	      ;;
	    *) oldobjs="$oldobjs $obj" ;;
	    esac
	  done
	fi
	eval cmds=\"$old_archive_cmds\"

	func_len " $cmds"
	len=$func_len_result
	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
	  cmds=$old_archive_cmds
	else
	  # the command line is too long to link in one step, link in parts
	  func_verbose "using piecewise archive linking..."
	  save_RANLIB=$RANLIB
	  RANLIB=:
	  objlist=
	  concat_cmds=
	  save_oldobjs=$oldobjs
	  oldobjs=
	  # Is there a better way of finding the last object in the list?
	  for obj in $save_oldobjs
	  do
	    last_oldobj=$obj
	  done
	  eval test_cmds=\"$old_archive_cmds\"
	  func_len " $test_cmds"
	  len0=$func_len_result
	  len=$len0
	  for obj in $save_oldobjs
	  do
	    func_len " $obj"
	    func_arith $len + $func_len_result
	    len=$func_arith_result
	    func_append objlist " $obj"
	    if test "$len" -lt "$max_cmd_len"; then
	      :
	    else
	      # the above command should be used before it gets too long
	      oldobjs=$objlist
	      if test "$obj" = "$last_oldobj" ; then
		RANLIB=$save_RANLIB
	      fi
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
	      objlist=
	      len=$len0
	    fi
	  done
	  RANLIB=$save_RANLIB
	  oldobjs=$objlist
	  if test "X$oldobjs" = "X" ; then
	    eval cmds=\"\$concat_cmds\"
	  else
	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
	  fi
	fi
      fi
      func_execute_cmds "$cmds" 'exit $?'
    done

    test -n "$generated" && \
      func_show_eval "${RM}r$generated"

    # Now create the libtool archive.
    case $output in
    *.la)
      old_library=
      test "$build_old_libs" = yes && old_library="$libname.$libext"
      func_verbose "creating $output"

      # Preserve any variables that may affect compiler behavior
      for var in $variables_saved_for_relink; do
	if eval test -z \"\${$var+set}\"; then
	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	elif eval var_value=\$$var; test -z "$var_value"; then
	  relink_command="$var=; export $var; $relink_command"
	else
	  func_quote_for_eval "$var_value"
	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	fi
      done
      # Quote the link command for shipping.
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
      if test "$hardcode_automatic" = yes ; then
	relink_command=
      fi

      # Only create the output if not a dry run.
      $opt_dry_run || {
	for installed in no yes; do
	  if test "$installed" = yes; then
	    if test -z "$install_libdir"; then
	      break
	    fi
	    output="$output_objdir/$outputname"i
	    # Replace all uninstalled libtool libraries with the installed ones
	    newdependency_libs=
	    for deplib in $dependency_libs; do
	      case $deplib in
	      *.la)
		func_basename "$deplib"
		name="$func_basename_result"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
		test -z "$libdir" && \
		  func_fatal_error "\`$deplib' is not a valid libtool archive"
		newdependency_libs="$newdependency_libs $libdir/$name"
		;;
	      *) newdependency_libs="$newdependency_libs $deplib" ;;
	      esac
	    done
	    dependency_libs="$newdependency_libs"
	    newdlfiles=

	    for lib in $dlfiles; do
	      case $lib in
	      *.la)
	        func_basename "$lib"
		name="$func_basename_result"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
		test -z "$libdir" && \
		  func_fatal_error "\`$lib' is not a valid libtool archive"
		newdlfiles="$newdlfiles $libdir/$name"
		;;
	      *) newdlfiles="$newdlfiles $lib" ;;
	      esac
	    done
	    dlfiles="$newdlfiles"
	    newdlprefiles=
	    for lib in $dlprefiles; do
	      case $lib in
	      *.la)
		# Only pass preopened files to the pseudo-archive (for
		# eventual linking with the app. that links it) if we
		# didn't already link the preopened objects directly into
		# the library:
		func_basename "$lib"
		name="$func_basename_result"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
		test -z "$libdir" && \
		  func_fatal_error "\`$lib' is not a valid libtool archive"
		newdlprefiles="$newdlprefiles $libdir/$name"
		;;
	      esac
	    done
	    dlprefiles="$newdlprefiles"
	  else
	    newdlfiles=
	    for lib in $dlfiles; do
	      case $lib in
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
		*) abs=`pwd`"/$lib" ;;
	      esac
	      newdlfiles="$newdlfiles $abs"
	    done
	    dlfiles="$newdlfiles"
	    newdlprefiles=
	    for lib in $dlprefiles; do
	      case $lib in
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
		*) abs=`pwd`"/$lib" ;;
	      esac
	      newdlprefiles="$newdlprefiles $abs"
	    done
	    dlprefiles="$newdlprefiles"
	  fi
	  $RM $output
	  # place dlname in correct position for cygwin
	  tdlname=$dlname
	  case $host,$output,$installed,$module,$dlname in
	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
	  esac
	  $ECHO > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='$tdlname'

# Names of this library.
library_names='$library_names'

# The name of the static archive.
old_library='$old_library'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags='$new_inherited_linker_flags'

# Libraries that this one depends upon.
dependency_libs='$dependency_libs'

# Names of additional weak libraries provided by this library
weak_library_names='$weak_libs'

# Version information for $libname.
current=$current
age=$age
revision=$revision

# Is this an already installed library?
installed=$installed

# Should we warn about portability when linking against -modules?
shouldnotlink=$module

# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'

# Directory that this library needs to be installed in:
libdir='$install_libdir'"
	  if test "$installed" = no && test "$need_relink" = yes; then
	    $ECHO >> $output "\
relink_command=\"$relink_command\""
	  fi
	done
      }

      # Do a symbolic link so that the libtool archive can be found in
      # LD_LIBRARY_PATH before the program is installed.
      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
      ;;
    esac
    exit $EXIT_SUCCESS
}

{ test "$mode" = link || test "$mode" = relink; } &&
    func_mode_link ${1+"$@"}


# func_mode_uninstall arg...
func_mode_uninstall ()
{
    $opt_debug
    RM="$nonopt"
    files=
    rmforce=
    exit_status=0

    # This variable tells wrapper scripts just to set variables rather
    # than running their programs.
    libtool_install_magic="$magic"

    for arg
    do
      case $arg in
      -f) RM="$RM $arg"; rmforce=yes ;;
      -*) RM="$RM $arg" ;;
      *) files="$files $arg" ;;
      esac
    done

    test -z "$RM" && \
      func_fatal_help "you must specify an RM program"

    rmdirs=

    origobjdir="$objdir"
    for file in $files; do
      func_dirname "$file" "" "."
      dir="$func_dirname_result"
      if test "X$dir" = X.; then
	objdir="$origobjdir"
      else
	objdir="$dir/$origobjdir"
      fi
      func_basename "$file"
      name="$func_basename_result"
      test "$mode" = uninstall && objdir="$dir"

      # Remember objdir for removal later, being careful to avoid duplicates
      if test "$mode" = clean; then
	case " $rmdirs " in
	  *" $objdir "*) ;;
	  *) rmdirs="$rmdirs $objdir" ;;
	esac
      fi

      # Don't error if the file doesn't exist and rm -f was used.
      if { test -L "$file"; } >/dev/null 2>&1 ||
	 { test -h "$file"; } >/dev/null 2>&1 ||
	 test -f "$file"; then
	:
      elif test -d "$file"; then
	exit_status=1
	continue
      elif test "$rmforce" = yes; then
	continue
      fi

      rmfiles="$file"

      case $name in
      *.la)
	# Possibly a libtool archive, so verify it.
	if func_lalib_p "$file"; then
	  func_source $dir/$name

	  # Delete the libtool libraries and symlinks.
	  for n in $library_names; do
	    rmfiles="$rmfiles $objdir/$n"
	  done
	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"

	  case "$mode" in
	  clean)
	    case "  $library_names " in
	    # "  " in the beginning catches empty $dlname
	    *" $dlname "*) ;;
	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
	    esac
	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
	    ;;
	  uninstall)
	    if test -n "$library_names"; then
	      # Do each command in the postuninstall commands.
	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
	    fi

	    if test -n "$old_library"; then
	      # Do each command in the old_postuninstall commands.
	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
	    fi
	    # FIXME: should reinstall the best remaining shared library.
	    ;;
	  esac
	fi
	;;

      *.lo)
	# Possibly a libtool object, so verify it.
	if func_lalib_p "$file"; then

	  # Read the .lo file
	  func_source $dir/$name

	  # Add PIC object to the list of files to remove.
	  if test -n "$pic_object" &&
	     test "$pic_object" != none; then
	    rmfiles="$rmfiles $dir/$pic_object"
	  fi

	  # Add non-PIC object to the list of files to remove.
	  if test -n "$non_pic_object" &&
	     test "$non_pic_object" != none; then
	    rmfiles="$rmfiles $dir/$non_pic_object"
	  fi
	fi
	;;

      *)
	if test "$mode" = clean ; then
	  noexename=$name
	  case $file in
	  *.exe)
	    func_stripname '' '.exe' "$file"
	    file=$func_stripname_result
	    func_stripname '' '.exe' "$name"
	    noexename=$func_stripname_result
	    # $file with .exe has already been added to rmfiles,
	    # add $file without .exe
	    rmfiles="$rmfiles $file"
	    ;;
	  esac
	  # Do a test to see if this is a libtool program.
	  if func_ltwrapper_p "$file"; then
	    if func_ltwrapper_executable_p "$file"; then
	      func_ltwrapper_scriptname "$file"
	      relink_command=
	      func_source $func_ltwrapper_scriptname_result
	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
	    else
	      relink_command=
	      func_source $dir/$noexename
	    fi

	    # note $name still contains .exe if it was in $file originally
	    # as does the version of $file that was added into $rmfiles
	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
	    if test "$fast_install" = yes && test -n "$relink_command"; then
	      rmfiles="$rmfiles $objdir/lt-$name"
	    fi
	    if test "X$noexename" != "X$name" ; then
	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
	    fi
	  fi
	fi
	;;
      esac
      func_show_eval "$RM $rmfiles" 'exit_status=1'
    done
    objdir="$origobjdir"

    # Try to remove the ${objdir}s in the directories where we deleted files
    for dir in $rmdirs; do
      if test -d "$dir"; then
	func_show_eval "rmdir $dir >/dev/null 2>&1"
      fi
    done

    exit $exit_status
}

{ test "$mode" = uninstall || test "$mode" = clean; } &&
    func_mode_uninstall ${1+"$@"}

test -z "$mode" && {
  help="$generic_help"
  func_fatal_help "you must specify a MODE"
}

test -z "$exec_cmd" && \
  func_fatal_help "invalid operation mode \`$mode'"

if test -n "$exec_cmd"; then
  eval exec "$exec_cmd"
  exit $EXIT_FAILURE
fi

exit $exit_status


# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries.  Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
# them.  This is particularly important on AIX, because we don't
# support having both static and shared libraries enabled at the same
# time on that platform, so we default to a shared-only configuration.
# If a disable-shared tag is given, we'll fallback to a static-only
# configuration.  But we'll never go from static-only to shared-only.

# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
build_libtool_libs=no
build_old_libs=yes
# ### END LIBTOOL TAG CONFIG: disable-shared

# ### BEGIN LIBTOOL TAG CONFIG: disable-static
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
# ### END LIBTOOL TAG CONFIG: disable-static

# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
# vi:sw=2


File Added: pkgsrc/archivers/libarchive/files/build/autoconf/missing
#! /bin/sh
# Common stub for a few missing GNU programs while installing.

scriptversion=2006-05-10.23

# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
#   Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

if test $# -eq 0; then
  echo 1>&2 "Try \`$0 --help' for more information"
  exit 1
fi

run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'

# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
  configure_ac=configure.ac
else
  configure_ac=configure.in
fi

msg="missing on your system"

case $1 in
--run)
  # Try to run requested program, and just exit if it succeeds.
  run=
  shift
  "$@" && exit 0
  # Exit code 63 means version mismatch.  This often happens
  # when the user try to use an ancient version of a tool on
  # a file that requires a minimum version.  In this case we
  # we should proceed has if the program had been absent, or
  # if --run hadn't been passed.
  if test $? = 63; then
    run=:
    msg="probably too old"
  fi
  ;;

  -h|--h|--he|--hel|--help)
    echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...

Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.

Options:
  -h, --help      display this help and exit
  -v, --version   output version information and exit
  --run           try to run the given command, and emulate it if it fails

Supported PROGRAM values:
  aclocal      touch file \`aclocal.m4'
  autoconf     touch file \`configure'
  autoheader   touch file \`config.h.in'
  autom4te     touch the output file, or create a stub one
  automake     touch all \`Makefile.in' files
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
  flex         create \`lex.yy.c', if possible, from existing .c
  help2man     touch the output file
  lex          create \`lex.yy.c', if possible, from existing .c
  makeinfo     touch the output file
  tar          try tar, gnutar, gtar, then tar without non-portable flags
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]

Send bug reports to <bug-automake@gnu.org>."
    exit $?
    ;;

  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
    echo "missing $scriptversion (GNU Automake)"
    exit $?
    ;;

  -*)
    echo 1>&2 "$0: Unknown \`$1' option"
    echo 1>&2 "Try \`$0 --help' for more information"
    exit 1
    ;;

esac

# Now exit if we have it, but it failed.  Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case $1 in
  lex|yacc)
    # Not GNU programs, they don't have --version.
    ;;

  tar)
    if test -n "$run"; then
       echo 1>&2 "ERROR: \`tar' requires --run"
       exit 1
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
       exit 1
    fi
    ;;

  *)
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
       # We have it, but it failed.
       exit 1
    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
       # Could not run --version or --help.  This is probably someone
       # running `$TOOL --version' or `$TOOL --help' to check whether
       # $TOOL exists and not knowing $TOOL uses missing.
       exit 1
    fi
    ;;
esac

# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
  aclocal*)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
         to install the \`Automake' and \`Perl' packages.  Grab them from
         any GNU archive site."
    touch aclocal.m4
    ;;

  autoconf)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`${configure_ac}'.  You might want to install the
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
         archive site."
    touch configure
    ;;

  autoheader)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
         from any GNU archive site."
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
    test -z "$files" && files="config.h"
    touch_files=
    for f in $files; do
      case $f in
      *:*) touch_files="$touch_files "`echo "$f" |
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
      *) touch_files="$touch_files $f.in";;
      esac
    done
    touch $touch_files
    ;;

  automake*)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
         You might want to install the \`Automake' and \`Perl' packages.
         Grab them from any GNU archive site."
    find . -type f -name Makefile.am -print |
	   sed 's/\.am$/.in/' |
	   while read f; do touch "$f"; done
    ;;

  autom4te)
    echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
         You might have modified some files without having the
         proper tools for further handling them.
         You can get \`$1' as part of \`Autoconf' from any GNU
         archive site."

    file=`echo "$*" | sed -n "$sed_output"`
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    if test -f "$file"; then
	touch $file
    else
	test -z "$file" || exec >$file
	echo "#! /bin/sh"
	echo "# Created by GNU Automake missing as a replacement of"
	echo "#  $ $@"
	echo "exit 0"
	chmod +x $file
	exit 1
    fi
    ;;

  bison|yacc)
    echo 1>&2 "\
WARNING: \`$1' $msg.  You should only need it if
         you modified a \`.y' file.  You may need the \`Bison' package
         in order for those modifications to take effect.  You can get
         \`Bison' from any GNU archive site."
    rm -f y.tab.c y.tab.h
    if test $# -ne 1; then
        eval LASTARG="\${$#}"
	case $LASTARG in
	*.y)
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
	    if test -f "$SRCFILE"; then
	         cp "$SRCFILE" y.tab.c
	    fi
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
	    if test -f "$SRCFILE"; then
	         cp "$SRCFILE" y.tab.h
	    fi
	  ;;
	esac
    fi
    if test ! -f y.tab.h; then
	echo >y.tab.h
    fi
    if test ! -f y.tab.c; then
	echo 'main() { return 0; }' >y.tab.c
    fi
    ;;

  lex|flex)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified a \`.l' file.  You may need the \`Flex' package
         in order for those modifications to take effect.  You can get
         \`Flex' from any GNU archive site."
    rm -f lex.yy.c
    if test $# -ne 1; then
        eval LASTARG="\${$#}"
	case $LASTARG in
	*.l)
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
	    if test -f "$SRCFILE"; then
	         cp "$SRCFILE" lex.yy.c
	    fi
	  ;;
	esac
    fi
    if test ! -f lex.yy.c; then
	echo 'main() { return 0; }' >lex.yy.c
    fi
    ;;

  help2man)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
	 you modified a dependency of a manual page.  You may need the
	 \`Help2man' package in order for those modifications to take
	 effect.  You can get \`Help2man' from any GNU archive site."

    file=`echo "$*" | sed -n "$sed_output"`
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    if test -f "$file"; then
	touch $file
    else
	test -z "$file" || exec >$file
	echo ".ab help2man is required to generate this page"
	exit 1
    fi
    ;;

  makeinfo)
    echo 1>&2 "\
WARNING: \`$1' is $msg.  You should only need it if
         you modified a \`.texi' or \`.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy \`make' (AIX,
         DU, IRIX).  You might want to install the \`Texinfo' package or
         the \`GNU make' package.  Grab either from any GNU archive site."
    # The file to touch is that specified with -o ...
    file=`echo "$*" | sed -n "$sed_output"`
    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    if test -z "$file"; then
      # ... or it is the one specified with @setfilename ...
      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
      file=`sed -n '
	/^@setfilename/{
	  s/.* \([^ ]*\) *$/\1/
	  p
	  q
	}' $infile`
      # ... or it is derived from the source name (dir/f.texi becomes f.info)
      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
    fi
    # If the file does not exist, the user really needs makeinfo;
    # let's fail without touching anything.
    test -f $file || exit 1
    touch $file
    ;;

  tar)
    shift

    # We have already tried tar in the generic part.
    # Look for gnutar/gtar before invocation to avoid ugly error
    # messages.
    if (gnutar --version > /dev/null 2>&1); then
       gnutar "$@" && exit 0
    fi
    if (gtar --version > /dev/null 2>&1); then
       gtar "$@" && exit 0
    fi
    firstarg="$1"
    if shift; then
	case $firstarg in
	*o*)
	    firstarg=`echo "$firstarg" | sed s/o//`
	    tar "$firstarg" "$@" && exit 0
	    ;;
	esac
	case $firstarg in
	*h*)
	    firstarg=`echo "$firstarg" | sed s/h//`
	    tar "$firstarg" "$@" && exit 0
	    ;;
	esac
    fi

    echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
         You may want to install GNU tar or Free paxutils, or check the
         command line arguments."
    exit 1
    ;;

  *)
    echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
         You might have modified some files without having the
         proper tools for further handling them.  Check the \`README' file,
         it often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in case
         some other package would contain this missing \`$1' program."
    exit 1
    ;;
esac

exit 0

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File Added: pkgsrc/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: libarchive
Description: library that can create and read several streaming archive formats
Version: @VERSION@
Libs: -larchive
Libs.private: @LIBS@

File Added: pkgsrc/archivers/libarchive/files/build/cmake/Attic/FindLZMA.cmake
# - Find lzma and lzmadec
# Find the native LZMA includes and library
#
#  LZMA_INCLUDE_DIR    - where to find lzma.h, etc.
#  LZMA_LIBRARIES      - List of libraries when using liblzma.
#  LZMA_FOUND          - True if liblzma found.
#  LZMADEC_INCLUDE_DIR - where to find lzmadec.h, etc.
#  LZMADEC_LIBRARIES   - List of libraries when using liblzmadec.
#  LZMADEC_FOUND       - True if liblzmadec found.

IF (LZMA_INCLUDE_DIR)
  # Already in cache, be silent
  SET(LZMA_FIND_QUIETLY TRUE)
ENDIF (LZMA_INCLUDE_DIR)

FIND_PATH(LZMA_INCLUDE_DIR lzma.h)
FIND_LIBRARY(LZMA_LIBRARY NAMES lzma )

# handle the QUIETLY and REQUIRED arguments and set LZMA_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZMA DEFAULT_MSG LZMA_LIBRARY LZMA_INCLUDE_DIR)

IF(LZMA_FOUND)
  SET( LZMA_LIBRARIES ${LZMA_LIBRARY} )
ELSE(LZMA_FOUND)
  SET( LZMA_LIBRARIES )

  IF (LZMADEC_INCLUDE_DIR)
    # Already in cache, be silent
    SET(LZMADEC_FIND_QUIETLY TRUE)
  ENDIF (LZMADEC_INCLUDE_DIR)

  FIND_PATH(LZMADEC_INCLUDE_DIR lzmadec.h)
  FIND_LIBRARY(LZMADEC_LIBRARY NAMES lzmadec )

  # handle the QUIETLY and REQUIRED arguments and set LZMADEC_FOUND to TRUE if 
  # all listed variables are TRUE
  INCLUDE(FindPackageHandleStandardArgs)
  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZMADEC DEFAULT_MSG LZMADEC_LIBRARY
    LZMADEC_INCLUDE_DIR)

  IF(LZMADEC_FOUND)
    SET( LZMADEC_LIBRARIES ${LZMADEC_LIBRARY} )
  ELSE(LZMADEC_FOUND)
    SET( LZMADEC_LIBRARIES )
  ENDIF(LZMADEC_FOUND)
ENDIF(LZMA_FOUND)


MARK_AS_ADVANCED( LZMA_LIBRARY LZMA_INCLUDE_DIR
  LZMADEC_LIBRARY LZMADEC_INCLUDE_DIR )

File Added: pkgsrc/archivers/libarchive/files/build/cmake/config.h.in
/* config.h.  Generated from config.h.cmake by cmake configure */

/* Version number of bsdcpio */
#cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}"

/* Version number of bsdtar */
#cmakedefine BSDTAR_VERSION_STRING "${BSDTAR_VERSION_STRING}"

/* Define to 1 if you have the `acl_create_entry' function. */
#cmakedefine HAVE_ACL_CREATE_ENTRY 1

/* Define to 1 if you have the `acl_get_link' function. */
#cmakedefine HAVE_ACL_GET_LINK 1

/* Define to 1 if you have the `acl_get_link_np' function. */
#cmakedefine HAVE_ACL_GET_LINK_NP 1

/* Define to 1 if you have the `acl_get_perm' function. */
#cmakedefine HAVE_ACL_GET_PERM 1

/* Define to 1 if you have the `acl_get_perm_np' function. */
#cmakedefine HAVE_ACL_GET_PERM_NP 1

/* Define to 1 if you have the `acl_init' function. */
#cmakedefine HAVE_ACL_INIT 1

/* Define to 1 if you have the <acl/libacl.h> header file. */
#cmakedefine HAVE_ACL_LIBACL_H 1

/* Define to 1 if the system has the type `acl_permset_t'. */
#cmakedefine HAVE_ACL_PERMSET_T 1

/* Define to 1 if you have the `acl_set_fd' function. */
#cmakedefine HAVE_ACL_SET_FD 1

/* Define to 1 if you have the `acl_set_fd_np' function. */
#cmakedefine HAVE_ACL_SET_FD_NP 1

/* Define to 1 if you have the `acl_set_file' function. */
#cmakedefine HAVE_ACL_SET_FILE 1

/* True for systems with POSIX ACL support */
#cmakedefine HAVE_ACL_USER 1

/* Define to 1 if you have the <attr/xattr.h> header file. */
#cmakedefine HAVE_ATTR_XATTR_H 1

/* Define to 1 if you have the <bsdxml.h> header file. */
#cmakedefine HAVE_BSDXML_H 1

/* Define to 1 if you have the <bzlib.h> header file. */
#cmakedefine HAVE_BZLIB_H 1

/* Define to 1 if you have the `chflags' function. */
#cmakedefine HAVE_CHFLAGS 1

/* Define to 1 if you have the `chown' function. */
#cmakedefine HAVE_CHOWN 1

/* Define to 1 if you have the `chroot' function. */
#cmakedefine HAVE_CHROOT 1

/* Define to 1 if you have the `CreateHardLinkA' function. */
#cmakedefine HAVE_CREATEHARDLINKA 1

/* Define to 1 if you have the `CreateHardLinkW' function. */
#cmakedefine HAVE_CREATEHARDLINKW 1

/* Define to 1 if you have the <ctype.h> header file. */
#cmakedefine HAVE_CTYPE_H 1

/* Define to 1 if you have the `cygwin_conv_path' function. */
#cmakedefine HAVE_CYGWIN_CONV_PATH 1

/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_INT64_MAX 1

/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_INT64_MIN 1

/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
   */
#cmakedefine HAVE_DECL_OPTARG 1

/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
   */
#cmakedefine HAVE_DECL_OPTIND 1

/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_SIZE_MAX 1

/* Define to 1 if you have the declaration of `SSIZE_MAX', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_SSIZE_MAX 1

/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_STRERROR_R 1

/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_UINT32_MAX 1

/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you
   don't. */
#cmakedefine HAVE_DECL_UINT64_MAX 1

/* Define to 1 if you have the <direct.h> header file. */
#cmakedefine HAVE_DIRECT_H 1

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
#cmakedefine HAVE_DIRENT_H 1

/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1

/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#cmakedefine HAVE_DOPRNT 1

/* Define to 1 if nl_langinfo supports D_MD_ORDER */
#cmakedefine HAVE_D_MD_ORDER 1

/* A possible errno value for invalid file format errors */
#cmakedefine HAVE_EFTYPE 1

/* A possible errno value for invalid file format errors */
#cmakedefine HAVE_EILSEQ 1

/* Define to 1 if you have the <errno.h> header file. */
#cmakedefine HAVE_ERRNO_H 1

/* Define to 1 if you have the <expat.h> header file. */
#cmakedefine HAVE_EXPAT_H 1

/* Define to 1 if you have the <ext2fs/ext2_fs.h> header file. */
#cmakedefine HAVE_EXT2FS_EXT2_FS_H 1

/* Define to 1 if you have the `extattr_get_file' function. */
#cmakedefine HAVE_EXTATTR_GET_FILE 1

/* Define to 1 if you have the `extattr_list_file' function. */
#cmakedefine HAVE_EXTATTR_LIST_FILE 1

/* Define to 1 if you have the `extattr_set_fd' function. */
#cmakedefine HAVE_EXTATTR_SET_FD 1

/* Define to 1 if you have the `extattr_set_file' function. */
#cmakedefine HAVE_EXTATTR_SET_FILE 1

/* Define to 1 if you have the `fchdir' function. */
#cmakedefine HAVE_FCHDIR 1

/* Define to 1 if you have the `fchflags' function. */
#cmakedefine HAVE_FCHFLAGS 1

/* Define to 1 if you have the `fchmod' function. */
#cmakedefine HAVE_FCHMOD 1

/* Define to 1 if you have the `fchown' function. */
#cmakedefine HAVE_FCHOWN 1

/* Define to 1 if you have the `fcntl' function. */
#cmakedefine HAVE_FCNTL 1

/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1

/* Define to 1 if you have the `fork' function. */
#cmakedefine HAVE_FORK 1

/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#cmakedefine HAVE_FSEEKO 1

/* Define to 1 if you have the `fsetxattr' function. */
#cmakedefine HAVE_FSETXATTR 1

/* Define to 1 if you have the `fstat' function. */
#cmakedefine HAVE_FSTAT 1

/* Define to 1 if you have the `ftruncate' function. */
#cmakedefine HAVE_FTRUNCATE 1

/* Define to 1 if you have the `futimens' function. */
#cmakedefine HAVE_FUTIMENS 1

/* Define to 1 if you have the `futimes' function. */
#cmakedefine HAVE_FUTIMES 1

/* Define to 1 if you have the `geteuid' function. */
#cmakedefine HAVE_GETEUID 1

/* Define to 1 if you have the `getpid' function. */
#cmakedefine HAVE_GETPID 1

/* Define to 1 if you have the `getxattr' function. */
#cmakedefine HAVE_GETXATTR 1

/* Define to 1 if you have the <grp.h> header file. */
#cmakedefine HAVE_GRP_H 1

/* Define to 1 if the system has the type `intmax_t'. */
#cmakedefine HAVE_INTMAX_T 1

/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1

/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H 1

/* Define to 1 if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1

/* Define to 1 if you have the `lchflags' function. */
#cmakedefine HAVE_LCHFLAGS 1

/* Define to 1 if you have the `lchmod' function. */
#cmakedefine HAVE_LCHMOD 1

/* Define to 1 if you have the `lchown' function. */
#cmakedefine HAVE_LCHOWN 1

/* Define to 1 if you have the `lgetxattr' function. */
#cmakedefine HAVE_LGETXATTR 1

/* Define to 1 if you have the `acl' library (-lacl). */
#cmakedefine HAVE_LIBACL 1

/* Define to 1 if you have the `attr' library (-lattr). */
#cmakedefine HAVE_LIBATTR 1

/* Define to 1 if you have the `bsdxml' library (-lbsdxml). */
#cmakedefine HAVE_LIBBSDXML 1

/* Define to 1 if you have the `bz2' library (-lbz2). */
#cmakedefine HAVE_LIBBZ2 1

/* Define to 1 if you have the `expat' library (-lexpat). */
#cmakedefine HAVE_LIBEXPAT 1

/* Define to 1 if you have the `lzma' library (-llzma). */
#cmakedefine HAVE_LIBLZMA 1

/* Define to 1 if you have the `lzmadec' library (-llzmadec). */
#cmakedefine HAVE_LIBLZMADEC 1

/* Define to 1 if you have the `xml2' library (-lxml2). */
#cmakedefine HAVE_LIBXML2 1

/* Define to 1 if you have the <libxml/xmlreader.h> header file. */
#cmakedefine HAVE_LIBXML_XMLREADER_H 1

/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine HAVE_LIBZ 1

/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1

/* Define to 1 if you have the link() function. */
#cmakedefine HAVE_LINK 1

/* Define to 1 if you have the <linux/fs.h> header file. */
#cmakedefine HAVE_LINUX_FS_H 1

/* Define to 1 if you have the `listxattr' function. */
#cmakedefine HAVE_LISTXATTR 1

/* Define to 1 if you have the `llistxattr' function. */
#cmakedefine HAVE_LLISTXATTR 1

/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1

/* Define to 1 if the system has the type `long long int'. */
#cmakedefine HAVE_LONG_LONG_INT 1

/* Define to 1 if you have the `lsetxattr' function. */
#cmakedefine HAVE_LSETXATTR 1

/* Define to 1 if you have the `lstat' function. */
#cmakedefine HAVE_LSTAT 1

/* Define to 1 if `lstat' has the bug that it succeeds when given the
   zero-length file name argument. */
#cmakedefine HAVE_LSTAT_EMPTY_STRING_BUG 1

/* Define to 1 if you have the `lutimes' function. */
#cmakedefine HAVE_LUTIMES 1

/* Define to 1 if you have the <lzmadec.h> header file. */
#cmakedefine HAVE_LZMADEC_H 1

/* Define to 1 if you have the <lzma.h> header file. */
#cmakedefine HAVE_LZMA_H 1

/* Define to 1 if you have the `MD5Init' function. */
#cmakedefine HAVE_MD5INIT 1

/* Define to 1 if you have the <md5.h> header file. */
#cmakedefine HAVE_MD5_H 1

/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE 1

/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1

/* Define to 1 if you have the `mkdir' function. */
#cmakedefine HAVE_MKDIR 1

/* Define to 1 if you have the `mkfifo' function. */
#cmakedefine HAVE_MKFIFO 1

/* Define to 1 if you have the `mknod' function. */
#cmakedefine HAVE_MKNOD 1

/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#cmakedefine HAVE_NDIR_H 1

/* Define to 1 if you have the `nl_langinfo' function. */
#cmakedefine HAVE_NL_LANGINFO 1

/* Define to 1 if you have the <openssl/md5.h> header file. */
#cmakedefine HAVE_OPENSSL_MD5_H 1

/* Define to 1 if you have the <openssl/ripemd.h> header file. */
#cmakedefine HAVE_OPENSSL_RIPEMD_H 1

/* Define to 1 if you have the <openssl/sha.h> header file. */
#cmakedefine HAVE_OPENSSL_SHA_H 1

/* Define to 1 if your openssl has the `SHA256_Init' function. */
#cmakedefine HAVE_OPENSSL_SHA256_INIT 1

/* Define to 1 if your openssl has the `SHA384_Init' function. */
#cmakedefine HAVE_OPENSSL_SHA384_INIT 1

/* Define to 1 if your openssl has the `SHA512_Init' function. */
#cmakedefine HAVE_OPENSSL_SHA512_INIT 1

/* Define to 1 if you have the <paths.h> header file. */
#cmakedefine HAVE_PATHS_H 1

/* Define to 1 if you have the `pipe' function. */
#cmakedefine HAVE_PIPE 1

/* Define to 1 if you have the `poll' function. */
#cmakedefine HAVE_POLL 1

/* Define to 1 if you have the <poll.h> header file. */
#cmakedefine HAVE_POLL_H 1

/* Define to 1 if you have the <process.h> header file. */
#cmakedefine HAVE_PROCESS_H 1

/* Define to 1 if you have the <pwd.h> header file. */
#cmakedefine HAVE_PWD_H 1

/* Define to 1 if you have the `readlink' function. */
#cmakedefine HAVE_READLINK 1

/* Define to 1 if you have the <regex.h> header file. */
#cmakedefine HAVE_REGEX_H 1

/* Define to 1 if you have the <ripemd.h> header file. */
#cmakedefine HAVE_RIPEMD_H 1

/* Define to 1 if you have the `RIPEMD160Init' function. */
#cmakedefine HAVE_RMD160INIT 1

/* Define to 1 if you have the <rmd160.h> header file. */
#cmakedefine HAVE_RMD160_H 1

/* Define to 1 if you have the `select' function. */
#cmakedefine HAVE_SELECT 1

/* Define to 1 if you have the `setenv' function. */
#cmakedefine HAVE_SETENV 1

/* Define to 1 if you have the `setlocale' function. */
#cmakedefine HAVE_SETLOCALE 1

/* Define to 1 if you have the `SHA1Init' function. */
#cmakedefine HAVE_SHA1INIT 1

/* Define to 1 if you have the `SHA1_Init' function. */
#cmakedefine HAVE_SHA1_INIT 1

/* Define to 1 if you have the <sha1.h> header file. */
#cmakedefine HAVE_SHA1_H 1

/* Define to 1 if you have the `SHA256Init' function. */
#cmakedefine HAVE_SHA256INIT 1

/* Define to 1 if you have the `SHA256_Init' function. */
#cmakedefine HAVE_SHA256_INIT 1

/* Define to 1 if you have the <sha256.h> header file. */
#cmakedefine HAVE_SHA256_H 1

/* Define to 1 if you have the <sha2.h> header file. */
#cmakedefine HAVE_SHA2_H 1

/* Define to 1 if you have the `SHA384Init' function. */
#cmakedefine HAVE_SHA384INIT 1

/* Define to 1 if you have the `SHA384_Init' function. */
#cmakedefine HAVE_SHA384_INIT 1

/* Define to 1 if you have the `SHA512Init' function. */
#cmakedefine HAVE_SHA512INIT 1

/* Define to 1 if you have the `SHA512_Init' function. */
#cmakedefine HAVE_SHA512_INIT 1

/* Define to 1 if you have the <sha.h> header file. */
#cmakedefine HAVE_SHA_H 1

/* Define to 1 if you have the <signal.h> header file. */
#cmakedefine HAVE_SIGNAL_H 1

/* Define to 1 if `stat' has the bug that it succeeds when given the
   zero-length file name argument. */
#cmakedefine HAVE_STAT_EMPTY_STRING_BUG 1

/* Define to 1 if you have the <stdarg.h> header file. */
#cmakedefine HAVE_STDARG_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1

/* Define to 1 if you have the `strchr' function. */
#cmakedefine HAVE_STRCHR 1

/* Define to 1 if you have the `strdup' function. */
#cmakedefine HAVE_STRDUP 1

/* Define to 1 if you have the `strerror' function. */
#cmakedefine HAVE_STRERROR 1

/* Define to 1 if you have the `strerror_r' function. */
#cmakedefine HAVE_STRERROR_R 1

/* Define to 1 if you have the `strftime' function. */
#cmakedefine HAVE_STRFTIME 1

/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1

/* Define to 1 if you have the `strrchr' function. */
#cmakedefine HAVE_STRRCHR 1

/* Define to 1 if `st_birthtime' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_BIRTHTIME 1

/* Define to 1 if `st_birthtimespec.tv_nsec' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1

/* Define to 1 if `st_blksize' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_BLKSIZE 1

/* Define to 1 if `st_flags' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_FLAGS 1

/* Define to 1 if `st_mtimespec.tv_nsec' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1

/* Define to 1 if `st_mtime_n' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_MTIME_N 1

/* Define to 1 if `st_mtime_usec' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_MTIME_USEC 1

/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1

/* Define to 1 if `st_umtime' is member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_UMTIME 1

/* Define to 1 if you have the symlink() function. */
#cmakedefine HAVE_SYMLINK 1

/* Define to 1 if you have the <sys/acl.h> header file. */
#cmakedefine HAVE_SYS_ACL_H 1

/* Define to 1 if you have the <sys/cdefs.h> header file. */
#cmakedefine HAVE_SYS_CDEFS_H 1

/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
   */
#cmakedefine HAVE_SYS_DIR_H 1

/* Define to 1 if you have the <sys/extattr.h> header file. */
#cmakedefine HAVE_SYS_EXTATTR_H 1

/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine HAVE_SYS_IOCTL_H 1

/* Define to 1 if you have the <sys/mkdev.h> header file. */
#cmakedefine HAVE_SYS_MKDEV_H 1

/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
   */
#cmakedefine HAVE_SYS_NDIR_H 1

/* Define to 1 if you have the <sys/param.h> header file. */
#cmakedefine HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/poll.h> header file. */
#cmakedefine HAVE_SYS_POLL_H 1

/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <sys/utime.h> header file. */
#cmakedefine HAVE_SYS_UTIME_H 1

/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#cmakedefine HAVE_SYS_WAIT_H 1

/* Define to 1 if you have the <sys/xattr.h> header file. */
#cmakedefine HAVE_SYS_XATTR_H 1

/* Define to 1 if you have the `timegm' function. */
#cmakedefine HAVE_TIMEGM 1

/* Define to 1 if you have the <time.h> header file. */
#cmakedefine HAVE_TIME_H 1

/* Define to 1 if you have the `tzset' function. */
#cmakedefine HAVE_TZSET 1

/* Define to 1 if the system has the type `uintmax_t'. */
#cmakedefine HAVE_UINTMAX_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1

/* Define to 1 if you have the `unsetenv' function. */
#cmakedefine HAVE_UNSETENV 1

/* Define to 1 if the system has the type `unsigned long long'. */
#cmakedefine HAVE_UNSIGNED_LONG_LONG 1

/* Define to 1 if the system has the type `unsigned long long int'. */
#cmakedefine HAVE_UNSIGNED_LONG_LONG_INT 1

/* Define to 1 if you have the `utime' function. */
#cmakedefine HAVE_UTIME 1

/* Define to 1 if you have the `utimensat' function. */
#cmakedefine HAVE_UTIMENSAT 1

/* Define to 1 if you have the `utimes' function. */
#cmakedefine HAVE_UTIMES 1

/* Define to 1 if you have the <utime.h> header file. */
#cmakedefine HAVE_UTIME_H 1

/* Define to 1 if you have the `vfork' function. */
#cmakedefine HAVE_VFORK 1

/* Define to 1 if you have the `vprintf' function. */
#cmakedefine HAVE_VPRINTF 1

/* Define to 1 if you have the <wchar.h> header file. */
#cmakedefine HAVE_WCHAR_H 1

/* Define to 1 if the system has the type `wchar_t'. */
#cmakedefine HAVE_WCHAR_T 1

/* Define to 1 if you have the `wcrtomb' function. */
#cmakedefine HAVE_WCRTOMB 1

/* Define to 1 if you have the `wcscpy' function. */
#cmakedefine HAVE_WCSCPY 1

/* Define to 1 if you have the `wcslen' function. */
#cmakedefine HAVE_WCSLEN 1

/* Define to 1 if you have the `wctomb' function. */
#cmakedefine HAVE_WCTOMB 1

/* Define to 1 if you have the <wctype.h> header file. */
#cmakedefine HAVE_WCTYPE_H 1

/* Define to 1 if you have the <windows.h> header file. */
#cmakedefine HAVE_WINDOWS_H 1

/* Define to 1 if you have _CrtSetReportMode in <crtdbg.h>  */
#cmakedefine HAVE__CrtSetReportMode 1

/* Define to 1 if you have the `wmemcmp' function. */
#cmakedefine HAVE_WMEMCMP 1

/* Define to 1 if you have the `wmemcpy' function. */
#cmakedefine HAVE_WMEMCPY 1

/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1

/* Version number of libarchive as a single integer */
#cmakedefine LIBARCHIVE_VERSION_NUMBER "${LIBARCHIVE_VERSION_NUMBER}"

/* Version number of libarchive */
#cmakedefine LIBARCHIVE_VERSION_STRING "${LIBARCHIVE_VERSION_STRING}"

/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
   slash. */
#cmakedefine LSTAT_FOLLOWS_SLASHED_SYMLINK 1

/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
   */
#cmakedefine MAJOR_IN_MKDEV 1

/* Define to 1 if `major', `minor', and `makedev' are declared in
   <sysmacros.h>. */
#cmakedefine MAJOR_IN_SYSMACROS 1

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#cmakedefine NO_MINUS_C_MINUS_O 1

/* The size of `wchar_t', as computed by sizeof. */
#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T}

/* Define to 1 if strerror_r returns char *. */
#cmakedefine STRERROR_R_CHAR_P 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME 1

/* Version number of package */
#cmakedefine VERSION "${VERSION}"

/* Number of bits in a file offset, on hosts where this is settable. */
#cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS}

/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#cmakedefine _LARGEFILE_SOURCE 1

/* Define for large files, on AIX-style hosts. */
#cmakedefine _LARGE_FILES ${_LARGE_FILES}

/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
#cmakedefine _UINT64_T

/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const ${const}

/* Define to `int' if <sys/types.h> doesn't define. */
#cmakedefine gid_t ${gid_t}

/* Define to `unsigned long' if <sys/types.h> does not define. */
#cmakedefine id_t ${id_t}

/* Define to `int' if <sys/types.h> doesn't define. */
#cmakedefine int32_t ${int32_t}

/* Define to the type of a signed integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
#cmakedefine int64_t ${int64_t}

/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
   not define. */
#cmakedefine intmax_t ${intmax_t}

/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine mode_t ${mode_t}

/* Define to `long long' if <sys/types.h> does not define. */
#cmakedefine off_t ${off_t}

/* Define to `int' if <sys/types.h> doesn't define. */
#cmakedefine pid_t ${pid_t}

/* Define to `unsigned int' if <sys/types.h> does not define. */
#cmakedefine size_t ${size_t}

/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine ssize_t ${ssize_t}

/* Define to `int' if <sys/types.h> doesn't define. */
#cmakedefine uid_t ${uid_t}

/* Define to `unsigned short' if <sys/types.h> doesn't define. */
#cmakedefine uint16_t ${uint16_t}

/* Define to `unsigned int' if <sys/types.h> doesn't define. */
#cmakedefine uint32_t ${uint32_t}

/* Define to the type of an unsigned integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
#cmakedefine uint64_t ${uint64_t}

/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
   do not define. */
#cmakedefine uintmax_t ${uintmax_t}

/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine intptr_t ${intptr_t}

/* Define to `unsigned int' if <sys/types.h> does not define. */
#cmakedefine uintptr_t ${uintptr_t}

File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckFileOffsetBits.cmake
# - Check if _FILE_OFFSET_BITS macro needed for large files
# CHECK_FILE_OFFSET_BITS ()
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
#  CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2009, Michihiro NAKAJIMA
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

#INCLUDE(CheckCXXSourceCompiles)

GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
	 "${CMAKE_CURRENT_LIST_FILE}" PATH)

MACRO (CHECK_FILE_OFFSET_BITS)
  IF(NOT DEFINED _FILE_OFFSET_BITS)
    MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files")
    TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
      ${CMAKE_CURRENT_BINARY_DIR}
      ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
    IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
      TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
        ${CMAKE_CURRENT_BINARY_DIR}
        ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
        COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
    ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)

    IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
      SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
      MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed")
    ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
      SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
      MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed")
    ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
  ENDIF(NOT DEFINED _FILE_OFFSET_BITS)

ENDMACRO (CHECK_FILE_OFFSET_BITS)


File Added: pkgsrc/archivers/libarchive/files/build/cmake/Attic/CheckStructMember.cmake
# - Check if the given struct or class has the specified member variable
# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
#
#  STRUCT - the name of the struct or class you are interested in
#  MEMBER - the member which existence you want to check
#  HEADER - the header(s) where the prototype should be declared
#  VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
#  CMAKE_REQUIRED_INCLUDES = list of include directories

# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


INCLUDE(CheckCSourceCompiles)

MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
   SET(_INCLUDE_FILES)
   FOREACH (it ${_HEADER})
      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
   ENDFOREACH (it)

   SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
   static ${_STRUCT} tmp;
   if (sizeof(tmp.${_MEMBER}))
      return 0;
  return 0;
}
")
   CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})

ENDMACRO (CHECK_STRUCT_MEMBER)


File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckFuncs.cmake
# Check if the system has the specified function; treat glibc "stub"
# functions as nonexistent:
# CHECK_FUNCTION_EXISTS_GLIBC (FUNCTION FUNCVAR)
#
#  FUNCTION - the function(s) where the prototype should be declared
#  FUNCVAR - variable to define if the function does exist
#
# In particular, this understands the glibc convention of
# defining macros __stub_XXXX or __stub___XXXX if the function
# does appear in the library but is merely a stub that does nothing.
# By detecting this case, we can select alternate behavior on
# platforms that don't support this functionality.
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
#  CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2009, Michihiro NAKAJIMA
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

INCLUDE(CheckFunctionExists)
GET_FILENAME_COMPONENT(_selfdir_CheckFunctionExistsGlibc
	 "${CMAKE_CURRENT_LIST_FILE}" PATH)

MACRO (CHECK_FUNCTION_EXISTS_GLIBC _FUNC _FUNCVAR)
   IF(NOT DEFINED ${_FUNCVAR})
     SET(CHECK_STUB_FUNC_1 "__stub_${_FUNC}")
     SET(CHECK_STUB_FUNC_2 "__stub___${_FUNC}")
     CONFIGURE_FILE( ${_selfdir_CheckFunctionExistsGlibc}/CheckFuncs_stub.c.in
       ${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c IMMEDIATE)
     TRY_COMPILE(__stub
       ${CMAKE_CURRENT_BINARY_DIR}
       ${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c
       COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
       CMAKE_FLAGS
       -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
       "${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}")
     IF (__stub)
       SET("${_FUNCVAR}" "" CACHE INTERNAL "Have function ${_FUNC}")
     ELSE (__stub)
       CHECK_FUNCTION_EXISTS("${_FUNC}" "${_FUNCVAR}")
     ENDIF (__stub)
  ENDIF(NOT DEFINED ${_FUNCVAR})
ENDMACRO (CHECK_FUNCTION_EXISTS_GLIBC)


File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckHeaderDirent.cmake
# - Check if the system has the specified type
# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
#
#  HEADER - the header(s) where the prototype should be declared
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
#  CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2009, Michihiro NAKAJIMA
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


INCLUDE(CheckTypeExists)

MACRO (CHECK_HEADER_DIRENT)
  CHECK_TYPE_EXISTS("DIR *" dirent.h     HAVE_DIRENT_H)
  IF(NOT HAVE_DIRENT_H)
    CHECK_TYPE_EXISTS("DIR *" sys/ndir.h  HAVE_SYS_NDIR_H)
    IF(NOT HAVE_SYS_NDIR_H)
      CHECK_TYPE_EXISTS("DIR *" ndir.h      HAVE_NDIR_H)
      IF(NOT HAVE_NDIR_H)
        CHECK_TYPE_EXISTS("DIR *" sys/dir.h   HAVE_SYS_DIR_H)
      ENDIF(NOT HAVE_NDIR_H)
    ENDIF(NOT HAVE_SYS_NDIR_H)
  ENDIF(NOT HAVE_DIRENT_H)
ENDMACRO (CHECK_HEADER_DIRENT)


File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckTypeExists.cmake
# - Check if the system has the specified type
# CHECK_TYPE_EXISTS (TYPE HEADER VARIABLE)
#
#  TYPE - the name of the type or struct or class you are interested in
#  HEADER - the header(s) where the prototype should be declared
#  VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
#  CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2009, Michihiro NAKAJIMA
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


INCLUDE(CheckCSourceCompiles)

MACRO (CHECK_TYPE_EXISTS _TYPE _HEADER _RESULT)
   SET(_INCLUDE_FILES)
   FOREACH (it ${_HEADER})
      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
   ENDFOREACH (it)

   SET(_CHECK_TYPE_EXISTS_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
   static ${_TYPE} tmp;
   if (sizeof(tmp))
      return 0;
  return 0;
}
")
   CHECK_C_SOURCE_COMPILES("${_CHECK_TYPE_EXISTS_SOURCE_CODE}" ${_RESULT})

ENDMACRO (CHECK_TYPE_EXISTS)


File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckFuncs_stub.c.in
#ifdef __STDC__
#include <limits.h>
#else
#include <assert.h>
#endif

int
main()
{
#if defined ${CHECK_STUB_FUNC_1} || defined ${CHECK_STUB_FUNC_2}
  return 0;
#else
this system have stub
  return 0;
#endif
}

File Added: pkgsrc/archivers/libarchive/files/build/cmake/CheckFileOffsetBits.c
#include <sys/types.h>

#define KB ((off_t)1024)
#define MB ((off_t)1024 * KB)
#define GB ((off_t)1024 * MB)
#define TB ((off_t)1024 * GB)
int t2[(((64 * GB -1) % 671088649) == 268434537)
       && (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];

int main()
{
  ;
  return 0;
}

File Added: pkgsrc/archivers/libarchive/files/build/cmake/Attic/AddTest28.cmake
# - Macro approximating the CMake 2.8 ADD_TEST(NAME) signature.
# ADD_TEST_28(NAME <name> COMMAND <command> [arg1 [arg2 ...]])
#  <name>    - The name of the test
#  <command> - The test executable
#  [argN...] - Arguments to the test executable
# This macro approximates the ADD_TEST(NAME) signature provided in
# CMake 2.8 but works with CMake 2.6 too.  See CMake 2.8 documentation
# of ADD_TEST()for details.
#
# This macro automatically replaces a <command> that names an
# executable target with the target location.  A generator expression
# of the form "$<TARGET_FILE:tgt>" is supported in both the command
# and arguments of the test.  Howerver, this macro only works for
# targets without per-config output name properties set.
#
# Example usage:
#   add_test(NAME mytest COMMAND testDriver --exe $<TARGET_FILE:myexe>)
# This creates a test "mytest" whose command runs a testDriver tool
# passing the full path to the executable file produced by target
# "myexe".

#=============================================================================
# Copyright 2009 Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer
#    in this position and unchanged.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================

CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3)

# CMake 2.8 supports ADD_TEST(NAME) natively.
IF(NOT "${CMAKE_VERSION}" VERSION_LESS "2.8")
  MACRO(ADD_TEST_28)
    ADD_TEST(${ARGV})
  ENDMACRO()
  RETURN()
ENDIF()

# Simulate ADD_TEST(NAME) signature from CMake 2.8.
MACRO(ADD_TEST_28 NAME name COMMAND command)
  # Enforce the signature.
  IF(NOT "x${NAME}" STREQUAL "xNAME")
    MESSAGE(FATAL_ERROR "First ADD_TEST_28 argument must be \"NAME\"")
  ENDIF()
  IF(NOT "x${COMMAND}" STREQUAL "xCOMMAND")
    MESSAGE(FATAL_ERROR "Third ADD_TEST_28 argument must be \"COMMAND\"")
  ENDIF()

  # Perform "COMMAND myexe ..." substitution.
  SET(cmd "${command}")
  IF(TARGET "${cmd}")
    _ADD_TEST_28_GET_EXE(${cmd} cmd)
  ENDIF()

  # Perform "COMMAND ... $<TARGET_FILE:myexe> ..." substitution.
  SET(target_file "\\$<TARGET_FILE:(.+)>")
  SET(args)
  FOREACH(ARG ${cmd} ${ARGN})
    SET(arg "${ARG}")
    IF("${arg}" MATCHES "${target_file}")
      STRING(REGEX REPLACE "${target_file}" "\\1" tgt "${arg}")
      IF(TARGET "${tgt}")
        _ADD_TEST_28_GET_EXE(${tgt} exe)
        STRING(REGEX REPLACE "${target_file}" "${exe}" arg "${arg}")
      ENDIF()
    ENDIF()
    LIST(APPEND args "${arg}")
  ENDFOREACH()

  # Invoke old ADD_TEST() signature with transformed arguments.
  ADD_TEST(${name} ${args})
ENDMACRO()

# Get the test-time location of an executable target.
MACRO(_ADD_TEST_28_GET_EXE tgt exe_var)
  # The LOCATION property gives a build-time location.
  GET_TARGET_PROPERTY(${exe_var} ${tgt} LOCATION)

  # In single-configuration generatrs the build-time and test-time
  # locations are the same because there is no per-config variable
  # reference.  In multi-configuration generators the following
  # substitution converts the build-time configuration variable
  # reference to a test-time configuration variable reference.
  IF(CMAKE_CONFIGURATION_TYPES)
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CTEST_CONFIGURATION_TYPE}"
      ${exe_var} "${${exe_var}}")
  ENDIF(CMAKE_CONFIGURATION_TYPES)
ENDMACRO()

File Added: pkgsrc/archivers/libarchive/files/build/windows/Attic/mvcpp.nt
#/* FILE: mvcpp.nt
# *
# *          Copyright (c) 2008
# *          TouchNet Information Systems, Inc.
# *          All Rights Reserved
# *
# *  This program is an unpublished copyright work of TouchNet Information
# *  Systems, Inc. of Lenexa, KS.  The program, all information disclosed
# *  and the matter shown and described hereon or herewith are confidential
# *  and proprietary to TouchNet Information Systems, Inc.
# *
# ******************************************************************************
# *
# * $LastChangedBy: kientzle $
# * $Locker:  $
# * $ProjectName: $
# * $ProjectRevision: $
# * $LastChangedRevision: 1827 $
# * $LastChangedDate: 2010-01-16 16:21:36 -0800 (Sat, 16 Jan 2010) $
# * $State: Exp $
# * $RCSfile: mvcpp.nt,v $
# * $Source: /home/ryo/public_nerv/netbsd/pkgsrc/cvsroot/pkgsrc/archivers/libarchive/files/build/windows/Attic/mvcpp.nt,v $
# *
# * Change Log:
# * $Log: mvcpp.nt,v $
# * Revision 1.1.1.1  2010/02/20 03:48:54  joerg
# * Import libarchive 2.8.0:
# * - Infrastructure:
# *   - Allow command line tools as fallback for missing compression
# *     libraries. If compiled without gzip for example, gunzip will
# *     be used automatically.
# *   - Improved support for a number of platforms like high-resolution
# *     timestamps and Extended Attributes on various Unix systems
# *   - New convience interface for creating archives based on disk content,
# *     complement of the archive_write_disk interface.
# * - Frontends:
# *   - bsdcpio ready for public consumption
# *   - hand-written date parser replaces the yacc code
# * - Filter system:
# *   - Simplified read filter chains
# *   - Option support for filters
# *   - LZMA, XZ, uudecode handled
# * - Format support:
# *   - Write support for mtree files based on file system or archive
# *     content
# *   - Basic read support for Joliet
# *   - Write support for zip files
# *   - Write support for shar archives, both text-only and binary-safe
# *
# *
# */

.SUFFIXES : .c .cpp .obm

ZLIB_INCL=\3rdParty\ZLib\Current\Include

EXTRA_DEFINES=/DLIBARCHIVE_STATIC=1

!ifdef DEBUG
DEST_PATH=.\lib\mvcpp\debug
OBJ_DIR=obj\debug
COMPILE_FLAG=/MTd /DDEBUG=1 $(EXTRA_DEFINES) /Zi /Fd$(OBJ_DIR)\libarchive.pdb
!else
DEST_PATH=.\lib\mvcpp
OBJ_DIR=obj
COMPILE_FLAG=/MT $(EXTRA_DEFINES) /Fd$(OBJ_DIR)\libarchive.pdb
!endif

INCLUDE=.;$(MSDEVDIR)\INCLUDE;$(ZLIB_INCL);
INCLUDE_OPTS=

NT_CPP=cl
NT_C=cl
NT_LIBRARIAN=lib

###
NT_C_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TC /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
NT_CPP_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TP /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
NT_LIB_OPTS=

.cpp{$(OBJ_DIR)}.obm:
      -md $(OBJ_DIR) > nul 2>nul
      $(NT_CPP) $(NT_CPP_OPTS) -Fo$*.obm $<

.c{$(OBJ_DIR)}.obm:
      -md $(OBJ_DIR) > nul 2>nul
      $(NT_C) $(NT_C_OPTS) -Fo$*.obm $<


OBJS=\
  $(OBJ_DIR)\archive_check_magic.obm      $(OBJ_DIR)\archive_entry.obm \
  $(OBJ_DIR)\archive_entry_copy_stat.obm  $(OBJ_DIR)\archive_entry_link_resolver.obm \
  $(OBJ_DIR)\archive_entry_stat.obm       $(OBJ_DIR)\archive_entry_strmode.obm \
  $(OBJ_DIR)\archive_read.obm             $(OBJ_DIR)\archive_read_data_into_fd.obm \
  $(OBJ_DIR)\archive_read_extract.obm     $(OBJ_DIR)\archive_read_open_fd.obm \
  $(OBJ_DIR)\archive_read_open_file.obm   $(OBJ_DIR)\archive_read_open_filename.obm \
  $(OBJ_DIR)\archive_read_open_memory.obm $(OBJ_DIR)\archive_read_support_compression_all.obm \
  $(OBJ_DIR)\archive_read_support_compression_bzip2.obm \
  $(OBJ_DIR)\archive_read_support_compression_compress.obm \
  $(OBJ_DIR)\archive_read_support_compression_gzip.obm \
  $(OBJ_DIR)\archive_read_support_compression_none.obm \
  $(OBJ_DIR)\archive_read_support_compression_program.obm \
  $(OBJ_DIR)\archive_read_support_format_all.obm \
  $(OBJ_DIR)\archive_read_support_format_ar.obm \
  $(OBJ_DIR)\archive_read_support_format_cpio.obm \
  $(OBJ_DIR)\archive_read_support_format_empty.obm \
  $(OBJ_DIR)\archive_read_support_format_iso9660.obm \
  $(OBJ_DIR)\archive_read_support_format_mtree.obm \
  $(OBJ_DIR)\archive_read_support_format_tar.obm \
  $(OBJ_DIR)\archive_read_support_format_zip.obm \
  $(OBJ_DIR)\archive_string.obm                        $(OBJ_DIR)\archive_string_sprintf.obm \
  $(OBJ_DIR)\archive_util.obm                          $(OBJ_DIR)\archive_virtual.obm \
  $(OBJ_DIR)\archive_write.obm                         $(OBJ_DIR)\archive_write_disk.obm \
  $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obm \
  $(OBJ_DIR)\archive_write_open_fd.obm                 $(OBJ_DIR)\archive_write_open_file.obm \
  $(OBJ_DIR)\archive_write_open_filename.obm           $(OBJ_DIR)\archive_write_open_memory.obm \
  $(OBJ_DIR)\archive_write_set_compression_bzip2.obm   $(OBJ_DIR)\archive_write_set_compression_compress.obm \
  $(OBJ_DIR)\archive_write_set_compression_gzip.obm    $(OBJ_DIR)\archive_write_set_compression_none.obm \
  $(OBJ_DIR)\archive_write_set_compression_program.obm $(OBJ_DIR)\archive_write_set_format.obm \
  $(OBJ_DIR)\archive_write_set_format_ar.obm           $(OBJ_DIR)\archive_write_set_format_by_name.obm \
  $(OBJ_DIR)\archive_write_set_format_cpio.obm         $(OBJ_DIR)\archive_write_set_format_cpio_newc.obm \
  $(OBJ_DIR)\archive_write_set_format_pax.obm          $(OBJ_DIR)\archive_write_set_format_shar.obm \
  $(OBJ_DIR)\archive_write_set_format_ustar.obm        $(OBJ_DIR)\filter_fork.obm \
  $(OBJ_DIR)\libarchive-nonposix.obm

all: CLEAN $(DEST_PATH)\libarchive.lib

$(DEST_PATH)\libarchive.lib :: $(OBJS) $(DEST_PATH)

$(DEST_PATH)\libarchive.lib ::
    $(NT_LIBRARIAN) $(NT_LIB_OPTS) /OUT:$(DEST_PATH)\libarchive.lib $(OBJS) 

$(DEST_PATH):
    -md $(DEST_PATH) > nul 2>nul

CLEAN:
!ifdef CLEAN
  -del $(OBJ_DIR)\*.pd? > nul 2>nul
  -ren $(OBJ_DIR)\*.pdb *.pd1 > nul 2>nul
  -ren $(OBJ_DIR)\*.pdb *.pd2 > nul 2>nul
!endif

File Added: pkgsrc/archivers/libarchive/files/build/windows/Attic/wccpp.nt
#/* FILE: wccpp.nt
# *
# *          Copyright (c) 2008
# *          TouchNet Information Systems, Inc.
# *          All Rights Reserved
# *
# *  This program is an unpublished copyright work of TouchNet Information
# *  Systems, Inc. of Lenexa, KS.  The program, all information disclosed
# *  and the matter shown and described hereon or herewith are confidential
# *  and proprietary to TouchNet Information Systems, Inc.
# *
# ******************************************************************************
# *
# * $LastChangedBy: kientzle $
# * $Locker:  $
# * $ProjectName: $
# * $ProjectRevision: $
# * $LastChangedRevision: 1827 $
# * $LastChangedDate: 2010-01-16 16:21:36 -0800 (Sat, 16 Jan 2010) $
# * $State: Exp $
# * $RCSfile: wccpp.nt,v $
# * $Source: /home/ryo/public_nerv/netbsd/pkgsrc/cvsroot/pkgsrc/archivers/libarchive/files/build/windows/Attic/wccpp.nt,v $
# *
# * Change Log:
# * $Log: wccpp.nt,v $
# * Revision 1.1.1.1  2010/02/20 03:48:54  joerg
# * Import libarchive 2.8.0:
# * - Infrastructure:
# *   - Allow command line tools as fallback for missing compression
# *     libraries. If compiled without gzip for example, gunzip will
# *     be used automatically.
# *   - Improved support for a number of platforms like high-resolution
# *     timestamps and Extended Attributes on various Unix systems
# *   - New convience interface for creating archives based on disk content,
# *     complement of the archive_write_disk interface.
# * - Frontends:
# *   - bsdcpio ready for public consumption
# *   - hand-written date parser replaces the yacc code
# * - Filter system:
# *   - Simplified read filter chains
# *   - Option support for filters
# *   - LZMA, XZ, uudecode handled
# * - Format support:
# *   - Write support for mtree files based on file system or archive
# *     content
# *   - Basic read support for Joliet
# *   - Write support for zip files
# *   - Write support for shar archives, both text-only and binary-safe
# *
# *
# */

.EXTENSIONS:
.EXTENSIONS: .obn .cpp .c

ZLIB_INCL=\3rdParty\ZLib\Current\Include

!ifdef DEBUG
DEST_PATH=.\lib\wccpp\debug
OBJ_DIR=obj\debug
EXT_COMPILE_FLAG=-d2 -DLIBARCHIVE_STATIC=1
!else
DEST_PATH=.\lib\wccpp
OBJ_DIR=obj
EXT_COMPILE_FLAG=-DLIBARCHIVE_STATIC=1
!endif

# ----- NT compiler options -----------------------------------------------
NT_CPP=wpp386
NT_C=wcc386
NT_LIBRARIAN=wlib


###
INCLUDE_OPTS=/I.;$(%watcom)\h;$(%watcom)\h\nt;$(ZLIB_INCL);
NT_CPP_OPTS=-ei -wx -xs -xss -xst -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
NT_C_OPTS=-ei -wx -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
NT_LIB_OPTS=

.cpp{$(OBJ_DIR)}.obn:
      -md $(OBJ_DIR) > nul 2>nul
      $(NT_CPP) $(NT_CPP_OPTS) -zp1 -fo=$*.obn $<

.c{$(OBJ_DIR)}.obn:
      -md $(OBJ_DIR) > nul 2>nul
      $(NT_C) $(NT_C_OPTS) -zp1 -fo=$*.obn $<

OBJS = &
  $(OBJ_DIR)\archive_check_magic.obn      $(OBJ_DIR)\archive_entry.obn &
  $(OBJ_DIR)\archive_entry_copy_stat.obn  $(OBJ_DIR)\archive_entry_link_resolver.obn &
  $(OBJ_DIR)\archive_entry_stat.obn       $(OBJ_DIR)\archive_entry_strmode.obn &
  $(OBJ_DIR)\archive_read.obn             $(OBJ_DIR)\archive_read_data_into_fd.obn &
  $(OBJ_DIR)\archive_read_extract.obn     $(OBJ_DIR)\archive_read_open_fd.obn &
  $(OBJ_DIR)\archive_read_open_file.obn   $(OBJ_DIR)\archive_read_open_filename.obn &
  $(OBJ_DIR)\archive_read_open_memory.obn $(OBJ_DIR)\archive_read_support_compression_all.obn &
  $(OBJ_DIR)\archive_read_support_compression_bzip2.obn &
  $(OBJ_DIR)\archive_read_support_compression_compress.obn &
  $(OBJ_DIR)\archive_read_support_compression_gzip.obn &
  $(OBJ_DIR)\archive_read_support_compression_none.obn &
  $(OBJ_DIR)\archive_read_support_compression_program.obn &
  $(OBJ_DIR)\archive_read_support_format_all.obn &
  $(OBJ_DIR)\archive_read_support_format_ar.obn &
  $(OBJ_DIR)\archive_read_support_format_cpio.obn &
  $(OBJ_DIR)\archive_read_support_format_empty.obn &
  $(OBJ_DIR)\archive_read_support_format_iso9660.obn &
  $(OBJ_DIR)\archive_read_support_format_mtree.obn &
  $(OBJ_DIR)\archive_read_support_format_tar.obn &
  $(OBJ_DIR)\archive_read_support_format_zip.obn &
  $(OBJ_DIR)\archive_string.obn                        $(OBJ_DIR)\archive_string_sprintf.obn &
  $(OBJ_DIR)\archive_util.obn                          $(OBJ_DIR)\archive_virtual.obn &
  $(OBJ_DIR)\archive_write.obn                         $(OBJ_DIR)\archive_write_disk.obn &
  $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obn &
  $(OBJ_DIR)\archive_write_open_fd.obn                 $(OBJ_DIR)\archive_write_open_file.obn &
  $(OBJ_DIR)\archive_write_open_filename.obn           $(OBJ_DIR)\archive_write_open_memory.obn &
  $(OBJ_DIR)\archive_write_set_compression_bzip2.obn   $(OBJ_DIR)\archive_write_set_compression_compress.obn &
  $(OBJ_DIR)\archive_write_set_compression_gzip.obn    $(OBJ_DIR)\archive_write_set_compression_none.obn &
  $(OBJ_DIR)\archive_write_set_compression_program.obn $(OBJ_DIR)\archive_write_set_format.obn &
  $(OBJ_DIR)\archive_write_set_format_ar.obn           $(OBJ_DIR)\archive_write_set_format_by_name.obn &
  $(OBJ_DIR)\archive_write_set_format_cpio.obn         $(OBJ_DIR)\archive_write_set_format_cpio_newc.obn &
  $(OBJ_DIR)\archive_write_set_format_pax.obn          $(OBJ_DIR)\archive_write_set_format_shar.obn &
  $(OBJ_DIR)\archive_write_set_format_ustar.obn        $(OBJ_DIR)\filter_fork.obn &
  $(OBJ_DIR)\libarchive-nonposix.obn

$(DEST_PATH)\LibArchive.lib :: $(OBJS) $(DEST_PATH)

$(DEST_PATH)\LibArchive.lib ::
    -md $(DEST_PATH) > nul 2>nul
    $(NT_LIBRARIAN) $@ -+ $(OBJS)

$(DEST_PATH):
    -md $(DEST_PATH) > nul 2>nul

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc71/Attic/libarchive.vcproj
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.10"
	Name="libarchive"
	ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
	Keyword="Win32Proj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="4"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
				MinimalRebuild="TRUE"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="4"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc71-mt-d.lib"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="4"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc71-mt.lib"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
			<File
				RelativePath="..\..\libarchive\archive_check_magic.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_copy_stat.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_link_resolver.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_stat.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_strmode.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_data_into_fd.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_extract.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_fd.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_file.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_filename.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_memory.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_all.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_compress.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_none.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_program.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_all.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_ar.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_cpio.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_empty.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_mtree.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_tar.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_zip.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string_sprintf.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_util.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_virtual.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_fd.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_file.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_filename.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_memory.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_compress.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_none.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_program.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ar.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_by_name.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_mtree.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_pax.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_shar.c">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ustar.c">
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.c">
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
			<File
				RelativePath="..\..\libarchive\archive.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_endian.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_platform.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_private.h">
			</File>
			<File
				RelativePath="..\..\libarchive\config_windows.h">
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.h">
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc71/Attic/libarchive.sln
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug.ActiveCfg = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug.Build.0 = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release.ActiveCfg = Release|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc80/Attic/libarchive.vcproj
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="8.00"
	Name="libarchive"
	ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
	RootNamespace="libarchive"
	Keyword="Win32Proj"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="4"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;;LIBARCHIVE_STATIC"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="false"
				DebugInformationFormat="4"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc80-mt-d.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="4"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;;LIBARCHIVE_STATIC"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="3"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc80-mt.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\libarchive\archive_check_magic.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_copy_stat.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_link_resolver.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_stat.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_strmode.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_data_into_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_extract.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_file.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_all.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_none.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_program.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_all.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string_sprintf.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_util.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_virtual.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_file.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_none.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_program.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_by_name.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_shar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ustar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.c"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath="..\..\libarchive\archive.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_endian.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_platform.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\config_windows.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc80/Attic/libarchive.sln
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive_test", "libarchive_test\libarchive_test.vcproj", "{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.ActiveCfg = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.Build.0 = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.ActiveCfg = Release|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.Build.0 = Release|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.ActiveCfg = Debug|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.Build.0 = Debug|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.ActiveCfg = Release|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc80/libarchive_test/Attic/libarchive_test.vcproj
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="8.00"
	Name="libarchive_test"
	ProjectGUID="{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
	RootNamespace="libarchive_test"
	Keyword="Win32Proj"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\..\libarchive"
				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;LIBARCHIVE_STATIC"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="false"
				DebugInformationFormat="4"
				CompileAs="1"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				ShowProgress="0"
				OutputFile="..\..\..\$(ProjectName).exe"
				LinkIncremental="2"
				GenerateDebugInformation="true"
				SubSystem="1"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
				EmbedManifest="true"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			CharacterSet="2"
			WholeProgramOptimization="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories="..\..\..\libarchive"
				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;LIBARCHIVE_STATIC"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="false"
				DebugInformationFormat="3"
				CompileAs="1"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				OutputFile="..\..\..\$(ProjectName).exe"
				LinkIncremental="1"
				GenerateDebugInformation="true"
				SubSystem="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCWebDeploymentTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
		<ProjectReference
			ReferencedProjectIdentifier="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
			CopyLocal="false"
			CopyLocalDependencies="false"
			CopyLocalSatelliteAssemblies="false"
			RelativePathToProject=".\libarchive.vcproj"
		/>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\..\libarchive\test\main.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\read_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_basic.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_freebsd.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_archive_api_feature.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_bad_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_gtar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_tar_hardlink.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_empty_write.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_entry.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_entry_strmode.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_fuzz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_link_resolver.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_pax_filename_encoding.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_compress_program.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_data_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_extract.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_Z.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_odc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4c_Z.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_lzma.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_sparse.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_iso_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_isorr_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_pax_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tar_empty_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tbz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tgz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_pax_truncated.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_position.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_truncated.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_tar_filenames.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_tar_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_ustar_filenames.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_compress_program.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_hardlink.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_perms.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_secure.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_times.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_newc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_odc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_shar_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar_ustar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_open_memory.c"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath="..\..\..\libarchive\test\list.h"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc90/Attic/libarchive.vcproj
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="libarchive"
	ProjectGUID="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
	RootNamespace="libarchive"
	Keyword="Win32Proj"
	TargetFrameworkVersion="131072"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="4"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="4"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc90-mt-d.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="4"
			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				InlineFunctionExpansion="1"
				AdditionalIncludeDirectories=""
				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_CONFIG_H=&quot;\&quot;config_windows.h\&quot;&quot;"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				DebugInformationFormat="3"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLibrarianTool"
				OutputFile="../../lib/$(ProjectName)-vc90-mt.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\libarchive\archive_check_magic.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_copy_stat.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_link_resolver.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_stat.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_strmode.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_data_into_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_set_standard_lookup.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_extract.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_file.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_all.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_lzma.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_none.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_compression_program.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_all.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_iso9660.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_support_format_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string_sprintf.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_util.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_virtual.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_set_standard_lookup.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_file.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_none.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_compression_program.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_by_name.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_cpio_newc.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_shar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_set_format_ustar.c"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.c"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath="..\..\libarchive\archive.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_endian.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_entry_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_platform.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_disk_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_read_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_string.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_windows.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_disk_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\archive_write_private.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\config_windows.h"
				>
			</File>
			<File
				RelativePath="..\..\libarchive\filter_fork.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc90/Attic/libarchive.sln
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive", "libarchive.vcproj", "{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarchive_test", "libarchive_test\libarchive_test.vcproj", "{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.ActiveCfg = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Debug|Win32.Build.0 = Debug|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.ActiveCfg = Release|Win32
		{0C758FDB-BE1D-47E9-8E18-9168AB34A308}.Release|Win32.Build.0 = Release|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.ActiveCfg = Debug|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Debug|Win32.Build.0 = Debug|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.ActiveCfg = Release|Win32
		{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

File Added: pkgsrc/archivers/libarchive/files/build/windows/vc90/libarchive_test/Attic/libarchive_test.vcproj
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="libarchive_test"
	ProjectGUID="{407CA0B9-0CCB-4F02-A20B-CBBAEAAA2E4B}"
	RootNamespace="libarchive_test"
	Keyword="Win32Proj"
	TargetFrameworkVersion="131072"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			CharacterSet="2"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\..\libarchive"
				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;LIBARCHIVE_STATIC"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="false"
				DebugInformationFormat="4"
				CompileAs="1"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				ShowProgress="0"
				OutputFile="..\..\..\$(ProjectName).exe"
				LinkIncremental="2"
				GenerateDebugInformation="true"
				SubSystem="1"
				RandomizedBaseAddress="1"
				DataExecutionPrevention="0"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
				EmbedManifest="true"
				SuppressStartupBanner="true"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="1"
			CharacterSet="2"
			WholeProgramOptimization="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCCLCompilerTool"
				AdditionalIncludeDirectories="..\..\..\libarchive"
				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;LIBARCHIVE_STATIC"
				RuntimeLibrary="2"
				UsePrecompiledHeader="0"
				WarningLevel="3"
				Detect64BitPortabilityProblems="false"
				DebugInformationFormat="3"
				CompileAs="1"
				DisableSpecificWarnings="4996"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				OutputFile="..\..\..\$(ProjectName).exe"
				LinkIncremental="1"
				GenerateDebugInformation="true"
				SubSystem="1"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				RandomizedBaseAddress="1"
				DataExecutionPrevention="0"
				TargetMachine="1"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCManifestTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCFxCopTool"
			/>
			<Tool
				Name="VCAppVerifierTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
		<ProjectReference
			ReferencedProjectIdentifier="{0C758FDB-BE1D-47E9-8E18-9168AB34A308}"
			CopyLocal="false"
			CopyLocalDependencies="false"
			CopyLocalSatelliteAssemblies="false"
			RelativePathToProject=".\libarchive.vcproj"
		/>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\..\libarchive\test\main.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\read_open_memory.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_basic.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_freebsd.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_acl_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_archive_api_feature.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_bad_fd.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_bzip2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_gtar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_tar_hardlink.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_compat_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_empty_write.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_entry.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_entry_strmode.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_fuzz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_link_resolver.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_pax_filename_encoding.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_compress_program.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_data_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_extract.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_bin_Z.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_odc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4_gzip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_cpio_svr4c_Z.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_lzma.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_gtar_sparse.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_iso_gz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_isorr_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_mtree.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_pax_bz2.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tar_empty_filename.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tbz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tgz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_tz.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_format_zip.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_pax_truncated.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_position.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_read_truncated.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_tar_filenames.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_tar_large.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_ustar_filenames.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_compress.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_compress_program.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_hardlink.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_perms.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_secure.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_disk_times.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_ar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_newc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_cpio_odc.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_pax.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_shar_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar_empty.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_format_tar_ustar.c"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test_write_open_memory.c"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath="..\..\..\libarchive\test\list.h"
				>
			</File>
			<File
				RelativePath="..\..\..\libarchive\test\test.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

File Deleted: pkgsrc/archivers/libarchive/files/cpio/cmdline.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/cpio.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/cpio.h

File Deleted: pkgsrc/archivers/libarchive/files/cpio/cpio_platform.h

File Added: pkgsrc/archivers/libarchive/files/cpio/cpio_windows.h
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */
#ifndef CPIO_WINDOWS_H
#define CPIO_WINDOWS_H 1

#include <io.h>
#include <string.h>

#define getgrgid(id)	NULL
#define getgrnam(name)	NULL
#define getpwnam(name)	NULL
#define getpwuid(id)	NULL

#ifdef _MSC_VER
#define snprintf	sprintf_s
#define strdup		_strdup
#define open	_open
#define read	_read
#define close	_close
#endif

struct passwd {
	char	*pw_name;
	uid_t	 pw_uid;
	gid_t	 pw_gid;
};

struct group {
	char	*gr_name;
	gid_t	 gr_gid;
};

struct _timeval64i32 {
	time_t		tv_sec;
	long		tv_usec;
};
#define __timeval _timeval64i32

extern int futimes(int fd, const struct __timeval *times);
#ifndef HAVE_FUTIMES
#define HAVE_FUTIMES 1
#endif
extern int utimes(const char *name, const struct __timeval *times);
#ifndef HAVE_UTIMES
#define HAVE_UTIMES 1
#endif

#endif /* CPIO_WINDOWS_H */

File Added: pkgsrc/archivers/libarchive/files/cpio/cpio_windows.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#if defined(_WIN32) && !defined(__CYGWIN__)

#include "cpio_platform.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <stddef.h>
#ifdef HAVE_SYS_UTIME_H
#include <sys/utime.h>
#endif
#include <sys/stat.h>
#include <process.h>
#include <stdlib.h>
#include <wchar.h>
#include <windows.h>
#include <sddl.h>

#include "cpio.h"
#include "err.h"

#define EPOC_TIME	(116444736000000000ULL)

static void cpio_dosmaperr(unsigned long);

/*
 * Prepend "\\?\" to the path name and convert it to unicode to permit
 * an extended-length path for a maximum total path length of 32767
 * characters.
 * see also http://msdn.microsoft.com/en-us/library/aa365247.aspx
 */
static wchar_t *
permissive_name(const char *name)
{
	wchar_t *wn, *wnp;
	wchar_t *ws, *wsp;
	DWORD l, len, slen, alloclen;
	int unc;

	len = (DWORD)strlen(name);
	wn = malloc((len + 1) * sizeof(wchar_t));
	if (wn == NULL)
		return (NULL);
	l = MultiByteToWideChar(CP_ACP, 0, name, len, wn, len);
	if (l == 0) {
		free(wn);
		return (NULL);
	}
	wn[l] = L'\0';

	/* Get a full path names */
	l = GetFullPathNameW(wn, 0, NULL, NULL);
	if (l == 0) {
		free(wn);
		return (NULL);
	}
	wnp = malloc(l * sizeof(wchar_t));
	if (wnp == NULL) {
		free(wn);
		return (NULL);
	}
	len = GetFullPathNameW(wn, l, wnp, NULL);
	free(wn);
	wn = wnp;

	if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
	    wnp[2] == L'?' && wnp[3] == L'\\')
		/* We have already permissive names. */
		return (wn);

	if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
		wnp[2] == L'.' && wnp[3] == L'\\') {
		/* Device names */
		if (((wnp[4] >= L'a' && wnp[4] <= L'z') ||
		     (wnp[4] >= L'A' && wnp[4] <= L'Z')) &&
		    wnp[5] == L':' && wnp[6] == L'\\')
			wnp[2] = L'?';/* Not device names. */
		return (wn);
	}

	unc = 0;
	if (wnp[0] == L'\\' && wnp[1] == L'\\' && wnp[2] != L'\\') {
		wchar_t *p = &wnp[2];

		/* Skip server-name letters. */
		while (*p != L'\\' && *p != L'\0')
			++p;
		if (*p == L'\\') {
			wchar_t *rp = ++p;
			/* Skip share-name letters. */
			while (*p != L'\\' && *p != L'\0')
				++p;
			if (*p == L'\\' && p != rp) {
				/* Now, match patterns such as
				 * "\\server-name\share-name\" */
				wnp += 2;
				len -= 2;
				unc = 1;
			}
		}
	}

	alloclen = slen = 4 + (unc * 4) + len + 1;
	ws = wsp = malloc(slen * sizeof(wchar_t));
	if (ws == NULL) {
		free(wn);
		return (NULL);
	}
	/* prepend "\\?\" */
	wcsncpy(wsp, L"\\\\?\\", 4);
	wsp += 4;
	slen -= 4;
	if (unc) {
		/* append "UNC\" ---> "\\?\UNC\" */
		wcsncpy(wsp, L"UNC\\", 4);
		wsp += 4;
		slen -= 4;
	}
	wcsncpy(wsp, wnp, slen);
	free(wn);
	ws[alloclen - 1] = L'\0';
	return (ws);
}

static HANDLE
cpio_CreateFile(const char *path, DWORD dwDesiredAccess, DWORD dwShareMode,
    LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition,
    DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
	wchar_t *wpath;
	HANDLE handle;

	handle = CreateFileA(path, dwDesiredAccess, dwShareMode,
	    lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
	    hTemplateFile);
	if (handle != INVALID_HANDLE_VALUE)
		return (handle);
	if (GetLastError() != ERROR_PATH_NOT_FOUND)
		return (handle);
	wpath = permissive_name(path);
	if (wpath == NULL)
		return (handle);
	handle = CreateFileW(wpath, dwDesiredAccess, dwShareMode,
	    lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
	    hTemplateFile);
	free(wpath);
	return (handle);
}

#define WINTIME(sec, usec)	((Int32x32To64(sec, 10000000) + EPOC_TIME) + (usec * 10))
static int
__hutimes(HANDLE handle, const struct __timeval *times)
{
	ULARGE_INTEGER wintm;
	FILETIME fatime, fmtime;

	wintm.QuadPart = WINTIME(times[0].tv_sec, times[0].tv_usec);
	fatime.dwLowDateTime = wintm.LowPart;
	fatime.dwHighDateTime = wintm.HighPart;
	wintm.QuadPart = WINTIME(times[1].tv_sec, times[1].tv_usec);
	fmtime.dwLowDateTime = wintm.LowPart;
	fmtime.dwHighDateTime = wintm.HighPart;
	if (SetFileTime(handle, NULL, &fatime, &fmtime) == 0) {
		errno = EINVAL;
		return (-1);
	}
	return (0);
}

int
futimes(int fd, const struct __timeval *times)
{

	return (__hutimes((HANDLE)_get_osfhandle(fd), times));
}

int
utimes(const char *name, const struct __timeval *times)
{
	int ret;
	HANDLE handle;

	handle = cpio_CreateFile(name, GENERIC_READ | GENERIC_WRITE,
	    FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
	    FILE_FLAG_BACKUP_SEMANTICS, NULL);
	if (handle == INVALID_HANDLE_VALUE) {
		cpio_dosmaperr(GetLastError());
		return (-1);
	}
	ret = __hutimes(handle, times);
	CloseHandle(handle);
	return (ret);
}

/*
 * The following function was modified from PostgreSQL sources and is
 * subject to the copyright below.
 */
/*-------------------------------------------------------------------------
 *
 * win32error.c
 *	  Map win32 error codes to errno values
 *
 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
 *	  $PostgreSQL: pgsql/src/port/win32error.c,v 1.4 2008/01/01 19:46:00 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
/*
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)

Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group

Portions Copyright (c) 1994, The Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/

static const struct {
	DWORD		winerr;
	int		doserr;
} doserrors[] =
{
	{	ERROR_INVALID_FUNCTION, EINVAL	},
	{	ERROR_FILE_NOT_FOUND, ENOENT	},
	{	ERROR_PATH_NOT_FOUND, ENOENT	},
	{	ERROR_TOO_MANY_OPEN_FILES, EMFILE	},
	{	ERROR_ACCESS_DENIED, EACCES	},
	{	ERROR_INVALID_HANDLE, EBADF	},
	{	ERROR_ARENA_TRASHED, ENOMEM	},
	{	ERROR_NOT_ENOUGH_MEMORY, ENOMEM	},
	{	ERROR_INVALID_BLOCK, ENOMEM	},
	{	ERROR_BAD_ENVIRONMENT, E2BIG	},
	{	ERROR_BAD_FORMAT, ENOEXEC	},
	{	ERROR_INVALID_ACCESS, EINVAL	},
	{	ERROR_INVALID_DATA, EINVAL	},
	{	ERROR_INVALID_DRIVE, ENOENT	},
	{	ERROR_CURRENT_DIRECTORY, EACCES	},
	{	ERROR_NOT_SAME_DEVICE, EXDEV	},
	{	ERROR_NO_MORE_FILES, ENOENT	},
	{	ERROR_LOCK_VIOLATION, EACCES	},
	{	ERROR_SHARING_VIOLATION, EACCES	},
	{	ERROR_BAD_NETPATH, ENOENT	},
	{	ERROR_NETWORK_ACCESS_DENIED, EACCES	},
	{	ERROR_BAD_NET_NAME, ENOENT	},
	{	ERROR_FILE_EXISTS, EEXIST	},
	{	ERROR_CANNOT_MAKE, EACCES	},
	{	ERROR_FAIL_I24, EACCES	},
	{	ERROR_INVALID_PARAMETER, EINVAL	},
	{	ERROR_NO_PROC_SLOTS, EAGAIN	},
	{	ERROR_DRIVE_LOCKED, EACCES	},
	{	ERROR_BROKEN_PIPE, EPIPE	},
	{	ERROR_DISK_FULL, ENOSPC	},
	{	ERROR_INVALID_TARGET_HANDLE, EBADF	},
	{	ERROR_INVALID_HANDLE, EINVAL	},
	{	ERROR_WAIT_NO_CHILDREN, ECHILD	},
	{	ERROR_CHILD_NOT_COMPLETE, ECHILD	},
	{	ERROR_DIRECT_ACCESS_HANDLE, EBADF	},
	{	ERROR_NEGATIVE_SEEK, EINVAL	},
	{	ERROR_SEEK_ON_DEVICE, EACCES	},
	{	ERROR_DIR_NOT_EMPTY, ENOTEMPTY	},
	{	ERROR_NOT_LOCKED, EACCES	},
	{	ERROR_BAD_PATHNAME, ENOENT	},
	{	ERROR_MAX_THRDS_REACHED, EAGAIN	},
	{	ERROR_LOCK_FAILED, EACCES	},
	{	ERROR_ALREADY_EXISTS, EEXIST	},
	{	ERROR_FILENAME_EXCED_RANGE, ENOENT	},
	{	ERROR_NESTING_NOT_ALLOWED, EAGAIN	},
	{	ERROR_NOT_ENOUGH_QUOTA, ENOMEM	}
};

static void
cpio_dosmaperr(unsigned long e)
{
	int			i;

	if (e == 0)	{
		errno = 0;
		return;
	}

	for (i = 0; i < sizeof(doserrors); i++) {
		if (doserrors[i].winerr == e) {
			errno = doserrors[i].doserr;
			return;
		}
	}

	/* fprintf(stderr, "unrecognized win32 error code: %lu", e); */
	errno = EINVAL;
	return;
}
#endif

File Deleted: pkgsrc/archivers/libarchive/files/cpio/bsdcpio.1

File Added: pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt
############################################
#
# How to build bsdcpio
#
############################################
IF(ENABLE_CPIO)

  SET(bsdcpio_SOURCES
    cmdline.c
    cpio.c
    cpio.h
    cpio_platform.h
    ../libarchive_fe/err.c
    ../libarchive_fe/err.h
    ../libarchive_fe/lafe_platform.h
    ../libarchive_fe/line_reader.c
    ../libarchive_fe/line_reader.h
    ../libarchive_fe/matching.c
    ../libarchive_fe/matching.h
    ../libarchive_fe/pathmatch.c
    ../libarchive_fe/pathmatch.h
  )
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
  IF(WIN32 AND NOT CYGWIN)
    LIST(APPEND bsdcpio_SOURCES cpio_windows.c)
    LIST(APPEND bsdcpio_SOURCES cpio_windows.h)
  ENDIF(WIN32 AND NOT CYGWIN)

  # bsdcpio documentation
  SET(bsdcpio_MANS bsdcpio.1)

  # How to build bsdcpio
  ADD_EXECUTABLE(bsdcpio ${bsdcpio_SOURCES})
  IF(ENABLE_CPIO_SHARED)
    TARGET_LINK_LIBRARIES(bsdcpio archive ${ADDITIONAL_LIBS})
  ELSE(ENABLE_CPIO_SHARED)
    TARGET_LINK_LIBRARIES(bsdcpio archive_static ${ADDITIONAL_LIBS})
    SET_TARGET_PROPERTIES(bsdcpio PROPERTIES COMPILE_DEFINITIONS
    				  LIBARCHIVE_STATIC)
  ENDIF(ENABLE_CPIO_SHARED)
  # Full path to the compiled executable (used by test suite)
  GET_TARGET_PROPERTY(BSDCPIO bsdcpio LOCATION)

  # Installation rules
  INSTALL(TARGETS bsdcpio RUNTIME DESTINATION bin)
  INSTALL_MAN(${bsdcpio_MANS})

ENDIF(ENABLE_CPIO)

# Test suite
add_subdirectory(test)

File Added: pkgsrc/archivers/libarchive/files/cpio/config_freebsd.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD: src/usr.bin/cpio/config_freebsd.h,v 1.3 2008/12/06 07:30:40 kientzle Exp $
 */

/* A hand-tooled configuration for FreeBSD. */

#include <sys/param.h>  /* __FreeBSD_version */

#define	HAVE_DIRENT_H 1
#define	HAVE_ERRNO_H 1
#define	HAVE_FCNTL_H 1
#define	HAVE_FUTIMES 1
#define	HAVE_GRP_H 1
#define	HAVE_LIBARCHIVE 1
#define	HAVE_LINK 1
#define	HAVE_LSTAT 1
#define	HAVE_LUTIMES 1
#define	HAVE_PWD_H 1
#define	HAVE_READLINK 1
#define	HAVE_STDARG_H 1
#define	HAVE_STDLIB_H 1
#define	HAVE_STRING_H 1
#define	HAVE_SYMLINK 1
#define	HAVE_SYS_CDEFS_H 1
#define	HAVE_SYS_STAT_H 1
#define	HAVE_SYS_TIME_H 1
#define	HAVE_TIME_H 1
#define	HAVE_UINTMAX_T 1
#define	HAVE_UNISTD_H 1
#define	HAVE_UNSIGNED_LONG_LONG 1
#define	HAVE_UTIME_H 1
#define	HAVE_UTIMES 1


File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/Attic/main.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test.h

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_0.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_basic.c

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_cmdline.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

/*
 * Test the command-line parsing.
 */

DEFINE_TEST(test_cmdline)
{
	FILE *f;

	/* Create an empty file. */
	f = fopen("empty", "wb");
	assert(f != NULL);
	fclose(f);

	failure("-Q is an invalid option on every cpio program I know of");
	assert(0 != systemf("%s -i -Q <empty >1.out 2>1.err", testprog));
	assertEmptyFile("1.out");

	failure("-f requires an argument");
	assert(0 != systemf("%s -if <empty >2.out 2>2.err", testprog));
	assertEmptyFile("2.out");

	failure("-f requires an argument");
	assert(0 != systemf("%s -i -f <empty >3.out 2>3.err", testprog));
	assertEmptyFile("3.out");

	failure("--format requires an argument");
	assert(0 != systemf("%s -i --format <empty >4.out 2>4.err", testprog));
	assertEmptyFile("4.out");

	failure("--badopt is an invalid option");
	assert(0 != systemf("%s -i --badop <empty >5.out 2>5.err", testprog));
	assertEmptyFile("5.out");

	failure("--badopt is an invalid option");
	assert(0 != systemf("%s -i --badopt <empty >6.out 2>6.err", testprog));
	assertEmptyFile("6.out");

	failure("--n is ambiguous");
	assert(0 != systemf("%s -i --n <empty >7.out 2>7.err", testprog));
	assertEmptyFile("7.out");

	failure("--create forbids an argument");
	assert(0 != systemf("%s --create=arg <empty >8.out 2>8.err", testprog));
	assertEmptyFile("8.out");

	failure("-i with empty input should succeed");
	assert(0 == systemf("%s -i <empty >9.out 2>9.err", testprog));
	assertEmptyFile("9.out");

	failure("-o with empty input should succeed");
	assert(0 == systemf("%s -o <empty >10.out 2>10.err", testprog));

	failure("-i -p is nonsense");
	assert(0 != systemf("%s -i -p <empty >11.out 2>11.err", testprog));
	assertEmptyFile("11.out");

	failure("-p -i is nonsense");
	assert(0 != systemf("%s -p -i <empty >12.out 2>12.err", testprog));
	assertEmptyFile("12.out");

	failure("-i -o is nonsense");
	assert(0 != systemf("%s -i -o <empty >13.out 2>13.err", testprog));
	assertEmptyFile("13.out");

	failure("-o -i is nonsense");
	assert(0 != systemf("%s -o -i <empty >14.out 2>14.err", testprog));
	assertEmptyFile("14.out");

	failure("-o -p is nonsense");
	assert(0 != systemf("%s -o -p <empty >15.out 2>15.err", testprog));
	assertEmptyFile("15.out");

	failure("-p -o is nonsense");
	assert(0 != systemf("%s -p -o <empty >16.out 2>16.err", testprog));
	assertEmptyFile("16.out");

	failure("-p with empty input should fail");
	assert(0 != systemf("%s -p <empty >17.out 2>17.err", testprog));
	assertEmptyFile("17.out");
}

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_format_newc.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat.c

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_B_upper.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");


DEFINE_TEST(test_option_B_upper)
{
	struct stat st;
	int r;

	/*
	 * Create a file on disk.
	 */
	assertMakeFile("file", 0644, NULL);

	/* Create an archive without -B; this should be 512 bytes. */
	r = systemf("echo file | %s -o > small.cpio 2>small.err", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "small.err");
	assertEqualInt(0, stat("small.cpio", &st));
	assertEqualInt(512, st.st_size);

	/* Create an archive with -B; this should be 5120 bytes. */
	r = systemf("echo file | %s -oB > large.cpio 2>large.err", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "large.err");
	assertEqualInt(0, stat("large.cpio", &st));
	assertEqualInt(5120, st.st_size);
}

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_C_upper.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");


DEFINE_TEST(test_option_C_upper)
{
	int r;

	/*
	 * Create a file on disk.
	 */
	assertMakeFile("file", 0644, NULL);

	/* Create an archive without -C; this should be 512 bytes. */
	r = systemf("echo file | %s -o > small.cpio 2>small.err", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "small.err");
	assertFileSize("small.cpio", 512);

	/* Create an archive with -C 513; this should be 513 bytes. */
	r = systemf("echo file | %s -o -C 513 > 513.cpio 2>513.err",
		    testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "513.err");
	assertFileSize("513.cpio", 513);

	/* Create an archive with -C 12345; this should be 12345 bytes. */
	r = systemf("echo file | %s -o -C12345 > 12345.cpio 2>12345.err",
		    testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "12345.err");
	assertFileSize("12345.cpio", 12345);

	/* Create an archive with invalid -C request */
	assert(0 != systemf("echo file | %s -o -C > bad.cpio 2>bad.err",
			    testprog));
	assertEmptyFile("bad.cpio");
}

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_J_upper.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

DEFINE_TEST(test_option_J_upper)
{
	char *p;
	int r;
	size_t s;

	/* Create a file. */
	assertMakeFile("f", 0644, "a");

	/* Archive it with xz compression. */
	r = systemf("echo f | %s -o -J >archive.out 2>archive.err",
	    testprog);
	p = slurpfile(&s, "archive.err");
	p[s] = '\0';
	if (r != 0) {
		if (strstr(p, "compression not available") != NULL) {
			skipping("This version of bsdcpio was compiled "
			    "without xz support");
			return;
		}
		failure("-J option is broken");
		assertEqualInt(r, 0);
		return;
	}
	/* Check that the archive file has an xz signature. */
	p = slurpfile(&s, "archive.out");
	assert(s > 2);
	assertEqualMem(p, "\3757zXZ", 5);
}

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_L_upper.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_L.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $");

/* This is a little pointless, as Windows doesn't support symlinks
 * (except for the seriously crippled CreateSymbolicLink API) so these
 * tests won't run on Windows. */
#if defined(_WIN32) && !defined(__CYGWIN__)
#define CAT "type"
#else
#define CAT "cat"
#endif

DEFINE_TEST(test_option_L_upper)
{
	FILE *filelist;
	int r;

	if (!canSymlink()) {
		skipping("Symlink tests");
		return;
	}

	filelist = fopen("filelist", "w");

	/* Create a file and a symlink to the file. */
	assertMakeFile("file", 0644, "1234567890");
	fprintf(filelist, "file\n");

	/* Symlink to above file. */
	assertMakeSymlink("symlink", "file");
	fprintf(filelist, "symlink\n");

	fclose(filelist);

	r = systemf(CAT " filelist | %s -pd copy >copy.out 2>copy.err", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "copy.err");

	failure("Regular -p without -L should preserve symlinks.");
	assertIsSymlink("copy/symlink", NULL);

	r = systemf(CAT " filelist | %s -pd -L copy-L >copy-L.out 2>copy-L.err", testprog);
	assertEqualInt(r, 0);
	assertEmptyFile("copy-L.out");
	assertTextFileContents("1 block\n", "copy-L.err");
	failure("-pdL should dereference symlinks and turn them into files.");
	assertIsReg("copy-L/symlink", -1);

	r = systemf(CAT " filelist | %s -o >archive.out 2>archive.err", testprog);
	failure("Error invoking %s -o ", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "archive.err");

	assertMakeDir("unpack", 0755);
	assertChdir("unpack");
	r = systemf(CAT " ../archive.out | %s -i >unpack.out 2>unpack.err", testprog);
	failure("Error invoking %s -i", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "unpack.err");
	assertChdir("..");

	assertIsSymlink("unpack/symlink", NULL);

	r = systemf(CAT " filelist | %s -oL >archive-L.out 2>archive-L.err", testprog);
	failure("Error invoking %s -oL", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "archive-L.err");

	assertMakeDir("unpack-L", 0755);
	assertChdir("unpack-L");
	r = systemf(CAT " ../archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog);
	failure("Error invoking %s -i < archive-L.out", testprog);
	assertEqualInt(r, 0);
	assertTextFileContents("1 block\n", "unpack-L.err");
	assertChdir("..");
	assertIsReg("unpack-L/symlink", -1);
}

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_Z_upper.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

DEFINE_TEST(test_option_Z_upper)
{
	char *p;
	int r;
	size_t s;

	/* Create a file. */
	assertMakeFile("f", 0644, "a");

	/* Archive it with compress compression. */
	r = systemf("echo f | %s -oZ >archive.out 2>archive.err",
	    testprog);
	p = slurpfile(&s, "archive.err");
	p[s] = '\0';
	if (r != 0) {
		if (strstr(p, "compression not available") != NULL) {
			skipping("This version of bsdcpio was compiled "
			    "without compress support");
			return;
		}
		failure("-Z option is broken");
		assertEqualInt(r, 0);
		return;
	}
	/* Check that the archive file has a compress signature. */
	p = slurpfile(&s, "archive.out");
	assert(s > 2);
	assertEqualMem(p, "\x1f\x9d", 2);
}

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_a.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_c.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_d.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_f.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_help.c

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_l.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

DEFINE_TEST(test_option_l)
{
	int r;

	/* Create a file. */
	assertMakeFile("f", 0644, "a");

	/* Copy the file to the "copy" dir. */
	r = systemf("echo f | %s -pd copy >copy.out 2>copy.err",
	    testprog);
	assertEqualInt(r, 0);

	/* Check that the copy is a true copy and not a link. */
	assertIsNotHardlink("f", "copy/f");

	/* Copy the file to the "link" dir with the -l option. */
	r = systemf("echo f | %s -pld link >link.out 2>link.err",
	    testprog);
	assertEqualInt(r, 0);

	/* Check that this is a link and not a copy. */
	assertIsHardlink("f", "link/f");
}

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_m.c

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_option_lzma.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

DEFINE_TEST(test_option_lzma)
{
	char *p;
	int r;
	size_t s;

	/* Create a file. */
	assertMakeFile("f", 0644, "a");

	/* Archive it with lzma compression. */
	r = systemf("echo f | %s -o --lzma >archive.out 2>archive.err",
	    testprog);
	p = slurpfile(&s, "archive.err");
	p[s] = '\0';
	if (r != 0) {
		if (strstr(p, "compression not available") != NULL) {
			skipping("This version of bsdcpio was compiled "
			    "without lzma support");
			return;
		}
		failure("--lzma option is broken");
		assertEqualInt(r, 0);
		return;
	}
	/* Check that the archive file has an lzma signature. */
	p = slurpfile(&s, "archive.out");
	assert(s > 2);
	assertEqualMem(p, "\x5d\00\00", 3);
}

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_u.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_version.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_y.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_z.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_owner_parse.c

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_passthrough_dotdot.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_dotdot.c,v 1.4 2008/08/24 06:21:00 kientzle Exp $");

/*
 * Verify that "cpio -p .." works.
 */

DEFINE_TEST(test_passthrough_dotdot)
{
	int r;
	FILE *filelist;

	assertUmask(0);

	/*
	 * Create an assortment of files on disk.
	 */
	filelist = fopen("filelist", "w");

	/* Directory. */
	assertMakeDir("dir", 0755);
	assertChdir("dir");

	fprintf(filelist, ".\n");

	/* File with 10 bytes content. */
	assertMakeFile("file", 0642, "1234567890");
	fprintf(filelist, "file\n");

	/* All done. */
	fclose(filelist);


	/*
	 * Use cpio passthrough mode to copy files to another directory.
	 */
	r = systemf("%s -pdvm .. <../filelist >../stdout 2>../stderr",
	    testprog);
	failure("Error invoking %s -pd ..", testprog);
	assertEqualInt(r, 0);

	assertChdir("..");

	/* Verify stderr and stdout. */
	assertTextFileContents("../.\n../file\n1 block\n", "stderr");
	assertEmptyFile("stdout");

	/* Regular file. */
	assertIsReg("file", 0642);
	assertFileSize("file", 10);
	assertFileNLinks("file", 1);
}

File Added: pkgsrc/archivers/libarchive/files/cpio/test/test_passthrough_reverse.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_reverse.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $");

/*
 * As reported by Bernd Walter:  Some people are in the habit of
 * using "find -d" to generate a list for cpio -p because that
 * copies the top-level dir last, which preserves owner and mode
 * information.  That's not necessary for bsdcpio (libarchive defers
 * restoring directory information), but bsdcpio should still generate
 * the correct results with this usage.
 */

DEFINE_TEST(test_passthrough_reverse)
{
	int r;
	FILE *filelist;

	assertUmask(0);

	/*
	 * Create an assortment of files on disk.
	 */
	filelist = fopen("filelist", "w");

	/* Directory. */
	assertMakeDir("dir", 0743);

	/* File with 10 bytes content. */
	assertMakeFile("dir/file", 0644, "1234567890");
	fprintf(filelist, "dir/file\n");

	/* Write dir last. */
	fprintf(filelist, "dir\n");

	/* All done. */
	fclose(filelist);


	/*
	 * Use cpio passthrough mode to copy files to another directory.
	 */
	r = systemf("%s -pdvm out <filelist >stdout 2>stderr", testprog);
	failure("Error invoking %s -pd out", testprog);
	assertEqualInt(r, 0);

	assertChdir("out");

	/* Verify stderr and stdout. */
	assertTextFileContents("out/dir/file\nout/dir\n1 block\n",
	    "../stderr");
	assertEmptyFile("../stdout");

	/* dir */
	assertIsDir("dir", 0743);


	/* Regular file. */
	assertIsReg("dir/file", 0644);
	assertFileSize("dir/file", 10);
	assertFileNLinks("dir/file", 1);
}

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/Attic/test_pathmatch.c

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/list.h

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.bin.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.crc.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.newc.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_gcpio_compat_ref.ustar.uu

File Added: pkgsrc/archivers/libarchive/files/cpio/test/CMakeLists.txt
############################################
#
# How to build bsdcpio_test
#
############################################
IF(ENABLE_CPIO AND ENABLE_TEST)
  SET(bsdcpio_test_SOURCES
    ../cmdline.c
    ../../libarchive_fe/err.c
    ../../libarchive_fe/pathmatch.c
    main.c
    test.h
    test_0.c
    test_basic.c
    test_cmdline.c
    test_format_newc.c
    test_gcpio_compat.c
    test_option_B_upper.c
    test_option_C_upper.c
    test_option_J_upper.c
    test_option_L_upper.c
    test_option_Z_upper.c
    test_option_a.c
    test_option_c.c
    test_option_d.c
    test_option_f.c
    test_option_help.c
    test_option_l.c
    test_option_lzma.c
    test_option_m.c
    test_option_t.c
    test_option_u.c
    test_option_version.c
    test_option_y.c
    test_option_z.c
    test_owner_parse.c
    test_passthrough_dotdot.c
    test_passthrough_reverse.c
    test_pathmatch.c
  )
  IF(WIN32 AND NOT CYGWIN)
    LIST(APPEND bsdcpio_test_SOURCES ../cpio_windows.h)
  ENDIF(WIN32 AND NOT CYGWIN)

  #
  # Register target
  #
  ADD_EXECUTABLE(bsdcpio_test ${bsdcpio_test_SOURCES})
  SET_PROPERTY(TARGET bsdcpio_test PROPERTY COMPILE_DEFINITIONS LIST_H)

  #
  # Generate list.h by grepping DEFINE_TEST() lines out of the C sources.
  #
  GENERATE_LIST_H(${CMAKE_CURRENT_BINARY_DIR}/list.h
    ${CMAKE_CURRENT_LIST_FILE} ${bsdcpio_test_SOURCES})
  SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
    ${CMAKE_CURRENT_BINARY_DIR})

  # list.h has a line DEFINE_TEST(testname) for every
  # test.  We can use that to define the tests for cmake by
  # defining a DEFINE_TEST macro and reading list.h in.
  MACRO (DEFINE_TEST _testname)
    ADD_TEST_28(
      NAME bsdcpio_${_testname}
      COMMAND bsdcpio_test -vv
                           -p $<TARGET_FILE:bsdcpio>
                           -r ${CMAKE_CURRENT_SOURCE_DIR}
                           ${_testname})
  ENDMACRO (DEFINE_TEST _testname)

  INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)

  # Experimental new test handling
  ADD_CUSTOM_TARGET(run_bsdcpio_test
	COMMAND	bsdcpio_test -p ${BSDCPIO} -r ${CMAKE_CURRENT_SOURCE_DIR})
  ADD_DEPENDENCIES(run_bsdcpio_test bsdcpio)
  ADD_DEPENDENCIES(run_all_tests run_bsdcpio_test)
ENDIF(ENABLE_CPIO AND ENABLE_TEST)


File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_f.cpio.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_m.cpio.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.cpio.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_t.stdout.uu

File Deleted: pkgsrc/archivers/libarchive/files/cpio/test/test_option_tv.stdout.uu

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_check_magic.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_endian.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_stat.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_stat.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_strmode.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_xattr.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_xattr.c 201096 2009-12-28 02:41:27Z kientzle $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>	/* for Linux file flags */
#endif
/*
 * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
 * As the include guards don't agree, the order of include is important.
 */
#ifdef HAVE_LINUX_EXT2_FS_H
#include <linux/ext2_fs.h>	/* for Linux file flags */
#endif
#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__)
#include <ext2fs/ext2_fs.h>	/* for Linux file flags */
#endif
#include <stddef.h>
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif

#include "archive.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_entry_private.h"

/*
 * extended attribute handling
 */

void
archive_entry_xattr_clear(struct archive_entry *entry)
{
	struct ae_xattr	*xp;

	while (entry->xattr_head != NULL) {
		xp = entry->xattr_head->next;
		free(entry->xattr_head->name);
		free(entry->xattr_head->value);
		free(entry->xattr_head);
		entry->xattr_head = xp;
	}

	entry->xattr_head = NULL;
}

void
archive_entry_xattr_add_entry(struct archive_entry *entry,
	const char *name, const void *value, size_t size)
{
	struct ae_xattr	*xp;

	for (xp = entry->xattr_head; xp != NULL; xp = xp->next)
		;

	if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL)
		/* XXX Error XXX */
		return;

	xp->name = strdup(name);
	if ((xp->value = malloc(size)) != NULL) {
		memcpy(xp->value, value, size);
		xp->size = size;
	} else
		xp->size = 0;

	xp->next = entry->xattr_head;
	entry->xattr_head = xp;
}


/*
 * returns number of the extended attribute entries
 */
int
archive_entry_xattr_count(struct archive_entry *entry)
{
	struct ae_xattr *xp;
	int count = 0;

	for (xp = entry->xattr_head; xp != NULL; xp = xp->next)
		count++;

	return count;
}

int
archive_entry_xattr_reset(struct archive_entry * entry)
{
	entry->xattr_p = entry->xattr_head;

	return archive_entry_xattr_count(entry);
}

int
archive_entry_xattr_next(struct archive_entry * entry,
	const char **name, const void **value, size_t *size)
{
	if (entry->xattr_p) {
		*name = entry->xattr_p->name;
		*value = entry->xattr_p->value;
		*size = entry->xattr_p->size;

		entry->xattr_p = entry->xattr_p->next;

		return (ARCHIVE_OK);
	} else {
		*name = NULL;
		*value = NULL;
		*size = (size_t)0;
		return (ARCHIVE_WARN);
	}
}

/*
 * end of xattr handling
 */

File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_hash.h
/*-
 * Copyright (c) 2009 Joerg Sonnenberger
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD: head/lib/libarchive/archive_hash.h 201171 2009-12-29 06:39:07Z kientzle $
 */

#ifndef __LIBARCHIVE_BUILD
#error This header is only to be used internally to libarchive.
#endif

/*
 * Hash function support in various Operating Systems:
 *
 * NetBSD:
 * - MD5 and SHA1 in libc: without _ after algorithm name
 * - SHA2 in libc: with _ after algorithm name
 *
 * OpenBSD:
 * - MD5, SHA1 and SHA2 in libc: without _ after algorithm name
 * - OpenBSD 4.4 and earlier have SHA2 in libc with _ after algorithm name
 *
 * DragonFly and FreeBSD (XXX not used yet):
 * - MD5 and SHA1 in libmd: without _ after algorithm name
 * - SHA256: with _ after algorithm name
 *
 * OpenSSL:
 * - MD5, SHA1 and SHA2 in libcrypto: with _ after algorithm name
 */

#if defined(HAVE_MD5_H) && defined(HAVE_MD5INIT)
#  include <md5.h>
#  define ARCHIVE_HAS_MD5
typedef MD5_CTX archive_md5_ctx;
#  define archive_md5_init(ctx)			MD5Init(ctx)
#  define archive_md5_final(ctx, buf)		MD5Final(buf, ctx)
#  define archive_md5_update(ctx, buf, n)	MD5Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_MD5_H)
#  include <openssl/md5.h>
#  define ARCHIVE_HAS_MD5
typedef MD5_CTX archive_md5_ctx;
#  define archive_md5_init(ctx)			MD5_Init(ctx)
#  define archive_md5_final(ctx, buf)		MD5_Final(buf, ctx)
#  define archive_md5_update(ctx, buf, n)	MD5_Update(ctx, buf, n)
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_MD5)
#  define ARCHIVE_HAS_MD5
typedef MD5_CTX archive_md5_ctx;
#  define archive_md5_init(ctx)			MD5_Init(ctx)
#  define archive_md5_final(ctx, buf)		MD5_Final(buf, ctx)
#  define archive_md5_update(ctx, buf, n)	MD5_Update(ctx, buf, n)
#endif

#if defined(HAVE_RMD160_H) && defined(HAVE_RMD160INIT)
#  include <rmd160.h>
#  define ARCHIVE_HAS_RMD160
typedef RMD160_CTX archive_rmd160_ctx;
#  define archive_rmd160_init(ctx)		RMD160Init(ctx)
#  define archive_rmd160_final(ctx, buf)	RMD160Final(buf, ctx)
#  define archive_rmd160_update(ctx, buf, n)	RMD160Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_RIPEMD_H)
#  include <openssl/ripemd.h>
#  define ARCHIVE_HAS_RMD160
typedef RIPEMD160_CTX archive_rmd160_ctx;
#  define archive_rmd160_init(ctx)		RIPEMD160_Init(ctx)
#  define archive_rmd160_final(ctx, buf)	RIPEMD160_Final(buf, ctx)
#  define archive_rmd160_update(ctx, buf, n)	RIPEMD160_Update(ctx, buf, n)
#endif

#if defined(HAVE_SHA1_H) && defined(HAVE_SHA1INIT)
#  include <sha1.h>
#  define ARCHIVE_HAS_SHA1
typedef SHA1_CTX archive_sha1_ctx;
#  define archive_sha1_init(ctx)		SHA1Init(ctx)
#  define archive_sha1_final(ctx, buf)		SHA1Final(buf, ctx)
#  define archive_sha1_update(ctx, buf, n)	SHA1Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_SHA_H)
#  include <openssl/sha.h>
#  define ARCHIVE_HAS_SHA1
typedef SHA_CTX archive_sha1_ctx;
#  define archive_sha1_init(ctx)		SHA1_Init(ctx)
#  define archive_sha1_final(ctx, buf)		SHA1_Final(buf, ctx)
#  define archive_sha1_update(ctx, buf, n)	SHA1_Update(ctx, buf, n)
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_SHA1)
#  define ARCHIVE_HAS_SHA1
typedef SHA1_CTX archive_sha1_ctx;
#  define archive_sha1_init(ctx)		SHA1_Init(ctx)
#  define archive_sha1_final(ctx, buf)		SHA1_Final(buf, ctx)
#  define archive_sha1_update(ctx, buf, n)	SHA1_Update(ctx, buf, n)
#endif

#if defined(HAVE_SHA2_H) && defined(HAVE_SHA256_INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA256
typedef SHA256_CTX archive_sha256_ctx;
#  define archive_sha256_init(ctx)		SHA256_Init(ctx)
#  define archive_sha256_final(ctx, buf)	SHA256_Final(buf, ctx)
#  define archive_sha256_update(ctx, buf, n)	SHA256_Update(ctx, buf, n)
#elif defined(HAVE_SHA2_H) && defined(HAVE_SHA256INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA256
typedef SHA256_CTX archive_sha256_ctx;
#  define archive_sha256_init(ctx)		SHA256Init(ctx)
#  define archive_sha256_final(ctx, buf)	SHA256Final(buf, ctx)
#  define archive_sha256_update(ctx, buf, n)	SHA256Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_SHA_H) && defined(HAVE_OPENSSL_SHA256_INIT)
#  include <openssl/sha.h>
#  define ARCHIVE_HAS_SHA256
typedef SHA256_CTX archive_sha256_ctx;
#  define archive_sha256_init(ctx)		SHA256_Init(ctx)
#  define archive_sha256_final(ctx, buf)	SHA256_Final(buf, ctx)
#  define archive_sha256_update(ctx, buf, n)	SHA256_Update(ctx, buf, n)
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_SHA_256)
#  define ARCHIVE_HAS_SHA256
typedef SHA256_CTX archive_sha256_ctx;
#  define archive_sha256_init(ctx)		SHA256_Init(ctx)
#  define archive_sha256_final(ctx, buf)	SHA256_Final(buf, ctx)
#  define archive_sha256_update(ctx, buf, n)	SHA256_Update(ctx, buf, n)
#endif

#if defined(HAVE_SHA2_H) && defined(HAVE_SHA384_INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA384
typedef SHA384_CTX archive_sha384_ctx;
#  define archive_sha384_init(ctx)		SHA384_Init(ctx)
#  define archive_sha384_final(ctx, buf)	SHA384_Final(buf, ctx)
#  define archive_sha384_update(ctx, buf, n)	SHA384_Update(ctx, buf, n)
#elif defined(HAVE_SHA2_H) && defined(HAVE_SHA384INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA384
typedef SHA384_CTX archive_sha384_ctx;
#  define archive_sha384_init(ctx)		SHA384Init(ctx)
#  define archive_sha384_final(ctx, buf)	SHA384Final(buf, ctx)
#  define archive_sha384_update(ctx, buf, n)	SHA384Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_SHA_H) && defined(HAVE_OPENSSL_SHA384_INIT)
#  include <openssl/sha.h>
#  define ARCHIVE_HAS_SHA384
typedef SHA512_CTX archive_sha384_ctx;
#  define archive_sha384_init(ctx)		SHA384_Init(ctx)
#  define archive_sha384_final(ctx, buf)	SHA384_Final(buf, ctx)
#  define archive_sha384_update(ctx, buf, n)	SHA384_Update(ctx, buf, n)
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_SHA_384)
#  define ARCHIVE_HAS_SHA384
typedef SHA512_CTX archive_sha384_ctx;
#  define archive_sha384_init(ctx)		SHA384_Init(ctx)
#  define archive_sha384_final(ctx, buf)	SHA384_Final(buf, ctx)
#  define archive_sha384_update(ctx, buf, n)	SHA384_Update(ctx, buf, n)
#endif

#if defined(HAVE_SHA2_H) && defined(HAVE_SHA512_INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA512
typedef SHA512_CTX archive_sha512_ctx;
#  define archive_sha512_init(ctx)		SHA512_Init(ctx)
#  define archive_sha512_final(ctx, buf)	SHA512_Final(buf, ctx)
#  define archive_sha512_update(ctx, buf, n)	SHA512_Update(ctx, buf, n)
#elif defined(HAVE_SHA2_H) && defined(HAVE_SHA512INIT)
#  include <sha2.h>
#  define ARCHIVE_HAS_SHA512
typedef SHA512_CTX archive_sha512_ctx;
#  define archive_sha512_init(ctx)		SHA512Init(ctx)
#  define archive_sha512_final(ctx, buf)	SHA512Final(buf, ctx)
#  define archive_sha512_update(ctx, buf, n)	SHA512Update(ctx, buf, n)
#elif defined(HAVE_OPENSSL_SHA_H) && defined(HAVE_OPENSSL_SHA512_INIT)
#  include <openssl/sha.h>
#  define ARCHIVE_HAS_SHA512
typedef SHA512_CTX archive_sha512_ctx;
#  define archive_sha512_init(ctx)		SHA512_Init(ctx)
#  define archive_sha512_final(ctx, buf)	SHA512_Final(buf, ctx)
#  define archive_sha512_update(ctx, buf, n)	SHA512_Update(ctx, buf, n)
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(CALG_SHA_512)
#  define ARCHIVE_HAS_SHA512
typedef SHA512_CTX archive_sha512_ctx;
#  define archive_sha512_init(ctx)		SHA512_Init(ctx)
#  define archive_sha512_final(ctx, buf)	SHA512_Final(buf, ctx)
#  define archive_sha512_update(ctx, buf, n)	SHA512_Update(ctx, buf, n)
#endif

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_private.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_disk.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk.c 189429 2009-03-06 04:35:31Z kientzle $");

#include "archive.h"
#include "archive_string.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_read_disk_private.h"

static int	_archive_read_finish(struct archive *);
static int	_archive_read_close(struct archive *);
static const char *trivial_lookup_gname(void *, gid_t gid);
static const char *trivial_lookup_uname(void *, uid_t uid);

static struct archive_vtable *
archive_read_disk_vtable(void)
{
	static struct archive_vtable av;
	static int inited = 0;

	if (!inited) {
		av.archive_finish = _archive_read_finish;
		av.archive_close = _archive_read_close;
	}
	return (&av);
}

const char *
archive_read_disk_gname(struct archive *_a, gid_t gid)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	if (a->lookup_gname != NULL)
		return ((*a->lookup_gname)(a->lookup_gname_data, gid));
	return (NULL);
}

const char *
archive_read_disk_uname(struct archive *_a, uid_t uid)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	if (a->lookup_uname != NULL)
		return ((*a->lookup_uname)(a->lookup_uname_data, uid));
	return (NULL);
}

int
archive_read_disk_set_gname_lookup(struct archive *_a,
    void *private_data,
    const char * (*lookup_gname)(void *private, gid_t gid),
    void (*cleanup_gname)(void *private))
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	__archive_check_magic(&a->archive, ARCHIVE_READ_DISK_MAGIC,
	    ARCHIVE_STATE_ANY, "archive_read_disk_set_gname_lookup");

	if (a->cleanup_gname != NULL && a->lookup_gname_data != NULL)
		(a->cleanup_gname)(a->lookup_gname_data);

	a->lookup_gname = lookup_gname;
	a->cleanup_gname = cleanup_gname;
	a->lookup_gname_data = private_data;
	return (ARCHIVE_OK);
}

int
archive_read_disk_set_uname_lookup(struct archive *_a,
    void *private_data,
    const char * (*lookup_uname)(void *private, uid_t uid),
    void (*cleanup_uname)(void *private))
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	__archive_check_magic(&a->archive, ARCHIVE_READ_DISK_MAGIC,
	    ARCHIVE_STATE_ANY, "archive_read_disk_set_uname_lookup");

	if (a->cleanup_uname != NULL && a->lookup_uname_data != NULL)
		(a->cleanup_uname)(a->lookup_uname_data);

	a->lookup_uname = lookup_uname;
	a->cleanup_uname = cleanup_uname;
	a->lookup_uname_data = private_data;
	return (ARCHIVE_OK);
}

/*
 * Create a new archive_read_disk object and initialize it with global state.
 */
struct archive *
archive_read_disk_new(void)
{
	struct archive_read_disk *a;

	a = (struct archive_read_disk *)malloc(sizeof(*a));
	if (a == NULL)
		return (NULL);
	memset(a, 0, sizeof(*a));
	a->archive.magic = ARCHIVE_READ_DISK_MAGIC;
	/* We're ready to write a header immediately. */
	a->archive.state = ARCHIVE_STATE_HEADER;
	a->archive.vtable = archive_read_disk_vtable();
	a->lookup_uname = trivial_lookup_uname;
	a->lookup_gname = trivial_lookup_gname;
	return (&a->archive);
}

static int
_archive_read_finish(struct archive *_a)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;

	if (a->cleanup_gname != NULL && a->lookup_gname_data != NULL)
		(a->cleanup_gname)(a->lookup_gname_data);
	if (a->cleanup_uname != NULL && a->lookup_uname_data != NULL)
		(a->cleanup_uname)(a->lookup_uname_data);
	archive_string_free(&a->archive.error_string);
	free(a);
	return (ARCHIVE_OK);
}

static int
_archive_read_close(struct archive *_a)
{
	(void)_a; /* UNUSED */
	return (ARCHIVE_OK);
}

int
archive_read_disk_set_symlink_logical(struct archive *_a)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	a->symlink_mode = 'L';
	a->follow_symlinks = 1;
	return (ARCHIVE_OK);
}

int
archive_read_disk_set_symlink_physical(struct archive *_a)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	a->symlink_mode = 'P';
	a->follow_symlinks = 0;
	return (ARCHIVE_OK);
}

int
archive_read_disk_set_symlink_hybrid(struct archive *_a)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	a->symlink_mode = 'H';
	a->follow_symlinks = 1; /* Follow symlinks initially. */
	return (ARCHIVE_OK);
}

/*
 * Trivial implementations of gname/uname lookup functions.
 * These are normally overridden by the client, but these stub
 * versions ensure that we always have something that works.
 */
static const char *
trivial_lookup_gname(void *private_data, gid_t gid)
{
	(void)private_data; /* UNUSED */
	(void)gid; /* UNUSED */
	return (NULL);
}

static const char *
trivial_lookup_uname(void *private_data, uid_t uid)
{
	(void)private_data; /* UNUSED */
	(void)uid; /* UNUSED */
	return (NULL);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 201084 2009-12-28 02:14:09Z kientzle $");

#ifdef HAVE_SYS_TYPES_H
/* Mac OSX requires sys/types.h before sys/acl.h. */
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_ACL_H
#include <sys/acl.h>
#endif
#ifdef HAVE_SYS_EXTATTR_H
#include <sys/extattr.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_XATTR_H
#include <sys/xattr.h>
#endif
#ifdef HAVE_ACL_LIBACL_H
#include <acl/libacl.h>
#endif
#ifdef HAVE_ATTR_XATTR_H
#include <attr/xattr.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif

#include "archive.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_read_disk_private.h"

/*
 * Linux and FreeBSD plug this obvious hole in POSIX.1e in
 * different ways.
 */
#if HAVE_ACL_GET_PERM
#define	ACL_GET_PERM acl_get_perm
#elif HAVE_ACL_GET_PERM_NP
#define	ACL_GET_PERM acl_get_perm_np
#endif

static int setup_acls_posix1e(struct archive_read_disk *,
    struct archive_entry *, int fd);
static int setup_xattrs(struct archive_read_disk *,
    struct archive_entry *, int fd);

int
archive_read_disk_entry_from_file(struct archive *_a,
    struct archive_entry *entry,
    int fd, const struct stat *st)
{
	struct archive_read_disk *a = (struct archive_read_disk *)_a;
	const char *path, *name;
	struct stat s;
	int initial_fd = fd;
	int r, r1;

	archive_clear_error(_a);
	path = archive_entry_sourcepath(entry);
	if (path == NULL)
		path = archive_entry_pathname(entry);

#ifdef EXT2_IOC_GETFLAGS
	/* Linux requires an extra ioctl to pull the flags.  Although
	 * this is an extra step, it has a nice side-effect: We get an
	 * open file descriptor which we can use in the subsequent lookups. */
	if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode))) {
		if (fd < 0)
			fd = open(pathname, O_RDONLY | O_NONBLOCK | O_BINARY);
		if (fd >= 0) {
			unsigned long stflags;
			int r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
			if (r == 0 && stflags != 0)
				archive_entry_set_fflags(entry, stflags, 0);
		}
	}
#endif

	if (st == NULL) {
		/* TODO: On Windows, use GetFileInfoByHandle() here.
		 * Using Windows stat() call is badly broken, but
		 * even the stat() wrapper has problems because
		 * 'struct stat' is broken on Windows.
		 */
#if HAVE_FSTAT
		if (fd >= 0) {
			if (fstat(fd, &s) != 0) {
				archive_set_error(&a->archive, errno,
				    "Can't fstat");
				return (ARCHIVE_FAILED);
			}
		} else
#endif
#if HAVE_LSTAT
		if (!a->follow_symlinks) {
			if (lstat(path, &s) != 0) {
				archive_set_error(&a->archive, errno,
				    "Can't lstat %s", path);
				return (ARCHIVE_FAILED);
			}
		} else
#endif
		if (stat(path, &s) != 0) {
			archive_set_error(&a->archive, errno,
			    "Can't lstat %s", path);
			return (ARCHIVE_FAILED);
		}
		st = &s;
	}
	archive_entry_copy_stat(entry, st);

	/* Lookup uname/gname */
	name = archive_read_disk_uname(_a, archive_entry_uid(entry));
	if (name != NULL)
		archive_entry_copy_uname(entry, name);
	name = archive_read_disk_gname(_a, archive_entry_gid(entry));
	if (name != NULL)
		archive_entry_copy_gname(entry, name);

#ifdef HAVE_STRUCT_STAT_ST_FLAGS
	/* On FreeBSD, we get flags for free with the stat. */
	/* TODO: Does this belong in copy_stat()? */
	if (st->st_flags != 0)
		archive_entry_set_fflags(entry, st->st_flags, 0);
#endif

#ifdef HAVE_READLINK
	if (S_ISLNK(st->st_mode)) {
		char linkbuffer[PATH_MAX + 1];
		int lnklen = readlink(path, linkbuffer, PATH_MAX);
		if (lnklen < 0) {
			archive_set_error(&a->archive, errno,
			    "Couldn't read link data");
			return (ARCHIVE_FAILED);
		}
		linkbuffer[lnklen] = 0;
		archive_entry_set_symlink(entry, linkbuffer);
	}
#endif

	r = setup_acls_posix1e(a, entry, fd);
	r1 = setup_xattrs(a, entry, fd);
	if (r1 < r)
		r = r1;
	/* If we opened the file earlier in this function, close it. */
	if (initial_fd != fd)
		close(fd);
	return (r);
}

#ifdef HAVE_POSIX_ACL
static void setup_acl_posix1e(struct archive_read_disk *a,
    struct archive_entry *entry, acl_t acl, int archive_entry_acl_type);

static int
setup_acls_posix1e(struct archive_read_disk *a,
    struct archive_entry *entry, int fd)
{
	const char	*accpath;
	acl_t		 acl;

	accpath = archive_entry_sourcepath(entry);
	if (accpath == NULL)
		accpath = archive_entry_pathname(entry);

	archive_entry_acl_clear(entry);

	/* Retrieve access ACL from file. */
	if (fd >= 0)
		acl = acl_get_fd(fd);
#if HAVE_ACL_GET_LINK_NP
	else if (!a->follow_symlinks)
		acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS);
#endif
	else
		acl = acl_get_file(accpath, ACL_TYPE_ACCESS);
	if (acl != NULL) {
		setup_acl_posix1e(a, entry, acl,
		    ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
		acl_free(acl);
	}

	/* Only directories can have default ACLs. */
	if (S_ISDIR(archive_entry_mode(entry))) {
		acl = acl_get_file(accpath, ACL_TYPE_DEFAULT);
		if (acl != NULL) {
			setup_acl_posix1e(a, entry, acl,
			    ARCHIVE_ENTRY_ACL_TYPE_DEFAULT);
			acl_free(acl);
		}
	}
	return (ARCHIVE_OK);
}

/*
 * Translate POSIX.1e ACL into libarchive internal structure.
 */
static void
setup_acl_posix1e(struct archive_read_disk *a,
    struct archive_entry *entry, acl_t acl, int archive_entry_acl_type)
{
	acl_tag_t	 acl_tag;
	acl_entry_t	 acl_entry;
	acl_permset_t	 acl_permset;
	int		 s, ae_id, ae_tag, ae_perm;
	const char	*ae_name;

	s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry);
	while (s == 1) {
		ae_id = -1;
		ae_name = NULL;

		acl_get_tag_type(acl_entry, &acl_tag);
		if (acl_tag == ACL_USER) {
			ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry);
			ae_name = archive_read_disk_uname(&a->archive, ae_id);
			ae_tag = ARCHIVE_ENTRY_ACL_USER;
		} else if (acl_tag == ACL_GROUP) {
			ae_id = (int)*(gid_t *)acl_get_qualifier(acl_entry);
			ae_name = archive_read_disk_gname(&a->archive, ae_id);
			ae_tag = ARCHIVE_ENTRY_ACL_GROUP;
		} else if (acl_tag == ACL_MASK) {
			ae_tag = ARCHIVE_ENTRY_ACL_MASK;
		} else if (acl_tag == ACL_USER_OBJ) {
			ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ;
		} else if (acl_tag == ACL_GROUP_OBJ) {
			ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ;
		} else if (acl_tag == ACL_OTHER) {
			ae_tag = ARCHIVE_ENTRY_ACL_OTHER;
		} else {
			/* Skip types that libarchive can't support. */
			continue;
		}

		acl_get_permset(acl_entry, &acl_permset);
		ae_perm = 0;
		/*
		 * acl_get_perm() is spelled differently on different
		 * platforms; see above.
		 */
		if (ACL_GET_PERM(acl_permset, ACL_EXECUTE))
			ae_perm |= ARCHIVE_ENTRY_ACL_EXECUTE;
		if (ACL_GET_PERM(acl_permset, ACL_READ))
			ae_perm |= ARCHIVE_ENTRY_ACL_READ;
		if (ACL_GET_PERM(acl_permset, ACL_WRITE))
			ae_perm |= ARCHIVE_ENTRY_ACL_WRITE;

		archive_entry_acl_add_entry(entry,
		    archive_entry_acl_type, ae_perm, ae_tag,
		    ae_id, ae_name);

		s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry);
	}
}
#else
static int
setup_acls_posix1e(struct archive_read_disk *a,
    struct archive_entry *entry, int fd)
{
	(void)a;      /* UNUSED */
	(void)entry;  /* UNUSED */
	(void)fd;     /* UNUSED */
	return (ARCHIVE_OK);
}
#endif

#if HAVE_LISTXATTR && HAVE_LLISTXATTR && HAVE_GETXATTR && HAVE_LGETXATTR

/*
 * Linux extended attribute support.
 *
 * TODO:  By using a stack-allocated buffer for the first
 * call to getxattr(), we might be able to avoid the second
 * call entirely.  We only need the second call if the
 * stack-allocated buffer is too small.  But a modest buffer
 * of 1024 bytes or so will often be big enough.  Same applies
 * to listxattr().
 */


static int
setup_xattr(struct archive_read_disk *a,
    struct archive_entry *entry, const char *name, int fd)
{
	ssize_t size;
	void *value = NULL;
	const char *accpath;

	(void)fd; /* UNUSED */

	accpath = archive_entry_sourcepath(entry);
	if (accpath == NULL)
		accpath = archive_entry_pathname(entry);

	if (!a->follow_symlinks)
		size = lgetxattr(accpath, name, NULL, 0);
	else
		size = getxattr(accpath, name, NULL, 0);

	if (size == -1) {
		archive_set_error(&a->archive, errno,
		    "Couldn't query extended attribute");
		return (ARCHIVE_WARN);
	}

	if (size > 0 && (value = malloc(size)) == NULL) {
		archive_set_error(&a->archive, errno, "Out of memory");
		return (ARCHIVE_FATAL);
	}

	if (!a->follow_symlinks)
		size = lgetxattr(accpath, name, value, size);
	else
		size = getxattr(accpath, name, value, size);

	if (size == -1) {
		archive_set_error(&a->archive, errno,
		    "Couldn't read extended attribute");
		return (ARCHIVE_WARN);
	}

	archive_entry_xattr_add_entry(entry, name, value, size);

	free(value);
	return (ARCHIVE_OK);
}

static int
setup_xattrs(struct archive_read_disk *a,
    struct archive_entry *entry, int fd)
{
	char *list, *p;
	const char *path;
	ssize_t list_size;


	path = archive_entry_sourcepath(entry);
	if (path == NULL)
		path = archive_entry_pathname(entry);

	if (!a->follow_symlinks)
		list_size = llistxattr(path, NULL, 0);
	else
		list_size = listxattr(path, NULL, 0);

	if (list_size == -1) {
		if (errno == ENOTSUP)
			return (ARCHIVE_OK);
		archive_set_error(&a->archive, errno,
			"Couldn't list extended attributes");
		return (ARCHIVE_WARN);
	}

	if (list_size == 0)
		return (ARCHIVE_OK);

	if ((list = malloc(list_size)) == NULL) {
		archive_set_error(&a->archive, errno, "Out of memory");
		return (ARCHIVE_FATAL);
	}

	if (!a->follow_symlinks)
		list_size = llistxattr(path, list, list_size);
	else
		list_size = listxattr(path, list, list_size);

	if (list_size == -1) {
		archive_set_error(&a->archive, errno,
			"Couldn't retrieve extended attributes");
		free(list);
		return (ARCHIVE_WARN);
	}

	for (p = list; (p - list) < list_size; p += strlen(p) + 1) {
		if (strncmp(p, "system.", 7) == 0 ||
				strncmp(p, "xfsroot.", 8) == 0)
			continue;
		setup_xattr(a, entry, p, fd);
	}

	free(list);
	return (ARCHIVE_OK);
}

#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE

/*
 * FreeBSD extattr interface.
 */

/* TODO: Implement this.  Follow the Linux model above, but
 * with FreeBSD-specific system calls, of course.  Be careful
 * to not include the system extattrs that hold ACLs; we handle
 * those separately.
 */
int
setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
    int namespace, const char *name, const char *fullname, int fd);

int
setup_xattr(struct archive_read_disk *a, struct archive_entry *entry,
    int namespace, const char *name, const char *fullname, int fd)
{
	ssize_t size;
	void *value = NULL;
	const char *accpath;

	(void)fd; /* UNUSED */

	accpath = archive_entry_sourcepath(entry);
	if (accpath == NULL)
		accpath = archive_entry_pathname(entry);

	if (!a->follow_symlinks)
		size = extattr_get_link(accpath, namespace, name, NULL, 0);
	else
		size = extattr_get_file(accpath, namespace, name, NULL, 0);

	if (size == -1) {
		archive_set_error(&a->archive, errno,
		    "Couldn't query extended attribute");
		return (ARCHIVE_WARN);
	}

	if (size > 0 && (value = malloc(size)) == NULL) {
		archive_set_error(&a->archive, errno, "Out of memory");
		return (ARCHIVE_FATAL);
	}

	if (!a->follow_symlinks)
		size = extattr_get_link(accpath, namespace, name, value, size);
	else
		size = extattr_get_file(accpath, namespace, name, value, size);

	if (size == -1) {
		archive_set_error(&a->archive, errno,
		    "Couldn't read extended attribute");
		return (ARCHIVE_WARN);
	}

	archive_entry_xattr_add_entry(entry, fullname, value, size);

	free(value);
	return (ARCHIVE_OK);
}

static int
setup_xattrs(struct archive_read_disk *a,
    struct archive_entry *entry, int fd)
{
	char buff[512];
	char *list, *p;
	ssize_t list_size;
	const char *path;
	int namespace = EXTATTR_NAMESPACE_USER;

	path = archive_entry_sourcepath(entry);
	if (path == NULL)
		path = archive_entry_pathname(entry);

	if (!a->follow_symlinks)
		list_size = extattr_list_link(path, namespace, NULL, 0);
	else
		list_size = extattr_list_file(path, namespace, NULL, 0);

	if (list_size == -1 && errno == EOPNOTSUPP)
		return (ARCHIVE_OK);
	if (list_size == -1) {
		archive_set_error(&a->archive, errno,
			"Couldn't list extended attributes");
		return (ARCHIVE_WARN);
	}

	if (list_size == 0)
		return (ARCHIVE_OK);

	if ((list = malloc(list_size)) == NULL) {
		archive_set_error(&a->archive, errno, "Out of memory");
		return (ARCHIVE_FATAL);
	}

	if (!a->follow_symlinks)
		list_size = extattr_list_link(path, namespace, list, list_size);
	else
		list_size = extattr_list_file(path, namespace, list, list_size);

	if (list_size == -1) {
		archive_set_error(&a->archive, errno,
			"Couldn't retrieve extended attributes");
		free(list);
		return (ARCHIVE_WARN);
	}

	p = list;
	while ((p - list) < list_size) {
		size_t len = 255 & (int)*p;
		char *name;

		strcpy(buff, "user.");
		name = buff + strlen(buff);
		memcpy(name, p + 1, len);
		name[len] = '\0';
		setup_xattr(a, entry, namespace, name, buff, fd);
		p += 1 + len;
	}

	free(list);
	return (ARCHIVE_OK);
}

#else

/*
 * Generic (stub) extended attribute support.
 */
static int
setup_xattrs(struct archive_read_disk *a,
    struct archive_entry *entry, int fd)
{
	(void)a;     /* UNUSED */
	(void)entry; /* UNUSED */
	(void)fd;    /* UNUSED */
	return (ARCHIVE_OK);
}

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD: head/lib/libarchive/archive_read_disk_private.h 201105 2009-12-28 03:20:54Z kientzle $
 */

#ifndef __LIBARCHIVE_BUILD
#error This header is only to be used internally to libarchive.
#endif

#ifndef ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED
#define ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED

struct archive_read_disk {
	struct archive	archive;

	/*
	 * Symlink mode is one of 'L'ogical, 'P'hysical, or 'H'ybrid,
	 * following an old BSD convention.  'L' follows all symlinks,
	 * 'P' follows none, 'H' follows symlinks only for the first
	 * item.
	 */
	char	symlink_mode;

	/*
	 * Since symlink interaction changes, we need to track whether
	 * we're following symlinks for the current item.  'L' mode above
	 * sets this true, 'P' sets it false, 'H' changes it as we traverse.
	 */
	char	follow_symlinks;  /* Either 'L' or 'P'. */

	const char * (*lookup_gname)(void *private, gid_t gid);
	void	(*cleanup_gname)(void *private);
	void	 *lookup_gname_data;
	const char * (*lookup_uname)(void *private, gid_t gid);
	void	(*cleanup_uname)(void *private);
	void	 *lookup_uname_data;
};

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_set_standard_lookup.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_set_standard_lookup.c 201109 2009-12-28 03:30:31Z kientzle $");

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_GRP_H
#include <grp.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "archive.h"

#if defined(_WIN32) && !defined(__CYGWIN__)
int
archive_read_disk_set_standard_lookup(struct archive *a)
{
	archive_set_error(a, -1, "Standard lookups not available on Windows");
	return (ARCHIVE_FATAL);
}
#else /* ! (_WIN32 && !__CYGWIN__) */
#define	name_cache_size 127

static const char * const NO_NAME = "(noname)";

struct name_cache {
	struct archive *archive;
	char   *buff;
	size_t  buff_size;
	int	probes;
	int	hits;
	size_t	size;
	struct {
		id_t id;
		const char *name;
	} cache[name_cache_size];
};

static const char *	lookup_gname(void *, gid_t);
static const char *	lookup_uname(void *, uid_t);
static void	cleanup(void *);
static const char *	lookup_gname_helper(struct name_cache *, id_t gid);
static const char *	lookup_uname_helper(struct name_cache *, id_t uid);

/*
 * Installs functions that use getpwuid()/getgrgid()---along with
 * a simple cache to accelerate such lookups---into the archive_read_disk
 * object.  This is in a separate file because getpwuid()/getgrgid()
 * can pull in a LOT of library code (including NIS/LDAP functions, which
 * pull in DNS resolveers, etc).  This can easily top 500kB, which makes
 * it inappropriate for some space-constrained applications.
 *
 * Applications that are size-sensitive may want to just use the
 * real default functions (defined in archive_read_disk.c) that just
 * use the uid/gid without the lookup.  Or define your own custom functions
 * if you prefer.
 */
int
archive_read_disk_set_standard_lookup(struct archive *a)
{
	struct name_cache *ucache = malloc(sizeof(struct name_cache));
	struct name_cache *gcache = malloc(sizeof(struct name_cache));

	if (ucache == NULL || gcache == NULL) {
		archive_set_error(a, ENOMEM,
		    "Can't allocate uname/gname lookup cache");
		free(ucache);
		free(gcache);
		return (ARCHIVE_FATAL);
	}

	memset(ucache, 0, sizeof(*ucache));
	ucache->archive = a;
	ucache->size = name_cache_size;
	memset(gcache, 0, sizeof(*gcache));
	gcache->archive = a;
	gcache->size = name_cache_size;

	archive_read_disk_set_gname_lookup(a, gcache, lookup_gname, cleanup);
	archive_read_disk_set_uname_lookup(a, ucache, lookup_uname, cleanup);

	return (ARCHIVE_OK);
}

static void
cleanup(void *data)
{
	struct name_cache *cache = (struct name_cache *)data;
	size_t i;

	if (cache != NULL) {
		for (i = 0; i < cache->size; i++) {
			if (cache->cache[i].name != NULL &&
			    cache->cache[i].name != NO_NAME)
				free((void *)(uintptr_t)cache->cache[i].name);
		}
		free(cache->buff);
		free(cache);
	}
}

/*
 * Lookup uid/gid from uname/gname, return NULL if no match.
 */
static const char *
lookup_name(struct name_cache *cache,
    const char * (*lookup_fn)(struct name_cache *, id_t), id_t id)
{
	const char *name;
	int slot;


	cache->probes++;

	slot = id % cache->size;
	if (cache->cache[slot].name != NULL) {
		if (cache->cache[slot].id == id) {
			cache->hits++;
			if (cache->cache[slot].name == NO_NAME)
				return (NULL);
			return (cache->cache[slot].name);
		}
		if (cache->cache[slot].name != NO_NAME)
			free((void *)(uintptr_t)cache->cache[slot].name);
		cache->cache[slot].name = NULL;
	}

	name = (lookup_fn)(cache, id);
	if (name == NULL) {
		/* Cache and return the negative response. */
		cache->cache[slot].name = NO_NAME;
		cache->cache[slot].id = id;
		return (NULL);
	}

	cache->cache[slot].name = name;
	cache->cache[slot].id = id;
	return (cache->cache[slot].name);
}

static const char *
lookup_uname(void *data, uid_t uid)
{
	struct name_cache *uname_cache = (struct name_cache *)data;
	return (lookup_name(uname_cache,
		    &lookup_uname_helper, (id_t)uid));
}

static const char *
lookup_uname_helper(struct name_cache *cache, id_t id)
{
	struct passwd	pwent, *result;
	int r;

	if (cache->buff_size == 0) {
		cache->buff_size = 256;
		cache->buff = malloc(cache->buff_size);
	}
	if (cache->buff == NULL)
		return (NULL);
	for (;;) {
		result = &pwent; /* Old getpwuid_r ignores last arg. */
		r = getpwuid_r((uid_t)id, &pwent,
			       cache->buff, cache->buff_size, &result);
		if (r == 0)
			break;
		if (r != ERANGE)
			break;
		/* ERANGE means our buffer was too small, but POSIX
		 * doesn't tell us how big the buffer should be, so
		 * we just double it and try again.  Because the buffer
		 * is kept around in the cache object, we shouldn't
		 * have to do this very often. */
		cache->buff_size *= 2;
		cache->buff = realloc(cache->buff, cache->buff_size);
		if (cache->buff == NULL)
			break;
	}
	if (r != 0) {
		archive_set_error(cache->archive, errno,
		    "Can't lookup user for id %d", (int)id);
		return (NULL);
	}
	if (result == NULL)
		return (NULL);

	return strdup(result->pw_name);
}

static const char *
lookup_gname(void *data, gid_t gid)
{
	struct name_cache *gname_cache = (struct name_cache *)data;
	return (lookup_name(gname_cache,
		    &lookup_gname_helper, (id_t)gid));
}

static const char *
lookup_gname_helper(struct name_cache *cache, id_t id)
{
	struct group	grent, *result;
	int r;

	if (cache->buff_size == 0) {
		cache->buff_size = 256;
		cache->buff = malloc(cache->buff_size);
	}
	if (cache->buff == NULL)
		return (NULL);
	for (;;) {
		result = &grent; /* Old getgrgid_r ignores last arg. */
		r = getgrgid_r((gid_t)id, &grent,
			       cache->buff, cache->buff_size, &result);
		if (r == 0)
			break;
		if (r != ERANGE)
			break;
		/* ERANGE means our buffer was too small, but POSIX
		 * doesn't tell us how big the buffer should be, so
		 * we just double it and try again. */
		cache->buff_size *= 2;
		cache->buff = realloc(cache->buff, cache->buff_size);
		if (cache->buff == NULL)
			break;
	}
	if (r != 0) {
		archive_set_error(cache->archive, errno,
		    "Can't lookup group for id %d", (int)id);
		return (NULL);
	}
	if (result == NULL)
		return (NULL);

	return strdup(result->gr_name);
}
#endif /* ! (_WIN32 && !__CYGWIN__) */

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_extract.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_memory.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_private.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_all.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_bzip2.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_gzip.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_compress.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_none.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_program.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_rpm.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#include "archive.h"
#include "archive_endian.h"
#include "archive_private.h"
#include "archive_read_private.h"

struct rpm {
	int64_t		 total_in;
	size_t		 hpos;
	size_t		 hlen;
	unsigned char	 header[16];
	enum {
		ST_LEAD,	/* Skipping 'Lead' section. */
		ST_HEADER,	/* Reading 'Header' section;
				 * first 16 bytes. */
		ST_HEADER_DATA,	/* Skipping 'Header' section. */
		ST_PADDING,	/* Skipping padding data after the
				 * 'Header' section. */
		ST_ARCHIVE	/* Reading 'Archive' section. */
	}		 state;
	int		 first_header;
};
#define RPM_LEAD_SIZE	96	/* Size of 'Lead' section. */

static int	rpm_bidder_bid(struct archive_read_filter_bidder *,
		    struct archive_read_filter *);
static int	rpm_bidder_init(struct archive_read_filter *);

static ssize_t	rpm_filter_read(struct archive_read_filter *,
		    const void **);
static int	rpm_filter_close(struct archive_read_filter *);

int
archive_read_support_compression_rpm(struct archive *_a)
{
	struct archive_read *a = (struct archive_read *)_a;
	struct archive_read_filter_bidder *bidder;

	bidder = __archive_read_get_bidder(a);
	archive_clear_error(_a);
	if (bidder == NULL)
		return (ARCHIVE_FATAL);

	bidder->data = NULL;
	bidder->bid = rpm_bidder_bid;
	bidder->init = rpm_bidder_init;
	bidder->options = NULL;
	bidder->free = NULL;
	return (ARCHIVE_OK);
}

static int
rpm_bidder_bid(struct archive_read_filter_bidder *self,
    struct archive_read_filter *filter)
{
	const unsigned char *b;
	ssize_t avail;
	int bits_checked;

	(void)self; /* UNUSED */

	b = __archive_read_filter_ahead(filter, 8, &avail);
	if (b == NULL)
		return (0);

	bits_checked = 0;
	/*
	 * Verify Header Magic Bytes : 0xed 0xab 0xee 0xdb
	 */
	if (b[0] != 0xed)
		return (0);
	bits_checked += 8;
	if (b[1] != 0xab)
		return (0);
	bits_checked += 8;
	if (b[2] != 0xee)
		return (0);
	bits_checked += 8;
	if (b[3] != 0xdb)
		return (0);
	bits_checked += 8;
	/*
	 * Check major version.
	 */
	if (b[4] != 3 && b[4] != 4)
		return (0);
	bits_checked += 8;
	/*
	 * Check package type; binary or source.
	 */
	if (b[6] != 0)
		return (0);
	bits_checked += 8;
	if (b[7] != 0 && b[7] != 1)
		return (0);
	bits_checked += 8;

	return (bits_checked);
}

static int
rpm_bidder_init(struct archive_read_filter *self)
{
	struct rpm   *rpm;

	self->code = ARCHIVE_COMPRESSION_RPM;
	self->name = "rpm";
	self->read = rpm_filter_read;
	self->skip = NULL; /* not supported */
	self->close = rpm_filter_close;

	rpm = (struct rpm *)calloc(sizeof(*rpm), 1);
	if (rpm == NULL) {
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Can't allocate data for rpm");
		return (ARCHIVE_FATAL);
	}

	self->data = rpm;
	rpm->state = ST_LEAD;

	return (ARCHIVE_OK);
}

static ssize_t
rpm_filter_read(struct archive_read_filter *self, const void **buff)
{
	struct rpm *rpm;
	const unsigned char *b;
	ssize_t avail_in, total;
	size_t used, n;
	uint32_t section;
	uint32_t bytes;

	rpm = (struct rpm *)self->data;
	*buff = NULL;
	total = avail_in = 0;
	b = NULL;
	used = 0;
	do {
		if (b == NULL) {
			b = __archive_read_filter_ahead(self->upstream, 1,
			    &avail_in);
			if (b == NULL) {
				if (avail_in < 0)
					return (ARCHIVE_FATAL);
				else
					break;
			}
		}

		switch (rpm->state) {
		case ST_LEAD:
			if (rpm->total_in + avail_in < RPM_LEAD_SIZE)
				used += avail_in;
			else {
				n = RPM_LEAD_SIZE - rpm->total_in;
				used += n;
				b += n;
				rpm->state = ST_HEADER;
				rpm->hpos = 0;
				rpm->hlen = 0;
				rpm->first_header = 1;
			}
			break;
		case ST_HEADER:
			n = 16 - rpm->hpos;
			if (n > avail_in - used)
				n = avail_in - used;
			memcpy(rpm->header+rpm->hpos, b, n);
			b += n;
			used += n;
			rpm->hpos += n;

			if (rpm->hpos == 16) {
				if (rpm->header[0] != 0x8e ||
				    rpm->header[1] != 0xad ||
				    rpm->header[2] != 0xe8 ||
				    rpm->header[3] != 0x01) {
					if (rpm->first_header) {
						archive_set_error(
						    &self->archive->archive,
						    ARCHIVE_ERRNO_FILE_FORMAT,
						    "Unrecoginized rpm header");
						return (ARCHIVE_FATAL);
					}
					rpm->state = ST_ARCHIVE;
					*buff = rpm->header;
					total = rpm->hpos;
					break;
				}
				/* Calculate 'Header' length. */
				section = archive_be32dec(rpm->header+8);
				bytes = archive_be32dec(rpm->header+12);
				rpm->hlen = 16 + section * 16 + bytes;
				rpm->state = ST_HEADER_DATA;
				rpm->first_header = 0;
			}
			break;
		case ST_HEADER_DATA:
			n = rpm->hlen - rpm->hpos;
			if (n > avail_in - used)
				n = avail_in - used;
			b += n;
			used += n;
			rpm->hpos += n;
			if (rpm->hpos == rpm->hlen)
				rpm->state = ST_PADDING;
			break;
		case ST_PADDING:
			while (used < (size_t)avail_in) {
				if (*b != 0) {
					/* Read next header. */
					rpm->state = ST_HEADER;
					rpm->hpos = 0;
					rpm->hlen = 0;
					break;
				}
				b++;
				used++;
			}
			break;
		case ST_ARCHIVE:
			*buff = b;
			total = avail_in;
			used = avail_in;
			break;
		}
		if (used == (size_t)avail_in) {
			rpm->total_in += used;
			__archive_read_filter_consume(self->upstream, used);
			b = NULL;
			used = 0;
		}
	} while (total == 0 && avail_in > 0);

	if (used > 0 && b != NULL) {
		rpm->total_in += used;
		__archive_read_filter_consume(self->upstream, used);
	}
	return (total);
}

static int
rpm_filter_close(struct archive_read_filter *self)
{
	struct rpm *rpm;

	rpm = (struct rpm *)self->data;
	free(rpm);

	return (ARCHIVE_OK);
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_uu.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_uu.c 201248 2009-12-30 06:12:03Z kientzle $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "archive.h"
#include "archive_private.h"
#include "archive_read_private.h"

struct uudecode {
	int64_t		 total;
	unsigned char	*in_buff;
#define IN_BUFF_SIZE	(1024)
	int		 in_cnt;
	size_t		 in_allocated;
	unsigned char	*out_buff;
#define OUT_BUFF_SIZE	(64 * 1024)
	int		 state;
#define ST_FIND_HEAD	0
#define ST_READ_UU	1
#define ST_UUEND	2
#define ST_READ_BASE64	3
};

static int	uudecode_bidder_bid(struct archive_read_filter_bidder *,
		    struct archive_read_filter *filter);
static int	uudecode_bidder_init(struct archive_read_filter *);

static ssize_t	uudecode_filter_read(struct archive_read_filter *,
		    const void **);
static int	uudecode_filter_close(struct archive_read_filter *);

int
archive_read_support_compression_uu(struct archive *_a)
{
	struct archive_read *a = (struct archive_read *)_a;
	struct archive_read_filter_bidder *bidder;

	bidder = __archive_read_get_bidder(a);
	archive_clear_error(_a);
	if (bidder == NULL)
		return (ARCHIVE_FATAL);

	bidder->data = NULL;
	bidder->bid = uudecode_bidder_bid;
	bidder->init = uudecode_bidder_init;
	bidder->options = NULL;
	bidder->free = NULL;
	return (ARCHIVE_OK);
}

static const unsigned char ascii[256] = {
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\n', 0, 0, '\r', 0, 0, /* 00 - 0F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, /* 70 - 7F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
};

static const unsigned char uuchar[256] = {
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 20 - 2F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 - 3F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 - 5F */
	1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70 - 7F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
};

static const unsigned char base64[256] = {
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 - 0F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 - 1F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, /* 20 - 2F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, /* 30 - 3F */
	0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 - 4F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 50 - 5F */
	0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 - 6F */
	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 - 7F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9F */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A0 - AF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B0 - BF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C0 - CF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D0 - DF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E0 - EF */
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* F0 - FF */
};

static const int base64num[128] = {
	 0,  0,  0,  0,  0,  0,  0,  0,
	 0,  0,  0,  0,  0,  0,  0,  0, /* 00 - 0F */
	 0,  0,  0,  0,  0,  0,  0,  0,
	 0,  0,  0,  0,  0,  0,  0,  0, /* 10 - 1F */
	 0,  0,  0,  0,  0,  0,  0,  0,
	 0,  0,  0, 62,  0,  0,  0, 63, /* 20 - 2F */
	52, 53, 54, 55, 56, 57, 58, 59,
	60, 61,  0,  0,  0,  0,  0,  0, /* 30 - 3F */
	 0,  0,  1,  2,  3,  4,  5,  6,
	 7,  8,  9, 10, 11, 12, 13, 14, /* 40 - 4F */
	15, 16, 17, 18, 19, 20, 21, 22,
	23, 24, 25,  0,  0,  0,  0,  0, /* 50 - 5F */
	 0, 26, 27, 28, 29, 30, 31, 32,
	33, 34, 35, 36, 37, 38, 39, 40, /* 60 - 6F */
	41, 42, 43, 44, 45, 46, 47, 48,
	49, 50, 51,  0,  0,  0,  0,  0, /* 70 - 7F */
};

static ssize_t
get_line(const unsigned char *b, ssize_t avail, ssize_t *nlsize)
{
	ssize_t len;

	len = 0;
	while (len < avail) {
		switch (ascii[*b]) {
		case 0:	/* Non-ascii character or control character. */
			if (nlsize != NULL)
				*nlsize = 0;
			return (-1);
		case '\r':
			if (avail-len > 1 && b[1] == '\n') {
				if (nlsize != NULL)
					*nlsize = 2;
				return (len+2);
			}
			/* FALL THROUGH */
		case '\n':
			if (nlsize != NULL)
				*nlsize = 1;
			return (len+1);
		case 1:
			b++;
			len++;
			break;
		}
	}
	if (nlsize != NULL)
		*nlsize = 0;
	return (avail);
}

static ssize_t
bid_get_line(struct archive_read_filter *filter,
    const unsigned char **b, ssize_t *avail, ssize_t *ravail, ssize_t *nl)
{
	ssize_t len;
	int quit;
	
	quit = 0;
	if (*avail == 0) {
		*nl = 0;
		len = 0;
	} else
		len = get_line(*b, *avail, nl);
	/*
	 * Read bytes more while it does not reach the end of line.
	 */
	while (*nl == 0 && len == *avail && !quit) {
		ssize_t diff = *ravail - *avail;

		*b = __archive_read_filter_ahead(filter, 160 + *ravail, avail);
		if (*b == NULL) {
			if (*ravail >= *avail)
				return (0);
			/* Reading bytes reaches the end of file. */
			*b = __archive_read_filter_ahead(filter, *avail, avail);
			quit = 1;
		}
		*ravail = *avail;
		*b += diff;
		*avail -= diff;
		len = get_line(*b, *avail, nl);
	}
	return (len);
}

#define UUDECODE(c) (((c) - 0x20) & 0x3f)

static int
uudecode_bidder_bid(struct archive_read_filter_bidder *self,
    struct archive_read_filter *filter)
{
	const unsigned char *b;
	ssize_t avail, ravail;
	ssize_t len, nl;
	int l;
	int firstline;

	(void)self; /* UNUSED */

	b = __archive_read_filter_ahead(filter, 1, &avail);
	if (b == NULL)
		return (0);

	firstline = 20;
	ravail = avail;
	for (;;) {
		len = bid_get_line(filter, &b, &avail, &ravail, &nl);
		if (len < 0 || nl == 0)
			return (0);/* Binary data. */
		if (memcmp(b, "begin ", 6) == 0 && len - nl >= 11)
			l = 6;
		else if (memcmp(b, "begin-base64 ", 13) == 0 && len - nl >= 18)
			l = 13;
		else
			l = 0;

		if (l > 0 && (b[l] < '0' || b[l] > '7' ||
		    b[l+1] < '0' || b[l+1] > '7' ||
		    b[l+2] < '0' || b[l+2] > '7' || b[l+3] != ' '))
			l = 0;

		b += len;
		avail -= len;
		if (l)
			break;
		firstline = 0;
	}
	if (!avail)
		return (0);
	len = bid_get_line(filter, &b, &avail, &ravail, &nl);
	if (len < 0 || nl == 0)
		return (0);/* There are non-ascii characters. */
	avail -= len;

	if (l == 6) {
		if (!uuchar[*b])
			return (0);
		/* Get a length of decoded bytes. */
		l = UUDECODE(*b++); len--;
		if (l > 45)
			/* Normally, maximum length is 45(character 'M'). */
			return (0);
		while (l && len-nl > 0) {
			if (l > 0) {
				if (!uuchar[*b++])
					return (0);
				if (!uuchar[*b++])
					return (0);
				len -= 2;
				--l;
			}
			if (l > 0) {
				if (!uuchar[*b++])
					return (0);
				--len;
				--l;
			}
			if (l > 0) {
				if (!uuchar[*b++])
					return (0);
				--len;
				--l;
			}
		}
		if (len-nl < 0)
			return (0);
		if (len-nl == 1 &&
		    (uuchar[*b] ||		 /* Check sum. */
		     (*b >= 'a' && *b <= 'z'))) {/* Padding data(MINIX). */
			++b;
			--len;
		}
		b += nl;
		if (avail && uuchar[*b])
			return (firstline+30);
	}
	if (l == 13) {
		while (len-nl > 0) {
			if (!base64[*b++])
				return (0);
			--len;
		}
		b += nl;

		if (avail >= 5 && memcmp(b, "====\n", 5) == 0)
			return (firstline+40);
		if (avail >= 6 && memcmp(b, "====\r\n", 6) == 0)
			return (firstline+40);
		if (avail > 0 && base64[*b])
			return (firstline+30);
	}

	return (0);
}

static int
uudecode_bidder_init(struct archive_read_filter *self)
{
	struct uudecode   *uudecode;
	void *out_buff;
	void *in_buff;

	self->code = ARCHIVE_COMPRESSION_UU;
	self->name = "uu";
	self->read = uudecode_filter_read;
	self->skip = NULL; /* not supported */
	self->close = uudecode_filter_close;

	uudecode = (struct uudecode *)calloc(sizeof(*uudecode), 1);
	out_buff = malloc(OUT_BUFF_SIZE);
	in_buff = malloc(IN_BUFF_SIZE);
	if (uudecode == NULL || out_buff == NULL || in_buff == NULL) {
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Can't allocate data for uudecode");
		free(uudecode);
		free(out_buff);
		free(in_buff);
		return (ARCHIVE_FATAL);
	}

	self->data = uudecode;
	uudecode->in_buff = in_buff;
	uudecode->in_cnt = 0;
	uudecode->in_allocated = IN_BUFF_SIZE;
	uudecode->out_buff = out_buff;
	uudecode->state = ST_FIND_HEAD;

	return (ARCHIVE_OK);
}

static int
ensure_in_buff_size(struct archive_read_filter *self,
    struct uudecode *uudecode, size_t size)
{

	if (size > uudecode->in_allocated) {
		unsigned char *ptr;
		size_t newsize;

		newsize = uudecode->in_allocated << 1;
		ptr = malloc(newsize);
		if (ptr == NULL ||
		    newsize < uudecode->in_allocated) {
			free(ptr);
			archive_set_error(&self->archive->archive,
			    ENOMEM,
    			    "Can't allocate data for uudecode");
			return (ARCHIVE_FATAL);
		}
		if (uudecode->in_cnt)
			memmove(ptr, uudecode->in_buff,
			    uudecode->in_cnt);
		free(uudecode->in_buff);
		uudecode->in_buff = ptr;
		uudecode->in_allocated = newsize;
	}
	return (ARCHIVE_OK);
}

static ssize_t
uudecode_filter_read(struct archive_read_filter *self, const void **buff)
{
	struct uudecode *uudecode;
	const unsigned char *b, *d;
	unsigned char *out;
	ssize_t avail_in, ravail;
	ssize_t used;
	ssize_t total;
	ssize_t len, llen, nl;

	uudecode = (struct uudecode *)self->data;

read_more:
	d = __archive_read_filter_ahead(self->upstream, 1, &avail_in);
	if (d == NULL && avail_in < 0)
		return (ARCHIVE_FATAL);
	/* Quiet a code analyzer; make sure avail_in must be zero
	 * when d is NULL. */
	if (d == NULL)
		avail_in = 0;
	used = 0;
	total = 0;
	out = uudecode->out_buff;
	ravail = avail_in;
	if (uudecode->in_cnt) {
		/*
		 * If there is remaining data which is saved by
		 * previous calling, use it first.
		 */
		if (ensure_in_buff_size(self, uudecode,
		    avail_in + uudecode->in_cnt) != ARCHIVE_OK)
			return (ARCHIVE_FATAL);
		memcpy(uudecode->in_buff + uudecode->in_cnt,
		    d, avail_in);
		d = uudecode->in_buff;
		avail_in += uudecode->in_cnt;
		uudecode->in_cnt = 0;
	}
	for (;used < avail_in; d += llen, used += llen) {
		int l, body;

		b = d;
		len = get_line(b, avail_in - used, &nl);
		if (len < 0) {
			/* Non-ascii character is found. */
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Insufficient compressed data");
			return (ARCHIVE_FATAL);
		}
		llen = len;
		if (nl == 0) {
			/*
			 * Save remaining data which does not contain
			 * NL('\n','\r').
			 */
			if (ensure_in_buff_size(self, uudecode, len)
			    != ARCHIVE_OK)
				return (ARCHIVE_FATAL);
			if (uudecode->in_buff != b)
				memmove(uudecode->in_buff, b, len);
			uudecode->in_cnt = len;
			if (total == 0) {
				/* Do not return 0; it means end-of-file.
				 * We should try to read bytes more. */
				__archive_read_filter_consume(
				    self->upstream, ravail);
				goto read_more;
			}
			break;
		}
		if (total + len * 2 > OUT_BUFF_SIZE)
			break;
		switch (uudecode->state) {
		default:
		case ST_FIND_HEAD:
			if (len - nl > 13 && memcmp(b, "begin ", 6) == 0)
				l = 6;
			else if (len - nl > 18 &&
			    memcmp(b, "begin-base64 ", 13) == 0)
				l = 13;
			else
				l = 0;
			if (l != 0 && b[l] >= '0' && b[l] <= '7' &&
			    b[l+1] >= '0' && b[l+1] <= '7' &&
			    b[l+2] >= '0' && b[l+2] <= '7' && b[l+3] == ' ') {
				if (l == 6)
					uudecode->state = ST_READ_UU;
				else
					uudecode->state = ST_READ_BASE64;
			}
			break;
		case ST_READ_UU:
			body = len - nl;
			if (!uuchar[*b] || body <= 0) {
				archive_set_error(&self->archive->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Insufficient compressed data");
				return (ARCHIVE_FATAL);
			}
			/* Get length of undecoded bytes of curent line. */
			l = UUDECODE(*b++);
			body--;
			if (l > body) {
				archive_set_error(&self->archive->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Insufficient compressed data");
				return (ARCHIVE_FATAL);
			}
			if (l == 0) {
				uudecode->state = ST_UUEND;
				break;
			}
			while (l > 0) {
				int n = 0;

				if (l > 0) {
					if (!uuchar[b[0]] || !uuchar[b[1]])
						break;
					n = UUDECODE(*b++) << 18;
					n |= UUDECODE(*b++) << 12;
					*out++ = n >> 16; total++;
					--l;
				}
				if (l > 0) {
					if (!uuchar[b[0]])
						break;
					n |= UUDECODE(*b++) << 6;
					*out++ = (n >> 8) & 0xFF; total++;
					--l;
				}
				if (l > 0) {
					if (!uuchar[b[0]])
						break;
					n |= UUDECODE(*b++);
					*out++ = n & 0xFF; total++;
					--l;
				}
			}
			if (l) {
				archive_set_error(&self->archive->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Insufficient compressed data");
				return (ARCHIVE_FATAL);
			}
			break;
		case ST_UUEND:
			if (len - nl == 3 && memcmp(b, "end ", 3) == 0)
				uudecode->state = ST_FIND_HEAD;
			else {
				archive_set_error(&self->archive->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Insufficient compressed data");
				return (ARCHIVE_FATAL);
			}
			break;
		case ST_READ_BASE64:
			l = len - nl;
			if (l >= 3 && b[0] == '=' && b[1] == '=' &&
			    b[2] == '=') {
				uudecode->state = ST_FIND_HEAD;
				break;
			}
			while (l > 0) {
				int n = 0;

				if (l > 0) {
					if (!base64[b[0]] || !base64[b[1]])
						break;
					n = base64num[*b++] << 18;
					n |= base64num[*b++] << 12;
					*out++ = n >> 16; total++;
					l -= 2;
				}
				if (l > 0) {
					if (*b == '=')
						break;
					if (!base64[*b])
						break;
					n |= base64num[*b++] << 6;
					*out++ = (n >> 8) & 0xFF; total++;
					--l;
				}
				if (l > 0) {
					if (*b == '=')
						break;
					if (!base64[*b])
						break;
					n |= base64num[*b++];
					*out++ = n & 0xFF; total++;
					--l;
				}
			}
			if (l && *b != '=') {
				archive_set_error(&self->archive->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Insufficient compressed data");
				return (ARCHIVE_FATAL);
			}
			break;
		}
	}

	__archive_read_filter_consume(self->upstream, ravail);

	*buff = uudecode->out_buff;
	uudecode->total += total;
	return (total);
}

static int
uudecode_filter_close(struct archive_read_filter *self)
{
	struct uudecode *uudecode;

	uudecode = (struct uudecode *)self->data;
	free(uudecode->in_buff);
	free(uudecode->out_buff);
	free(uudecode);

	return (ARCHIVE_OK);
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_read_support_compression_xz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2008 Tim Kientzle and Miklos Vajna
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"

__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_xz.c 201167 2009-12-29 06:06:20Z kientzle $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_LZMA_H
#include <lzma.h>
#elif HAVE_LZMADEC_H
#include <lzmadec.h>
#endif

#include "archive.h"
#include "archive_endian.h"
#include "archive_private.h"
#include "archive_read_private.h"

#if HAVE_LZMA_H && HAVE_LIBLZMA

struct private_data {
	lzma_stream	 stream;
	unsigned char	*out_block;
	size_t		 out_block_size;
	int64_t		 total_out;
	char		 eof; /* True = found end of compressed data. */
};

/* Combined lzma/xz filter */
static ssize_t	xz_filter_read(struct archive_read_filter *, const void **);
static int	xz_filter_close(struct archive_read_filter *);
static int	xz_lzma_bidder_init(struct archive_read_filter *);

#elif HAVE_LZMADEC_H && HAVE_LIBLZMADEC

struct private_data {
	lzmadec_stream	 stream;
	unsigned char	*out_block;
	size_t		 out_block_size;
	int64_t		 total_out;
	char		 eof; /* True = found end of compressed data. */
};

/* Lzma-only filter */
static ssize_t	lzma_filter_read(struct archive_read_filter *, const void **);
static int	lzma_filter_close(struct archive_read_filter *);
#endif

/*
 * Note that we can detect xz and lzma compressed files even if we
 * can't decompress them.  (In fact, we like detecting them because we
 * can give better error messages.)  So the bid framework here gets
 * compiled even if no lzma library is available.
 */
static int	xz_bidder_bid(struct archive_read_filter_bidder *,
		    struct archive_read_filter *);
static int	xz_bidder_init(struct archive_read_filter *);
static int	lzma_bidder_bid(struct archive_read_filter_bidder *,
		    struct archive_read_filter *);
static int	lzma_bidder_init(struct archive_read_filter *);

int
archive_read_support_compression_xz(struct archive *_a)
{
	struct archive_read *a = (struct archive_read *)_a;
	struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a);

	archive_clear_error(_a);
	if (bidder == NULL)
		return (ARCHIVE_FATAL);

	bidder->data = NULL;
	bidder->bid = xz_bidder_bid;
	bidder->init = xz_bidder_init;
	bidder->options = NULL;
	bidder->free = NULL;
#if HAVE_LZMA_H && HAVE_LIBLZMA
	return (ARCHIVE_OK);
#else
	archive_set_error(_a, ARCHIVE_ERRNO_MISC,
	    "Using external unxz program for xz decompression");
	return (ARCHIVE_WARN);
#endif
}

int
archive_read_support_compression_lzma(struct archive *_a)
{
	struct archive_read *a = (struct archive_read *)_a;
	struct archive_read_filter_bidder *bidder = __archive_read_get_bidder(a);

	archive_clear_error(_a);
	if (bidder == NULL)
		return (ARCHIVE_FATAL);

	bidder->data = NULL;
	bidder->bid = lzma_bidder_bid;
	bidder->init = lzma_bidder_init;
	bidder->options = NULL;
	bidder->free = NULL;
#if HAVE_LZMA_H && HAVE_LIBLZMA
	return (ARCHIVE_OK);
#elif HAVE_LZMADEC_H && HAVE_LIBLZMADEC
	return (ARCHIVE_OK);
#else
	archive_set_error(_a, ARCHIVE_ERRNO_MISC,
	    "Using external unlzma program for lzma decompression");
	return (ARCHIVE_WARN);
#endif
}

/*
 * Test whether we can handle this data.
 */
static int
xz_bidder_bid(struct archive_read_filter_bidder *self,
    struct archive_read_filter *filter)
{
	const unsigned char *buffer;
	ssize_t avail;
	int bits_checked;

	(void)self; /* UNUSED */

	buffer = __archive_read_filter_ahead(filter, 6, &avail);
	if (buffer == NULL)
		return (0);

	/*
	 * Verify Header Magic Bytes : FD 37 7A 58 5A 00
	 */
	bits_checked = 0;
	if (buffer[0] != 0xFD)
		return (0);
	bits_checked += 8;
	if (buffer[1] != 0x37)
		return (0);
	bits_checked += 8;
	if (buffer[2] != 0x7A)
		return (0);
	bits_checked += 8;
	if (buffer[3] != 0x58)
		return (0);
	bits_checked += 8;
	if (buffer[4] != 0x5A)
		return (0);
	bits_checked += 8;
	if (buffer[5] != 0x00)
		return (0);
	bits_checked += 8;

	return (bits_checked);
}

/*
 * Test whether we can handle this data.
 *
 * <sigh> LZMA has a rather poor file signature.  Zeros do not
 * make good signature bytes as a rule, and the only non-zero byte
 * here is an ASCII character.  For example, an uncompressed tar
 * archive whose first file is ']' would satisfy this check.  It may
 * be necessary to exclude LZMA from compression_all() because of
 * this.  Clients of libarchive would then have to explicitly enable
 * LZMA checking instead of (or in addition to) compression_all() when
 * they have other evidence (file name, command-line option) to go on.
 */
static int
lzma_bidder_bid(struct archive_read_filter_bidder *self,
    struct archive_read_filter *filter)
{
	const unsigned char *buffer;
	ssize_t avail;
	uint32_t dicsize;
	uint64_t uncompressed_size;
	int bits_checked;

	(void)self; /* UNUSED */

	buffer = __archive_read_filter_ahead(filter, 14, &avail);
	if (buffer == NULL)
		return (0);

	/* First byte of raw LZMA stream is commonly 0x5d.
	 * The first byte is a special number, which consists of
	 * three parameters of LZMA compression, a number of literal
	 * context bits(which is from 0 to 8, default is 3), a number
	 * of literal pos bits(which is from 0 to 4, default is 0),
	 * a number of pos bits(which is from 0 to 4, default is 2).
	 * The first byte is made by
	 * (pos bits * 5 + literal pos bit) * 9 + * literal contest bit,
	 * and so the default value in this field is
	 * (2 * 5 + 0) * 9 + 3 = 0x5d.
	 * lzma of LZMA SDK has options to change those parameters.
	 * It means a range of this field is from 0 to 224. And lzma of
	 * XZ Utils with option -e records 0x5e in this field. */
	/* NOTE: If this checking of the first byte increases false
	 * recognition, we should allow only 0x5d and 0x5e for the first
	 * byte of LZMA stream. */
	bits_checked = 0;
	if (buffer[0] > (4 * 5 + 4) * 9 + 8)
		return (0);
	/* Most likely value in the first byte of LZMA stream. */
	if (buffer[0] == 0x5d || buffer[0] == 0x5e)
		bits_checked += 8;

	/* Sixth through fourteenth bytes are uncompressed size,
	 * stored in little-endian order. `-1' means uncompressed
	 * size is unknown and lzma of XZ Utils always records `-1'
	 * in this field. */
	uncompressed_size = archive_le64dec(buffer+5);
	if (uncompressed_size == (uint64_t)ARCHIVE_LITERAL_LL(-1))
		bits_checked += 64;

	/* Second through fifth bytes are dictionary size, stored in
	 * little-endian order. The minimum dictionary size is
	 * 1 << 12(4KiB) which the lzma of LZMA SDK uses with option
	 * -d12 and the maxinam dictionary size is 1 << 27(128MiB)
	 * which the one uses with option -d27.
	 * NOTE: A comment of LZMA SDK source code says this dictionary
	 * range is from 1 << 12 to 1 << 30. */
	dicsize = archive_le32dec(buffer+1);
	switch (dicsize) {
	case 0x00001000:/* lzma of LZMA SDK option -d12. */
	case 0x00002000:/* lzma of LZMA SDK option -d13. */
	case 0x00004000:/* lzma of LZMA SDK option -d14. */
	case 0x00008000:/* lzma of LZMA SDK option -d15. */
	case 0x00010000:/* lzma of XZ Utils option -0 and -1.
			 * lzma of LZMA SDK option -d16. */
	case 0x00020000:/* lzma of LZMA SDK option -d17. */
	case 0x00040000:/* lzma of LZMA SDK option -d18. */
	case 0x00080000:/* lzma of XZ Utils option -2.
			 * lzma of LZMA SDK option -d19. */
	case 0x00100000:/* lzma of XZ Utils option -3.
			 * lzma of LZMA SDK option -d20. */
	case 0x00200000:/* lzma of XZ Utils option -4.
			 * lzma of LZMA SDK option -d21. */
	case 0x00400000:/* lzma of XZ Utils option -5.
			 * lzma of LZMA SDK option -d22. */
	case 0x00800000:/* lzma of XZ Utils option -6.
			 * lzma of LZMA SDK option -d23. */
	case 0x01000000:/* lzma of XZ Utils option -7.
			 * lzma of LZMA SDK option -d24. */
	case 0x02000000:/* lzma of XZ Utils option -8.
			 * lzma of LZMA SDK option -d25. */
	case 0x04000000:/* lzma of XZ Utils option -9.
			 * lzma of LZMA SDK option -d26. */
	case 0x08000000:/* lzma of LZMA SDK option -d27. */
		bits_checked += 32;
		break;
	default:
		/* If a memory usage for encoding was not enough on
		 * the platform where LZMA stream was made, lzma of
		 * XZ Utils automatically decreased the dictionary
		 * size to enough memory for encoding by 1Mi bytes
		 * (1 << 20).*/
		if (dicsize <= 0x03F00000 && dicsize >= 0x00300000 &&
		    (dicsize & ((1 << 20)-1)) == 0 &&
		    bits_checked == 8 + 64) {
			bits_checked += 32;
			break;
		}
		/* Otherwise dictionary size is unlikely. But it is
		 * possible that someone makes lzma stream with
		 * liblzma/LZMA SDK in one's dictionary size. */
		return (0);
	}

	/* TODO: The above test is still very weak.  It would be
	 * good to do better. */

	return (bits_checked);
}

#if HAVE_LZMA_H && HAVE_LIBLZMA

/*
 * liblzma 4.999.7 and later support both lzma and xz streams.
 */
static int
xz_bidder_init(struct archive_read_filter *self)
{
	self->code = ARCHIVE_COMPRESSION_XZ;
	self->name = "xz";
	return (xz_lzma_bidder_init(self));
}

static int
lzma_bidder_init(struct archive_read_filter *self)
{
	self->code = ARCHIVE_COMPRESSION_LZMA;
	self->name = "lzma";
	return (xz_lzma_bidder_init(self));
}

/*
 * Setup the callbacks.
 */
static int
xz_lzma_bidder_init(struct archive_read_filter *self)
{
	static const size_t out_block_size = 64 * 1024;
	void *out_block;
	struct private_data *state;
	int ret;

	state = (struct private_data *)calloc(sizeof(*state), 1);
	out_block = (unsigned char *)malloc(out_block_size);
	if (state == NULL || out_block == NULL) {
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Can't allocate data for xz decompression");
		free(out_block);
		free(state);
		return (ARCHIVE_FATAL);
	}

	self->data = state;
	state->out_block_size = out_block_size;
	state->out_block = out_block;
	self->read = xz_filter_read;
	self->skip = NULL; /* not supported */
	self->close = xz_filter_close;

	state->stream.avail_in = 0;

	state->stream.next_out = state->out_block;
	state->stream.avail_out = state->out_block_size;

	/* Initialize compression library.
	 * TODO: I don't know what value is best for memlimit.
	 *       maybe, it needs to check memory size which
	 *       running system has.
	 */
	if (self->code == ARCHIVE_COMPRESSION_XZ)
		ret = lzma_stream_decoder(&(state->stream),
		    (1U << 30),/* memlimit */
		    LZMA_CONCATENATED);
	else
		ret = lzma_alone_decoder(&(state->stream),
		    (1U << 30));/* memlimit */

	if (ret == LZMA_OK)
		return (ARCHIVE_OK);

	/* Library setup failed: Choose an error message and clean up. */
	switch (ret) {
	case LZMA_MEM_ERROR:
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Internal error initializing compression library: "
		    "Cannot allocate memory");
		break;
	case LZMA_OPTIONS_ERROR:
		archive_set_error(&self->archive->archive,
		    ARCHIVE_ERRNO_MISC,
		    "Internal error initializing compression library: "
		    "Invalid or unsupported options");
		break;
	default:
		archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC,
		    "Internal error initializing lzma library");
		break;
	}

	free(state->out_block);
	free(state);
	self->data = NULL;
	return (ARCHIVE_FATAL);
}

/*
 * Return the next block of decompressed data.
 */
static ssize_t
xz_filter_read(struct archive_read_filter *self, const void **p)
{
	struct private_data *state;
	size_t decompressed;
	ssize_t avail_in;
	int ret;

	state = (struct private_data *)self->data;

	/* Empty our output buffer. */
	state->stream.next_out = state->out_block;
	state->stream.avail_out = state->out_block_size;

	/* Try to fill the output buffer. */
	while (state->stream.avail_out > 0 && !state->eof) {
		state->stream.next_in =
		    __archive_read_filter_ahead(self->upstream, 1, &avail_in);
		if (state->stream.next_in == NULL && avail_in < 0)
			return (ARCHIVE_FATAL);
		state->stream.avail_in = avail_in;

		/* Decompress as much as we can in one pass. */
		ret = lzma_code(&(state->stream),
		    (state->stream.avail_in == 0)? LZMA_FINISH: LZMA_RUN);
		switch (ret) {
		case LZMA_STREAM_END: /* Found end of stream. */
			state->eof = 1;
			/* FALL THROUGH */
		case LZMA_OK: /* Decompressor made some progress. */
			__archive_read_filter_consume(self->upstream,
			    avail_in - state->stream.avail_in);
			break;
		case LZMA_MEM_ERROR:
			archive_set_error(&self->archive->archive, ENOMEM,
			    "Lzma library error: Cannot allocate memory");
			return (ARCHIVE_FATAL);
		case LZMA_MEMLIMIT_ERROR:
			archive_set_error(&self->archive->archive, ENOMEM,
			    "Lzma library error: Out of memory");
			return (ARCHIVE_FATAL);
		case LZMA_FORMAT_ERROR:
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma library error: format not recognized");
			return (ARCHIVE_FATAL);
		case LZMA_OPTIONS_ERROR:
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma library error: Invalid options");
			return (ARCHIVE_FATAL);
		case LZMA_DATA_ERROR:
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma library error: Corrupted input data");
			return (ARCHIVE_FATAL);
		case LZMA_BUF_ERROR:
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma library error:  No progress is possible");
			return (ARCHIVE_FATAL);
		default:
			/* Return an error. */
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma decompression failed:  Unknown error");
			return (ARCHIVE_FATAL);
		}
	}

	decompressed = state->stream.next_out - state->out_block;
	state->total_out += decompressed;
	if (decompressed == 0)
		*p = NULL;
	else
		*p = state->out_block;
	return (decompressed);
}

/*
 * Clean up the decompressor.
 */
static int
xz_filter_close(struct archive_read_filter *self)
{
	struct private_data *state;

	state = (struct private_data *)self->data;
	lzma_end(&(state->stream));
	free(state->out_block);
	free(state);
	return (ARCHIVE_OK);
}

#else

#if HAVE_LZMADEC_H && HAVE_LIBLZMADEC

/*
 * If we have the older liblzmadec library, then we can handle
 * LZMA streams but not XZ streams.
 */

/*
 * Setup the callbacks.
 */
static int
lzma_bidder_init(struct archive_read_filter *self)
{
	static const size_t out_block_size = 64 * 1024;
	void *out_block;
	struct private_data *state;
	ssize_t ret, avail_in;

	self->code = ARCHIVE_COMPRESSION_LZMA;
	self->name = "lzma";

	state = (struct private_data *)calloc(sizeof(*state), 1);
	out_block = (unsigned char *)malloc(out_block_size);
	if (state == NULL || out_block == NULL) {
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Can't allocate data for lzma decompression");
		free(out_block);
		free(state);
		return (ARCHIVE_FATAL);
	}

	self->data = state;
	state->out_block_size = out_block_size;
	state->out_block = out_block;
	self->read = lzma_filter_read;
	self->skip = NULL; /* not supported */
	self->close = lzma_filter_close;

	/* Prime the lzma library with 18 bytes of input. */
	state->stream.next_in = (unsigned char *)(uintptr_t)
	    __archive_read_filter_ahead(self->upstream, 18, &avail_in);
	if (state->stream.next_in == NULL)
		return (ARCHIVE_FATAL);
	state->stream.avail_in = avail_in;
	state->stream.next_out = state->out_block;
	state->stream.avail_out = state->out_block_size;

	/* Initialize compression library. */
	ret = lzmadec_init(&(state->stream));
	__archive_read_filter_consume(self->upstream,
	    avail_in - state->stream.avail_in);
	if (ret == LZMADEC_OK)
		return (ARCHIVE_OK);

	/* Library setup failed: Clean up. */
	archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC,
	    "Internal error initializing lzma library");

	/* Override the error message if we know what really went wrong. */
	switch (ret) {
	case LZMADEC_HEADER_ERROR:
		archive_set_error(&self->archive->archive,
		    ARCHIVE_ERRNO_MISC,
		    "Internal error initializing compression library: "
		    "invalid header");
		break;
	case LZMADEC_MEM_ERROR:
		archive_set_error(&self->archive->archive, ENOMEM,
		    "Internal error initializing compression library: "
		    "out of memory");
		break;
	}

	free(state->out_block);
	free(state);
	self->data = NULL;
	return (ARCHIVE_FATAL);
}

/*
 * Return the next block of decompressed data.
 */
static ssize_t
lzma_filter_read(struct archive_read_filter *self, const void **p)
{
	struct private_data *state;
	size_t decompressed;
	ssize_t avail_in, ret;

	state = (struct private_data *)self->data;

	/* Empty our output buffer. */
	state->stream.next_out = state->out_block;
	state->stream.avail_out = state->out_block_size;

	/* Try to fill the output buffer. */
	while (state->stream.avail_out > 0 && !state->eof) {
		state->stream.next_in = (unsigned char *)(uintptr_t)
		    __archive_read_filter_ahead(self->upstream, 1, &avail_in);
		if (state->stream.next_in == NULL && avail_in < 0)
			return (ARCHIVE_FATAL);
		state->stream.avail_in = avail_in;

		/* Decompress as much as we can in one pass. */
		ret = lzmadec_decode(&(state->stream), avail_in == 0);
		switch (ret) {
		case LZMADEC_STREAM_END: /* Found end of stream. */
			state->eof = 1;
			/* FALL THROUGH */
		case LZMADEC_OK: /* Decompressor made some progress. */
			__archive_read_filter_consume(self->upstream,
			    avail_in - state->stream.avail_in);
			break;
		case LZMADEC_BUF_ERROR: /* Insufficient input data? */
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Insufficient compressed data");
			return (ARCHIVE_FATAL);
		default:
			/* Return an error. */
			archive_set_error(&self->archive->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Lzma decompression failed");
			return (ARCHIVE_FATAL);
		}
	}

	decompressed = state->stream.next_out - state->out_block;
	state->total_out += decompressed;
	if (decompressed == 0)
		*p = NULL;
	else
		*p = state->out_block;
	return (decompressed);
}

/*
 * Clean up the decompressor.
 */
static int
lzma_filter_close(struct archive_read_filter *self)
{
	struct private_data *state;
	int ret;

	state = (struct private_data *)self->data;
	ret = ARCHIVE_OK;
	switch (lzmadec_end(&(state->stream))) {
	case LZMADEC_OK:
		break;
	default:
		archive_set_error(&(self->archive->archive),
		    ARCHIVE_ERRNO_MISC,
		    "Failed to clean up %s compressor",
		    self->archive->archive.compression_name);
		ret = ARCHIVE_FATAL;
	}

	free(state->out_block);
	free(state);
	return (ret);
}

#else

/*
 *
 * If we have no suitable library on this system, we can't actually do
 * the decompression.  We can, however, still detect compressed
 * archives and emit a useful message.
 *
 */
static int
lzma_bidder_init(struct archive_read_filter *self)
{
	int r;

	r = __archive_read_program(self, "unlzma");
	/* Note: We set the format here even if __archive_read_program()
	 * above fails.  We do, after all, know what the format is
	 * even if we weren't able to read it. */
	self->code = ARCHIVE_COMPRESSION_LZMA;
	self->name = "lzma";
	return (r);
}

#endif /* HAVE_LZMADEC_H */


static int
xz_bidder_init(struct archive_read_filter *self)
{
	int r;

	r = __archive_read_program(self, "unxz");
	/* Note: We set the format here even if __archive_read_program()
	 * above fails.  We do, after all, know what the format is
	 * even if we weren't able to read it. */
	self->code = ARCHIVE_COMPRESSION_XZ;
	self->name = "xz";
	return (r);
}


#endif /* HAVE_LZMA_H */

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_all.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_empty.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_string.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_raw.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_raw.c 201107 2009-12-28 03:25:33Z kientzle $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#include "archive.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_read_private.h"

struct raw_info {
	int64_t offset; /* Current position in the file. */
	int     end_of_file;
};

static int	archive_read_format_raw_bid(struct archive_read *);
static int	archive_read_format_raw_cleanup(struct archive_read *);
static int	archive_read_format_raw_read_data(struct archive_read *,
		    const void **, size_t *, off_t *);
static int	archive_read_format_raw_read_data_skip(struct archive_read *);
static int	archive_read_format_raw_read_header(struct archive_read *,
		    struct archive_entry *);

int
archive_read_support_format_raw(struct archive *_a)
{
	struct raw_info *info;
	struct archive_read *a = (struct archive_read *)_a;
	int r;

	info = (struct raw_info *)calloc(1, sizeof(*info));
	if (info == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Can't allocate raw_info data");
		return (ARCHIVE_FATAL);
	}

	r = __archive_read_register_format(a,
	    info,
	    "raw",
	    archive_read_format_raw_bid,
	    NULL,
	    archive_read_format_raw_read_header,
	    archive_read_format_raw_read_data,
	    archive_read_format_raw_read_data_skip,
	    archive_read_format_raw_cleanup);
	if (r != ARCHIVE_OK)
		free(info);
	return (r);
}

/*
 * Bid 1 if this is a non-empty file.  Anyone who can really support
 * this should outbid us, so it should generally be safe to use "raw"
 * in conjunction with other formats.  But, this could really confuse
 * folks if there are bid errors or minor file damage, so we don't
 * include "raw" as part of support_format_all().
 */
static int
archive_read_format_raw_bid(struct archive_read *a)
{

	if (__archive_read_ahead(a, 1, NULL) == NULL)
		return (-1);
	return (1);
}

/*
 * Mock up a fake header.
 */
static int
archive_read_format_raw_read_header(struct archive_read *a,
    struct archive_entry *entry)
{
	struct raw_info *info;

	info = (struct raw_info *)(a->format->data);
	if (info->end_of_file)
		return (ARCHIVE_EOF);

	a->archive.archive_format = ARCHIVE_FORMAT_RAW;
	a->archive.archive_format_name = "Raw data";
	archive_entry_set_pathname(entry, "data");
	/* XXX should we set mode to mimic a regular file? XXX */
	/* I'm deliberately leaving most fields unset here. */
	return (ARCHIVE_OK);
}

static int
archive_read_format_raw_read_data(struct archive_read *a,
    const void **buff, size_t *size, off_t *offset)
{
	struct raw_info *info;
	ssize_t avail;

	info = (struct raw_info *)(a->format->data);
	if (info->end_of_file)
		return (ARCHIVE_EOF);

	/* Get whatever bytes are immediately available. */
	*buff = __archive_read_ahead(a, 1, &avail);
	if (avail > 0) {
		/* Consume and return the bytes we just read */
		__archive_read_consume(a, avail);
		*size = avail;
		*offset = info->offset;
		info->offset += *size;
		return (ARCHIVE_OK);
	} else if (0 == avail) {
		/* Record and return end-of-file. */
		info->end_of_file = 1;
		*size = 0;
		*offset = info->offset;
		return (ARCHIVE_EOF);
	} else {
		/* Record and return an error. */
		*size = 0;
		*offset = info->offset;
		return (avail);
	}
}

static int
archive_read_format_raw_read_data_skip(struct archive_read *a)
{
	struct raw_info *info;
	off_t bytes_skipped;
	int64_t request = 1024 * 1024 * 1024UL; /* Skip 1 GB at a time. */

	info = (struct raw_info *)(a->format->data);
	if (info->end_of_file)
		return (ARCHIVE_EOF);
	info->end_of_file = 1;

	for (;;) {
		bytes_skipped = __archive_read_skip_lenient(a, request);
		if (bytes_skipped < 0)
			return (ARCHIVE_FATAL);
		if (bytes_skipped < request)
			return (ARCHIVE_OK);
		/* We skipped all the bytes we asked for.  There might
		 * be more, so try again. */
	}
}

static int
archive_read_format_raw_cleanup(struct archive_read *a)
{
	struct raw_info *info;

	info = (struct raw_info *)(a->format->data);
	free(info);
	a->format->data = NULL;
	return (ARCHIVE_OK);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "archive_platform.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_LIBXML_XMLREADER_H
#include <libxml/xmlreader.h>
#elif HAVE_BSDXML_H
#include <bsdxml.h>
#elif HAVE_EXPAT_H
#include <expat.h>
#endif
#ifdef HAVE_BZLIB_H
#include <bzlib.h>
#endif
#if HAVE_LZMA_H
#include <lzma.h>
#elif HAVE_LZMADEC_H
#include <lzmadec.h>
#endif
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif

#include "archive.h"
#include "archive_endian.h"
#include "archive_entry.h"
#include "archive_hash.h"
#include "archive_private.h"
#include "archive_read_private.h"

#if (!defined(HAVE_LIBXML_XMLREADER_H) && \
     !defined(HAVE_BSDXML_H) && !defined(HAVE_EXPAT_H)) ||\
	!defined(HAVE_ZLIB_H) || \
	!defined(ARCHIVE_HAS_MD5) || !defined(ARCHIVE_HAS_SHA1)
/*
 * xar needs several external libraries.
 *   o libxml2 or expat --- XML parser
 *   o openssl or MD5/SHA1 hash function
 *   o zlib
 *   o bzlib2 (option)
 *   o liblzma (option)
 */
int
archive_read_support_format_xar(struct archive *_a)
{
	struct archive_read *a = (struct archive_read *)_a;

	archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
	    "Xar not supported on this platform");
	return (ARCHIVE_WARN);
}

#else	/* Support xar format */

//#define DEBUG 1
//#define DEBUG_PRINT_TOC 1
#if DEBUG_PRINT_TOC
#define PRINT_TOC(d, outbytes)	do {				\
	unsigned char *x = (unsigned char *)(uintptr_t)d;	\
	unsigned char c = x[outbytes-1];			\
	x[outbytes - 1] = 0;					\
	fprintf(stderr, "%s", x);				\
	fprintf(stderr, "%c", c);				\
	x[outbytes - 1] = c;					\
} while (0)
#else
#define PRINT_TOC(d, outbytes)
#endif

#define HEADER_MAGIC	0x78617221
#define HEADER_SIZE	28
#define HEADER_VERSION	1
#define CKSUM_NONE	0
#define CKSUM_SHA1	1
#define CKSUM_MD5	2

#define MD5_SIZE	16
#define SHA1_SIZE	20
#define MAX_SUM_SIZE	20

enum enctype {
	NONE,
	GZIP,
	BZIP2,
	LZMA,
	XZ,
};

struct chksumval {
	int			 alg;
	size_t			 len;
	unsigned char		 val[MAX_SUM_SIZE];
};

struct chksumwork {
	int			 alg;
#ifdef ARCHIVE_HAS_MD5
	archive_md5_ctx		 md5ctx;
#endif
#ifdef ARCHIVE_HAS_SHA1
	archive_sha1_ctx	 sha1ctx;
#endif
};

struct xattr {
	struct xattr		*next;
	struct archive_string	 name;
	uint64_t		 id;
	uint64_t		 length;
	uint64_t		 offset;
	uint64_t		 size;
	enum enctype		 encoding;
	struct chksumval	 a_sum;
	struct chksumval	 e_sum;
	struct archive_string	 fstype;
};

struct xar_file {
	struct xar_file		*next;
	struct xar_file		*hdnext;
	struct xar_file		*parent;
	int			 subdirs;

	unsigned int		 has;
#define HAS_DATA		0x00001
#define HAS_PATHNAME		0x00002
#define HAS_SYMLINK		0x00004
#define HAS_TIME		0x00008
#define HAS_UID			0x00010
#define HAS_GID			0x00020
#define HAS_MODE		0x00040
#define HAS_TYPE		0x00080
#define HAS_DEV			0x00100
#define HAS_DEVMAJOR		0x00200
#define HAS_DEVMINOR		0x00400
#define HAS_INO			0x00800
#define HAS_FFLAGS		0x01000
#define HAS_XATTR		0x02000
#define HAS_ACL			0x04000

	uint64_t		 id;
	uint64_t		 length;
	uint64_t		 offset;
	uint64_t		 size;
	enum enctype		 encoding;
	struct chksumval	 a_sum;
	struct chksumval	 e_sum;
	struct archive_string	 pathname;
	struct archive_string	 symlink;
	time_t			 ctime;
	time_t			 mtime;
	time_t			 atime;
	struct archive_string	 uname;
	uid_t			 uid;
	struct archive_string	 gname;
	gid_t			 gid;
	mode_t			 mode;
	dev_t			 dev;
	dev_t			 devmajor;
	dev_t			 devminor;
	int64_t			 ino64;
	struct archive_string	 fflags_text;
	unsigned int		 link;
	unsigned int		 nlink;
	struct archive_string	 hardlink;
	struct xattr		*xattr_list;
};

struct hdlink {
	struct hdlink		 *next;

	unsigned int		 id;
	int			 cnt;
	struct xar_file		 *files;
};

struct heap_queue {
	struct xar_file		**files;
	int			 allocated;
	int			 used;
};

enum xmlstatus {
	INIT,
	XAR,
	TOC,
	TOC_CREATION_TIME,
	TOC_CHECKSUM,
	TOC_CHECKSUM_OFFSET,
	TOC_CHECKSUM_SIZE,
	TOC_FILE,
	FILE_DATA,
	FILE_DATA_LENGTH,
	FILE_DATA_OFFSET,
	FILE_DATA_SIZE,
	FILE_DATA_ENCODING,
	FILE_DATA_A_CHECKSUM,
	FILE_DATA_E_CHECKSUM,
	FILE_DATA_CONTENT,
	FILE_EA,
	FILE_EA_LENGTH,
	FILE_EA_OFFSET,
	FILE_EA_SIZE,
	FILE_EA_ENCODING,
	FILE_EA_A_CHECKSUM,
	FILE_EA_E_CHECKSUM,
	FILE_EA_NAME,
	FILE_EA_FSTYPE,
	FILE_CTIME,
	FILE_MTIME,
	FILE_ATIME,
	FILE_GROUP,
	FILE_GID,
	FILE_USER,
	FILE_UID,
	FILE_MODE,
	FILE_DEVICE,
	FILE_DEVICE_MAJOR,
	FILE_DEVICE_MINOR,
	FILE_DEVICENO,
	FILE_INODE,
	FILE_LINK,
	FILE_TYPE,
	FILE_NAME,
	FILE_ACL,
	FILE_ACL_DEFAULT,
	FILE_ACL_ACCESS,
	FILE_ACL_APPLEEXTENDED,
	/* BSD file flags. */
	FILE_FLAGS,
	FILE_FLAGS_USER_NODUMP,
	FILE_FLAGS_USER_IMMUTABLE,
	FILE_FLAGS_USER_APPEND,
	FILE_FLAGS_USER_OPAQUE,
	FILE_FLAGS_USER_NOUNLINK,
	FILE_FLAGS_SYS_ARCHIVED,
	FILE_FLAGS_SYS_IMMUTABLE,
	FILE_FLAGS_SYS_APPEND,
	FILE_FLAGS_SYS_NOUNLINK,
	FILE_FLAGS_SYS_SNAPSHOT,
	/* Linux file flags. */
	FILE_EXT2,
	FILE_EXT2_SecureDeletion,
	FILE_EXT2_Undelete,
	FILE_EXT2_Compress,
	FILE_EXT2_Synchronous,
	FILE_EXT2_Immutable,
	FILE_EXT2_AppendOnly,
	FILE_EXT2_NoDump,
	FILE_EXT2_NoAtime,
	FILE_EXT2_CompDirty,
	FILE_EXT2_CompBlock,
	FILE_EXT2_NoCompBlock,
	FILE_EXT2_CompError,
	FILE_EXT2_BTree,
	FILE_EXT2_HashIndexed,
	FILE_EXT2_iMagic,
	FILE_EXT2_Journaled,
	FILE_EXT2_NoTail,
	FILE_EXT2_DirSync,
	FILE_EXT2_TopDir,
	FILE_EXT2_Reserved,
	UNKNOWN,
};

struct unknown_tag {
	struct unknown_tag	*next;
	struct archive_string	 name;
};

struct xar {
	uint64_t		 offset; /* Current position in the file. */
	int64_t			 total;
	uint64_t		 h_base;
	int			 end_of_file;
	unsigned char		 buff[1024*32];

	enum xmlstatus		 xmlsts;
	enum xmlstatus		 xmlsts_unknown;
	struct unknown_tag	*unknowntags;
	int			 base64text;

	/*
	 * TOC
	 */
	uint64_t		 toc_remaining;
	uint64_t		 toc_total;
	uint64_t		 toc_chksum_offset;
	uint64_t		 toc_chksum_size;

	/*
	 * For Decoding data.
	 */
	enum enctype 		 rd_encoding;
	z_stream		 stream;
	int			 stream_valid;
#ifdef HAVE_BZLIB_H
	bz_stream		 bzstream;
	int			 bzstream_valid;
#endif
#if HAVE_LZMA_H && HAVE_LIBLZMA
	lzma_stream		 lzstream;
	int			 lzstream_valid;
#elif HAVE_LZMADEC_H && HAVE_LIBLZMADEC
	lzmadec_stream		 lzstream;
	int			 lzstream_valid;
#endif
	/*
	 * For Checksum data.
	 */
	struct chksumwork	 a_sumwrk;
	struct chksumwork	 e_sumwrk;

	struct xar_file		*file;	/* current reading file. */
	struct xattr		*xattr; /* current reading extended attribute. */
	struct heap_queue	 file_queue;
	struct xar_file		*hdlink_orgs;
	struct hdlink		*hdlink_list;

	int	 		 entry_init;
	uint64_t		 entry_total;
	uint64_t		 entry_remaining;
	uint64_t		 entry_size;
	enum enctype 		 entry_encoding;
	struct chksumval	 entry_a_sum;
	struct chksumval	 entry_e_sum;
};

struct xmlattr {
	struct xmlattr	*next;
	char		*name;
	char		*value;
};

struct xmlattr_list {
	struct xmlattr	*first;
	struct xmlattr	**last;
};

static int	xar_bid(struct archive_read *);
static int	xar_read_header(struct archive_read *,
		    struct archive_entry *);
static int	xar_read_data(struct archive_read *,
		    const void **, size_t *, off_t *);
static int	xar_read_data_skip(struct archive_read *);
static int	xar_cleanup(struct archive_read *);
static int	move_reading_point(struct archive_read *, uint64_t);
static int	rd_contents_init(struct archive_read *,
		    enum enctype, int, int);
static int	rd_contents(struct archive_read *, const void **,
		    size_t *, size_t *, uint64_t);
static uint64_t	atol10(const char *, size_t);
static int64_t	atol8(const char *, size_t);
static size_t	atohex(unsigned char *, size_t, const char *, size_t);
static time_t	parse_time(const char *p, size_t n);
static void	heap_add_entry(struct heap_queue *, struct xar_file *);
static struct xar_file *heap_get_entry(struct heap_queue *);
static void	add_link(struct xar *, struct xar_file *);
static void	checksum_init(struct archive_read *, int, int);
static void	checksum_update(struct archive_read *, const void *,
		    size_t, const void *, size_t);
static int	checksum_final(struct archive_read *, const void *,
		    size_t, const void *, size_t);
static int	decompression_init(struct archive_read *, enum enctype);
static int	decompress(struct archive_read *, const void **,
		    size_t *, const void *, size_t *);
static int	decompression_cleanup(struct archive_read *);
static void	xmlattr_cleanup(struct xmlattr_list *);
static void	file_new(struct xar *, struct xmlattr_list *);
static void	file_free(struct xar_file *);
static void	xattr_new(struct xar *, struct xmlattr_list *);
static void	xattr_free(struct xattr *);
static int	getencoding(struct xmlattr_list *);
static int	getsumalgorithm(struct xmlattr_list *);
static void	unknowntag_start(struct xar *, const char *);
static void	unknowntag_end(struct xar *, const char *);
static void	xml_start(void *, const char *, struct xmlattr_list *);
static void	xml_end(void *, const char *);
static void	xml_data(void *, const char *, int);
static int	xml_parse_file_flags(struct xar *, const char *);
static int	xml_parse_file_ext2(struct xar *, const char *);
#if defined(HAVE_LIBXML_XMLREADER_H)
static int	xml2_xmlattr_setup(struct xmlattr_list *, xmlTextReaderPtr);
static int	xml2_read_cb(void *, char *, int);
static int	xml2_close_cb(void *);
static void	xml2_error_hdr(void *, const char *, xmlParserSeverities,
		    xmlTextReaderLocatorPtr);
static int	xml2_read_toc(struct archive_read *);
#elif defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H)
static void	expat_xmlattr_setup(struct xmlattr_list *, const XML_Char **);
static void	expat_start_cb(void *, const XML_Char *, const XML_Char **);
static void	expat_end_cb(void *, const XML_Char *);
static void	expat_data_cb(void *, const XML_Char *, int);
static int	expat_read_toc(struct archive_read *);
#endif

int
archive_read_support_format_xar(struct archive *_a)
{
	struct xar *xar;
	struct archive_read *a = (struct archive_read *)_a;
	int r;

	xar = (struct xar *)calloc(1, sizeof(*xar));
	if (xar == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Can't allocate xar data");
		return (ARCHIVE_FATAL);
	}

	r = __archive_read_register_format(a,
	    xar,
	    "xar",
	    xar_bid,
	    NULL,
	    xar_read_header,
	    xar_read_data,
	    xar_read_data_skip,
	    xar_cleanup);
	if (r != ARCHIVE_OK)
		free(xar);
	return (r);
}

static int
xar_bid(struct archive_read *a)
{
	const unsigned char *b;
	int bid;

	b = __archive_read_ahead(a, HEADER_SIZE, NULL);
	if (b == NULL)
		return (-1);

	bid = 0;
	/*
	 * Verify magic code
	 */
	if (archive_be32dec(b) != HEADER_MAGIC)
		return (0);
	bid += 32;
	/*
	 * Verify header size
	 */
	if (archive_be16dec(b+4) != HEADER_SIZE)
		return (0);
	bid += 16;
	/*
	 * Verify header version
	 */
	if (archive_be16dec(b+6) != HEADER_VERSION)
		return (0);
	bid += 16;
	/*
	 * Verify type of checksum
	 */
	switch (archive_be32dec(b+24)) {
	case CKSUM_NONE:
	case CKSUM_SHA1:
	case CKSUM_MD5:
		bid += 32;
		break;
	default:
		return (0);
	}

	return (bid);
}

static int
read_toc(struct archive_read *a)
{
	struct xar *xar;
	struct xar_file *file;
	const unsigned char *b;
	uint64_t toc_compressed_size;
	uint64_t toc_uncompressed_size;
	uint32_t toc_chksum_alg;
	ssize_t bytes;
	int r;

	xar = (struct xar *)(a->format->data);

	/*
	 * Read xar header.
	 */
	b = __archive_read_ahead(a, HEADER_SIZE, &bytes);
	if (bytes < 0)
		return ((int)bytes);
	if (bytes < HEADER_SIZE) {
		archive_set_error(&a->archive,
		    ARCHIVE_ERRNO_FILE_FORMAT,
		    "Truncated archive header");
		return (ARCHIVE_FATAL);
	}

	if (archive_be32dec(b) != HEADER_MAGIC) {
		archive_set_error(&a->archive,
		    ARCHIVE_ERRNO_FILE_FORMAT,
		    "Invalid header magic");
		return (ARCHIVE_FATAL);
	}
	if (archive_be16dec(b+6) != HEADER_VERSION) {
		archive_set_error(&a->archive,
		    ARCHIVE_ERRNO_FILE_FORMAT,
		    "Unsupported header version(%d)",
		    archive_be16dec(b+6));
		return (ARCHIVE_FATAL);
	}
	toc_compressed_size = archive_be64dec(b+8);
	xar->toc_remaining = toc_compressed_size;
	toc_uncompressed_size = archive_be64dec(b+16);
	toc_chksum_alg = archive_be32dec(b+24);
	__archive_read_consume(a, HEADER_SIZE);
	xar->offset += HEADER_SIZE;
	xar->toc_total = 0;

	/*
	 * Read TOC(Table of Contents).
	 */
	/* Initialize reading contents. */
	r = move_reading_point(a, HEADER_SIZE);
	if (r != ARCHIVE_OK)
		return (r);
	r = rd_contents_init(a, GZIP, toc_chksum_alg, CKSUM_NONE);
	if (r != ARCHIVE_OK)
		return (r);

#ifdef HAVE_LIBXML_XMLREADER_H
	r = xml2_read_toc(a);
#elif defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H)
	r = expat_read_toc(a);
#endif
	if (r != ARCHIVE_OK)
		return (r);

	/* Set 'The HEAP' base. */
	xar->h_base = xar->offset;
	if (xar->toc_total != toc_uncompressed_size) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "TOC uncompressed size error");
		return (ARCHIVE_FATAL);
	}

	/*
	 * Checksum TOC
	 */
	if (toc_chksum_alg != CKSUM_NONE) {
		r = move_reading_point(a, xar->toc_chksum_offset);
		if (r != ARCHIVE_OK)
			return (r);
		b = __archive_read_ahead(a, xar->toc_chksum_size, &bytes);
		if (bytes < 0)
			return ((int)bytes);
		if ((uint64_t)bytes < xar->toc_chksum_size) {
			archive_set_error(&a->archive,
			    ARCHIVE_ERRNO_FILE_FORMAT,
			    "Truncated archive file");
			return (ARCHIVE_FATAL);
		}
		r = checksum_final(a, b, xar->toc_chksum_size, NULL, 0);
		__archive_read_consume(a, xar->toc_chksum_size);
		xar->offset += xar->toc_chksum_size;
		if (r != ARCHIVE_OK)
			return (ARCHIVE_FATAL);
	}

	/*
	 * Connect hardlinked files.
	 */
	for (file = xar->hdlink_orgs; file != NULL; file = file->hdnext) {
		struct hdlink **hdlink;

		for (hdlink = &(xar->hdlink_list); *hdlink != NULL;
		    hdlink = &((*hdlink)->next)) {
			if ((*hdlink)->id == file->id) {
				struct hdlink *hltmp;
				struct xar_file *f2;
				int nlink = (*hdlink)->cnt + 1;

				file->nlink = nlink;
				for (f2 = (*hdlink)->files; f2 != NULL;
				    f2 = f2->hdnext) {
					f2->nlink = nlink;
					archive_string_copy(
					    &(f2->hardlink), &(file->pathname));
				}
				/* Remove resolved files from hdlist_list. */
				hltmp = *hdlink;
				*hdlink = hltmp->next;
				free(hltmp);
				break;
			}
		}
	}
	a->archive.archive_format = ARCHIVE_FORMAT_XAR;
	a->archive.archive_format_name = "xar";

	return (ARCHIVE_OK);
}

static int
xar_read_header(struct archive_read *a, struct archive_entry *entry)
{
	struct xar *xar;
	struct xar_file *file;
	struct xattr *xattr;
	int r;

	xar = (struct xar *)(a->format->data);

	if (xar->offset == 0) {
		/* Read TOC. */
		r = read_toc(a);
		if (r != ARCHIVE_OK)
			return (r);
	}

	for (;;) {
		file = xar->file = heap_get_entry(&(xar->file_queue));
		if (file == NULL) {
			xar->end_of_file = 1;
			return (ARCHIVE_EOF);
		}
		if ((file->mode & AE_IFMT) != AE_IFDIR)
			break;
		if (file->has != (HAS_PATHNAME | HAS_TYPE))
			break;
		/*
		 * If a file type is a directory and it does not have
		 * any metadata, do not export.
		 */
		file_free(file);
	}
	archive_entry_set_atime(entry, file->atime, 0);
	archive_entry_set_ctime(entry, file->ctime, 0);
	archive_entry_set_mtime(entry, file->mtime, 0);
	archive_entry_set_gid(entry, file->gid);
	if (file->gname.length > 0)
		archive_entry_update_gname_utf8(entry, file->gname.s);
	archive_entry_set_uid(entry, file->uid);
	if (file->uname.length > 0)
		archive_entry_update_uname_utf8(entry, file->uname.s);
	archive_entry_set_mode(entry, file->mode);
	archive_entry_update_pathname_utf8(entry, file->pathname.s);
	if (file->symlink.length > 0)
		archive_entry_update_symlink_utf8(entry, file->symlink.s);
	/* Set proper nlink. */
	if ((file->mode & AE_IFMT) == AE_IFDIR)
		archive_entry_set_nlink(entry, file->subdirs + 2);
	else
		archive_entry_set_nlink(entry, file->nlink);
	archive_entry_set_size(entry, file->size);
	if (archive_strlen(&(file->hardlink)) > 0)
		archive_entry_update_hardlink_utf8(entry,
			file->hardlink.s);
	archive_entry_set_ino64(entry, file->ino64);
	if (file->has & HAS_DEV)
		archive_entry_set_dev(entry, file->dev);
	if (file->has & HAS_DEVMAJOR)
		archive_entry_set_devmajor(entry, file->devmajor);
	if (file->has & HAS_DEVMINOR)
		archive_entry_set_devminor(entry, file->devminor);
	if (archive_strlen(&(file->fflags_text)) > 0)
		archive_entry_copy_fflags_text(entry, file->fflags_text.s);

	xar->entry_init = 1;
	xar->entry_total = 0;
	xar->entry_remaining = file->length;
	xar->entry_size = file->size;
	xar->entry_encoding = file->encoding;
	xar->entry_a_sum = file->a_sum;
	xar->entry_e_sum = file->e_sum;
	/*
	 * Read extended attributes.
	 */
	r = ARCHIVE_OK;
	xattr = file->xattr_list;
	while (xattr != NULL) {
		const void *d;
		size_t outbytes, used;

		r = move_reading_point(a, xattr->offset);
		if (r != ARCHIVE_OK)
			break;
		r = rd_contents_init(a, xattr->encoding,
		    xattr->a_sum.alg, xattr->e_sum.alg);
		if (r != ARCHIVE_OK)
			break;
		d = NULL;
		r = rd_contents(a, &d, &outbytes, &used, xattr->length);
		if (r != ARCHIVE_OK)
			break;
		if (outbytes != xattr->size) {
			archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
			    "Decompressed size error");
			r = ARCHIVE_FATAL;
			break;
		}
		r = checksum_final(a,
		    xattr->a_sum.val, xattr->a_sum.len,
		    xattr->e_sum.val, xattr->e_sum.len);
		if (r != ARCHIVE_OK)
			break;
		archive_entry_xattr_add_entry(entry,
		    xattr->name.s, d, outbytes);
		xattr = xattr->next;
	}
	if (r != ARCHIVE_OK) {
		file_free(file);
		return (r);
	}

	if (xar->entry_remaining > 0)
		/* Move reading point to the beginning of current
		 * file contents. */
		r = move_reading_point(a, file->offset);
	else
		r = ARCHIVE_OK;

	file_free(file);
	return (r);
}

static int
xar_read_data(struct archive_read *a,
    const void **buff, size_t *size, off_t *offset)
{
	struct xar *xar;
	size_t used;
	int r;

	xar = (struct xar *)(a->format->data);
	if (xar->end_of_file || xar->entry_remaining <= 0) {
		r = ARCHIVE_EOF;
		goto abort_read_data;
	}

	if (xar->entry_init) {
		r = rd_contents_init(a, xar->entry_encoding,
		    xar->entry_a_sum.alg, xar->entry_e_sum.alg);
		if (r != ARCHIVE_OK) {
			xar->entry_remaining = 0;
			return (r);
		}
		xar->entry_init = 0;
	}

	*buff = NULL;
	r = rd_contents(a, buff, size, &used, xar->entry_remaining);
	if (r != ARCHIVE_OK)
		goto abort_read_data;

	*offset = xar->entry_total;
	xar->entry_total += *size;
	xar->total += *size;
	xar->offset += used;
	xar->entry_remaining -= used;
	__archive_read_consume(a, used);

	if (xar->entry_remaining == 0) {
		if (xar->entry_total != xar->entry_size) {
			archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
			    "Decompressed size error");
			r = ARCHIVE_FATAL;
			goto abort_read_data;
		}
		r = checksum_final(a,
		    xar->entry_a_sum.val, xar->entry_a_sum.len,
		    xar->entry_e_sum.val, xar->entry_e_sum.len);
		if (r != ARCHIVE_OK)
			goto abort_read_data;
	}

	return (ARCHIVE_OK);
abort_read_data:
	*buff = NULL;
	*size = 0;
	*offset = xar->total;
	return (r);
}

static int
xar_read_data_skip(struct archive_read *a)
{
	struct xar *xar;
	int64_t bytes_skipped;

	xar = (struct xar *)(a->format->data);
	if (xar->end_of_file)
		return (ARCHIVE_EOF);
	bytes_skipped = __archive_read_skip(a, xar->entry_remaining);
	if (bytes_skipped < 0)
		return (ARCHIVE_FATAL);
	xar->offset += bytes_skipped;
	return (ARCHIVE_OK);
}

static int
xar_cleanup(struct archive_read *a)
{
	struct xar *xar;
	struct hdlink *hdlink;
	int i;
	int r;

	xar = (struct xar *)(a->format->data);
	r = decompression_cleanup(a);
	hdlink = xar->hdlink_list;
	while (hdlink != NULL) {
		struct hdlink *next = hdlink->next;

		free(hdlink);
		hdlink = next;
	}
	for (i = 0; i < xar->file_queue.used; i++)
		file_free(xar->file_queue.files[i]);
	while (xar->unknowntags != NULL) {
		struct unknown_tag *tag;

		tag = xar->unknowntags;
		xar->unknowntags = tag->next;
		archive_string_free(&(tag->name));
		free(tag);
	}
	free(xar);
	a->format->data = NULL;
	return (r);
}

static int
move_reading_point(struct archive_read *a, uint64_t offset)
{
	struct xar *xar;

	xar = (struct xar *)(a->format->data);
	if (xar->offset - xar->h_base != offset) {
		/* Seek forward to the start of file contents. */
		int64_t step;

		step = offset - (xar->offset - xar->h_base);
		if (step > 0) {
			step = __archive_read_skip(a, step);
			if (step < 0)
				return ((int)step);
			xar->offset += step;
		} else {
			archive_set_error(&(a->archive),
			    ARCHIVE_ERRNO_MISC,
			    "Cannot seek.");
			return (ARCHIVE_FAILED);
		}
	}
	return (ARCHIVE_OK);
}

static int
rd_contents_init(struct archive_read *a, enum enctype encoding,
    int a_sum_alg, int e_sum_alg)
{
	int r;

	/* Init decompress library. */
	if ((r = decompression_init(a, encoding)) != ARCHIVE_OK)
		return (r);
	/* Init checksum library. */
	checksum_init(a, a_sum_alg, e_sum_alg);
	return (ARCHIVE_OK);
}

static int
rd_contents(struct archive_read *a, const void **buff, size_t *size,
    size_t *used, uint64_t remaining)
{
	const unsigned char *b;
	ssize_t bytes;

	/* Get whatever bytes are immediately available. */
	b = __archive_read_ahead(a, 1, &bytes);
	if (bytes < 0)
		return ((int)bytes);
	if (bytes == 0) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "Truncated archive file");
		return (ARCHIVE_FATAL);
	}
	if ((uint64_t)bytes > remaining)
		bytes = (ssize_t)remaining;

	/*
	 * Decompress contents of file.
	 */
	*used = bytes;
	if (decompress(a, buff, size, b, used) != ARCHIVE_OK)
		return (ARCHIVE_FATAL);

	/*
	 * Update checksum of a compressed data and a extracted data.
	 */
	checksum_update(a, b, *used, *buff, *size);

	return (ARCHIVE_OK);
}

/*
 * Note that this implementation does not (and should not!) obey
 * locale settings; you cannot simply substitute strtol here, since
 * it does obey locale.
 */

static uint64_t
atol10(const char *p, size_t char_cnt)
{
	uint64_t l;
	int digit;

	l = 0;
	digit = *p - '0';
	while (digit >= 0 && digit < 10  && char_cnt-- > 0) {
		l = (l * 10) + digit;
		digit = *++p - '0';
	}
	return (l);
}

static int64_t
atol8(const char *p, size_t char_cnt)
{
	int64_t l;
	int digit;
        
	l = 0;
	while (char_cnt-- > 0) {
		if (*p >= '0' && *p <= '7')
			digit = *p - '0';
		else
			break;
		p++;
		l <<= 3;
		l |= digit;
	}
	return (l);
}

static size_t
atohex(unsigned char *b, size_t bsize, const char *p, size_t psize)
{
	size_t fbsize = bsize;

	while (bsize && psize > 1) {
		unsigned char x;

		if (p[0] >= 'a' && p[0] <= 'z')
			x = (p[0] - 'a' + 0x0a) << 4;
		else if (p[0] >= 'A' && p[0] <= 'Z')
			x = (p[0] - 'A' + 0x0a) << 4;
		else if (p[0] >= '0' && p[0] <= '9')
			x = (p[0] - '0') << 4;
		else
			return (-1);
		if (p[1] >= 'a' && p[1] <= 'z')
			x |= p[1] - 'a' + 0x0a;
		else if (p[1] >= 'A' && p[1] <= 'Z')
			x |= p[1] - 'A' + 0x0a;
		else if (p[1] >= '0' && p[1] <= '9')
			x |= p[1] - '0';
		else
			return (-1);
		
		*b++ = x;
		bsize--;
		p += 2;
		psize -= 2;
	}
	return (fbsize - bsize);
}

static time_t
time_from_tm(struct tm *t)
{
#if HAVE_TIMEGM
	/* Use platform timegm() if available. */
	return (timegm(t));
#else
	/* Else use direct calculation using POSIX assumptions. */
	/* First, fix up tm_yday based on the year/month/day. */
	mktime(t);
	/* Then we can compute timegm() from first principles. */
	return (t->tm_sec + t->tm_min * 60 + t->tm_hour * 3600
	    + t->tm_yday * 86400 + (t->tm_year - 70) * 31536000
	    + ((t->tm_year - 69) / 4) * 86400 -
	    ((t->tm_year - 1) / 100) * 86400
	    + ((t->tm_year + 299) / 400) * 86400);
#endif
}

static time_t
parse_time(const char *p, size_t n)
{
	struct tm tm;
	time_t t = 0;
	int64_t data;

	memset(&tm, 0, sizeof(tm));
	if (n != 20)
		return (t);
	data = atol10(p, 4);
	if (data < 1900)
		return (t);
	tm.tm_year = (int)data - 1900;
	p += 4;
	if (*p++ != '-')
		return (t);
	data = atol10(p, 2);
	if (data < 1 || data > 12)
		return (t);
	tm.tm_mon = (int)data -1;
	p += 2;
	if (*p++ != '-')
		return (t);
	data = atol10(p, 2);
	if (data < 1 || data > 31)
		return (t);
	tm.tm_mday = (int)data;
	p += 2;
	if (*p++ != 'T')
		return (t);
	data = atol10(p, 2);
	if (data < 0 || data > 23)
		return (t);
	tm.tm_hour = (int)data;
	p += 2;
	if (*p++ != ':')
		return (t);
	data = atol10(p, 2);
	if (data < 0 || data > 59)
		return (t);
	tm.tm_min = (int)data;
	p += 2;
	if (*p++ != ':')
		return (t);
	data = atol10(p, 2);
	if (data < 0 || data > 60)
		return (t);
	tm.tm_sec = (int)data;
#if 0
	p += 2;
	if (*p != 'Z')
		return (t);
#endif

	t = time_from_tm(&tm);

	return (t);
}

static void
heap_add_entry(struct heap_queue *heap, struct xar_file *file)
{
	uint64_t file_id, parent_id;
	int hole, parent;

	/* Expand our pending files list as necessary. */
	if (heap->used >= heap->allocated) {
		struct xar_file **new_pending_files;
		int new_size = heap->allocated * 2;

		if (heap->allocated < 1024)
			new_size = 1024;
		/* Overflow might keep us from growing the list. */
		if (new_size <= heap->allocated)
			__archive_errx(1, "Out of memory");
		new_pending_files = (struct xar_file **)
		    malloc(new_size * sizeof(new_pending_files[0]));
		if (new_pending_files == NULL)
			__archive_errx(1, "Out of memory");
		memcpy(new_pending_files, heap->files,
		    heap->allocated * sizeof(new_pending_files[0]));
		if (heap->files != NULL)
			free(heap->files);
		heap->files = new_pending_files;
		heap->allocated = new_size;
	}

	file_id = file->id;

	/*
	 * Start with hole at end, walk it up tree to find insertion point.
	 */
	hole = heap->used++;
	while (hole > 0) {
		parent = (hole - 1)/2;
		parent_id = heap->files[parent]->id;
		if (file_id >= parent_id) {
			heap->files[hole] = file;
			return;
		}
		// Move parent into hole <==> move hole up tree.
		heap->files[hole] = heap->files[parent];
		hole = parent;
	}
	heap->files[0] = file;
}

static struct xar_file *
heap_get_entry(struct heap_queue *heap)
{
	uint64_t a_id, b_id, c_id;
	int a, b, c;
	struct xar_file *r, *tmp;

	if (heap->used < 1)
		return (NULL);

	/*
	 * The first file in the list is the earliest; we'll return this.
	 */
	r = heap->files[0];

	/*
	 * Move the last item in the heap to the root of the tree
	 */
	heap->files[0] = heap->files[--(heap->used)];

	/*
	 * Rebalance the heap.
	 */
	a = 0; // Starting element and its heap key
	a_id = heap->files[a]->id;
	for (;;) {
		b = a + a + 1; // First child
		if (b >= heap->used)
			return (r);
		b_id = heap->files[b]->id;
		c = b + 1; // Use second child if it is smaller.
		if (c < heap->used) {
			c_id = heap->files[c]->id;
			if (c_id < b_id) {
				b = c;
				b_id = c_id;
			}
		}
		if (a_id <= b_id)
			return (r);
		tmp = heap->files[a];
		heap->files[a] = heap->files[b];
		heap->files[b] = tmp;
		a = b;
	}
}

static void
add_link(struct xar *xar, struct xar_file *file)
{
	struct hdlink *hdlink;

	for (hdlink = xar->hdlink_list; hdlink != NULL; hdlink = hdlink->next) {
		if (hdlink->id == file->link) {
			file->hdnext = hdlink->files;
			hdlink->cnt++;
			hdlink->files = file;
			return;
		}
	}
	hdlink = malloc(sizeof(*hdlink));
	if (hdlink == NULL)
		__archive_errx(1, "No memory for add_link()");
	file->hdnext = NULL;
	hdlink->id = file->link;
	hdlink->cnt = 1;
	hdlink->files = file;
	hdlink->next = xar->hdlink_list;
	xar->hdlink_list = hdlink;
}

static void
_checksum_init(struct chksumwork *sumwrk, int sum_alg)
{
	sumwrk->alg = sum_alg;
	switch (sum_alg) {
	case CKSUM_NONE:
		break;
	case CKSUM_SHA1:
		archive_sha1_init(&(sumwrk->sha1ctx));
		break;
	case CKSUM_MD5:
		archive_md5_init(&(sumwrk->md5ctx));
		break;
	}
}

static void
_checksum_update(struct chksumwork *sumwrk, const void *buff, size_t size)
{

	switch (sumwrk->alg) {
	case CKSUM_NONE:
		break;
	case CKSUM_SHA1:
		archive_sha1_update(&(sumwrk->sha1ctx), buff, size);
		break;
	case CKSUM_MD5:
		archive_md5_update(&(sumwrk->md5ctx), buff, size);
		break;
	}
}

static int
_checksum_final(struct chksumwork *sumwrk, const void *val, size_t len)
{
	unsigned char sum[MAX_SUM_SIZE];
	int r = ARCHIVE_OK;

	switch (sumwrk->alg) {
	case CKSUM_NONE:
		break;
	case CKSUM_SHA1:
		archive_sha1_final(&(sumwrk->sha1ctx), sum);
		if (len != SHA1_SIZE ||
		    memcmp(val, sum, SHA1_SIZE) != 0)
			r = ARCHIVE_FAILED;
		break;
	case CKSUM_MD5:
		archive_md5_final(&(sumwrk->md5ctx), sum);
		if (len != MD5_SIZE ||
		    memcmp(val, sum, MD5_SIZE) != 0)
			r = ARCHIVE_FAILED;
		break;
	}
	return (r);
}

static void
checksum_init(struct archive_read *a, int a_sum_alg, int e_sum_alg)
{
	struct xar *xar;

	xar = (struct xar *)(a->format->data);
	_checksum_init(&(xar->a_sumwrk), a_sum_alg);
	_checksum_init(&(xar->e_sumwrk), e_sum_alg);
}

static void
checksum_update(struct archive_read *a, const void *abuff, size_t asize,
    const void *ebuff, size_t esize)
{
	struct xar *xar;

	xar = (struct xar *)(a->format->data);
	_checksum_update(&(xar->a_sumwrk), abuff, asize);
	_checksum_update(&(xar->e_sumwrk), ebuff, esize);
}

static int
checksum_final(struct archive_read *a, const void *a_sum_val,
    size_t a_sum_len, const void *e_sum_val, size_t e_sum_len)
{
	struct xar *xar;
	int r;

	xar = (struct xar *)(a->format->data);
	r = _checksum_final(&(xar->a_sumwrk), a_sum_val, a_sum_len);
	if (r == ARCHIVE_OK)
		r = _checksum_final(&(xar->e_sumwrk), e_sum_val, e_sum_len);
	if (r != ARCHIVE_OK)
		archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
		    "Sumcheck error");
	return (r);
}

static int
decompression_init(struct archive_read *a, enum enctype encoding)
{
	struct xar *xar;
	const char *detail;
	int r;

	xar = (struct xar *)(a->format->data);
	xar->rd_encoding = encoding;
	switch (encoding) {
	case NONE:
		break;
	case GZIP:
		if (xar->stream_valid)
			r = inflateReset(&(xar->stream));
		else
			r = inflateInit(&(xar->stream));
		if (r != Z_OK) {
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "Couldn't initialize zlib stream.");
			return (ARCHIVE_FATAL);
		}
		xar->stream_valid = 1;
		xar->stream.total_in = 0;
		xar->stream.total_out = 0;
		break;
#ifdef HAVE_BZLIB_H
	case BZIP2:
		if (xar->bzstream_valid) {
			BZ2_bzDecompressEnd(&(xar->bzstream));
			xar->bzstream_valid = 0;
		}
		r = BZ2_bzDecompressInit(&(xar->bzstream), 0, 0);
		if (r == BZ_MEM_ERROR)
			r = BZ2_bzDecompressInit(&(xar->bzstream), 0, 1);
		if (r != BZ_OK) {
			int err = ARCHIVE_ERRNO_MISC;
			detail = NULL;
			switch (r) {
			case BZ_PARAM_ERROR:
				detail = "invalid setup parameter";
				break;
			case BZ_MEM_ERROR:
				err = ENOMEM;
				detail = "out of memory";
				break;
			case BZ_CONFIG_ERROR:
				detail = "mis-compiled library";
				break;
			}
			archive_set_error(&a->archive, err,
			    "Internal error initializing decompressor: %s",
			    detail == NULL ? "??" : detail);
			xar->bzstream_valid = 0;
			return (ARCHIVE_FATAL);
		}
		xar->bzstream_valid = 1;
		xar->bzstream.total_in_lo32 = 0;
		xar->bzstream.total_in_hi32 = 0;
		xar->bzstream.total_out_lo32 = 0;
		xar->bzstream.total_out_hi32 = 0;
		break;
#endif
#if defined(HAVE_LZMA_H) && defined(HAVE_LIBLZMA)
	case XZ:
	case LZMA:
		if (xar->lzstream_valid) {
			lzma_end(&(xar->lzstream));
			xar->lzstream_valid = 0;
		}
		if (xar->entry_encoding == XZ)
			r = lzma_stream_decoder(&(xar->lzstream),
			    (1U << 30),/* memlimit */
			    LZMA_CONCATENATED);
		else
			r = lzma_alone_decoder(&(xar->lzstream),
			    (1U << 30));/* memlimit */
		if (r != LZMA_OK) {
			switch (r) {
			case LZMA_MEM_ERROR:
				archive_set_error(&a->archive,
				    ENOMEM,
				    "Internal error initializing "
				    "compression library: "
				    "Cannot allocate memory");
				break;
			case LZMA_OPTIONS_ERROR:
				archive_set_error(&a->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Internal error initializing "
				    "compression library: "
				    "Invalid or unsupported options");
				break;
			default:
				archive_set_error(&a->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Internal error initializing "
				    "lzma library");
				break;
			}
			return (ARCHIVE_FATAL);
		}
		xar->lzstream_valid = 1;
		xar->lzstream.total_in = 0;
		xar->lzstream.total_out = 0;
		break;
#elif defined(HAVE_LZMADEC_H) && defined(HAVE_LIBLZMADEC)
	case LZMA:
		if (xar->lzstream_valid)
			lzmadec_end(&(xar->lzstream));
		r = lzmadec_init(&(xar->lzstream));
		if (r != LZMADEC_OK) {
			switch (r) {
			case LZMADEC_HEADER_ERROR:
				archive_set_error(&a->archive,
				    ARCHIVE_ERRNO_MISC,
				    "Internal error initializing "
				    "compression library: "
				    "invalid header");
				break;
			case LZMADEC_MEM_ERROR:
				archive_set_error(&a->archive,
				    ENOMEM,
				    "Internal error initializing "
				    "compression library: "
				    "out of memory");
				break;
			}
			return (ARCHIVE_FATAL);
		}
		xar->lzstream_valid = 1;
		xar->lzstream.total_in = 0;
		xar->lzstream.total_out = 0;
		break;
#endif
	/*
	 * Unsupported compression.
	 */
	default:
#ifndef HAVE_BZLIB_H
	case BZIP2:
#endif
#if !defined(HAVE_LZMA_H) || !defined(HAVE_LIBLZMA)
#if !defined(HAVE_LZMADEC_H) || !defined(HAVE_LIBLZMADEC)
	case LZMA:
#endif
	case XZ:
#endif
		switch (xar->entry_encoding) {
		case BZIP2: detail = "bzip2"; break;
		case LZMA: detail = "lzma"; break;
		case XZ: detail = "xz"; break;
		default: detail = "??"; break;
		}
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "%s compression not supported on this platform",
		    detail);
		return (ARCHIVE_FAILED);
	}
	return (ARCHIVE_OK);
}

static int
decompress(struct archive_read *a, const void **buff, size_t *outbytes,
    const void *b, size_t *used)
{
	struct xar *xar;
	void *outbuff;
	size_t avail_in, avail_out;
	int r;

	xar = (struct xar *)(a->format->data);
	avail_in = *used;
	outbuff = (void *)(uintptr_t)*buff;
	if (outbuff == NULL) {
		outbuff = xar->buff;
		*buff = outbuff;
		avail_out = sizeof(xar->buff);
	} else
		avail_out = *outbytes;
	switch (xar->rd_encoding) {
	case GZIP:
		xar->stream.next_in = (Bytef *)(uintptr_t)b;
		xar->stream.avail_in = avail_in;
		xar->stream.next_out = (unsigned char *)outbuff;
		xar->stream.avail_out = avail_out;
		r = inflate(&(xar->stream), 0);
		switch (r) {
		case Z_OK: /* Decompressor made some progress.*/
		case Z_STREAM_END: /* Found end of stream. */
			break;
		default:
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "File decompression failed (%d)", r);
			return (ARCHIVE_FATAL);
		}
		*used = avail_in - xar->stream.avail_in;
		*outbytes = avail_out - xar->stream.avail_out;
		break;
#ifdef HAVE_BZLIB_H
	case BZIP2:
		xar->bzstream.next_in = (char *)(uintptr_t)b;
		xar->bzstream.avail_in = avail_in;
		xar->bzstream.next_out = (char *)outbuff;
		xar->bzstream.avail_out = avail_out;
		r = BZ2_bzDecompress(&(xar->bzstream));
		switch (r) {
		case BZ_STREAM_END: /* Found end of stream. */
			switch (BZ2_bzDecompressEnd(&(xar->bzstream))) {
			case BZ_OK:
				break;
			default:
				archive_set_error(&(a->archive),
				    ARCHIVE_ERRNO_MISC,
				    "Failed to clean up decompressor");
				return (ARCHIVE_FATAL);
			}
			xar->bzstream_valid = 0;
			/* FALLTHROUGH */
		case BZ_OK: /* Decompressor made some progress. */
			break;
		default:
			archive_set_error(&(a->archive),
			    ARCHIVE_ERRNO_MISC,
			    "bzip decompression failed");
			return (ARCHIVE_FATAL);
		}
		*used = avail_in - xar->bzstream.avail_in;
		*outbytes = avail_out - xar->bzstream.avail_out;
		break;
#endif
#if defined(HAVE_LZMA_H) && defined(HAVE_LIBLZMA)
	case LZMA:
	case XZ:
		xar->lzstream.next_in = b;
		xar->lzstream.avail_in = avail_in;
		xar->lzstream.next_out = (unsigned char *)outbuff;
		xar->lzstream.avail_out = avail_out;
		r = lzma_code(&(xar->lzstream), LZMA_RUN);
		switch (r) {
		case LZMA_STREAM_END: /* Found end of stream. */
			lzma_end(&(xar->lzstream));
			xar->lzstream_valid = 0;
			/* FALLTHROUGH */
		case LZMA_OK: /* Decompressor made some progress. */
			break;
		default:
			archive_set_error(&(a->archive),
			    ARCHIVE_ERRNO_MISC,
			    "%s decompression failed(%d)",
			    (xar->entry_encoding == XZ)?"xz":"lzma",
			    r);
			return (ARCHIVE_FATAL);
		}
		*used = avail_in - xar->lzstream.avail_in;
		*outbytes = avail_out - xar->lzstream.avail_out;
		break;
#elif defined(HAVE_LZMADEC_H) && defined(HAVE_LIBLZMADEC)
	case LZMA:
		xar->lzstream.next_in = (unsigned char *)(uintptr_t)b;
		xar->lzstream.avail_in = avail_in;
		xar->lzstream.next_out = (unsigned char *)outbuff;
		xar->lzstream.avail_out = avail_out;
		r = lzmadec_decode(&(xar->lzstream), 0);
		switch (r) {
		case LZMADEC_STREAM_END: /* Found end of stream. */
			switch (lzmadec_end(&(xar->lzstream))) {
			case LZMADEC_OK:
				break;
			default:
				archive_set_error(&(a->archive),
				    ARCHIVE_ERRNO_MISC,
				    "Failed to clean up lzmadec decompressor");
				return (ARCHIVE_FATAL);
			}
			xar->lzstream_valid = 0;
			/* FALLTHROUGH */
		case LZMADEC_OK: /* Decompressor made some progress. */
			break;
		default:
			archive_set_error(&(a->archive),
			    ARCHIVE_ERRNO_MISC,
			    "lzmadec decompression failed(%d)",
			    r);
			return (ARCHIVE_FATAL);
		}
		*used = avail_in - xar->lzstream.avail_in;
		*outbytes = avail_out - xar->lzstream.avail_out;
		break;
#endif
#ifndef HAVE_BZLIB_H
	case BZIP2:
#endif
#if !defined(HAVE_LZMA_H) || !defined(HAVE_LIBLZMA)
#if !defined(HAVE_LZMADEC_H) || !defined(HAVE_LIBLZMADEC)
	case LZMA:
#endif
	case XZ:
#endif
	case NONE:
	default:
		if (outbuff == xar->buff) {
			*buff = b;
			*used = avail_in;
			*outbytes = avail_in;
		} else {
			if (avail_out > avail_in)
				avail_out = avail_in;
			memcpy(outbuff, b, avail_out);
			*used = avail_out;
			*outbytes = avail_out;
		}
		break;
	}
	return (ARCHIVE_OK);
}

static int
decompression_cleanup(struct archive_read *a)
{
	struct xar *xar;
	int r;

	xar = (struct xar *)(a->format->data);
	r = ARCHIVE_OK;
	if (xar->stream_valid) {
		if (inflateEnd(&(xar->stream)) != Z_OK) {
			archive_set_error(&a->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Failed to clean up zlib decompressor");
			r = ARCHIVE_FATAL;
		}
	}
#ifdef HAVE_BZLIB_H
	if (xar->bzstream_valid) {
		if (BZ2_bzDecompressEnd(&(xar->bzstream)) != BZ_OK) {
			archive_set_error(&a->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Failed to clean up bzip2 decompressor");
			r = ARCHIVE_FATAL;
		}
	}
#endif
#if defined(HAVE_LZMA_H) && defined(HAVE_LIBLZMA)
	if (xar->lzstream_valid)
		lzma_end(&(xar->lzstream));
#elif defined(HAVE_LZMA_H) && defined(HAVE_LIBLZMA)
	if (xar->lzstream_valid) {
		if (lzmadec_end(&(xar->lzstream)) != LZMADEC_OK) {
			archive_set_error(&a->archive,
			    ARCHIVE_ERRNO_MISC,
			    "Failed to clean up lzmadec decompressor");
			r = ARCHIVE_FATAL;
		}
	}
#endif
	return (r);
}

static void
xmlattr_cleanup(struct xmlattr_list *list)
{
	struct xmlattr *attr, *next;

	attr = list->first;
	while (attr != NULL) {
		next = attr->next;
		free(attr->name);
		free(attr->value);
		free(attr);
		attr = next;
	}
	list->first = NULL;
	list->last = &(list->first);
}

static void
file_new(struct xar *xar, struct xmlattr_list *list)
{
	struct xar_file *file;
	struct xmlattr *attr;

	file = calloc(1, sizeof(*file));
	if (file == NULL)
		__archive_errx(1, "Out of memory");
	file->parent = xar->file;
	file->mode = 0777 | AE_IFREG;
	file->atime = time(NULL);
	file->mtime = time(NULL);
	xar->file = file;
	xar->xattr = NULL;
	for (attr = list->first; attr != NULL; attr = attr->next) {
		if (strcmp(attr->name, "id") == 0)
			file->id = atol10(attr->value, strlen(attr->value));
	}
	file->nlink = 1;
	heap_add_entry(&(xar->file_queue), file);
}

static void
file_free(struct xar_file *file)
{
	struct xattr *xattr;

	archive_string_free(&(file->pathname));
	archive_string_free(&(file->symlink));
	archive_string_free(&(file->uname));
	archive_string_free(&(file->gname));
	archive_string_free(&(file->hardlink));
	xattr = file->xattr_list;
	while (xattr != NULL) {
		struct xattr *next;

		next = xattr->next;
		xattr_free(xattr);
		xattr = next;
	}

	free(file);
}

static void
xattr_new(struct xar *xar, struct xmlattr_list *list)
{
	struct xattr *xattr, **nx;
	struct xmlattr *attr;

	xattr = calloc(1, sizeof(*xattr));
	if (xattr == NULL)
		__archive_errx(1, "Out of memory");
	xar->xattr = xattr;
	for (attr = list->first; attr != NULL; attr = attr->next) {
		if (strcmp(attr->name, "id") == 0)
			xattr->id = atol10(attr->value, strlen(attr->value));
	}
	/* Chain to xattr list. */
	for (nx = &(xar->file->xattr_list);
	    *nx != NULL; nx = &((*nx)->next)) {
		if (xattr->id < (*nx)->id)
			break;
	}
	xattr->next = *nx;
	*nx = xattr;
}

static void
xattr_free(struct xattr *xattr)
{
	archive_string_free(&(xattr->name));
	free(xattr);
}

static int
getencoding(struct xmlattr_list *list)
{
	struct xmlattr *attr;
	enum enctype encoding = NONE;

	for (attr = list->first; attr != NULL; attr = attr->next) {
		if (strcmp(attr->name, "style") == 0) {
			if (strcmp(attr->value, "application/octet-stream") == 0)
				encoding = NONE;
			else if (strcmp(attr->value, "application/x-gzip") == 0)
				encoding = GZIP;
			else if (strcmp(attr->value, "application/x-bzip2") == 0)
				encoding = BZIP2;
			else if (strcmp(attr->value, "application/x-lzma") == 0)
				encoding = LZMA;
			else if (strcmp(attr->value, "application/x-xz") == 0)
				encoding = XZ;
		}
	}
	return (encoding);
}

static int
getsumalgorithm(struct xmlattr_list *list)
{
	struct xmlattr *attr;
	int alg = CKSUM_NONE;

	for (attr = list->first; attr != NULL; attr = attr->next) {
		if (strcmp(attr->name, "style") == 0) {
			const char *v = attr->value;
			if ((v[0] == 'S' || v[0] == 's') &&
			    (v[1] == 'H' || v[1] == 'h') &&
			    (v[2] == 'A' || v[2] == 'a') &&
			    v[3] == '1' && v[4] == '\0')
				alg = CKSUM_SHA1;
			if ((v[0] == 'M' || v[0] == 'm') &&
			    (v[1] == 'D' || v[1] == 'd') &&
			    v[2] == '5' && v[3] == '\0')
				alg = CKSUM_MD5;
		}
	}
	return (alg);
}

static void
unknowntag_start(struct xar *xar, const char *name)
{
	struct unknown_tag *tag;

#if DEBUG
	fprintf(stderr, "unknowntag_start:%s\n", name);
#endif
	tag = malloc(sizeof(*tag));
	if (tag == NULL)
		__archive_errx(1, "Out of memory");
	tag->next = xar->unknowntags;
	archive_string_init(&(tag->name));
	archive_strcpy(&(tag->name), name);
	if (xar->unknowntags == NULL) {
		xar->xmlsts_unknown = xar->xmlsts;
		xar->xmlsts = UNKNOWN;
	}
	xar->unknowntags = tag;
}

static void
unknowntag_end(struct xar *xar, const char *name)
{
	struct unknown_tag *tag;

#if DEBUG
	fprintf(stderr, "unknowntag_end:%s\n", name);
#endif
	tag = xar->unknowntags;
	if (tag == NULL || name == NULL)
		return;
	if (strcmp(tag->name.s, name) == 0) {
		xar->unknowntags = tag->next;
		archive_string_free(&(tag->name));
		free(tag);
		if (xar->unknowntags == NULL)
			xar->xmlsts = xar->xmlsts_unknown;
	}
}

static void
xml_start(void *userData, const char *name, struct xmlattr_list *list)
{
	struct archive_read *a;
	struct xar *xar;
	struct xmlattr *attr;

	a = (struct archive_read *)userData;
	xar = (struct xar *)(a->format->data);

#if DEBUG
	fprintf(stderr, "xml_sta:[%s]\n", name);
	for (attr = list->first; attr != NULL; attr = attr->next)
		fprintf(stderr, "    attr:\"%s\"=\"%s\"\n",
		    attr->name, attr->value);
#endif
	xar->base64text = 0;
	switch (xar->xmlsts) {
	case INIT:
		if (strcmp(name, "xar") == 0)
			xar->xmlsts = XAR;
		else
			unknowntag_start(xar, name);
		break;
	case XAR:
		if (strcmp(name, "toc") == 0)
			xar->xmlsts = TOC;
		else
			unknowntag_start(xar, name);
		break;
	case TOC:
		if (strcmp(name, "creation-time") == 0)
			xar->xmlsts = TOC_CREATION_TIME;
		else if (strcmp(name, "checksum") == 0)
			xar->xmlsts = TOC_CHECKSUM;
		else if (strcmp(name, "file") == 0) {
			file_new(xar, list);
			xar->xmlsts = TOC_FILE;
		}
		else
			unknowntag_start(xar, name);
		break;
	case TOC_CHECKSUM:
		if (strcmp(name, "offset") == 0)
			xar->xmlsts = TOC_CHECKSUM_OFFSET;
		else if (strcmp(name, "size") == 0)
			xar->xmlsts = TOC_CHECKSUM_SIZE;
		else
			unknowntag_start(xar, name);
		break;
	case TOC_FILE:
		if (strcmp(name, "file") == 0) {
			file_new(xar, list);
		}
		else if (strcmp(name, "data") == 0)
			xar->xmlsts = FILE_DATA;
		else if (strcmp(name, "ea") == 0) {
			xattr_new(xar, list);
			xar->xmlsts = FILE_EA;
		}
		else if (strcmp(name, "ctime") == 0)
			xar->xmlsts = FILE_CTIME;
		else if (strcmp(name, "mtime") == 0)
			xar->xmlsts = FILE_MTIME;
		else if (strcmp(name, "atime") == 0)
			xar->xmlsts = FILE_ATIME;
		else if (strcmp(name, "group") == 0)
			xar->xmlsts = FILE_GROUP;
		else if (strcmp(name, "gid") == 0)
			xar->xmlsts = FILE_GID;
		else if (strcmp(name, "user") == 0)
			xar->xmlsts = FILE_USER;
		else if (strcmp(name, "uid") == 0)
			xar->xmlsts = FILE_UID;
		else if (strcmp(name, "mode") == 0)
			xar->xmlsts = FILE_MODE;
		else if (strcmp(name, "device") == 0)
			xar->xmlsts = FILE_DEVICE;
		else if (strcmp(name, "deviceno") == 0)
			xar->xmlsts = FILE_DEVICENO;
		else if (strcmp(name, "inode") == 0)
			xar->xmlsts = FILE_INODE;
		else if (strcmp(name, "link") == 0)
			xar->xmlsts = FILE_LINK;
		else if (strcmp(name, "type") == 0) {
			xar->xmlsts = FILE_TYPE;
			for (attr = list->first; attr != NULL;
			    attr = attr->next) {
				if (strcmp(attr->name, "link") != 0)
					continue;
				if (strcmp(attr->value, "original") == 0) {
					xar->file->hdnext = xar->hdlink_orgs;
					xar->hdlink_orgs = xar->file;
				} else {
					xar->file->link = atol10(attr->value,
					    strlen(attr->value));
					if (xar->file->link > 0)
						add_link(xar, xar->file);
				}
			}
		}
		else if (strcmp(name, "name") == 0) {
			xar->xmlsts = FILE_NAME;
			for (attr = list->first; attr != NULL;
			    attr = attr->next) {
				if (strcmp(attr->name, "enctype") == 0 &&
				    strcmp(attr->value, "base64") == 0)
					xar->base64text = 1;
			}
		}
		else if (strcmp(name, "acl") == 0)
			xar->xmlsts = FILE_ACL;
		else if (strcmp(name, "flags") == 0)
			xar->xmlsts = FILE_FLAGS;
		else if (strcmp(name, "ext2") == 0)
			xar->xmlsts = FILE_EXT2;
		else
			unknowntag_start(xar, name);
		break;
	case FILE_DATA:
		if (strcmp(name, "length") == 0)
			xar->xmlsts = FILE_DATA_LENGTH;
		else if (strcmp(name, "offset") == 0)
			xar->xmlsts = FILE_DATA_OFFSET;
		else if (strcmp(name, "size") == 0)
			xar->xmlsts = FILE_DATA_SIZE;
		else if (strcmp(name, "encoding") == 0) {
			xar->xmlsts = FILE_DATA_ENCODING;
			xar->file->encoding = getencoding(list);
		}
		else if (strcmp(name, "archived-checksum") == 0) {
			xar->xmlsts = FILE_DATA_A_CHECKSUM;
			xar->file->a_sum.alg = getsumalgorithm(list);
		}
		else if (strcmp(name, "extracted-checksum") == 0) {
			xar->xmlsts = FILE_DATA_E_CHECKSUM;
			xar->file->e_sum.alg = getsumalgorithm(list);
		}
		else if (strcmp(name, "content") == 0)
			xar->xmlsts = FILE_DATA_CONTENT;
		else
			unknowntag_start(xar, name);
		break;
	case FILE_DEVICE:
		if (strcmp(name, "major") == 0)
			xar->xmlsts = FILE_DEVICE_MAJOR;
		else if (strcmp(name, "minor") == 0)
			xar->xmlsts = FILE_DEVICE_MINOR;
		else
			unknowntag_start(xar, name);
		break;
	case FILE_DATA_CONTENT:
		unknowntag_start(xar, name);
		break;
	case FILE_EA:
		if (strcmp(name, "length") == 0)
			xar->xmlsts = FILE_EA_LENGTH;
		else if (strcmp(name, "offset") == 0)
			xar->xmlsts = FILE_EA_OFFSET;
		else if (strcmp(name, "size") == 0)
			xar->xmlsts = FILE_EA_SIZE;
		else if (strcmp(name, "encoding") == 0) {
			xar->xmlsts = FILE_EA_ENCODING;
			xar->xattr->encoding = getencoding(list);
		} else if (strcmp(name, "archived-checksum") == 0)
			xar->xmlsts = FILE_EA_A_CHECKSUM;
		else if (strcmp(name, "extracted-checksum") == 0)
			xar->xmlsts = FILE_EA_E_CHECKSUM;
		else if (strcmp(name, "name") == 0)
			xar->xmlsts = FILE_EA_NAME;
		else if (strcmp(name, "fstype") == 0)
			xar->xmlsts = FILE_EA_FSTYPE;
		else
			unknowntag_start(xar, name);
		break;
	case FILE_ACL:
		if (strcmp(name, "appleextended") == 0)
			xar->xmlsts = FILE_ACL_APPLEEXTENDED;
		if (strcmp(name, "default") == 0)
			xar->xmlsts = FILE_ACL_DEFAULT;
		else if (strcmp(name, "access") == 0)
			xar->xmlsts = FILE_ACL_ACCESS;
		else
			unknowntag_start(xar, name);
		break;
	case FILE_FLAGS:
		if (!xml_parse_file_flags(xar, name))
			unknowntag_start(xar, name);
		break;
	case FILE_EXT2:
		if (!xml_parse_file_ext2(xar, name))
			unknowntag_start(xar, name);
		break;
	case TOC_CREATION_TIME:
	case TOC_CHECKSUM_OFFSET:
	case TOC_CHECKSUM_SIZE:
	case FILE_DATA_LENGTH:
	case FILE_DATA_OFFSET:
	case FILE_DATA_SIZE:
	case FILE_DATA_ENCODING:
	case FILE_DATA_A_CHECKSUM:
	case FILE_DATA_E_CHECKSUM:
	case FILE_EA_LENGTH:
	case FILE_EA_OFFSET:
	case FILE_EA_SIZE:
	case FILE_EA_ENCODING:
	case FILE_EA_A_CHECKSUM:
	case FILE_EA_E_CHECKSUM:
	case FILE_EA_NAME:
	case FILE_EA_FSTYPE:
	case FILE_CTIME:
	case FILE_MTIME:
	case FILE_ATIME:
	case FILE_GROUP:
	case FILE_GID:
	case FILE_USER:
	case FILE_UID:
	case FILE_INODE:
	case FILE_DEVICE_MAJOR:
	case FILE_DEVICE_MINOR:
	case FILE_DEVICENO:
	case FILE_MODE:
	case FILE_TYPE:
	case FILE_LINK:
	case FILE_NAME:
	case FILE_ACL_DEFAULT:
	case FILE_ACL_ACCESS:
	case FILE_ACL_APPLEEXTENDED:
	case FILE_FLAGS_USER_NODUMP:
	case FILE_FLAGS_USER_IMMUTABLE:
	case FILE_FLAGS_USER_APPEND:
	case FILE_FLAGS_USER_OPAQUE:
	case FILE_FLAGS_USER_NOUNLINK:
	case FILE_FLAGS_SYS_ARCHIVED:
	case FILE_FLAGS_SYS_IMMUTABLE:
	case FILE_FLAGS_SYS_APPEND:
	case FILE_FLAGS_SYS_NOUNLINK:
	case FILE_FLAGS_SYS_SNAPSHOT:
	case FILE_EXT2_SecureDeletion:
	case FILE_EXT2_Undelete:
	case FILE_EXT2_Compress:
	case FILE_EXT2_Synchronous:
	case FILE_EXT2_Immutable:
	case FILE_EXT2_AppendOnly:
	case FILE_EXT2_NoDump:
	case FILE_EXT2_NoAtime:
	case FILE_EXT2_CompDirty:
	case FILE_EXT2_CompBlock:
	case FILE_EXT2_NoCompBlock:
	case FILE_EXT2_CompError:
	case FILE_EXT2_BTree:
	case FILE_EXT2_HashIndexed:
	case FILE_EXT2_iMagic:
	case FILE_EXT2_Journaled:
	case FILE_EXT2_NoTail:
	case FILE_EXT2_DirSync:
	case FILE_EXT2_TopDir:
	case FILE_EXT2_Reserved:
	case UNKNOWN:
		unknowntag_start(xar, name);
		break;
	}
}

static void
xml_end(void *userData, const char *name)
{
	struct archive_read *a;
	struct xar *xar;

	a = (struct archive_read *)userData;
	xar = (struct xar *)(a->format->data);

#if DEBUG
	fprintf(stderr, "xml_end:[%s]\n", name);
#endif
	switch (xar->xmlsts) {
	case INIT:
		break;
	case XAR:
		if (strcmp(name, "xar") == 0)
			xar->xmlsts = INIT;
		break;
	case TOC:
		if (strcmp(name, "toc") == 0)
			xar->xmlsts = XAR;
		break;
	case TOC_CREATION_TIME:
		if (strcmp(name, "creation-time") == 0)
			xar->xmlsts = TOC;
		break;
	case TOC_CHECKSUM:
		if (strcmp(name, "checksum") == 0)
			xar->xmlsts = TOC;
		break;
	case TOC_CHECKSUM_OFFSET:
		if (strcmp(name, "offset") == 0)
			xar->xmlsts = TOC_CHECKSUM;
		break;
	case TOC_CHECKSUM_SIZE:
		if (strcmp(name, "size") == 0)
			xar->xmlsts = TOC_CHECKSUM;
		break;
	case TOC_FILE:
		if (strcmp(name, "file") == 0) {
			if (xar->file->parent != NULL &&
			    ((xar->file->mode & AE_IFMT) == AE_IFDIR))
				xar->file->parent->subdirs++;
			xar->file = xar->file->parent;
			if (xar->file == NULL)
				xar->xmlsts = TOC;
		}
		break;
	case FILE_DATA:
		if (strcmp(name, "data") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_DATA_LENGTH:
		if (strcmp(name, "length") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_OFFSET:
		if (strcmp(name, "offset") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_SIZE:
		if (strcmp(name, "size") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_ENCODING:
		if (strcmp(name, "encoding") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_A_CHECKSUM:
		if (strcmp(name, "archived-checksum") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_E_CHECKSUM:
		if (strcmp(name, "extracted-checksum") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_DATA_CONTENT:
		if (strcmp(name, "content") == 0)
			xar->xmlsts = FILE_DATA;
		break;
	case FILE_EA:
		if (strcmp(name, "ea") == 0) {
			xar->xmlsts = TOC_FILE;
			xar->xattr = NULL;
		}
		break;
	case FILE_EA_LENGTH:
		if (strcmp(name, "length") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_OFFSET:
		if (strcmp(name, "offset") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_SIZE:
		if (strcmp(name, "size") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_ENCODING:
		if (strcmp(name, "encoding") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_A_CHECKSUM:
		if (strcmp(name, "archived-checksum") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_E_CHECKSUM:
		if (strcmp(name, "extracted-checksum") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_NAME:
		if (strcmp(name, "name") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_EA_FSTYPE:
		if (strcmp(name, "fstype") == 0)
			xar->xmlsts = FILE_EA;
		break;
	case FILE_CTIME:
		if (strcmp(name, "ctime") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_MTIME:
		if (strcmp(name, "mtime") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_ATIME:
		if (strcmp(name, "atime") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_GROUP:
		if (strcmp(name, "group") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_GID:
		if (strcmp(name, "gid") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_USER:
		if (strcmp(name, "user") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_UID:
		if (strcmp(name, "uid") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_MODE:
		if (strcmp(name, "mode") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_DEVICE:
		if (strcmp(name, "device") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_DEVICE_MAJOR:
		if (strcmp(name, "major") == 0)
			xar->xmlsts = FILE_DEVICE;
		break;
	case FILE_DEVICE_MINOR:
		if (strcmp(name, "minor") == 0)
			xar->xmlsts = FILE_DEVICE;
		break;
	case FILE_DEVICENO:
		if (strcmp(name, "deviceno") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_INODE:
		if (strcmp(name, "inode") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_LINK:
		if (strcmp(name, "link") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_TYPE:
		if (strcmp(name, "type") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_NAME:
		if (strcmp(name, "name") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_ACL:
		if (strcmp(name, "acl") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_ACL_DEFAULT:
		if (strcmp(name, "default") == 0)
			xar->xmlsts = FILE_ACL;
		break;
	case FILE_ACL_ACCESS:
		if (strcmp(name, "access") == 0)
			xar->xmlsts = FILE_ACL;
		break;
	case FILE_ACL_APPLEEXTENDED:
		if (strcmp(name, "appleextended") == 0)
			xar->xmlsts = FILE_ACL;
		break;
	case FILE_FLAGS:
		if (strcmp(name, "flags") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_FLAGS_USER_NODUMP:
		if (strcmp(name, "UserNoDump") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_USER_IMMUTABLE:
		if (strcmp(name, "UserImmutable") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_USER_APPEND:
		if (strcmp(name, "UserAppend") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_USER_OPAQUE:
		if (strcmp(name, "UserOpaque") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_USER_NOUNLINK:
		if (strcmp(name, "UserNoUnlink") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_SYS_ARCHIVED:
		if (strcmp(name, "SystemArchived") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_SYS_IMMUTABLE:
		if (strcmp(name, "SystemImmutable") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_SYS_APPEND:
		if (strcmp(name, "SystemAppend") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_SYS_NOUNLINK:
		if (strcmp(name, "SystemNoUnlink") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_FLAGS_SYS_SNAPSHOT:
		if (strcmp(name, "SystemSnapshot") == 0)
			xar->xmlsts = FILE_FLAGS;
		break;
	case FILE_EXT2:
		if (strcmp(name, "ext2") == 0)
			xar->xmlsts = TOC_FILE;
		break;
	case FILE_EXT2_SecureDeletion:
		if (strcmp(name, "SecureDeletion") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Undelete:
		if (strcmp(name, "Undelete") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Compress:
		if (strcmp(name, "Compress") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Synchronous:
		if (strcmp(name, "Synchronous") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Immutable:
		if (strcmp(name, "Immutable") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_AppendOnly:
		if (strcmp(name, "AppendOnly") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_NoDump:
		if (strcmp(name, "NoDump") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_NoAtime:
		if (strcmp(name, "NoAtime") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_CompDirty:
		if (strcmp(name, "CompDirty") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_CompBlock:
		if (strcmp(name, "CompBlock") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_NoCompBlock:
		if (strcmp(name, "NoCompBlock") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_CompError:
		if (strcmp(name, "CompError") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_BTree:
		if (strcmp(name, "BTree") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_HashIndexed:
		if (strcmp(name, "HashIndexed") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_iMagic:
		if (strcmp(name, "iMagic") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Journaled:
		if (strcmp(name, "Journaled") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_NoTail:
		if (strcmp(name, "NoTail") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_DirSync:
		if (strcmp(name, "DirSync") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_TopDir:
		if (strcmp(name, "TopDir") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case FILE_EXT2_Reserved:
		if (strcmp(name, "Reserved") == 0)
			xar->xmlsts = FILE_EXT2;
		break;
	case UNKNOWN:
		unknowntag_end(xar, name);
		break;
	}
}

static const int base64[256] = {
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* 00 - 0F */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* 10 - 1F */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, 62, -1, -1, -1, 63, /* 20 - 2F */
	52, 53, 54, 55, 56, 57, 58, 59,
	60, 61, -1, -1, -1, -1, -1, -1, /* 30 - 3F */
	-1,  0,  1,  2,  3,  4,  5,  6,
	 7,  8,  9, 10, 11, 12, 13, 14, /* 40 - 4F */
	15, 16, 17, 18, 19, 20, 21, 22,
	23, 24, 25, -1, -1, -1, -1, -1, /* 50 - 5F */
	-1, 26, 27, 28, 29, 30, 31, 32,
	33, 34, 35, 36, 37, 38, 39, 40, /* 60 - 6F */
	41, 42, 43, 44, 45, 46, 47, 48,
	49, 50, 51, -1, -1, -1, -1, -1, /* 70 - 7F */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* 80 - 8F */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* 90 - 9F */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* A0 - AF */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* B0 - BF */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* C0 - CF */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* D0 - DF */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* E0 - EF */
	-1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, /* F0 - FF */
};

static void
strappend_base64(struct archive_string *as, const char *s, size_t l)
{
	unsigned char buff[256];
	unsigned char *out;
	const unsigned char *b;
	size_t len;

	len = 0;
	out = buff;
	b = (const unsigned char *)s;
	while (l > 0) {
		int n = 0;

		if (l > 0) {
			if (base64[b[0]] < 0 || base64[b[1]] < 0)
				break;
			n = base64[*b++] << 18;
			n |= base64[*b++] << 12;
			*out++ = n >> 16;
			len++;
			l -= 2;
		}
		if (l > 0) {
			if (base64[*b] < 0)
				break;
			n |= base64[*b++] << 6;
			*out++ = (n >> 8) & 0xFF;
			len++;
			--l;
		}
		if (l > 0) {
			if (base64[*b] < 0)
				break;
			n |= base64[*b++];
			*out++ = n & 0xFF;
			len++;
			--l;
		}
		if (len+3 >= sizeof(buff)) {
			archive_strncat(as, (const char *)buff, len);
			len = 0;
			out = buff;
		}
	}
	if (len > 0)
		archive_strncat(as, (const char *)buff, len);
}

static void
xml_data(void *userData, const char *s, int len)
{
	struct archive_read *a;
	struct xar *xar;

	a = (struct archive_read *)userData;
	xar = (struct xar *)(a->format->data);

#if DEBUG
	{
		char buff[1024];
		if (len > sizeof(buff)-1)
			len = sizeof(buff)-1;
		memcpy(buff, s, len);
		buff[len] = 0;
		fprintf(stderr, "\tlen=%d:\"%s\"\n", len, buff);
	}
#endif
	switch (xar->xmlsts) {
	case TOC_CHECKSUM_OFFSET:
		xar->toc_chksum_offset = atol10(s, len);
		break;
	case TOC_CHECKSUM_SIZE:
		xar->toc_chksum_size = atol10(s, len);
		break;
	default:
		break;
	}
	if (xar->file == NULL)
		return;

	switch (xar->xmlsts) {
	case FILE_NAME:
		if (xar->file->parent != NULL) {
			archive_string_concat(&(xar->file->pathname),
			    &(xar->file->parent->pathname));
			archive_strappend_char(&(xar->file->pathname), '/');
		}
		xar->file->has |= HAS_PATHNAME;
		if (xar->base64text)
			strappend_base64(&(xar->file->pathname), s, len);
		else
			archive_strncat(&(xar->file->pathname), s, len);
		break;
	case FILE_LINK:
		xar->file->has |= HAS_SYMLINK;
		archive_strncpy(&(xar->file->symlink), s, len);
		break;
	case FILE_TYPE:
		if (strncmp("file", s, len) == 0 ||
		    strncmp("hardlink", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFREG;
		if (strncmp("directory", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFDIR;
		if (strncmp("symlink", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFLNK;
		if (strncmp("character special", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFCHR;
		if (strncmp("block special", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFBLK;
		if (strncmp("socket", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFSOCK;
		if (strncmp("fifo", s, len) == 0)
			xar->file->mode =
			    (xar->file->mode & ~AE_IFMT) | AE_IFIFO;
		xar->file->has |= HAS_TYPE;
		break;
	case FILE_INODE:
		xar->file->has |= HAS_INO;
		xar->file->ino64 = atol10(s, len);
		break;
	case FILE_DEVICE_MAJOR:
		xar->file->has |= HAS_DEVMAJOR;
		xar->file->devmajor = (dev_t)atol10(s, len);
		break;
	case FILE_DEVICE_MINOR:
		xar->file->has |= HAS_DEVMINOR;
		xar->file->devminor = (dev_t)atol10(s, len);
		break;
	case FILE_DEVICENO:
		xar->file->has |= HAS_DEV;
		xar->file->dev = (dev_t)atol10(s, len);
		break;
	case FILE_MODE:
		xar->file->has |= HAS_MODE;
		xar->file->mode =
		    (xar->file->mode & AE_IFMT) |
		    (atol8(s, len) & ~AE_IFMT);
		break;
	case FILE_GROUP:
		xar->file->has |= HAS_GID;
		archive_strncpy(&(xar->file->gname), s, len);
		break;
	case FILE_GID:
		xar->file->has |= HAS_GID;
		xar->file->gid = atol10(s, len);
		break;
	case FILE_USER:
		xar->file->has |= HAS_UID;
		archive_strncpy(&(xar->file->uname), s, len);
		break;
	case FILE_UID:
		xar->file->has |= HAS_UID;
		xar->file->uid = atol10(s, len);
		break;
	case FILE_CTIME:
		xar->file->has |= HAS_TIME;
		xar->file->ctime = parse_time(s, len);
		break;
	case FILE_MTIME:
		xar->file->has |= HAS_TIME;
		xar->file->mtime = parse_time(s, len);
		break;
	case FILE_ATIME:
		xar->file->has |= HAS_TIME;
		xar->file->atime = parse_time(s, len);
		break;
	case FILE_DATA_LENGTH:
		xar->file->has |= HAS_DATA;
		xar->file->length = atol10(s, len);
		break;
	case FILE_DATA_OFFSET:
		xar->file->has |= HAS_DATA;
		xar->file->offset = atol10(s, len);
		break;
	case FILE_DATA_SIZE:
		xar->file->has |= HAS_DATA;
		xar->file->size = atol10(s, len);
		break;
	case FILE_DATA_A_CHECKSUM:
		xar->file->a_sum.len = atohex(xar->file->a_sum.val,
		    sizeof(xar->file->a_sum.val), s, len);
		break;
	case FILE_DATA_E_CHECKSUM:
		xar->file->e_sum.len = atohex(xar->file->e_sum.val,
		    sizeof(xar->file->e_sum.val), s, len);
		break;
	case FILE_EA_LENGTH:
		xar->file->has |= HAS_XATTR;
		xar->xattr->length = atol10(s, len);
		break;
	case FILE_EA_OFFSET:
		xar->file->has |= HAS_XATTR;
		xar->xattr->offset = atol10(s, len);
		break;
	case FILE_EA_SIZE:
		xar->file->has |= HAS_XATTR;
		xar->xattr->size = atol10(s, len);
		break;
	case FILE_EA_A_CHECKSUM:
		xar->file->has |= HAS_XATTR;
		xar->xattr->a_sum.len = atohex(xar->xattr->a_sum.val,
		    sizeof(xar->xattr->a_sum.val), s, len);
		break;
	case FILE_EA_E_CHECKSUM:
		xar->file->has |= HAS_XATTR;
		xar->xattr->e_sum.len = atohex(xar->xattr->e_sum.val,
		    sizeof(xar->xattr->e_sum.val), s, len);
		break;
	case FILE_EA_NAME:
		xar->file->has |= HAS_XATTR;
		archive_strncpy(&(xar->xattr->name), s, len);
		break;
	case FILE_EA_FSTYPE:
		xar->file->has |= HAS_XATTR;
		archive_strncpy(&(xar->xattr->fstype), s, len);
		break;
		break;
	case FILE_ACL_DEFAULT:
	case FILE_ACL_ACCESS:
	case FILE_ACL_APPLEEXTENDED:
		xar->file->has |= HAS_ACL;
		/* TODO */
		break;
	case INIT:
	case XAR:
	case TOC:
	case TOC_CREATION_TIME:
	case TOC_CHECKSUM:
	case TOC_CHECKSUM_OFFSET:
	case TOC_CHECKSUM_SIZE:
	case TOC_FILE:
	case FILE_DATA:
	case FILE_DATA_ENCODING:
	case FILE_DATA_CONTENT:
	case FILE_DEVICE:
	case FILE_EA:
	case FILE_EA_ENCODING:
	case FILE_ACL:
	case FILE_FLAGS:
	case FILE_FLAGS_USER_NODUMP:
	case FILE_FLAGS_USER_IMMUTABLE:
	case FILE_FLAGS_USER_APPEND:
	case FILE_FLAGS_USER_OPAQUE:
	case FILE_FLAGS_USER_NOUNLINK:
	case FILE_FLAGS_SYS_ARCHIVED:
	case FILE_FLAGS_SYS_IMMUTABLE:
	case FILE_FLAGS_SYS_APPEND:
	case FILE_FLAGS_SYS_NOUNLINK:
	case FILE_FLAGS_SYS_SNAPSHOT:
	case FILE_EXT2:
	case FILE_EXT2_SecureDeletion:
	case FILE_EXT2_Undelete:
	case FILE_EXT2_Compress:
	case FILE_EXT2_Synchronous:
	case FILE_EXT2_Immutable:
	case FILE_EXT2_AppendOnly:
	case FILE_EXT2_NoDump:
	case FILE_EXT2_NoAtime:
	case FILE_EXT2_CompDirty:
	case FILE_EXT2_CompBlock:
	case FILE_EXT2_NoCompBlock:
	case FILE_EXT2_CompError:
	case FILE_EXT2_BTree:
	case FILE_EXT2_HashIndexed:
	case FILE_EXT2_iMagic:
	case FILE_EXT2_Journaled:
	case FILE_EXT2_NoTail:
	case FILE_EXT2_DirSync:
	case FILE_EXT2_TopDir:
	case FILE_EXT2_Reserved:
	case UNKNOWN:
		break;
	}
}

/*
 * BSD file flags.
 */
static int
xml_parse_file_flags(struct xar *xar, const char *name)
{
	const char *flag = NULL;

	if (strcmp(name, "UserNoDump") == 0) {
		xar->xmlsts = FILE_FLAGS_USER_NODUMP;
		flag = "nodump";
	}
	else if (strcmp(name, "UserImmutable") == 0) {
		xar->xmlsts = FILE_FLAGS_USER_IMMUTABLE;
		flag = "uimmutable";
	}
	else if (strcmp(name, "UserAppend") == 0) {
		xar->xmlsts = FILE_FLAGS_USER_APPEND;
		flag = "uappend";
	}
	else if (strcmp(name, "UserOpaque") == 0) {
		xar->xmlsts = FILE_FLAGS_USER_OPAQUE;
		flag = "opaque";
	}
	else if (strcmp(name, "UserNoUnlink") == 0) {
		xar->xmlsts = FILE_FLAGS_USER_NOUNLINK;
		flag = "nouunlink";
	}
	else if (strcmp(name, "SystemArchived") == 0) {
		xar->xmlsts = FILE_FLAGS_SYS_ARCHIVED;
		flag = "archived";
	}
	else if (strcmp(name, "SystemImmutable") == 0) {
		xar->xmlsts = FILE_FLAGS_SYS_IMMUTABLE;
		flag = "simmutable";
	}
	else if (strcmp(name, "SystemAppend") == 0) {
		xar->xmlsts = FILE_FLAGS_SYS_APPEND;
		flag = "sappend";
	}
	else if (strcmp(name, "SystemNoUnlink") == 0) {
		xar->xmlsts = FILE_FLAGS_SYS_NOUNLINK;
		flag = "nosunlink";
	}
	else if (strcmp(name, "SystemSnapshot") == 0) {
		xar->xmlsts = FILE_FLAGS_SYS_SNAPSHOT;
		flag = "snapshot";
	}

	if (flag == NULL)
		return (0);
	xar->file->has |= HAS_FFLAGS;
	if (archive_strlen(&(xar->file->fflags_text)) > 0)
		archive_strappend_char(&(xar->file->fflags_text), ',');
	archive_strcat(&(xar->file->fflags_text), flag);
	return (1);
}

/*
 * Linux file flags.
 */
static int
xml_parse_file_ext2(struct xar *xar, const char *name)
{
	const char *flag = NULL;

	if (strcmp(name, "SecureDeletion") == 0) {
		xar->xmlsts = FILE_EXT2_SecureDeletion;
		flag = "securedeletion";
	}
	else if (strcmp(name, "Undelete") == 0) {
		xar->xmlsts = FILE_EXT2_Undelete;
		flag = "nouunlink";
	}
	else if (strcmp(name, "Compress") == 0) {
		xar->xmlsts = FILE_EXT2_Compress;
		flag = "compress";
	}
	else if (strcmp(name, "Synchronous") == 0) {
		xar->xmlsts = FILE_EXT2_Synchronous;
		flag = "sync";
	}
	else if (strcmp(name, "Immutable") == 0) {
		xar->xmlsts = FILE_EXT2_Immutable;
		flag = "simmutable";
	}
	else if (strcmp(name, "AppendOnly") == 0) {
		xar->xmlsts = FILE_EXT2_AppendOnly;
		flag = "sappend";
	}
	else if (strcmp(name, "NoDump") == 0) {
		xar->xmlsts = FILE_EXT2_NoDump;
		flag = "nodump";
	}
	else if (strcmp(name, "NoAtime") == 0) {
		xar->xmlsts = FILE_EXT2_NoAtime;
		flag = "noatime";
	}
	else if (strcmp(name, "CompDirty") == 0) {
		xar->xmlsts = FILE_EXT2_CompDirty;
		flag = "compdirty";
	}
	else if (strcmp(name, "CompBlock") == 0) {
		xar->xmlsts = FILE_EXT2_CompBlock;
		flag = "comprblk";
	}
	else if (strcmp(name, "NoCompBlock") == 0) {
		xar->xmlsts = FILE_EXT2_NoCompBlock;
		flag = "nocomprblk";
	}
	else if (strcmp(name, "CompError") == 0) {
		xar->xmlsts = FILE_EXT2_CompError;
		flag = "comperr";
	}
	else if (strcmp(name, "BTree") == 0) {
		xar->xmlsts = FILE_EXT2_BTree;
		flag = "btree";
	}
	else if (strcmp(name, "HashIndexed") == 0) {
		xar->xmlsts = FILE_EXT2_HashIndexed;
		flag = "hashidx";
	}
	else if (strcmp(name, "iMagic") == 0) {
		xar->xmlsts = FILE_EXT2_iMagic;
		flag = "imagic";
	}
	else if (strcmp(name, "Journaled") == 0) {
		xar->xmlsts = FILE_EXT2_Journaled;
		flag = "journal";
	}
	else if (strcmp(name, "NoTail") == 0) {
		xar->xmlsts = FILE_EXT2_NoTail;
		flag = "notail";
	}
	else if (strcmp(name, "DirSync") == 0) {
		xar->xmlsts = FILE_EXT2_DirSync;
		flag = "dirsync";
	}
	else if (strcmp(name, "TopDir") == 0) {
		xar->xmlsts = FILE_EXT2_TopDir;
		flag = "topdir";
	}
	else if (strcmp(name, "Reserved") == 0) {
		xar->xmlsts = FILE_EXT2_Reserved;
		flag = "reserved";
	}

	if (flag == NULL)
		return (0);
	if (archive_strlen(&(xar->file->fflags_text)) > 0)
		archive_strappend_char(&(xar->file->fflags_text), ',');
	archive_strcat(&(xar->file->fflags_text), flag);
	return (1);
}

#ifdef HAVE_LIBXML_XMLREADER_H

static int
xml2_xmlattr_setup(struct xmlattr_list *list, xmlTextReaderPtr reader)
{
	struct xmlattr *attr;
	int r;

	list->first = NULL;
	list->last = &(list->first);
	r = xmlTextReaderMoveToFirstAttribute(reader);
	while (r == 1) {
		attr = malloc(sizeof*(attr));
		if (attr == NULL)
			__archive_errx(1, "Out of memory");
		attr->name = strdup(
		    (const char *)xmlTextReaderConstLocalName(reader));
		if (attr->name == NULL)
			__archive_errx(1, "Out of memory");
		attr->value = strdup(
		    (const char *)xmlTextReaderConstValue(reader));
		if (attr->value == NULL)
			__archive_errx(1, "Out of memory");
		attr->next = NULL;
		*list->last = attr;
		list->last = &(attr->next);
		r = xmlTextReaderMoveToNextAttribute(reader);
	}
	return (r);
}

static int
xml2_read_cb(void *context, char *buffer, int len)
{
	struct archive_read *a;
	struct xar *xar;
	const void *d;
	size_t outbytes;
	size_t used;
	int r;

	a = (struct archive_read *)context;
	xar = (struct xar *)(a->format->data);

	if (xar->toc_remaining <= 0)
		return (0);
	d = buffer;
	outbytes = len;
	r = rd_contents(a, &d, &outbytes, &used, xar->toc_remaining);
	if (r != ARCHIVE_OK)
		return (r);
	__archive_read_consume(a, used);
	xar->toc_remaining -= used;
	xar->offset += used;
	xar->toc_total += outbytes;
	PRINT_TOC(buffer, len);

	return ((int)outbytes);
}

static int
xml2_close_cb(void *context)
{

	(void)context; /* UNUSED */
	return (0);
}

static void
xml2_error_hdr(void *arg, const char *msg, xmlParserSeverities severity,
    xmlTextReaderLocatorPtr locator)
{
	struct archive_read *a;

	(void)locator; /* UNUSED */
	a = (struct archive_read *)arg;
	switch (severity) {
	case XML_PARSER_SEVERITY_VALIDITY_WARNING:
	case XML_PARSER_SEVERITY_WARNING:
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "XML Parsing error: %s", msg);
		break;
	case XML_PARSER_SEVERITY_VALIDITY_ERROR:
	case XML_PARSER_SEVERITY_ERROR:
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "XML Parsing error: %s", msg);
		break;
	}
}

static int
xml2_read_toc(struct archive_read *a)
{
	xmlTextReaderPtr reader;
	struct xmlattr_list list;
	int r;

	reader = xmlReaderForIO(xml2_read_cb, xml2_close_cb, a, NULL, NULL, 0);
	if (reader == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Couldn't allocate memory for xml parser");
		return (ARCHIVE_FATAL);
	}
	xmlTextReaderSetErrorHandler(reader, xml2_error_hdr, a);

	while ((r = xmlTextReaderRead(reader)) == 1) {
		const char *name, *value;
		int type, empty;

		type = xmlTextReaderNodeType(reader);
		name = (const char *)xmlTextReaderConstLocalName(reader);
		switch (type) {
		case XML_READER_TYPE_ELEMENT:
			empty = xmlTextReaderIsEmptyElement(reader);
			r = xml2_xmlattr_setup(&list, reader);
			if (r == 0) {
				xml_start(a, name, &list);
				xmlattr_cleanup(&list);
				if (empty)
					xml_end(a, name);
			}
			break;
		case XML_READER_TYPE_END_ELEMENT:
			xml_end(a, name);
			break;
		case XML_READER_TYPE_TEXT:
			value = (const char *)xmlTextReaderConstValue(reader);
			xml_data(a, value, strlen(value));
			break;
		case XML_READER_TYPE_SIGNIFICANT_WHITESPACE:
		default:
			break;
		}
		if (r < 0)
			break;
	}
	xmlFreeTextReader(reader);
	xmlCleanupParser();

	return ((r == 0)?ARCHIVE_OK:ARCHIVE_FATAL);
}

#elif defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H)

static void
expat_xmlattr_setup(struct xmlattr_list *list, const XML_Char **atts)
{
	struct xmlattr *attr;

	list->first = NULL;
	list->last = &(list->first);
	if (atts == NULL)
		return;
	while (atts[0] != NULL && atts[1] != NULL) {
		attr = malloc(sizeof*(attr));
		if (attr == NULL)
			__archive_errx(1, "Out of memory");
		attr->name = strdup(atts[0]);
		if (attr->name == NULL)
			__archive_errx(1, "Out of memory");
		attr->value = strdup(atts[1]);
		if (attr->value == NULL)
			__archive_errx(1, "Out of memory");
		attr->next = NULL;
		*list->last = attr;
		list->last = &(attr->next);
		atts += 2;
	}
}

static void
expat_start_cb(void *userData, const XML_Char *name, const XML_Char **atts)
{
	struct xmlattr_list list;

	expat_xmlattr_setup(&list, atts);
	xml_start(userData, (const char *)name, &list);
	xmlattr_cleanup(&list);
}

static void
expat_end_cb(void *userData, const XML_Char *name)
{
	xml_end(userData, (const char *)name);
}

static void
expat_data_cb(void *userData, const XML_Char *s, int len)
{
	xml_data(userData, s, len);
}

static int
expat_read_toc(struct archive_read *a)
{
	struct xar *xar;
	XML_Parser parser;

	xar = (struct xar *)(a->format->data);

	/* Initialize XML Parser library. */
	parser = XML_ParserCreate(NULL);
	if (parser == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Couldn't allocate memory for xml parser");
		return (ARCHIVE_FATAL);
	}
	XML_SetUserData(parser, a);
	XML_SetElementHandler(parser, expat_start_cb, expat_end_cb);
	XML_SetCharacterDataHandler(parser, expat_data_cb);
	xar->xmlsts = INIT;

	while (xar->toc_remaining) {
		enum XML_Status xr;
		const void *d;
		size_t outbytes;
		size_t used;
		int r;

		d = NULL;
		r = rd_contents(a, &d, &outbytes, &used, xar->toc_remaining);
		if (r != ARCHIVE_OK)
			return (r);
		__archive_read_consume(a, used);
		xar->toc_remaining -= used;
		xar->offset += used;
		xar->toc_total += outbytes;
		PRINT_TOC(d, outbytes);

		xr = XML_Parse(parser, d, outbytes, xar->toc_remaining == 0);
		if (xr == XML_STATUS_ERROR) {
			XML_ParserFree(parser);
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "XML Parsing failed");
			return (ARCHIVE_FATAL);
		}
	}
	XML_ParserFree(parser);
	return (ARCHIVE_OK);
}
#endif /* defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H) */

#endif /* Support xar format */

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_string.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_string_sprintf.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_util.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_virtual.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_private.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_fd.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_set_standard_lookup.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_file.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_filename.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_open_memory.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_private.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_bzip2.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_compress.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_gzip.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_none.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_program.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/Attic/archive_write_set_compression_xz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"

__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_xz.c 201108 2009-12-28 03:28:21Z kientzle $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <time.h>
#ifdef HAVE_LZMA_H
#include <lzma.h>
#endif

#include "archive.h"
#include "archive_private.h"
#include "archive_write_private.h"

#ifndef HAVE_LZMA_H
int
archive_write_set_compression_xz(struct archive *a)
{
	archive_set_error(a, ARCHIVE_ERRNO_MISC,
	    "xz compression not supported on this platform");
	return (ARCHIVE_FATAL);
}

int
archive_write_set_compression_lzma(struct archive *a)
{
	archive_set_error(a, ARCHIVE_ERRNO_MISC,
	    "lzma compression not supported on this platform");
	return (ARCHIVE_FATAL);
}
#else
/* Don't compile this if we don't have liblzma. */

struct private_data {
	lzma_stream	 stream;
	lzma_filter	 lzmafilters[2];
	lzma_options_lzma lzma_opt;
	int64_t		 total_in;
	unsigned char	*compressed;
	size_t		 compressed_buffer_size;
};

struct private_config {
	int		 compression_level;
};

static int	archive_compressor_xz_init(struct archive_write *);
static int	archive_compressor_xz_options(struct archive_write *,
		    const char *, const char *);
static int	archive_compressor_xz_finish(struct archive_write *);
static int	archive_compressor_xz_write(struct archive_write *,
		    const void *, size_t);
static int	drive_compressor(struct archive_write *, struct private_data *,
		    int finishing);


/*
 * Allocate, initialize and return a archive object.
 */
int
archive_write_set_compression_xz(struct archive *_a)
{
	struct private_config *config;
	struct archive_write *a = (struct archive_write *)_a;
	__archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
	    ARCHIVE_STATE_NEW, "archive_write_set_compression_xz");
	config = calloc(1, sizeof(*config));
	if (config == NULL) {
		archive_set_error(&a->archive, ENOMEM, "Out of memory");
		return (ARCHIVE_FATAL);
	}
	a->compressor.config = config;
	a->compressor.finish = archive_compressor_xz_finish;
	config->compression_level = LZMA_PRESET_DEFAULT;
	a->compressor.init = &archive_compressor_xz_init;
	a->compressor.options = &archive_compressor_xz_options;
	a->archive.compression_code = ARCHIVE_COMPRESSION_XZ;
	a->archive.compression_name = "xz";
	return (ARCHIVE_OK);
}

/* LZMA is handled identically, we just need a different compression
 * code set.  (The liblzma setup looks at the code to determine
 * the one place that XZ and LZMA require different handling.) */
int
archive_write_set_compression_lzma(struct archive *_a)
{
	struct archive_write *a = (struct archive_write *)_a;
	int r = archive_write_set_compression_xz(_a);
	if (r != ARCHIVE_OK)
		return (r);
	a->archive.compression_code = ARCHIVE_COMPRESSION_LZMA;
	a->archive.compression_name = "lzma";
	return (ARCHIVE_OK);
}

static int
archive_compressor_xz_init_stream(struct archive_write *a,
    struct private_data *state)
{
	int ret;

	state->stream = (lzma_stream)LZMA_STREAM_INIT;
	state->stream.next_out = state->compressed;
	state->stream.avail_out = state->compressed_buffer_size;
	if (a->archive.compression_code == ARCHIVE_COMPRESSION_XZ)
		ret = lzma_stream_encoder(&(state->stream),
		    state->lzmafilters, LZMA_CHECK_CRC64);
	else
		ret = lzma_alone_encoder(&(state->stream), &state->lzma_opt);
	if (ret == LZMA_OK)
		return (ARCHIVE_OK);

	switch (ret) {
	case LZMA_MEM_ERROR:
		archive_set_error(&a->archive, ENOMEM,
		    "Internal error initializing compression library: "
		    "Cannot allocate memory");
		break;
	default:
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "Internal error initializing compression library: "
		    "It's a bug in liblzma");
		break;
	}
	return (ARCHIVE_FATAL);
}

/*
 * Setup callback.
 */
static int
archive_compressor_xz_init(struct archive_write *a)
{
	int ret;
	struct private_data *state;
	struct private_config *config;

	if (a->client_opener != NULL) {
		ret = (a->client_opener)(&a->archive, a->client_data);
		if (ret != ARCHIVE_OK)
			return (ret);
	}

	state = (struct private_data *)malloc(sizeof(*state));
	if (state == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Can't allocate data for compression");
		return (ARCHIVE_FATAL);
	}
	memset(state, 0, sizeof(*state));
	config = a->compressor.config;

	/*
	 * See comment above.  We should set compressed_buffer_size to
	 * max(bytes_per_block, 65536), but the code can't handle that yet.
	 */
	state->compressed_buffer_size = a->bytes_per_block;
	state->compressed = (unsigned char *)malloc(state->compressed_buffer_size);
	if (state->compressed == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Can't allocate data for compression buffer");
		free(state);
		return (ARCHIVE_FATAL);
	}
	a->compressor.write = archive_compressor_xz_write;

	/* Initialize compression library. */
	if (lzma_lzma_preset(&state->lzma_opt, config->compression_level)) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "Internal error initializing compression library");
		free(state->compressed);
		free(state);
	}
	state->lzmafilters[0].id = LZMA_FILTER_LZMA2;
	state->lzmafilters[0].options = &state->lzma_opt;
	state->lzmafilters[1].id = LZMA_VLI_UNKNOWN;/* Terminate */
	ret = archive_compressor_xz_init_stream(a, state);
	if (ret == LZMA_OK) {
		a->compressor.data = state;
		return (0);
	}
	/* Library setup failed: clean up. */
	free(state->compressed);
	free(state);

	return (ARCHIVE_FATAL);
}

/*
 * Set write options.
 */
static int
archive_compressor_xz_options(struct archive_write *a, const char *key,
    const char *value)
{
	struct private_config *config;

	config = (struct private_config *)a->compressor.config;
	if (strcmp(key, "compression-level") == 0) {
		if (value == NULL || !(value[0] >= '0' && value[0] <= '9') ||
		    value[1] != '\0')
			return (ARCHIVE_WARN);
		config->compression_level = value[0] - '0';
		if (config->compression_level > 6)
			config->compression_level = 6;
		return (ARCHIVE_OK);
	}

	return (ARCHIVE_WARN);
}

/*
 * Write data to the compressed stream.
 */
static int
archive_compressor_xz_write(struct archive_write *a, const void *buff,
    size_t length)
{
	struct private_data *state;
	int ret;

	state = (struct private_data *)a->compressor.data;
	if (a->client_writer == NULL) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER,
		    "No write callback is registered?  "
		    "This is probably an internal programming error.");
		return (ARCHIVE_FATAL);
	}

	/* Update statistics */
	state->total_in += length;

	/* Compress input data to output buffer */
	state->stream.next_in = buff;
	state->stream.avail_in = length;
	if ((ret = drive_compressor(a, state, 0)) != ARCHIVE_OK)
		return (ret);

	a->archive.file_position += length;
	return (ARCHIVE_OK);
}


/*
 * Finish the compression...
 */
static int
archive_compressor_xz_finish(struct archive_write *a)
{
	ssize_t block_length, target_block_length, bytes_written;
	int ret;
	struct private_data *state;
	unsigned tocopy;

	ret = ARCHIVE_OK;
	state = (struct private_data *)a->compressor.data;
	if (state != NULL) {
		if (a->client_writer == NULL) {
			archive_set_error(&a->archive,
			    ARCHIVE_ERRNO_PROGRAMMER,
			    "No write callback is registered?  "
			    "This is probably an internal programming error.");
			ret = ARCHIVE_FATAL;
			goto cleanup;
		}

		/* By default, always pad the uncompressed data. */
		if (a->pad_uncompressed) {
			tocopy = a->bytes_per_block -
			    (state->total_in % a->bytes_per_block);
			while (tocopy > 0 && tocopy < (unsigned)a->bytes_per_block) {
				state->stream.next_in = a->nulls;
				state->stream.avail_in = tocopy < a->null_length ?
				    tocopy : a->null_length;
				state->total_in += state->stream.avail_in;
				tocopy -= state->stream.avail_in;
				ret = drive_compressor(a, state, 0);
				if (ret != ARCHIVE_OK)
					goto cleanup;
			}
		}

		/* Finish compression cycle */
		if (((ret = drive_compressor(a, state, 1))) != ARCHIVE_OK)
			goto cleanup;

		/* Optionally, pad the final compressed block. */
		block_length = state->stream.next_out - state->compressed;

		/* Tricky calculation to determine size of last block. */
		if (a->bytes_in_last_block <= 0)
			/* Default or Zero: pad to full block */
			target_block_length = a->bytes_per_block;
		else
			/* Round length to next multiple of bytes_in_last_block. */
			target_block_length = a->bytes_in_last_block *
			    ( (block_length + a->bytes_in_last_block - 1) /
				a->bytes_in_last_block);
		if (target_block_length > a->bytes_per_block)
			target_block_length = a->bytes_per_block;
		if (block_length < target_block_length) {
			memset(state->stream.next_out, 0,
			    target_block_length - block_length);
			block_length = target_block_length;
		}

		/* Write the last block */
		bytes_written = (a->client_writer)(&a->archive, a->client_data,
		    state->compressed, block_length);
		if (bytes_written <= 0) {
			ret = ARCHIVE_FATAL;
			goto cleanup;
		}
		a->archive.raw_position += bytes_written;

		/* Cleanup: shut down compressor, release memory, etc. */
	cleanup:
		lzma_end(&(state->stream));
		free(state->compressed);
		free(state);
	}
	free(a->compressor.config);
	a->compressor.config = NULL;
	return (ret);
}

/*
 * Utility function to push input data through compressor,
 * writing full output blocks as necessary.
 *
 * Note that this handles both the regular write case (finishing ==
 * false) and the end-of-archive case (finishing == true).
 */
static int
drive_compressor(struct archive_write *a, struct private_data *state, int finishing)
{
	ssize_t bytes_written;
	int ret;

	for (;;) {
		if (state->stream.avail_out == 0) {
			bytes_written = (a->client_writer)(&a->archive,
			    a->client_data, state->compressed,
			    state->compressed_buffer_size);
			if (bytes_written <= 0) {
				/* TODO: Handle this write failure */
				return (ARCHIVE_FATAL);
			} else if ((size_t)bytes_written < state->compressed_buffer_size) {
				/* Short write: Move remaining to
				 * front of block and keep filling */
				memmove(state->compressed,
				    state->compressed + bytes_written,
				    state->compressed_buffer_size - bytes_written);
			}
			a->archive.raw_position += bytes_written;
			state->stream.next_out
			    = state->compressed +
			    state->compressed_buffer_size - bytes_written;
			state->stream.avail_out = bytes_written;
		}

		/* If there's nothing to do, we're done. */
		if (!finishing && state->stream.avail_in == 0)
			return (ARCHIVE_OK);

		ret = lzma_code(&(state->stream),
		    finishing ? LZMA_FINISH : LZMA_RUN );

		switch (ret) {
		case LZMA_OK:
			/* In non-finishing case, check if compressor
			 * consumed everything */
			if (!finishing && state->stream.avail_in == 0)
				return (ARCHIVE_OK);
			/* In finishing case, this return always means
			 * there's more work */
			break;
		case LZMA_STREAM_END:
			/* This return can only occur in finishing case. */
			if (finishing)
				return (ARCHIVE_OK);
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "lzma compression data error");
			return (ARCHIVE_FATAL);
		case LZMA_MEMLIMIT_ERROR:
			archive_set_error(&a->archive, ENOMEM,
			    "lzma compression error: "
			    "%ju MiB would have been needed",
			    (lzma_memusage(&(state->stream)) + 1024 * 1024 -1)
			    / (1024 * 1024));
			return (ARCHIVE_FATAL);
		default:
			/* Any other return value indicates an error. */
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "lzma compression failed:"
			    " lzma_code() call returned status %d",
			    ret);
			return (ARCHIVE_FATAL);
		}
	}
}

#endif /* HAVE_LZMA_H */

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/config_freebsd.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2008 Joerg Sonnenberger
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_mtree.c 201171 2009-12-29 06:39:07Z kientzle $");

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>

#include "archive.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_write_private.h"

#include "archive_hash.h"

#define INDENTNAMELEN	15
#define MAXLINELEN	80

struct mtree_writer {
	struct archive_entry *entry;
	struct archive_string ebuf;
	struct archive_string buf;
	int first;
	uint64_t entry_bytes_remaining;
	struct {
		int		output;
		int		processed;
		struct archive_string parent;
		mode_t		type;
		int		keys;
		uid_t		uid;
		gid_t		gid;
		mode_t		mode;
		unsigned long	fflags_set;
		unsigned long	fflags_clear;
	} set;
	/* chekc sum */
	int compute_sum;
	uint32_t crc;
	uint64_t crc_len;
#ifdef ARCHIVE_HAS_MD5
	archive_md5_ctx md5ctx;
#endif
#ifdef ARCHIVE_HAS_RMD160
	archive_rmd160_ctx rmd160ctx;
#endif
#ifdef ARCHIVE_HAS_SHA1
	archive_sha1_ctx sha1ctx;
#endif
#ifdef ARCHIVE_HAS_SHA256
	archive_sha256_ctx sha256ctx;
#endif
#ifdef ARCHIVE_HAS_SHA384
	archive_sha384_ctx sha384ctx;
#endif
#ifdef ARCHIVE_HAS_SHA512
	archive_sha512_ctx sha512ctx;
#endif
	/* Keyword options */
	int keys;
#define	F_CKSUM		0x00000001		/* check sum */
#define	F_DEV		0x00000002		/* device type */
#define	F_DONE		0x00000004		/* directory done */
#define	F_FLAGS		0x00000008		/* file flags */
#define	F_GID		0x00000010		/* gid */
#define	F_GNAME		0x00000020		/* group name */
#define	F_IGN		0x00000040		/* ignore */
#define	F_MAGIC		0x00000080		/* name has magic chars */
#define	F_MD5		0x00000100		/* MD5 digest */
#define	F_MODE		0x00000200		/* mode */
#define	F_NLINK		0x00000400		/* number of links */
#define	F_NOCHANGE 	0x00000800		/* If owner/mode "wrong", do
						 * not change */
#define	F_OPT		0x00001000		/* existence optional */
#define	F_RMD160 	0x00002000		/* RIPEMD160 digest */
#define	F_SHA1		0x00004000		/* SHA-1 digest */
#define	F_SIZE		0x00008000		/* size */
#define	F_SLINK		0x00010000		/* symbolic link */
#define	F_TAGS		0x00020000		/* tags */
#define	F_TIME		0x00040000		/* modification time */
#define	F_TYPE		0x00080000		/* file type */
#define	F_UID		0x00100000		/* uid */
#define	F_UNAME		0x00200000		/* user name */
#define	F_VISIT		0x00400000		/* file visited */
#define	F_SHA256	0x00800000		/* SHA-256 digest */
#define	F_SHA384	0x01000000		/* SHA-384 digest */
#define	F_SHA512	0x02000000		/* SHA-512 digest */

	/* Options */
	int dironly;		/* if the dironly is 1, ignore everything except
				 * directory type files. like mtree(8) -d option.
				 */
	int indent;		/* if the indent is 1, indent writing data. */
};

#define DEFAULT_KEYS	(F_DEV | F_FLAGS | F_GID | F_GNAME | F_SLINK | F_MODE\
			 | F_NLINK | F_SIZE | F_TIME | F_TYPE | F_UID\
			 | F_UNAME)

#define	COMPUTE_CRC(var, ch)	(var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
static const uint32_t crctab[] = {
	0x0,
	0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
	0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
	0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
	0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
	0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
	0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
	0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
	0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
	0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
	0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
	0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
	0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
	0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
	0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
	0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
	0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
	0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
	0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
	0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
	0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
	0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
	0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
	0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
	0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
	0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
	0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
	0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
	0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
	0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
	0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
	0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
	0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
	0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
	0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
	0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
	0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
	0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
	0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
	0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
	0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
	0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
	0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
	0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
	0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
	0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
	0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
	0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
	0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
	0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
	0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
	0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
};

static int
mtree_safe_char(char c)
{
	if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
		return 1;
	if (c >= '0' && c <= '9')
		return 1;
	if (c == 35 || c == 61 || c == 92)
		return 0; /* #, = and \ are always quoted */
	
	if (c >= 33 && c <= 47) /* !"$%&'()*+,-./ */
		return 1;
	if (c >= 58 && c <= 64) /* :;<>?@ */
		return 1;
	if (c >= 91 && c <= 96) /* []^_` */
		return 1;
	if (c >= 123 && c <= 126) /* {|}~ */
		return 1;
	return 0;
}

static void
mtree_quote(struct archive_string *s, const char *str)
{
	const char *start;
	char buf[4];
	unsigned char c;

	for (start = str; *str != '\0'; ++str) {
		if (mtree_safe_char(*str))
			continue;
		if (start != str)
			archive_strncat(s, start, str - start);
		c = (unsigned char)*str;
		buf[0] = '\\';
		buf[1] = (c / 64) + '0';
		buf[2] = (c / 8 % 8) + '0';
		buf[3] = (c % 8) + '0';
		archive_strncat(s, buf, 4);
		start = str + 1;
	}

	if (start != str)
		archive_strncat(s, start, str - start);
}

static void
mtree_indent(struct mtree_writer *mtree)
{
	int i, fn;
	const char *r, *s, *x;

	fn = 1;
	s = r = mtree->ebuf.s;
	x = NULL;
	while (*r == ' ')
		r++;
	while ((r = strchr(r, ' ')) != NULL) {
		if (fn) {
			fn = 0;
			archive_strncat(&mtree->buf, s, r - s);
			if (r -s > INDENTNAMELEN) {
				archive_strncat(&mtree->buf, " \\\n", 3);
				for (i = 0; i < (INDENTNAMELEN + 1); i++)
					archive_strappend_char(&mtree->buf, ' ');
			} else {
				for (i = r -s; i < (INDENTNAMELEN + 1); i++)
					archive_strappend_char(&mtree->buf, ' ');
			}
			s = ++r;
			x = NULL;
			continue;
		}
		if (r - s <= MAXLINELEN - 3 - INDENTNAMELEN)
			x = r++;
		else {
			if (x == NULL)
				x = r;
			archive_strncat(&mtree->buf, s, x - s);
			archive_strncat(&mtree->buf, " \\\n", 3);
			for (i = 0; i < (INDENTNAMELEN + 1); i++)
				archive_strappend_char(&mtree->buf, ' ');
			s = r = ++x;
			x = NULL;
		}
	}
	if (x != NULL && strlen(s) > MAXLINELEN - 3 - INDENTNAMELEN) {
		/* Last keyword is longer. */
		archive_strncat(&mtree->buf, s, x - s);
		archive_strncat(&mtree->buf, " \\\n", 3);
		for (i = 0; i < (INDENTNAMELEN + 1); i++)
			archive_strappend_char(&mtree->buf, ' ');
		s = ++x;
	}
	archive_strcat(&mtree->buf, s);
	archive_string_empty(&mtree->ebuf);
}

#if !defined(_WIN32) || defined(__CYGWIN__)
static size_t
dir_len(struct archive_entry *entry)
{
	const char *path, *r;

	path = archive_entry_pathname(entry);
	r = strrchr(path, '/');
	if (r == NULL)
		return (0);
	/* Include a separator size */
	return (r - path + 1);
}

#else /* _WIN32 && !__CYGWIN__ */
/*
 * Note: We should use wide-character for findng '\' character,
 * a directory separator on Windows, because some character-set have
 * been using the '\' character for a part of its multibyte character
 * code.
 */
static size_t
dir_len(struct archive_entry *entry)
{
	wchar_t wc;
	const char *path;
	const char *p, *rp;
	size_t al, l, size;

	path = archive_entry_pathname(entry);
	al = l = -1;
	for (p = path; *p != '\0'; ++p) {
		if (*p == '\\')
			al = l = p - path;
		else if (*p == '/')
			al = p - path;
	}
	if (l == -1)
		goto alen;
	size = p - path;
	rp = p = path;
	while (*p != '\0') {
		l = mbtowc(&wc, p, size);
		if (l == -1)
			goto alen;
		if (l == 1 && (wc == L'/' || wc == L'\\'))
			rp = p;
		p += l;
		size -= l;
	}
	return (rp - path + 1);
alen:
	if (al == -1)
		return (0);
	return (al + 1);
}
#endif /* _WIN32 && !__CYGWIN__ */

static int
parent_dir_changed(struct archive_string *dir, struct archive_entry *entry)
{
	const char *path;
	size_t l;

	l = dir_len(entry);
	path = archive_entry_pathname(entry);
	if (archive_strlen(dir) > 0) {
		if (l == 0) {
			archive_string_empty(dir);
			return (1);
		}
		if (strncmp(dir->s, path, l) == 0)
			return (0); /* The parent directory is the same. */
	} else if (l == 0)
		return (0);	    /* The parent directory is the same. */
	archive_strncpy(dir, path, l);
	return (1);
}

/*
 * Write /set keyword. It means set global datas.
 * [directory-only mode]
 *   - It is only once to write /set keyword. It is using values of the
 *     first entry.
 * [normal mode]
 *   - Write /set keyword. It is using values of the first entry whose
 *     filetype is a regular file.
 *   - When a parent directory of the entry whose filetype is the regular
 *     file is changed, check the global datas and write it again if its
 *     values are different from the entry's.
 */
static void
set_global(struct mtree_writer *mtree, struct archive_entry *entry)
{
	struct archive_string setstr;
	struct archive_string unsetstr;
	const char *name;
	int keys, oldkeys, effkeys;
	mode_t set_type = 0;

	switch (archive_entry_filetype(entry)) {
	case AE_IFLNK: case AE_IFSOCK: case AE_IFCHR:
	case AE_IFBLK: case AE_IFIFO:
		break;
	case AE_IFDIR:
		if (mtree->dironly)
			set_type = AE_IFDIR;
		break;
	case AE_IFREG:
	default:	/* Handle unknown file types as regular files. */
		if (!mtree->dironly)
			set_type = AE_IFREG;
		break;
	}
	if (set_type == 0)
		return;
	if (mtree->set.processed &&
	    !parent_dir_changed(&mtree->set.parent, entry))
		return;
	/* At first, save a parent directory of the entry for following
	 * entries. */
	if (!mtree->set.processed && set_type == AE_IFREG)
		parent_dir_changed(&mtree->set.parent, entry);

	archive_string_init(&setstr);
	archive_string_init(&unsetstr);
	keys = mtree->keys & (F_FLAGS | F_GID | F_GNAME | F_NLINK | F_MODE
	    | F_TYPE | F_UID | F_UNAME);
	oldkeys = mtree->set.keys;
	effkeys = keys;
	if (mtree->set.processed) {
		/*
		 * Check the global datas for whether it needs updating.
		 */
		effkeys &= ~F_TYPE;
		if ((oldkeys & (F_UNAME | F_UID)) != 0 &&
		    mtree->set.uid == archive_entry_uid(entry))
			effkeys &= ~(F_UNAME | F_UID);
		if ((oldkeys & (F_GNAME | F_GID)) != 0 &&
		    mtree->set.gid == archive_entry_gid(entry))
			effkeys &= ~(F_GNAME | F_GID);
		if ((oldkeys & F_MODE) != 0 &&
		    mtree->set.mode == (archive_entry_mode(entry) & 07777))
			effkeys &= ~F_MODE;
		if ((oldkeys & F_FLAGS) != 0) {
			unsigned long	fflags_set;
			unsigned long	fflags_clear;

			archive_entry_fflags(entry, &fflags_set, &fflags_clear);
			if (fflags_set == mtree->set.fflags_set &&
			    fflags_clear == mtree->set.fflags_clear)
				effkeys &= ~F_FLAGS;
		}
	}
	if ((keys & effkeys & F_TYPE) != 0) {
		mtree->set.type = set_type;
		if (set_type == AE_IFDIR)
			archive_strcat(&setstr, " type=dir");
		else
			archive_strcat(&setstr, " type=file");
	}
	if ((keys & effkeys & F_UNAME) != 0) {
		if ((name = archive_entry_uname(entry)) != NULL) {
			archive_strcat(&setstr, " uname=");
			mtree_quote(&setstr, name);
		} else if ((oldkeys & F_UNAME) != 0)
			archive_strcat(&unsetstr, " uname");
		else
			keys &= ~F_UNAME;
	}
	if ((keys & effkeys & F_UID) != 0) {
		mtree->set.uid = archive_entry_uid(entry);
		archive_string_sprintf(&setstr, " uid=%jd",
		    (intmax_t)mtree->set.uid);
	}
	if ((keys & effkeys & F_GNAME) != 0) {
		if ((name = archive_entry_gname(entry)) != NULL) {
			archive_strcat(&setstr, " gname=");
			mtree_quote(&setstr, name);
		} else if ((oldkeys & F_GNAME) != 0)
			archive_strcat(&unsetstr, " gname");
		else
			keys &= ~F_GNAME;
	}
	if ((keys & effkeys & F_GID) != 0) {
		mtree->set.gid = archive_entry_gid(entry);
		archive_string_sprintf(&setstr, " gid=%jd",
		    (intmax_t)mtree->set.gid);
	}
	if ((keys & effkeys & F_MODE) != 0) {
		mtree->set.mode = archive_entry_mode(entry) & 07777;
		archive_string_sprintf(&setstr, " mode=%o", mtree->set.mode);
	}
	if ((keys & effkeys & F_FLAGS) != 0) {
		if ((name = archive_entry_fflags_text(entry)) != NULL) {
			archive_strcat(&setstr, " flags=");
			mtree_quote(&setstr, name);
			archive_entry_fflags(entry, &mtree->set.fflags_set,
			    &mtree->set.fflags_clear);
		} else if ((oldkeys & F_FLAGS) != 0)
			archive_strcat(&unsetstr, " flags");
		else
			keys &= ~F_FLAGS;
	}
	if (unsetstr.length > 0)
		archive_string_sprintf(&mtree->buf, "/unset%s\n", unsetstr.s);
	archive_string_free(&unsetstr);
	if (setstr.length > 0)
		archive_string_sprintf(&mtree->buf, "/set%s\n", setstr.s);
	archive_string_free(&setstr);
	mtree->set.keys = keys;
	mtree->set.processed = 1;
	/* On directory-only mode, it is only once to write /set keyword. */
	if (mtree->dironly)
		mtree->set.output = 0;
}

static int
get_keys(struct mtree_writer *mtree, struct archive_entry *entry)
{
	int keys;

	keys = mtree->keys;
	if (mtree->set.keys == 0)
		return (keys);
	if ((mtree->set.keys & (F_GNAME | F_GID)) != 0 &&
	     mtree->set.gid == archive_entry_gid(entry))
		keys &= ~(F_GNAME | F_GID);
	if ((mtree->set.keys & (F_UNAME | F_UID)) != 0 &&
	     mtree->set.uid == archive_entry_uid(entry))
		keys &= ~(F_UNAME | F_UID);
	if (mtree->set.keys & F_FLAGS) {
		unsigned long set, clear;

		archive_entry_fflags(entry, &set, &clear);
		if (mtree->set.fflags_set == set &&
		    mtree->set.fflags_clear == clear)
			keys &= ~F_FLAGS;
	}
	if ((mtree->set.keys & F_MODE) != 0 &&
	     mtree->set.mode == (archive_entry_mode(entry) & 07777))
		keys &= ~F_MODE;

	switch (archive_entry_filetype(entry)) {
	case AE_IFLNK: case AE_IFSOCK: case AE_IFCHR:
	case AE_IFBLK: case AE_IFIFO:
		break;
	case AE_IFDIR:
		if ((mtree->set.keys & F_TYPE) != 0 &&
		    mtree->set.type == AE_IFDIR)
			keys &= ~F_TYPE;
		break;
	case AE_IFREG:
	default:	/* Handle unknown file types as regular files. */
		if ((mtree->set.keys & F_TYPE) != 0 &&
		    mtree->set.type == AE_IFREG)
			keys &= ~F_TYPE;
		break;
	}

	return (keys);
}

static int
archive_write_mtree_header(struct archive_write *a,
    struct archive_entry *entry)
{
	struct mtree_writer *mtree= a->format_data;
	struct archive_string *str;
	const char *path;

	mtree->entry = archive_entry_clone(entry);
	path = archive_entry_pathname(mtree->entry);

	if (mtree->first) {
		mtree->first = 0;
		archive_strcat(&mtree->buf, "#mtree\n");
	}
	if (mtree->set.output)
		set_global(mtree, entry);

	archive_string_empty(&mtree->ebuf);
	str = (mtree->indent)? &mtree->ebuf : &mtree->buf;
	if (!mtree->dironly || archive_entry_filetype(entry) == AE_IFDIR)
		mtree_quote(str, path);

	mtree->entry_bytes_remaining = archive_entry_size(entry);
	if ((mtree->keys & F_CKSUM) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_CKSUM;
		mtree->crc = 0;
		mtree->crc_len = 0;
	} else
		mtree->compute_sum &= ~F_CKSUM;
#ifdef ARCHIVE_HAS_MD5
	if ((mtree->keys & F_MD5) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_MD5;
		archive_md5_init(&mtree->md5ctx);
	} else
		mtree->compute_sum &= ~F_MD5;
#endif
#ifdef ARCHIVE_HAS_RMD160
	if ((mtree->keys & F_RMD160) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_RMD160;
		archive_rmd160_init(&mtree->rmd160ctx);
	} else
		mtree->compute_sum &= ~F_RMD160;
#endif
#ifdef ARCHIVE_HAS_SHA1
	if ((mtree->keys & F_SHA1) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_SHA1;
		archive_sha1_init(&mtree->sha1ctx);
	} else
		mtree->compute_sum &= ~F_SHA1;
#endif
#ifdef ARCHIVE_HAS_SHA256
	if ((mtree->keys & F_SHA256) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_SHA256;
		archive_sha256_init(&mtree->sha256ctx);
	} else
		mtree->compute_sum &= ~F_SHA256;
#endif
#ifdef ARCHIVE_HAS_SHA384
	if ((mtree->keys & F_SHA384) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_SHA384;
		archive_sha384_init(&mtree->sha384ctx);
	} else
		mtree->compute_sum &= ~F_SHA384;
#endif
#ifdef ARCHIVE_HAS_SHA512
	if ((mtree->keys & F_SHA512) != 0 &&
	    archive_entry_filetype(entry) == AE_IFREG) {
		mtree->compute_sum |= F_SHA512;
		archive_sha512_init(&mtree->sha512ctx);
	} else
		mtree->compute_sum &= ~F_SHA512;
#endif

	return (ARCHIVE_OK);
}

#if defined(ARCHIVE_HAS_MD5) || defined(ARCHIVE_HAS_RMD160) || \
    defined(ARCHIVE_HAS_SHA1) || defined(ARCHIVE_HAS_SHA256) || \
    defined(ARCHIVE_HAS_SHA384) || defined(ARCHIVE_HAS_SHA512)
static void
strappend_bin(struct archive_string *s, const unsigned char *bin, int n)
{
	static const char hex[] = "0123456789abcdef";
	int i;

	for (i = 0; i < n; i++) {
		archive_strappend_char(s, hex[bin[i] >> 4]);
		archive_strappend_char(s, hex[bin[i] & 0x0f]);
	}
}
#endif

static int
archive_write_mtree_finish_entry(struct archive_write *a)
{
	struct mtree_writer *mtree = a->format_data;
	struct archive_entry *entry;
	struct archive_string *str;
	const char *name;
	int keys, ret;

	entry = mtree->entry;
	if (entry == NULL) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER,
		    "Finished entry without being open first.");
		return (ARCHIVE_FATAL);
	}
	mtree->entry = NULL;

	if (mtree->dironly && archive_entry_filetype(entry) != AE_IFDIR) {
		archive_entry_free(entry);
		return (ARCHIVE_OK);
	}

	str = (mtree->indent)? &mtree->ebuf : &mtree->buf;
	keys = get_keys(mtree, entry);
	if ((keys & F_NLINK) != 0 &&
	    archive_entry_nlink(entry) != 1 &&
	    archive_entry_filetype(entry) != AE_IFDIR)
		archive_string_sprintf(str,
		    " nlink=%u", archive_entry_nlink(entry));

	if ((keys & F_GNAME) != 0 &&
	    (name = archive_entry_gname(entry)) != NULL) {
		archive_strcat(str, " gname=");
		mtree_quote(str, name);
	}
	if ((keys & F_UNAME) != 0 &&
	    (name = archive_entry_uname(entry)) != NULL) {
		archive_strcat(str, " uname=");
		mtree_quote(str, name);
	}
	if ((keys & F_FLAGS) != 0 &&
	    (name = archive_entry_fflags_text(entry)) != NULL) {
		archive_strcat(str, " flags=");
		mtree_quote(str, name);
	}
	if ((keys & F_TIME) != 0)
		archive_string_sprintf(str, " time=%jd.%jd",
		    (intmax_t)archive_entry_mtime(entry),
		    (intmax_t)archive_entry_mtime_nsec(entry));
	if ((keys & F_MODE) != 0)
		archive_string_sprintf(str, " mode=%o",
		    archive_entry_mode(entry) & 07777);
	if ((keys & F_GID) != 0)
		archive_string_sprintf(str, " gid=%jd",
		    (intmax_t)archive_entry_gid(entry));
	if ((keys & F_UID) != 0)
		archive_string_sprintf(str, " uid=%jd",
		    (intmax_t)archive_entry_uid(entry));

	switch (archive_entry_filetype(entry)) {
	case AE_IFLNK:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=link");
		if ((keys & F_SLINK) != 0) {
			archive_strcat(str, " link=");
			mtree_quote(str, archive_entry_symlink(entry));
		}
		break;
	case AE_IFSOCK:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=socket");
		break;
	case AE_IFCHR:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=char");
		if ((keys & F_DEV) != 0) {
			archive_string_sprintf(str,
			    " device=native,%d,%d",
			    archive_entry_rdevmajor(entry),
			    archive_entry_rdevminor(entry));
		}
		break;
	case AE_IFBLK:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=block");
		if ((keys & F_DEV) != 0) {
			archive_string_sprintf(str,
			    " device=native,%d,%d",
			    archive_entry_rdevmajor(entry),
			    archive_entry_rdevminor(entry));
		}
		break;
	case AE_IFDIR:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=dir");
		break;
	case AE_IFIFO:
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=fifo");
		break;
	case AE_IFREG:
	default:	/* Handle unknown file types as regular files. */
		if ((keys & F_TYPE) != 0)
			archive_strcat(str, " type=file");
		if ((keys & F_SIZE) != 0)
			archive_string_sprintf(str, " size=%jd",
			    (intmax_t)archive_entry_size(entry));
		break;
	}

	if (mtree->compute_sum & F_CKSUM) {
		uint64_t len;
		/* Include the length of the file. */
		for (len = mtree->crc_len; len != 0; len >>= 8)
			COMPUTE_CRC(mtree->crc, len & 0xff);
		mtree->crc = ~mtree->crc;
		archive_string_sprintf(str, " cksum=%ju",
		    (uintmax_t)mtree->crc);
	}
#ifdef ARCHIVE_HAS_MD5
	if (mtree->compute_sum & F_MD5) {
		unsigned char buf[16];

		archive_md5_final(&mtree->md5ctx, buf);
		archive_strcat(str, " md5digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
#ifdef ARCHIVE_HAS_RMD160
	if (mtree->compute_sum & F_RMD160) {
		unsigned char buf[20];

		archive_rmd160_final(&mtree->rmd160ctx, buf);
		archive_strcat(str, " rmd160digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
#ifdef ARCHIVE_HAS_SHA1
	if (mtree->compute_sum & F_SHA1) {
		unsigned char buf[20];

		archive_sha1_final(&mtree->sha1ctx, buf);
		archive_strcat(str, " sha1digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
#ifdef ARCHIVE_HAS_SHA256
	if (mtree->compute_sum & F_SHA256) {
		unsigned char buf[32];

		archive_sha256_final(&mtree->sha256ctx, buf);
		archive_strcat(str, " sha256digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
#ifdef ARCHIVE_HAS_SHA384
	if (mtree->compute_sum & F_SHA384) {
		unsigned char buf[48];

		archive_sha384_final(&mtree->sha384ctx, buf);
		archive_strcat(str, " sha384digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
#ifdef ARCHIVE_HAS_SHA512
	if (mtree->compute_sum & F_SHA512) {
		unsigned char buf[64];

		archive_sha512_final(&mtree->sha512ctx, buf);
		archive_strcat(str, " sha512digest=");
		strappend_bin(str, buf, sizeof(buf));
	}
#endif
	archive_strcat(str, "\n");
	if (mtree->indent)
		mtree_indent(mtree);

	archive_entry_free(entry);

	if (mtree->buf.length > 32768) {
		ret = (a->compressor.write)(a, mtree->buf.s, mtree->buf.length);
		archive_string_empty(&mtree->buf);
	} else
		ret = ARCHIVE_OK;

	return (ret == ARCHIVE_OK ? ret : ARCHIVE_FATAL);
}

static int
archive_write_mtree_finish(struct archive_write *a)
{
	struct mtree_writer *mtree= a->format_data;

	archive_write_set_bytes_in_last_block(&a->archive, 1);

	return (a->compressor.write)(a, mtree->buf.s, mtree->buf.length);
}

static ssize_t
archive_write_mtree_data(struct archive_write *a, const void *buff, size_t n)
{
	struct mtree_writer *mtree= a->format_data;

	if (n > mtree->entry_bytes_remaining)
		n = mtree->entry_bytes_remaining;
	if (mtree->dironly)
		/* We don't need compute a regular file sum */
		return (n);
	if (mtree->compute_sum & F_CKSUM) {
		/*
		 * Compute a POSIX 1003.2 checksum
		 */
		const unsigned char *p;
		size_t nn;

		for (nn = n, p = buff; nn--; ++p)
			COMPUTE_CRC(mtree->crc, *p);
		mtree->crc_len += n;
	}
#ifdef ARCHIVE_HAS_MD5
	if (mtree->compute_sum & F_MD5)
		archive_md5_update(&mtree->md5ctx, buff, n);
#endif
#ifdef ARCHIVE_HAS_RMD160
	if (mtree->compute_sum & F_RMD160)
		archive_rmd160_update(&mtree->rmd160ctx, buff, n);
#endif
#ifdef ARCHIVE_HAS_SHA1
	if (mtree->compute_sum & F_SHA1)
		archive_sha1_update(&mtree->sha1ctx, buff, n);
#endif
#ifdef ARCHIVE_HAS_SHA256
	if (mtree->compute_sum & F_SHA256)
		archive_sha256_update(&mtree->sha256ctx, buff, n);
#endif
#ifdef ARCHIVE_HAS_SHA384
	if (mtree->compute_sum & F_SHA384)
		archive_sha384_update(&mtree->sha384ctx, buff, n);
#endif
#ifdef ARCHIVE_HAS_SHA512
	if (mtree->compute_sum & F_SHA512)
		archive_sha512_update(&mtree->sha512ctx, buff, n);
#endif
	return (n);
}

static int
archive_write_mtree_destroy(struct archive_write *a)
{
	struct mtree_writer *mtree= a->format_data;

	if (mtree == NULL)
		return (ARCHIVE_OK);

	archive_entry_free(mtree->entry);
	archive_string_free(&mtree->ebuf);
	archive_string_free(&mtree->buf);
	archive_string_free(&mtree->set.parent);
	free(mtree);
	a->format_data = NULL;
	return (ARCHIVE_OK);
}

static int
archive_write_mtree_options(struct archive_write *a, const char *key,
    const char *value)
{
	struct mtree_writer *mtree= a->format_data;
	int keybit = 0;

	switch (key[0]) {
	case 'a':
		if (strcmp(key, "all") == 0)
			keybit = ~0;
		break;
	case 'c':
		if (strcmp(key, "cksum") == 0)
			keybit = F_CKSUM;
		break;
	case 'd':
		if (strcmp(key, "device") == 0)
			keybit = F_DEV;
		else if (strcmp(key, "dironly") == 0) {
			mtree->dironly = (value != NULL)? 1: 0;
			return (ARCHIVE_OK);
		}
		break;
	case 'f':
		if (strcmp(key, "flags") == 0)
			keybit = F_FLAGS;
		break;
	case 'g':
		if (strcmp(key, "gid") == 0)
			keybit = F_GID;
		else if (strcmp(key, "gname") == 0)
			keybit = F_GNAME;
		break;
	case 'i':
		if (strcmp(key, "indent") == 0) {
			mtree->indent = (value != NULL)? 1: 0;
			return (ARCHIVE_OK);
		}
		break;
	case 'l':
		if (strcmp(key, "link") == 0)
			keybit = F_SLINK;
		break;
	case 'm':
		if (strcmp(key, "md5") == 0 ||
		    strcmp(key, "md5digest") == 0)
			keybit = F_MD5;
		if (strcmp(key, "mode") == 0)
			keybit = F_MODE;
		break;
	case 'n':
		if (strcmp(key, "nlink") == 0)
			keybit = F_NLINK;
		break;
	case 'r':
		if (strcmp(key, "ripemd160digest") == 0 ||
		    strcmp(key, "rmd160") == 0 ||
		    strcmp(key, "rmd160digest") == 0)
			keybit = F_RMD160;
		break;
	case 's':
		if (strcmp(key, "sha1") == 0 ||
		    strcmp(key, "sha1digest") == 0)
			keybit = F_SHA1;
		if (strcmp(key, "sha256") == 0 ||
		    strcmp(key, "sha256digest") == 0)
			keybit = F_SHA256;
		if (strcmp(key, "sha384") == 0 ||
		    strcmp(key, "sha384digest") == 0)
			keybit = F_SHA384;
		if (strcmp(key, "sha512") == 0 ||
		    strcmp(key, "sha512digest") == 0)
			keybit = F_SHA512;
		if (strcmp(key, "size") == 0)
			keybit = F_SIZE;
		break;
	case 't':
		if (strcmp(key, "time") == 0)
			keybit = F_TIME;
		else if (strcmp(key, "type") == 0)
			keybit = F_TYPE;
		break;
	case 'u':
		if (strcmp(key, "uid") == 0)
			keybit = F_UID;
		else if (strcmp(key, "uname") == 0)
			keybit = F_UNAME;
		else if (strcmp(key, "use-set") == 0) {
			mtree->set.output = (value != NULL)? 1: 0;
			return (ARCHIVE_OK);
		}
		break;
	}
	if (keybit != 0) {
		if (value != NULL)
			mtree->keys |= keybit;
		else
			mtree->keys &= ~keybit;
		return (ARCHIVE_OK);
	}

	return (ARCHIVE_WARN);
}

int
archive_write_set_format_mtree(struct archive *_a)
{
	struct archive_write *a = (struct archive_write *)_a;
	struct mtree_writer *mtree;

	if (a->format_destroy != NULL)
		(a->format_destroy)(a);

	if ((mtree = malloc(sizeof(*mtree))) == NULL) {
		archive_set_error(&a->archive, ENOMEM,
		    "Can't allocate mtree data");
		return (ARCHIVE_FATAL);
	}

	mtree->entry = NULL;
	mtree->first = 1;
	memset(&(mtree->set), 0, sizeof(mtree->set));
	archive_string_init(&mtree->set.parent);
	mtree->keys = DEFAULT_KEYS;
	mtree->dironly = 0;
	mtree->indent = 0;
	archive_string_init(&mtree->ebuf);
	archive_string_init(&mtree->buf);
	a->format_data = mtree;
	a->format_destroy = archive_write_mtree_destroy;

	a->pad_uncompressed = 0;
	a->format_name = "mtree";
	a->format_options = archive_write_mtree_options;
	a->format_write_header = archive_write_mtree_header;
	a->format_finish = archive_write_mtree_finish;
	a->format_write_data = archive_write_mtree_data;
	a->format_finish_entry = archive_write_mtree_finish_entry;
	a->archive.archive_format = ARCHIVE_FORMAT_MTREE;
	a->archive.archive_format_name = "mtree";

	return (ARCHIVE_OK);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c
/*-
 * Copyright (c) 2008 Anselm Strauss
 * Copyright (c) 2009 Joerg Sonnenberger
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Development supported by Google Summer of Code 2008.
 */

/*
 * The current implementation is very limited:
 *
 *   - No encryption support.
 *   - No ZIP64 support.
 *   - No support for splitting and spanning.
 *   - Only supports regular file and folder entries.
 *
 * Note that generally data in ZIP files is little-endian encoded,
 * with some exceptions.
 *
 * TODO: Since Libarchive is generally 64bit oriented, but this implementation
 * does not yet support sizes exceeding 32bit, it is highly fragile for
 * big archives. This should change when ZIP64 is finally implemented, otherwise
 * some serious checking has to be done.
 *
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_zip.c 201168 2009-12-29 06:15:32Z kientzle $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif

#include "archive.h"
#include "archive_endian.h"
#include "archive_entry.h"
#include "archive_private.h"
#include "archive_write_private.h"

#ifndef HAVE_ZLIB_H
#include "archive_crc32.h"
#endif

#define ZIP_SIGNATURE_LOCAL_FILE_HEADER 0x04034b50
#define ZIP_SIGNATURE_DATA_DESCRIPTOR 0x08074b50
#define ZIP_SIGNATURE_FILE_HEADER 0x02014b50
#define ZIP_SIGNATURE_CENTRAL_DIRECTORY_END 0x06054b50
#define ZIP_SIGNATURE_EXTRA_TIMESTAMP 0x5455
#define ZIP_SIGNATURE_EXTRA_UNIX 0x7855
#define ZIP_VERSION_EXTRACT 0x0014 /* ZIP version 2.0 is needed. */
#define ZIP_VERSION_BY 0x0314 /* Made by UNIX, using ZIP version 2.0. */
#define ZIP_FLAGS 0x08 /* Flagging bit 3 (count from 0) for using data descriptor. */

enum compression {
	COMPRESSION_STORE = 0
#ifdef HAVE_ZLIB_H
	,
	COMPRESSION_DEFLATE = 8
#endif
};

static ssize_t archive_write_zip_data(struct archive_write *, const void *buff, size_t s);
static int archive_write_zip_finish(struct archive_write *);
static int archive_write_zip_destroy(struct archive_write *);
static int archive_write_zip_finish_entry(struct archive_write *);
static int archive_write_zip_header(struct archive_write *, struct archive_entry *);
static unsigned int dos_time(const time_t);
static size_t path_length(struct archive_entry *);
static int write_path(struct archive_entry *, struct archive_write *);

struct zip_local_file_header {
	char signature[4];
	char version[2];
	char flags[2];
	char compression[2];
	char timedate[4];
	char crc32[4];
	char compressed_size[4];
	char uncompressed_size[4];
	char filename_length[2];
	char extra_length[2];
};

struct zip_file_header {
	char signature[4];
	char version_by[2];
	char version_extract[2];
	char flags[2];
	char compression[2];
	char timedate[4];
	char crc32[4];
	char compressed_size[4];
	char uncompressed_size[4];
	char filename_length[2];
	char extra_length[2];
	char comment_length[2];
	char disk_number[2];
	char attributes_internal[2];
	char attributes_external[4];
	char offset[4];
};

struct zip_data_descriptor {
	char signature[4]; /* Not mandatory, but recommended by specification. */
	char crc32[4];
	char compressed_size[4];
	char uncompressed_size[4];
};

struct zip_extra_data_local {
	char time_id[2];
	char time_size[2];
	char time_flag[1];
	char mtime[4];
	char atime[4];
	char ctime[4];
	char unix_id[2];
	char unix_size[2];
	char unix_uid[2];
	char unix_gid[2];
};

struct zip_extra_data_central {
	char time_id[2];
	char time_size[2];
	char time_flag[1];
	char mtime[4];
	char unix_id[2];
	char unix_size[2];
};

struct zip_file_header_link {
	struct zip_file_header_link *next;
	struct archive_entry *entry;
	off_t offset;
	unsigned long crc32;
	off_t compressed_size;
	enum compression compression;
};

struct zip {
	struct zip_data_descriptor data_descriptor;
	struct zip_file_header_link *central_directory;
	struct zip_file_header_link *central_directory_end;
	int64_t offset;
	int64_t written_bytes;
	int64_t remaining_data_bytes;
	enum compression compression;

#ifdef HAVE_ZLIB_H
	z_stream stream;
	size_t len_buf;
	unsigned char *buf;
#endif
};

struct zip_central_directory_end {
	char signature[4];
	char disk[2];
	char start_disk[2];
	char entries_disk[2];
	char entries[2];
	char size[4];
	char offset[4];
	char comment_length[2];
};

static int
archive_write_zip_options(struct archive_write *a, const char *key,
    const char *value)
{
	struct zip *zip = a->format_data;

	if (strcmp(key, "compression") == 0) {
		if (strcmp(value, "deflate") == 0) {
#ifdef HAVE_ZLIB_H
			zip->compression = COMPRESSION_DEFLATE;
#else
			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
			    "deflate compression not supported");
			return ARCHIVE_WARN;
#endif
		} else if (strcmp(value, "store") == 0)
			zip->compression = COMPRESSION_STORE;
		else
			return (ARCHIVE_WARN);
		return (ARCHIVE_OK);
	}
	return (ARCHIVE_WARN);
}

int
archive_write_set_format_zip(struct archive *_a)
{
	struct archive_write *a = (struct archive_write *)_a;
	struct zip *zip;

	/* If another format was already registered, unregister it. */
	if (a->format_destroy != NULL)
		(a->format_destroy)(a);

	zip = (struct zip *) calloc(1, sizeof(*zip));
	if (zip == NULL) {
		archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data");
		return (ARCHIVE_FATAL);
	}
	zip->central_directory = NULL;
	zip->central_directory_end = NULL;
	zip->offset = 0;
	zip->written_bytes = 0;
	zip->remaining_data_bytes = 0;

#ifdef HAVE_ZLIB_H
	zip->compression = COMPRESSION_DEFLATE;
	zip->len_buf = 65536;
	zip->buf = malloc(zip->len_buf);
	if (zip->buf == NULL) {
		archive_set_error(&a->archive, ENOMEM, "Can't allocate compression buffer");
		return (ARCHIVE_FATAL);
	}
#else
	zip->compression = COMPRESSION_STORE;
#endif

	a->format_data = zip;

	a->pad_uncompressed = 0; /* Actually not needed for now, since no compression support yet. */
	a->format_name = "zip";
	a->format_options = archive_write_zip_options;
	a->format_write_header = archive_write_zip_header;
	a->format_write_data = archive_write_zip_data;
	a->format_finish_entry = archive_write_zip_finish_entry;
	a->format_finish = archive_write_zip_finish;
	a->format_destroy = archive_write_zip_destroy;
	a->archive.archive_format = ARCHIVE_FORMAT_ZIP;
	a->archive.archive_format_name = "ZIP";

	archive_le32enc(&zip->data_descriptor.signature,
	    ZIP_SIGNATURE_DATA_DESCRIPTOR);

	return (ARCHIVE_OK);
}

static int
archive_write_zip_header(struct archive_write *a, struct archive_entry *entry)
{
	struct zip *zip;
	struct zip_local_file_header h;
	struct zip_extra_data_local e;
	struct zip_data_descriptor *d;
	struct zip_file_header_link *l;
	int ret;
	int64_t size;
	mode_t type;

	/* Entries other than a regular file or a folder are skipped. */
	type = archive_entry_filetype(entry);
	if ((type != AE_IFREG) & (type != AE_IFDIR)) {
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Filetype not supported");
		return ARCHIVE_FAILED;
	};

	/* Directory entries should have a size of 0. */
	if (type == AE_IFDIR)
		archive_entry_set_size(entry, 0);

	zip = a->format_data;
	d = &zip->data_descriptor;
	size = archive_entry_size(entry);
	zip->remaining_data_bytes = size;

	/* Append archive entry to the central directory data. */
	l = (struct zip_file_header_link *) malloc(sizeof(*l));
	if (l == NULL) {
		archive_set_error(&a->archive, ENOMEM, "Can't allocate zip header data");
		return (ARCHIVE_FATAL);
	}
	l->entry = archive_entry_clone(entry);
	/* Initialize the CRC variable and potentially the local crc32(). */
	l->crc32 = crc32(0, NULL, 0);
	l->compression = zip->compression;
	l->compressed_size = 0;
	l->next = NULL;
	if (zip->central_directory == NULL) {
		zip->central_directory = l;
	} else {
		zip->central_directory_end->next = l;
	}
	zip->central_directory_end = l;

	/* Store the offset of this header for later use in central directory. */
	l->offset = zip->written_bytes;

	memset(&h, 0, sizeof(h));
	archive_le32enc(&h.signature, ZIP_SIGNATURE_LOCAL_FILE_HEADER);
	archive_le16enc(&h.version, ZIP_VERSION_EXTRACT);
	archive_le16enc(&h.flags, ZIP_FLAGS);
	archive_le16enc(&h.compression, zip->compression);
	archive_le32enc(&h.timedate, dos_time(archive_entry_mtime(entry)));
	archive_le16enc(&h.filename_length, (uint16_t)path_length(entry));

	switch (zip->compression) {
	case COMPRESSION_STORE:
		/* Setting compressed and uncompressed sizes even when specification says
		 * to set to zero when using data descriptors. Otherwise the end of the
		 * data for an entry is rather difficult to find. */
		archive_le32enc(&h.compressed_size, size);
		archive_le32enc(&h.uncompressed_size, size);
		break;
#ifdef HAVE_ZLIB_H
	case COMPRESSION_DEFLATE:
		archive_le32enc(&h.uncompressed_size, size);

		zip->stream.zalloc = Z_NULL;
		zip->stream.zfree = Z_NULL;
		zip->stream.opaque = Z_NULL;
		zip->stream.next_out = zip->buf;
		zip->stream.avail_out = zip->len_buf;
		if (deflateInit2(&zip->stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
		    -15, 8, Z_DEFAULT_STRATEGY) != Z_OK) {
			archive_set_error(&a->archive, ENOMEM, "Can't init deflate compressor");
			return (ARCHIVE_FATAL);
		}
		break;
#endif
	}

	/* Formatting extra data. */
	archive_le16enc(&h.extra_length, sizeof(e));
	archive_le16enc(&e.time_id, ZIP_SIGNATURE_EXTRA_TIMESTAMP);
	archive_le16enc(&e.time_size, sizeof(e.time_flag) +
	    sizeof(e.mtime) + sizeof(e.atime) + sizeof(e.ctime));
	e.time_flag[0] = 0x07;
	archive_le32enc(&e.mtime, archive_entry_mtime(entry));
	archive_le32enc(&e.atime, archive_entry_atime(entry));
	archive_le32enc(&e.ctime, archive_entry_ctime(entry));
	    
	archive_le16enc(&e.unix_id, ZIP_SIGNATURE_EXTRA_UNIX);
	archive_le16enc(&e.unix_size, sizeof(e.unix_uid) + sizeof(e.unix_gid));
	archive_le16enc(&e.unix_uid, archive_entry_uid(entry));
	archive_le16enc(&e.unix_gid, archive_entry_gid(entry));

	archive_le32enc(&d->uncompressed_size, size);

	ret = (a->compressor.write)(a, &h, sizeof(h));
	if (ret != ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	zip->written_bytes += sizeof(h);

	ret = write_path(entry, a);
	if (ret <= ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	zip->written_bytes += ret;

	ret = (a->compressor.write)(a, &e, sizeof(e));
	if (ret != ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	zip->written_bytes += sizeof(e);

	return (ARCHIVE_OK);
}

static ssize_t
archive_write_zip_data(struct archive_write *a, const void *buff, size_t s)
{
	int ret;
	struct zip *zip = a->format_data;
	struct zip_file_header_link *l = zip->central_directory_end;

	if ((int64_t)s > zip->remaining_data_bytes)
		s = (size_t)zip->remaining_data_bytes;

	if (s == 0) return 0;

	switch (zip->compression) {
	case COMPRESSION_STORE:
		ret = (a->compressor.write)(a, buff, s);
		if (ret != ARCHIVE_OK) return (ret);
		zip->written_bytes += s;
		zip->remaining_data_bytes -= s;
		l->compressed_size += s;
		l->crc32 = crc32(l->crc32, buff, s);
		return (s);
#if HAVE_ZLIB_H
	case COMPRESSION_DEFLATE:
		zip->stream.next_in = (unsigned char*)(uintptr_t)buff;
		zip->stream.avail_in = s;
		do {
			ret = deflate(&zip->stream, Z_NO_FLUSH);
			if (ret == Z_STREAM_ERROR)
				return (ARCHIVE_FATAL);
			if (zip->stream.avail_out == 0) {
				ret = (a->compressor.write)(a, zip->buf, zip->len_buf);
				if (ret != ARCHIVE_OK)
					return (ret);
				l->compressed_size += zip->len_buf;
				zip->written_bytes += zip->len_buf;
				zip->stream.next_out = zip->buf;
				zip->stream.avail_out = zip->len_buf;
			}
		} while (zip->stream.avail_in != 0);
		zip->remaining_data_bytes -= s;
		/* If we have it, use zlib's fast crc32() */
		l->crc32 = crc32(l->crc32, buff, s);
		return (s);
#endif

	default:
		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
		    "Invalid ZIP compression type");
		return ARCHIVE_FATAL;
	}
}

static int
archive_write_zip_finish_entry(struct archive_write *a)
{
	/* Write the data descripter after file data has been written. */
	int ret;
	struct zip *zip = a->format_data;
	struct zip_data_descriptor *d = &zip->data_descriptor;
	struct zip_file_header_link *l = zip->central_directory_end;
#if HAVE_ZLIB_H
	size_t reminder;
#endif

	switch(zip->compression) {
	case COMPRESSION_STORE:
		break;
#if HAVE_ZLIB_H
	case COMPRESSION_DEFLATE:
		for (;;) {
			ret = deflate(&zip->stream, Z_FINISH);
			if (ret == Z_STREAM_ERROR)
				return (ARCHIVE_FATAL);
			reminder = zip->len_buf - zip->stream.avail_out;
			ret = (a->compressor.write)(a, zip->buf, reminder);
			if (ret != ARCHIVE_OK)
				return (ret);
			l->compressed_size += reminder;
			zip->written_bytes += reminder;
			zip->stream.next_out = zip->buf;
			if (zip->stream.avail_out != 0)
				break;
			zip->stream.avail_out = zip->len_buf;
		}
		deflateEnd(&zip->stream);
		break;
#endif
	}

	archive_le32enc(&d->crc32, l->crc32);
	archive_le32enc(&d->compressed_size, l->compressed_size);
	ret = (a->compressor.write)(a, d, sizeof(*d));
	if (ret != ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	zip->written_bytes += sizeof(*d);
	return (ARCHIVE_OK);
}

static int
archive_write_zip_finish(struct archive_write *a)
{
	struct zip *zip;
	struct zip_file_header_link *l;
	struct zip_file_header h;
	struct zip_central_directory_end end;
	struct zip_extra_data_central e;
	off_t offset_start, offset_end;
	int entries;
	int ret;

	zip = a->format_data;
	l = zip->central_directory;

	/*
	 * Formatting central directory file header fields that are fixed for all entries.
	 * Fields not used (and therefor 0) are:
	 *
	 *   - comment_length
	 *   - disk_number
	 *   - attributes_internal
	 */
	memset(&h, 0, sizeof(h));
	archive_le32enc(&h.signature, ZIP_SIGNATURE_FILE_HEADER);
	archive_le16enc(&h.version_by, ZIP_VERSION_BY);
	archive_le16enc(&h.version_extract, ZIP_VERSION_EXTRACT);
	archive_le16enc(&h.flags, ZIP_FLAGS);

	entries = 0;
	offset_start = zip->written_bytes;

	/* Formatting individual header fields per entry and
	 * writing each entry. */
	while (l != NULL) {
		archive_le16enc(&h.compression, l->compression);
		archive_le32enc(&h.timedate, dos_time(archive_entry_mtime(l->entry)));
		archive_le32enc(&h.crc32, l->crc32);
		archive_le32enc(&h.compressed_size, l->compressed_size);
		archive_le32enc(&h.uncompressed_size, archive_entry_size(l->entry));
		archive_le16enc(&h.filename_length, (uint16_t)path_length(l->entry));
		archive_le16enc(&h.extra_length, sizeof(e));
		archive_le16enc(&h.attributes_external[2], archive_entry_mode(l->entry));
		archive_le32enc(&h.offset, l->offset);

		/* Formatting extra data. */
		archive_le16enc(&e.time_id, ZIP_SIGNATURE_EXTRA_TIMESTAMP);
		archive_le16enc(&e.time_size, sizeof(e.mtime) + sizeof(e.time_flag));
		e.time_flag[0] = 0x07;
		archive_le32enc(&e.mtime, archive_entry_mtime(l->entry));
		archive_le16enc(&e.unix_id, ZIP_SIGNATURE_EXTRA_UNIX);
		archive_le16enc(&e.unix_size, 0x0000);

		ret = (a->compressor.write)(a, &h, sizeof(h));
		if (ret != ARCHIVE_OK)
			return (ARCHIVE_FATAL);
		zip->written_bytes += sizeof(h);

		ret = write_path(l->entry, a);
		if (ret <= ARCHIVE_OK)
			return (ARCHIVE_FATAL);
		zip->written_bytes += ret;

		ret = (a->compressor.write)(a, &e, sizeof(e));
		if (ret != ARCHIVE_OK)
			return (ARCHIVE_FATAL);
		zip->written_bytes += sizeof(e);

		l = l->next;
		entries++;
	}
	offset_end = zip->written_bytes;

	/* Formatting end of central directory. */
	memset(&end, 0, sizeof(end));
	archive_le32enc(&end.signature, ZIP_SIGNATURE_CENTRAL_DIRECTORY_END);
	archive_le16enc(&end.entries_disk, entries);
	archive_le16enc(&end.entries, entries);
	archive_le32enc(&end.size, offset_end - offset_start);
	archive_le32enc(&end.offset, offset_start);

	/* Writing end of central directory. */
	ret = (a->compressor.write)(a, &end, sizeof(end));
	if (ret != ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	zip->written_bytes += sizeof(end);
	return (ARCHIVE_OK);
}

static int
archive_write_zip_destroy(struct archive_write *a)
{
	struct zip *zip;
	struct zip_file_header_link *l;

	zip = a->format_data;
	while (zip->central_directory != NULL) {
	   l = zip->central_directory;
	   zip->central_directory = l->next;
	   archive_entry_free(l->entry);
	   free(l);
	}
#ifdef HAVE_ZLIB_H
	free(zip->buf);
#endif
	free(zip);
	a->format_data = NULL;
	return (ARCHIVE_OK);
}

/* Convert into MSDOS-style date/time. */
static unsigned int
dos_time(const time_t unix_time)
{
	struct tm *t;
	unsigned int dt;

	/* This will not preserve time when creating/extracting the archive
	 * on two systems with different time zones. */
	t = localtime(&unix_time);

	dt = 0;
	dt += ((t->tm_year - 80) & 0x7f) << 9;
	dt += ((t->tm_mon + 1) & 0x0f) << 5;
	dt += (t->tm_mday & 0x1f);
	dt <<= 16;
	dt += (t->tm_hour & 0x1f) << 11;
	dt += (t->tm_min & 0x3f) << 5;
	dt += (t->tm_sec & 0x3e) >> 1; /* Only counting every 2 seconds. */
	return dt;
}

static size_t
path_length(struct archive_entry *entry)
{
	mode_t type;
	const char *path;

	type = archive_entry_filetype(entry);
	path = archive_entry_pathname(entry);

	if ((type == AE_IFDIR) & (path[strlen(path) - 1] != '/')) {
		return strlen(path) + 1;
	} else {
		return strlen(path);
	}
}

static int
write_path(struct archive_entry *entry, struct archive_write *archive)
{
	int ret;
	const char *path;
	mode_t type;
	size_t written_bytes;

	path = archive_entry_pathname(entry);
	type = archive_entry_filetype(entry);
	written_bytes = 0;

	ret = (archive->compressor.write)(archive, path, strlen(path));
	if (ret != ARCHIVE_OK)
		return (ARCHIVE_FATAL);
	written_bytes += strlen(path);

	/* Folders are recognized by a traling slash. */
	if ((type == AE_IFDIR) & (path[strlen(path) - 1] != '/')) {
		ret = (archive->compressor.write)(archive, "/", 1);
		if (ret != ARCHIVE_OK)
			return (ARCHIVE_FATAL);
		written_bytes += 1;
	}

	return ((int)written_bytes);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/Attic/filter_fork.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/filter_fork.h

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"
__FBSDID("$FreeBSD$");

#include "archive_private.h"
#include "archive_entry.h"

#if defined(_WIN32) && !defined(__CYGWIN__)

#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)

__inline static void
fileTimeToUtc(const FILETIME *filetime, time_t *time, long *ns)
{
	ULARGE_INTEGER utc;

	utc.HighPart = filetime->dwHighDateTime;
	utc.LowPart  = filetime->dwLowDateTime;
	if (utc.QuadPart >= EPOC_TIME) {
		utc.QuadPart -= EPOC_TIME;
		*time = (time_t)(utc.QuadPart / 10000000);	/* milli seconds base */
		*ns = (long)(utc.QuadPart % 10000000) * 100;/* nano seconds base */
	} else {
		*time = 0;
		*ns = 0;
	}
}

void
archive_entry_copy_bhfi(struct archive_entry *entry,
			BY_HANDLE_FILE_INFORMATION *bhfi)
{
	time_t secs;
	long nsecs;

	fileTimeToUtc(&bhfi->ftLastAccessTime, &secs, &nsecs);
	archive_entry_set_atime(entry, secs, nsecs);
	fileTimeToUtc(&bhfi->ftLastWriteTime, &secs, &nsecs);
	archive_entry_set_mtime(entry, secs, nsecs);
	fileTimeToUtc(&bhfi->ftCreationTime, &secs, &nsecs);
	archive_entry_set_birthtime(entry, secs, nsecs);
	archive_entry_set_dev(entry, bhfi->dwVolumeSerialNumber);
	archive_entry_set_ino64(entry, (((int64_t)bhfi->nFileIndexHigh) << 32)
		+ bhfi->nFileIndexLow);
	archive_entry_set_nlink(entry, bhfi->nNumberOfLinks);
	archive_entry_set_size(entry, (((int64_t)bhfi->nFileSizeHigh) << 32)
		+ bhfi->nFileSizeLow);
//	archive_entry_set_mode(entry, st->st_mode);
}
#endif

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/filter_fork_windows.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "archive_platform.h"

#if defined(_WIN32) && !defined(__CYGWIN__)

#include "filter_fork.h"

pid_t
__archive_create_child(const char *path, int *child_stdin, int *child_stdout)
{
	HANDLE childStdout[2], childStdin[2], childStdinWr, childStdoutRd;
	SECURITY_ATTRIBUTES secAtts;
	STARTUPINFO staInfo;
	PROCESS_INFORMATION childInfo;
	char cmd[MAX_PATH];
	DWORD mode;

	secAtts.nLength = sizeof(SECURITY_ATTRIBUTES);
	secAtts.bInheritHandle = TRUE;
	secAtts.lpSecurityDescriptor = NULL;
	if (CreatePipe(&childStdout[0], &childStdout[1], &secAtts, 0) == 0)
		goto fail;
	if (DuplicateHandle(GetCurrentProcess(), childStdout[0],
	    GetCurrentProcess(), &childStdoutRd, 0, FALSE,
	    DUPLICATE_SAME_ACCESS) == 0) {
		CloseHandle(childStdout[0]);
		CloseHandle(childStdout[1]);
		goto fail;
	}
	CloseHandle(childStdout[0]);

	if (CreatePipe(&childStdin[0], &childStdin[1], &secAtts, 0) == 0) {
		CloseHandle(childStdoutRd);
		CloseHandle(childStdout[1]);
		goto fail;
	}

	if (DuplicateHandle(GetCurrentProcess(), childStdin[1],
	    GetCurrentProcess(), &childStdinWr, 0, FALSE,
	    DUPLICATE_SAME_ACCESS) == 0) {
		CloseHandle(childStdoutRd);
		CloseHandle(childStdout[1]);
		CloseHandle(childStdin[0]);
		CloseHandle(childStdin[1]);
		goto fail;
	}
	CloseHandle(childStdin[1]);

	memset(&staInfo, 0, sizeof(staInfo));
	staInfo.cb = sizeof(staInfo);
	staInfo.hStdOutput = childStdout[1];
	staInfo.hStdInput = childStdin[0];
	staInfo.wShowWindow = SW_HIDE;
	staInfo.dwFlags = STARTF_USEFILLATTRIBUTE | STARTF_USECOUNTCHARS |
	    STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
	strncpy(cmd, path, sizeof(cmd)-1);
	cmd[sizeof(cmd)-1] = '\0';
	if (CreateProcessA(NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL,
	    &staInfo, &childInfo) == 0) {
		CloseHandle(childStdoutRd);
		CloseHandle(childStdout[1]);
		CloseHandle(childStdin[0]);
		CloseHandle(childStdinWr);
		goto fail;
	}
	WaitForInputIdle(childInfo.hProcess, INFINITE);
	CloseHandle(childInfo.hProcess);
	CloseHandle(childInfo.hThread);

	mode = PIPE_NOWAIT;
	SetNamedPipeHandleState(childStdoutRd, &mode, NULL, NULL);
	*child_stdout = _open_osfhandle((intptr_t)childStdoutRd, _O_RDONLY);
	*child_stdin = _open_osfhandle((intptr_t)childStdinWr, _O_WRONLY);

	return (childInfo.dwProcessId);

fail:
	return (-1);
}

void
__archive_check_child(int in, int out)
{
	(void)in; /* UNSED */
	(void)out; /* UNSED */
	Sleep(100);
}

#endif /* _WIN32 && !__CYGWIN__ */

File Added: pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt

############################################
#
# How to build libarchive
#
############################################

# Public headers
SET(include_HEADERS
  archive.h
  archive_entry.h
)

# Sources and private headers
SET(libarchive_SOURCES
  archive_check_magic.c
  archive_endian.h
  archive_entry.c
  archive_entry.h
  archive_entry_copy_stat.c
  archive_entry_link_resolver.c
  archive_entry_private.h
  archive_entry_stat.c
  archive_entry_strmode.c
  archive_entry_xattr.c
  archive_hash.h
  archive_platform.h
  archive_private.h
  archive_read.c
  archive_read_data_into_fd.c
  archive_read_disk.c
  archive_read_disk_entry_from_file.c
  archive_read_disk_private.h
  archive_read_disk_set_standard_lookup.c
  archive_read_extract.c
  archive_read_open_fd.c
  archive_read_open_file.c
  archive_read_open_filename.c
  archive_read_open_memory.c
  archive_read_private.h
  archive_read_support_compression_all.c
  archive_read_support_compression_bzip2.c
  archive_read_support_compression_compress.c
  archive_read_support_compression_gzip.c
  archive_read_support_compression_none.c
  archive_read_support_compression_program.c
  archive_read_support_compression_rpm.c
  archive_read_support_compression_uu.c
  archive_read_support_compression_xz.c
  archive_read_support_format_all.c
  archive_read_support_format_ar.c
  archive_read_support_format_cpio.c
  archive_read_support_format_empty.c
  archive_read_support_format_iso9660.c
  archive_read_support_format_mtree.c
  archive_read_support_format_raw.c
  archive_read_support_format_tar.c
  archive_read_support_format_xar.c
  archive_read_support_format_zip.c
  archive_string.c
  archive_string.h
  archive_string_sprintf.c
  archive_util.c
  archive_virtual.c
  archive_write.c
  archive_write_disk.c
  archive_write_disk_private.h
  archive_write_disk_set_standard_lookup.c
  archive_write_private.h
  archive_write_open_fd.c
  archive_write_open_file.c
  archive_write_open_filename.c
  archive_write_open_memory.c
  archive_write_set_compression_bzip2.c
  archive_write_set_compression_compress.c
  archive_write_set_compression_gzip.c
  archive_write_set_compression_none.c
  archive_write_set_compression_program.c
  archive_write_set_compression_xz.c
  archive_write_set_format.c
  archive_write_set_format_ar.c
  archive_write_set_format_by_name.c
  archive_write_set_format_cpio.c
  archive_write_set_format_cpio_newc.c
  archive_write_set_format_mtree.c
  archive_write_set_format_pax.c
  archive_write_set_format_shar.c
  archive_write_set_format_ustar.c
  archive_write_set_format_zip.c
  filter_fork.c
  filter_fork.h
)

# Man pages
SET(libarchive_MANS
  archive_entry.3
  archive_read.3
  archive_read_disk.3
  archive_util.3
  archive_write.3
  archive_write_disk.3
  cpio.5
  libarchive.3
  libarchive_internals.3
  libarchive-formats.5
  mtree.5
  tar.5
)

IF(WIN32 AND NOT CYGWIN)
  LIST(APPEND libarchive_SOURCES archive_entry_copy_bhfi.c)
  LIST(APPEND libarchive_SOURCES archive_windows.c)
  LIST(APPEND libarchive_SOURCES archive_windows.h)
  LIST(APPEND libarchive_SOURCES filter_fork_windows.c)
ENDIF(WIN32 AND NOT CYGWIN)

# Libarchive is a shared library
ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS})
TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS})
SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION})

# archive_static is a static library
ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS})
SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS
  LIBARCHIVE_STATIC)
# On Posix systems, libarchive.so and libarchive.a can co-exist.
IF(NOT WIN32 OR CYGWIN)
  SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive)
ENDIF(NOT WIN32 OR CYGWIN)

# How to install the libraries
INSTALL(TARGETS archive archive_static
        RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib)
INSTALL_MAN(${libarchive_MANS})
INSTALL(FILES ${include_HEADERS} DESTINATION include)

add_subdirectory(test)

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_entry.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_read.3

File Added: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk.3
.\" Copyright (c) 2003-2009 Tim Kientzle
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: head/lib/libarchive/archive_read_disk.3 190957 2009-04-12 05:04:02Z kientzle $
.\"
.Dd March 10, 2009
.Dt archive_read_disk 3
.Os
.Sh NAME
.Nm archive_read_disk_new ,
.Nm archive_read_disk_set_symlink_logical ,
.Nm archive_read_disk_set_symlink_physical ,
.Nm archive_read_disk_set_symlink_hybrid ,
.Nm archive_read_disk_entry_from_file ,
.Nm archive_read_disk_gname ,
.Nm archive_read_disk_uname ,
.Nm archive_read_disk_set_uname_lookup ,
.Nm archive_read_disk_set_gname_lookup ,
.Nm archive_read_disk_set_standard_lookup ,
.Nm archive_read_close ,
.Nm archive_read_finish
.Nd functions for reading objects from disk
.Sh SYNOPSIS
.In archive.h
.Ft struct archive *
.Fn archive_read_disk_new "void"
.Ft int
.Fn archive_read_disk_set_symlink_logical "struct archive *"
.Ft int
.Fn archive_read_disk_set_symlink_physical "struct archive *"
.Ft int
.Fn archive_read_disk_set_symlink_hybrid "struct archive *"
.Ft int
.Fn archive_read_disk_gname "struct archive *" "gid_t"
.Ft int
.Fn archive_read_disk_uname "struct archive *" "uid_t"
.Ft int
.Fo archive_read_disk_set_gname_lookup
.Fa "struct archive *"
.Fa "void *"
.Fa "const char *(*lookup)(void *, gid_t)"
.Fa "void (*cleanup)(void *)"
.Fc
.Ft int
.Fo archive_read_disk_set_uname_lookup
.Fa "struct archive *"
.Fa "void *"
.Fa "const char *(*lookup)(void *, uid_t)"
.Fa "void (*cleanup)(void *)"
.Fc
.Ft int
.Fn archive_read_disk_set_standard_lookup "struct archive *"
.Ft int
.Fo archive_read_disk_entry_from_file
.Fa "struct archive *"
.Fa "struct archive_entry *"
.Fa "int fd"
.Fa "const struct stat *"
.Fc
.Ft int
.Fn archive_read_close "struct archive *"
.Ft int
.Fn archive_read_finish "struct archive *"
.Sh DESCRIPTION
These functions provide an API for reading information about
objects on disk.
In particular, they provide an interface for populating
.Tn struct archive_entry
objects.
.Bl -tag -width indent
.It Fn archive_read_disk_new
Allocates and initializes a
.Tn struct archive
object suitable for reading object information from disk.
.It Xo
.Fn archive_read_disk_set_symlink_logical ,
.Fn archive_read_disk_set_symlink_physical ,
.Fn archive_read_disk_set_symlink_hybrid
.Xc
This sets the mode used for handling symbolic links.
The
.Dq logical
mode follows all symbolic links.
The
.Dq physical
mode does not follow any symbolic links.
The
.Dq hybrid
mode currently behaves identically to the
.Dq logical
mode.
.It Xo
.Fn archive_read_disk_gname ,
.Fn archive_read_disk_uname
.Xc
Returns a user or group name given a gid or uid value.
By default, these always return a NULL string.
.It Xo
.Fn archive_read_disk_set_gname_lookup ,
.Fn archive_read_disk_set_uname_lookup
.Xc
These allow you to override the functions used for
user and group name lookups.
You may also provide a
.Tn void *
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
.Tn struct archive
object is destroyed or when new lookup functions are registered.
.It Fn archive_read_disk_set_standard_lookup
This convenience function installs a standard set of user
and group name lookup functions.
These functions use
.Xr getpwid 3
and
.Xr getgrid 3
to convert ids to names, defaulting to NULL if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
.Xr getpwid 3
and
.Xr getgrid 3 .
.It Fn archive_read_disk_entry_from_file
Populates a
.Tn struct archive_entry
object with information about a particular file.
The
.Tn archive_entry
object must have already been created with
.Xr archive_entry_new 3
and at least one of the source path or path fields must already be set.
(If both are set, the source path will be used.)
.Pp
Information is read from disk using the path name from the
.Tn struct archive_entry
object.
If a file descriptor is provided, some information will be obtained using
that file descriptor, on platforms that support the appropriate
system calls.
.Pp
If a pointer to a
.Tn struct stat
is provided, information from that structure will be used instead
of reading from the disk where appropriate.
This can provide performance benefits in scenarios where
.Tn struct stat
information has already been read from the disk as a side effect
of some other operation.
(For example, directory traversal libraries often provide this information.)
.Pp
Where necessary, user and group ids are converted to user and group names
using the currently registered lookup functions above.
This affects the file ownership fields and ACL values in the
.Tn struct archive_entry
object.
.It Fn archive_read_close
This currently does nothing.
.It Fn archive_write_finish
Invokes
.Fn archive_write_close
if it was not invoked manually, then releases all resources.
.El
More information about the
.Va struct archive
object and the overall design of the library can be found in the
.Xr libarchive 3
overview.
.Sh EXAMPLE
The following illustrates basic usage of the library by
showing how to use it to copy an item on disk into an archive.
.Bd -literal -offset indent
void
file_to_archive(struct archive *a, const char *name)
{
  char buff[8192];
  size_t bytes_read;
  struct archive *ard;
  struct archive_entry *entry;
  int fd;

  ard = archive_read_disk_new();
  archive_read_disk_set_standard_lookup(ard);
  entry = archive_entry_new();
  fd = open(name, O_RDONLY);
  if (fd < 0)
     return;
  archive_entry_copy_sourcepath(entry, name);
  archive_read_disk_entry_from_file(ard, entry, fd, NULL);
  archive_write_header(a, entry);
  while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
    archive_write_data(a, buff, bytes_read);
  archive_write_finish_entry(a);
  archive_read_finish(ard);
  archive_entry_free(entry);
}
.Ed
.Sh RETURN VALUES
Most functions return
.Cm ARCHIVE_OK
(zero) on success, or one of several negative
error codes for errors.
Specific error codes include:
.Cm ARCHIVE_RETRY
for operations that might succeed if retried,
.Cm ARCHIVE_WARN
for unusual conditions that do not prevent further operations, and
.Cm ARCHIVE_FATAL
for serious errors that make remaining operations impossible.
The
.Xr archive_errno 3
and
.Xr archive_error_string 3
functions can be used to retrieve an appropriate error code and a
textual error message.
(See
.Xr archive_util 3
for details.)
.Pp
.Fn archive_read_disk_new
returns a pointer to a newly-allocated
.Tn struct archive
object or NULL if the allocation failed for any reason.
.Pp
.Fn archive_read_disk_gname
and
.Fn archive_read_disk_uname
return
.Tn const char *
pointers to the textual name or NULL if the lookup failed for any reason.
The returned pointer points to internal storage that
may be reused on the next call to either of these functions;
callers should copy the string if they need to continue accessing it.
.Pp
.Sh SEE ALSO
.Xr archive_read 3 ,
.Xr archive_write 3 ,
.Xr archive_write_disk 3 ,
.Xr tar 1 ,
.Xr libarchive 3
.Sh HISTORY
The
.Nm libarchive
library first appeared in
.Fx 5.3 .
The
.Nm archive_read_disk
interface was added to
.Nm libarchive 2.6
and first appeared in
.Fx 8.0 .
.Sh AUTHORS
.An -nosplit
The
.Nm libarchive
library was written by
.An Tim Kientzle Aq kientzle@freebsd.org .
.Sh BUGS
The
.Dq standard
user name and group name lookup functions are not the defaults because
.Xr getgrid 3
and
.Xr getpwid 3
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.
.Pp
The full list of metadata read from disk by
.Fn archive_read_disk_entry_from_file
is necessarily system-dependent.
.Pp
The
.Fn archive_read_disk_entry_from_file
function reads as much information as it can from disk.
Some method should be provided to limit this so that clients who
do not need ACLs, for instance, can avoid the extra work needed
to look up such information.
.Pp
This API should provide a set of methods for walking a directory tree.
That would make it a direct parallel of the
.Xr archive_read 3
API.
When such methods are implemented, the
.Dq hybrid
symbolic link mode will make sense.

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_util.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/cpio.5

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/libarchive.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/libarchive_internals.3

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/mtree.5

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/tar.5

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/main.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_acl_basic.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_acl_freebsd.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_acl_freebsd.c 189427 2009-03-06 04:21:23Z kientzle $");

#if defined(__FreeBSD__) && __FreeBSD__ > 4
#include <sys/acl.h>

struct myacl_t {
	int type;  /* Type of ACL: "access" or "default" */
	int permset; /* Permissions for this class of users. */
	int tag; /* Owner, User, Owning group, group, other, etc. */
	int qual; /* GID or UID of user/group, depending on tag. */
	const char *name; /* Name of user/group, depending on tag. */
};

static struct myacl_t acls2[] = {
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ,
	  ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
	  ARCHIVE_ENTRY_ACL_USER, 77, "user77" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0,
	  ARCHIVE_ENTRY_ACL_USER, 78, "user78" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
	  ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0007,
	  ARCHIVE_ENTRY_ACL_GROUP, 78, "group78" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
	  ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_EXECUTE,
	  ARCHIVE_ENTRY_ACL_OTHER, -1, "" },
	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
	  ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_READ | ARCHIVE_ENTRY_ACL_EXECUTE,
	  ARCHIVE_ENTRY_ACL_MASK, -1, "" },
	{ 0, 0, 0, 0, NULL }
};

static void
set_acls(struct archive_entry *ae, struct myacl_t *acls)
{
	int i;

	archive_entry_acl_clear(ae);
	for (i = 0; acls[i].name != NULL; i++) {
		archive_entry_acl_add_entry(ae,
		    acls[i].type, acls[i].permset, acls[i].tag, acls[i].qual,
		    acls[i].name);
	}
}

static int
acl_match(acl_entry_t aclent, struct myacl_t *myacl)
{
	gid_t g, *gp;
	uid_t u, *up;
	acl_tag_t tag_type;
	acl_permset_t opaque_ps;
	int permset = 0;

	acl_get_tag_type(aclent, &tag_type);

	/* translate the silly opaque permset to a bitmap */
	acl_get_permset(aclent, &opaque_ps);
	if (acl_get_perm_np(opaque_ps, ACL_EXECUTE))
		permset |= ARCHIVE_ENTRY_ACL_EXECUTE;
	if (acl_get_perm_np(opaque_ps, ACL_WRITE))
		permset |= ARCHIVE_ENTRY_ACL_WRITE;
	if (acl_get_perm_np(opaque_ps, ACL_READ))
		permset |= ARCHIVE_ENTRY_ACL_READ;

	if (permset != myacl->permset)
		return (0);

	switch (tag_type) {
	case ACL_USER_OBJ:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0);
		break;
	case ACL_USER:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_USER)
			return (0);
		up = acl_get_qualifier(aclent);
		u = *up;
		acl_free(up);
		if ((uid_t)myacl->qual != u)
			return (0);
		break;
	case ACL_GROUP_OBJ:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0);
		break;
	case ACL_GROUP:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP)
			return (0);
		gp = acl_get_qualifier(aclent);
		g = *gp;
		acl_free(gp);
		if ((gid_t)myacl->qual != g)
			return (0);
		break;
	case ACL_MASK:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0);
		break;
	case ACL_OTHER:
		if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0);
		break;
	}
	return (1);
}

static void
compare_acls(acl_t acl, struct myacl_t *myacls)
{
	int *marker;
	int entry_id = ACL_FIRST_ENTRY;
	int matched;
	int i, n;
	acl_entry_t acl_entry;

	/* Count ACL entries in myacls array and allocate an indirect array. */
	for (n = 0; myacls[n].name != NULL; ++n)
		continue;
	marker = malloc(sizeof(marker[0]) * n);
	for (i = 0; i < n; i++)
		marker[i] = i;

	/*
	 * Iterate over acls in system acl object, try to match each
	 * one with an item in the myacls array.
	 */
	while (1 == acl_get_entry(acl, entry_id, &acl_entry)) {
		/* After the first time... */
		entry_id = ACL_NEXT_ENTRY;

		/* Search for a matching entry (tag and qualifier) */
		for (i = 0, matched = 0; i < n && !matched; i++) {
			if (acl_match(acl_entry, &myacls[marker[i]])) {
				/* We found a match; remove it. */
				marker[i] = marker[n - 1];
				n--;
				matched = 1;
			}
		}

		/* TODO: Print out more details in this case. */
		failure("ACL entry on file that shouldn't be there");
		assert(matched == 1);
	}

	/* Dump entries in the myacls array that weren't in the system acl. */
	for (i = 0; i < n; ++i) {
		failure(" ACL entry missing from file: "
		    "type=%d,permset=%d,tag=%d,qual=%d,name=``%s''\n",
		    myacls[marker[i]].type, myacls[marker[i]].permset,
		    myacls[marker[i]].tag, myacls[marker[i]].qual,
		    myacls[marker[i]].name);
		assert(0); /* Record this as a failure. */
	}
	free(marker);
}

#endif


/*
 * Verify ACL restore-to-disk.  This test is FreeBSD-specific.
 */

DEFINE_TEST(test_acl_freebsd)
{
#if !defined(__FreeBSD__)
	skipping("FreeBSD-specific ACL restore test");
#elif __FreeBSD__ < 5
	skipping("ACL restore supported only on FreeBSD 5.0 and later");
#else
	struct stat st;
	struct archive *a;
	struct archive_entry *ae;
	int n, fd;
	acl_t acl;

	/*
	 * First, do a quick manual set/read of ACL data to
	 * verify that the local filesystem does support ACLs.
	 * If it doesn't, we'll simply skip the remaining tests.
	 */
	acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx");
	assert((void *)acl != NULL);
	/* Create a test file and try to set an ACL on it. */
	fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777);
	failure("Could not create test file?!");
	if (!assert(fd >= 0)) {
		acl_free(acl);
		return;
	}

	n = acl_set_fd(fd, acl);
	acl_free(acl);
	if (n != 0 && errno == EOPNOTSUPP) {
		close(fd);
		skipping("ACL tests require that ACL support be enabled on the filesystem");
		return;
	}
	failure("acl_set_fd(): errno = %d (%s)",
	    errno, strerror(errno));
	assertEqualInt(0, n);
	close(fd);

	/* Create a write-to-disk object. */
	assert(NULL != (a = archive_write_disk_new()));
	archive_write_disk_set_options(a,
	    ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL);

	/* Populate an archive entry with some metadata, including ACL info */
	ae = archive_entry_new();
	assert(ae != NULL);
	archive_entry_set_pathname(ae, "test0");
	archive_entry_set_mtime(ae, 123456, 7890);
	archive_entry_set_size(ae, 0);
	set_acls(ae, acls2);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Close the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/* Verify the data on disk. */
	assertEqualInt(0, stat("test0", &st));
	assertEqualInt(st.st_mtime, 123456);
	acl = acl_get_file("test0", ACL_TYPE_ACCESS);
	assert(acl != (acl_t)NULL);
	compare_acls(acl, acls2);
	acl_free(acl);
#endif
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_pax.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_api_feature.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_bad_fd.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_bzip2.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Verify our ability to read sample files compatibly with bunzip2.
 *
 * In particular:
 *  * bunzip2 will read multiple bzip2 streams, concatenating the output
 *  * bunzip2 will stop at the end of a stream if the following data
 *    doesn't start with a bzip2 signature.
 */

/*
 * All of the sample files have the same contents; they're just
 * compressed in different ways.
 */
static void
compat_bzip2(const char *name)
{
	const char *n[7] = { "f1", "f2", "f3", "d1/f1", "d1/f2", "d1/f3", NULL };
	struct archive_entry *ae;
	struct archive *a;
	int i;

	assert((a = archive_read_new()) != NULL);
	if (ARCHIVE_OK != archive_read_support_compression_bzip2(a)) {
		skipping("Unsupported bzip2");
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));

	/* Read entries, match up names with list above. */
	for (i = 0; i < 6; ++i) {
		failure("Could not read file %d (%s) from %s", i, n[i], name);
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_next_header(a, &ae));
		assertEqualString(n[i], archive_entry_pathname(ae));
	}

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_BZIP2);
	assertEqualString(archive_compression_name(a), "bzip2");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);

	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


DEFINE_TEST(test_compat_bzip2)
{
	compat_bzip2("test_compat_bzip2_1.tbz");
	compat_bzip2("test_compat_bzip2_2.tbz");
}



File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_cpio.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_cpio.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Verify our ability to read various sample files.
 * It should be easy to add any new sample files sent in by users
 * to this collection of tests.
 */

/* Copy this function for each test file and adjust it accordingly. */

/*
 * test_compat_cpio_1.cpio checks heuristics for avoiding false
 * hardlinks.  foo1 and foo2 are files that have nlinks=1 and so
 * should not be marked as hardlinks even though they have identical
 * ino values.  bar1 and bar2 have nlinks=2 so should be marked
 * as hardlinks.
 */
static void
test_compat_cpio_1(void)
{
	char name[] = "test_compat_cpio_1.cpio";
	struct archive_entry *ae;
	struct archive *a;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 17));

	/* Read first entry. */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("foo1", archive_entry_pathname(ae));
	assertEqualString(NULL, archive_entry_hardlink(ae));
	assertEqualInt(1260250228, archive_entry_mtime(ae));
	assertEqualInt(1000, archive_entry_uid(ae));
	assertEqualInt(1000, archive_entry_gid(ae));
	assertEqualInt(0100644, archive_entry_mode(ae));

	/* Read second entry. */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("foo2", archive_entry_pathname(ae));
	assertEqualString(NULL, archive_entry_hardlink(ae));
	assertEqualInt(1260250228, archive_entry_mtime(ae));
	assertEqualInt(1000, archive_entry_uid(ae));
	assertEqualInt(1000, archive_entry_gid(ae));
	assertEqualInt(0100644, archive_entry_mode(ae));

	/* Read third entry. */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("bar1", archive_entry_pathname(ae));
	assertEqualString(NULL, archive_entry_hardlink(ae));
	assertEqualInt(1260250228, archive_entry_mtime(ae));
	assertEqualInt(1000, archive_entry_uid(ae));
	assertEqualInt(1000, archive_entry_gid(ae));
	assertEqualInt(0100644, archive_entry_mode(ae));

	/* Read fourth entry. */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("bar2", archive_entry_pathname(ae));
	assertEqualString("bar1", archive_entry_hardlink(ae));
	assertEqualInt(1260250228, archive_entry_mtime(ae));
	assertEqualInt(1000, archive_entry_uid(ae));
	assertEqualInt(1000, archive_entry_gid(ae));
	assertEqualInt(0100644, archive_entry_mode(ae));

	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_NONE);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);

	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


DEFINE_TEST(test_compat_cpio)
{
	test_compat_cpio_1();
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gtar.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_gzip.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * Verify our ability to read sample files compatibly with gunzip.
 *
 * In particular:
 *  * gunzip will read multiple gzip streams, concatenating the output
 *  * gunzip will stop at the end of a stream if the following data
 *    doesn't start with a gzip signature.
 */

/*
 * All of the sample files have the same contents; they're just
 * compressed in different ways.
 */
static void
verify(const char *name)
{
	const char *n[7] = { "f1", "f2", "f3", "d1/f1", "d1/f2", "d1/f3", NULL };
	struct archive_entry *ae;
	struct archive *a;
	int i,r;

	assert((a = archive_read_new()) != NULL);
	r = archive_read_support_compression_gzip(a);
	if (r == ARCHIVE_WARN) {
		skipping("gzip reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, r);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 200));

	/* Read entries, match up names with list above. */
	for (i = 0; i < 6; ++i) {
		failure("Could not read file %d (%s) from %s", i, n[i], name);
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_next_header(a, &ae));
		if (r != ARCHIVE_OK) {
			archive_read_finish(a);
			return;
		}
		assertEqualString(n[i], archive_entry_pathname(ae));
	}

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_GZIP);
	assertEqualString(archive_compression_name(a), "gzip");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);

	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


DEFINE_TEST(test_compat_gzip)
{
	/* This sample has been 'split', each piece compressed separately,
	 * then concatenated.  Gunzip will emit the concatenated result. */
	/* Not supported in libarchive 2.6 and earlier */
	verify("test_compat_gzip_1.tgz");
	/* This sample has been compressed as a single stream, but then
	 * some unrelated garbage text has been appended to the end. */
	verify("test_compat_gzip_2.tgz");
}



File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_lzma.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following to rebuild the data for this program:
   tail -n +33 test_compat_lzma.c | /bin/sh

# Use lzma command of XZ Utils.
name=test_compat_lzma_1
zcmd=lzma
zsuffix=lzma
ztar_suffix=tlz
dir="$name`date +%Y%m%d%H%M%S`.$USER"
mktarfile()
{
mkdir $dir
echo "f1" > $dir/f1
echo "f2" > $dir/f2
echo "f3" > $dir/f3
mkdir $dir/d1
echo "f1" > $dir/d1/f1
echo "f2" > $dir/d1/f2
echo "f3" > $dir/d1/f3
(cd $dir; tar cf ../$name.tar f1 f2 f3 d1/f1 d1/f2 d1/f3)
rm -r $dir
}
mktarfile
$zcmd $name.tar
mv $name.tar.$zsuffix $name.$ztar_suffix
echo "This is unrelated junk data at the end of the file" >> $name.$ztar_suffix
uuencode $name.$ztar_suffix $name.$ztar_suffix > $name.$ztar_suffix.uu
rm -f $name.$ztar_suffix
#
# Use option -e
#
name=test_compat_lzma_2
dir="$name`date +%Y%m%d%H%M%S`.$USER"
mktarfile
$zcmd -e $name.tar
mv $name.tar.$zsuffix $name.$ztar_suffix
uuencode $name.$ztar_suffix $name.$ztar_suffix > $name.$ztar_suffix.uu
rm -f $name.$ztar_suffix
#
# Use lzma command of LZMA SDK with option -d12.
#
name=test_compat_lzma_3
zcmd=lzmasdk	# Change this path to use lzma of LZMA SDK.
dir="$name`date +%Y%m%d%H%M%S`.$USER"
mktarfile
$zcmd e -d12 $name.tar $name.$ztar_suffix
rm -f $name.tar
uuencode $name.$ztar_suffix $name.$ztar_suffix > $name.$ztar_suffix.uu
rm -f $name.$ztar_suffix

exit 0
*/

/*
 * Verify our ability to read sample files compatibly with unlzma.
 *
 * In particular:
 *  * unlzma will read multiple lzma streams, concatenating the output
 *  * unlzma will read lzma streams which is made by lzma with option -e,
 *    concatenating the output
 *
 * Verify our ability to read sample files compatibly with lzma of
 * LZMA SDK.
 *  * lzma will read lzma streams which is made by lzma with option -d12,
 *    concatenating the output
 */

/*
 * All of the sample files have the same contents; they're just
 * compressed in different ways.
 */
static void
compat_lzma(const char *name)
{
	const char *n[7] = { "f1", "f2", "f3", "d1/f1", "d1/f2", "d1/f3", NULL };
	struct archive_entry *ae;
	struct archive *a;
	int i, r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));

	/* Read entries, match up names with list above. */
	for (i = 0; i < 6; ++i) {
		failure("Could not read file %d (%s) from %s", i, n[i], name);
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_next_header(a, &ae));
		assertEqualString(n[i], archive_entry_pathname(ae));
	}

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_LZMA);
	assertEqualString(archive_compression_name(a), "lzma");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);

	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


DEFINE_TEST(test_compat_lzma)
{
	/* This sample has been added junk datas to its tail. */
	compat_lzma("test_compat_lzma_1.tlz");
	/* This sample has been made by lzma with option -e,
	 * the first byte of which is 0x5e.
	 * Not supported in libarchive 2.7.* and earlier */
	compat_lzma("test_compat_lzma_2.tlz");
	/* This sample has been made by lzma of LZMA SDK with
	 * option -d12, second byte and third byte of which is
	 * not zero.
	 * Not supported in libarchive 2.7.* and earlier */
	compat_lzma("test_compat_lzma_3.tlz");
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_solaris_tar_acl.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_solaris_tar_acl.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Exercise support for reading Solaris-style ACL data
 * from tar archives.
 *
 * This should work on all systems, regardless of whether local
 * filesystems support ACLs or not.
 */

DEFINE_TEST(test_compat_solaris_tar_acl)
{
	struct archive *a;
	struct archive_entry *ae;
	const char *reference1 = "test_compat_solaris_tar_acl.tar";
	int type, permset, tag, qual;
	const char *name;

	/* Sample file generated on Solaris 10 */
	extract_reference_file(reference1);
	assert(NULL != (a = archive_read_new()));
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	assertA(0 == archive_read_open_filename(a, reference1, 512));

	/* Archive has 1 entry with some ACLs set on it. */
	assertA(0 == archive_read_next_header(a, &ae));
	failure("Basic ACLs should set mode to 0644, not %04o",
	    archive_entry_mode(ae)&0777);
	assertEqualInt((archive_entry_mode(ae) & 0777), 0644);
	assertEqualInt(7, archive_entry_acl_reset(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS));
	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(006, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_USER_OBJ, tag);
	assertEqualInt(-1, qual);
	assert(name == NULL);

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(004, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_GROUP_OBJ, tag);
	assertEqualInt(-1, qual);
	assert(name == NULL);

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(004, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_OTHER, tag);
	assertEqualInt(-1, qual);
	assert(name == NULL);

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(001, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_USER, tag);
	assertEqualInt(71, qual);
	assertEqualString(name, "lp");

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(004, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_USER, tag);
	assertEqualInt(666, qual);
	assertEqualString(name, "666");

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(007, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_USER, tag);
	assertEqualInt(1000, qual);
	assertEqualString(name, "trasz");

	assertEqualInt(ARCHIVE_OK, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));
	assertEqualInt(ARCHIVE_ENTRY_ACL_TYPE_ACCESS, type);
	assertEqualInt(004, permset);
	assertEqualInt(ARCHIVE_ENTRY_ACL_MASK, tag);
	assertEqualInt(-1, qual);
	assertEqualString(name, NULL);

	assertEqualInt(ARCHIVE_EOF, archive_entry_acl_next(ae,
		ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
		&type, &permset, &tag, &qual, &name));

	/* Close the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_tar_hardlink.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_xz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_compat_xz.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * Verify our ability to read sample files compatibly with unxz.
 *
 * In particular:
 *  * unxz will read multiple xz streams, concatenating the output
 */

/*
 * All of the sample files have the same contents; they're just
 * compressed in different ways.
 */
static void
compat_xz(const char *name)
{
	const char *n[7] = { "f1", "f2", "f3", "d1/f1", "d1/f2", "d1/f3", NULL };
	struct archive_entry *ae;
	struct archive *a;
	int i, r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("xz reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));

	/* Read entries, match up names with list above. */
	for (i = 0; i < 6; ++i) {
		failure("Could not read file %d (%s) from %s", i, n[i], name);
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_next_header(a, &ae));
		assertEqualString(n[i], archive_entry_pathname(ae));
	}

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_XZ);
	assertEqualString(archive_compression_name(a), "xz");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);

	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


DEFINE_TEST(test_compat_xz)
{
	compat_xz("test_compat_xz_1.txz");
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_zip.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/list.h

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_empty_write.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_entry.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_extattr_freebsd.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_extattr_freebsd.c 201247 2009-12-30 05:59:21Z kientzle $");

#if defined(__FreeBSD__) && __FreeBSD__ > 4
#include <sys/extattr.h>
#endif

/*
 * Verify extended attribute restore-to-disk.  This test is FreeBSD-specific.
 */

DEFINE_TEST(test_extattr_freebsd)
{
#if !defined(__FreeBSD__)
	skipping("FreeBSD-specific extattr restore test");
#elif __FreeBSD__ < 5
	skipping("extattr restore supported only on FreeBSD 5.0 and later");
#else
	char buff[64];
	const char *xname;
	const void *xval;
	size_t xsize;
	struct stat st;
	struct archive *a;
	struct archive_entry *ae;
	int n, fd;
	int extattr_privilege_bug = 0;

	/*
	 * First, do a quick manual set/read of an extended attribute
	 * to verify that the local filesystem does support it.  If it
	 * doesn't, we'll simply skip the remaining tests.
	 */
	/* Create a test file and try to set an ACL on it. */
	fd = open("pretest", O_RDWR | O_CREAT, 0777);
	failure("Could not create test file?!");
	if (!assert(fd >= 0))
		return;

	errno = 0;
	n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4);
	if (n != 4 && errno == EOPNOTSUPP) {
		close(fd);
		skipping("extattr tests require that extattr support be enabled on the filesystem");
		return;
	}
	failure("extattr_set_fd(): errno=%d (%s)", errno, strerror(errno));
	assertEqualInt(4, n);
	close(fd);

	/*
	 * Repeat the above, but with file permissions set to 0000.
	 * This should work (extattr_set_fd() should follow fd
	 * permissions, not file permissions), but is known broken on
	 * some versions of FreeBSD.
	 */
	fd = open("pretest2", O_RDWR | O_CREAT, 00000);
	failure("Could not create test file?!");
	if (!assert(fd >= 0))
		return;

	n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4);
	if (n != 4) {
		skipping("Restoring xattr to an unwritable file seems to be broken on this platform");
		extattr_privilege_bug = 1;
	}
	close(fd);

	/* Create a write-to-disk object. */
	assert(NULL != (a = archive_write_disk_new()));
	archive_write_disk_set_options(a,
	    ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_XATTR);

	/* Populate an archive entry with an extended attribute. */
	ae = archive_entry_new();
	assert(ae != NULL);
	archive_entry_set_pathname(ae, "test0");
	archive_entry_set_mtime(ae, 123456, 7890);
	archive_entry_set_size(ae, 0);
	archive_entry_set_mode(ae, 0755);
	archive_entry_xattr_add_entry(ae, "user.foo", "12345", 5);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Another entry; similar but with mode = 0. */
	ae = archive_entry_new();
	assert(ae != NULL);
	archive_entry_set_pathname(ae, "test1");
	archive_entry_set_mtime(ae, 12345678, 7890);
	archive_entry_set_size(ae, 0);
	archive_entry_set_mode(ae, 0);
	archive_entry_xattr_add_entry(ae, "user.bar", "123456", 6);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Close the archive. */
	if (extattr_privilege_bug)
		/* If the bug is here, write_close will return warning. */
		assertEqualIntA(a, ARCHIVE_WARN, archive_write_close(a));
	else
		assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/* Verify the data on disk. */
	assertEqualInt(0, stat("test0", &st));
	assertEqualInt(st.st_mtime, 123456);
	/* Verify extattr */
	n = extattr_get_file("test0", EXTATTR_NAMESPACE_USER,
	    "foo", buff, sizeof(buff));
	if (assertEqualInt(n, 5)) {
		buff[n] = '\0';
		assertEqualString(buff, "12345");
	}

	/* Verify the data on disk. */
	assertEqualInt(0, stat("test1", &st));
	assertEqualInt(st.st_mtime, 12345678);
	/* Verify extattr */
	n = extattr_get_file("test1", EXTATTR_NAMESPACE_USER,
	    "bar", buff, sizeof(buff));
	if (extattr_privilege_bug) {
		/* If we have the bug, the extattr won't have been written. */
		assertEqualInt(n, -1);
	} else {
		if (assertEqualInt(n, 6)) {
			buff[n] = '\0';
			assertEqualString(buff, "123456");
		}
	}

	/* Use libarchive APIs to read the file back into an entry and
	 * verify that the extattr was read correctly. */
	assert((a = archive_read_disk_new()) != NULL);
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_pathname(ae, "test0");
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_entry_from_file(a, ae, -1, NULL));
	assertEqualInt(1, archive_entry_xattr_reset(ae));
	assertEqualInt(ARCHIVE_OK,
	    archive_entry_xattr_next(ae, &xname, &xval, &xsize));
	assertEqualString(xname, "user.foo");
	assertEqualInt(xsize, 5);
	assertEqualMem(xval, "12345", xsize);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
	archive_entry_free(ae);
#endif
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_fuzz.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_fuzz.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * This was inspired by an ISO fuzz tester written by Michal Zalewski
 * and posted to the "vulnwatch" mailing list on March 17, 2005:
 *    http://seclists.org/vulnwatch/2005/q1/0088.html
 *
 * This test simply reads each archive image into memory, pokes
 * random values into it and runs it through libarchive.  It tries
 * to damage about 1% of each file and repeats the exercise 100 times
 * with each file.
 *
 * Unlike most other tests, this test does not verify libarchive's
 * responses other than to ensure that libarchive doesn't crash.
 *
 * Due to the deliberately random nature of this test, it may be hard
 * to reproduce failures.  Because this test deliberately attempts to
 * induce crashes, there's little that can be done in the way of
 * post-failure diagnostics.
 */

/* Because this works for any archive, we can just re-use the archives
 * developed for other tests. */
static struct {
	int uncompress; /* If 1, decompress the file before fuzzing. */
	const char *name;
} files[] = {
	{0, "test_fuzz_1.iso.Z"}, /* Exercise compress decompressor. */
	{1, "test_fuzz_1.iso.Z"},
	{0, "test_compat_bzip2_1.tbz"}, /* Exercise bzip2 decompressor. */
	{1, "test_compat_bzip2_1.tbz"},
	{0, "test_compat_gtar_1.tar"},
	{0, "test_compat_gzip_1.tgz"}, /* Exercise gzip decompressor. */
	{0, "test_compat_gzip_2.tgz"}, /* Exercise gzip decompressor. */
	{0, "test_compat_tar_hardlink_1.tar"},
	{0, "test_compat_xz_1.txz"}, /* Exercise xz decompressor. */
	{0, "test_compat_zip_1.zip"},
	{0, "test_read_format_ar.ar"},
	{0, "test_read_format_cpio_bin_be.cpio"},
	{0, "test_read_format_cpio_svr4_gzip_rpm.rpm"}, /* Test RPM unwrapper */
	{0, "test_read_format_gtar_sparse_1_17_posix10_modified.tar"},
	{0, "test_read_format_mtree.mtree"},
	{0, "test_read_format_tar_empty_filename.tar"},
	{0, "test_read_format_zip.zip"},
	{1, NULL}
};

DEFINE_TEST(test_fuzz)
{
	const void *blk;
	size_t blk_size;
	off_t blk_offset;
	int n;

	for (n = 0; files[n].name != NULL; ++n) {
		const size_t buffsize = 30000000;
		const char *filename = files[n].name;
		struct archive_entry *ae;
		struct archive *a;
		char *rawimage, *image;
		size_t size;
		int i;

		extract_reference_file(filename);
		if (files[n].uncompress) {
			int r;
			/* Use format_raw to decompress the data. */
			assert((a = archive_read_new()) != NULL);
			assertEqualIntA(a, ARCHIVE_OK,
			    archive_read_support_compression_all(a));
			assertEqualIntA(a, ARCHIVE_OK,
			    archive_read_support_format_raw(a));
			r = archive_read_open_filename(a, filename, 16384);
			if (r != ARCHIVE_OK) {
				archive_read_finish(a);
				skipping("Cannot uncompress %s", filename);
				continue;
			}
			assertEqualIntA(a, ARCHIVE_OK,
			    archive_read_next_header(a, &ae));
			rawimage = malloc(buffsize);
			size = archive_read_data(a, rawimage, buffsize);
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_next_header(a, &ae));
			assertEqualInt(ARCHIVE_OK,
			    archive_read_finish(a));
			assert(size > 0);
			failure("Internal buffer is not big enough for "
			    "uncompressed test file: %s", filename);
			if (!assert(size < buffsize)) {
				free(rawimage);
				continue;
			}
		} else {
			rawimage = slurpfile(&size, filename);
			if (!assert(rawimage != NULL))
				continue;
		}
		image = malloc(size);
		assert(image != NULL);
		srand((unsigned)time(NULL));

		for (i = 0; i < 100; ++i) {
			FILE *f;
			int j, numbytes;

			/* Fuzz < 1% of the bytes in the archive. */
			memcpy(image, rawimage, size);
			numbytes = (int)(rand() % (size / 100));
			for (j = 0; j < numbytes; ++j)
				image[rand() % size] = (char)rand();

			/* Save the messed-up image to a file.
			 * If we crash, that file will be useful. */
			f = fopen("after.test.failure.send.this.file."
			    "to.libarchive.maintainers.with.system.details", "wb");
			fwrite(image, 1, (size_t)size, f);
			fclose(f);

			assert((a = archive_read_new()) != NULL);
			assertEqualIntA(a, ARCHIVE_OK,
			    archive_read_support_compression_all(a));
			assertEqualIntA(a, ARCHIVE_OK,
			    archive_read_support_format_all(a));

			if (0 == archive_read_open_memory(a, image, size)) {
				while(0 == archive_read_next_header(a, &ae)) {
					while (0 == archive_read_data_block(a,
						&blk, &blk_size, &blk_offset))
						continue;
				}
				archive_read_close(a);
			}
			archive_read_finish(a);
		}
		free(image);
		free(rawimage);
	}
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_entry_strmode.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_link_resolver.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_open_fd.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_open_fd.c 201247 2009-12-30 05:59:21Z kientzle $");

#if defined(_WIN32) && !defined(__CYGWIN__)
#define open _open
#if !defined(__BORLANDC__)
#define lseek _lseek
#endif
#define close _close
#endif

DEFINE_TEST(test_open_fd)
{
	char buff[64];
	struct archive_entry *ae;
	struct archive *a;
	int fd;

#if defined(__BORLANDC__)
	fd = open("test.tar", O_RDWR | O_CREAT | O_BINARY);
#else
	fd = open("test.tar", O_RDWR | O_CREAT | O_BINARY, 0777);
#endif
	assert(fd >= 0);
	if (fd < 0)
		return;

	/* Write an archive through this fd. */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_none(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_open_fd(a, fd));

	/*
	 * Write a file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 1, 0);
	archive_entry_copy_pathname(ae, "file");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));

	/*
	 * Write a second file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file2");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 819200);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Close out the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Now, read the data back.
	 */
	assert(lseek(fd, 0, SEEK_SET) == 0);
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_fd(a, fd, 512));

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("file", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(8, archive_entry_size(ae));
	assertEqualIntA(a, 8, archive_read_data(a, buff, 10));
	assertEqualMem(buff, "12345678", 8);

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("file2", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(819200, archive_entry_size(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_data_skip(a));

	/* Verify the end of the archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
	close(fd);


	/*
	 * Verify some of the error handling.
	 */
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	/* FD 100 shouldn't be open. */
	assertEqualIntA(a, ARCHIVE_FATAL,
	    archive_read_open_fd(a, 100, 512));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_open_file.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_open_file.c 201247 2009-12-30 05:59:21Z kientzle $");

DEFINE_TEST(test_open_file)
{
	char buff[64];
	struct archive_entry *ae;
	struct archive *a;
	FILE *f;

	f = fopen("test.tar", "wb");
	assert(f != NULL);
	if (f == NULL)
		return;

	/* Write an archive through this FILE *. */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_none(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_open_FILE(a, f));

	/*
	 * Write a file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 1, 0);
	archive_entry_copy_pathname(ae, "file");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));

	/*
	 * Write a second file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file2");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 819200);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Close out the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
	fclose(f);

	/*
	 * Now, read the data back.
	 */
	f = fopen("test.tar", "rb");
	assert(f != NULL);
	if (f == NULL)
		return;
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_FILE(a, f));

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("file", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(8, archive_entry_size(ae));
	assertEqualIntA(a, 8, archive_read_data(a, buff, 10));
	assertEqualMem(buff, "12345678", 8);

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("file2", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(819200, archive_entry_size(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_data_skip(a));

	/* Verify the end of the archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	fclose(f);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_open_filename.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_open_filename.c 191183 2009-04-17 01:06:31Z kientzle $");

DEFINE_TEST(test_open_filename)
{
	char buff[64];
	struct archive_entry *ae;
	struct archive *a;

	/* Write an archive through this FILE *. */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_none(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_open_filename(a, "test.tar"));

	/*
	 * Write a file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 1, 0);
	archive_entry_copy_pathname(ae, "file");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));

	/*
	 * Write a second file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file2");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 819200);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);

	/* Close out the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Now, read the data back.
	 */
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_filename(a, "test.tar", 512));

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("file", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(8, archive_entry_size(ae));
	assertEqualIntA(a, 8, archive_read_data(a, buff, 10));
	assertEqualMem(buff, "12345678", 8);

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("file2", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(819200, archive_entry_size(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_data_skip(a));

	/* Verify the end of the archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Verify some of the error handling.
	 */
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_FATAL,
	    archive_read_open_filename(a, "nonexistent.tar", 512));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_pax_filename_encoding.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_read_compress_program.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_data_large.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_disk.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_disk.c 201247 2009-12-30 05:59:21Z kientzle $");

static void
gname_cleanup(void *d)
{
	int *mp = d;
	assertEqualInt(*mp, 0x13579);
	*mp = 0x2468;
}

static const char *
gname_lookup(void *d, gid_t g)
{
	int *mp = d;
	assertEqualInt(*mp, 0x13579);
	if (g == 1)
		return ("FOOGROUP");
	return ("NOTFOOGROUP");
}

static void
uname_cleanup(void *d)
{
	int *mp = d;
	assertEqualInt(*mp, 0x1234);
	*mp = 0x2345;
}

static const char *
uname_lookup(void *d, uid_t u)
{
	int *mp = d;
	assertEqualInt(*mp, 0x1234);
	if (u == 1)
		return ("FOO");
	return ("NOTFOO");
}

/* We test GID lookup by looking up the name of group number zero and
 * checking it against the following list.  If your system uses a
 * different conventional name for group number zero, please extend
 * this array and send us a patch.  As always, please keep this list
 * sorted alphabetically.
 */
static const char *zero_groups[] = {
	"root",   /* Linux */
	"wheel"  /* BSD */
};

DEFINE_TEST(test_read_disk)
{
	struct archive *a;
	int gmagic = 0x13579, umagic = 0x1234;
	const char *p;
	size_t i;

	assert((a = archive_read_disk_new()) != NULL);

	/* Default uname/gname lookups always return NULL. */
	assert(archive_read_disk_gname(a, 0) == NULL);
	assert(archive_read_disk_uname(a, 0) == NULL);

	/* Register some weird lookup functions. */
	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_gname_lookup(a,
			   &gmagic, &gname_lookup, &gname_cleanup));
	/* Verify that our new function got called. */
	assertEqualString(archive_read_disk_gname(a, 0), "NOTFOOGROUP");
	assertEqualString(archive_read_disk_gname(a, 1), "FOOGROUP");

	/* De-register. */
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_set_gname_lookup(a, NULL, NULL, NULL));
	/* Ensure our cleanup function got called. */
	assertEqualInt(gmagic, 0x2468);

	/* Same thing with uname lookup.... */
	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_uname_lookup(a,
			   &umagic, &uname_lookup, &uname_cleanup));
	assertEqualString(archive_read_disk_uname(a, 0), "NOTFOO");
	assertEqualString(archive_read_disk_uname(a, 1), "FOO");
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_set_uname_lookup(a, NULL, NULL, NULL));
	assertEqualInt(umagic, 0x2345);

	/* Try the standard lookup functions. */
	if (archive_read_disk_set_standard_lookup(a) != ARCHIVE_OK) {
		skipping("standard uname/gname lookup");
	} else {
#if defined(__CYGWIN__) || defined(__HAIKU__)
		/* Some platforms don't have predictable names for
		 * uid=0, so we skip this part of the test. */
		skipping("standard uname/gname lookup");
		i = 0;
		p = zero_groups[0]; /* avoid unused warnings */
#else
		/* XXX Someday, we may need to generalize this the
		 * same way we generalized the group name check below.
		 * That's needed only if we encounter a system where
		 * uid 0 is not "root". XXX */
		assertEqualString(archive_read_disk_uname(a, 0), "root");

		/* Get the group name for group 0 and see if it makes sense. */
		p = archive_read_disk_gname(a, 0);
		if (assert(p != NULL)) {
			i = 0;
			while (i < sizeof(zero_groups)/sizeof(zero_groups[0])) {
				if (strcmp(zero_groups[i], p) == 0)
					break;
				++i;
			}
			if (i == sizeof(zero_groups)/sizeof(zero_groups[0])) {
				/* If you get a failure here, either
				 * archive_read_disk_gname() isn't working or
				 * your system uses a different name for group
				 * number zero.  If the latter, please add a
				 * new entry to the zero_groups[] array above.
				 */
				failure("group 0 didn't have any of the expected names");
				assertEqualString(p, zero_groups[0]);
			}
		}
#endif
	}

	/* Deregister again and verify the default lookups again. */
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_set_gname_lookup(a, NULL, NULL, NULL));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_set_uname_lookup(a, NULL, NULL, NULL));
	assert(archive_read_disk_gname(a, 0) == NULL);
	assert(archive_read_disk_uname(a, 0) == NULL);

	/* Re-register our custom handlers. */
	gmagic = 0x13579;
	umagic = 0x1234;
	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_gname_lookup(a,
			   &gmagic, &gname_lookup, &gname_cleanup));
	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_uname_lookup(a,
			   &umagic, &uname_lookup, &uname_cleanup));

	/* Destroy the archive. */
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/* Verify our cleanup functions got called. */
	assertEqualInt(gmagic, 0x2468);
	assertEqualInt(umagic, 0x2345);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_disk_entry_from_file.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_disk_entry_from_file.c 201247 2009-12-30 05:59:21Z kientzle $");

static const char *
gname_lookup(void *d, gid_t g)
{
	(void)d; /* UNUSED */
	(void)g; /* UNUSED */
	return ("FOOGROUP");
}

static const char *
uname_lookup(void *d, uid_t u)
{
	(void)d; /* UNUSED */
	(void)u; /* UNUSED */
	return ("FOO");
}

DEFINE_TEST(test_read_disk_entry_from_file)
{
	struct archive *a;
	struct archive_entry *entry;
	FILE *f;

	assert((a = archive_read_disk_new()) != NULL);

	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_uname_lookup(a,
			   NULL, &uname_lookup, NULL));
	assertEqualInt(ARCHIVE_OK, archive_read_disk_set_gname_lookup(a,
			   NULL, &gname_lookup, NULL));
	assertEqualString(archive_read_disk_uname(a, 0), "FOO");
	assertEqualString(archive_read_disk_gname(a, 0), "FOOGROUP");

	/* Create a file on disk. */
	f = fopen("foo", "wb");
	assert(f != NULL);
	assertEqualInt(4, fwrite("1234", 1, 4, f));
	fclose(f);

	/* Use archive_read_disk_entry_from_file to get information about it. */
	entry = archive_entry_new();
	assert(entry != NULL);
	archive_entry_copy_pathname(entry, "foo");
	assertEqualInt(ARCHIVE_OK,
	    archive_read_disk_entry_from_file(a, entry, -1, NULL));

	/* Verify the information we got back. */
	assertEqualString(archive_entry_uname(entry), "FOO");
	assertEqualString(archive_entry_gname(entry), "FOOGROUP");
	assertEqualInt(archive_entry_size(entry), 4);

	/* Destroy the archive. */
	archive_entry_free(entry);
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_extract.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_ar.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_file_nonexistent.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_file_nonexistent.c 189473 2009-03-07 02:09:21Z kientzle $");

DEFINE_TEST(test_read_file_nonexistent)
{
	struct archive* a = archive_read_new();
	assertEqualInt(ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_FATAL,
	    archive_read_open_filename(a, "notexistent.tar", 512));
	archive_read_finish(a);
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_Z.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_be.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_cpio_bin_be.c 191592 2009-04-27 19:30:09Z kientzle $");

DEFINE_TEST(test_read_format_cpio_bin_be)
{
	struct archive_entry *ae;
	struct archive *a;
	const char *reference = "test_read_format_cpio_bin_be.cpio";

	extract_reference_file(reference);
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_filename(a, reference, 10));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString(archive_entry_pathname(ae), "file1111222233334444");
	assertEqualInt(archive_entry_size(ae), 5);
	assertEqualInt(archive_entry_mtime(ae), 1240664175);
	assertEqualInt(archive_entry_mode(ae), AE_IFREG | 0644);
	assertEqualInt(archive_entry_uid(ae), 1000);
	assertEqualInt(archive_entry_gid(ae), 0);

	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_NONE);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_BIN_BE);
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_bz2.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_gz.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_lzma.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_cpio_bin_lzma.c 201247 2009-12-30 05:59:21Z kientzle $");

static unsigned char archive[] = {
 93,  0,  0,128,  0,255,255,255,255,255,255,255,255,  0, 99,156,
 62,160, 67,124,230, 93,220,235,118, 29, 75, 27,226,158, 67,149,
151, 96, 22, 54,198,209, 63,104,209,148,249,238, 71,187,201,243,
162,  1, 42, 47, 43,178, 35, 90,  6,156,208, 74,107, 91,229,126,
  5, 85,255,136,255, 64,  0
};

DEFINE_TEST(test_read_format_cpio_bin_lzma)
{
	struct archive_entry *ae;
	struct archive *a;
	int r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_memory(a, archive, sizeof(archive)));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_LZMA);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_BIN_LE);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_xz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_cpio_bin_xz.c 191183 2009-04-17 01:06:31Z kientzle $");

static unsigned char archive[] = {
 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00, 0x00, 0x04,
 0xe6, 0xd6, 0xb4, 0x46, 0x02, 0x00, 0x21, 0x01,
 0x16, 0x00, 0x00, 0x00, 0x74, 0x2f, 0xe5, 0xa3,
 0xe0, 0x01, 0xff, 0x00, 0x33, 0x5d, 0x00, 0x63,
 0x9c, 0x3e, 0xa0, 0x43, 0x7c, 0xe6, 0x5d, 0xdc,
 0xeb, 0x76, 0x1d, 0x4b, 0x1b, 0xe2, 0x9e, 0x43,
 0x95, 0x97, 0x60, 0x16, 0x36, 0xc6, 0xd1, 0x3f,
 0x68, 0xd1, 0x94, 0xf9, 0xee, 0x47, 0xbb, 0xc9,
 0xf3, 0xa2, 0x01, 0x2a, 0x2f, 0x2b, 0xb2, 0x23,
 0x5a, 0x06, 0x9c, 0xd0, 0x4a, 0x6b, 0x5b, 0x14,
 0xb4, 0x00, 0x00, 0x00, 0x91, 0x62, 0x1e, 0x15,
 0x04, 0x46, 0x6b, 0x4d, 0x00, 0x01, 0x4f, 0x80,
 0x04, 0x00, 0x00, 0x00, 0xa1, 0x4b, 0xdf, 0x03,
 0xb1, 0xc4, 0x67, 0xfb, 0x02, 0x00, 0x00, 0x00,
 0x00, 0x04, 0x59, 0x5a      
};

DEFINE_TEST(test_read_format_cpio_bin_xz)
{
	struct archive_entry *ae;
	struct archive *a;
	int r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("xz reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_memory(a, archive, sizeof(archive)));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_XZ);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_BIN_LE);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_odc.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"

/*
Execute the following command to rebuild the data for this program:
   tail -n +32 test_read_format_cpio_svr4_bzip2_rpm.c | /bin/sh

F=test_read_format_cpio_svr4_bzip2_rpm.rpm
NAME=rpmsample
TMPRPM=/tmp/rpm
rm -rf ${TMPRPM}
mkdir -p ${TMPRPM}/BUILD
mkdir -p ${TMPRPM}/RPMS
mkdir -p ${TMPRPM}/SOURCES
mkdir -p ${TMPRPM}/SPECS
mkdir -p ${TMPRPM}/SRPMS
echo "hello" > ${TMPRPM}/BUILD/file1
echo "hello" > ${TMPRPM}/BUILD/file2
echo "hello" > ${TMPRPM}/BUILD/file3
cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
##
%define _topdir ${TMPRPM}
%define _binary_payload w9.bzdio

Summary: Sample data of RPM filter of libarchive
Name: ${NAME}
Version: 1.0.0
Release: 1
License: BSD
URL: http://code.google.com/p/libarchive
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%install
rm -rf \$RPM_BUILD_ROOT

mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3

%files
%{_sysconfdir}/file1
%{_sysconfdir}/file2
%{_sysconfdir}/file3

%description
Sample data.
END
#
rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu

rm -rf ${TMPRPM}
exit 1
*/

DEFINE_TEST(test_read_format_cpio_svr4_bzip2_rpm)
{
	struct archive_entry *ae;
	struct archive *a;
	const char *name = "test_read_format_cpio_svr4_bzip2_rpm.rpm";
	int r;

	assert((a = archive_read_new()) != NULL);
        r = archive_read_support_compression_bzip2(a);
	if (r == ARCHIVE_WARN) {
		skipping("bzip2 reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
        }
	assertEqualIntA(a, ARCHIVE_OK, r);
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_support_compression_rpm(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file1", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file2", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file3", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
  
	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_BZIP2);
	assertEqualString(archive_compression_name(a), "bzip2");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
 
	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"

/*
Execute the following command to rebuild the data for this program:
   tail -n +32 test_read_format_cpio_svr4_gzip_rpm.c | /bin/sh

F=test_read_format_cpio_svr4_gzip_rpm.rpm
NAME=rpmsample
TMPRPM=/tmp/rpm
rm -rf ${TMPRPM}
mkdir -p ${TMPRPM}/BUILD
mkdir -p ${TMPRPM}/RPMS
mkdir -p ${TMPRPM}/SOURCES
mkdir -p ${TMPRPM}/SPECS
mkdir -p ${TMPRPM}/SRPMS
echo "hello" > ${TMPRPM}/BUILD/file1
echo "hello" > ${TMPRPM}/BUILD/file2
echo "hello" > ${TMPRPM}/BUILD/file3
cat > ${TMPRPM}/SPECS/${NAME}.spec <<END
##
%define _topdir ${TMPRPM}
%define _binary_payload w9.gzdio

Summary: Sample data of RPM filter of libarchive
Name: ${NAME}
Version: 1.0.0
Release: 1
License: BSD
URL: http://code.google.com/p/libarchive
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%install
rm -rf \$RPM_BUILD_ROOT

mkdir -p \$RPM_BUILD_ROOT%{_sysconfdir}
install -m 644 file1 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
install -m 644 file2 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
install -m 644 file3 \$RPM_BUILD_ROOT%{_sysconfdir}/file3
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file1
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file2
TZ=utc touch -afm -t 197001020000.01 \$RPM_BUILD_ROOT%{_sysconfdir}/file3

%files
%{_sysconfdir}/file1
%{_sysconfdir}/file2
%{_sysconfdir}/file3

%description
Sample data.
END
#
rpmbuild -bb ${TMPRPM}/SPECS/${NAME}.spec
uuencode ${F} < ${TMPRPM}/RPMS/noarch/${NAME}-1.0.0-1.noarch.rpm > ${F}.uu

rm -rf ${TMPRPM}
exit 1
*/

DEFINE_TEST(test_read_format_cpio_svr4_gzip_rpm)
{
	struct archive_entry *ae;
	struct archive *a;
	const char *name = "test_read_format_cpio_svr4_gzip_rpm.rpm";
	int r;

	assert((a = archive_read_new()) != NULL);
        r = archive_read_support_compression_gzip(a);
	if (r == ARCHIVE_WARN) {
		skipping("gzip reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
        }
	assertEqualIntA(a, ARCHIVE_OK, r);
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_support_compression_rpm(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	extract_reference_file(name);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));

	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file1", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file2", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualString("./etc/file3", archive_entry_pathname(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));

	/* Verify the end-of-archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
  
	/* Verify that the format detection worked. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_GZIP);
	assertEqualString(archive_compression_name(a), "gzip");
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
 
	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/README
$FreeBSD: src/lib/libarchive/test/README,v 1.3 2008/01/01 22:28:04 kientzle Exp $

This is the test harness for libarchive.

It compiles into a single program "libarchive_test" that is intended
to exercise as much of the library as possible.  It is, of course,
very much a work in progress.

Each test is a function named test_foo in a file named test_foo.c.
Note that the file name is the same as the function name.
Each file must start with this line:

  #include "test.h"

The test function must be declared with a line of this form

  DEFINE_TEST(test_foo)

Nothing else should appear on that line.

When you add a test, please update the Makefile to add your
file to the list of tests.  The Makefile and main.c use various
macro trickery to automatically collect a list of test functions
to be invoked.

Each test function can rely on the following:

  * The current directory will be a freshly-created empty directory
    suitable for that test.  (The top-level main() creates a
    directory for each separate test and chdir()s to that directory
    before running the test.)

  * The test function should use assert(), assertA() and similar macros
    defined in test.h.  If you need to add new macros of this form, feel
    free to do so.  The current macro set includes assertEqualInt() and
    assertEqualString() that print out additional detail about their
    arguments if the assertion does fail.  'A' versions also accept
    a struct archive * and display any error message from there on
    failure.

  * You are encouraged to document each assertion with a failure() call
    just before the assert.  The failure() function is a printf-like
    function whose text is displayed only if the assertion fails.  It
    can be used to display additional information relevant to the failure:

       failure("The data read from file %s did not match the data written to that file.", filename);
       assert(strcmp(buff1, buff2) == 0);

  * Tests are encouraged to be economical with their memory and disk usage,
    though this is not essential.  The test is occasionally run under
    a memory debugger to try to locate memory leaks in the library;
    as a result, tests should be careful to release any memory they
    allocate.

  * Disable tests on specific platforms as necessary.  Please don't
    use config.h to adjust feature requirements, as I want the tests
    to also serve as a check on the configure process.  The following
    form is appropriate:

#if !defined(__PLATFORM) && !defined(__Platform2__)
    assert(xxxx)
#endif


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_read_uu.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_uu.c 201248 2009-12-30 06:12:03Z kientzle $");

static const char archive[] = {
"begin 644 test_read_uu.Z\n"
"M'YV0+@`('$BPH,&#\"!,J7,BP(4(8$&_4J`$\"`,08$F%4O)AQ(\\2/(#7&@#%C\n"
"M!@T8-##.L`$\"QL@:-F(``%'#H<V;.'/J!%!G#ITP<BS\"H).FS<Z$1(T>/1A2\n"
"IHU\"0%9=*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW9P$`\n"
"`\n"
"end\n"
};

static const char archive64[] = {
"begin-base64 644 test_read_uu.Z\n"
"H52QLgAIHEiwoMGDCBMqXMiwIUIYEG/UqAECAMQYEmFUvJhxI8SPIDXGgDFjBg0YNDDOsAECxsga\n"
"NmIAAFHDoc2bOHPqBFBnDp0wcizCoJOmzc6ERI0ePRhSo1CQFZdKnUq1qtWrWLNq3cq1q9evYMOK\n"
"HUu2rNmzaNOqXcu2rdu3ZwE=\n"
"====\n"
};

static const char extradata[] = {
"From uudecode@libarchive Mon Jun  2 03:03:31 2008\n"
"Return-Path: <uudecode@libarchive>\n"
"Received: from libarchive (localhost [127.0.0.1])\n"
"        by libarchive (8.14.2/8.14.2) with ESMTP id m5233UT1006448\n"
"        for <uudecode@libarchive>; Mon, 2 Jun 2008 03:03:31 GMT\n"
"        (envelope-from uudecode@libarchive)\n"
"Received: (from uudecode@localhost)\n"
"        by libarchive (8.14.2/8.14.2/Submit) id m5233U3e006406\n"
"        for uudecode; Mon, 2 Jun 2008 03:03:30 GMT\n"
"        (envelope-from root)\n"
"Date: Mon, 2 Jun 2008 03:03:30 GMT\n"
"From: Libarchive Test <uudecode@libarchive>\n"
"Message-Id: <200806020303.m5233U3e006406@libarchive>\n"
"To: uudecode@libarchive\n"
"Subject: Libarchive uudecode test\n"
"\n"
"* Redistribution and use in source and binary forms, with or without\n"
"* modification, are permitted provided that the following conditions\n"
"* are met:\n"
"\n"
"01234567890abcdeghijklmnopqrstuvwxyz\n"
"01234567890ABCEFGHIJKLMNOPQRSTUVWXYZ\n"
"\n"
};

static void
test_read_uu_sub(const char *uudata, size_t uusize)
{
	struct archive_entry *ae;
	struct archive *a;
	char *buff;
	int extra;

	assert(NULL != (buff = malloc(uusize + 64 * 1024)));
	if (buff == NULL)
		return;
	for (extra = 0; extra <= 64; extra = extra==0?1:extra*2) {
		size_t size = extra * 1024;
		char *p = buff;

		/* Add extra text size of which is from 1K bytes to
		 * 64Kbytes before uuencoded data. */
		while (size) {
			if (size > sizeof(extradata)-1) {
				memcpy(p, extradata, sizeof(extradata)-1);
				p += sizeof(extradata)-1;
				size -= sizeof(extradata)-1;
			} else {
				memcpy(p, extradata, size-1);
				p += size-1;
				*p++ = '\n';/* the last of extra text must have
					     * '\n' character. */
				break;
			}
		}
		memcpy(p, uudata, uusize);
		size = extra * 1024 + uusize;

		assert((a = archive_read_new()) != NULL);
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_format_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    read_open_memory(a, buff, size, 2));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_next_header(a, &ae));
		failure("archive_compression_name(a)=\"%s\"",
		    archive_compression_name(a));
		assertEqualInt(archive_compression(a),
		    ARCHIVE_COMPRESSION_COMPRESS);
		failure("archive_format_name(a)=\"%s\"",
		    archive_format_name(a));
		assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
	}
	free(buff);
}

DEFINE_TEST(test_read_uu)
{
	/* Read the traditional uuencoded data. */
	test_read_uu_sub(archive, sizeof(archive)-1);
	/* Read the Base64 uuencoded data. */
	test_read_uu_sub(archive64, sizeof(archive64)-1);
}


File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4c_Z.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_empty.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_gz.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_lzma.c
/*-
 * Copyright (c) 2008 Miklos Vajna
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_lzma.c 191183 2009-04-17 01:06:31Z kientzle $");

static unsigned char archive[] = {
0x5d, 0x0, 0x0, 0x80, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x17, 0xb, 0xbc, 0x1c, 0x7d, 0x1, 0x95, 0xc0, 0x1d, 0x4a, 0x46, 0x9c,
0x1c, 0xc5, 0x8, 0x82, 0x10, 0xed, 0x84, 0xf6, 0xea, 0x7a, 0xfe, 0x63,
0x5a, 0x34, 0x5e, 0xf7, 0xc, 0x60, 0xd6, 0x8b, 0xc1, 0x47, 0xaf, 0x11,
0x6f, 0x18, 0x94, 0x81, 0x74, 0x8a, 0xf8, 0x47, 0xcc, 0xdd, 0xc0, 0xd9,
0x40, 0xa, 0xc3, 0xac, 0x43, 0x47, 0xb5, 0xac, 0x2b, 0x31, 0xd3, 0x6,
0xa4, 0x2c, 0x44, 0x80, 0x24, 0x4b, 0xfe, 0x43, 0x22, 0x4e, 0x14, 0x30,
0x7a, 0xef, 0x99, 0x6e, 0xf, 0x8b, 0xc1, 0x79, 0x93, 0x88, 0x54, 0x73,
0x59, 0x3f, 0xc, 0xfb, 0xee, 0x9c, 0x83, 0x49, 0x93, 0x33, 0xad, 0x44,
0xbe, 0x0};

DEFINE_TEST(test_read_format_gtar_lzma)
{
	int r;

	struct archive_entry *ae;
	struct archive *a;
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_support_compression_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}

	assertEqualIntA(a, ARCHIVE_OK, r);
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_support_format_all(a));
	r = archive_read_open_memory2(a, archive, sizeof(archive), 3);
	if (r != ARCHIVE_OK) {
		skipping("Skipping LZMA compression check: %s",
		    archive_error_string(a));
		goto finish;
	}
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_LZMA);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_GNUTAR);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
finish:
#if ARCHIVE_VERSION_NUMBER < 2000000
	archive_read_finish(a);
#else
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
#endif
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_read_format_iso_gz.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_multi_extent.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_iso_multi_extent.c 201247 2009-12-30 05:59:21Z kientzle $");

DEFINE_TEST(test_read_format_iso_multi_extent)
{
	const char *refname = "test_read_format_iso_multi_extent.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* Retrieve each of the 2 files on the ISO image and
	 * verify that each one is what we expect. */
	for (i = 0; i < 2; ++i) {
		assertEqualInt(0, archive_read_next_header(a, &ae));

		if (strcmp(".", archive_entry_pathname(ae)) == 0) {
			/* '.' root directory. */
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(0, archive_entry_mtime_nsec(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt((int)size, 0);
		} else if (strcmp("file", archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString("file", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(262280, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "head--head--head", 16);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else {
			failure("Saw a file that shouldn't have been there");
			assertEqualString(archive_entry_pathname(ae), "");
		}
	}

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}



File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_bz2.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Based on libarchive/test/test_read_format_isorr_bz2.c with
 * bugs introduced by Andreas Henriksson <andreas@fatal.se> for
 * testing ISO9660 image with Joliet extension.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isojoliet_bz2.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following to rebuild the data for this program:
   tail -n +35 test_read_format_isojoliet_bz2.c | /bin/sh

rm -rf /tmp/iso
mkdir /tmp/iso
mkdir /tmp/iso/dir
echo "hello" >/tmp/iso/long-joliet-file-name.textfile
ln /tmp/iso/long-joliet-file-name.textfile /tmp/iso/hardlink
(cd /tmp/iso; ln -s long-joliet-file-name.textfile symlink)
if [ "$(uname -s)" = "Linux" ]; then # gnu coreutils touch doesn't have -h
TZ=utc touch -afm -t 197001020000.01 /tmp/iso /tmp/iso/long-joliet-file-name.textfile /tmp/iso/dir
TZ=utc touch -afm -t 197001030000.02 /tmp/iso/symlink
else
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso /tmp/iso/long-joliet-file-name.textfile /tmp/iso/dir
TZ=utc touch -afhm -t 197001030000.02 /tmp/iso/symlink
fi
F=test_read_format_iso_joliet.iso.Z
mkhybrid -J -uid 1 -gid 2 /tmp/iso | compress > $F
uuencode $F $F > $F.uu
exit 1
 */

DEFINE_TEST(test_read_format_isojoliet_bz2)
{
	const char *refname = "test_read_format_iso_joliet.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_set_options(a, "iso9660:!rockridge"));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* First entry is '.' root directory. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString(".", archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(86401, archive_entry_ctime(ae));
	assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
	assertEqualInt(0, archive_entry_uid(ae));
	assertEqualIntA(a, ARCHIVE_EOF,
	    archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt((int)size, 0);

	/* A directory. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("dir", archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(86401, archive_entry_atime(ae));

	/* A regular file with two names ("hardlink" gets returned
	 * first, so it's not marked as a hardlink). */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("long-joliet-file-name.textfile",
	    archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(6, archive_entry_size(ae));
	assertEqualInt(0, archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt(6, (int)size);
	assertEqualInt(0, offset);
	assertEqualInt(0, memcmp(p, "hello\n", 6));

	/* Second name for the same regular file (this happens to be
	 * returned second, so does get marked as a hardlink). */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("hardlink", archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assertEqualString("long-joliet-file-name.textfile",
	    archive_entry_hardlink(ae));
	assert(!archive_entry_size_is_set(ae));

	/* A symlink to the regular file. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("symlink", archive_entry_pathname(ae));
	assertEqualInt(0, archive_entry_size(ae));
	assertEqualInt(172802, archive_entry_mtime(ae));
	assertEqualInt(172802, archive_entry_atime(ae));

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_long.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isojoliet_long.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following to rebuild the data for this program:
   tail -n +35 test_read_format_isojoliet_long.c | /bin/sh

rm -rf /tmp/iso
mkdir /tmp/iso
num=0
file="";
while [ $num -lt 100 ]
do
  num=$((num+10))
  file="${file}1234567890"
done
dir="${file}dir"
mkdir /tmp/iso/${dir}
file="${file}123"
echo "hello" > /tmp/iso/${file}
ln /tmp/iso/${file} /tmp/iso/hardlink
if [ "$(uname -s)" = "Linux" ]; then # gnu coreutils touch doesn't have -h
TZ=utc touch -afm -t 197001020000.01 /tmp/iso /tmp/iso/${file} /tmp/iso/${dir}
else
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso /tmp/iso/${file} /tmp/iso/${dir}
fi
F=test_read_format_iso_joliet_long.iso.Z
mkhybrid -J -joliet-long -uid 1 -gid 2 /tmp/iso | compress > $F
uuencode $F $F > $F.uu
rm -rf /tmp/iso
exit 1
 */

DEFINE_TEST(test_read_format_isojoliet_long)
{
	const char *refname = "test_read_format_iso_joliet_long.iso.Z";
	char pathname[104];
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	for (i = 0; i < 100; i++)
		pathname[i] = '0' + ((i+1) % 10); 
	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_set_options(a, "iso9660:!rockridge"));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* First entry is '.' root directory. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString(".", archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(86401, archive_entry_ctime(ae));
	assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
	assertEqualInt(0, archive_entry_uid(ae));
	assertEqualIntA(a, ARCHIVE_EOF,
	    archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt((int)size, 0);

	/* A directory. */
	pathname[100] = 'd';
	pathname[101] = 'i';
	pathname[102] = 'r';
	pathname[103] = '\0';
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString(pathname, archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(86401, archive_entry_atime(ae));

	/* A regular file with two names (pathname gets returned
	 * first, so it's not marked as a hardlink). */
	pathname[100] = '1';
	pathname[101] = '2';
	pathname[102] = '3';
	pathname[103] = '\0';
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString(pathname, archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(6, archive_entry_size(ae));
	assertEqualInt(0, archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt(6, (int)size);
	assertEqualInt(0, offset);
	assertEqualInt(0, memcmp(p, "hello\n", 6));

	/* Second name for the same regular file (this happens to be
	 * returned second, so does get marked as a hardlink). */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("hardlink", archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assertEqualString(pathname, archive_entry_hardlink(ae));
	assert(!archive_entry_size_is_set(ae));

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isojoliet_rr.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Based on libarchive/test/test_read_format_isorr_bz2.c with
 * bugs introduced by Andreas Henriksson <andreas@fatal.se> for
 * testing ISO9660 image with Joliet extension.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isojoliet_rr.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following to rebuild the data for this program:
   tail -n +35 test_read_format_isojoliet_rr.c | /bin/sh

rm -rf /tmp/iso
mkdir /tmp/iso
mkdir /tmp/iso/dir
file="long-joliet-file-name.textfile"
echo "hello" >/tmp/iso/$file
ln /tmp/iso/$file /tmp/iso/hardlink
(cd /tmp/iso; ln -s $file symlink)
if [ "$(uname -s)" = "Linux" ]; then # gnu coreutils touch doesn't have -h
TZ=utc touch -afm -t 197001020000.01 /tmp/iso/hardlink /tmp/iso/$file /tmp/iso/dir
TZ=utc touch -afm -t 197001030000.02 /tmp/iso/symlink
TZ=utc touch -afm -t 197001020000.01 /tmp/iso
else
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso/hardlink /tmp/iso/$file /tmp/iso/dir
TZ=utc touch -afhm -t 197001030000.02 /tmp/iso/symlink
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso
fi
F=test_read_format_iso_joliet_rockridge.iso.Z
mkhybrid -J -uid 1 -gid 2 /tmp/iso | compress > $F
uuencode $F $F > $F.uu
exit 1
 */

DEFINE_TEST(test_read_format_isojoliet_rr)
{
	const char *refname = "test_read_format_iso_joliet_rockridge.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* First entry is '.' root directory. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString(".", archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
	assertEqualInt(1, archive_entry_uid(ae));
	assertEqualIntA(a, ARCHIVE_EOF,
	    archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt((int)size, 0);

	/* A directory. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("dir", archive_entry_pathname(ae));
	assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
	assertEqualInt(2048, archive_entry_size(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(86401, archive_entry_atime(ae));
	assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
	assertEqualInt(1, archive_entry_uid(ae));
	assertEqualInt(2, archive_entry_gid(ae));

	/* A regular file with two names ("hardlink" gets returned
	 * first, so it's not marked as a hardlink). */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("long-joliet-file-name.textfile",
	    archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(6, archive_entry_size(ae));
	assertEqualInt(0, archive_read_data_block(a, &p, &size, &offset));
	assertEqualInt(6, (int)size);
	assertEqualInt(0, offset);
	assertEqualInt(0, memcmp(p, "hello\n", 6));
	assertEqualInt(86401, archive_entry_mtime(ae));
	/* mkisofs records their access time. */
	/*assertEqualInt(86401, archive_entry_atime(ae));*/
	/* TODO: Actually, libarchive should be able to
	 * compute nlinks correctly even without RR
	 * extensions. See comments in libarchive source. */
	assertEqualInt(2, archive_entry_nlink(ae));
	assertEqualInt(1, archive_entry_uid(ae));
	assertEqualInt(2, archive_entry_gid(ae));

	/* Second name for the same regular file (this happens to be
	 * returned second, so does get marked as a hardlink). */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("hardlink", archive_entry_pathname(ae));
	assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
	assertEqualString("long-joliet-file-name.textfile",
	    archive_entry_hardlink(ae));
	assert(!archive_entry_size_is_set(ae));
	assertEqualInt(86401, archive_entry_mtime(ae));
	assertEqualInt(86401, archive_entry_atime(ae));
	/* TODO: See above. */
	assertEqualInt(2, archive_entry_nlink(ae));
	assertEqualInt(1, archive_entry_uid(ae));
	assertEqualInt(2, archive_entry_gid(ae));

	/* A symlink to the regular file. */
	assertEqualInt(0, archive_read_next_header(a, &ae));
	assertEqualString("symlink", archive_entry_pathname(ae));
	assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
	assertEqualString("long-joliet-file-name.textfile",
	    archive_entry_symlink(ae));
	assertEqualInt(0, archive_entry_size(ae));
	assertEqualInt(172802, archive_entry_mtime(ae));
	assertEqualInt(172802, archive_entry_atime(ae));
	assertEqualInt(1, archive_entry_nlink(ae));
	assertEqualInt(1, archive_entry_uid(ae));
	assertEqualInt(2, archive_entry_gid(ae));

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}


File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_bz2.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_ce.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isorr_ce.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following command to rebuild the data for this program:
   tail -n +32 test_read_format_isorr_ce.c | /bin/sh

dirname=/tmp/iso
#
rm -rf $dirname
mkdir $dirname
#
num=0
file=""
while [ $num -lt 150 ]
do
  num=$((num+1))
  file="a$file"
done
#
num=0
while [ $num -lt 3 ]
do
  num=$((num+1))
  file="a$file"
  echo "hello $((num+150))" > $dirname/$file
  dd if=/dev/zero count=1 bs=4080 >> $dirname/$file
  (cd $dirname; ln -s $file sym$num)
done
#
mkdir $dirname/dir
#
time1="197001020000.01"
time2="197001030000.02"
TZ=utc touch -afhm -t $time1 $dirname/dir $dirname/aaaa*
TZ=utc touch -afhm -t $time2 $dirname/sym*
TZ=utc touch -afhm -t $time1 $dirname
#
F=test_read_format_iso_rockridge_ce.iso.Z
mkisofs -R -uid 1 -gid 2 $dirname | compress > $F
uuencode $F $F > $F.uu
rm -rf $dirname
exit 1
 */

/*
 * Test reading SUSP "CE" extension is works fine.
 */

static void
mkpath(char *p, int len)
{
	int i;

	for (i = 0; i < len; i++)
		p[i] = 'a';
	p[len] = '\0';
}

DEFINE_TEST(test_read_format_isorr_ce)
{
	const char *refname = "test_read_format_iso_rockridge_ce.iso.Z";
	char path1[160];
	char path2[160];
	char path3[160];
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	mkpath(path1, 151);
	mkpath(path2, 152);
	mkpath(path3, 153);
	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* Retrieve each of the 8 files on the ISO image and
	 * verify that each one is what we expect. */
	for (i = 0; i < 8; ++i) {
		assertEqualInt(0, archive_read_next_header(a, &ae));

		if (strcmp(".", archive_entry_pathname(ae)) == 0) {
			/* '.' root directory. */
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			/* Now, we read timestamp recorded by RRIP "TF". */
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(0, archive_entry_mtime_nsec(ae));
			/* Now, we read links recorded by RRIP "PX". */
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt((int)size, 0);
		} else if (strcmp("dir", archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir", archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp(path1, archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString(path1, archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(4090, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello 151\n", 10);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp(path2, archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString(path2, archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(4090, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello 152\n", 10);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp(path3, archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString(path3, archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(4090, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello 153\n", 10);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("sym1", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(path1, archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("sym2", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(path2, archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("sym3", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(path3, archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else {
			failure("Saw a file that shouldn't have been there");
			assertEqualString(archive_entry_pathname(ae), "");
		}
	}

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_new_bz2.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isorr_new_bz2.c 201247 2009-12-30 05:59:21Z kientzle $");


/*
PLEASE use latest cdrtools at least mkisofs version is 2.01.01a63 or later.
Old version mkisofs made wrong "SL" System Use Entry of RRIP.

Execute the following command to rebuild the data for this program:
   tail -n +34 test_read_format_isorr_new_bz2.c | /bin/sh

rm -rf /tmp/iso
mkdir /tmp/iso
mkdir /tmp/iso/dir
echo "hello" >/tmp/iso/file
dd if=/dev/zero count=1 bs=12345678 >>/tmp/iso/file
ln /tmp/iso/file /tmp/iso/hardlink
(cd /tmp/iso; ln -s file symlink)
(cd /tmp/iso; ln -s /tmp/ symlink2)
(cd /tmp/iso; ln -s /tmp/../ symlink3)
(cd /tmp/iso; ln -s .././../tmp/ symlink4)
(cd /tmp/iso; ln -s .///file symlink5)
(cd /tmp/iso; ln -s /tmp//../ symlink6)
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso /tmp/iso/file /tmp/iso/dir
TZ=utc touch -afhm -t 197001030000.02 /tmp/iso/symlink
F=test_read_format_iso_rockridge_new.iso.Z
mkhybrid -R -uid 1 -gid 2 /tmp/iso | compress > $F
uuencode $F $F > $F.uu
exit 1
 */

DEFINE_TEST(test_read_format_isorr_new_bz2)
{
	const char *refname = "test_read_format_iso_rockridge_new.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* Retrieve each of the 8 files on the ISO image and
	 * verify that each one is what we expect. */
	for (i = 0; i < 10; ++i) {
		assertEqualInt(0, archive_read_next_header(a, &ae));

		if (strcmp(".", archive_entry_pathname(ae)) == 0) {
			/* '.' root directory. */
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			/* Now, we read timestamp recorded by RRIP "TF". */
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(0, archive_entry_mtime_nsec(ae));
			/* Now, we read links recorded by RRIP "PX". */
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt((int)size, 0);
		} else if (strcmp("dir", archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir", archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("hardlink", archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString("hardlink", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(12345684, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello\n", 6);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("file", archive_entry_pathname(ae)) == 0) {
			/* A hardlink to the regular file. */
			/* Note: If "hardlink" gets returned before "file",
			 * then "hardlink" will get returned as a regular file
			 * and "file" will get returned as the hardlink.
			 * This test should tolerate that, since it's a
			 * perfectly permissible thing for libarchive to do. */
			assertEqualString("file", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualString("hardlink", archive_entry_hardlink(ae));
			assertEqualInt(0, archive_entry_size_is_set(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("file", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(172802, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink2", archive_entry_pathname(ae)) == 0) {
			/* A symlink to /tmp/ (an absolute path) */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("/tmp/", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink3", archive_entry_pathname(ae)) == 0) {
			/* A symlink to /tmp/../ (with a ".." component) */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("/tmp/../", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink4", archive_entry_pathname(ae)) == 0) {
			/* A symlink to a path with ".." and "." components */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(".././../tmp/",
			    archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink5", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file with "/" components. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(".///file", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(172802, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink6", archive_entry_pathname(ae)) == 0) {
			/* A symlink to /tmp//../
			 * (with "/" and ".." components) */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("/tmp//../", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else {
			failure("Saw a file that shouldn't have been there");
			assertEqualString(archive_entry_pathname(ae), "");
		}
	}

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}



File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isorr_rr_moved.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isorr_rr_moved.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following command to rebuild the data for this program:
   tail -n +32 test_read_format_isorr_rr_moved.c | /bin/sh

dirname=/tmp/iso
rm -rf $dirname
mkdir -p $dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
echo "hello" >$dirname/file
dd if=/dev/zero count=1 bs=12345678 >>$dirname/file
deepfile=$dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10/deep
echo "hello" >$deepfile
dd if=/dev/zero count=1 bs=12345678 >>$deepfile
time="197001020000.01"
TZ=utc touch -afhm -t $time $deepfile
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5/dir6/dir7
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5/dir6
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4/dir5
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3/dir4
TZ=utc touch -afhm -t $time $dirname/dir1/dir2/dir3
TZ=utc touch -afhm -t $time $dirname/dir1/dir2
TZ=utc touch -afhm -t $time $dirname/dir1
TZ=utc touch -afhm -t $time $dirname/file
TZ=utc touch -afhm -t $time $dirname
F=test_read_format_isorr_rockridge_moved.iso.Z
mkhybrid -R -uid 1 -gid 2 $dirname | compress > $F
uuencode $F $F > $F.uu
exit 1
 */

DEFINE_TEST(test_read_format_isorr_rr_moved)
{
	const char *refname = "test_read_format_iso_rockridge_rr_moved.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* Retrieve each of the 8 files on the ISO image and
	 * verify that each one is what we expect. */
	for (i = 0; i < 13; ++i) {
		assertEqualInt(0, archive_read_next_header(a, &ae));

		if (strcmp(".", archive_entry_pathname(ae)) == 0) {
			/* '.' root directory. */
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			/* Now, we read timestamp recorded by RRIP "TF". */
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(0, archive_entry_mtime_nsec(ae));
			/* Now, we read links recorded by RRIP "PX". */
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt((int)size, 0);
		} else if (strcmp("dir1", archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1", archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6/dir7",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6/dir7",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
		   "/dir8",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
			    "/dir8",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
		   "/dir8/dir9",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
			    "/dir8/dir9",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
		   "/dir8/dir9/dir10",
		    archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
			    "/dir8/dir9/dir10",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("file", archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString("file", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(12345684, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello\n", 6);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
		    "/dir8/dir9/dir10/deep",
		    archive_entry_pathname(ae)) == 0) {
			/* A regular file. */
			assertEqualString("dir1/dir2/dir3/dir4/dir5/dir6/dir7"
			    "/dir8/dir9/dir10/deep",
			    archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(12345684, archive_entry_size(ae));
			assertEqualInt(0,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt(0, offset);
			assertEqualMem(p, "hello\n", 6);
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else {
			failure("Saw a file that shouldn't have been there");
			assertEqualString(archive_entry_pathname(ae), "");
		}
	}

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}



File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_isozisofs_bz2.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_isozisofs_bz2.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
Execute the following command to rebuild the data for this program:
   tail -n +32 test_read_format_isozisofs_bz2.c | /bin/sh

rm -rf /tmp/iso /tmp/ziso
mkdir /tmp/iso
mkdir /tmp/iso/dir
echo "hello" >/tmp/iso/file
dd if=/dev/zero count=1 bs=12345678 >>/tmp/iso/file
ln /tmp/iso/file /tmp/iso/hardlink
(cd /tmp/iso; ln -s file symlink)
(cd /tmp/iso; ln -s /tmp/ symlink2)
(cd /tmp/iso; ln -s /tmp/../ symlink3)
(cd /tmp/iso; ln -s .././../tmp/ symlink4)
TZ=utc touch -afhm -t 197001020000.01 /tmp/iso /tmp/iso/file /tmp/iso/dir
TZ=utc touch -afhm -t 197001030000.02 /tmp/iso/symlink
mkzftree /tmp/iso /tmp/ziso
TZ=utc touch -afhm -t 197001020000.01 /tmp/ziso /tmp/ziso/file /tmp/ziso/dir
TZ=utc touch -afhm -t 197001030000.02 /tmp/ziso/symlink
F=test_read_format_iso_zisofs.iso.Z
mkhybrid -R -uid 1 -gid 2 -z /tmp/ziso | compress > $F
uuencode $F $F > $F.uu
exit 1

 */

DEFINE_TEST(test_read_format_isozisofs_bz2)
{
	const char *refname = "test_read_format_iso_zisofs.iso.Z";
	struct archive_entry *ae;
	struct archive *a;
	const void *p;
	size_t size;
	off_t offset;
	int i;

	extract_reference_file(refname);
	assert((a = archive_read_new()) != NULL);
	assertEqualInt(0, archive_read_support_compression_all(a));
	assertEqualInt(0, archive_read_support_format_all(a));
	assertEqualInt(ARCHIVE_OK,
	    archive_read_open_filename(a, refname, 10240));

	/* Retrieve each of the 8 files on the ISO image and
	 * verify that each one is what we expect. */
	for (i = 0; i < 8; ++i) {
		assertEqualInt(0, archive_read_next_header(a, &ae));

		if (strcmp(".", archive_entry_pathname(ae)) == 0) {
			/* '.' root directory. */
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			/* Now, we read timestamp recorded by RRIP "TF". */
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(0, archive_entry_mtime_nsec(ae));
			/* Now, we read links recorded by RRIP "PX". */
			assertEqualInt(3, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualIntA(a, ARCHIVE_EOF,
			    archive_read_data_block(a, &p, &size, &offset));
			assertEqualInt((int)size, 0);
		} else if (strcmp("dir", archive_entry_pathname(ae)) == 0) {
			/* A directory. */
			assertEqualString("dir", archive_entry_pathname(ae));
			assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
			assertEqualInt(2048, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("hardlink", archive_entry_pathname(ae)) == 0) {
			int r;
			/* A regular file. */
			assertEqualString("hardlink", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualInt(12345684, archive_entry_size(ae));
			r = archive_read_data_block(a, &p, &size, &offset);
			if (r == ARCHIVE_FAILED) {
			  skipping("Can't read body of ZISOFS entry.");
			} else {
			  assertEqualInt(ARCHIVE_OK, r);
			  assertEqualInt(0, offset);
			  assertEqualMem(p, "hello\n", 6);
			}
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("file", archive_entry_pathname(ae)) == 0) {
			/* A hardlink to the regular file. */
			/* Note: If "hardlink" gets returned before "file",
			 * then "hardlink" will get returned as a regular file
			 * and "file" will get returned as the hardlink.
			 * This test should tolerate that, since it's a
			 * perfectly permissible thing for libarchive to do. */
			assertEqualString("file", archive_entry_pathname(ae));
			assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
			assertEqualString("hardlink", archive_entry_hardlink(ae));
			assertEqualInt(0, archive_entry_size_is_set(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(86401, archive_entry_mtime(ae));
			assertEqualInt(86401, archive_entry_atime(ae));
			assertEqualInt(2, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink", archive_entry_pathname(ae)) == 0) {
			/* A symlink to the regular file. */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("file", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(172802, archive_entry_mtime(ae));
			assertEqualInt(172802, archive_entry_atime(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink2", archive_entry_pathname(ae)) == 0) {
			/* A symlink to /tmp (an absolute path) */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("/tmp", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink3", archive_entry_pathname(ae)) == 0) {
			/* A symlink to /tmp/.. (with a ".." component) */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString("/tmp/..", archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else if (strcmp("symlink4", archive_entry_pathname(ae)) == 0) {
			/* A symlink to a path with ".." and "." components */
			assertEqualInt(AE_IFLNK, archive_entry_filetype(ae));
			assertEqualString(".././../tmp",
			    archive_entry_symlink(ae));
			assertEqualInt(0, archive_entry_size(ae));
			assertEqualInt(1, archive_entry_stat(ae)->st_nlink);
			assertEqualInt(1, archive_entry_uid(ae));
			assertEqualInt(2, archive_entry_gid(ae));
		} else {
			failure("Saw a file that shouldn't have been there");
			assertEqualString(archive_entry_pathname(ae), "");
		}
	}

	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	/* Verify archive format. */
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_COMPRESS);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660_ROCKRIDGE);

	/* Close the archive. */
	assertEqualInt(0, archive_read_close(a));
	assertEqualInt(0, archive_read_finish(a));
}



File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_pax_bz2.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.c
/*-
 * Copyright (c) 2007 Kai Wang
 * Copyright (c) 2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_raw.c 191594 2009-04-27 20:09:05Z kientzle $");

DEFINE_TEST(test_read_format_raw)
{
	char buff[512];
	struct archive_entry *ae;
	struct archive *a;
	const char *reffile1 = "test_read_format_raw.data";
	const char *reffile2 = "test_read_format_raw.data.Z";

	/* First, try pulling data out of an uninterpretable file. */
	extract_reference_file(reffile1);
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_raw(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_filename(a, reffile1, 512));

	/* First (and only!) Entry */
	assertA(0 == archive_read_next_header(a, &ae));
	assertEqualString("data", archive_entry_pathname(ae));
	/* Most fields should be unset (unknown) */
	assert(!archive_entry_size_is_set(ae));
	assert(!archive_entry_atime_is_set(ae));
	assert(!archive_entry_ctime_is_set(ae));
	assert(!archive_entry_mtime_is_set(ae));
	assertEqualInt(4, archive_read_data(a, buff, 32));
	assertEqualMem(buff, "foo\n", 4);

	/* Test EOF */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));


	/* Second, try the same with a compressed file. */
	extract_reference_file(reffile2);
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_raw(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_filename(a, reffile2, 1));

	/* First (and only!) Entry */
	assertA(0 == archive_read_next_header(a, &ae));
	assertEqualString("data", archive_entry_pathname(ae));
	/* Most fields should be unset (unknown) */
	assert(!archive_entry_size_is_set(ae));
	assert(!archive_entry_atime_is_set(ae));
	assert(!archive_entry_ctime_is_set(ae));
	assert(!archive_entry_mtime_is_set(ae));
	assertEqualInt(4, archive_read_data(a, buff, 32));
	assertEqualMem(buff, "foo\n", 4);

	/* Test EOF */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tbz.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tgz.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tlz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_tlz.c 201247 2009-12-30 05:59:21Z kientzle $");

static unsigned char archive[] = {
 93,  0,  0,128,  0,255,255,255,255,255,255,255,255,  0, 23,  0,
 51, 80, 24,164,204,238, 45, 77, 28,191, 13,144,  8, 10, 70,  5,
173,215, 47,132,237,145,162, 96,  6,131,168,152,  8,135,161,189,
 73,110,132, 27,195, 52,109,203, 22, 17,168,211, 18,181, 76, 93,
120, 88,154,155,244,141,193,206,170,224, 80,137,134, 67,  1,  9,
123,121,189, 74,137,197, 63,255,214, 55,119,  0 
};

DEFINE_TEST(test_read_format_tlz)
{
	struct archive_entry *ae;
	struct archive *a;
	int r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_memory(a, archive, sizeof(archive)));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_LZMA);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_txz.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_format_txz.c 191183 2009-04-17 01:06:31Z kientzle $");

static unsigned char archive[] = {
253, 55,122, 88, 90,  0,  0,  4,230,214,180, 70,  2,  0, 33,  1,
 22,  0,  0,  0,116, 47,229,163,224,  5,255,  0, 73, 93,  0, 23,
  0, 51, 80, 24,164,204,238, 45, 77, 28,191, 13,144,  8, 10, 70,
  5,173,215, 47,132,237,145,162, 96,  6,131,168,152,  8,135,161,
189, 73,110,132, 27,195, 52,109,203, 22, 17,168,211, 18,181, 76,
 93,120, 88,154,155,244,141,193,206,170,224, 80,137,134, 67,  1,
  9,123,121,188,247, 28,139,  0,  0,  0,  0,  0,112,184, 17,  5,
103, 16,  8, 73,  0,  1,101,128, 12,  0,  0,  0, 30, 69, 92, 96,
177,196,103,251,  2,  0,  0,  0,  0,  4, 89, 90
};

DEFINE_TEST(test_read_format_txz)
{
	struct archive_entry *ae;
	struct archive *a;
	int r;

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("xz reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_memory(a, archive, sizeof(archive)));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_XZ);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tz.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_xar.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

#define UID	1001
#define UNAME	"cue"
#define GID	1001
#define GNAME	"cue"

/* Verify that a file records with hardlink.
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
ln f1 hardlink
chown $UNAME:$GNAME hardlink
chmod 0644 hardlink
env TZ=utc touch -afm -t 197001020000.01 f1 hardlink
xar -cf archive1.xar f1 hardlink
od -t x1 archive1.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive1.xar.txt
*/
static unsigned char archive1[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xc6,
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x70,0x00,0x00,0x00,0x01,0x78,0xda,0xc4,0x54,
0xc9,0x6e,0xdb,0x30,0x14,0xbc,0xe7,0x2b,0x08,0xdd,0x55,0xae,0xb6,0x45,0x83,0x56,
0xd0,0x4b,0xd1,0x7b,0xd3,0x4b,0x6f,0x34,0x17,0x89,0x88,0x36,0x48,0x54,0xe0,0xe4,
0xeb,0x4b,0x52,0x52,0x0c,0xa7,0x71,0x6f,0x45,0x01,0x01,0x1a,0x0e,0x87,0xa3,0xa7,
0xf7,0x06,0x14,0x8f,0x97,0xb6,0x01,0x2f,0x66,0x9c,0x5c,0xdf,0x9d,0x32,0xfc,0x05,
0x65,0xc0,0x74,0xaa,0xd7,0xae,0xab,0x4e,0xd9,0xcf,0xa7,0x6f,0x79,0x91,0x3d,0x96,
0x0f,0xe2,0x22,0xc7,0xf2,0x01,0x08,0xdf,0xab,0xf0,0x02,0x42,0x8d,0x46,0xfa,0x70,
0x22,0xf7,0xae,0x35,0x25,0x41,0x88,0xe7,0x98,0xe4,0x88,0x3c,0x61,0x7a,0xa4,0xe8,
0x48,0xb9,0x80,0xb7,0x92,0x74,0xa8,0x36,0xea,0x79,0x9a,0x5b,0x30,0xf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x82,0x4b,0x2d,0x09,0xb5,
0x85,0x3d,0x70,0x6c,0xf7,0xc4,0x2a,0xba,0xe7,0x45,0x98,0xc3,0x47,0xa3,0xad,0x96,
0x8b,0x1f,0xa5,0xf2,0x77,0xbf,0xb0,0xd3,0x07,0x76,0x56,0x67,0x75,0xe0,0x9a,0x5a,
0x7e,0xb6,0x4c,0xda,0xe0,0xcd,0x8a,0xa2,0x40,0x86,0xed,0xc8,0x7e,0xc7,0xac,0x41,
0x8a,0x87,0x1c,0xff,0xe9,0xb4,0x34,0x0f,0xbe,0x77,0xef,0x9f,0xc4,0xee,0x73,0xd9,
0x7f,0x8c,0x5d,0x3f,0xba,0xca,0x75,0xb2,0xf9,0x4b,0xfa,0x2c,0xfe,0x24,0x77,0x41,
0x15,0x2f,0x0d,0x01,0xd3,0x15,0xf2,0x1b,0x00,0x00,0xff,0xff,0x03,0x00,0x88,0x32,
0x49,0x7b,0x67,0xbf,0xc6,0x01,0x29,0xf2,0x1c,0x40,0x05,0x3c,0x49,0x25,0x9f,0xab,
0x7c,0x8e,0xc5,0xa5,0x79,0xe0,0x78,0xda,0xca,0x48,0xcd,0xc9,0xc9,0xcf,0x80,0x13,
0x5c,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x37,0xf7,0x06,0x47
};

static void verify0(struct archive *a, struct archive_entry *ae)
{
	const void *p;
	size_t size;
	off_t offset;

	assert(archive_entry_filetype(ae) == AE_IFREG);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0644);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "f1");
	assert(archive_entry_hardlink(ae) == NULL);
	assert(archive_entry_symlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
	assertEqualInt(archive_entry_size(ae), 16);
	assertEqualInt(archive_read_data_block(a, &p, &size, &offset), 0);
	assertEqualInt((int)size, 16);
	assertEqualInt((int)offset, 0);
	assertEqualInt(memcmp(p, "hellohellohello\n", 16), 0);
}

static void verify1(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	/* A hardlink is not a symlink. */
	assert(archive_entry_filetype(ae) != AE_IFLNK);
	/* Nor is it a directory. */
	assert(archive_entry_filetype(ae) != AE_IFDIR);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0644);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "hardlink");
	assertEqualString(archive_entry_hardlink(ae), "f1");
	assert(archive_entry_symlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
	assertEqualInt(archive_entry_nlink(ae), 2);
}

/* Verify that symlinks are read correctly.
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
ln -s f1 symlink
chown $UNAME:$GNAME symlink
chmod 0644 symlink
env TZ=utc touch -afm -t 197001020000.01 f1 symlink
xar -cf archive2.xar f1 symlink
od -t x1 archive2.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive2.xar.txt
*/
static unsigned char archive2[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe8,
0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x84,0x00,0x00,0x00,0x01,0x78,0xda,0xb4,0x54,
0xcb,0x6e,0xa3,0x30,0x14,0xdd,0xf7,0x2b,0x90,0xf7,0x8c,0x1f,0x40,0x82,0x23,0xe3,
0xaa,0x9b,0x6a,0xf6,0xd3,0xd9,0xcc,0xce,0xf1,0x83,0x58,0xe5,0x25,0x70,0xaa,0xa4,
0x5f,0x3f,0xb6,0x09,0x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0x00,
0x2b,0xab,0x4f,0xf9,0xbb,0xf7,0x90,0xb5,0x34,0x8f,0x7c,0xae,0x72,0xa0,0x80,0xd2,
0x69,0xc7,0xa2,0xe7,0x44,0x53,0xeb,0x75,0x78,0xda,0xca,0x48,0xcd,0xc9,0xc9,0xcf,
0x80,0x13,0x5c,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x37,0xf7,0x06,0x47
};

static void verify2(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assertEqualInt(archive_entry_filetype(ae), AE_IFLNK);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0755);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "symlink");
	assertEqualString(archive_entry_symlink(ae), "f1");
	assert(archive_entry_hardlink(ae) == NULL);
}

/* Character device node.
#How to make
mknod devchar c 0 30
chown $UNAME:$GNAME devchar
chmod 0644 devchar
env TZ=utc touch -afm -t 197001020000.01 devchar
xar -cf archive3.xar devchar
od -t x1 archive3.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive3.xar.txt
*/
static unsigned char archive3[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x38,
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x3b,0x00,0x00,0x00,0x01,0x78,0xda,0x7c,0x92,
0x4d,0x6e,0xc3,0x20,0x10,0x85,0xf7,0x39,0x05,0xf2,0xde,0x05,0x9c,0x9f,0x36,0xd6,
0x84,0xec,0x7a,0x82,0x74,0xd3,0x1d,0xc2,0x93,0x98,0xd4,0x36,0x11,0xe0,0x28,0xe9,
0xe9,0x0b,0xe3,0xa4,0x69,0xa5,0xaa,0x92,0x25,0x1e,0x8f,0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3,0x6a,0xaf,0x4d,0x44,0xcf,0xc2,0x09,0x8d,0xd5,0x1d,
0x70,0xf2,0x89,0x18,0x74,0xba,0x54,0x8a,0x64,0x08,0x38,0xed,0x68,0xea,0x79,0xd0,
0xf9,0xf9,0x39,0xbd,0x3f,0x70,0xfa,0x1b,0xbe,0x00,0x00,0x00,0xff,0xff,0x03,0x00,
0xab,0x43,0xa3,0xac,0x76,0x40,0x1e,0x8b,0x95,0x0d,0x28,0x79,0x79,0x43,0x49,0x4e,
0x16,0xa1,0x56,0x99,0x1f,0x83,0x77,0x41
};

static void verify3(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assertEqualInt(archive_entry_filetype(ae), AE_IFCHR);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0644);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "devchar");
	assert(archive_entry_symlink(ae) == NULL);
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
}

/* Block device node.
#How to make
mknod devblock b 0 30
chown $UNAME:$GNAME devblock
chmod 0644 devblock
env TZ=utc touch -afm -t 197001020000.01 devblock
xar -cf archive4.xar devblock
od -t x1 archive4.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive4.xar.txt
*/
static unsigned char archive4[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x34,
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x00,0x00,0x01,0x78,0xda,0x7c,0x92,
0xc1,0x6e,0xc2,0x30,0x0c,0x86,0xef,0x3c,0x45,0xd4,0x7b,0x17,0x07,0xd0,0x0a,0x95,
0x09,0xb7,0x3d,0x01,0xb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
0x3c,0x98,0x89,0x6e,0xa9,0xf9,0x88,0x9c,0x42,0x06,0x2e,0x93,0x3f,0xea,0x70,0xb8,
0x76,0xa4,0xdf,0x6b,0x6f,0x4f,0x22,0x74,0x64,0x9d,0xa9,0x51,0x72,0xc6,0xbb,0xad,
0x89,0x1f,0x14,0x75,0x16,0x50,0xf2,0x92,0x8f,0x3c,0x9d,0x72,0xba,0x7b,0xc9,0x97,
0x8f,0x92,0x7f,0x85,0x2f,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0xbe,0x66,0xa2,0x82,
0x3a,0x54,0xd3,0x61,0xaa,0x8e,0x30,0x4c,0xc8,0x36,0x3b,0x7a,0xa4,0xb9,0xef,0xfc,
0x7a,0x5d,0x21,0xde
};

static void verify4(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assertEqualInt(archive_entry_filetype(ae), AE_IFBLK);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0644);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "devblock");
	assert(archive_entry_symlink(ae) == NULL);
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
}

/* Directory.
#How to make
mkdir dir1
chown $UNAME:$GNAME dir1
chmod 0755 dir1
env TZ=utc touch -afm -t 197001020000.01 dir1
xar -cf archive5.xar dir1
od -t x1 archive5.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive5.xar.txt
*/
static unsigned char archive5[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x16,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xec,0x00,0x00,0x00,0x01,0x78,0xda,0x74,0x91,
0xc1,0x6e,0xc2,0x30,0x0c,0x86,0xef,0x3c,0x45,0xd4,0x7b,0x17,0xa7,0x83,0x31,0xaa,
0x34,0xdc,0xf6,0x04,0xec,0xb2,0x5b,0x95,0x1a,0x88,0x68,0x1a,0x94,0xa4,0x13,0xdd,
0xd3,0x2f,0x71,0xe9,0xd0,0xa4,0x4d,0xaa,0xd4,0x3f,0xbf,0x3f,0xff,0xb2,0x6c,0xb9,
0xbf,0xd9,0x9e,0x7d,0xa2,0x0f,0xc6,0x0d,0x4d,0x21,0x9e,0xa0,0x60,0x38,0x68,0xd7,
0x99,0xe1,0xd4,0x14,0xef,0x87,0xb7,0xf2,0xb5,0xd8,0xab,0x95,0xbc,0xb5,0x5e,0xad,
0x98,0x8c,0x4e,0xa7,0x1f,0x93,0xda,0x63,0x1b,0x53,0x47,0x19,0x8d,0x45,0x55,0x01,
0xec,0x4a,0x51,0x95,0x50,0x1d,0x04,0xd4,0x6b,0x51,0xaf,0x37,0x92,0xff,0x46,0xa8,
0xe9,0x8c,0xfa,0x12,0x46,0xcb,0x42,0x9c,0x7a,0x6c,0x8a,0x70,0x6e,0x45,0x91,0x2b,
0x4c,0xba,0xe3,0x31,0x60,0x54,0x20,0xf9,0x5d,0x91,0x1b,0xcc,0x57,0x0e,0x97,0x9c,
0x44,0x8e,0xe0,0x4b,0x06,0xbd,0x8e,0xa6,0x47,0x66,0xba,0x34,0xf6,0x3d,0x46,0xff,
0x3d,0xce,0x33,0x7c,0xa4,0xce,0x65,0x0e,0x26,0x2d,0x49,0xb1,0xdb,0x42,0x09,0x22,
0x63,0x00,0x75,0xfe,0x44,0xc2,0xec,0x03,0x6b,0xff,0x49,0x7b,0x49,0x58,0xfb,0xc0,
0x4e,0xde,0x8d,0x57,0xa5,0x47,0x94,0x7c,0x96,0xb3,0x6b,0x3a,0x25,0x00,0x44,0x32,
0x93,0x22,0x6b,0x0c,0xe8,0x67,0x8e,0xd4,0xec,0xfd,0x60,0xe3,0x82,0x59,0xd7,0xa1,
0x82,0xed,0x26,0xed,0x90,0x24,0x99,0x71,0xba,0xa2,0xea,0x8c,0x47,0x1d,0x9d,0x9f,
0x24,0xa7,0x37,0x55,0x86,0xd6,0x52,0x25,0x45,0x90,0xa4,0x35,0xe5,0xcd,0xe4,0x7b,
0x71,0x3a,0x98,0xe4,0x74,0xbe,0x6f,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x23,0x7a,
0x8c,0x2f,0x78,0xe9,0x69,0x28,0x93,0x14,0x72,0x68,0x8d,0xeb,0x42,0x7b,0xf6,0x0f,
0x70,0x64,0xa3,0xff,0xb9,0x35
};

static void verify5(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assertEqualInt(archive_entry_filetype(ae), AE_IFDIR);
	assertEqualInt(archive_entry_mtime(ae), 86401);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0755);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
}

/* fifo
#How to make
mkfifo -m 0755 fifo
chown $UNAME:$GNAME fifo
env TZ=utc touch -afm -t 197001020000.01 fifo
xar -cf archive6.xar fifo
od -t x1 archive6.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive6.xar.txt
*/
static unsigned char archive6[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0e,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe7,0x00,0x00,0x00,0x01,0x78,0xda,0x7c,0x91,
0xc1,0x6e,0xc3,0x20,0x0c,0x86,0xef,0x7d,0x0a,0xc4,0x3d,0xc3,0x64,0xab,0xda,0x46,
0x94,0xde,0xf6,0x04,0xdd,0x65,0x37,0x44,0x9c,0x16,0x2d,0x84,0x2a,0x90,0xa9,0xdd,
0xd3,0x0f,0x9c,0x66,0xd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,0xff,0xff,0x03,0x00,0x44,0x19,0x8a,0x2a,0x82,0xbc,0x8c,0xae,0x97,0xa7,
0x7d,0x65,0xa5,0x82,0xdb,0xaa,0xc2,0xcb,0xbe,0xf0,0x1f,0xd1,0xf9,0x56
};

static void verify6(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assertEqualInt(archive_entry_filetype(ae), AE_IFIFO);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0755);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "fifo");
	assert(archive_entry_symlink(ae) == NULL);
	assert(archive_entry_hardlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
}

/* Verify that a file records with directory name.
#How to make
mkdir dir1
echo "hellohellohello" > dir1/f1
chown $UNAME:$GNAME dir1/f1
chmod 0644 dir1/f1
env TZ=utc touch -afm -t 197001020000.01 dir1/f1
xar -cf archive7.xar dir1/f1
od -t x1 archive7.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive7.xar.txt
*/

static unsigned char archive7[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xbb,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x8a,0x00,0x00,0x00,0x01,0x78,0xda,0x7c,0x53,
0xc9,0x6e,0xdb,0x30,0x14,0xbc,0xe7,0x2b,0x04,0xdd,0x55,0x2e,0xa2,0x16,0x1a,0xb4,
0x82,0x5e,0x8a,0xdc,0x93,0x5e,0x7a,0xa3,0xb9,0xd8,0x44,0xb5,0x41,0xa2,0x02,0x3b,
0x5f,0x5f,0x92,0xa2,0x1c,0xbb,0x59,0x00,0x01,0x1a,0x3e,0xce,0x1b,0x0d,0x9f,0x86,
0xec,0xf1,0xdc,0xb5,0xc9,0xab,0x9a,0x66,0x33,0xf4,0xfb,0x14,0xfd,0x80,0x69,0xa2,
0x7a,0x31,0x48,0xd3,0x1f,0xf7,0xe9,0xef,0x97,0x5f,0x59,0x9d,0x3e,0x36,0x0f,0xec,
0xcc,0xa7,0xe6,0x21,0x61,0x76,0x10,0xee,0x95,0x30,0x31,0x29,0x6e,0x5d,0x47,0x66,
0x4d,0xa7,0x1a,0x0c,0x21,0xcd,0x10,0xce,0x20,0x7e,0x41,0x68,0x57,0xe0,0x5d,0x51,
0x31,0x70,0x4f,0x09,0x4d,0x27,0x25,0xfe,0xce,0x4b,0x97,0xcc,0xf6,0xd2,0xaa,0x7d,
0x3a,0x9f,0x38,0x4a,0xfd,0x4e,0xc2,0x06,0xad,0x67,0x65,0x1b,0xc8,0x40,0x44,0xa1,
0x3a,0x9b,0x37,0x2f,0xce,0x40,0x00,0x5e,0x02,0x6c,0x1a,0x61,0xa5,0x4d,0xab,0x12,
0x23,0x9d,0xed,0x28,0x63,0x2f,0xa3,0x6a,0xa4,0x99,0x94,0xb0,0xc3,0x74,0x61,0x20,
0xac,0xc3,0x4e,0xcf,0xbb,0xb0,0x83,0x18,0x08,0x30,0x14,0xaf,0xfd,0x78,0xed,0x4f,
0x98,0xe4,0x96,0xaf,0x30,0x61,0xad,0xea,0x8f,0xf6,0xd4,0xe0,0x9c,0x81,0x08,0xe3,
0x46,0xb4,0x88,0xef,0xdd,0x6e,0x7e,0x51,0xf9,0xee,0xd7,0x17,0xb7,0x69,0x6e,0xa7,
0xe6,0xe3,0xd8,0x1a,0x11,0x46,0x03,0xce,0xd9,0xf1,0xcd,0x8c,0x29,0xd8,0xb8,0x7c,
0x12,0x27,0xf3,0xaa,0x64,0xf6,0xff,0xa8,0x9e,0x9f,0x7e,0xba,0x33,0xea,0x3a,0xcf,
0x25,0xd6,0x52,0x20,0x9a,0x13,0x9a,0xf3,0x03,0xa9,0x29,0x97,0x1c,0xe7,0xba,0xd6,
0x15,0x45,0xba,0xc4,0x5a,0xe4,0x25,0xad,0x19,0xf8,0x20,0x74,0x75,0x73,0xb6,0x13,
0x17,0xf6,0xcb,0x4f,0x14,0xb2,0x22,0x07,0x71,0x10,0x15,0x95,0xb9,0xa6,0x07,0x4d,
0xb8,0x76,0xe2,0xa4,0xae,0x6b,0xa8,0x48,0x81,0xcb,0x82,0x68,0x05,0x05,0xa5,0x0c,
0x7c,0x54,0x8a,0x33,0x04,0xef,0x43,0x64,0xe2,0xf3,0x7c,0x90,0xfa,0x8f,0xfb,0x95,
0x5b,0x30,0x1c,0xaf,0x0b,0x18,0xd1,0x0a,0x66,0x10,0x79,0x1e,0x84,0x3b,0xff,0x20,
0xc7,0xeb,0x6e,0x78,0xfc,0x1b,0x1e,0xbf,0xe1,0x1d,0xa7,0x61,0x19,0x1b,0xb1,0x28,
0x06,0x56,0x18,0xcb,0x46,0x36,0x08,0x42,0x17,0x02,0x8f,0xd6,0xda,0x32,0xab,0x69,
0x65,0x06,0x14,0x8b,0x57,0xe2,0x72,0x25,0x76,0x83,0x54,0x0d,0x2c,0x09,0x71,0x96,
0x3c,0x5c,0xab,0x21,0x62,0x3e,0x48,0x37,0x69,0x8b,0x71,0xd3,0x77,0x61,0x03,0x9e,
0xb4,0x86,0x38,0x22,0xd7,0xe1,0xaf,0x13,0x03,0xe1,0x72,0xfd,0x03,0x00,0x00,0xff,
0xff,0x03,0x00,0x8d,0xb1,0x06,0x76,0xa6,0x7a,0xc3,0xbb,0x13,0x3d,0x45,0xe2,0x2b,
0x3b,0xd0,0x88,0xc7,0x58,0x7b,0xbd,0x30,0x9d,0x01,0x44,0x78,0xda,0xca,0x48,0xcd,
0xc9,0xc9,0xcf,0x80,0x13,0x5c,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x37,0xf7,
0x06,0x47
};

static void verify7(struct archive *a, struct archive_entry *ae)
{
	(void)a; /* UNUSED */
	assert(archive_entry_filetype(ae) == AE_IFREG);
	assertEqualInt(archive_entry_mode(ae) & 0777, 0644);
	assertEqualInt(archive_entry_uid(ae), UID);
	assertEqualInt(archive_entry_gid(ae), GID);
	assertEqualString(archive_entry_uname(ae), UNAME);
	assertEqualString(archive_entry_gname(ae), GNAME);
	assertEqualString(archive_entry_pathname(ae), "dir1/f1");
	assert(archive_entry_hardlink(ae) == NULL);
	assert(archive_entry_symlink(ae) == NULL);
	assertEqualInt(archive_entry_mtime(ae), 86401);
}

/* Verify that a file records with bzip2 compression
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
env TZ=utc touch -afm -t 197001020000.01 f1
xar --compression bzip2 -cf archive8.xar f1
od -t x1 archive8.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive8.xar.txt
*/

static unsigned char archive8[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xb1,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x42,0x00,0x00,0x00,0x01,0x78,0xda,0x7c,0x53,
0xcb,0x6e,0xdc,0x20,0x14,0xdd,0xe7,0x2b,0x90,0xf7,0x0e,0x60,0xe3,0x07,0x23,0x86,
0xa8,0x9b,0xa8,0xfb,0x4e,0x37,0xdd,0x61,0x1e,0x63,0x14,0xbf,0x64,0xe3,0x68,0x92,
0xaf,0x2f,0x60,0x3b,0xa3,0x34,0x6d,0x25,0x4b,0x3e,0x1c,0x0e,0xe7,0x5e,0xee,0xe5,
0xb2,0xa7,0x5b,0xdf,0x81,0x57,0x3d,0x2f,0x76,0x1c,0xce,0x09,0x7e,0x44,0x09,0xd0,
0x83,0x1c,0x95,0x1d,0xae,0xe7,0xe4,0xe7,0xe5,0x39,0xad,0x93,0x27,0xfe,0xc0,0x6e,
0x62,0xe6,0x0f,0x80,0xb9,0x51,0xfa,0x1f,0x60,0x72,0xd6,0xc2,0xf9,0x13,0xa9,0xb3,
0xbd,0xe6,0x19,0x42,0x34,0xc5,0x59,0x8a,0xc8,0x05,0xd1,0x13,0xc6,0x27,0x9c,0x33,
0xf8,0x59,0x12,0x0f,0xb5,0x5a,0xbe,0x2c,0x6b,0x0f,0x16,0xf7,0xd6,0xe9,0x73,0xb2,
0xb4,0x02,0x27,0x61,0x07,0xb0,0xd1,0x98,0x45,0x3b,0x8e,0x18,0xdc,0x51,0x64,0x17,
0xfb,0x1e,0xcc,0x19,0x8c,0x20,0x58,0xc0,0xc3,0x23,0xae,0x8c,0xed,0x34,0xb0,0xca,
0xa7,0xbd,0xdb,0x28,0xe1,0x44,0x44,0x80,0x75,0x7a,0xb8,0xba,0x96,0x13,0xc2,0xe0,
0x0e,0x37,0x7e,0xf7,0xcf,0x3e,0x87,0xda,0x63,0xe1,0xf2,0x1e,0xcb,0x73,0x47,0x21,
0x8e,0x84,0xc5,0x34,0x75,0x56,0xc6,0x5b,0xc1,0x5b,0xda,0xbc,0xdb,0x29,0x4b,0xe0,
0xae,0x15,0xb3,0x6c,0xed,0xab,0x56,0xe9,0x9f,0xb7,0xfc,0xf1,0xfd,0x9b,0x4f,0xcf,
0xe4,0xa4,0x28,0x4a,0x94,0xcb,0x3a,0xcf,0x9b,0x26,0x93,0xaa,0x92,0xba,0x29,0xa8,
0x2a,0x89,0x29,0xa8,0x50,0x22,0x97,0x45,0xa1,0x71,0xe5,0xeb,0xf6,0xc5,0xe8,0x48,
0xe6,0xe6,0x66,0x21,0xdd,0x3f,0x23,0x14,0xaa,0x22,0x8d,0x6c,0x64,0x45,0x55,0x6e,
0x68,0x63,0x88,0x30,0xa6,0x36,0xa4,0xae,0x6b,0xa4,0x49,0x91,0x95,0x05,0x31,0x1a,
0x49,0x4a,0x19,0xfc,0xea,0xb4,0x55,0x0f,0x7e,0x94,0x8f,0xc9,0xbf,0xf7,0x15,0xd5,
0xbf,0x7c,0x0b,0x8e,0x86,0x02,0xd6,0x47,0x88,0x69,0x85,0x52,0x84,0x53,0x94,0x5d,
0x10,0x3a,0x85,0x0f,0x7b,0x59,0x7f,0x97,0x89,0xff,0xc8,0xc4,0x5d,0x76,0x9d,0xc7,
0x75,0xe2,0x72,0xd5,0x0c,0x6e,0x70,0x63,0xad,0xe2,0x18,0x21,0xec,0x49,0x8f,0x22,
0xb5,0x2e,0x7a,0xde,0x74,0x11,0x6d,0xdc,0x87,0x6c,0x3d,0x64,0xfd,0xa8,0x34,0x47,
0x65,0x78,0x02,0x11,0x46,0xd2,0xbd,0x4d,0x1a,0x74,0x76,0x78,0x39,0x27,0xe3,0x6c,
0xaf,0x76,0x10,0x5d,0xc2,0x5b,0x31,0xab,0xc0,0x31,0x18,0xb6,0x37,0xe1,0x20,0x7c,
0x5e,0xc6,0xfb,0x45,0x10,0x1f,0x5f,0x78,0x6f,0x61,0x0a,0x60,0x1c,0x03,0x06,0xe3,
0x50,0xfc,0x06,0x00,0x00,0xff,0xff,0x03,0x00,0x19,0xcf,0xf5,0xc0,0xf9,0x65,0xe8,
0x78,0xc3,0xfa,0x5f,0x0a,0xf6,0x09,0x17,0xd8,0xb0,0x54,0xb9,0x02,0x8d,0x91,0x31,
0x9c,0x42,0x5a,0x68,0x39,0x31,0x41,0x59,0x26,0x53,0x59,0xc1,0x52,0x36,0xf7,0x00,
0x00,0x03,0x41,0x00,0x00,0x10,0x02,0x44,0xa0,0x00,0x21,0xb4,0x01,0x9a,0x0d,0x46,
0xa5,0x32,0x38,0xbb,0x92,0x29,0xc2,0x84,0x86,0x0a,0x91,0xb7,0xb8
};

/* Verify that a file records with no compression
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
env TZ=utc touch -afm -t 197001020000.01 f1
xar --compression none -cf archive9.xar f1
od -t x1 archive9.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive9.xar.txt
*/

static unsigned char archive9[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x98,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x47,0x00,0x00,0x00,0x01,0x78,0xda,0xa4,0x53,
0x4d,0x6f,0xe3,0x20,0x14,0xbc,0xf7,0x57,0x20,0xee,0x5e,0xc0,0x25,0x89,0x1d,0x11,
0xaa,0x5e,0xaa,0xbd,0x6f,0xf6,0xb2,0x37,0x02,0x8f,0x18,0xc5,0x1f,0x11,0xc6,0x55,
0xba,0xbf,0x7e,0x01,0xdb,0xad,0xba,0x55,0x7b,0xa9,0x64,0xc9,0xe3,0x61,0xde,0x78,
0x78,0xf0,0xc4,0xc3,0xad,0x6b,0xd1,0x33,0xf8,0xd1,0x0d,0xfd,0x01,0xb3,0x1f,0x14,
0x23,0xe8,0xf5,0x60,0x5c,0x7f,0x3e,0xe0,0xdf,0xc7,0xa7,0xa2,0xc2,0x0f,0xf2,0x4e,
0xdc,0x94,0x97,0x77,0x48,0x84,0x41,0xc7,0x17,0x12,0xda,0x83,0x0a,0xb1,0xa2,0x08,
0xae,0x03,0x59,0x52,0x5a,0x17,0xac,0x2c,0x28,0x3f,0xd2,0x7a,0xcf,0xaa,0x3d,0xaf,
0x05,0x79,0x2f,0xc9,0x45,0x0d,0xe8,0xcb,0x38,0x75,0x68,0x0c,0x2f,0x2d,0x1c,0xf0,
0xd8,0x28,0x86,0xd3,0x0a,0x12,0x83,0xb5,0x23,0x04,0x49,0x05,0x59,0x50,0x66,0x47,
0xf7,0x37,0x99,0x0b,0x92,0x41,0xb2,0x20,0xab,0x47,0xfe,0xb2,0xae,0x05,0xe4,0x4c,
0x8c,0xbd,0xd8,0x18,0x15,0x54,0x46,0x48,0xb4,0xd0,0x9f,0x43,0x23,0xd9,0x56,0x90,
0x05,0xce,0xfc,0xba,0xb9,0x35,0x84,0xba,0x5e,0x5b,0xa7,0x73,0x52,0x32,0xe8,0x00,
0xa1,0x18,0x43,0x4c,0xde,0x61,0xb2,0x14,0x2c,0x81,0xca,0xf7,0xd9,0x96,0x70,0xc9,
0x7e,0x0d,0x17,0x39,0xe5,0x75,0xe3,0x9e,0xc1,0x14,0xff,0x6f,0xf5,0xd7,0xcf,0xc7,
0x98,0x71,0x63,0x76,0xfc,0xa4,0x4f,0x7a,0x57,0x9b,0x7b,0x5b,0x9f,0x2c,0x57,0xd6,
0x56,0x96,0x57,0x55,0x45,0x81,0x6f,0xca,0xed,0x86,0x5b,0xa0,0xba,0x8e,0xcd,0xfb,
0x60,0xb4,0xa6,0xbf,0x05,0xaf,0x62,0xca,0xef,0xff,0xe1,0xa3,0xd3,0xdc,0x42,0xf2,
0xda,0x43,0xa1,0x3f,0x39,0xdc,0xed,0x9f,0x78,0x0e,0xeb,0xa9,0x22,0xd1,0x65,0xc8,
0xea,0x1d,0x2d,0x28,0x2b,0x68,0x79,0xa4,0x74,0x9f,0x1e,0x16,0x65,0xdd,0x9b,0x4c,
0x7d,0x21,0x53,0x6f,0xb2,0xb3,0x1f,0xa6,0xab,0xd4,0x13,0x08,0x32,0xc3,0x99,0x75,
0x46,0x32,0x4a,0x59,0x24,0x23,0xca,0xd4,0x34,0x82,0x9f,0x75,0x19,0xcd,0xdc,0xab,
0x6c,0x5a,0x65,0xdd,0x60,0x40,0xd2,0x2d,0xe7,0x31,0x4c,0x82,0x99,0x0c,0x2f,0x57,
0x40,0xad,0xeb,0x2f,0x07,0x3c,0x78,0x77,0x76,0xbd,0x6a,0xb1,0x6c,0x94,0x37,0x89,
0x13,0x24,0x2d,0xcf,0xc2,0x5e,0xc5,0x5c,0x36,0xfa,0x65,0x90,0x6f,0x60,0xba,0x74,
0x69,0x14,0x48,0x9e,0x05,0x41,0xf2,0x64,0xfc,0x03,0x00,0x00,0xff,0xff,0x03,0x00,
0xee,0x8e,0xf8,0x75,0xa1,0xaf,0x74,0x71,0x3f,0x40,0x08,0xab,0x13,0x7d,0xc0,0x82,
0x3a,0x56,0xeb,0x4e,0x35,0xf1,0x35,0xb7,0x68,0x65,0x6c,0x6c,0x6f,0x68,0x65,0x6c,
0x6c,0x6f,0x68,0x65,0x6c,0x6c,0x6f,0x0a
};

/* Verify that a file records with md5 hashing algorithm
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
env TZ=utc touch -afm -t 197001020000.01 f1
xar --toc-cksum md5 -cf archive10.xar f1
od -t x1 archive10.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive10.xar.txt
*/

static unsigned char archive10[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xaf,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x40,0x00,0x00,0x00,0x02,0x78,0xda,0x7c,0x53,
0x4d,0x6f,0xdc,0x20,0x10,0xbd,0xe7,0x57,0x20,0xee,0x0e,0x60,0xb3,0xb6,0x59,0xb1,
0x44,0xbd,0x44,0xbd,0x77,0x7b,0xe9,0x8d,0xe5,0xc3,0x8b,0xe2,0x2f,0x61,0x1c,0x6d,
0xf2,0xeb,0x8b,0xb1,0x9d,0xb4,0x4d,0x52,0xc9,0x92,0x1f,0x8f,0xc7,0x9b,0x61,0x86,
0xe1,0x0f,0xb7,0xae,0x05,0xcf,0xc6,0x4f,0x6e,0xe8,0x4f,0x90,0xdc,0x63,0x08,0x4c,
0xaf,0x06,0xed,0xfa,0xe6,0x04,0x7f,0x9e,0x1f,0xb3,0x1a,0x3e,0x88,0x3b,0x7e,0x93,
0x5e,0xdc,0x01,0x1e,0x06,0x15,0x7f,0x80,0x2b,0x6f,0x64,0x88,0x27,0xb2,0xe0,0x3a,
0x23,0x72,0x8c,0x59,0x46,0xf2,0x0c,0xd3,0x33,0x66,0xc7,0x02,0x1f,0x69,0xcd,0xd1,
0xdf,0x92,0x74,0xe8,0x6a,0xd4,0xd3,0x34,0x77,0x60,0x0a,0x2f,0xad,0x39,0xc1,0x4e,
0x1f,0xe0,0xb2,0x01,0xf8,0x60,0xed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0x93,0xcd,0xbb,0xac,0x1b,0xb4,0x11,0xb8,0xa4,0x34,0x26,
0xb3,0xc0,0x44,0x86,0x97,0xd1,0x80,0xd6,0xf5,0x4f,0x27,0x38,0x78,0xd7,0xb8,0x5e,
0xb6,0x50,0x5c,0xa5,0xd7,0x0b,0xc7,0xd1,0xb2,0xbd,0x0a,0x7b,0x19,0xf3,0xb2,0xd1,
0x2f,0x81,0xf4,0xf6,0x96,0xe7,0xb6,0xcc,0x00,0x4a,0x43,0xc0,0x51,0x1a,0x89,0xdf,
0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x27,0xf8,0xf5,0x28,0x87,0x01,0xb1,0xb7,0x18,
0xe8,0x34,0x20,0x06,0x5c,0x66,0x9a,0x43,0x26,0xe7,0x94,0x78,0xda,0xca,0x48,0xcd,
0xc9,0xc9,0xcf,0x80,0x13,0x5c,0x00,0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x37,0xf7,
0x06,0x47
};

/* Verify that a file records with no hashing algorithm
#How to make
echo "hellohellohello" > f1
chown $UNAME:$GNAME f1
chmod 0644 f1
env TZ=utc touch -afm -t 197001020000.01 f1
xar --toc-cksum none -cf archive11.xar f1
od -t x1 archive11.xar | sed -E -e 's/^0[0-9]+//;s/^  //;s/(  )([0-9a-f]{2})/0x\2,/g;$ D' >  archive11.xar.txt
*/

static unsigned char archive11[] = {
0x78,0x61,0x72,0x21,0x00,0x1c,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x98,
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xef,0x00,0x00,0x00,0x00,0x78,0xda,0x7c,0x52,
0xcb,0x6e,0xeb,0x20,0x14,0xdc,0xf7,0x2b,0x10,0x7b,0x17,0xb0,0x89,0x63,0x22,0x42,
0x75,0x37,0x55,0xf7,0xcd,0xdd,0x74,0x47,0x78,0x38,0xa8,0x7e,0xc9,0xc6,0x55,0xda,
0xaf,0xbf,0x3c,0xe2,0x56,0x55,0xd5,0x2b,0x21,0x79,0x3c,0xcc,0x39,0x67,0x74,0x18,
0xfe,0x70,0xed,0x3b,0xf0,0x66,0xe6,0xc5,0x8d,0xc3,0x11,0x92,0x7b,0x0c,0x81,0x19,
0xd4,0xa8,0xdd,0xd0,0x1e,0xe1,0xdf,0xd3,0x63,0xd1,0xc0,0x07,0x71,0xc7,0xaf,0x72,
0x16,0x77,0x80,0xfb,0x51,0x85,0x0f,0xe0,0x6a,0x36,0xd2,0x87,0x8a,0xc2,0xbb,0xde,
0x88,0x12,0x63,0x56,0x90,0xb2,0xc0,0xf4,0x44,0xf0,0x81,0x54,0x07,0x5a,0x73,0xf4,
0x5d,0x12,0x8b,0xac,0xeb,0x0c,0x70,0x3a,0x4c,0x81,0xf1,0x1f,0x70,0x2d,0xbd,0x4c,
0x08,0xf0,0xce,0x0c,0xad,0xbf,0x88,0xb2,0xe2,0xe8,0x06,0x33,0x3f,0x5a,0xbb,0x18,
0x2f,0x30,0x47,0x37,0x94,0xe9,0xc5,0x7d,0x18,0x41,0xc2,0x94,0x04,0x32,0xb7,0xd9,
0x06,0x8b,0x7f,0xef,0xcc,0x11,0xca,0x69,0xea,0x9c,0x4a,0x1e,0xd0,0xb5,0x68,0x3f,
0xdc,0x04,0xd1,0x4d,0x2a,0x67,0x75,0x71,0x6f,0x46,0x17,0xea,0x62,0xd4,0xeb,0xb2,
0xf6,0x5b,0xcd,0xf3,0xd3,0x9f,0x60,0xce,0x36,0x55,0xa5,0x4b,0xab,0x15,0x61,0x15,
0x65,0x95,0x3c,0xd3,0x86,0x49,0x2d,0xcb,0xca,0x36,0x76,0xcf,0x88,0xad,0x4b,0xab,
0xaa,0x9a,0x35,0x1c,0xfd,0x68,0xb4,0x79,0xb9,0xfa,0x59,0x2a,0xff,0xeb,0x84,0x9d,
0xde,0xd3,0xb3,0x3a,0xab,0x3d,0xd3,0x95,0x65,0x67,0x4b,0xa5,0x0d,0xbd,0x69,0xd3,
0x34,0xd8,0xd0,0x5d,0x59,0xef,0xa8,0x35,0x58,0x31,0xc6,0xd1,0xcf,0x4e,0x79,0x77,
0xe8,0x73,0x79,0x5c,0xfd,0xf2,0x08,0xe4,0x25,0xbc,0xc2,0xb6,0x7d,0xc0,0xfb,0x04,
0x09,0xdb,0xe3,0x02,0x93,0x02,0x97,0x27,0x8c,0x0f,0xf1,0x44,0x59,0xff,0x25,0x93,
0xff,0x91,0xc9,0x2f,0x59,0x3b,0x8f,0xeb,0x24,0xd4,0x6a,0x38,0xca,0x30,0xb3,0x4e,
0x0b,0x82,0x31,0x09,0x64,0x40,0x89,0x5a,0x17,0x33,0x67,0x5d,0x42,0x99,0xfb,0x94,
0xad,0x9b,0xac,0x1f,0xb5,0x11,0xb8,0xa6,0x34,0x98,0x89,0x30,0x91,0xfe,0x7d,0x32,
0xa0,0x73,0xc3,0xeb,0x11,0x8e,0xb3,0x6b,0xdd,0x20,0x3b,0x28,0x2e,0x72,0xd6,0x91,
0xe3,0x28,0x5e,0x67,0xe1,0x20,0x83,0x2f,0x1b,0xfa,0x25,0x10,0xc3,0x86,0x62,0xda,
0x62,0x64,0x51,0xca,0x2c,0x47,0x29,0xc1,0xff,0x00,0x00,0x00,0xff,0xff,0x03,0x00,
0xf1,0x18,0xdc,0x71,0x78,0xda,0xca,0x48,0xcd,0xc9,0xc9,0xcf,0x80,0x13,0x5c,0x00,
0x00,0x00,0x00,0xff,0xff,0x03,0x00,0x37,0xf7,0x06,0x47
};

enum enc {
    GZIP,
    BZIP2
};

static void verify(unsigned char *d, size_t s,
    void (*f1)(struct archive *, struct archive_entry *),
    void (*f2)(struct archive *, struct archive_entry *),
    enum enc etype)
{
	struct archive_entry *ae;
	struct archive *a;
	unsigned char *buff;
	int r;

	assert((a = archive_read_new()) != NULL);
	switch (etype) {
	case BZIP2:
		/* This is only check whether bzip is supported or not.
		 * This filter won't be used this test.  */
		if (ARCHIVE_OK != archive_read_support_compression_bzip2(a)) {
			skipping("Unsupported bzip2");
			assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
			return;
		}
		break;
	case GZIP:
		/* This gzip must be needed. archive_read_support_format_xar()
		 * will return a warning if gzip is unsupported. */
		break;
	}
	assertA(0 == archive_read_support_compression_all(a));
	r = archive_read_support_format_xar(a);
	if (r == ARCHIVE_WARN) {
		skipping("xar reading not fully supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
		return;
	}
	assert((buff = malloc(100000)) != NULL);
	if (buff == NULL)
		return;
	memcpy(buff, d, s);
	memset(buff + s, 0, 2048);

	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_open_memory(a, buff, s + 1024));
	assertA(0 == archive_read_next_header(a, &ae));
	assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_NONE);
	assertEqualInt(archive_format(a), ARCHIVE_FORMAT_XAR);
	/* Verify the only entry. */
	f1(a, ae);
	if (f2) {
		assertA(0 == archive_read_next_header(a, &ae));
		assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_NONE);
		assertEqualInt(archive_format(a), ARCHIVE_FORMAT_XAR);
		/* Verify the only entry. */
		f2(a, ae);
	}
	/* End of archive. */
	assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));

	assertA(0 == archive_read_close(a));
	assertA(0 == archive_read_finish(a));
	free(buff);
}

DEFINE_TEST(test_read_format_xar)
{
	verify(archive1, sizeof(archive1), verify0, verify1, GZIP);
	verify(archive2, sizeof(archive2), verify0, verify2, GZIP);
	verify(archive3, sizeof(archive3), verify3, NULL, GZIP);
	verify(archive4, sizeof(archive4), verify4, NULL, GZIP);
	verify(archive5, sizeof(archive5), verify5, NULL, GZIP);
	verify(archive6, sizeof(archive6), verify6, NULL, GZIP);
	verify(archive7, sizeof(archive7), verify7, NULL, GZIP);
	verify(archive8, sizeof(archive8), verify0, NULL, BZIP2);
	verify(archive9, sizeof(archive9), verify0, NULL, GZIP);
	verify(archive10, sizeof(archive10), verify0, NULL, GZIP);
	verify(archive11, sizeof(archive11), verify0, NULL, GZIP);
}


File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_large.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_position.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_truncated.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_filenames.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_ustar_filenames.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress_bzip2.c
/*-
 * Copyright (c) 2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_compress_bzip2.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * A basic exercise of bzip2 reading and writing.
 *
 * TODO: Add a reference file and make sure we can decompress that.
 */

DEFINE_TEST(test_write_compress_bzip2)
{
	struct archive_entry *ae;
	struct archive* a;
	char *buff, *data;
	size_t buffsize, datasize;
	char path[16];
	size_t used1, used2;
	int i, r;

	buffsize = 2000000;
	assert(NULL != (buff = (char *)malloc(buffsize)));

	datasize = 10000;
	assert(NULL != (data = (char *)malloc(datasize)));
	memset(data, 0, datasize);

	/*
	 * Write a 100 files and read them all back.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	r = archive_write_set_compression_bzip2(a);
	if (r == ARCHIVE_FATAL) {
		skipping("bzip2 writing not supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertEqualInt(ARCHIVE_COMPRESSION_BZIP2, archive_compression(a));
	assertEqualString("bzip2", archive_compression_name(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used1));
	assertEqualInt(ARCHIVE_COMPRESSION_BZIP2, archive_compression(a));
	assertEqualString("bzip2", archive_compression_name(a));
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_filetype(ae, AE_IFREG);
	archive_entry_set_size(ae, datasize);
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		archive_entry_copy_pathname(ae, path);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize
		    == (size_t)archive_write_data(a, data, datasize));
	}
	archive_entry_free(ae);
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	assertA(0 == archive_read_open_memory(a, buff, used1));
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		if (!assertEqualInt(0, archive_read_next_header(a, &ae)))
			break;
		assertEqualString(path, archive_entry_pathname(ae));
		assertEqualInt((int)datasize, archive_entry_size(ae));
	}
	assert(0 == archive_read_close(a));
	assert(0 == archive_read_finish(a));

	/*
	 * Repeat the cycle again, this time setting some compression
	 * options.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_bzip2(a));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "nonexistent-option=0"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=abc"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=99"));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=9"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize == (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Curiously, this test fails; the test data above compresses
	 * better at default compression than at level 9. */
	/*
	failure("compression-level=9 wrote %d bytes, default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 < used1);
	*/

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	assertA(0 == archive_read_open_memory(a, buff, used2));
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		if (!assertEqualInt(0, archive_read_next_header(a, &ae)))
			break;
		assertEqualString(path, archive_entry_pathname(ae));
		assertEqualInt((int)datasize, archive_entry_size(ae));
	}
	assert(0 == archive_read_close(a));
	assert(0 == archive_read_finish(a));

	/*
	 * Repeat again, with much lower compression.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_bzip2(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=1"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		failure("Writing file %s", path);
		assertEqualIntA(a, datasize,
		    (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Level 0 really does result in larger data. */
	failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 > used1);

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	assertA(0 == archive_read_open_memory(a, buff, used2));
	for (i = 0; i < 999; i++) {
		sprintf(path, "file%03d", i);
		if (!assertEqualInt(0, archive_read_next_header(a, &ae)))
			break;
		assertEqualString(path, archive_entry_pathname(ae));
		assertEqualInt((int)datasize, archive_entry_size(ae));
	}
	assert(0 == archive_read_close(a));
	assert(0 == archive_read_finish(a));

	/*
	 * Test various premature shutdown scenarios to make sure we
	 * don't crash or leak memory.
	 */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_bzip2(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_bzip2(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_bzip2(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_bzip2(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Clean up.
	 */
	free(data);
	free(buff);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress_gzip.c
/*-
 * Copyright (c) 2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_compress_gzip.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * A basic exercise of gzip reading and writing.
 *
 * TODO: Add a reference file and make sure we can decompress that.
 */

DEFINE_TEST(test_write_compress_gzip)
{
	struct archive_entry *ae;
	struct archive* a;
	char *buff, *data;
	size_t buffsize, datasize;
	char path[16];
	size_t used1, used2;
	int i, r;

	buffsize = 2000000;
	assert(NULL != (buff = (char *)malloc(buffsize)));

	datasize = 10000;
	assert(NULL != (data = (char *)malloc(datasize)));
	memset(data, 0, datasize);

	/*
	 * Write a 100 files and read them all back.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	r = archive_write_set_compression_gzip(a);
	if (r == ARCHIVE_FATAL) {
		skipping("gzip writing not supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertEqualInt(ARCHIVE_COMPRESSION_GZIP, archive_compression(a));
	assertEqualString("gzip", archive_compression_name(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used1));
	assertEqualInt(ARCHIVE_COMPRESSION_GZIP, archive_compression(a));
	assertEqualString("gzip", archive_compression_name(a));
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_filetype(ae, AE_IFREG);
	archive_entry_set_size(ae, datasize);
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		archive_entry_copy_pathname(ae, path);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize
		    == (size_t)archive_write_data(a, data, datasize));
	}
	archive_entry_free(ae);
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	r = archive_read_support_compression_gzip(a);
	if (r == ARCHIVE_WARN) {
		skipping("Can't verify gzip writing by reading back;"
		    " gzip reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used1));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat the cycle again, this time setting some compression
	 * options.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_gzip(a));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "nonexistent-option=0"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=abc"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=99"));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=9"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize == (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Curiously, this test fails; the test data above compresses
	 * better at default compression than at level 9. */
	/*
	failure("compression-level=9 wrote %d bytes, default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 < used1);
	*/

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	r = archive_read_support_compression_gzip(a);
	if (r == ARCHIVE_WARN) {
		skipping("gzip reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat again, with much lower compression.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_gzip(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=0"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		failure("Writing file %s", path);
		assertEqualIntA(a, datasize,
		    (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Level 0 really does result in larger data. */
	failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 > used1);

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	r = archive_read_support_compression_gzip(a);
	if (r == ARCHIVE_WARN) {
		skipping("gzip reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Test various premature shutdown scenarios to make sure we
	 * don't crash or leak memory.
	 */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_gzip(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_gzip(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_gzip(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_gzip(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Clean up.
	 */
	free(data);
	free(buff);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress_lzma.c
/*-
 * Copyright (c) 2007-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_compress_lzma.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * A basic exercise of lzma reading and writing.
 *
 */

DEFINE_TEST(test_write_compress_lzma)
{
	struct archive_entry *ae;
	struct archive* a;
	char *buff, *data;
	size_t buffsize, datasize;
	char path[16];
	size_t used1, used2;
	int i, r;

	buffsize = 2000000;
	assert(NULL != (buff = (char *)malloc(buffsize)));

	datasize = 10000;
	assert(NULL != (data = (char *)malloc(datasize)));
	memset(data, 0, datasize);

	/*
	 * Write a 100 files and read them all back.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	r = archive_write_set_compression_lzma(a);
	if (r == ARCHIVE_FATAL) {
		skipping("lzma writing not supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertEqualInt(ARCHIVE_COMPRESSION_LZMA, archive_compression(a));
	assertEqualString("lzma", archive_compression_name(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used1));
	assertEqualInt(ARCHIVE_COMPRESSION_LZMA, archive_compression(a));
	assertEqualString("lzma", archive_compression_name(a));
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_filetype(ae, AE_IFREG);
	archive_entry_set_size(ae, datasize);
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		archive_entry_copy_pathname(ae, path);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize
		    == (size_t)archive_write_data(a, data, datasize));
	}
	archive_entry_free(ae);
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("Can't verify lzma writing by reading back;"
		    " lzma reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used1));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat the cycle again, this time setting some compression
	 * options.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_lzma(a));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "nonexistent-option=0"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=abc"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=99"));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=9"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize == (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));


	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			failure("Trying to read %s", path);
			if (!assertEqualIntA(a, ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat again, with much lower compression.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_lzma(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=0"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		failure("Writing file %s", path);
		assertEqualIntA(a, datasize,
		    (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Level 0 really does result in larger data. */
	failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 > used1);

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	r = archive_read_support_compression_lzma(a);
	if (r == ARCHIVE_WARN) {
		skipping("lzma reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Test various premature shutdown scenarios to make sure we
	 * don't crash or leak memory.
	 */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_lzma(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_lzma(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_lzma(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_lzma(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Clean up.
	 */
	free(data);
	free(buff);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress_program.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_compress_xz.c
/*-
 * Copyright (c) 2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_compress_xz.c 191183 2009-04-17 01:06:31Z kientzle $");

/*
 * A basic exercise of xz reading and writing.
 *
 * TODO: Add a reference file and make sure we can decompress that.
 */

DEFINE_TEST(test_write_compress_xz)
{
	struct archive_entry *ae;
	struct archive* a;
	char *buff, *data;
	size_t buffsize, datasize;
	char path[16];
	size_t used1, used2;
	int i, r;

	buffsize = 2000000;
	assert(NULL != (buff = (char *)malloc(buffsize)));

	datasize = 10000;
	assert(NULL != (data = (char *)malloc(datasize)));
	memset(data, 0, datasize);

	/*
	 * Write a 100 files and read them all back.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	r = archive_write_set_compression_xz(a);
	if (r == ARCHIVE_FATAL) {
		skipping("xz writing not supported on this platform");
		assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
		return;
	}
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertEqualInt(ARCHIVE_COMPRESSION_XZ, archive_compression(a));
	assertEqualString("xz", archive_compression_name(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used1));
	assertEqualInt(ARCHIVE_COMPRESSION_XZ, archive_compression(a));
	assertEqualString("xz", archive_compression_name(a));
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_filetype(ae, AE_IFREG);
	archive_entry_set_size(ae, datasize);
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		archive_entry_copy_pathname(ae, path);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize
		    == (size_t)archive_write_data(a, data, datasize));
	}
	archive_entry_free(ae);
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("Can't verify xz writing by reading back;"
		    " xz reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used1));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat the cycle again, this time setting some compression
	 * options.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_xz(a));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "nonexistent-option=0"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=abc"));
	assertEqualIntA(a, ARCHIVE_WARN,
	    archive_write_set_compressor_options(a, "compression-level=99"));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=9"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		assertA(datasize == (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Curiously, this test fails; the test data above compresses
	 * better at default compression than at level 9. */
	/*
	failure("compression-level=9 wrote %d bytes, default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 < used1);
	*/

	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("xz reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_support_compression_all(a));
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			failure("Trying to read %s", path);
			if (!assertEqualIntA(a, ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Repeat again, with much lower compression.
	 */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_bytes_per_block(a, 10));
	assertA(0 == archive_write_set_compression_xz(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_compressor_options(a, "compression-level=0"));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	for (i = 0; i < 100; i++) {
		sprintf(path, "file%03d", i);
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_copy_pathname(ae, path);
		archive_entry_set_size(ae, datasize);
		archive_entry_set_filetype(ae, AE_IFREG);
		assertA(0 == archive_write_header(a, ae));
		failure("Writing file %s", path);
		assertEqualIntA(a, datasize,
		    (size_t)archive_write_data(a, data, datasize));
		archive_entry_free(ae);
	}
	archive_write_close(a);
	assert(0 == archive_write_finish(a));

	/* Level 0 really does result in larger data. */
	failure("Compression-level=0 wrote %d bytes; default wrote %d bytes",
	    (int)used2, (int)used1);
	assert(used2 > used1);

	assert((a = archive_read_new()) != NULL);
	assertA(0 == archive_read_support_format_all(a));
	assertA(0 == archive_read_support_compression_all(a));
	r = archive_read_support_compression_xz(a);
	if (r == ARCHIVE_WARN) {
		skipping("xz reading not fully supported on this platform");
	} else {
		assertEqualIntA(a, ARCHIVE_OK,
		    archive_read_open_memory(a, buff, used2));
		for (i = 0; i < 100; i++) {
			sprintf(path, "file%03d", i);
			if (!assertEqualInt(ARCHIVE_OK,
				archive_read_next_header(a, &ae)))
				break;
			assertEqualString(path, archive_entry_pathname(ae));
			assertEqualInt((int)datasize, archive_entry_size(ae));
		}
		assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	}
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));

	/*
	 * Test various premature shutdown scenarios to make sure we
	 * don't crash or leak memory.
	 */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_xz(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_xz(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_xz(a));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_xz(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used2));
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Clean up.
	 */
	free(data);
	free(buff);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_failures.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_disk_failures.c 201247 2009-12-30 05:59:21Z kientzle $");

#if ARCHIVE_VERSION_NUMBER >= 1009000

#define UMASK 022


#endif

DEFINE_TEST(test_write_disk_failures)
{
#if ARCHIVE_VERSION_NUMBER < 1009000 || (defined(_WIN32) && !defined(__CYGWIN__))
	skipping("archive_write_disk interface");
#else
	struct archive_entry *ae;
	struct archive *a;
	int fd;

	/* Force the umask to something predictable. */
	assertUmask(UMASK);

	/* A directory that we can't write to. */
	assertMakeDir("dir", 0555);

	/* Can we? */
	fd = open("dir/testfile", O_WRONLY | O_CREAT | O_BINARY, 0777);
	if (fd >= 0) {
	  /* Apparently, we can, so the test below won't work. */
	  close(fd);
	  skipping("Can't test writing to non-writable directory");
	  return;
	}

	/* Try to extract a regular file into the directory above. */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "dir/file");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assert((a = archive_write_disk_new()) != NULL);
        archive_write_disk_set_options(a, ARCHIVE_EXTRACT_TIME);
	archive_entry_set_mtime(ae, 123456789, 0);
	assertEqualIntA(a, ARCHIVE_FAILED, archive_write_header(a, ae));
	assertEqualIntA(a, 0, archive_write_finish_entry(a));
	assertEqualInt(0, archive_write_finish(a));
	archive_entry_free(ae);
#endif
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_secure.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_sparse.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_disk_sparse.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Write a file using archive_write_data call, read the file
 * back and verify the contents.  The data written includes large
 * blocks of nulls, so it should exercise the sparsification logic
 * if ARCHIVE_EXTRACT_SPARSE is enabled.
 */
static void
verify_write_data(struct archive *a, int sparse)
{
	static const char data[]="abcdefghijklmnopqrstuvwxyz";
	struct stat st;
	struct archive_entry *ae;
	size_t buff_size = 64 * 1024;
	char *buff, *p;
	const char *msg = sparse ? "sparse" : "non-sparse";
	FILE *f;

	buff = malloc(buff_size);
	assert(buff != NULL);

	ae = archive_entry_new();
	assert(ae != NULL);
	archive_entry_set_size(ae, 8 * buff_size);
	archive_entry_set_pathname(ae, "test_write_data");
	archive_entry_set_mode(ae, AE_IFREG | 0755);
	assertEqualIntA(a, 0, archive_write_header(a, ae));

	/* Use archive_write_data() to write three relatively sparse blocks. */

	/* First has non-null data at beginning. */
	memset(buff, 0, buff_size);
	memcpy(buff, data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(buff_size, archive_write_data(a, buff, buff_size));

	/* Second has non-null data in the middle. */
	memset(buff, 0, buff_size);
	memcpy(buff + buff_size / 2 - 3, data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(buff_size, archive_write_data(a, buff, buff_size));

	/* Third has non-null data at the end. */
	memset(buff, 0, buff_size);
	memcpy(buff + buff_size - sizeof(data), data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(buff_size, archive_write_data(a, buff, buff_size));

	failure("%s", msg);
	assertEqualIntA(a, 0, archive_write_finish_entry(a));

	/* Test the entry on disk. */
	assert(0 == stat(archive_entry_pathname(ae), &st));
        assertEqualInt(st.st_size, 8 * buff_size);
	f = fopen(archive_entry_pathname(ae), "rb");
	if (!assert(f != NULL))
		return;

	/* Check first block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	failure("%s", msg);
	assertEqualMem(buff, data, sizeof(data));
	for (p = buff + sizeof(data); p < buff + buff_size; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}

	/* Check second block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	for (p = buff; p < buff + buff_size; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (p == buff + buff_size / 2 - 3) {
			assertEqualMem(p, data, sizeof(data));
			p += sizeof(data);
		} else if (!assertEqualInt(0, *p))
			break;
	}

	/* Check third block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	for (p = buff; p < buff + buff_size - sizeof(data); ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}
	failure("%s", msg);
	assertEqualMem(buff + buff_size - sizeof(data), data, sizeof(data));

	/* XXX more XXX */

	assertEqualInt(0, fclose(f));
	archive_entry_free(ae);
	free(buff);
}

/*
 * As above, but using the archive_write_data_block() call.
 */
static void
verify_write_data_block(struct archive *a, int sparse)
{
	static const char data[]="abcdefghijklmnopqrstuvwxyz";
	struct stat st;
	struct archive_entry *ae;
	size_t buff_size = 64 * 1024;
	char *buff, *p;
	const char *msg = sparse ? "sparse" : "non-sparse";
	FILE *f;

	buff = malloc(buff_size);
	assert(buff != NULL);

	ae = archive_entry_new();
	assert(ae != NULL);
	archive_entry_set_size(ae, 8 * buff_size);
	archive_entry_set_pathname(ae, "test_write_data_block");
	archive_entry_set_mode(ae, AE_IFREG | 0755);
	assertEqualIntA(a, 0, archive_write_header(a, ae));

	/* Use archive_write_data_block() to write three
	   relatively sparse blocks. */

	/* First has non-null data at beginning. */
	memset(buff, 0, buff_size);
	memcpy(buff, data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(ARCHIVE_OK,
	    archive_write_data_block(a, buff, buff_size, 100));

	/* Second has non-null data in the middle. */
	memset(buff, 0, buff_size);
	memcpy(buff + buff_size / 2 - 3, data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(ARCHIVE_OK,
	    archive_write_data_block(a, buff, buff_size, buff_size + 200));

	/* Third has non-null data at the end. */
	memset(buff, 0, buff_size);
	memcpy(buff + buff_size - sizeof(data), data, sizeof(data));
	failure("%s", msg);
	assertEqualInt(ARCHIVE_OK,
	    archive_write_data_block(a, buff, buff_size, buff_size * 2 + 300));

	failure("%s", msg);
	assertEqualIntA(a, 0, archive_write_finish_entry(a));

	/* Test the entry on disk. */
	assert(0 == stat(archive_entry_pathname(ae), &st));
        assertEqualInt(st.st_size, 8 * buff_size);
	f = fopen(archive_entry_pathname(ae), "rb");
	if (!assert(f != NULL))
		return;

	/* Check 100-byte gap at beginning */
	assertEqualInt(100, fread(buff, 1, 100, f));
	failure("%s", msg);
	for (p = buff; p < buff + 100; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}

	/* Check first block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	failure("%s", msg);
	assertEqualMem(buff, data, sizeof(data));
	for (p = buff + sizeof(data); p < buff + buff_size; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}

	/* Check 100-byte gap */
	assertEqualInt(100, fread(buff, 1, 100, f));
	failure("%s", msg);
	for (p = buff; p < buff + 100; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}

	/* Check second block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	for (p = buff; p < buff + buff_size; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (p == buff + buff_size / 2 - 3) {
			assertEqualMem(p, data, sizeof(data));
			p += sizeof(data);
		} else if (!assertEqualInt(0, *p))
			break;
	}

	/* Check 100-byte gap */
	assertEqualInt(100, fread(buff, 1, 100, f));
	failure("%s", msg);
	for (p = buff; p < buff + 100; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}

	/* Check third block. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	for (p = buff; p < buff + buff_size - sizeof(data); ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}
	failure("%s", msg);
	assertEqualMem(buff + buff_size - sizeof(data), data, sizeof(data));

	/* Check another block size beyond last we wrote. */
	assertEqualInt(buff_size, fread(buff, 1, buff_size, f));
	failure("%s", msg);
	for (p = buff; p < buff + buff_size; ++p) {
		failure("offset: %d, %s", (int)(p - buff), msg);
		if (!assertEqualInt(0, *p))
			break;
	}


	/* XXX more XXX */

	assertEqualInt(0, fclose(f));
	free(buff);
	archive_entry_free(ae);
}

DEFINE_TEST(test_write_disk_sparse)
{
	struct archive *ad;


	/*
	 * The return values, etc, of the write data functions
	 * shouldn't change regardless of whether we've requested
	 * sparsification.  (The performance and pattern of actual
	 * write calls to the disk should vary, of course, but the
	 * client program shouldn't see any difference.)
	 */
	assert((ad = archive_write_disk_new()) != NULL);
        archive_write_disk_set_options(ad, 0);
	verify_write_data(ad, 0);
	verify_write_data_block(ad, 0);
	assertEqualInt(0, archive_write_finish(ad));

	assert((ad = archive_write_disk_new()) != NULL);
        archive_write_disk_set_options(ad, ARCHIVE_EXTRACT_SPARSE);
	verify_write_data(ad, 1);
	verify_write_data_block(ad, 1);
	assertEqualInt(0, archive_write_finish(ad));

}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_symlink.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_disk_symlink.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Exercise symlink recreation.
 */
DEFINE_TEST(test_write_disk_symlink)
{
	static const char data[]="abcdefghijklmnopqrstuvwxyz";
	struct archive *ad;
	struct archive_entry *ae;
	int r;

	if (!canSymlink()) {
		skipping("Symlinks not supported");
		return;
	}

	/* Write entries to disk. */
	assert((ad = archive_write_disk_new()) != NULL);

	/*
	 * First, create a regular file then a symlink to that file.
	 */

	/* Regular file: link1a */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "link1a");
	archive_entry_set_mode(ae, AE_IFREG | 0755);
	archive_entry_set_size(ae, sizeof(data));
	assertEqualIntA(ad, 0, archive_write_header(ad, ae));
	assertEqualInt(sizeof(data),
	    archive_write_data(ad, data, sizeof(data)));
	assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
	archive_entry_free(ae);

	/* Symbolic Link: link1b -> link1a */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "link1b");
	archive_entry_set_mode(ae, AE_IFLNK | 0642);
	archive_entry_set_size(ae, 0);
	archive_entry_copy_symlink(ae, "link1a");
	assertEqualIntA(ad, 0, r = archive_write_header(ad, ae));
	if (r >= ARCHIVE_WARN)
		assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
	archive_entry_free(ae);

	/*
	 * We should be able to do this in the other order as well,
	 * of course.
	 */

	/* Symbolic link: link2b -> link2a */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "link2b");
	archive_entry_set_mode(ae, AE_IFLNK | 0642);
	archive_entry_unset_size(ae);
	archive_entry_copy_symlink(ae, "link2a");
	assertEqualIntA(ad, 0, r = archive_write_header(ad, ae));
	if (r >= ARCHIVE_WARN) {
		assertEqualInt(ARCHIVE_WARN,
		    archive_write_data(ad, data, sizeof(data)));
		assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
	}
	archive_entry_free(ae);

	/* File: link2a */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "link2a");
	archive_entry_set_mode(ae, AE_IFREG | 0755);
	archive_entry_set_size(ae, sizeof(data));
	assertEqualIntA(ad, 0, archive_write_header(ad, ae));
	assertEqualInt(sizeof(data),
	    archive_write_data(ad, data, sizeof(data)));
	assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
	archive_entry_free(ae);

	assertEqualInt(ARCHIVE_OK, archive_write_finish(ad));

	/* Test the entries on disk. */

	/* Test #1 */
	assertIsReg("link1a", -1);
	assertFileSize("link1a", sizeof(data));
	assertFileNLinks("link1a", 1);
	assertIsSymlink("link1b", "link1a");

	/* Test #2: Should produce identical results to test #1 */
	assertIsReg("link2a", -1);
	assertFileSize("link2a", sizeof(data));
	assertFileNLinks("link2a", 1);
	assertIsSymlink("link2b", "link2a");
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_disk_times.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_disk_times.c 201247 2009-12-30 05:59:21Z kientzle $");

/*
 * Exercise time restores in archive_write_disk(), including
 * correct handling of omitted time values.
 * On FreeBSD, we also test birthtime and high-res time restores.
 */

DEFINE_TEST(test_write_disk_times)
{
	struct archive *a;
	struct archive_entry *ae;

	/* Create an archive_write_disk object. */
	assert((a = archive_write_disk_new()) != NULL);
	assertEqualInt(ARCHIVE_OK,
	    archive_write_disk_set_options(a, ARCHIVE_EXTRACT_TIME));

	/*
	 * Easy case: mtime and atime both specified.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file1");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_atime(ae, 123456, 0);
	archive_entry_set_mtime(ae, 234567, 0);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify */
	assertFileAtime("file1", 123456, 0);
	assertFileMtime("file1", 234567, 0);

	/*
	 * mtime specified, but not atime
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file2");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_mtime(ae, 234567, 0);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	assertFileMtime("file2", 234567, 0);
	assertFileAtimeRecent("file2");

	/*
	 * atime specified, but not mtime
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file3");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_atime(ae, 345678, 0);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify: Current mtime and atime as specified. */
	assertFileAtime("file3", 345678, 0);
	assertFileMtimeRecent("file3");

	/*
	 * Neither atime nor mtime specified.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file4");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify: Current mtime and atime. */
	assertFileAtimeRecent("file4");
	assertFileMtimeRecent("file4");

#if defined(__FreeBSD__)
	/*
	 * High-res mtime and atime on FreeBSD.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file10");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_atime(ae, 1234567, 23456);
	archive_entry_set_mtime(ae, 2345678, 4567);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify */
	assertFileMtime("file10", 2345678, 4567);
	assertFileAtime("file10", 1234567, 23456);

	/*
	 * Birthtime, mtime and atime on FreeBSD
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file11");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_atime(ae, 1234567, 23456);
	archive_entry_set_birthtime(ae, 3456789, 12345);
	/* mtime must be later than birthtime! */
	archive_entry_set_mtime(ae, 12345678, 4567);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify */
	assertFileAtime("file11", 1234567, 23456);
	assertFileBirthtime("file11", 3456789, 12345);
	assertFileMtime("file11", 12345678, 4567);

	/*
	 * Birthtime only on FreeBSD.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file12");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_birthtime(ae, 3456789, 12345);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify */
	assertFileAtimeRecent("file12");
	assertFileBirthtime("file12", 3456789, 12345);
	assertFileMtimeRecent("file12");

	/*
	 * mtime only on FreeBSD.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_copy_pathname(ae, "file13");
	archive_entry_set_mode(ae, S_IFREG | 0777);
	archive_entry_set_mtime(ae, 4567890, 23456);
	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	assertEqualInt(ARCHIVE_OK, archive_write_finish_entry(a));
	archive_entry_free(ae);
	/* Verify */
	assertFileAtimeRecent("file13");
	assertFileBirthtime("file13", 4567890, 23456);
	assertFileMtime("file13", 4567890, 23456);
#else
	skipping("Platform-specific time restore tests");
#endif

	archive_write_finish(a);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_ar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_odc.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_cpio_newc.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_mtree.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_format_mtree.c 191183 2009-04-17 01:06:31Z kientzle $");

static char buff[4096];
static struct {
	const char	*path;
	mode_t		 mode;
	time_t		 mtime;
	uid_t	 	 uid;
	gid_t		 gid;
} entries[] = {
	{ "./Makefile", 	S_IFREG | 0644, 1233041050, 1001, 1001 },
	{ "./NEWS", 		S_IFREG | 0644, 1231975636, 1001, 1001 },
	{ "./PROJECTS", 	S_IFREG | 0644, 1231975636, 1001, 1001 },
	{ "./README",		S_IFREG | 0644, 1231975636, 1001, 1001 },
	{ "./COPYING",		S_IFREG | 0644, 1231975636, 1001, 1001 },
	{ "./subdir",		S_IFDIR | 0755, 1233504586, 1001, 1001 },
	{ "./subdir/README",	S_IFREG | 0664, 1231975636, 1002, 1001 },
	{ "./subdir/config",	S_IFREG | 0664, 1232266273, 1003, 1003 },
	{ "./subdir2",		S_IFDIR | 0755, 1233504586, 1001, 1001 },
	{ "./subdir3",		S_IFDIR | 0755, 1233504586, 1001, 1001 },
	{ "./subdir3/mtree",	S_IFREG | 0664, 1232266273, 1003, 1003 },
	{ NULL, 0, 0, 0, 0 }
};

static void
test_write_format_mtree_sub(int use_set, int dironly)
{
	struct archive_entry *ae;
	struct archive* a;
	size_t used;
	int i;

	/* Create a mtree format archive. */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_mtree(a));
	if (use_set)
		assertA(0 == archive_write_set_options(a, "use-set"));
	if (dironly)
		assertA(0 == archive_write_set_options(a, "dironly"));
	assertA(0 == archive_write_open_memory(a, buff, sizeof(buff)-1, &used));

	/* Write entries */
	for (i = 0; entries[i].path != NULL; i++) {
		assert((ae = archive_entry_new()) != NULL);
		archive_entry_set_mtime(ae, entries[i].mtime, 0);
		assert(entries[i].mtime == archive_entry_mtime(ae));
		archive_entry_set_mode(ae, entries[i].mode);
		assert(entries[i].mode == archive_entry_mode(ae));
		archive_entry_set_uid(ae, entries[i].uid);
		assert(entries[i].uid == archive_entry_uid(ae));
		archive_entry_set_gid(ae, entries[i].gid);
		assert(entries[i].gid == archive_entry_gid(ae));
		archive_entry_copy_pathname(ae, entries[i].path);
		if ((entries[i].mode & AE_IFMT) != S_IFDIR)
			archive_entry_set_size(ae, 8);
		assertA(0 == archive_write_header(a, ae));
		if ((entries[i].mode & AE_IFMT) != S_IFDIR)
			assertA(8 == archive_write_data(a, "Hello012", 15));
		archive_entry_free(ae);
	}
	archive_write_close(a);
#if ARCHIVE_VERSION_NUMBER < 2000000
        archive_write_finish(a);
#else
        assertEqualInt(0, archive_write_finish(a));
#endif
	if (use_set) {
		const char *p;

		buff[used] = '\0';
		assert(NULL != (p = strstr(buff, "\n/set ")));
		if (p != NULL) {
			char *r;
			const char *o;
			p++;
			r = strchr(p, '\n');
			if (r != NULL)
				*r = '\0';
			if (dironly)
				o = "/set type=dir uid=1001 gid=1001 mode=755";
			else
				o = "/set type=file uid=1001 gid=1001 mode=644";
			assertEqualString(o, p);
			if (r != NULL)
				*r = '\n';
		}
	}

	/*
	 * Read the data and check it.
	 */
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_open_memory(a, buff, used));

	/* Read entries */
	for (i = 0; entries[i].path != NULL; i++) {
		if (dironly && (entries[i].mode & AE_IFMT) != S_IFDIR)
			continue;
		assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
		assertEqualInt(entries[i].mtime, archive_entry_mtime(ae));
		assertEqualInt(entries[i].mode, archive_entry_mode(ae));
		assertEqualInt(entries[i].uid, archive_entry_uid(ae));
		assertEqualInt(entries[i].gid, archive_entry_gid(ae));
		assertEqualString(entries[i].path, archive_entry_pathname(ae));
		if ((entries[i].mode & AE_IFMT) != S_IFDIR)
			assertEqualInt(8, archive_entry_size(ae));
	}
	assertEqualIntA(a, 0, archive_read_close(a));
#if ARCHIVE_VERSION_NUMBER < 2000000
	archive_read_finish(a);
#else
	assertEqualInt(0, archive_read_finish(a));
#endif
}

DEFINE_TEST(test_write_format_mtree)
{
	/* Default setting */
	test_write_format_mtree_sub(0, 0);
	/* Directory only */
	test_write_format_mtree_sub(0, 1);
	/* Use /set keyword */
	test_write_format_mtree_sub(1, 0);
	/* Use /set keyword with directory only */
	test_write_format_mtree_sub(1, 1);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_pax.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

char buff2[64];

DEFINE_TEST(test_write_format_pax)
{
	size_t buffsize = 1000000;
	char *buff;
	struct archive_entry *ae;
	struct archive *a;
	size_t used;

	buff = malloc(buffsize); /* million bytes of work area */
	assert(buff != NULL);

	/* Create a new archive in memory. */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_pax(a));
	assertA(0 == archive_write_set_compression_none(a));
	assertA(0 == archive_write_open_memory(a, buff, buffsize, &used));

	/*
	 * "file" has a bunch of attributes and 8 bytes of data.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_atime(ae, 2, 20);
	archive_entry_set_birthtime(ae, 3, 30);
	archive_entry_set_ctime(ae, 4, 40);
	archive_entry_set_mtime(ae, 5, 50);
	archive_entry_copy_pathname(ae, "file");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));

	/*
	 * "file2" is similar but has birthtime later than mtime.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_atime(ae, 2, 20);
	archive_entry_set_birthtime(ae, 8, 80);
	archive_entry_set_ctime(ae, 4, 40);
	archive_entry_set_mtime(ae, 5, 50);
	archive_entry_copy_pathname(ae, "file2");
	archive_entry_set_mode(ae, S_IFREG | 0755);
	archive_entry_set_size(ae, 8);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));

	/*
	 * XXX TODO XXX Archive directory, other file types.
	 * Archive extended attributes, ACLs, other metadata.
	 * Verify they get read back correctly.
	 */

	/* Close out the archive. */
	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_finish(a));

	/*
	 *
	 * Now, read the data back.
	 *
	 */
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, 0, archive_read_support_format_all(a));
	assertEqualIntA(a, 0, archive_read_support_compression_all(a));
	assertEqualIntA(a, 0, archive_read_open_memory(a, buff, used));

	/*
	 * Read "file"
	 */
	assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
	assertEqualInt(2, archive_entry_atime(ae));
	assertEqualInt(20, archive_entry_atime_nsec(ae));
	assertEqualInt(3, archive_entry_birthtime(ae));
	assertEqualInt(30, archive_entry_birthtime_nsec(ae));
	assertEqualInt(4, archive_entry_ctime(ae));
	assertEqualInt(40, archive_entry_ctime_nsec(ae));
	assertEqualInt(5, archive_entry_mtime(ae));
	assertEqualInt(50, archive_entry_mtime_nsec(ae));
	assertEqualString("file", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(8, archive_entry_size(ae));
	assertEqualIntA(a, 8, archive_read_data(a, buff2, 10));
	assertEqualMem(buff2, "12345678", 8);

	/*
	 * Read "file2"
	 */
	assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
	assert(archive_entry_atime_is_set(ae));
	assertEqualInt(2, archive_entry_atime(ae));
	assertEqualInt(20, archive_entry_atime_nsec(ae));
	/* Birthtime > mtime above, so it doesn't get stored at all. */
	assert(!archive_entry_birthtime_is_set(ae));
	assertEqualInt(0, archive_entry_birthtime(ae));
	assertEqualInt(0, archive_entry_birthtime_nsec(ae));
	assert(archive_entry_ctime_is_set(ae));
	assertEqualInt(4, archive_entry_ctime(ae));
	assertEqualInt(40, archive_entry_ctime_nsec(ae));
	assert(archive_entry_mtime_is_set(ae));
	assertEqualInt(5, archive_entry_mtime(ae));
	assertEqualInt(50, archive_entry_mtime_nsec(ae));
	assertEqualString("file2", archive_entry_pathname(ae));
	assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(8, archive_entry_size(ae));
	assertEqualIntA(a, 8, archive_read_data(a, buff2, 10));
	assertEqualMem(buff2, "12345678", 8);

	/*
	 * Verify the end of the archive.
	 */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
	assertEqualIntA(a, ARCHIVE_OK, archive_read_finish(a));

	free(buff);
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar_empty.c

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * Copyright (c) 2008 Anselm Strauss
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Development supported by Google Summer of Code 2008.
 */

/* TODO: reader does not yet restore permissions. */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_format_zip.c 201247 2009-12-30 05:59:21Z kientzle $");

DEFINE_TEST(test_write_format_zip)
{
	char filedata[64];
	struct archive_entry *ae;
	struct archive *a;
	size_t used;
	size_t buffsize = 1000000;
	char *buff;
	const char *compression_type;

	buff = malloc(buffsize);

	/* Create a new archive in memory. */
	assert((a = archive_write_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a));
#ifdef HAVE_ZLIB_H
	compression_type = "zip:compression=deflate";
#else
	compression_type = "zip:compression=store";
#endif
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_set_format_options(a, compression_type));
	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_compression_none(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_write_open_memory(a, buff, buffsize, &used));

	/*
	 * Write a file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 1, 10);
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(10, archive_entry_mtime_nsec(ae));
	archive_entry_copy_pathname(ae, "file");
	assertEqualString("file", archive_entry_pathname(ae));
	archive_entry_set_mode(ae, S_IFREG | 0755);
	assertEqualInt((S_IFREG | 0755), archive_entry_mode(ae));
	archive_entry_set_size(ae, 8);

	assertEqualInt(0, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualInt(8, archive_write_data(a, "12345678", 9));
	assertEqualInt(0, archive_write_data(a, "1", 1));

	/*
	 * Write another file to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 1, 10);
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(10, archive_entry_mtime_nsec(ae));
	archive_entry_copy_pathname(ae, "file2");
	assertEqualString("file2", archive_entry_pathname(ae));
	archive_entry_set_mode(ae, S_IFREG | 0755);
	assertEqualInt((S_IFREG | 0755), archive_entry_mode(ae));
	archive_entry_set_size(ae, 4);

	assertEqualInt(ARCHIVE_OK, archive_write_header(a, ae));
	archive_entry_free(ae);
	assertEqualInt(4, archive_write_data(a, "1234", 5));

	/*
	 * Write a directory to it.
	 */
	assert((ae = archive_entry_new()) != NULL);
	archive_entry_set_mtime(ae, 11, 110);
	archive_entry_copy_pathname(ae, "dir");
	archive_entry_set_mode(ae, S_IFDIR | 0755);
	archive_entry_set_size(ae, 512);

	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
	failure("size should be zero so that applications know not to write");
	assertEqualInt(0, archive_entry_size(ae));
	archive_entry_free(ae);
	assertEqualIntA(a, 0, archive_write_data(a, "12345678", 9));

	/* Close out the archive. */
	assertEqualInt(ARCHIVE_OK, archive_write_close(a));
	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));

	/*
	 * Now, read the data back.
	 */
	ae = NULL;
	assert((a = archive_read_new()) != NULL);
	assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_support_compression_all(a));
	assertEqualIntA(a, ARCHIVE_OK,
	    archive_read_open_memory(a, buff, used));

	/*
	 * Read and verify first file.
	 */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(1, archive_entry_mtime(ae));
	/* Zip doesn't store high-resolution mtime. */
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("file", archive_entry_pathname(ae));
	//assertEqualInt((S_IFREG | 0755), archive_entry_mode(ae));
	assertEqualInt(0, archive_entry_size(ae));
	assertEqualIntA(a, 8,
	    archive_read_data(a, filedata, sizeof(filedata)));
	assertEqualMem(filedata, "12345678", 8);


	/*
	 * Read the second file back.
	 */
	if (!assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae))){
		free(buff);
		return;
	}
	assertEqualInt(1, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("file2", archive_entry_pathname(ae));
	//assert((S_IFREG | 0755) == archive_entry_mode(ae));
	assertEqualInt(0, archive_entry_size(ae));
	assertEqualIntA(a, 4,
	    archive_read_data(a, filedata, sizeof(filedata)));
	assertEqualMem(filedata, "1234", 4);

	/*
	 * Read the dir entry back.
	 */
	assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
	assertEqualInt(11, archive_entry_mtime(ae));
	assertEqualInt(0, archive_entry_mtime_nsec(ae));
	assertEqualInt(0, archive_entry_atime(ae));
	assertEqualInt(0, archive_entry_ctime(ae));
	assertEqualString("dir/", archive_entry_pathname(ae));
	//assertEqualInt((S_IFDIR | 0755), archive_entry_mode(ae));
	assertEqualInt(0, archive_entry_size(ae));
	assertEqualIntA(a, 0, archive_read_data(a, filedata, 10));

	/* Verify the end of the archive. */
	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
	assertEqualInt(ARCHIVE_OK, archive_read_close(a));
	assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
	free(buff);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_empty.c
/*-
 * Copyright (c) 2008 Anselm Strauss
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Development supported by Google Summer of Code 2008.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_format_zip_empty.c 201247 2009-12-30 05:59:21Z kientzle $");

DEFINE_TEST(test_write_format_zip_empty)
{
	struct archive *a;
	char buff[256];
	size_t used;

	/* Zip format: Create a new archive in memory. */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_zip(a));
	assertA(0 == archive_write_set_compression_none(a));
	assertA(0 == archive_write_set_bytes_per_block(a, 1));
	assertA(0 == archive_write_set_bytes_in_last_block(a, 1));
	assertA(0 == archive_write_open_memory(a, buff, sizeof(buff), &used));

	/* Close out the archive without writing anything. */
	assertA(0 == archive_write_close(a));
	assertA(0 == archive_write_finish(a));

	/* Verify the correct format for an empy Zip archive. */
	assertEqualInt(used, 22);
	assertEqualMem(buff,
	    "PK\005\006\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
	    22);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/Attic/test_write_format_zip_no_compression.c
/*-
 * Copyright (c) 2008 Anselm Strauss
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Development supported by Google Summer of Code 2008.
 */

#include "test.h"
__FBSDID("$FreeBSD: head/lib/libarchive/test/test_write_format_zip_no_compression.c 201247 2009-12-30 05:59:21Z kientzle $");

static unsigned long
bitcrc32(unsigned long c, void *_p, size_t s)
{
	/* This is a drop-in replacement for crc32() from zlib.
	 * Libarchive should be able to correctly generate
	 * uncompressed zip archives (including correct CRCs) even
	 * when zlib is unavailable, and this function helps us verify
	 * that.  Yes, this is very, very slow and unsuitable for
	 * production use, but it's correct, compact, and works well
	 * enough for this particular usage.  Libarchive internally
	 * uses a much more efficient implementation.  */
	const unsigned char *p = _p;
	int bitctr;

	if (p == NULL)
		return (0);

	for (; s > 0; --s) {
		c ^= *p++;
		for (bitctr = 8; bitctr > 0; --bitctr) {
			if (c & 1) c = (c >> 1);
			else	   c = (c >> 1) ^ 0xedb88320;
			c ^= 0x80000000;
		}
	}
	return (c);
}

/* Quick and dirty: Read 2-byte and 4-byte integers from Zip file. */
static int i2(const char *p) { return ((p[0] & 0xff) | ((p[1] & 0xff) << 8)); }
static int i4(const char *p) { return (i2(p) | (i2(p + 2) << 16)); }

DEFINE_TEST(test_write_format_zip_no_compression)
{
	/* Buffer data */
	struct archive *a;
	struct archive_entry *entry;
	char buff[100000];
	const char *buffend;
	/* p is the pointer to walk over the central directory,
	 * q walks over the local headers, the data and the data descriptors. */
	const char *p, *q;
	size_t used;

	/* File data */
	char file_name[] = "file";
	char file_data1[] = {'1', '2', '3', '4', '5'};
	char file_data2[] = {'6', '7', '8', '9', '0'};
	int file_perm = 00644;
	short file_uid = 10;
	short file_gid = 20;

	/* Folder data */
	char folder_name[] = "folder/";
	int folder_perm = 00755;
	short folder_uid = 30;
	short folder_gid = 40;

	/* Time data */
	time_t t = time(NULL);
	struct tm *tm = localtime(&t);

	/* Misc variables */
	unsigned long crc;

	/* Create new ZIP archive in memory without padding. */
	assert((a = archive_write_new()) != NULL);
	assertA(0 == archive_write_set_format_zip(a));
	assertA(0 == archive_write_set_format_options(a, "zip:compression=store"));
	assertA(0 == archive_write_set_compression_none(a));
	assertA(0 == archive_write_set_bytes_per_block(a, 1));
	assertA(0 == archive_write_set_bytes_in_last_block(a, 1));
	assertA(0 == archive_write_open_memory(a, buff, sizeof(buff), &used));

	/* Write entries. */

	/* Regular file */
	assert((entry = archive_entry_new()) != NULL);
	archive_entry_set_pathname(entry, file_name);
	archive_entry_set_mode(entry, S_IFREG | 0644);
	archive_entry_set_size(entry, sizeof(file_data1) + sizeof(file_data2));
	archive_entry_set_uid(entry, file_uid);
	archive_entry_set_gid(entry, file_gid);
	archive_entry_set_mtime(entry, t, 0);
	archive_entry_set_atime(entry, t, 0);
	archive_entry_set_ctime(entry, t, 0);
	assertEqualIntA(a, 0, archive_write_header(a, entry));
	assertEqualIntA(a, sizeof(file_data1), archive_write_data(a, file_data1, sizeof(file_data1)));
	assertEqualIntA(a, sizeof(file_data2), archive_write_data(a, file_data2, sizeof(file_data2)));
	archive_entry_free(entry);

	/* Folder */
	assert((entry = archive_entry_new()) != NULL);
	archive_entry_set_pathname(entry, folder_name);
	archive_entry_set_mode(entry, S_IFDIR | folder_perm);
	archive_entry_set_size(entry, 0);
	archive_entry_set_uid(entry, folder_uid);
	archive_entry_set_gid(entry, folder_gid);
	archive_entry_set_mtime(entry, t, 0);
	archive_entry_set_atime(entry, t, 0);
	archive_entry_set_ctime(entry, t, 0);
	assertEqualIntA(a, 0, archive_write_header(a, entry));
	archive_entry_free(entry);

	/* Close the archive . */
	assertA(0 == archive_write_close(a));
	assertA(0 == archive_write_finish(a));

	/* Remember the end of the archive in memory. */
	buffend = buff + used;

	/* Verify "End of Central Directory" record. */
	/* Get address of end-of-central-directory record. */
	p = buffend - 22; /* Assumes there is no zip comment field. */
	failure("End-of-central-directory begins with PK\\005\\006 signature");
	assertEqualMem(p, "PK\005\006", 4);
	failure("This must be disk 0");
	assertEqualInt(i2(p + 4), 0);
	failure("Central dir must start on disk 0");
	assertEqualInt(i2(p + 6), 0);
	failure("All central dir entries are on this disk");
	assertEqualInt(i2(p + 8), i2(p + 10));
	failure("CD start (%d) + CD length (%d) should == archive size - 22",
	    i4(p + 12), i4(p + 16));
	assertEqualInt(i4(p + 12) + i4(p + 16), used - 22);
	failure("no zip comment");
	assertEqualInt(i2(p + 20), 0);

	/* Get address of first entry in central directory. */
	p = buff + i4(buffend - 6);
	failure("Central file record at offset %d should begin with"
	    " PK\\001\\002 signature",
	    i4(buffend - 10));

	/* Verify file entry in central directory. */
	assertEqualMem(p, "PK\001\002", 4); /* Signature */
	assertEqualInt(i2(p + 4), 3 * 256 + 20); /* Version made by */
	assertEqualInt(i2(p + 6), 20); /* Version needed to extract */
	assertEqualInt(i2(p + 8), 8); /* Flags */
	assertEqualInt(i2(p + 10), 0); /* Compression method */
	assertEqualInt(i2(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
	assertEqualInt(i2(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
	crc = bitcrc32(0, file_data1, sizeof(file_data1));
	crc = bitcrc32(crc, file_data2, sizeof(file_data2));
	assertEqualInt(i4(p + 16), crc); /* CRC-32 */
	assertEqualInt(i4(p + 20), sizeof(file_data1) + sizeof(file_data2)); /* Compressed size */
	assertEqualInt(i4(p + 24), sizeof(file_data1) + sizeof(file_data2)); /* Uncompressed size */
	assertEqualInt(i2(p + 28), strlen(file_name)); /* Pathname length */
	assertEqualInt(i2(p + 30), 13); /* Extra field length */
	assertEqualInt(i2(p + 32), 0); /* File comment length */
	assertEqualInt(i2(p + 34), 0); /* Disk number start */
	assertEqualInt(i2(p + 36), 0); /* Internal file attrs */
	assertEqualInt(i4(p + 38) >> 16 & 01777, file_perm); /* External file attrs */
	assertEqualInt(i4(p + 42), 0); /* Offset of local header */
	assertEqualMem(p + 46, file_name, strlen(file_name)); /* Pathname */
	p = p + 46 + strlen(file_name);
	assertEqualInt(i2(p), 0x5455); /* 'UT' extension header */
	assertEqualInt(i2(p + 2), 5); /* 'UT' size */
	assertEqualInt(p[4], 7); /* 'UT' flags */
	assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
	p = p + 9;
	assertEqualInt(i2(p), 0x7855); /* 'Ux' extension header */
	assertEqualInt(i2(p + 2), 0); /* 'Ux' size */
	p = p + 4;

	/* Verify local header of file entry. */
	q = buff;
	assertEqualMem(q, "PK\003\004", 4); /* Signature */
	assertEqualInt(i2(q + 4), 20); /* Version needed to extract */
	assertEqualInt(i2(q + 6), 8); /* Flags */
	assertEqualInt(i2(q + 8), 0); /* Compression method */
	assertEqualInt(i2(q + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
	assertEqualInt(i2(q + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
	assertEqualInt(i4(q + 14), 0); /* CRC-32 */
	assertEqualInt(i4(q + 18), sizeof(file_data1) + sizeof(file_data2)); /* Compressed size */
	assertEqualInt(i4(q + 22), sizeof(file_data1) + sizeof(file_data2)); /* Uncompressed size */
	assertEqualInt(i2(q + 26), strlen(file_name)); /* Pathname length */
	assertEqualInt(i2(q + 28), 25); /* Extra field length */
	assertEqualMem(q + 30, file_name, strlen(file_name)); /* Pathname */
	q = q + 30 + strlen(file_name);
	assertEqualInt(i2(q), 0x5455); /* 'UT' extension header */
	assertEqualInt(i2(q + 2), 13); /* 'UT' size */
	assertEqualInt(q[4], 7); /* 'UT' flags */
	assertEqualInt(i4(q + 5), t); /* 'UT' mtime */
	assertEqualInt(i4(q + 9), t); /* 'UT' atime */
	assertEqualInt(i4(q + 13), t); /* 'UT' ctime */
	q = q + 17;
	assertEqualInt(i2(q), 0x7855); /* 'Ux' extension header */
	assertEqualInt(i2(q + 2), 4); /* 'Ux' size */
	assertEqualInt(i2(q + 4), file_uid); /* 'Ux' UID */
	assertEqualInt(i2(q + 6), file_gid); /* 'Ux' GID */
	q = q + 8;

	/* Verify data of file entry. */
	assertEqualMem(q, file_data1, sizeof(file_data1));
	assertEqualMem(q + sizeof(file_data1), file_data2, sizeof(file_data2));
	q = q + sizeof(file_data1) + sizeof(file_data2);

	/* Verify data descriptor of file entry. */
	assertEqualMem(q, "PK\007\010", 4); /* Signature */
	assertEqualInt(i4(q + 4), crc); /* CRC-32 */
	assertEqualInt(i4(q + 8), sizeof(file_data1) + sizeof(file_data2)); /* Compressed size */
	assertEqualInt(i4(q + 12), sizeof(file_data1) + sizeof(file_data2)); /* Uncompressed size */
	q = q + 16;

	/* Verify folder entry in central directory. */
	assertEqualMem(p, "PK\001\002", 4); /* Signature */
	assertEqualInt(i2(p + 4), 3 * 256 + 20); /* Version made by */
	assertEqualInt(i2(p + 6), 20); /* Version needed to extract */
	assertEqualInt(i2(p + 8), 8); /* Flags */
	assertEqualInt(i2(p + 10), 0); /* Compression method */
	assertEqualInt(i2(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
	assertEqualInt(i2(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
	crc = 0;
	assertEqualInt(i4(p + 16), crc); /* CRC-32 */
	assertEqualInt(i4(p + 20), 0); /* Compressed size */
	assertEqualInt(i4(p + 24), 0); /* Uncompressed size */
	assertEqualInt(i2(p + 28), strlen(folder_name)); /* Pathname length */
	assertEqualInt(i2(p + 30), 13); /* Extra field length */
	assertEqualInt(i2(p + 32), 0); /* File comment length */
	assertEqualInt(i2(p + 34), 0); /* Disk number start */
	assertEqualInt(i2(p + 36), 0); /* Internal file attrs */
	assertEqualInt(i4(p + 38) >> 16 & 01777, folder_perm); /* External file attrs */
	assertEqualInt(i4(p + 42), q - buff); /* Offset of local header */
	assertEqualMem(p + 46, folder_name, strlen(folder_name)); /* Pathname */
	p = p + 46 + strlen(folder_name);
	assertEqualInt(i2(p), 0x5455); /* 'UT' extension header */
	assertEqualInt(i2(p + 2), 5); /* 'UT' size */
	assertEqualInt(p[4], 7); /* 'UT' flags */
	assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
	p = p + 9;
	assertEqualInt(i2(p), 0x7855); /* 'Ux' extension header */
	assertEqualInt(i2(p + 2), 0); /* 'Ux' size */
	p = p + 4;

	/* Verify local header of folder entry. */
	assertEqualMem(q, "PK\003\004", 4); /* Signature */
	assertEqualInt(i2(q + 4), 20); /* Version needed to extract */
	assertEqualInt(i2(q + 6), 8); /* Flags */
	assertEqualInt(i2(q + 8), 0); /* Compression method */
	assertEqualInt(i2(q + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
	assertEqualInt(i2(q + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
	assertEqualInt(i4(q + 14), 0); /* CRC-32 */
	assertEqualInt(i4(q + 18), 0); /* Compressed size */
	assertEqualInt(i4(q + 22), 0); /* Uncompressed size */
	assertEqualInt(i2(q + 26), strlen(folder_name)); /* Pathname length */
	assertEqualInt(i2(q + 28), 25); /* Extra field length */
	assertEqualMem(q + 30, folder_name, strlen(folder_name)); /* Pathname */
	q = q + 30 + strlen(folder_name);
	assertEqualInt(i2(q), 0x5455); /* 'UT' extension header */
	assertEqualInt(i2(q + 2), 13); /* 'UT' size */
	assertEqualInt(q[4], 7); /* 'UT' flags */
	assertEqualInt(i4(q + 5), t); /* 'UT' mtime */
	assertEqualInt(i4(q + 9), t); /* 'UT' atime */
	assertEqualInt(i4(q + 13), t); /* 'UT' ctime */
	q = q + 17;
	assertEqualInt(i2(q), 0x7855); /* 'Ux' extension header */
	assertEqualInt(i2(q + 2), 4); /* 'Ux' size */
	assertEqualInt(i2(q + 4), folder_uid); /* 'Ux' UID */
	assertEqualInt(i2(q + 6), folder_gid); /* 'Ux' GID */
	q = q + 8;

	/* There should not be any data in the folder entry,
	 * meaning next is the data descriptor header. */

	/* Verify data descriptor of folder entry. */
	assertEqualMem(q, "PK\007\010", 4); /* Signature */
	assertEqualInt(i4(q + 4), crc); /* CRC-32 */
	assertEqualInt(i4(q + 8), 0); /* Compressed size */
	assertEqualInt(i4(q + 12), 0); /* Uncompressed size */
	q = q + 16;
}

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_open_memory.c

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2_1.tbz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_bzip2_1.tbz.uu 185683 2008-12-06 07:08:08Z kientzle $

begin 644 test_compat_bzip2_1.tbz
M0EIH.3%!62936;12^)(``#-;D=$00`!_@``!8RT>$`0`$```""``5#5/*'J>
MD#(&30_5!H4_5-ZH`T``327U4@&L('"(9-%8<7&$I,`:7FXH<P(<:8)$*)(U
MZH$>+*\GV#JF<`PK29-8'OPDG36S\7<D4X4)"T4OB2!"6F@Y,4%9)E-92FB6
M4````'N4T1`$`$``?X```6,M'A`$```0``@@`'0:H]$R>HR&C(T:/U0:$U'I
MJ!ZC0`#VECO\[$10H'-Z@F*:6A1$H$V("2G0Q(U0(8=(7AK$S04#!)RXOAP%
MP:D%#Q;NO)\4UL23'2[\7<D4X4)!*:)90$)::#DQ05DF4UD;;[2>````6YC1
M$$`$?X```6,M'A`$`!````@@`'4-4S*,U!HT!HT?J@T)E-I--!H`![6<G^E$
M$5QJ!S2`*)/,*+VQ9'B0",=3$#5`CA"8<%1\7A4X$T:,-A)F5^*"X5[IR?&-
M*DDY2+\7<D4X4)`;;[2>0EIH.3%!629364RNM^,```#?L-$00`#_@`0```AG
M+1X0`!`$```((`!U#5-,:1IH`TT,1^J#)&H]3U`T``!CX[_.[`F40.64EC"D
M()+?<M#$":=,4$46`@@DBMQ)81MJACLC[V0".0,7#AH=97F?G1I@9U))RD?Q
M=R13A0D$RNM^,$)::#DQ05DF4UDS!PL0```!6]#1$$``_X``#&<M'A`0``0`
M``@@`'4-4\2-&@`:#31^J#)3TU&U!H``!B_C_.]`)J4#F929S&D0$F:4(J50
M&#)@@5&F"H,GH(J*7*@X&>KX6,VP?6Y;F%5$XR[Y/D#*9),K3^+N2*<*$@9@
MX6(`0EIH.3%!62936>ZM4*4```);D-$00`#O@``(9ST>$`0```@@`'0:IFC2
M&F@!B:/U0:$R&H:&@`"KS^U=Y`BC`#FY2*9-8%%&13E$@%8ZF(&J!##]!#E`
MKVL'2LUW2.*<!T+W-B@46%:=GQ<#6Q*DYH/Q=R13A0D.ZM4*4$)::#DQ05DF
M4UD!Z-!@```!P`'```"```@@`""J;4&8NH/%W)%.%"0`>C08`$)::#DQ05DF
?4UDI/)=P````0!!```0`(``A`(*#%W)%.%"0*3R7<```
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_bzip2_2.tbz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_bzip2_2.tbz.uu 185683 2008-12-06 07:08:08Z kientzle $

begin 644 test_compat_bzip2_2.tbz
M0EIH.3%!629361HI1P<``4#;D-$00`#_@``)9RT>$`0``!@P`/@#&$Q,F`F`
M`,83$R8"8``1133"1/2-J-#$/U3@;XVF9V'`Y3882XA$*KO6\WTL`]QU&J"8
M$-=*Q$\@=`=QJ,TQ;3UH,NPT$-(!"HV&!ZO5D&@P-1D&1@'L<8&209QV9'G`
MW&PRZ0Q(-BT%&DG*DE.!U*#J.P]*#%-P9G`W9+34:#S&M`;@^1R^![C]:Y)U
MDF9/(\AR/@?P<CD<CD>@^@I_B[DBG"A(#12C@X!3;VUE(&UO<F4@9&%T82!T
7:&%T(&ES(&YO="!B>FEP('-T<F5A;0H`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_cpio_1.cpio.uu
$FreeBSD: head/lib/libarchive/test/test_compat_cpio_1.cpio.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_compat_cpio_1.cpio
M,#<P-S`Q,#`U-CEE8F4P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
M,31B,61E-#<T,#`P,#`P,#0P,#`P,#`P,#`P,#`P,#4T,#`P,#`P,#`P,#`P
M,#`P,#`P,#`P,#`U,#`P,#`P,#!F;V\Q``!F;V\*,#<P-S`Q,#`U-CEE8F4P
M,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P,31B,61E-#<T,#`P,#`P
M,#0P,#`P,#`P,#`P,#`P,#4T,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`U,#`P
M,#`P,#!F;V\R``!B87(*,#<P-S`Q,#`U-CEE8F4P,#`P.#%A-#`P,#`P,V4X
M,#`P,#`S93@P,#`P,#`P,C1B,61E-#<T,#`P,#`P,#0P,#`P,#`P,#`P,#`P
M,#4T,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`U,#`P,#`P,#!B87(Q``!B87H*
M,#<P-S`Q,#`U-CEE8F4P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
M,C1B,61E-#<T,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4T,#`P,#`P,#`P,#`P
M,#`P,#`P,#`P,#`U,#`P,#`P,#!B87(R```P-S`W,#$P,#`P,#`P,#`P,#`P
M,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`Q,#`P,#`P,#`P,#`P,#`P,#`P
M,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,&(P,#`P,#`P
/,%1204E,15(A(2$`````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gtar_1.tar.uu
$FreeBSD: head/lib/libarchive/test/test_compat_gtar_1.tar.uu 189308 2009-03-03 17:02:51Z kientzle $
begin 644 test_compat_gtar_1.tar
M+B\N+T!,;VYG3&EN:P``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````"`@("`@,"``("`@("`P(``@("`@(#`@`"`@("`@("`@,S$Q
M("`@("`@("`@("`P("`Q,#<P,0`@3```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<B`@`')O;W0`
M````````````````````````````````````=VAE96P`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X
M.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S
M-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X
M.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S
M-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,```````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````#$R,S0U-C<X.3`Q
M,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V
M-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.0`Q
M,#`V-#0@`"`@,3<U,"``("`Q-S4P(``@("`@("`@("`@,"`Q,#<R-C<P,#$W
M,R`@,C$P,C``(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(@(`!T:6T`````````````````
M`````````````````````'1I;0``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````+B\N+T!,;VYG3&EN:P``````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````"`@("`@,"``("`@("`P(``@("`@(#`@`"`@("`@
M("`@,S$Q("`@("`@("`@("`P("`Q,#<P,``@2P``````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<B`@
M`')O;W0`````````````````````````````````````=VAE96P`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R
M,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W
M.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R
M,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W
M.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,```
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````"XO+B]`
M3&]N9TQI;FL`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````@("`@(#`@`"`@("`@,"``("`@("`P(``@("`@("`@(#,Q,2`@("`@
M("`@("`@,"`@,3`W,#$`($P`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(@(`!R;V]T````````
M`````````````````````````````'=H965L````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````86)C9&5F9VAI:F%B8V1E9F=H:6IA8F-D969G:&EJ86)C
M9&5F9VAI:F%B8V1E9F=H:6IA8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H
M:6IA8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H:6IA8F-D969G:&EJ86)C
M9&5F9VAI:F%B8V1E9F=H:6IA8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H
M:6IA8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H:6H`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A8F-D969G:&EJ86)C9&5F
M9VAI:F%B8V1E9F=H:6IA8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H:6IA
M8F-D969G:&EJ86)C9&5F9VAI:F%B8V1E9F=H:6IA8F-D969G:&D`,3(P-S4U
M(``@(#$W-3`@`"`@,3<U,"``("`@("`@("`@(#`@,3`W,C8W,#`R-#,@(#0T
M-3(Q`"`R,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y
M,#$R,S0U-C<X.3`Q,C,T-38W.#DP,3(S-#4V-S@Y,#$R,S0U-C<X.3`Q,C,T
M-38W.#DP,3(S-#4V-S@Y`'5S=&%R("``=&EM````````````````````````
M``````````````!T:6T`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
9````````````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip_1.tgz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_gzip_1.tgz.uu 185683 2008-12-06 07:08:08Z kientzle $

begin 644 test_compat_gzip_1.tgz
M'XL(")B^(DD``W1E<W0M<W!L:70N=&%R86$`2S-DH#DP,#`P,S%1`-*&YJ:&
MR#0,&"L8`H&!J;&9F:&A@H&AH9&),8."`>V=QL!06ER26`1T2G9F:EY)54XJ
MN>9`/*(`IX<(2#/D&F@GC`(Z``#S<P4"Z`,``!^+"`B8OB))``-T97-T+7-P
M;&ET+G1A<F%B`&-@P`[2C'!(4!$8&!B8F9@H`&E#<U-#9!H&C!4,@<#`U-C,
MS-!8P<#0T,C$C$'!@/9.8V`H+2Y)+`(Z)3LS-:^D*B>57',@'E&`TT,$I!EQ
M#;031@$5`0`Q!<\4Z`,``!^+"`B8OB))``-T97-T+7-P;&ET+G1A<F%C`&-@
M(`VD&9.H@0Q@8&!@9F*B`*0-S4T-D6D8,%8P!`(#4V,S,T,S!0-#0R-3(P8%
M`]H[C8&AM+@DL0CHE.S,U+R2JIQ4<LV!>$0!3@\1D&;,-=!.&`5D``#7L]HO
MZ`,``!^+"`B8OB))``-T97-T+7-P;&ET+G1A<F%D`&-@H`Y(,=1/,Z226;B`
M@8&!F8F)`I`V-#<U1*9AP%C!$`@,3(W-S(S,%0P,#4U-S1@4#&CL+C`H+2Y)
M+`(Z)3LS-:^D*B>57',@'E&`TT,$I!ER#;031@$>``"Y*#OBZ`,``!^+"`B8
MOB))``-T97-T+7-P;&ET+G1A<F%E`&-@H"U(,=1/,Z*Q'08&!F8F)@I`VM#<
MU!"9A@%C!4,@,#`U-C,S-E`P,#0T-35D4#"@L;O`H+2X)+$(Z)3LS-2\DJJ<
M5'+-@7A$`4X/$9!FQ#703A@%0```]%Z(F^@#```?BP@(F+XB20`#=&5S="US
M<&QI="YT87)A9@!C8!@8D&*HGV9,8SL,#`S,3$P4@+2AN:DA,@T#Q@J&0&!@
M:FQF9FRH8&!H:&IJS*!@0&-W@4%I<4EB$=`IV9FI>255.:GDF@/QB`*<'B(@
MS9AKH)TPH@``)4=8$>@#```?BP@(F+XB20`#=&5S="US<&QI="YT87)A9P!C
M8!@%HV`4#'<``(`7"P;H`P``'XL(")B^(DD``W1E<W0M<W!L:70N=&%R86@`
.8V`8&@``E#SI#J@`````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt
############################################
#
# How to build libarchive_test
#
############################################
IF(ENABLE_TEST)
  FOREACH (_src ${libarchive_SOURCES})
    LIST(APPEND parent_libarchive_SOURCES "../${_src}")
  ENDFOREACH(_src)

  SET(libarchive_test_SOURCES
    ${parent_libarchive_SOURCES}
    main.c
    read_open_memory.c
    test.h
    test_acl_basic.c
    test_acl_freebsd.c
    test_acl_pax.c
    test_archive_api_feature.c
    test_bad_fd.c
    test_compat_bzip2.c
    test_compat_cpio.c
    test_compat_gtar.c
    test_compat_gzip.c
    test_compat_lzma.c
    test_compat_solaris_tar_acl.c
    test_compat_tar_hardlink.c
    test_compat_xz.c
    test_compat_zip.c
    test_empty_write.c
    test_entry.c
    test_entry_strmode.c
    test_extattr_freebsd.c
    test_fuzz.c
    test_link_resolver.c
    test_open_fd.c
    test_open_file.c
    test_open_filename.c
    test_pax_filename_encoding.c
    test_read_compress_program.c
    test_read_data_large.c
    test_read_disk.c
    test_read_disk_entry_from_file.c
    test_read_extract.c
    test_read_file_nonexistent.c
    test_read_format_ar.c
    test_read_format_cpio_bin.c
    test_read_format_cpio_bin_Z.c
    test_read_format_cpio_bin_be.c
    test_read_format_cpio_bin_bz2.c
    test_read_format_cpio_bin_gz.c
    test_read_format_cpio_bin_lzma.c
    test_read_format_cpio_bin_xz.c
    test_read_format_cpio_odc.c
    test_read_format_cpio_svr4_bzip2_rpm.c
    test_read_format_cpio_svr4_gzip.c
    test_read_format_cpio_svr4_gzip_rpm.c
    test_read_format_cpio_svr4c_Z.c
    test_read_format_empty.c
    test_read_format_gtar_gz.c
    test_read_format_gtar_lzma.c
    test_read_format_gtar_sparse.c
    test_read_format_iso_gz.c
    test_read_format_iso_multi_extent.c
    test_read_format_isojoliet_bz2.c
    test_read_format_isojoliet_long.c
    test_read_format_isojoliet_rr.c
    test_read_format_isorr_bz2.c
    test_read_format_isorr_ce.c
    test_read_format_isorr_new_bz2.c
    test_read_format_isorr_rr_moved.c
    test_read_format_isozisofs_bz2.c
    test_read_format_mtree.c
    test_read_format_pax_bz2.c
    test_read_format_raw.c
    test_read_format_tar.c
    test_read_format_tar_empty_filename.c
    test_read_format_tbz.c
    test_read_format_tgz.c
    test_read_format_tlz.c
    test_read_format_txz.c
    test_read_format_tz.c
    test_read_format_xar.c
    test_read_format_zip.c
    test_read_large.c
    test_read_pax_truncated.c
    test_read_position.c
    test_read_truncated.c
    test_read_uu.c
    test_tar_filenames.c
    test_tar_large.c
    test_ustar_filenames.c
    test_write_compress.c
    test_write_compress_bzip2.c
    test_write_compress_gzip.c
    test_write_compress_lzma.c
    test_write_compress_program.c
    test_write_compress_xz.c
    test_write_disk.c
    test_write_disk_failures.c
    test_write_disk_hardlink.c
    test_write_disk_perms.c
    test_write_disk_secure.c
    test_write_disk_sparse.c
    test_write_disk_symlink.c
    test_write_disk_times.c
    test_write_format_ar.c
    test_write_format_cpio.c
    test_write_format_cpio_empty.c
    test_write_format_cpio_odc.c
    test_write_format_cpio_newc.c
    test_write_format_mtree.c
    test_write_format_pax.c
    test_write_format_shar_empty.c
    test_write_format_tar.c
    test_write_format_tar_empty.c
    test_write_format_tar_ustar.c
    test_write_format_zip.c
    test_write_format_zip_empty.c
    test_write_format_zip_no_compression.c
    test_write_open_memory.c
  )

  #
  # Register target
  #
  ADD_EXECUTABLE(libarchive_test ${libarchive_test_SOURCES})
  TARGET_LINK_LIBRARIES(libarchive_test ${ADDITIONAL_LIBS})
  SET_PROPERTY(TARGET libarchive_test PROPERTY COMPILE_DEFINITIONS
    LIBARCHIVE_STATIC LIST_H)

  #
  # Generate list.h by grepping DEFINE_TEST() lines out of the C sources.
  #
  GENERATE_LIST_H(${CMAKE_CURRENT_BINARY_DIR}/list.h
    ${CMAKE_CURRENT_LIST_FILE} ${libarchive_test_SOURCES})
  SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
    ${CMAKE_CURRENT_BINARY_DIR})

  # list.h has a line DEFINE_TEST(testname) for every
  # test.  We can use that to define the tests for cmake by
  # defining a DEFINE_TEST macro and reading list.h in.
  MACRO (DEFINE_TEST _testname)
    ADD_TEST_28(
      NAME libarchive_${_testname}
      COMMAND libarchive_test -vv
                              -r ${CMAKE_CURRENT_SOURCE_DIR}
                              ${_testname})
  ENDMACRO (DEFINE_TEST _testname)

  INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)

  # Experimental new test handling
  ADD_CUSTOM_TARGET(run_libarchive_test
	COMMAND	libarchive_test -r ${CMAKE_CURRENT_SOURCE_DIR})
  ADD_DEPENDENCIES(run_all_tests run_libarchive_test)
ENDIF(ENABLE_TEST)


File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_gzip_2.tgz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_gzip_2.tgz.uu 185683 2008-12-06 07:08:08Z kientzle $

begin 644 test_compat_gzip_2.tgz
M'XL(`&76(DD``^W800["(!"%8=:>@ALXPP`]CXF=Q&A<:-UX>EN)C5M,AL;P
MO@V[0A=_.E39F2.B'*.?5QX2?Z\?XGE&27)F]L0<HCA/]D=S[G&?#K?Y*.?3
M>)V>E_'7YY07\>OZ)Y1W6Q\!-J3!?H^Z_J7TG]%_"QK0?\]4[/>HZS^_^T\!
M_;>@@OY[=N2]6E\!JOH/P])_2OC^-X'YOV]+_]97@*K^A4K_C/Y;P/S?MZ5_
MZRM`7?]<^L?_OR8P_P,`].D%,XR2*0`<``!4:&ES(&ES('5N<F5L871E9"!J
@=6YK(&1A=&$@870@=&AE(&5N9"!O9B!T:&4@9FEL90H`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_1.tlz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_lzma_1.tlz.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_compat_lzma_1.tlz
M70``@`#__________P`S##P;IXPT!HUK`DO\DC[V2OB%Z^'=ZT59ANYMTD(/
M^W;\8!%O7<+P&=#(9W<_!$Z.7/Y<&\(8+E0^,_-\Z"D^P'N0J^4-UH"WMJ<&
MV-P6=Y[-FY$IFNZ="RF24TO.B7EP[F]BGMJSP[]OZ_P9/#J'T=;7E&&A@J<[
MA^C'Q*/Y&I)2^T930'MJTK-98U0D9R*-X2^5__6H:+A4:&ES(&ES('5N<F5L
F871E9"!J=6YK(&1A=&$@870@=&AE(&5N9"!O9B!T:&4@9FEL90H`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_2.tlz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_lzma_2.tlz.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_compat_lzma_2.tlz
M7@``@`#__________P`S##P;IXPT!HUK`DO\DC[V2OB%Z^'<FN`(!=!,)@8W
M9R(6\QIOTA6SGM20X;2'6#3B&HC%2XOX2?D['5WD"`>`W2"/3R1F1:P:&Q9A
MGH2JJI9$C?8.=WTE:O<1WA@X>DK-Y#SW;I2!P;NYG^2"-(D9/E(D_0XK_H,\
95*/V"T#E9ZO][@'R,6E&^A([.##_\M#YU@``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_lzma_3.tlz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_lzma_3.tlz.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_compat_lzma_3.tlz
M70`0````'``````````S##P;IXPT!HUK`DO\DC[V2OB%Z^'=ZT59ANYMTD(1
M$Y^=;\4%U_CXKQ*F$OFZKEQUG)1U8="](V<2K"U1\Z6%H(UNQ[Y3.=D'>_G-
MCO71X+M*7WH7$D1&E9Y$XHW,(`[X";GGTO+,'&1?F%<@`.$-OV;8P1?*M$A"
:MA+1XONREMK,1('455L=X1>WC#1YW"('I@``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_solaris_tar_acl.tar.uu
$FreeBSD: head/lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu 191576 2009-04-27 18:27:54Z kientzle $
begin 644 test_acl_solaris.tar
M9FEL92UW:71H+7!O<VEX+6%C;',`````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`V-#0`,#`P,3<U,``P,#`P,#`P`#`P,#`P,#`P,30T
M`#$Q,3<T-C`T,34W`#`P,34Q-S8`00``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,'1R87-Z
M````````````````````````````````````<F]O=```````````````````
M```````````````````P,#`P,C$P`#`P,#`P,3``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````Q,#`P,#`W`'5S97(Z.G)W+2QU<V5R.FQP.BTM
M>#HW,2QU<V5R.C8V-CIR+2TZ-C8V+'5S97(Z=')A<WHZ<G=X.C$P,#`L9W)O
M=7`Z.G(M+2QM87-K.G(M+2QO=&AE<CIR+2T``````````3````````/-@```
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````!%&8`````````&L`````,3`P,#`P-P!U
M<V5R.CIR=RTL=7-E<CIL<#HM+7@Z-S$L=7-E<CHV-C8Z<BTM.C8V-BQU<V5R
M.G1R87-Z.G)W>#HQ,#`P+&=R;W5P.CIR+2TL;6%S:SIR+69I;&4M=VET:"UP
M;W-I>"UA8VQS````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`P-C0T`#`P,#$W-3``,#`P,#`P,``P,#`P,#`P,#`P,``Q,3$W-#8P-#$U
M-P`P,#$U,30T`#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T<F%S>@``````````````
M`````````````````````')O;W0`````````````````````````````````
M````,#`P,#(Q,``P,#`P,#$P````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
H````````````````````````````````````````````````````````
`
end

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_tar_hardlink_1.tar.uu

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_xz_1.txz.uu
$FreeBSD: head/lib/libarchive/test/test_compat_xz_1.txz.uu 191183 2009-04-17 01:06:31Z kientzle $
begin 644 test_compat_gzip_1.txz
M_3=Z6%H```3FUK1&`@`A`18```!T+^6CX`^?`(-=`#,,/!NGC#0&C6L"2_R2
M/O9*^(7KX=WM^(=KA(RH"\09$$)!Q_+JUHQ*`]R;ITL_F3/I6:^Q0550A&)B
MHS@=K]7@K1-9FOIP#PU!I<PUHW+W#<F(6FSL/<?5:4*>?E5&IHH&Q=N>_C&G
M-$G]+L[\,B<7%8&$NO5K31*Y>"D^*ZG,Z=H```"KU50H$1^1S``!GP&@'P``
MLZ042+'$9_L"``````196OTW>EA:```$YM:T1@(`(0$6````="_EH^`,7P!I
M70``;IBIKOMK%/A?-<U3^2)5\V,DQ(:ZUH:[B'3>TZV0266G?2,[/?\,JE6`
M__C/SA[W1?*2<Y3NQ'DCK4JEJYHQU`Q\N=H9LL3KRAH,VQQ2OD*@?1NLV]<E
MF&X."!L\R:Z]=*TJPT/BJ^``````R[PG*'(H!W,``84!X!@``/;+`G2QQ&?[
(`@`````$65H`
`
end

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_compat_zip_1.zip.uu

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_fuzz_1.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_fuzz_1.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_fuzz_1.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=N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M8`_8!':!;6`?V`AV@JU@+]@,=H/M8#_8$':$+6%/V!1V
MA6UA7]@8=H:M86_8'':'[6%_V"!VB"UBC]@D=HEM8I_8*':*K6*OV"QVB^UB
4O]@P=HPM8\_8-':-;6/?V#BVW0$`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_pax_filename_encoding.tar.uu
$FreeBSD: head/lib/libarchive/test/test_pax_filename_encoding.tar.uu 191183 2009-04-17 01:06:31Z kientzle $
begin 644 test_pax_filename_encoding.tar
M4&%X2&5A9&5R+V%B8\R,;6YO6'AY>@``````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#8T-"``,#`Q-S4P(``P,#$W-3`@`#`P,#`P,#`P,38V
M(#$P-S8V-C`W,#,V(#`Q-3,P-@`@>```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
M````````````````````````````````````=&EM````````````````````
M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````R,2!P871H/6%B8\R,;6YO_'AY>@HR,"!C=&EM
M93TQ,C`U-3,X-C@U"C(P(&%T:6UE/3$R,#4U,S@V,C8*,3<@4T-(24Q9+F1E
M=CTX.`HR,B!30TA)3%DN:6YO/30S,34T-#D*,3@@4T-(24Q9+FYL:6YK/3$*
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&%B8\R,;6YO6'AY
M>@``````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`V-#0@`#`P,3<U,"``,#`Q-S4P(``P,#`P,#`P,#`P-2`Q,#<V-C8P-S`S
M-B`P,3,S,C4`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'1I;0``````````````````````````````````
M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````2&5L;&\`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!087A(96%D97(O86)CS(QM;F_\>'EZ
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````,#`P-C0T(``P,#$W
M-3`@`#`P,3<U,"``,#`P,#`P,#`R,3,@,3`W-C8V,#<P,S8@,#$U-30S`"!X
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````'5S=&%R`#`P=&EM````````````````````````````````
M``````!T:6T``````````````````````````````````````#`P,#`P,"``
M,#`P,#`P(```````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````#(Q(&AD
M<F-H87)S970]0DE.05)9"C(Q('!A=&@]86)CS(QM;F_\>'EZ"C(P(&-T:6UE
M/3$R,#4U-#$W,S4*,C`@871I;64],3(P-34S.#8R-@HQ-R!30TA)3%DN9&5V
M/3@X"C(R(%-#2$E,62YI;F\]-#,Q-3$R-@HQ."!30TA)3%DN;FQI;FL],0H`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````86)CS(QM;F_\>'EZ````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````#`P,#8T-"``,#`Q-S4P(``P,#$W-3`@
M`#`P,#`P,#`P,#`U(#$P-S8V-C`W,#,V(#`Q,S4W,0`@,```````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!U
M<W1A<@`P,'1I;0``````````````````````````````````````=&EM````
M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!(96QL;P``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
C````````````````````````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_ar.ar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_ar.ar.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 755 test_read_format_ar.ar
M(3QA<F-H/@HO+R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
M("`@("`@("`@("`T,"`@("`@("`@8`IY>7ET='1S<W-A86%F9F8N;R\*:&AH
M:&IJ:FIK:VMK;&QL;"YO+PH*+S`@("`@("`@("`@("`@(#$Q-S4T-C4V-3(@
M(#$P,#$@(#`@("`@(#$P,#8T-"`@."`@("`@("`@(&`*-34V-C<W.#AG9VAH
M+F\O("`@("`@("`@,3$W-30V-38V."`@,3`P,2`@,"`@("`@,3`P-C0T("`T
M("`@("`@("`@8`HS,S,S+S$Y("`@("`@("`@("`@(#$Q-S4T-C4W,3,@(#$P
H,#$@(#`@("`@(#$P,#8T-"`@.2`@("`@("`@(&`*.3@W-C4T,S(Q"@``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_bin_be.cpio.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu 191592 2009-04-27 19:30:09Z kientzle $
begin 644 test_read_format_cpio_bin_be.cpio
M<<<`"#P\@:0#Z`````$``$GS"&\`%0````5F:6QE,3$Q,3(R,C(S,S,S-#0T
M-```86)C9&4`<<<```````````````$`````````"P````!44D%)3$52(2$A
M````````````````````````````````````````````````````````````
3````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu
begin 644 test_read_format_cpio_svr4_bzip2_rpm.rpm
M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
M```````````````````````````````````````````!``4`````````````
M````````CJWH`0`````````%````5````#X````'````1````!````$-````
M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
M````!````$`````!,F4X-3)F-39E,#,W83EE.61A9C<W8V(Q,&0P8S4T-65E
M9&8S-6$U8@````````:<A,!!LG.$S/]SK-(FA0BH6@```@@````^````!___
M_[`````0`````(ZMZ`$`````````,0```NP````_````!P```MP````0````
M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
M```!@`````$```08````!````8P````#```$&0````@```&8`````P``!!H`
M```(```!Z@````,```0H````!@```@`````!```$1P````0```((`````P``
M!$@````$```"%`````,```1)````"````B`````#```$6`````0```(D````
M`0``!%D````(```"*`````$```1<````!````C`````#```$70````@```(\
M`````P``!%X````(```"3@````$```1B````!@```E0````!```$9`````8`
M``)S`````0``!&4````&```">`````$```1F````!@```GX````!```$;```
M``8```*``````0``!'0````$```"E`````,```1U````!````J`````#```$
M=@````@```*L`````P``!'<````$```"Q`````,```1X````!````M`````#
M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MWQC=64M9&5S:W1O
M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$H!
M``!*<G!M;&EB*$-O;7!R97-S961&:6QE3F%M97,I`')P;6QI8BA087EL;V%D
M1FEL97-(879E4')E9FEX*0!R<&UL:6(H4&%Y;&]A9$ES0GII<#(I`#,N,"XT
M+3$`-"XP+3$`,RXP+C4M,0`T+C<N,```````"`$```@!```(`0``*H<``"J(
M```JB0`````````(,2XP+C`M,0````````````````!F:6QE,0!F:6QE,@!F
M:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE/6DV.#8`8W!I
M;P!B>FEP,@`Y`&YO87)C:"UR<&TM;&EN=7@`````````````````````````
M`0````$````!`$%30TE)('1E>'0`9&ER96-T;W)Y````````````````````
M````````````````````/P````?___SP````$$)::#DQ05DF4UFX89DX``!=
M?X!,$`@`*`'_X"(D%``[9(0`(`"2B/50T#0#0`](9!%(C1,0&GJ`R`M@PQRG
M<PN0PPC]8&X[2P=KHS%0Q<^=89M6CI5L`O2\("`W!K-V.;*M63U;6ES%CQI6
E4,1$DE)B@G&.7I5?NT46(XB0/D,B!$Z-!A_B[DBG"A(7##,G````
`
end

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.zip.uu

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu
begin 644 test_read_format_cpio_svr4_gzip_rpm.rpm
M[:ONVP,``````7)P;7-A;7!L92TQ+C`N,"TQ````````````````````````
M```````````````````````````````````````````!``4`````````````
M````````CJWH`0`````````%````5````#X````'````1````!````$-````
M!@`````````!```#Z`````0````L`````0```^P````'````,````!````/O
M````!````$`````!9&9E8V,W,#4T,C@X,V1D-&8P-6%E.#4Y,S<S,&1F,V)D
M,#$Q,S0V80````````9=A5.[L^@5U91731!5GLHZC0```@@````^````!___
M_[`````0`````(ZMZ`$`````````,0```L0````_````!P```K0````0````
M9`````@``````````0```^@````&`````@````$```/I````!@````P````!
M```#Z@````8````2`````0```^P````)````%`````$```/M````"0```#P`
M```!```#[@````0```!,`````0```^\````&````4`````$```/Q````!```
M`%P````!```#]@````8```!@`````0```_@````)````9`````$```/\````
M!@```'`````!```#_0````8```"4`````0```_X````&````F@````$```0$
M````!````*0````#```$!@````,```"P`````P``!`D````#````M@````,`
M``0*````!````+P````#```$"P````@```#(`````P``!`P````(```!*P``
M``,```0-````!````3`````#```$#P````@```$\`````P``!!`````(```!
M2P````,```04````!@```5H````!```$%0````0```%T`````P``!!<````(
M```!@`````$```08````!````8P````"```$&0````@```&4`````@``!!H`
M```(```!SP````(```0H````!@```=T````!```$1P````0```'D`````P``
M!$@````$```!\`````,```1)````"````?P````#```$6`````0```(`````
M`0``!%D````(```"!`````$```1<````!````@P````#```$70````@```(8
M`````P``!%X````(```"*@````$```1B````!@```C`````!```$9`````8`
M``)/`````0``!&4````&```"5`````$```1F````!@```ED````!```$;```
M``8```);`````0``!'0````$```";`````,```1U````!````G@````#```$
M=@````@```*$`````P``!'<````$```"G`````,```1X````!````J@````#
M0P!R<&US86UP;&4`,2XP+C``,0!386UP;&4@9&%T82!O9B!24$T@9FEL=&5R
M(&]F(&QI8F%R8VAI=F4`4V%M<&QE(&1A=&$N`````$L)MAUC=64M9&5S:W1O
M<``````20E-$`%5N<W!E8VEF:65D`&AT='`Z+R]C;V1E+F=O;V=L92YC;VTO
M<"]L:6)A<F-H:79E`&QI;G5X`&YO87)C:``````````&````!@````:!I(&D
M@:0``````````5&!``%1@0`!48%B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D
M,C8Q,3$X-`!B,3DT-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-`!B,3DT
M-F%C.3(T.3)D,C,T-V,V,C,U8C1D,C8Q,3$X-```````````````````````
M`')O;W0`<F]O=`!R;V]T`')O;W0`<F]O=`!R;V]T`')P;7-A;7!L92TQ+C`N
M,"TQ+G-R8RYR<&T`________________<G!M<V%M<&QE`````0``2@$``$IR
M<&UL:6(H0V]M<')E<W-E9$9I;&5.86UE<RD`<G!M;&EB*%!A>6QO861&:6QE
M<TAA=F50<F5F:7@I`#,N,"XT+3$`-"XP+3$`-"XW+C``````"`$```@!```(
M`0``*H<``"J(```JB0`````````(,2XP+C`M,0````````````````!F:6QE
M,0!F:6QE,@!F:6QE,P`O971C+P`M3S(@+6<@+6UA<F-H/6DS.#8@+6UT=6YE
M/6DV.#8`8W!I;P!G>FEP`#D`;F]A<F-H+7)P;2UL:6YU>```````````````
M```````!`````0````$`05-#24D@=&5X=`!D:7)E8W1O<GD`````````````
M```````````````````````````_````!____/`````0'XL(```````"`S,P
M-S`W,#0``J-$"W,0;6&8:&*`'8#4&9H:6AA"^690V@))'AM(AC'T]%-+DO73
M,G-2#1D8&#)2<W+RN1@8#)#=8$$_-QCA<H,E_=Q@C-4-1`!BU:&#)!@C),C1
3T\<U2%%1$>@$!@"1O'?9"`(`````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu 191183 2009-04-17 01:06:31Z kientzle $
begin 644 test_read_format_gtar_sparse_1_13.tar
M<W!A<G-E````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`Q,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`R,#`Q
M`#$P-S,S,3`Q,30P`#`Q-S<V-P`@4P``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<B`@`'1I;0``
M````````````````````````````````````=&EM````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````P,#`P,S8T,3`P,``P,#`P,#`P
M,3`P,``P,#`P-S4P,C`P,``P,#`P,#`P,3`P,``P,#`Q,S<W-S<W-P`P,#`P
M,#`P,#`P,0``````````````````````````````````,#`P,30P,#`P,#``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!S<&%R<V4R````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````,#$P,#8T-``P,#`Q
M-S4P`#`P,#$W-3``,#`P,#`Q-#(S,#$`,3`W,S,Q,#$Q-#$`,#(R,3,S`"!3
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````'5S=&%R("``=&EM````````````````````````````````
M``````!T:6T`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````#`P,#`S-C0Q,#`P`#`P,#`P,#`Q,#`P`#`P,#`W-3`R,#`P`#`P,#`P
M,#`Q,#`P`#`P,#$S,S0S,#`P`#`P,#`P,#`Q,#`P`#`P,#$W,C`T,#`P`#`P
M,#`P,#`Q,#`P``$P,#4W,34Q-S,P,0```````````````````````#`P,#(S
M,#0U,#`P`#`P,#`P,#`Q,#`P`#`P,#(V-S`V,#`P`#`P,#`P,#`Q,#`P`#`P
M,#,R-30W,#`P`#`P,#`P,#`Q,#`P`#`P,#,V-#$Q,#`P`#`P,#`P,#`Q,#`P
M`#`P,#0R,C4R,#`P`#`P,#`P,#`Q,#`P`#`P,#0V,3$S,#`P`#`P,#`P,#`Q
M,#`P`#`P,#4Q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,#`P`#`P,#`P,#`Q,#`P`#`P-#,V,#8T,#`P
M`#`P,#`P,#`Q,#`P`#`P-#0Q-S(U,#`P`#`P,#`P,#`Q,#`P`#`P-#0U-38V
M,#`P`#`P,#`P,#`Q,#`P`#`P-#4Q-#(W,#`P`#`P,#`P,#`Q,#`P`#`P-#4U
M,C<P,#`P`#`P,#`P,#`Q,#`P`#`P-#8Q,3,R,#`P`#`P,#`P,#`Q,#`P`#`P
M-#8T-S<S,#`P`#`P,#`P,#`Q,#`P`#`P-#<P-C,T,#`P`#`P,#`P,#`Q,#`P
M`#`P-#<T-#<U,#`P`#`P,#`P,#`Q,#`P`#`P-3`P,S,V,#`P`#`P,#`P,#`Q
M,#`P`#`P-3`T,3<W,#`P`#`P,#`P,#`Q,#`P`#`P-3$P,#0P,#`P`#`P,#`P
M,#`Q,#`P`#`P-3$S-S`Q,#`P`#`P,#`P,#`Q,#`P`#`P-3$W-30S,#`P`#`P
M,#`P,#`Q,#`P``$`````````,#`U,C,T,#0P,#``,#`P,#`P,#$P,#``,#`U
M,C<R-#4P,#``,#`P,#`P,#$P,#``,#`U,S,Q,#8P,#``,#`P,#`P,#$P,#``
M,#`U,S8W-#<P,#``,#`P,#`P,#$P,#``,#`U-#(V,3`P,#``,#`P,#`P,#$P
M,#``,#`U-#8T-3$P,#``,#`P,#`P,#$P,#``,#`U-3(S,3(P,#``,#`P,#`P
M,#$P,#``,#`U-38Q-30P,#``,#`P,#`P,#$P,#``,#`U-C(P,34P,#``,#`P
M,#`P,#$P,#``,#`U-C4V-38P,#``,#`P,#`P,#$P,#``,#`U-S$U,3<P,#``
M,#`P,#`P,#`S,#$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!N;VXM<W!A<G-E````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````,#$P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P
M,#`P,#`P,#``,3`W,S,Q,#$Q-#$`,#$Q,C$P`"`P````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````'5S=&%R
M("``=&EM``````````````````````````````````````!T:6T`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
/````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu 189308 2009-03-03 17:02:51Z kientzle $
begin 644 test_read_format_gtar_sparse_1_17.tar
M<W!A<G-E````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`R,#`P
M`#$P-S,S,3`Q,30P`#`Q-S<Q,P`@4P``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<B`@`'1I;0``
M````````````````````````````````````=&EM````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````P,#`P,S8T,3`P,``P,#`P,#`P
M,3`P,``P,#`P-S4P,C`P,``P,#`P,#`P,3`P,``P,#`Q-#`P,#`P,``P,#`P
M,#`P,#`P,```````````````````````````````````,#`P,30P,#`P,#``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````<W!A<G-E,@``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P
M,30R,S`Q`#$P-S,S,3`Q,30Q`#`R,C$S,@`@4P``````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<B`@
M`'1I;0``````````````````````````````````````=&EM````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````P,#`P,S8T,3`P,``P
M,#`P,#`P,3`P,``P,#`P-S4P,C`P,``P,#`P,#`P,3`P,``P,#`Q,S,T,S`P
M,``P,#`P,#`P,3`P,``P,#`Q-S(P-#`P,``P,#`P,#`P,3`P,``!,#`U-S$U
M,3<S,#$````````````````````````P,#`R,S`T-3`P,``P,#`P,#`P,3`P
M,``P,#`R-C<P-C`P,``P,#`P,#`P,3`P,``P,#`S,C4T-S`P,``P,#`P,#`P
M,3`P,``P,#`S-C0Q,3`P,``P,#`P,#`P,3`P,``P,#`T,C(U,C`P,``P,#`P
M,#`P,3`P,``P,#`T-C$Q,S`P,``P,#`P,#`P,3`P,``P,#`U,3<U-#`P,``P
M,#`P,#`P,3`P,``P,#`U-38Q-3`P,``P,#`P,#`P,3`P,``P,#`V,30U-C`P
M,``P,#`P,#`P,3`P,``P,#`V-3,Q-S`P,``P,#`P,#`P,3`P,``P,#`W,3$V
M,#`P,``P,#`P,#`P,3`P,``P,#`W-3`R,C`P,``P,#`P,#`P,3`P,``P,#$P
M,#8V,S`P,``P,#`P,#`P,3`P,``P,#$P-#4R-#`P,``P,#`P,#`P,3`P,``P
M,#$Q,#,V-3`P,``P,#`P,#`P,3`P,``P,#$Q-#(R-C`P,``P,#`P,#`P,3`P
M,``P,#$R,#`V-S`P,``P,#`P,#`P,3`P,``P,#$R,S<S,#`P,``P,#`P,#`P
M,3`P,``P,#$R-S4W,3`P,``P,#`P,#`P,3`P,``P,#$S,S0S,S`P,``P,#`P
M,#`P,3`P,``P,#$S-S(W-#`P,``P,#`P,#`P,3`P,``!`````````#`P,30S
M,3,U,#`P`#`P,#`P,#`Q,#`P`#`P,30V-S<V,#`P`#`P,#`P,#`Q,#`P`#`P
M,34R-C,W,#`P`#`P,#`P,#`Q,#`P`#`P,34V-3`P,#`P`#`P,#`P,#`Q,#`P
M`#`P,38R,S0Q,#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,#`Q,#`P`#`P-30V-#4Q,#`P`#`P
M,#`P,#`Q,#`P`#`P-34R,S$R,#`P`#`P,#`P,#`Q,#`P`#`P-34V,34T,#`P
M`#`P,#`P,#`Q,#`P`#`P-38R,#$U,#`P`#`P,#`P,#`Q,#`P`#`P-38U-C4V
M,#`P`#`P,#`P,#`Q,#`P`#`P-3<Q-3$W,#`P`#`P,#`P,#`P,S`Q````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````;F]N+7-P87)S
M90``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#`P`#$P-S,S,3`Q
M,30Q`#`Q,3(P-P`@,```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!U<W1A<B`@`'1I;0``````````````
M````````````````````````=&EM````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
/````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu 189308 2009-03-03 17:02:51Z kientzle $
begin 644 test_read_format_gtar_sparse_1_17_posix00.tar
M+B]087A(96%D97)S+C,X-C4Y+W-P87)S90``````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P-#`R
M`#$P-S,S,3`Q,30R`#`Q,S0W,``@>```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,```````
M````````````````````````````````````````````````````````````
M```````````````````P,#`P,#`P`#`P,#`P,#``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````R-R!'3E4N<W!A<G-E+G-I>F4],S$T-3<R.`HR
M-B!'3E4N<W!A<G-E+FYU;6)L;V-K<STS"C(X($=.52YS<&%R<V4N;V9F<V5T
M/3DY.3DS-@HR-R!'3E4N<W!A<G-E+FYU;6)Y=&5S/34Q,@HR.2!'3E4N<W!A
M<G-E+F]F9G-E=#TQ.3DY.#<R"C(W($=.52YS<&%R<V4N;G5M8GET97,]-3$R
M"C(Y($=.52YS<&%R<V4N;V9F<V5T/3,Q-#4W,C@*,C4@1TY5+G-P87)S92YN
M=6UB>71E<STP"C(P(&%T:6UE/3$Q.3@R.3,V,#$*,C`@8W1I;64],3$Y.#(Y
M,S8P,`H`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````'-P87)S90``````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`P,C`P,``Q,#<S,S$P,3$T
M,``P,3$W,C``(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'1I;0``````````````````````````````````
M````,#`P,#`P,``P,#`P,#`P````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````"XO4&%X
M2&5A9&5R<RXS.#8U.2]S<&%R<V4R````````````````````````````````
M````````````````````````````````````````````````````````````
M```````P,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`Q,S$S-P`Q,#<S
M,S$P,3$T,@`P,3,U-C,`('@`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(`,#``````````````
M````````````````````````````````````````````````````````````
M````````````,#`P,#`P,``P,#`P,#`P````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````,C@@1TY5+G-P87)S92YS:7IE/3DY,#`P,#`Q"C(W($=.
M52YS<&%R<V4N;G5M8FQO8VMS/3DY"C(X($=.52YS<&%R<V4N;V9F<V5T/3DY
M.3DS-@HR-R!'3E4N<W!A<G-E+FYU;6)Y=&5S/34Q,@HR.2!'3E4N<W!A<G-E
M+F]F9G-E=#TQ.3DY.#<R"C(W($=.52YS<&%R<V4N;G5M8GET97,]-3$R"C(Y
M($=.52YS<&%R<V4N;V9F<V5T/3(Y.3DX,#@*,C<@1TY5+G-P87)S92YN=6UB
M>71E<STU,3(*,CD@1TY5+G-P87)S92YO9F9S970],SDY.3<T-`HR-R!'3E4N
M<W!A<G-E+FYU;6)Y=&5S/34Q,@HR.2!'3E4N<W!A<G-E+F]F9G-E=#TT.3DY
M-C@P"C(W($=.52YS<&%R<V4N;G5M8GET97,]-3$R"C(Y($=.52YS<&%R<V4N
M;V9F<V5T/34Y.3DV,38*,C<@1TY5+G-P87)S92YN=6UB>71E<STU,3(*,CD@
M1TY5+G-P87)S92YO9F9S970]-CDY.34U,@HR-R!'3E4N<W!A<G-E+FYU;6)Y
M=&5S/34Q,@HR.2!'3E4N<W!A<G-E+F]F9G-E=#TX,#`P,#`P"C(W($=.52YS
M<&%R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-E+F]F9G-E=#TY.#DY.3@P
M.`HR-R!'3E4N<W!A<G-E+FYU;6)Y=&5S/3$Y,PHR,"!A=&EM93TQ,3DX,CDS
M-C`R"C(P(&-T:6UE/3$Q.3@R.3,V,#$*````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````<W!A<G-E,@``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,30R,S`Q`#$P-S,S,3`Q
M,30Q`#`Q,C`Q-``@,```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!U<W1A<@`P,'1I;0``````````````
M````````````````````````=&EM````````````````````````````````
M```````P,#`P,#`P`#`P,#`P,#``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````N+U!A>$AE861E<G,N,S@V-3DO
M;F]N+7-P87)S90``````````````````````````````````````````````
M````````````````````````````````````````````````,#`P,#8T-``P
M,#`Q-S4P`#`P,#$W-3``,#`P,#`P,#`P-3``,3`W,S,Q,#$Q-#(`,#$T,C4W
M`"!X````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````'5S=&%R`#`P````````````````````````````````
M`````````````````````````````````````````````````````#`P,#`P
M,#``,#`P,#`P,```````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````#(P
M(&%T:6UE/3$Q.3@R.3,V,#$*,C`@8W1I;64],3$Y.#(Y,S8P,0H`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````;F]N+7-P87)S90``````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q
M-S4P`#`P,#`P,#`P,#`P`#$P-S,S,3`Q,30Q`#`Q,C4P-P`@,```````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!U<W1A<@`P,'1I;0``````````````````````````````````````=&EM
M```````````````````````````````````````P,#`P,#`P`#`P,#`P,#``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
H````````````````````````````````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu 189308 2009-03-03 17:02:51Z kientzle $
begin 644 test_read_format_gtar_sparse_1_17_posix01.tar
M+B]087A(96%D97)S+C,X-C8Q+W-P87)S90``````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,C4R
M`#$P-S,S,3`Q,30R`#`Q,S0V-``@>```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,```````
M````````````````````````````````````````````````````````````
M```````````````````P,#`P,#`P`#`P,#`P,#``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````R-R!'3E4N<W!A<G-E+G-I>F4],S$T-3<R.`HR
M-B!'3E4N<W!A<G-E+FYU;6)L;V-K<STS"C(V($=.52YS<&%R<V4N;F%M93US
M<&%R<V4*-3$@1TY5+G-P87)S92YM87`].3DY.3,V+#4Q,BPQ.3DY.#<R+#4Q
M,BPS,30U-S(X+#`*,C`@871I;64],3$Y.#(Y,S8P,@HR,"!C=&EM93TQ,3DX
M,CDS-C`P"@``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````"XO1TY54W!A<G-E
M1FEL92XS.#8V,2]S<&%R<V4`````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`P,C`P,``Q,#<S,S$P,3$T
M,``P,34Q-3(`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'1I;0``````````````````````````````````
M````,#`P,#`P,``P,#`P,#`P````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````"XO4&%X
M2&5A9&5R<RXS.#8V,2]S<&%R<V4R````````````````````````````````
M````````````````````````````````````````````````````````````
M```````P,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`P,C8Q,@`Q,#<S
M,S$P,3$T,P`P,3,U-3$`('@`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(`,#``````````````
M````````````````````````````````````````````````````````````
M````````````,#`P,#`P,``P,#`P,#`P````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````,C@@1TY5+G-P87)S92YS:7IE/3DY,#`P,#`Q"C(W($=.
M52YS<&%R<V4N;G5M8FQO8VMS/3DY"C(W($=.52YS<&%R<V4N;F%M93US<&%R
M<V4R"C$R.38@1TY5+G-P87)S92YM87`].3DY.3,V+#4Q,BPQ.3DY.#<R+#4Q
M,BPR.3DY.#`X+#4Q,BPS.3DY-S0T+#4Q,BPT.3DY-C@P+#4Q,BPU.3DY-C$V
M+#4Q,BPV.3DY-34R+#4Q,BPX,#`P,#`P+#4Q,BPX.3DY.3,V+#4Q,BPY.3DY
M.#<R+#4Q,BPQ,#DY.3@P."PU,3(L,3$Y.3DW-#0L-3$R+#$R.3DY-C@P+#4Q
M,BPQ,SDY.38Q-BPU,3(L,30Y.3DU-3(L-3$R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PU,3(L-S(P,#`P,#`L
M-3$R+#<R.3DY.3,V+#4Q,BPW,SDY.3@W,BPU,3(L-S0Y.3DX,#@L-3$R+#<U
M.3DY-S0T+#4Q,BPW-CDY.38X,"PU,3(L-S<Y.3DV,38L-3$R+#<X.3DY-34R
M+#4Q,BPX,#`P,#`P,"PU,3(L.#`Y.3DY,S8L-3$R+#@Q.3DY.#<R+#4Q,BPX
M,CDY.3@P."PU,3(L.#,Y.3DW-#0L-3$R+#@T.3DY-C@P+#4Q,BPX-3DY.38Q
M-BPU,3(L.#8Y.3DU-3(L-3$R+#@X,#`P,#`P+#4Q,BPX.#DY.3DS-BPU,3(L
M.#DY.3DX-S(L-3$R+#DP.3DY.#`X+#4Q,BPY,3DY.3<T-"PU,3(L.3(Y.3DV
M.#`L-3$R+#DS.3DY-C$V+#4Q,BPY-#DY.34U,BPU,3(L.38P,#`P,#`L-3$R
M+#DV.3DY.3,V+#4Q,BPY-SDY.3@W,BPU,3(L.3@Y.3DX,#@L,3DS"C(P(&%T
M:6UE/3$Q.3@R.3,V,#(*,C`@8W1I;64],3$Y.#(Y,S8P,0H`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````+B]'3E53<&%R<V5&:6QE+C,X-C8Q+W-P87)S
M93(`````````````````````````````````````````````````````````
M`````````````````````````````````````#`P,#`V-#0`,#`P,3<U,``P
M,#`Q-S4P`#`P,#`P,30R,S`Q`#$P-S,S,3`Q,30Q`#`Q-3(T-@`@,```````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!U<W1A<@`P,'1I;0``````````````````````````````````````
M=&EM```````````````````````````````````````P,#`P,#`P`#`P,#`P
M,#``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````N+U!A>$AE861E<G,N,S@V-C$O;F]N+7-P87)S90``````````
M````````````````````````````````````````````````````````````
M````````````````````````,#`P,#8T-``P,#`Q-S4P`#`P,#$W-3``,#`P
M,#`P,#`P-3``,3`W,S,Q,#$Q-#,`,#$T,C4Q`"!X````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````'5S=&%R
M`#`P````````````````````````````````````````````````````````
M`````````````````````````````#`P,#`P,#``,#`P,#`P,```````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````#(P(&%T:6UE/3$Q.3@R.3,V,#$*
M,C`@8W1I;64],3$Y.#(Y,S8P,0H`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````;F]N
M+7-P87)S90``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#`P`#$P
M-S,S,3`Q,30Q`#`Q,C4P-P`@,```````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!U<W1A<@`P,'1I;0``````
M````````````````````````````````=&EM````````````````````````
M```````````````P,#`P,#`P`#`P,#`P,#``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
/````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu 189308 2009-03-03 17:02:51Z kientzle $
begin 644 test_read_format_gtar_sparse_1_17_posix10.tar
M+B]087A(96%D97)S+C,X-C8S+W-P87)S90``````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,C$U
M`#$P-S,S,3`Q,30S`#`Q,S0V-@`@>```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,```````
M````````````````````````````````````````````````````````````
M```````````````````P,#`P,#`P`#`P,#`P,#``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````R,B!'3E4N<W!A<G-E+FUA:F]R/3$*,C(@1TY5
M+G-P87)S92YM:6YO<CTP"C(V($=.52YS<&%R<V4N;F%M93US<&%R<V4*,S$@
M1TY5+G-P87)S92YR96%L<VEZ93TS,30U-S(X"C(P(&%T:6UE/3$Q.3@R.3,V
M,#(*,C`@8W1I;64],3$Y.#(Y,S8P,`H`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````"XO1TY54W!A<G-E
M1FEL92XS.#8V,R]S<&%R<V4`````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`P,S`P,``Q,#<S,S$P,3$T
M,``P,34Q-34`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'1I;0``````````````````````````````````
M````,#`P,#`P,``P,#`P,#`P````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````,PHY.3DY,S8*-3$R"C$Y.3DX-S(*-3$R"C,Q-#4W,C@*,`H`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````+B]087A(96%D97)S+C,X-C8S+W-P87)S93(`````````
M````````````````````````````````````````````````````````````
M`````````````````````````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P
M`#`P,#`P,#`P,C$W`#$P-S,S,3`Q,30S`#`Q,S4U,@`@>```````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!U
M<W1A<@`P,```````````````````````````````````````````````````
M```````````````````````````````````P,#`P,#`P`#`P,#`P,#``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````R,B!'3E4N<W!A<G-E+FUA
M:F]R/3$*,C(@1TY5+G-P87)S92YM:6YO<CTP"C(W($=.52YS<&%R<V4N;F%M
M93US<&%R<V4R"C,R($=.52YS<&%R<V4N<F5A;'-I>F4].3DP,#`P,#$*,C`@
M871I;64],3$Y.#(Y,S8P,PHR,"!C=&EM93TQ,3DX,CDS-C`Q"@``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`"XO1TY54W!A<G-E1FEL92XS.#8V,R]S<&%R<V4R````````````````````
M````````````````````````````````````````````````````````````
M```````````````P,#`P-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#$T-3,P
M,0`Q,#<S,S$P,3$T,0`P,34R-3,`(#``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````=7-T87(`,#!T:6T`
M`````````````````````````````````````'1I;0``````````````````
M````````````````````,#`P,#`P,``P,#`P,#`P````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````.3D*.3DY.3,V"C4Q,@HQ.3DY.#<R"C4Q,@HR
M.3DY.#`X"C4Q,@HS.3DY-S0T"C4Q,@HT.3DY-C@P"C4Q,@HU.3DY-C$V"C4Q
M,@HV.3DY-34R"C4Q,@HX,#`P,#`P"C4Q,@HX.3DY.3,V"C4Q,@HY.3DY.#<R
M"C4Q,@HQ,#DY.3@P.`HU,3(*,3$Y.3DW-#0*-3$R"C$R.3DY-C@P"C4Q,@HQ
M,SDY.38Q-@HU,3(*,30Y.3DU-3(*-3$R"C$V,#`P,#`P"C4Q,@HQ-CDY.3DS
M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DY.3,V"C4Q,@HW,SDY.3@W,@HU,3(*-S0Y.3DX,#@*-3$R"C<U.3DY
M-S0T"C4Q,@HW-CDY.38X,`HU,3(*-S<Y.3DV,38*-3$R"C<X.3DY-34R"C4Q
M,@HX,#`P,#`P,`HU,3(*.#`Y.3DY,S8*-3$R"C@Q.3DY.#<R"C4Q,@HX,CDY
M.3@P.`HU,3(*.#,Y.3DW-#0*-3$R"C@T.3DY-C@P"C4Q,@HX-3DY.38Q-@HU
M,3(*.#8Y.3DU-3(*-3$R"C@X,#`P,#`P"C4Q,@HX.#DY.3DS-@HU,3(*.#DY
M.3DX-S(*-3$R"CDP.3DY.#`X"C4Q,@HY,3DY.3<T-`HU,3(*.3(Y.3DV.#`*
M-3$R"CDS.3DY-C$V"C4Q,@HY-#DY.34U,@HU,3(*.38P,#`P,#`*-3$R"CDV
M.3DY.3,V"C4Q,@HY-SDY.3@W,@HU,3(*.3@Y.3DX,#@*,3DS"@``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````&$`````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!A````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!A````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!A````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!A````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````80``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````80``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````80``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````80``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````80``````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&$`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````&$`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````&$`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````&$`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&$`````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!A````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!A````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!A````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!A````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!A````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````80``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````80``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````80``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````80``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````80``
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````&$`````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````&$`````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````&$`````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````&$`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````&$`
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!A````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!A````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!A````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!A````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!A
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````80``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````80``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````80``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````80``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M80``````````````````````````````````````````````````````````
M`````````````````````````&$`````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````&$`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`&$`````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````&$`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````+B]0
M87A(96%D97)S+C,X-C8S+VYO;BUS<&%R<V4`````````````````````````
M````````````````````````````````````````````````````````````
M`````````#`P,#`V-#0`,#`P,3<U,``P,#`Q-S4P`#`P,#`P,#`P,#4P`#$P
M-S,S,3`Q,30S`#`Q-#(U,P`@>```````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!U<W1A<@`P,```````````
M````````````````````````````````````````````````````````````
M```````````````P,#`P,#`P`#`P,#`P,#``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````R,"!A=&EM93TQ,3DX,CDS-C`Q"C(P(&-T:6UE/3$Q
M.3@R.3,V,#$*````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````&YO;BUS<&%R<V4`````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````P,#`P
M-C0T`#`P,#$W-3``,#`P,3<U,``P,#`P,#`P,#`P,``Q,#<S,S$P,3$T,0`P
M,3(U,#<`(#``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````=7-T87(`,#!T:6T`````````````````````
M`````````````````'1I;0``````````````````````````````````````
M,#`P,#`P,``P,#`P,#`P````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
/````````````````````
`
end

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$;(44890DQ!!`@01BCA
MA!1***`43S11X88<1G@0#`6!Z-&!``1`XH$((`"``@4I,$%"%0PD`@`7%%2C
MB@*IF,8"!UR``0O@"!#0B0=V:.212":IY)),-NGDDU!&*>645%9IY952-K%$
M$E,\8<04('#Y!`@YV&`##"\@\24(1B3!1!%39#$%%45H*$05;A)1A!0@F`#"
MA44,\804#PK8@A0O$&%%H5(4$005@X*`PA`I@!!##CG,`$(1+F3Q1!5.'$%$
M$&]*2JFEF-X`@A(N0.&H%%TZ\0*K4PR!A)M,)!$JEKSVRJL,!-800PPPW"##
M##+04,,-!((#+`S"$FLLLLHR"P,X!&:K[;8$`O!LM,4>F^RRS1;IZ[GHIJON
MNNRVZ^Z[\,8K+Y/_U;O8/P(2:*"]_/;K[[\`!UR=EDF`T,0;;H#@Q!MV0*CJ
ML3HDJ\.R('RK0!MKI#''&V;,4;$+,+B@:0MO@$!'&7/0T8*"89#QA1EOR-%&
M&'2XH'')80BL\\X\]^SSSV<=6..00!=M]-%()ZWTTDPW[?334$?=&XD!U4BU
MU%AGK?767'?M]==@ARWVV%K/./1`-PZD(X\^`BEDB4,>:+:-`.`8T-H]_A@D
MT26:2/;?@`<N^."$%V[XX8@GKOCBC#?N^..01R[YY)17;OGEF&>N^>:<=^[Y
MYZ"'+OKHI)=N^NFHIZ[ZZJRW[OKKL,<N^^RTUV[[[;CGKOONO/?N^^_`!R_\
M\,07;_SQR">O_/+,-^_\\]!'+_WTU%=O_?789Z_]]MQW[_WWX(<O_OCDEV_^
L^>BGK_[Z[+?O_OOPQR___/37;__]^.>O__[\]^___P`,H``'2,`"&O"`]`,`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_joliet.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL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O__?"/O_SG3__ZV__^^,^__O?/__[[__\`
M&(`".(`$6(`&>(`(F(`*N(`,V(`.^(`0&($2.($46($6>($8F($:N($<V($>
M^($@&((B.((D6((F>((HF((JN((LV((N^((P&(,R.(,T6(,V>(,XF(,ZN(,\
MV(,^^(-`&(1".(1$6(1&>(1(F(1*N(1,V(1.^(10&(52.(546(56>(58F(5:
MN(5<V(5>^(5@&(9B.(9D6(9F>(9HF(9JN(9LV(9N^(9P&(=R.(=T6(=V>(=X
MF(=ZN(=\V(=^^(>`&(B".(B$6(B&>(B(F(B*N(B,V(B.^(B0&(F2.(F46(F6
M>(F8F(F:N(F<V(F>^(F@&(JB.(JD6(JF>(JHF(JJN(JLV(JN^(JP&(NR.(NT
M6(NV>(NXF(NZN(N\V(N^^(O`&(S".(S$6(S&>(S(F(S*N(S,V(S.^(S0&(W2
M.(W46(W6>(W8F(W:N(W<V(W>^(W@&([B.([D6([F>([HF([JN([LV([N^([P
(&(_R.(_T:!4`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_joliet_long.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7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(F@&(JB.(JD6(JF>(JHF(JJN(JLV(JN^(JP&(NR.(NT
M6(NV>(NXF(NZN(N\V(N^^(O`&(S".(S$6(S&>(S(F(S*N(S,V(S.^(S0&(W2
M.(W46(W6>(W8F(W:N(W<V(W>^(W@&([B.([D6([F>([HF([JN([LV([N^([P
M&(_R.(_T6(_V>(_XF(_ZN(_\V(_^^(\`&9`".9`$69`&>9`(F9`*N9`,V9`.
M^9`0&9$2.9$469$6>9$8F9$:N9$<V9$>^9$@&9(B.9(D69(F>9(HF9(JN9(L
MV9(N^9(P&9,R.9,T69,V>9,XF9,ZN9,\V9,^^9-`&91".91$691&>91(F91*
MN91,V91.^910&952.9546956>958F95:N95<V95>^95@&99B.99D699F>99H
MF99JN99LV99N^99P&9=R.9=T69=V>9=XF9=ZN9=\V9=^^9>`&9B".9B$69B&
4>9B(F9B*N9B,V9B.^9B0&9F2J90`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_joliet_rockridge.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!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T
M6(NV>(NXF(NZN(N\V(N^^(O`&(S".(S$6(S&>(S(F(S*N(S,V(S.^(S0&(W2
M.(W46(W6>(W8F(W:N(W<V(W>^(W@&([B.([D6([F>([HF([JN([LV([N^([P
M&(_R.(_T6(_V>(_XF(_ZN(_\V(_^^(\`&9`".9`$69`&>9`(F9`*N9`,V9`.
M^9`0&9$2.9$469$6>9$8F9$:N9$<V9$>^9$@&9(B.9(D69(F>9(HF9(JN9(L
.V9(N^9(P&9,R.9,T^8(`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_multi_extent.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$;(44890DQ!!`@01BCA
MA!1***`43S11X88<1GB0#0<*%(`-'X48@(D`((````H4I``%"5DPD`@`<%"0
MC2L*M*(1`0B0```!D"!`0"8>V.&12":IY)),-NGDDU!&*>645%9IY9583LE$
M$D($(<402"1A11$@)#'%$R#D8(,-,(!@1!),%#%%%E-0482&5TB1A)U29.GG
MGX`&*FB2,A"80PP%WD!@#&PJ"@,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"```
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_rockridge.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$;(44890DQ!!`@01BCA
MA!1***`43S11X88<1GA0#Q@,A$$/'QT(0``F'H@``@!84)`%$R14P4`B`'!!
M03>R*!"+1@0@0`(GDB!`0"D>V.&12":IY)),-NGDDU!&*>645%9IY9583MG$
M$DE,\8014X#0Y1,@Y&"##3"\@`28(!B1!!-%3)'%%%04H:$05;Q)1!%2@&`"
M"!<6,<034CPH8`M2O$"$%89*44005!`*`@I#I`!"##GD,`,(1;B0Q1-5.'$$
M$4'`.6FEEV9Z`PA*N`#%HU)XZ<0+K4XQ!!)O,I&$J%GVZFNO,A"8`PPYR'`#
MIC'4,$.P,)#`[+#%'IM#LLL22`*!V&:K+8$`/$NLL<@JRRP)1OYJ[KGHIJON
MNNRVZ^Z[\,;;Y'_T+O:/@`0:6.^^_/;K[[\`5[=E$B!,48<;!9<!!PC&IJI#
MLCHLR["P"K2Q1AISO&'&'`R[4"`(B()<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$A/L2(.!$KXD7,B!NQ(W[$D#@22^))3(DKL26^Q)@X$VOB3<R).[$G_L2@
M.!2+XE%,BDNQ*3[%J#@5J^)5S(I;L2M^Q;`X%LOB64R+:[$MOL6X.!?KXO`+
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_rockridge_ce.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$;(44890DQ!!`@01BCA
MA!1***`43S11X88<1GC0+06!Z-&!``1`XH$((`"`!059,$%"%0PD`@`7%%2C
MB@*I:$0``B10(@D"!'3B@1T6:>212":IY)),-NGDDU!&*>645%9I991-+)'$
M%$\8,04(6SX!0@XVV`##"TAX"8(123!1Q!193$%%$1H*446;1!0A!0@F@'!A
M$4,\(<6#`K8@Q0M$6$&H%$4$086@(*`P1`H@Q)!##C.`4(0+63Q1A1-'$!&$
MFY%.6NFE-X"@A`M0-"H%ETZ\L.H40R#1)A-)@'KEKKSN*@.!.<10H`PQR%##
MKV;"0,*O,`0[;+''PI`L"016:^VU!`+`K+/%0HL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0AT[THAO]Z$A/NM*7SO2F._WI4(^ZU*=.]:I;_>I8S[K6M\[U
MKGO]ZV`/N]C'3O:RF_WL:$^[VM?.]K:[_>UPC[O<YT[WNMO][GC/N][WSO>^
M^_WO@`^\X`=/^,(;_O"(3[SB%\_XQCO^\9"/O.0G3_G*6_[RF,^\YC?/^<Y[
M_O.@#[WH1T_ZTIO^]*A/O>I7S_K6N_[UL(^][&=/^]K;_O:XS[WN=\_[WOO^
M]\`/OO"'3_SB&__XR$^^\I?/_.8[__G0C[[TIT_]ZEO_^MC/OO:WS_WN>__[
MX`^_^,=/_O*;__SH3[_ZU\_^]KO__?"/O_SG3__ZV__^^,^__O?/__[[__\`
M&(`".(`$6(`&>(`(F(`*N(`,V(`.^(`0&($2.($46($6>($8F($:N($<V($>
M^($@&((B.((D6((F>((HF((JN((LV((N^((P&(,R.(,T6(,V>(,XF(,ZN(,\
MV(,^^(-`&(1".(1$6(1&>(1(F(1*N(1,V(1.^(10&(52.(546(56>(58F(5:
MN(5<V(5>^(5@&(9B.(9D6(9F>(9HF(9JN(9LV(9N^(9P&(=R.(=T6(=V>(=X
MF(=ZN(=\V(=^^(>`&(B".(B$6(B&>(B(F(B*N(B,V(B.^(B0&(F2.(F46(F6
(>(F8F(F:^!,`
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_rockridge_new.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LR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H-^VJW;7+=MNNVWV[
M<#?NRMVY2W?KKMV]NW@W[^K=O<MW^Z[?_;N`-_`*WL%+>`NOX3V\B#?Q*M[%
MRW@;K^-]O)`W\DK>R4MY*Z_EO;R8-_-JWLW+>3NOY_V\H#?TBM[12WI+K^D]
MO:@W]:K>U<MZ6Z_K?;VP-_;*WME+>VNO[;V]N#?WZM[=RWM[K^_]O<`W^`K?
MX4M\BZ_Q/;[(-_DJW^7+?)NO\WV^T#?Z2M_I2WVKK_6]OM@W^VK?[<M]NZ_W
M_;[@-_R*W_%+?LNO^3V_Z#?]JM_URW[;K_M]O_`W_LK?^4M_ZZ_]O;_X-__J
MW_W+?_NO__V_`#@`"^`!3(`+L`$^P`@X`2O@!<R`&[`#?L`0.`)+X`E,@2NP
M!;[`&#@#:^`-S($[L`?^P"`X!(O@$4R"2[`)/L$H.`6KX!7,@ENP"W[!,#@&
MR^`93(-KL`V^P3@X!^O@'<R#>[`/_L%`.`@+X2%,A(NP$3["2#@)*^$ES(2;
ML!-^PE`X"DOA*4R%J[`5OL)8.`MKX2W,A;NP%_["8#@,B^$Q3(;+L!D^PV@X
M#:OA-<R&V[`;?L-P.`[+X3E,A^NP';[#>#@/Z^$]S(?[L!_^PX`X$`OB04R(
M"[$A/L2(.!$KXD7,B!NQ(W[$D#@22^))3(DKL26^Q)@X$VOB3<R).[$G_L2@
M.!2+XE%,BDNQ*3[%J#@5J^)5S(I;L2M^Q;`X%LOB64R+:[$MOL6X.!?KXEW,
MBWNQ+_[%P#@8"^-A3(R+L3$^QL@X&2OC9<R,F[$S?L;0.!I+XVE,C:NQ-;[&
DV#@;:^-MS(V[L3?^QN`X'(OC<4R.R[$Y/L?H.!VKXW7,CKDM
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_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iso.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_iso_zisofs.iso.Z
M'YV0``(*'$BPH,&#"!,J7,BPH<.'$"-*G$BQHL6+&#-JW,BQH\>/($.*'$FR
MI,F3*%.J7,FRI<N7,&/*G$FSILV;.'/JW,FSI\^?0(,*'4JTJ-&C2),J7<JT
MJ=.G4*-*G4JUJM6K6+-JW<JUJ]>O8,.*'4NVK-FS:-.J7<NVK=NW<./*G4NW
MKMV[>//JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ\
MN/'CR),K7\Z\N?/GT*-+GTZ]NO7KV+-KW\Z]N_?OX,.+'T^^O/GSZ-.K7\^^
MO?OW\./+GT^_OOW[^//KW\^_O_^_`0Q!!`PPQ!```$;(44890DQ!!`@01BCA
MA!1***`43S11X88<1GA0+`6!Z-&!``1`XH$((`"`!059,$%"%0PD`@`7%%2C
MB@*I:$0``B10(@D"!'3B@1T6:>212":IY)),-NGDDU!&*>645%9I991-+)'$
M%$\8,04(6SX!0@XVV`##"TAX"8(123!1Q!193$%%$1H*446;1!0A!0@F@'!A
M$4,\(<6#`K8@Q0M$6$&H%$4$086@(*`P1`H@Q)!##C.`4(0+63Q1A1-'$!&$
MFY%.6NFE-X"@A`M0-"H%ETZ\L.H40R#1)A-)@'KEKKSN*@.!.<`0K`PRQ$!#
M#300"`,)OPKK++'&(JLL"<I6:VVU`#0;[+#%'ILL@200V>NXY)9K[KGHIJON
MNNRVZ^Z2_\6[V#\"$FB@O/CFJ^^^_/9;799)@'!%&62`,$49<$`H`PC%ZG"L
MPS`P#*P";:R1QAQOF#$'PRX4"(*A']>11L$Q?'S&R`Q_K`<(+K3\@AX7O^'O
MS#37;//-.)=U8(U""C0``!@(="`124B1\]%()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*A/O>I7S_K6N_[UL(^][&=/^]K;_O:XS[WN=\_[WOO^
M]\`/OO"'3_SB&__XR$^^\I?/_.8[__G0C[[TIT_]ZEO_^MC/OO:WS_WN>__[
MX`^_^,=/_O*;__SH3[_ZU\_^]KO__?"/O_SG3__ZV__^^,^__O?/__[[__\`
M&(`".(`$6(`&>(`(F(`*N(`,V(`.^(`0&($2.($46($6>($8F($:N($<V($>
M^($@&((B.((D6((F>((HF((JN((LV((N^((P&(,R.(,T6(,V>(,XF(,ZN(,\
MV(,^^(-`&(1".(1$6(1&>(1(F(1*N(1,V(1.^(10&(52.(546(56>(58F(5:
MN(5<V(5>^(5@&(9B.(9D6(9F>(9HF(9JN(9LV(9N^(9P&(=R.(=T6(=V>(=X
MF(=ZN(=\V(=^^(>`&(B".(B$6(B&>(B(F(B*N(B,V(B.^(B0&(F2.(F46(F6
@>(F8F(F:N(F<V(F>^(F@&(JB.(JD6(JF>(JHF(JJN'``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_mtree.mtree.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_mtree.mtree.uu 201247 2009-12-30 05:59:21Z kientzle $

begin 644 test_read_format_mtree.mtree
M(VUT<F5E"F9I;&4@='EP93UF:6QE('5I9#TQ."!M;V1E/3`Q,C,@<VEZ93TS
M"F1I<B!T>7!E/61I<@H@9FEL95PP-#!W:71H7#`T,'-P86-E('1Y<&4]9FEL
M92!U:60],3@*("XN"F9I;&5<,#0P=VET:%PP-#!S<&%C92!T>7!E/69I;&4*
M9&ER,B!T>7!E/61I<@H@9&ER,V$@='EP93UD:7(*("!I;F1I<C-A('1Y<&4]
M9FEL90ID:7(R+V9U;&QI;F1I<C(@='EP93UF:6QE(&UO9&4],#<W-PH@("XN
M"B!I;F1I<C(@='EP93UF:6QE"B!D:7(S8B!T>7!E/61I<@H@(&EN9&ER,V(@
M='EP93UF:6QE"B`@+BX*("XN"FYO=&EN9&ER('1Y<&4]9FEL90ID:7(R+V9U
3;&QI;F1I<C(@;6]D93TP-C0T"@``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.data.Z.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_raw.data.Z.uu 191594 2009-04-27 20:09:05Z kientzle $
begin 644 test_read_format_raw.data.Z
('YV09MZ\40``
`
end

File Added: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_raw.data.uu
$FreeBSD: head/lib/libarchive/test/test_read_format_raw.data.uu 191594 2009-04-27 20:09:05Z kientzle $
begin 644 test_read_format_raw.data
$9F]O"@``
`
end

File Deleted: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/err.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "lafe_platform.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "err.h"

const char *lafe_progname;

static void
lafe_vwarnc(int code, const char *fmt, va_list ap)
{
	fprintf(stderr, "%s: ", lafe_progname);
	vfprintf(stderr, fmt, ap);
	if (code != 0)
		fprintf(stderr, ": %s", strerror(code));
	fprintf(stderr, "\n");
}

void
lafe_warnc(int code, const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	lafe_vwarnc(code, fmt, ap);
	va_end(ap);
}

void
lafe_errc(int eval, int code, const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	lafe_vwarnc(code, fmt, ap);
	va_end(ap);
	exit(eval);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/err.h
/*-
 * Copyright (c) 2009 Joerg Sonnenberger
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef LAFE_ERR_H
#define LAFE_ERR_H

#if defined(__GNUC__) && (__GNUC__ > 2 || \
                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define __LA_DEAD       __attribute__((__noreturn__))
#else
#define __LA_DEAD
#endif

extern const char *lafe_progname;

void	lafe_warnc(int code, const char *fmt, ...);
void	lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD;

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/lafe_platform.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD: src/usr.bin/cpio/cpio_platform.h,v 1.2 2008/12/06 07:15:42 kientzle Exp $
 */

/*
 * This header is the first thing included in any of the libarchive_fe
 * source files.  As far as possible, platform-specific issues should
 * be dealt with here and not within individual source files.
 */

#ifndef LAFE_PLATFORM_H_INCLUDED
#define	LAFE_PLATFORM_H_INCLUDED

#if defined(PLATFORM_CONFIG_H)
/* Use hand-built config.h in environments that need it. */
#include PLATFORM_CONFIG_H
#else
/* Read config.h or die trying. */
#include "config.h"
#endif

/* Get a real definition for __FBSDID if we can */
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif

/* If not, define it so as to avoid dangling semicolons. */
#ifndef __FBSDID
#define	__FBSDID(a)     struct _undefined_hack
#endif

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/line_reader.c
/*-
 * Copyright (c) 2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "lafe_platform.h"
__FBSDID("$FreeBSD$");

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "err.h"
#include "line_reader.h"

#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
#define strdup _strdup
#endif

/*
 * Read lines from file and do something with each one.  If option_null
 * is set, lines are terminated with zero bytes; otherwise, they're
 * terminated with newlines.
 *
 * This uses a self-sizing buffer to handle arbitrarily-long lines.
 */
struct lafe_line_reader {
	FILE *f;
	char *buff, *buff_end, *line_start, *line_end, *p;
	char *pathname;
	size_t buff_length;
	int nullSeparator; /* Lines separated by null, not CR/CRLF/etc. */
	int ret;
};

struct lafe_line_reader *
lafe_line_reader(const char *pathname, int nullSeparator)
{
	struct lafe_line_reader *lr;

	lr = calloc(1, sizeof(*lr));
	if (lr == NULL)
		lafe_errc(1, ENOMEM, "Can't open %s", pathname);

	lr->nullSeparator = nullSeparator;
	lr->pathname = strdup(pathname);

	if (strcmp(pathname, "-") == 0)
		lr->f = stdin;
	else
		lr->f = fopen(pathname, "r");
	if (lr->f == NULL)
		lafe_errc(1, errno, "Couldn't open %s", pathname);
	lr->buff_length = 8192;
	lr->buff = malloc(lr->buff_length);
	if (lr->buff == NULL)
		lafe_errc(1, ENOMEM, "Can't read %s", pathname);
	lr->line_start = lr->line_end = lr->buff_end = lr->buff;

	return (lr);
}

const char *
lafe_line_reader_next(struct lafe_line_reader *lr)
{
	size_t bytes_wanted, bytes_read, new_buff_size;
	char *line_start, *p;

	for (;;) {
		/* If there's a line in the buffer, return it immediately. */
		while (lr->line_end < lr->buff_end) {
			if (lr->nullSeparator) {
				if (*lr->line_end == '\0') {
					line_start = lr->line_start;
					lr->line_start = lr->line_end + 1;
					lr->line_end = lr->line_start;
					return (line_start);
				}
			} else if (*lr->line_end == '\x0a' || *lr->line_end == '\x0d') {
				*lr->line_end = '\0';
				line_start = lr->line_start;
				lr->line_start = lr->line_end + 1;
				lr->line_end = lr->line_start;
				if (line_start[0] != '\0')
					return (line_start);
			}
			lr->line_end++;
		}

		/* If we're at end-of-file, process the final data. */
		if (lr->f == NULL) {
			/* If there's more text, return one last line. */
			if (lr->line_end > lr->line_start) {
				*lr->line_end = '\0';
				line_start = lr->line_start;
				lr->line_start = lr->line_end + 1;
				lr->line_end = lr->line_start;
				return (line_start);
			}
			/* Otherwise, we're done. */
			return (NULL);
		}

		/* Buffer only has part of a line. */
		if (lr->line_start > lr->buff) {
			/* Move a leftover fractional line to the beginning. */
			memmove(lr->buff, lr->line_start,
			    lr->buff_end - lr->line_start);
			lr->buff_end -= lr->line_start - lr->buff;
			lr->line_end -= lr->line_start - lr->buff;
			lr->line_start = lr->buff;
		} else {
			/* Line is too big; enlarge the buffer. */
			new_buff_size = lr->buff_length * 2;
			if (new_buff_size <= lr->buff_length)
				lafe_errc(1, ENOMEM,
				    "Line too long in %s", lr->pathname);
			lr->buff_length = new_buff_size;
			p = realloc(lr->buff, new_buff_size);
			if (p == NULL)
				lafe_errc(1, ENOMEM,
				    "Line too long in %s", lr->pathname);
			lr->buff_end = p + (lr->buff_end - lr->buff);
			lr->line_end = p + (lr->line_end - lr->buff);
			lr->line_start = lr->buff = p;
		}

		/* Get some more data into the buffer. */
		bytes_wanted = lr->buff + lr->buff_length - lr->buff_end;
		bytes_read = fread(lr->buff_end, 1, bytes_wanted, lr->f);
		lr->buff_end += bytes_read;

		if (ferror(lr->f))
			lafe_errc(1, errno, "Can't read %s", lr->pathname);
		if (feof(lr->f)) {
			if (lr->f != stdin)
				fclose(lr->f);
			lr->f = NULL;
		}
	}
}

void
lafe_line_reader_free(struct lafe_line_reader *lr)
{
	free(lr->buff);
	free(lr->pathname);
	free(lr);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/line_reader.h
/*-
 * Copyright (c) 2009 Joerg Sonnenberger
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef LAFE_LINE_READER_H
#define LAFE_LINE_READER_H

struct lafe_line_reader;

struct lafe_line_reader *lafe_line_reader(const char *, int nullSeparator);
const char *lafe_line_reader_next(struct lafe_line_reader *);
void	lafe_line_reader_free(struct lafe_line_reader *);

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/Attic/matching.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "lafe_platform.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/matching.c,v 1.2 2008/06/21 02:20:20 kientzle Exp $");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "err.h"
#include "line_reader.h"
#include "matching.h"
#include "pathmatch.h"

struct match {
	struct match	 *next;
	int		  matches;
	char		  pattern[1];
};

struct lafe_matching {
	struct match	 *exclusions;
	int		  exclusions_count;
	struct match	 *inclusions;
	int		  inclusions_count;
	int		  inclusions_unmatched_count;
};

static void	add_pattern(struct match **list, const char *pattern);
static void	initialize_matching(struct lafe_matching **);
static int	match_exclusion(struct match *, const char *pathname);
static int	match_inclusion(struct match *, const char *pathname);

/*
 * The matching logic here needs to be re-thought.  I started out to
 * try to mimic gtar's matching logic, but it's not entirely
 * consistent.  In particular 'tar -t' and 'tar -x' interpret patterns
 * on the command line as anchored, but --exclude doesn't.
 */

/*
 * Utility functions to manage exclusion/inclusion patterns
 */

int
lafe_exclude(struct lafe_matching **matching, const char *pattern)
{

	if (*matching == NULL)
		initialize_matching(matching);
	add_pattern(&((*matching)->exclusions), pattern);
	(*matching)->exclusions_count++;
	return (0);
}

int
lafe_exclude_from_file(struct lafe_matching **matching, const char *pathname)
{
	struct lafe_line_reader *lr;
	const char *p;
	int ret = 0;

	lr = lafe_line_reader(pathname, '\n');
	while ((p = lafe_line_reader_next(lr)) != NULL) {
		if (lafe_exclude(matching, p) != 0)
			ret = -1;
	}
	lafe_line_reader_free(lr);
	return (ret);
}

int
lafe_include(struct lafe_matching **matching, const char *pattern)
{

	if (*matching == NULL)
		initialize_matching(matching);
	add_pattern(&((*matching)->inclusions), pattern);
	(*matching)->inclusions_count++;
	(*matching)->inclusions_unmatched_count++;
	return (0);
}

int
lafe_include_from_file(struct lafe_matching **matching, const char *pathname,
    int nullSeparator)
{
	struct lafe_line_reader *lr;
	const char *p;
	int ret = 0;

	lr = lafe_line_reader(pathname, nullSeparator);
	while ((p = lafe_line_reader_next(lr)) != NULL) {
		if (lafe_include(matching, p) != 0)
			ret = -1;
	}
	lafe_line_reader_free(lr);
	return (ret);
}

static void
add_pattern(struct match **list, const char *pattern)
{
	struct match *match;
	size_t len;

	len = strlen(pattern);
	match = malloc(sizeof(*match) + len + 1);
	if (match == NULL)
		lafe_errc(1, errno, "Out of memory");
	strcpy(match->pattern, pattern);
	/* Both "foo/" and "foo" should match "foo/bar". */
	if (len && match->pattern[len - 1] == '/')
		match->pattern[strlen(match->pattern)-1] = '\0';
	match->next = *list;
	*list = match;
	match->matches = 0;
}


int
lafe_excluded(struct lafe_matching *matching, const char *pathname)
{
	struct match *match;
	struct match *matched;

	if (matching == NULL)
		return (0);

	/* Exclusions take priority */
	for (match = matching->exclusions; match != NULL; match = match->next){
		if (match_exclusion(match, pathname))
			return (1);
	}

	/* Then check for inclusions */
	matched = NULL;
	for (match = matching->inclusions; match != NULL; match = match->next){
		if (match_inclusion(match, pathname)) {
			/*
			 * If this pattern has never been matched,
			 * then we're done.
			 */
			if (match->matches == 0) {
				match->matches++;
				matching->inclusions_unmatched_count--;
				return (0);
			}
			/*
			 * Otherwise, remember the match but keep checking
			 * in case we can tick off an unmatched pattern.
			 */
			matched = match;
		}
	}
	/*
	 * We didn't find a pattern that had never been matched, but
	 * we did find a match, so count it and exit.
	 */
	if (matched != NULL) {
		matched->matches++;
		return (0);
	}

	/* If there were inclusions, default is to exclude. */
	if (matching->inclusions != NULL)
	    return (1);

	/* No explicit inclusions, default is to match. */
	return (0);
}

/*
 * This is a little odd, but it matches the default behavior of
 * gtar.  In particular, 'a*b' will match 'foo/a1111/222b/bar'
 *
 */
static int
match_exclusion(struct match *match, const char *pathname)
{
	return (lafe_pathmatch(match->pattern,
		    pathname,
		    PATHMATCH_NO_ANCHOR_START | PATHMATCH_NO_ANCHOR_END));
}

/*
 * Again, mimic gtar:  inclusions are always anchored (have to match
 * the beginning of the path) even though exclusions are not anchored.
 */
static int
match_inclusion(struct match *match, const char *pathname)
{
#if 0
	return (lafe_pathmatch(match->pattern, pathname, 0));
#else
	return (lafe_pathmatch(match->pattern, pathname, PATHMATCH_NO_ANCHOR_END));
#endif	
}

void
lafe_cleanup_exclusions(struct lafe_matching **matching)
{
	struct match *p, *q;

	if (*matching == NULL)
		return;

	for (p = (*matching)->inclusions; p != NULL; ) {
		q = p;
		p = p->next;
		free(q);
	}

	for (p = (*matching)->exclusions; p != NULL; ) {
		q = p;
		p = p->next;
		free(q);
	}

	free(*matching);
	*matching = NULL;
}

static void
initialize_matching(struct lafe_matching **matching)
{
	*matching = calloc(sizeof(**matching), 1);
	if (*matching == NULL)
		lafe_errc(1, errno, "No memory");
}

int
lafe_unmatched_inclusions(struct lafe_matching *matching)
{

	if (matching == NULL)
		return (0);
	return (matching->inclusions_unmatched_count);
}

int
lafe_unmatched_inclusions_warn(struct lafe_matching *matching, const char *msg)
{
	struct match *p;

	if (matching == NULL)
		return (0);

	for (p = matching->inclusions; p != NULL; p = p->next) {
		if (p->matches == 0)
			lafe_warnc(0, "%s: %s", p->pattern, msg);
	}

	return (matching->inclusions_unmatched_count);
}

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/Attic/matching.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#ifndef MATCHING_H
#define MATCHING_H

struct lafe_matching;

int	lafe_exclude(struct lafe_matching **matching, const char *pattern);
int	lafe_exclude_from_file(struct lafe_matching **matching,
			       const char *pathname);
int	lafe_include(struct lafe_matching **matching, const char *pattern);
int	lafe_include_from_file(struct lafe_matching **matching,
			       const char *pathname, int nullSeparator);

int	lafe_excluded(struct lafe_matching *, const char *pathname);
void	lafe_cleanup_exclusions(struct lafe_matching **);
int	lafe_unmatched_inclusions(struct lafe_matching *);
int	lafe_unmatched_inclusions_warn(struct lafe_matching *, const char *msg);

#endif

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/Attic/pathmatch.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "lafe_platform.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "pathmatch.h"

/*
 * Check whether a character 'c' is matched by a list specification [...]:
 *    * Leading '!' negates the class.
 *    * <char>-<char> is a range of characters
 *    * \<char> removes any special meaning for <char>
 *
 * Some interesting boundary cases:
 *   a-d-e is one range (a-d) followed by two single characters - and e.
 *   \a-\d is same as a-d
 *   a\-d is three single characters: a, d, -
 *   Trailing - is not special (so [a-] is two characters a and -).
 *   Initial - is not special ([a-] is same as [-a] is same as [\\-a])
 *   This function never sees a trailing \.
 *   [] always fails
 *   [!] always succeeds
 */
static int
pm_list(const char *start, const char *end, const char c, int flags)
{
	const char *p = start;
	char rangeStart = '\0', nextRangeStart;
	int match = 1, nomatch = 0;

	/* This will be used soon... */
	(void)flags; /* UNUSED */

	/* If this is a negated class, return success for nomatch. */
	if (*p == '!' && p < end) {
		match = 0;
		nomatch = 1;
		++p;
	}

	while (p < end) {
		nextRangeStart = '\0';
		switch (*p) {
		case '-':
			/* Trailing or initial '-' is not special. */
			if ((rangeStart == '\0') || (p == end - 1)) {
				if (*p == c)
					return (match);
			} else {
				char rangeEnd = *++p;
				if (rangeEnd == '\\')
					rangeEnd = *++p;
				if ((rangeStart <= c) && (c <= rangeEnd))
					return (match);
			}
			break;
		case '\\':
			++p;
			/* Fall through */
		default:
			if (*p == c)
				return (match);
			nextRangeStart = *p; /* Possible start of range. */
		}
		rangeStart = nextRangeStart;
		++p;
	}
	return (nomatch);
}

/*
 * If s is pointing to "./", ".//", "./././" or the like, skip it.
 */
static const char *
pm_slashskip(const char *s) {
	while ((*s == '/')
	    || (s[0] == '.' && s[1] == '/')
	    || (s[0] == '.' && s[1] == '\0'))
		++s;
	return (s);
}

static int
pm(const char *p, const char *s, int flags)
{
	const char *end;

	/*
	 * Ignore leading './', './/', '././', etc.
	 */
	if (s[0] == '.' && s[1] == '/')
		s = pm_slashskip(s + 1);
	if (p[0] == '.' && p[1] == '/')
		p = pm_slashskip(p + 1);

	for (;;) {
		switch (*p) {
		case '\0':
			if (s[0] == '/') {
				if (flags & PATHMATCH_NO_ANCHOR_END)
					return (1);
				/* "dir" == "dir/" == "dir/." */
				s = pm_slashskip(s);
			}
			return (*s == '\0');
		case '?':
			/* ? always succeds, unless we hit end of 's' */
			if (*s == '\0')
				return (0);
			break;
		case '*':
			/* "*" == "**" == "***" ... */
			while (*p == '*')
				++p;
			/* Trailing '*' always succeeds. */
			if (*p == '\0')
				return (1);
			while (*s) {
				if (lafe_pathmatch(p, s, flags))
					return (1);
				++s;
			}
			return (0);
		case '[':
			/*
			 * Find the end of the [...] character class,
			 * ignoring \] that might occur within the class.
			 */
			end = p + 1;
			while (*end != '\0' && *end != ']') {
				if (*end == '\\' && end[1] != '\0')
					++end;
				++end;
			}
			if (*end == ']') {
				/* We found [...], try to match it. */
				if (!pm_list(p + 1, end, *s, flags))
					return (0);
				p = end; /* Jump to trailing ']' char. */
				break;
			} else
				/* No final ']', so just match '['. */
				if (*p != *s)
					return (0);
			break;
		case '\\':
			/* Trailing '\\' matches itself. */
			if (p[1] == '\0') {
				if (*s != '\\')
					return (0);
			} else {
				++p;
				if (*p != *s)
					return (0);
			}
			break;
		case '/':
			if (*s != '/' && *s != '\0')
				return (0);
			/* Note: pattern "/\./" won't match "/";
			 * pm_slashskip() correctly stops at backslash. */
			p = pm_slashskip(p);
			s = pm_slashskip(s);
			if (*p == '\0' && (flags & PATHMATCH_NO_ANCHOR_END))
				return (1);
			--p; /* Counteract the increment below. */
			--s;
			break;
		case '$':
			/* '$' is special only at end of pattern and only
			 * if PATHMATCH_NO_ANCHOR_END is specified. */
			if (p[1] == '\0' && (flags & PATHMATCH_NO_ANCHOR_END)){
				/* "dir" == "dir/" == "dir/." */
				return (*pm_slashskip(s) == '\0');
			}
			/* Otherwise, '$' is not special. */
			/* FALL THROUGH */
		default:
			if (*p != *s)
				return (0);
			break;
		}
		++p;
		++s;
	}
}

/* Main entry point. */
int
lafe_pathmatch(const char *p, const char *s, int flags)
{
	/* Empty pattern only matches the empty string. */
	if (p == NULL || *p == '\0')
		return (s == NULL || *s == '\0');

	/* Leading '^' anchors the start of the pattern. */
	if (*p == '^') {
		++p;
		flags &= ~PATHMATCH_NO_ANCHOR_START;
	}

	if (*p == '/' && *s != '/')
		return (0);

	/* Certain patterns and file names anchor implicitly. */
	if (*p == '*' || *p == '/' || *p == '/') {
		while (*p == '/')
			++p;
		while (*s == '/')
			++s;
		return (pm(p, s, flags));
	}

	/* If start is unanchored, try to match start of each path element. */
	if (flags & PATHMATCH_NO_ANCHOR_START) {
		for ( ; s != NULL; s = strchr(s, '/')) {
			if (*s == '/')
				s++;
			if (pm(p, s, flags))
				return (1);
		}
		return (0);
	}

	/* Default: Match from beginning. */
	return (pm(p, s, flags));
}

File Added: pkgsrc/archivers/libarchive/files/libarchive_fe/Attic/pathmatch.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#ifndef LAFE_PATHMATCH_H
#define LAFE_PATHMATCH_H

/* Don't anchor at beginning unless the pattern starts with "^" */
#define PATHMATCH_NO_ANCHOR_START	1
/* Don't anchor at end unless the pattern ends with "$" */
#define PATHMATCH_NO_ANCHOR_END 	2

/* Note that "^" and "$" are not special unless you set the corresponding
 * flag above. */

int lafe_pathmatch(const char *p, const char *s, int flags);

#endif

File Deleted: pkgsrc/archivers/libarchive/files/tar/bsdtar.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/bsdtar.h

File Deleted: pkgsrc/archivers/libarchive/files/tar/bsdtar_platform.h

File Added: pkgsrc/archivers/libarchive/files/tar/cmdline.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Command line parser for tar.
 */

#include "bsdtar_platform.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

#include "bsdtar.h"
#include "err.h"

/*
 * Short options for tar.  Please keep this sorted.
 */
static const char *short_options
	= "Bb:C:cf:HhI:JjkLlmnOoPpqrSs:T:tUuvW:wX:xyZz";

/*
 * Long options for tar.  Please keep this list sorted.
 *
 * The symbolic names for options that lack a short equivalent are
 * defined in bsdtar.h.  Also note that so far I've found no need
 * to support optional arguments to long options.  That would be
 * a small change to the code below.
 */

static struct option {
	const char *name;
	int required;      /* 1 if this option requires an argument. */
	int equivalent;    /* Equivalent short option. */
} tar_longopts[] = {
	{ "absolute-paths",       0, 'P' },
	{ "append",               0, 'r' },
	{ "block-size",           1, 'b' },
	{ "bunzip2",              0, 'j' },
	{ "bzip",                 0, 'j' },
	{ "bzip2",                0, 'j' },
	{ "cd",                   1, 'C' },
	{ "check-links",          0, OPTION_CHECK_LINKS },
	{ "chroot",               0, OPTION_CHROOT },
	{ "compress",             0, 'Z' },
	{ "confirmation",         0, 'w' },
	{ "create",               0, 'c' },
	{ "dereference",	  0, 'L' },
	{ "directory",            1, 'C' },
	{ "exclude",              1, OPTION_EXCLUDE },
	{ "exclude-from",         1, 'X' },
	{ "extract",              0, 'x' },
	{ "fast-read",            0, 'q' },
	{ "file",                 1, 'f' },
	{ "files-from",           1, 'T' },
	{ "format",               1, OPTION_FORMAT },
	{ "options",              1, OPTION_OPTIONS },
	{ "gunzip",               0, 'z' },
	{ "gzip",                 0, 'z' },
	{ "help",                 0, OPTION_HELP },
	{ "include",              1, OPTION_INCLUDE },
	{ "interactive",          0, 'w' },
	{ "insecure",             0, 'P' },
	{ "keep-newer-files",     0, OPTION_KEEP_NEWER_FILES },
	{ "keep-old-files",       0, 'k' },
	{ "list",                 0, 't' },
	{ "lzma",                 0, OPTION_LZMA },
	{ "modification-time",    0, 'm' },
	{ "newer",		  1, OPTION_NEWER_CTIME },
	{ "newer-ctime",	  1, OPTION_NEWER_CTIME },
	{ "newer-ctime-than",	  1, OPTION_NEWER_CTIME_THAN },
	{ "newer-mtime",	  1, OPTION_NEWER_MTIME },
	{ "newer-mtime-than",	  1, OPTION_NEWER_MTIME_THAN },
	{ "newer-than",		  1, OPTION_NEWER_CTIME_THAN },
	{ "nodump",               0, OPTION_NODUMP },
	{ "norecurse",            0, 'n' },
	{ "no-recursion",         0, 'n' },
	{ "no-same-owner",	  0, OPTION_NO_SAME_OWNER },
	{ "no-same-permissions",  0, OPTION_NO_SAME_PERMISSIONS },
	{ "null",		  0, OPTION_NULL },
	{ "numeric-owner",	  0, OPTION_NUMERIC_OWNER },
	{ "one-file-system",	  0, OPTION_ONE_FILE_SYSTEM },
	{ "posix",		  0, OPTION_POSIX },
	{ "preserve-permissions", 0, 'p' },
	{ "read-full-blocks",	  0, 'B' },
	{ "same-owner",	          0, OPTION_SAME_OWNER },
	{ "same-permissions",     0, 'p' },
	{ "strip-components",	  1, OPTION_STRIP_COMPONENTS },
	{ "to-stdout",            0, 'O' },
	{ "totals",		  0, OPTION_TOTALS },
	{ "uncompress",           0, 'Z' },
	{ "unlink",		  0, 'U' },
	{ "unlink-first",	  0, 'U' },
	{ "update",               0, 'u' },
	{ "use-compress-program", 1, OPTION_USE_COMPRESS_PROGRAM },
	{ "verbose",              0, 'v' },
	{ "version",              0, OPTION_VERSION },
	{ "xz",                   0, 'J' },
	{ NULL, 0, 0 }
};

/*
 * This getopt implementation has two key features that common
 * getopt_long() implementations lack.  Apart from those, it's a
 * straightforward option parser, considerably simplified by not
 * needing to support the wealth of exotic getopt_long() features.  It
 * has, of course, been shamelessly tailored for bsdtar.  (If you're
 * looking for a generic getopt_long() implementation for your
 * project, I recommend Gregory Pietsch's public domain getopt_long()
 * implementation.)  The two additional features are:
 *
 * Old-style tar arguments: The original tar implementation treated
 * the first argument word as a list of single-character option
 * letters.  All arguments follow as separate words.  For example,
 *    tar xbf 32 /dev/tape
 * Here, the "xbf" is three option letters, "32" is the argument for
 * "b" and "/dev/tape" is the argument for "f".  We support this usage
 * if the first command-line argument does not begin with '-'.  We
 * also allow regular short and long options to follow, e.g.,
 *    tar xbf 32 /dev/tape -P --format=pax
 *
 * -W long options: There's an obscure GNU convention (only rarely
 * supported even there) that allows "-W option=argument" as an
 * alternative way to support long options.  This was supported in
 * early bsdtar as a way to access long options on platforms that did
 * not support getopt_long() and is preserved here for backwards
 * compatibility.  (Of course, if I'd started with a custom
 * command-line parser from the beginning, I would have had normal
 * long option support on every platform so that hack wouldn't have
 * been necessary.  Oh, well.  Some mistakes you just have to live
 * with.)
 *
 * TODO: We should be able to use this to pull files and intermingled
 * options (such as -C) from the command line in write mode.  That
 * will require a little rethinking of the argument handling in
 * bsdtar.c.
 *
 * TODO: If we want to support arbitrary command-line options from -T
 * input (as GNU tar does), we may need to extend this to handle option
 * words from sources other than argv/arc.  I'm not really sure if I
 * like that feature of GNU tar, so it's certainly not a priority.
 */

int
bsdtar_getopt(struct bsdtar *bsdtar)
{
	enum { state_start = 0, state_old_tar, state_next_word,
	       state_short, state_long };
	static int state = state_start;
	static char *opt_word;

	const struct option *popt, *match = NULL, *match2 = NULL;
	const char *p, *long_prefix = "--";
	size_t optlength;
	int opt = '?';
	int required = 0;

	bsdtar->optarg = NULL;

	/* First time through, initialize everything. */
	if (state == state_start) {
		/* Skip program name. */
		++bsdtar->argv;
		--bsdtar->argc;
		if (*bsdtar->argv == NULL)
			return (-1);
		/* Decide between "new style" and "old style" arguments. */
		if (bsdtar->argv[0][0] == '-') {
			state = state_next_word;
		} else {
			state = state_old_tar;
			opt_word = *bsdtar->argv++;
			--bsdtar->argc;
		}
	}

	/*
	 * We're parsing old-style tar arguments
	 */
	if (state == state_old_tar) {
		/* Get the next option character. */
		opt = *opt_word++;
		if (opt == '\0') {
			/* New-style args can follow old-style. */
			state = state_next_word;
		} else {
			/* See if it takes an argument. */
			p = strchr(short_options, opt);
			if (p == NULL)
				return ('?');
			if (p[1] == ':') {
				bsdtar->optarg = *bsdtar->argv;
				if (bsdtar->optarg == NULL) {
					lafe_warnc(0,
					    "Option %c requires an argument",
					    opt);
					return ('?');
				}
				++bsdtar->argv;
				--bsdtar->argc;
			}
		}
	}

	/*
	 * We're ready to look at the next word in argv.
	 */
	if (state == state_next_word) {
		/* No more arguments, so no more options. */
		if (bsdtar->argv[0] == NULL)
			return (-1);
		/* Doesn't start with '-', so no more options. */
		if (bsdtar->argv[0][0] != '-')
			return (-1);
		/* "--" marks end of options; consume it and return. */
		if (strcmp(bsdtar->argv[0], "--") == 0) {
			++bsdtar->argv;
			--bsdtar->argc;
			return (-1);
		}
		/* Get next word for parsing. */
		opt_word = *bsdtar->argv++;
		--bsdtar->argc;
		if (opt_word[1] == '-') {
			/* Set up long option parser. */
			state = state_long;
			opt_word += 2; /* Skip leading '--' */
		} else {
			/* Set up short option parser. */
			state = state_short;
			++opt_word;  /* Skip leading '-' */
		}
	}

	/*
	 * We're parsing a group of POSIX-style single-character options.
	 */
	if (state == state_short) {
		/* Peel next option off of a group of short options. */
		opt = *opt_word++;
		if (opt == '\0') {
			/* End of this group; recurse to get next option. */
			state = state_next_word;
			return bsdtar_getopt(bsdtar);
		}

		/* Does this option take an argument? */
		p = strchr(short_options, opt);
		if (p == NULL)
			return ('?');
		if (p[1] == ':')
			required = 1;

		/* If it takes an argument, parse that. */
		if (required) {
			/* If arg is run-in, opt_word already points to it. */
			if (opt_word[0] == '\0') {
				/* Otherwise, pick up the next word. */
				opt_word = *bsdtar->argv;
				if (opt_word == NULL) {
					lafe_warnc(0,
					    "Option -%c requires an argument",
					    opt);
					return ('?');
				}
				++bsdtar->argv;
				--bsdtar->argc;
			}
			if (opt == 'W') {
				state = state_long;
				long_prefix = "-W "; /* For clearer errors. */
			} else {
				state = state_next_word;
				bsdtar->optarg = opt_word;
			}
		}
	}

	/* We're reading a long option, including -W long=arg convention. */
	if (state == state_long) {
		/* After this long option, we'll be starting a new word. */
		state = state_next_word;

		/* Option name ends at '=' if there is one. */
		p = strchr(opt_word, '=');
		if (p != NULL) {
			optlength = (size_t)(p - opt_word);
			bsdtar->optarg = (char *)(uintptr_t)(p + 1);
		} else {
			optlength = strlen(opt_word);
		}

		/* Search the table for an unambiguous match. */
		for (popt = tar_longopts; popt->name != NULL; popt++) {
			/* Short-circuit if first chars don't match. */
			if (popt->name[0] != opt_word[0])
				continue;
			/* If option is a prefix of name in table, record it.*/
			if (strncmp(opt_word, popt->name, optlength) == 0) {
				match2 = match; /* Record up to two matches. */
				match = popt;
				/* If it's an exact match, we're done. */
				if (strlen(popt->name) == optlength) {
					match2 = NULL; /* Forget the others. */
					break;
				}
			}
		}

		/* Fail if there wasn't a unique match. */
		if (match == NULL) {
			lafe_warnc(0,
			    "Option %s%s is not supported",
			    long_prefix, opt_word);
			return ('?');
		}
		if (match2 != NULL) {
			lafe_warnc(0,
			    "Ambiguous option %s%s (matches --%s and --%s)",
			    long_prefix, opt_word, match->name, match2->name);
			return ('?');
		}

		/* We've found a unique match; does it need an argument? */
		if (match->required) {
			/* Argument required: get next word if necessary. */
			if (bsdtar->optarg == NULL) {
				bsdtar->optarg = *bsdtar->argv;
				if (bsdtar->optarg == NULL) {
					lafe_warnc(0,
					    "Option %s%s requires an argument",
					    long_prefix, match->name);
					return ('?');
				}
				++bsdtar->argv;
				--bsdtar->argc;
			}
		} else {
			/* Argument forbidden: fail if there is one. */
			if (bsdtar->optarg != NULL) {
				lafe_warnc(0,
				    "Option %s%s does not allow an argument",
				    long_prefix, match->name);
				return ('?');
			}
		}
		return (match->equivalent);
	}

	return (opt);
}

File Deleted: pkgsrc/archivers/libarchive/files/tar/Attic/getdate.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/read.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/subst.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/Attic/tree.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/Attic/tree.h

File Deleted: pkgsrc/archivers/libarchive/files/tar/util.c

File Added: pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#ifndef BSDTAR_WINDOWS_H
#define BSDTAR_WINDOWS_H 1
#include <direct.h>
#include <windows.h>

#ifndef PRId64
#define PRId64 "I64"
#endif
#define geteuid()	0

#ifndef S_IFIFO
#define S_IFIFO	0010000 /* pipe */
#endif

#include <string.h>  /* Must include before redefining 'strdup' */
#if !defined(__BORLANDC__)
#define strdup _strdup
#endif
#if !defined(__BORLANDC__)
#define getcwd _getcwd
#endif

#define chdir __tar_chdir
int __tar_chdir(const char *);

#ifndef S_ISREG
#define S_ISREG(a)	(a & _S_IFREG)
#endif
#ifndef S_ISBLK
#define S_ISBLK(a)	(0)
#endif

#endif /* BSDTAR_WINDOWS_H */

File Added: pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#if defined(_WIN32) && !defined(__CYGWIN__)

#include "bsdtar_platform.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <stddef.h>
#ifdef HAVE_SYS_UTIME_H
#include <sys/utime.h>
#endif
#include <sys/stat.h>
#include <process.h>
#include <stdlib.h>
#include <wchar.h>
#include <windows.h>
#include <sddl.h>

#include "bsdtar.h"
#include "err.h"

/* This may actually not be needed anymore.
 * TODO: Review the error handling for chdir() failures and
 * simply dump this if it's not really needed. */
static void __tar_dosmaperr(unsigned long);

/*
 * Prepend "\\?\" to the path name and convert it to unicode to permit
 * an extended-length path for a maximum total path length of 32767
 * characters.
 * see also http://msdn.microsoft.com/en-us/library/aa365247.aspx
 */
static wchar_t *
permissive_name(const char *name)
{
	wchar_t *wn, *wnp;
	wchar_t *ws, *wsp;
	DWORD l, len, slen, alloclen;
	int unc;

	len = (DWORD)strlen(name);
	wn = malloc((len + 1) * sizeof(wchar_t));
	if (wn == NULL)
		return (NULL);
	l = MultiByteToWideChar(CP_ACP, 0, name, len, wn, len);
	if (l == 0) {
		free(wn);
		return (NULL);
	}
	wn[l] = L'\0';

	/* Get a full path names */
	l = GetFullPathNameW(wn, 0, NULL, NULL);
	if (l == 0) {
		free(wn);
		return (NULL);
	}
	wnp = malloc(l * sizeof(wchar_t));
	if (wnp == NULL) {
		free(wn);
		return (NULL);
	}
	len = GetFullPathNameW(wn, l, wnp, NULL);
	free(wn);
	wn = wnp;

	if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
	    wnp[2] == L'?' && wnp[3] == L'\\')
		/* We have already permissive names. */
		return (wn);

	if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
		wnp[2] == L'.' && wnp[3] == L'\\') {
		/* Device names */
		if (((wnp[4] >= L'a' && wnp[4] <= L'z') ||
		     (wnp[4] >= L'A' && wnp[4] <= L'Z')) &&
		    wnp[5] == L':' && wnp[6] == L'\\')
			wnp[2] = L'?';/* Not device names. */
		return (wn);
	}

	unc = 0;
	if (wnp[0] == L'\\' && wnp[1] == L'\\' && wnp[2] != L'\\') {
		wchar_t *p = &wnp[2];

		/* Skip server-name letters. */
		while (*p != L'\\' && *p != L'\0')
			++p;
		if (*p == L'\\') {
			wchar_t *rp = ++p;
			/* Skip share-name letters. */
			while (*p != L'\\' && *p != L'\0')
				++p;
			if (*p == L'\\' && p != rp) {
				/* Now, match patterns such as
				 * "\\server-name\share-name\" */
				wnp += 2;
				len -= 2;
				unc = 1;
			}
		}
	}

	alloclen = slen = 4 + (unc * 4) + len + 1;
	ws = wsp = malloc(slen * sizeof(wchar_t));
	if (ws == NULL) {
		free(wn);
		return (NULL);
	}
	/* prepend "\\?\" */
	wcsncpy(wsp, L"\\\\?\\", 4);
	wsp += 4;
	slen -= 4;
	if (unc) {
		/* append "UNC\" ---> "\\?\UNC\" */
		wcsncpy(wsp, L"UNC\\", 4);
		wsp += 4;
		slen -= 4;
	}
	wcsncpy(wsp, wnp, slen);
	free(wn);
	ws[alloclen - 1] = L'\0';
	return (ws);
}

int
__tar_chdir(const char *path)
{
	wchar_t *ws;
	int r;

	r = SetCurrentDirectoryA(path);
	if (r == 0) {
		if (GetLastError() != ERROR_FILE_NOT_FOUND) {
			__tar_dosmaperr(GetLastError());
			return (-1);
		}
	} else
		return (0);
	ws = permissive_name(path);
	if (ws == NULL) {
		errno = EINVAL;
		return (-1);
	}
	r = SetCurrentDirectoryW(ws);
	free(ws);
	if (r == 0) {
		__tar_dosmaperr(GetLastError());
		return (-1);
	}
	return (0);
}

/*
 * The following function was modified from PostgreSQL sources and is
 * subject to the copyright below.
 */
/*-------------------------------------------------------------------------
 *
 * win32error.c
 *	  Map win32 error codes to errno values
 *
 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
 *	  $PostgreSQL: pgsql/src/port/win32error.c,v 1.4 2008/01/01 19:46:00 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
/*
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)

Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group

Portions Copyright (c) 1994, The Regents of the University of California

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/

static const struct {
	DWORD		winerr;
	int		doserr;
} doserrors[] =
{
	{	ERROR_INVALID_FUNCTION, EINVAL	},
	{	ERROR_FILE_NOT_FOUND, ENOENT	},
	{	ERROR_PATH_NOT_FOUND, ENOENT	},
	{	ERROR_TOO_MANY_OPEN_FILES, EMFILE	},
	{	ERROR_ACCESS_DENIED, EACCES	},
	{	ERROR_INVALID_HANDLE, EBADF	},
	{	ERROR_ARENA_TRASHED, ENOMEM	},
	{	ERROR_NOT_ENOUGH_MEMORY, ENOMEM	},
	{	ERROR_INVALID_BLOCK, ENOMEM	},
	{	ERROR_BAD_ENVIRONMENT, E2BIG	},
	{	ERROR_BAD_FORMAT, ENOEXEC	},
	{	ERROR_INVALID_ACCESS, EINVAL	},
	{	ERROR_INVALID_DATA, EINVAL	},
	{	ERROR_INVALID_DRIVE, ENOENT	},
	{	ERROR_CURRENT_DIRECTORY, EACCES	},
	{	ERROR_NOT_SAME_DEVICE, EXDEV	},
	{	ERROR_NO_MORE_FILES, ENOENT	},
	{	ERROR_LOCK_VIOLATION, EACCES	},
	{	ERROR_SHARING_VIOLATION, EACCES	},
	{	ERROR_BAD_NETPATH, ENOENT	},
	{	ERROR_NETWORK_ACCESS_DENIED, EACCES	},
	{	ERROR_BAD_NET_NAME, ENOENT	},
	{	ERROR_FILE_EXISTS, EEXIST	},
	{	ERROR_CANNOT_MAKE, EACCES	},
	{	ERROR_FAIL_I24, EACCES	},
	{	ERROR_INVALID_PARAMETER, EINVAL	},
	{	ERROR_NO_PROC_SLOTS, EAGAIN	},
	{	ERROR_DRIVE_LOCKED, EACCES	},
	{	ERROR_BROKEN_PIPE, EPIPE	},
	{	ERROR_DISK_FULL, ENOSPC	},
	{	ERROR_INVALID_TARGET_HANDLE, EBADF	},
	{	ERROR_INVALID_HANDLE, EINVAL	},
	{	ERROR_WAIT_NO_CHILDREN, ECHILD	},
	{	ERROR_CHILD_NOT_COMPLETE, ECHILD	},
	{	ERROR_DIRECT_ACCESS_HANDLE, EBADF	},
	{	ERROR_NEGATIVE_SEEK, EINVAL	},
	{	ERROR_SEEK_ON_DEVICE, EACCES	},
	{	ERROR_DIR_NOT_EMPTY, ENOTEMPTY	},
	{	ERROR_NOT_LOCKED, EACCES	},
	{	ERROR_BAD_PATHNAME, ENOENT	},
	{	ERROR_MAX_THRDS_REACHED, EAGAIN	},
	{	ERROR_LOCK_FAILED, EACCES	},
	{	ERROR_ALREADY_EXISTS, EEXIST	},
	{	ERROR_FILENAME_EXCED_RANGE, ENOENT	},
	{	ERROR_NESTING_NOT_ALLOWED, EAGAIN	},
	{	ERROR_NOT_ENOUGH_QUOTA, ENOMEM	}
};

static void
__tar_dosmaperr(unsigned long e)
{
	int			i;

	if (e == 0)	{
		errno = 0;
		return;
	}

	for (i = 0; i < sizeof(doserrors); i++) {
		if (doserrors[i].winerr == e) {
			errno = doserrors[i].doserr;
			return;
		}
	}

	/* fprintf(stderr, "unrecognized win32 error code: %lu", e); */
	errno = EINVAL;
	return;
}

#endif

File Deleted: pkgsrc/archivers/libarchive/files/tar/bsdtar.1

File Added: pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt
############################################
#
# How to build bsdtar
#
############################################
IF (ENABLE_TAR)

  SET(bsdtar_SOURCES
    bsdtar.c
    bsdtar.h
    bsdtar_platform.h
    cmdline.c
    getdate.c
    read.c
    subst.c
    tree.c
    tree.h
    util.c
    write.c
    ../libarchive_fe/err.c
    ../libarchive_fe/err.h
    ../libarchive_fe/lafe_platform.h
    ../libarchive_fe/line_reader.c
    ../libarchive_fe/line_reader.h
    ../libarchive_fe/matching.c
    ../libarchive_fe/matching.h
    ../libarchive_fe/pathmatch.c
    ../libarchive_fe/pathmatch.h
  )
  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe)
  IF(WIN32 AND NOT CYGWIN)
    LIST(APPEND bsdtar_SOURCES bsdtar_windows.c)
    LIST(APPEND bsdtar_SOURCES bsdtar_windows.h)
  ENDIF(WIN32 AND NOT CYGWIN)

  # bsdtar documentation
  SET(bsdtar_MANS bsdtar.1)

  # How to build bsdtar
  ADD_EXECUTABLE(bsdtar ${bsdtar_SOURCES})
  IF(ENABLE_TAR_SHARED)
    TARGET_LINK_LIBRARIES(bsdtar archive ${ADDITIONAL_LIBS})
  ELSE(ENABLE_TAR_SHARED)
    TARGET_LINK_LIBRARIES(bsdtar archive_static ${ADDITIONAL_LIBS})
    SET_TARGET_PROPERTIES(bsdtar PROPERTIES COMPILE_DEFINITIONS
    				 LIBARCHIVE_STATIC)
  ENDIF(ENABLE_TAR_SHARED)
  GET_TARGET_PROPERTY(BSDTAR bsdtar LOCATION)

  # Installation rules
  INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin)
  INSTALL_MAN(${bsdtar_MANS})
ENDIF(ENABLE_TAR)

add_subdirectory(test)

File Added: pkgsrc/archivers/libarchive/files/tar/config_freebsd.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD: src/usr.bin/tar/config_freebsd.h,v 1.8 2008/11/29 20:06:53 kientzle Exp $
 */

/* A default configuration for FreeBSD, used if there is no config.h. */

#include <sys/param.h>  /* __FreeBSD_version */

#undef	HAVE_ATTR_XATTR_H
#define	HAVE_CHROOT 1
#define	HAVE_DIRENT_D_NAMLEN 1
#define	HAVE_DIRENT_H 1
#define	HAVE_D_MD_ORDER 1
#define	HAVE_ERRNO_H 1
#undef	HAVE_EXT2FS_EXT2_FS_H
#define	HAVE_FCHDIR 1
#define	HAVE_FCNTL_H 1
#define	HAVE_GRP_H 1
#define	HAVE_LANGINFO_H 1
#undef	HAVE_LIBACL
#define	HAVE_LIBARCHIVE 1
#define	HAVE_LIMITS_H 1
#define	HAVE_LINK 1
#undef	HAVE_LINUX_EXT2_FS_H
#undef	HAVE_LINUX_FS_H
#define	HAVE_LOCALE_H 1
#define	HAVE_MBTOWC 1
#undef	HAVE_NDIR_H
#if __FreeBSD_version >= 450002 /* nl_langinfo introduced */
#define	HAVE_NL_LANGINFO 1
#endif
#define	HAVE_PATHS_H 1
#define	HAVE_PWD_H 1
#define	HAVE_READLINK 1
#define	HAVE_REGEX_H 1
#define	HAVE_SETLOCALE 1
#define	HAVE_SIGNAL_H 1
#define	HAVE_STDARG_H 1
#define	HAVE_STDLIB_H 1
#define	HAVE_STRING_H 1
#define	HAVE_STRUCT_STAT_ST_FLAGS 1
#undef	HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
#undef	HAVE_STRUCT_STAT_ST_MTIME_N
#undef	HAVE_STRUCT_STAT_ST_MTIME_USEC
#define	HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
#undef	HAVE_STRUCT_STAT_ST_UMTIME
#define	HAVE_SYMLINK 1
#define	HAVE_SYS_CDEFS_H 1
#undef	HAVE_SYS_DIR_H
#define	HAVE_SYS_IOCTL_H 1
#undef	HAVE_SYS_NDIR_H
#define	HAVE_SYS_PARAM_H 1
#define	HAVE_SYS_STAT_H 1
#define	HAVE_TIME_H 1
#define	HAVE_SYS_TYPES_H 1
#define	HAVE_UINTMAX_T 1
#define	HAVE_UNISTD_H 1
#define	HAVE_UNSIGNED_LONG_LONG
#define	HAVE_WCTYPE_H 1
#define	HAVE_ZLIB_H 1
#undef	MAJOR_IN_MKDEV

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/Attic/main.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test.h

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_0.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_basic.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_copy.c

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_empty_mtree.c
/*-
 * Copyright (c) 2003-2009 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

/*
 * Regression test:  We used to get a bogus error message when we
 * asked tar to copy entries out of an empty archive.  See
 * Issue 51 on libarchive.googlecode.com for details.
 */
DEFINE_TEST(test_empty_mtree)
{
	int r;

	assertMakeFile("test1.mtree", 0777, "#mtree\n");

	r = systemf("%s cf test1.tar @test1.mtree >test1.out 2>test1.err",
	    testprog);
	failure("Error invoking %s cf", testprog);
	assertEqualInt(r, 0);
	assertEmptyFile("test1.out");
	assertEmptyFile("test1.err");
}

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/Attic/test_getdate.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_help.c

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_option_T_upper.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/tar/test/test_option_T.c,v 1.3 2008/08/15 06:12:02 kientzle Exp $");

static int
touch(const char *fn, int fail)
{
	FILE *f = fopen(fn, "w");
	if (fail) {
		failure("Couldn't create file '%s', errno=%d (%s)\n",
		    fn, errno, strerror(errno));
		if (!assert(f != NULL))
			return (0); /* Failure. */
	} else {
		if (f == NULL)
			return (0); /* Soft failure. */
	}
	fclose(f);
	return (1); /* Success */
}

DEFINE_TEST(test_option_T_upper)
{
	FILE *f;
	int r;
	struct stat st;
	int gnarlyFilesSupported;

	/* Create a simple dir heirarchy; bail if anything fails. */
	if (!assertMakeDir("d1", 0755)) return;
	if (!assertMakeDir("d1/d2", 0755))	return;
	if (!touch("f", 1)) return;
	if (!touch("d1/f1", 1)) return;
	if (!touch("d1/f2", 1)) return;
	if (!touch("d1/d2/f3", 1)) return;
	if (!touch("d1/d2/f4", 1)) return;
	if (!touch("d1/d2/f5", 1)) return;
	if (!touch("d1/d2/f6", 1)) return;
	/* Some platforms don't permit such things; just skip it. */
	gnarlyFilesSupported = touch("d1/d2/f\x0a", 0);

	/* Populate a file list */
	f = fopen("filelist", "w+");
	if (!assert(f != NULL))
		return;
	/* Use a variety of text line endings. */
	fprintf(f, "f\x0d"); /* CR */
	fprintf(f, "d1/f1\x0d\x0a"); /* CRLF */
	fprintf(f, "d1/d2/f4\x0a"); /* NL */
	fprintf(f, "d1/d2/f6"); /* EOF */
	fclose(f);

	/* Populate a second file list */
	f = fopen("filelist2", "w+");
	if (!assert(f != NULL))
		return;
	/* Use null-terminated names. */
	fprintf(f, "d1/d2/f3");
	fwrite("\0", 1, 1, f);
	fprintf(f, "d1/d2/f5");
	fwrite("\0", 1, 1, f);
	if (gnarlyFilesSupported) {
		fprintf(f, "d1/d2/f\x0a");
		fwrite("\0", 1, 1, f);
	}
	fclose(f);

	/* Use -c -T to archive up the files. */
	r = systemf("%s -c -f test1.tar -T filelist > test1.out 2> test1.err",
	    testprog);
	assert(r == 0);
	assertEmptyFile("test1.out");
	assertEmptyFile("test1.err");

	/* Use -x -T to dearchive the files */
	if (!assertMakeDir("test1", 0755)) return;
	systemf("%s -x -f test1.tar -T filelist -C test1"
	    " > test1b.out 2> test1b.err", testprog);
	assertEmptyFile("test1b.out");
	assertEmptyFile("test1b.err");

	/* Verify the files were extracted. */
	assertFileExists("test1/f");
	assertFileExists("test1/d1/f1");
	assertFileNotExists("test1/d1/f2");
	assertFileNotExists("test1/d1/d2/f3");
	assertFileExists("test1/d1/d2/f4");
	assertFileNotExists("test1/d1/d2/f5");
	assertFileExists("test1/d1/d2/f6");
	if (gnarlyFilesSupported) {
		assertFileNotExists("test1/d1/d2/f\x0a");
	}

	/* Use -r -T to add more files to the archive. */
	systemf("%s -r -f test1.tar --null -T filelist2 > test2.out 2> test2.err",
	    testprog);
	assertEmptyFile("test2.out");
	assertEmptyFile("test2.err");

	/* Use -x without -T to dearchive the files (ensure -r worked) */
	if (!assertMakeDir("test3", 0755)) return;
	systemf("%s -x -f test1.tar -C test3"
	    " > test3.out 2> test3.err", testprog);
	assertEmptyFile("test3.out");
	assertEmptyFile("test3.err");
	/* Verify the files were extracted.*/
	assertFileExists("test3/f");
	assertFileExists("test3/d1/f1");
	assertFileNotExists("test3/d1/f2");
	assertFileExists("test3/d1/d2/f3");
	assertFileExists("test3/d1/d2/f4");
	assertFileExists("test3/d1/d2/f5");
	assertFileExists("test3/d1/d2/f6");
	if (gnarlyFilesSupported) {
		assertFileExists("test3/d1/d2/f\x0a");
	}

	/* Use -x -T to dearchive the files (verify -x -T together) */
	if (!assertMakeDir("test2", 0755)) return;
	systemf("%s -x -f test1.tar -T filelist -C test2"
	    " > test2b.out 2> test2b.err", testprog);
	assertEmptyFile("test2b.out");
	assertEmptyFile("test2b.err");
	/* Verify the files were extracted.*/
	assertFileExists("test2/f");
	assertFileExists("test2/d1/f1");
	assertFileNotExists("test2/d1/f2");
	assertFileNotExists("test2/d1/d2/f3");
	assertFileExists("test2/d1/d2/f4");
	assertFileNotExists("test2/d1/d2/f5");
	assertFileExists("test2/d1/d2/f6");
	if (gnarlyFilesSupported) {
		assertFileNotExists("test2/d1/d2/f\x0a");
	}

	assertMakeDir("test4", 0755);
	assertMakeDir("test4_out", 0755);
	assertMakeDir("test4_out2", 0755);
	assertMakeDir("test4/d1", 0755);
	assertEqualInt(1, touch("test4/d1/foo", 0));

	/* Does bsdtar support -s option ? */
	systemf("%s -cf - -s /foo/bar/ test4/d1/foo > check.out 2> check.err",
	    testprog);
	assertEqualInt(0, stat("check.err", &st));
	if (st.st_size == 0) {
		systemf("%s -cf - -s /foo/bar/ test4/d1/foo | %s -xf - -C test4_out",
		    testprog, testprog);
		assertEmptyFile("test4_out/test4/d1/bar");
		systemf("%s -cf - -s /d1/d2/ test4/d1/foo | %s -xf - -C test4_out",
		    testprog, testprog);
		assertEmptyFile("test4_out/test4/d2/foo");
		systemf("%s -cf - -s ,test4/d1/foo,, test4/d1/foo | %s -tvf - > test4.lst",
		    testprog, testprog);
		assertEmptyFile("test4.lst");
		systemf("%s -cf - test4/d1/foo | %s -xf - -s /foo/bar/ -C test4_out2",
		    testprog, testprog);
		assertEmptyFile("test4_out2/test4/d1/bar");
	} else {
		skipping("bsdtar does not support -s option on this platform");
	}

	/* TODO: Include some use of -C directory-changing within the filelist. */
	/* I'm pretty sure -C within the filelist is broken on extract. */
}

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_option_q.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/tar/test/test_option_q.c,v 1.3 2008/08/22 01:35:08 kientzle Exp $");

DEFINE_TEST(test_option_q)
{
	FILE *f;
	int r;

	/*
	 * Create an archive with several different versions of the
	 * same files.  By default, the last version will overwrite
	 * any earlier versions.  The -q/--fast-read option will
	 * stop early, so we can verify -q/--fast-read by seeing
	 * which version of each file actually ended up being
	 * extracted.  This also exercises -r mode, since that's
	 * what we use to build up the test archive.
	 */

	f = fopen("foo", "w");
	assert(f != NULL);
	fprintf(f, "foo1");
	fclose(f);

	assertEqualInt(0, systemf("%s -cf archive.tar foo", testprog));

	f = fopen("foo", "w");
	assert(f != NULL);
	fprintf(f, "foo2");
	fclose(f);

	assertEqualInt(0, systemf("%s -rf archive.tar foo", testprog));

	f = fopen("bar", "w");
	assert(f != NULL);
	fprintf(f, "bar1");
	fclose(f);

	assertEqualInt(0, systemf("%s -rf archive.tar bar", testprog));

	f = fopen("foo", "w");
	assert(f != NULL);
	fprintf(f, "foo3");
	fclose(f);

	assertEqualInt(0, systemf("%s -rf archive.tar foo", testprog));

	f = fopen("bar", "w");
	assert(f != NULL);
	fprintf(f, "bar2");
	fclose(f);

	assertEqualInt(0, systemf("%s -rf archive.tar bar", testprog));

	/*
	 * Now, try extracting from the test archive with various
	 * combinations of -q.
	 */

	/* Test 1: -q foo should only extract the first foo. */
	assertMakeDir("test1", 0755);
	assertChdir("test1");
	r = systemf("%s -xf ../archive.tar -q foo >test.out 2>test.err",
	    testprog);
	failure("Fatal error trying to use -q option");
	if (!assertEqualInt(0, r))
		return;

	assertFileContents("foo1", 4, "foo");
	assertEmptyFile("test.out");
	assertEmptyFile("test.err");
	assertChdir("..");

	/* Test 2: -q foo bar should extract up to the first bar. */
	assertMakeDir("test2", 0755);
	assertChdir("test2");
	assertEqualInt(0,
	    systemf("%s -xf ../archive.tar -q foo bar >test.out 2>test.err", testprog));
	assertFileContents("foo2", 4, "foo");
	assertFileContents("bar1", 4, "bar");
	assertEmptyFile("test.out");
	assertEmptyFile("test.err");
	assertChdir("..");

	/* Test 3: Same as test 2, but use --fast-read spelling. */
	assertMakeDir("test3", 0755);
	assertChdir("test3");
	assertEqualInt(0,
	    systemf("%s -xf ../archive.tar --fast-read foo bar >test.out 2>test.err", testprog));
	assertFileContents("foo2", 4, "foo");
	assertFileContents("bar1", 4, "bar");
	assertEmptyFile("test.out");
	assertEmptyFile("test.err");
	assertChdir("..");

	/* Test 4: Without -q, should extract everything. */
	assertMakeDir("test4", 0755);
	assertChdir("test4");
	assertEqualInt(0,
	    systemf("%s -xf ../archive.tar foo bar >test.out 2>test.err", testprog));
	assertFileContents("foo3", 4, "foo");
	assertFileContents("bar2", 4, "bar");
	assertEmptyFile("test.out");
	assertEmptyFile("test.err");
	assertChdir("..");
}

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_option_r.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD$");

/*
 * Also see test_option_q for additional validation of -r support.
 */
DEFINE_TEST(test_option_r)
{
	char buff[15];
	char *p0, *p1;
	size_t s;
	FILE *f;
	int r;

	/* Create a file */
	f = fopen("f1", "w");
	if (!assert(f != NULL))
		return;
	assertEqualInt(3, fwrite("abc", 1, 3, f));
	fclose(f);

	/* Archive that one file. */
	r = systemf("%s cf archive.tar --format=ustar f1 >step1.out 2>step1.err", testprog);
	failure("Error invoking %s cf archive.tar f1", testprog);
	assertEqualInt(r, 0);

	/* Verify that nothing went to stdout or stderr. */
	assertEmptyFile("step1.out");
	assertEmptyFile("step1.err");


	/* Do some basic validation of the constructed archive. */
	p0 = slurpfile(&s, "archive.tar");
	if (!assert(p0 != NULL))
		return;
	if (!assert(s >= 2048)) {
		free(p0);
		return;
	}
	assertEqualMem(p0 + 0, "f1", 3);
	assertEqualMem(p0 + 512, "abc", 3);
	assertEqualMem(p0 + 1024, "\0\0\0\0\0\0\0\0", 8);
	assertEqualMem(p0 + 1536, "\0\0\0\0\0\0\0\0", 8);

	/* Edit that file */
	f = fopen("f1", "w");
	if (!assert(f != NULL))
		return;
	assertEqualInt(3, fwrite("123", 1, 3, f));
	fclose(f);

	/* Update the archive. */
	r = systemf("%s rf archive.tar --format=ustar f1 >step2.out 2>step2.err", testprog);
	failure("Error invoking %s rf archive.tar f1", testprog);
	assertEqualInt(r, 0);

	/* Verify that nothing went to stdout or stderr. */
	assertEmptyFile("step2.out");
	assertEmptyFile("step2.err");

	/* Do some basic validation of the constructed archive. */
	p1 = slurpfile(&s, "archive.tar");
	if (!assert(p1 != NULL)) {
		free(p0);
		return;
	}
	assert(s >= 3072);
	/* Verify first entry is unchanged. */
	assertEqualMem(p0, p1, 1024);
	/* Verify that second entry is correct. */
	assertEqualMem(p1 + 1024, "f1", 3);
	assertEqualMem(p1 + 1536, "123", 3);
	/* Verify end-of-archive marker. */
	assertEqualMem(p1 + 2048, "\0\0\0\0\0\0\0\0", 8);
	assertEqualMem(p1 + 2560, "\0\0\0\0\0\0\0\0", 8);
	free(p0);
	free(p1);

	/* Unpack both items */
	assertMakeDir("step3", 0775);
	assertChdir("step3");
	r = systemf("%s xf ../archive.tar", testprog);
	failure("Error invoking %s xf archive.tar", testprog);
	assertEqualInt(r, 0);

	/* Verify that the second one overwrote the first. */
	f = fopen("f1", "r");
	if (assert(f != NULL)) {
		assertEqualInt(3, fread(buff, 1, 3, f));
		assertEqualMem(buff, "123", 3);
		fclose(f);
	}
}

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_option_s.c
/*-
 * Copyright (c) 2003-2008 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/tar/test/test_option_T.c,v 1.3 2008/08/15 06:12:02 kientzle Exp $");

static int
mkfile(const char *fn, const char *contents)
{
	FILE *f = fopen(fn, "w");
	failure("Couldn't create file '%s', errno=%d (%s)\n",
	    fn, errno, strerror(errno));
	if (!assert(f != NULL))
		return (1); /* Failure. */
	if (contents != NULL)
		assertEqualInt(strlen(contents),
		    fwrite(contents, 1, strlen(contents), f));
	assertEqualInt(0, fclose(f));
	return (0); /* Success */
}

DEFINE_TEST(test_option_s)
{
	struct stat st;

	/* Create a sample file heirarchy. */
	assertMakeDir("in", 0755);
	assertMakeDir("in/d1", 0755);
	assertEqualInt(0, mkfile("in/d1/foo", "foo"));
	assertEqualInt(0, mkfile("in/d1/bar", "bar"));

	/* Does bsdtar support -s option ? */
	systemf("%s -cf - -s /foo/bar/ in/d1/foo > NUL 2> check.err",
	    testprog);
	assertEqualInt(0, stat("check.err", &st));
	if (st.st_size != 0) {
		skipping("%s does not support -s option on this platform",
			testprog);
		return;
	}

	/*
	 * Test 1: Filename substitution when creating archives.
	 */
	assertMakeDir("test1", 0755);
	systemf("%s -cf - -s /foo/bar/ in/d1/foo | %s -xf - -C test1",
	    testprog, testprog);
	assertFileContents("foo", 3, "test1/in/d1/bar");
	systemf("%s -cf - -s /d1/d2/ in/d1/foo | %s -xf - -C test1",
	    testprog, testprog);
	assertFileContents("foo", 3, "test1/in/d2/foo");


	/*
	 * Test 2: Basic substitution when extracting archive.
	 */
	assertMakeDir("test2", 0755);
	systemf("%s -cf - in/d1/foo | %s -xf - -s /foo/bar/ -C test2",
	    testprog, testprog);
	assertFileContents("foo", 3, "test2/in/d1/bar");

	/*
	 * Test 3: Files with empty names shouldn't be archived.
	 */
	systemf("%s -cf - -s ,in/d1/foo,, in/d1/foo | %s -tvf - > in.lst",
	    testprog, testprog);
	assertEmptyFile("in.lst");

	/*
	 * Test 4: Multiple substitutions when extracting archive.
	 */
	assertMakeDir("test4", 0755);
	systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}baz} -C test4",
	    testprog, testprog);
	assertFileContents("foo", 3, "test4/in/d1/bar");
	assertFileContents("bar", 3, "test4/in/d1/baz");

	/*
	 * Test 5: Name-switching substitutions when extracting archive.
	 */
	assertMakeDir("test5", 0755);
	systemf("%s -cf - in/d1/foo in/d1/bar | %s -xf - -s /foo/bar/ -s }bar}foo} -C test5",
	    testprog, testprog);
	assertFileContents("foo", 3, "test5/in/d1/bar");
	assertFileContents("bar", 3, "test5/in/d1/foo");
}

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_patterns.c

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_stdio.c

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_strip_components.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/tar/test/test_strip_components.c,v 1.2 2008/11/10 05:24:13 kientzle Exp $");

static int
touch(const char *fn)
{
	FILE *f = fopen(fn, "w");
	failure("Couldn't create file '%s', errno=%d (%s)\n",
	    fn, errno, strerror(errno));
	if (!assert(f != NULL))
		return (0); /* Failure. */
	fclose(f);
	return (1); /* Success */
}

DEFINE_TEST(test_strip_components)
{
	assertMakeDir("d0", 0755);
	assertChdir("d0");
	assertMakeDir("d1", 0755);
	assertMakeDir("d1/d2", 0755);
	assertMakeDir("d1/d2/d3", 0755);
	assertEqualInt(1, touch("d1/d2/f1"));
	assertMakeHardlink("l1", "d1/d2/f1");
	assertMakeHardlink("d1/l2", "d1/d2/f1");
	if (canSymlink()) {
		assertMakeSymlink("s1", "d1/d2/f1");
		assertMakeSymlink("d1/s2", "d2/f1");
	}
	assertChdir("..");

	assertEqualInt(0, systemf("%s -cf test.tar d0", testprog));

	assertMakeDir("target", 0755);
	assertEqualInt(0, systemf("%s -x -C target --strip-components 2 "
	    "-f test.tar", testprog));

	failure("d0/ is too short and should not get restored");
	assertFileNotExists("target/d0");
	failure("d0/d1/ is too short and should not get restored");
	assertFileNotExists("target/d1");
	failure("d0/d1/s2 is a symlink to something that won't be extracted");
	/* If platform supports symlinks, target/s2 is a broken symlink. */
	/* If platform does not support symlink, target/s2 doesn't exist. */
	assertFileNotExists("target/s2");
	if (canSymlink())
		assertIsSymlink("target/s2", "d2/f1");
	failure("d0/d1/d2 should be extracted");
	assertIsDir("target/d2", -1);

	/*
	 * This next is a complicated case.  d0/l1, d0/d1/l2, and
	 * d0/d1/d2/f1 are all hardlinks to the same file; d0/l1 can't
	 * be extracted with --strip-components=2 and the other two
	 * can.  Remember that tar normally stores the first file with
	 * a body and the other as hardlink entries to the first
	 * appearance.  So the final result depends on the order in
	 * which these three names get archived.  If d0/l1 is first,
	 * none of the three can be restored.  If either of the longer
	 * names are first, then the two longer ones can both be
	 * restored.
	 *
	 * The tree-walking code used by bsdtar always visits files
	 * before subdirectories, so bsdtar's behavior is fortunately
	 * deterministic:  d0/l1 will always get stored first and the
	 * other two will be stored as hardlinks to d0/l1.  Since
	 * d0/l1 can't be extracted, none of these three will be
	 * extracted.
	 *
	 * It may be worth extending this test to force a particular
	 * archiving order so as to exercise both of the cases described
	 * above.
	 *
	 * Of course, this is all totally different for cpio and newc
	 * formats because the hardlink management is different.
	 * TODO: Rename this to test_strip_components_tar and create
	 * parallel tests for cpio and newc formats.
	 */
	failure("d0/l1 is too short and should not get restored");
	assertFileNotExists("target/l1");
	failure("d0/d1/l2 is a hardlink to file whose name was too short");
	assertFileNotExists("target/l2");
	failure("d0/d1/d2/f1 is a hardlink to file whose name was too short");
	assertFileNotExists("target/d2/f1");
}

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_symlink_dir.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/tar/test/test_symlink_dir.c,v 1.1 2008/09/14 02:16:04 kientzle Exp $");

/*
 * tar -x -P should follow existing symlinks for dirs, but not other
 * content.  Plain tar -x should remove symlinks when they're in the
 * way of a dir extraction.
 */

static int
mkfile(const char *name, int mode, const char *contents, size_t size)
{
	FILE *f = fopen(name, "wb");
	size_t written;

	(void)mode; /* UNUSED */
	if (f == NULL)
		return (-1);
	written = fwrite(contents, 1, size, f);
	fclose(f);
	if (size != written)
		return (-1);
	return (0);
}

DEFINE_TEST(test_symlink_dir)
{
	assertUmask(0);

	assertMakeDir("source", 0755);
	assertEqualInt(0, mkfile("source/file", 0755, "a", 1));
	assertEqualInt(0, mkfile("source/file2", 0755, "ab", 2));
	assertMakeDir("source/dir", 0755);
	assertMakeDir("source/dir/d", 0755);
	assertEqualInt(0, mkfile("source/dir/f", 0755, "abc", 3));
	assertMakeDir("source/dir2", 0755);
	assertMakeDir("source/dir2/d2", 0755);
	assertEqualInt(0, mkfile("source/dir2/f2", 0755, "abcd", 4));
	assertMakeDir("source/dir3", 0755);
	assertMakeDir("source/dir3/d3", 0755);
	assertEqualInt(0, mkfile("source/dir3/f3", 0755, "abcde", 5));

	assertEqualInt(0,
	    systemf("%s -cf test.tar -C source dir dir2 dir3 file file2",
		testprog));

	/*
	 * Extract with -x and without -P.
	 */
	assertMakeDir("dest1", 0755);
	/* "dir" is a symlink to an existing "dest1/real_dir" */
	assertMakeDir("dest1/real_dir", 0755);
	if (canSymlink()) {
		assertMakeSymlink("dest1/dir", "real_dir");
		/* "dir2" is a symlink to a non-existing "real_dir2" */
		assertMakeSymlink("dest1/dir2", "real_dir2");
	} else {
		skipping("some symlink checks");
	}
	/* "dir3" is a symlink to an existing "non_dir3" */
	assertEqualInt(0, mkfile("dest1/non_dir3", 0755, "abcdef", 6));
	if (canSymlink())
		assertMakeSymlink("dest1/dir3", "non_dir3");
	/* "file" is a symlink to existing "real_file" */
	assertEqualInt(0, mkfile("dest1/real_file", 0755, "abcdefg", 7));
	if (canSymlink()) {
		assertMakeSymlink("dest1/file", "real_file");
		/* "file2" is a symlink to non-existing "real_file2" */
		assertMakeSymlink("dest1/file2", "real_file2");
	}
	assertEqualInt(0, systemf("%s -xf test.tar -C dest1", testprog));

	/* dest1/dir symlink should be replaced */
	failure("symlink to dir was followed when it shouldn't be");
	assertIsDir("dest1/dir", -1);
	/* dest1/dir2 symlink should be replaced */
	failure("Broken symlink wasn't replaced with dir");
	assertIsDir("dest1/dir2", -1);
	/* dest1/dir3 symlink should be replaced */
	failure("Symlink to non-dir wasn't replaced with dir");
	assertIsDir("dest1/dir3", -1);
	/* dest1/file symlink should be replaced */
	failure("Symlink to existing file should be replaced");
	assertIsReg("dest1/file", -1);
	/* dest1/file2 symlink should be replaced */
	failure("Symlink to non-existing file should be replaced");
	assertIsReg("dest1/file2", -1);

	/*
	 * Extract with both -x and -P
	 */
	assertMakeDir("dest2", 0755);
	/* "dir" is a symlink to existing "real_dir" */
	assertMakeDir("dest2/real_dir", 0755);
	if (canSymlink())
		assertMakeSymlink("dest2/dir", "real_dir");
	/* "dir2" is a symlink to a non-existing "real_dir2" */
	if (canSymlink())
		assertMakeSymlink("dest2/dir2", "real_dir2");
	/* "dir3" is a symlink to an existing "non_dir3" */
	assertEqualInt(0, mkfile("dest2/non_dir3", 0755, "abcdefgh", 8));
	if (canSymlink())
		assertMakeSymlink("dest2/dir3", "non_dir3");
	/* "file" is a symlink to existing "real_file" */
	assertEqualInt(0, mkfile("dest2/real_file", 0755, "abcdefghi", 9));
	if (canSymlink())
		assertMakeSymlink("dest2/file", "real_file");
	/* "file2" is a symlink to non-existing "real_file2" */
	if (canSymlink())
		assertMakeSymlink("dest2/file2", "real_file2");
	assertEqualInt(0, systemf("%s -xPf test.tar -C dest2", testprog));

	/* dest2/dir symlink should be followed */
	if (canSymlink()) {
		assertIsSymlink("dest2/dir", "real_dir");
		assertIsDir("dest2/real_dir", -1);
	}

	/* Contents of 'dir' should be restored */
	assertIsDir("dest2/dir/d", -1);
	assertIsReg("dest2/dir/f", -1);
	assertFileSize("dest2/dir/f", 3);
	/* dest2/dir2 symlink should be removed */
	failure("Broken symlink wasn't replaced with dir");
	assertIsDir("dest2/dir2", -1);
	/* dest2/dir3 symlink should be removed */
	failure("Symlink to non-dir wasn't replaced with dir");
	assertIsDir("dest2/dir3", -1);
	/* dest2/file symlink should be removed;
	 * even -P shouldn't follow symlinks for files */
	failure("Symlink to existing file should be removed");
	assertIsReg("dest2/file", -1);
	/* dest2/file2 symlink should be removed */
	failure("Symlink to non-existing file should be removed");
	assertIsReg("dest2/file2", -1);
}

File Deleted: pkgsrc/archivers/libarchive/files/tar/test/test_version.c

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_windows.c
/*-
 * Copyright (c) 2009 Michihiro NAKAJIMA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "test.h"

#if defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h>

static void
mkfile(const char *name)
{
	FILE *f;

	f = fopen(name, "wb");
	assert(f != NULL);
	assertEqualInt(5, fwrite("01234", 1, 5, f));
	fclose(f);
}

static void
mkfullpath(char **path1, char **path2, const char *tpath, int type)
{
	char *fp1 = NULL, *fp2 = NULL, *p1 = NULL, *p2 = NULL;
	size_t l;

	/*
	 * Get full path name of "tpath"
	 */
	l = GetFullPathNameA(tpath, 0, NULL, NULL);
	assert(0 != l);
	fp1 = malloc(l);
	assert(NULL != fp1);
	fp2 = malloc(l*2);
	assert(NULL != fp2);
	l = GetFullPathNameA(tpath, l, fp1, NULL);
	if ((type & 0x01) == 0) {
		for (p1 = fp1; *p1 != '\0'; p1++)
			if (*p1 == '\\')
				*p1 = '/';
	}

	switch(type) {
	case 0: /* start with "/" */
	case 1: /* start with "\" */
		/* strip "c:" */
		memmove(fp1, fp1 + 2, l - 2);
		fp1[l -2] = '\0';
		p1 = fp1 + 1;
		break;
	case 2: /* start with "c:/" */
	case 3: /* start with "c:\" */
		p1 = fp1 + 3;
		break;
	case 4: /* start with "//./c:/" */
	case 5: /* start with "\\.\c:\" */
	case 6: /* start with "//?/c:/" */
	case 7: /* start with "\\?\c:\" */
		p1 = malloc(l + 4 + 1);
		assert(NULL != p1);
		if (type & 0x1)
			memcpy(p1, "\\\\.\\", 4);
		else
			memcpy(p1, "//./", 4);
		if (type == 6 || type == 7)
			p1[2] = '?';
		memcpy(p1 + 4, fp1, l);
		p1[l + 4] = '\0';
		free(fp1);
		fp1 = p1;
		p1 = fp1 + 7;
		break;
	}

	/*
	 * Strip leading drive names and converting "\" to "\\"
	 */
	p2 = fp2;
	while (*p1 != '\0') {
		if (*p1 == '\\')
			*p2 = '/';
		else
			*p2 = *p1;
		++p1;
		++p2;
	}
	*p2++ = '\r';
	*p2++ = '\n';
	*p2 = '\0';

	*path1 = fp1;
	*path2 = fp2;
}

static const char *list1[] = {"aaa/", "aaa/file1", "aaa/xxa/", "aaa/xxb/",
	"aaa/zzc/", "aaa/zzc/file1", "aaa/xxb/file1", "aaa/xxa/file1",
	"aab/", "aac/", "abb/", "abc/", "abd/", NULL};
static const char *list2[] = {"bbb/", "bbb/file1", "bbb/xxa/", "bbb/xxb/",
	"bbb/zzc/", "bbb/zzc/file1", "bbb/xxb/file1", "bbb/xxa/file1", "bbc/",
	"bbd/", "bcc/", "bcd/", "bce/", NULL};
static const char *list3[] = {"aac/", "abc/", "bbc/", "bcc/", "ccc/", NULL};
static const char *list4[] = {"fff/abca", "fff/acca", NULL};
static const char *list5[] = {"aaa/file1", "aaa/xxa/", "aaa/xxa/file1",
	"aaa/xxb/", "aaa/xxb/file1", "aaa/zzc/", "aaa/zzc/file1", NULL};
static const char *list6[] = {"fff/abca", "fff/acca", "aaa/xxa/",
	"aaa/xxa/file1", "aaa/xxb/", "aaa/xxb/file1", NULL};
#endif /* _WIN32 && !__CYGWIN__ */

DEFINE_TEST(test_windows)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
	char *fp1, *fp2;

	/*
	 * Preparre tests.
	 * Create directories and files.
	 */
	assertMakeDir("tmp", 0775);
	assertChdir("tmp");

	assertMakeDir("aaa", 0775);
	assertMakeDir("aaa/xxa", 0775);
	assertMakeDir("aaa/xxb", 0775);
	assertMakeDir("aaa/zzc", 0775);
	mkfile("aaa/file1");
	mkfile("aaa/xxa/file1");
	mkfile("aaa/xxb/file1");
	mkfile("aaa/zzc/file1");
	assertMakeDir("aab", 0775);
	assertMakeDir("aac", 0775);
	assertMakeDir("abb", 0775);
	assertMakeDir("abc", 0775);
	assertMakeDir("abd", 0775);
	assertMakeDir("bbb", 0775);
	assertMakeDir("bbb/xxa", 0775);
	assertMakeDir("bbb/xxb", 0775);
	assertMakeDir("bbb/zzc", 0775);
	mkfile("bbb/file1");
	mkfile("bbb/xxa/file1");
	mkfile("bbb/xxb/file1");
	mkfile("bbb/zzc/file1");
	assertMakeDir("bbc", 0775);
	assertMakeDir("bbd", 0775);
	assertMakeDir("bcc", 0775);
	assertMakeDir("bcd", 0775);
	assertEqualInt(0, _mkdir("bce"));
	assertEqualInt(0, _mkdir("ccc"));
	assertEqualInt(0, _mkdir("fff"));
	mkfile("fff/aaaa");
	mkfile("fff/abba");
	mkfile("fff/abca");
	mkfile("fff/acba");
	mkfile("fff/acca");

	/*
	 * Test1: Command line pattern matching.
	 */
	assertEqualInt(0,
	    systemf("%s -cf ../archive1.tar a*", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive1.tar > ../list1", testprog));
	assertFileContainsLinesAnyOrder("../list1", list1);

	assertEqualInt(0,
	    systemf("%s -cf ../archive2.tar b*", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive2.tar > ../list2", testprog));
	assertFileContainsLinesAnyOrder("../list2", list2);

	assertEqualInt(0,
	    systemf("%s -cf ../archive3.tar ??c", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive3.tar > ../list3", testprog));
	assertFileContainsLinesAnyOrder("../list3", list3);

	assertEqualInt(0,
	    systemf("%s -cf ../archive3b.tar *c", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive3b.tar > ../list3b", testprog));
	assertFileContainsLinesAnyOrder("../list3b", list3);

	assertEqualInt(0,
	    systemf("%s -cf ../archive4.tar fff/a?ca", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive4.tar > ../list4", testprog));
	assertFileContainsLinesAnyOrder("../list4", list4);

	assertEqualInt(0,
	    systemf("%s -cf ../archive5.tar aaa\\*", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive5.tar > ../list5", testprog));
	assertFileContainsLinesAnyOrder("../list5", list5);

	assertEqualInt(0,
	    systemf("%s -cf ../archive6.tar fff\\a?ca aaa\\xx*", testprog));
	assertEqualInt(0,
	    systemf("%s -tf ../archive6.tar > ../list6", testprog));
	assertFileContainsLinesAnyOrder("../list6", list6);

	/*
	 * Test2: Archive the file start with drive letters.
	 */
	/* Test2a: start with "/" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 0);
	assertEqualInt(0,
	    systemf("%s -cf ../archive10.tar %s > ../out10 2> ../err10",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive10.tar > ../list10", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list10");
	free(fp1);
	free(fp2);

	/* Test2b: start with "\" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 1);
	assertEqualInt(0,
	    systemf("%s -cf ../archive11.tar %s > ../out11 2> ../err11",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive11.tar > ../list11", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list11");
	free(fp1);
	free(fp2);

	/* Test2c: start with "c:/" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 2);
	assertEqualInt(0,
	    systemf("%s -cf ../archive12.tar %s > ../out12 2> ../err12",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive12.tar > ../list12", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list12");
	free(fp1);
	free(fp2);

	/* Test2d: start with "c:\" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 3);
	assertEqualInt(0,
	    systemf("%s -cf ../archive13.tar %s > ../out13 2> ../err13",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive13.tar > ../list13", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list13");
	free(fp1);
	free(fp2);

	/* Test2e: start with "//./c:/" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 4);
	assertEqualInt(0,
	    systemf("%s -cf ../archive14.tar %s > ../out14 2> ../err14",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive14.tar > ../list14", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list14");
	free(fp1);
	free(fp2);

	/* Test2f: start with "\\.\c:\" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 5);
	assertEqualInt(0,
	    systemf("%s -cf ../archive15.tar %s > ../out15 2> ../err15",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive15.tar > ../list15", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list15");
	free(fp1);
	free(fp2);

	/* Test2g: start with "//?/c:/" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 6);
	failure("fp1=%s, fp2=%s", fp1, fp2);
	assertEqualInt(0,
	    systemf("%s -cf ../archive16.tar %s > ../out16 2> ../err16",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive16.tar > ../list16", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list16");
	free(fp1);
	free(fp2);

	/* Test2h: start with "\\?\c:\" */
	mkfullpath(&fp1, &fp2, "aaa/file1", 7);
	failure("fp1=%s, fp2=%s", fp1, fp2);
	assertEqualInt(0,
	    systemf("%s -cf ../archive17.tar %s > ../out17 2> ../err17",
	        testprog, fp1));
	assertEqualInt(0,
	    systemf("%s -tf ../archive17.tar > ../list17", testprog));
	/* Check drive letters have been stripped. */
	assertFileContents(fp2, strlen(fp2), "../list17");
	free(fp1);
	free(fp2);
#else
	skipping("Windows specific test");
#endif /* _WIN32 && !__CYGWIN__ */
}

File Added: pkgsrc/archivers/libarchive/files/tar/test/list.h
DEFINE_TEST(test_0)
DEFINE_TEST(test_basic)
DEFINE_TEST(test_copy)
DEFINE_TEST(test_empty_mtree)
DEFINE_TEST(test_getdate)
DEFINE_TEST(test_help)
DEFINE_TEST(test_option_T_upper)
DEFINE_TEST(test_option_q)
DEFINE_TEST(test_option_r)
DEFINE_TEST(test_option_s)
DEFINE_TEST(test_patterns)
DEFINE_TEST(test_stdio)
DEFINE_TEST(test_strip_components)
DEFINE_TEST(test_symlink_dir)
DEFINE_TEST(test_version)
DEFINE_TEST(test_windows)

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_patterns_2.tar.uu
begin 644 test_patterns_2.tar
M+W1M<"]F;V\O````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
M(#$Q,#4Q,C$R-C4V(#`Q,C0T,0`@-0``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
M````````````````````````````````````=VAE96P`````````````````
M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````O=&UP+V9O;R]B87(O````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3$R,3(V-3,@,#$S,C`R`"`U````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
M(```````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````"]T;7`O9F]O+V)A
M>@``````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`V-#0@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,3(Q,C8U
M-B`P,3,Q,C8`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'=H965L````````````````````````````````
M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````+W1M<"]F;V\O8F%R+V)A>@``````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#8T-"``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
M,#`P,#`P(#$Q,#4Q,C$R-C4S(#`Q,S8V-P`@,```````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<@`P
M,'1I;0``````````````````````````````````````=VAE96P`````````
M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
9````````````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_patterns_3.tar.uu
begin 644 test_patterns_3.tar
M+W1M<"]F;V\O8F%R+P``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
M(#$Q,#4S,C`W-34R(#`Q,S(P-@`@-0``````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
M````````````````````````````````````=VAE96P`````````````````
M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````O=&UP+V9O;R]B87(O8F%Z+P``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````,#`P-S4U(``P,#$W-3`@`#`P
M,#`P,"``,#`P,#`P,#`P,#`@,3$P-3,R,#<U-3(@,#$S-S8R`"`U````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````'5S=&%R`#`P=&EM``````````````````````````````````````!W
M:&5E;````````````````````````````````````#`P,#`P,"``,#`P,#`P
M(```````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````'1M<"]F;V\O8F%Z
M+P``````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`W-34@`#`P,3<U,"``,#`P,#`P(``P,#`P,#`P,#`P,"`Q,3`U,S(P-S4V
M,"`P,3,Q,S8`(#4`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#!T:6T`````````````````
M`````````````````````'=H965L````````````````````````````````
M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````=&UP+V9O;R]B87HO8F%R+P``````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#<U-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P
M,#`P,#`P(#$Q,#4S,C`W-38P(#`Q,S<P,@`@-0``````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<@`P
M,'1I;0``````````````````````````````````````=VAE96P`````````
M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
9````````````````````````````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/tar/test/test_patterns_4.tar.uu
begin 644 test_patterns_4.tar
M+V9I;&4P,0``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
M(#$Q,34P-C<T-C0R(#`Q,#,S-@`@,```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,```````
M````````````````````````````````````````````````````````````
M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````O+BXO9FEL93`R````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-34R`"`P````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````'5S=&%R`#`P````````````````````````````````````````````
M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
M(```````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````"\N+B\N+B]F:6QE
M,#,`````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
M,B`P,3`W-C8`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#``````````````````````
M````````````````````````````````````````````````````````````
M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````8SHO9FEL93`T````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#4W-@`@,```````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<@`P
M,```````````````````````````````````````````````````````````
M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!$.BXN+V9I;&4P-0``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````,#`P-C0T(``P,#$W
M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C<T`"`P
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````'5S=&%R`#`P````````````````````````````````````
M`````````````````````````````````````````````````#`P,#`P,"``
M,#`P,#`P(```````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````&,Z+BXO
M+BXO9FEL93`V````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
M,#8W-#8T,B`P,3$Q-#<`(#``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(`,#``````````````
M````````````````````````````````````````````````````````````
M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````0SHO+BXO9FEL93`W````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,#<U-``@,```````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!U
M<W1A<@`P,```````````````````````````````````````````````````
M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!A.B\N+B\N+B]F:6QE,#@`
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````,#`P-C0T
M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
M,C(V`"`P````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````'5S=&%R`#`P````````````````````````````
M`````````````````````````````````````````````````````````#`P
M,#`P,"``,#`P,#`P(```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`"\O+B]C.B]F:6QE,#D`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
M,"`Q,3$U,#8W-#8T,B`P,3$P-S8`(#``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````=7-T87(`,#``````
M````````````````````````````````````````````````````````````
M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````+R\N+T,Z+RXN+V9I;&4Q,```````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P
M,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3(T,0`@,```````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!U<W1A<@`P,```````````````````````````````````````````
M```````````````````````````````````````````P,#`P,#`@`#`P,#`P
M,"``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````O+S\O8SHO9FEL
M93$Q````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V
M-#(@,#$Q,3$P`"`P````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````'5S=&%R`#`P````````````````````
M````````````````````````````````````````````````````````````
M`````#`P,#`P,"``,#`P,#`P(```````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````"\O/R]#.B\N+B]F:6QE,3(`````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P
M,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$R-C0`(#``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````=7-T87(`
M,#``````````````````````````````````````````````````````````
M````````````````````````````,#`P,#`P(``P,#`P,#`@````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````+R\O+V,Z+V9I;&4Q,P``````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````#`P,#8T-"``,#`Q
M-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3`W,@`@
M,```````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!U<W1A<@`P,```````````````````````````````````
M```````````````````````````````````````````````````P,#`P,#`@
M`#`P,#`P,"``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````O+R\O
M0SHO+R\O+V9I;&4Q-```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q
M-3`V-S0V-#(@,#$Q,S(W`"`P````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````'5S=&%R`#`P````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#`P,"``,#`P,#`P(```````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````"\O/R]53D,O<V5R=F5R+W-H87)E+V9I;&4Q-0``````
M````````````````````````````````````````````````````````````
M```````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q
M(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3,V,S4`(#``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M=7-T87(`,#``````````````````````````````````````````````````
M````````````````````````````````````,#`P,#`P(``P,#`P,#`@````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````+R\_+U5.0R]F:6QE,38`
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````#`P,#8T
M-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q
M,3(R-@`@,```````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!U<W1A<@`P,```````````````````````````
M```````````````````````````````````````````````````````````P
M,#`P,#`@`#`P,#`P,"``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```O+S\O54Y#+RXN+V9I;&4Q-P``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P
M,#`@,3$Q-3`V-S0V-#(@,#$Q-#0R`"`P````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````'5S=&%R`#`P````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#`P,"``,#`P,#`P(```````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````"\O/R]U;F,O<V5R=F5R+W-H87)E+V9I;&4Q
M.```````````````````````````````````````````````````````````
M```````````````````````````````````````P,#`V-#0@`#`P,3<U,2``
M,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,30P,#``(#``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````=7-T87(`,#``````````````````````````````````````````
M````````````````````````````````````````````,#`P,#`P(``P,#`P
M,#`@````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````+R\_+W5N8R]F
M:6QE,3D`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T
M-C0R(#`Q,3,W,0`@,```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!U<W1A<@`P,```````````````````
M````````````````````````````````````````````````````````````
M```````P,#`P,#`@`#`P,#`P,"``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````O+S\O=6YC+RXN+V9I;&4R,```````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P
M,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3<T`"`P````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````'5S=&%R
M`#`P````````````````````````````````````````````````````````
M`````````````````````````````#`P,#`P,"``,#`P,#`P(```````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````%QF:6QE,C$`````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````P,#`V-#0@`#`P
M,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3`T,34`
M(#``````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````=7-T87(`,#``````````````````````````````````
M````````````````````````````````````````````````````,#`P,#`P
M(``P,#`P,#`@````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````7"XN
M7&9I;&4R,@``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q
M,34P-C<T-C0R(#`Q,#<P-@`@,```````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!U<W1A<@`P,```````````
M````````````````````````````````````````````````````````````
M```````````````P,#`P,#`@`#`P,#`P,"``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!<+BY<+BY<9FEL93(S````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U
M,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,3<W`"`P````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`'5S=&%R`#`P````````````````````````````````````````````````
M`````````````````````````````````````#`P,#`P,"``,#`P,#`P(```
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````$,Z7&9I;&4R-```````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````P,#`V
M-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P
M,3`V,34`(#``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````=7-T87(`,#``````````````````````````
M````````````````````````````````````````````````````````````
M,#`P,#`P(``P,#`P,#`@````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````>CHN+EQF:6QE,C4`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P
M,#`P(#$Q,34P-C<T-C0R(#`Q,3`T,0`@,```````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!U<W1A<@`P,```
M````````````````````````````````````````````````````````````
M```````````````````````P,#`P,#`@`#`P,#`P,"``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!C.BXN7"XN7&9I;&4R-@``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````,#`P-C0T(``P,#$W-3$@
M`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S`S`"`P````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````'5S=&%R`#`P````````````````````````````````````````
M`````````````````````````````````````````````#`P,#`P,"``,#`P
M,#`P(```````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````%HZ7"XN7&9I
M;&4R-P``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W
M-#8T,B`P,3$Q,S<`(#``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````=7-T87(`,#``````````````````
M````````````````````````````````````````````````````````````
M````````,#`P,#`P(``P,#`P,#`@````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````0SI<+BY<+BY<9FEL93(X````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P
M,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,30P,0`@,```````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````!U<W1A
M<@`P,```````````````````````````````````````````````````````
M```````````````````````````````P,#`P,#`@`#`P,#`P,"``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!<7"Y<8SI<9FEL93(Y````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````,#`P-C0T(``P
M,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,S8T
M`"`P````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````'5S=&%R`#`P````````````````````````````````
M`````````````````````````````````````````````````````#`P,#`P
M,"``,#`P,#`P(```````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````%Q<
M+EQ#.EPN+EQF:6QE,S``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q
M,3$U,#8W-#8T,B`P,3$V,#0`(#``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````=7-T87(`,#``````````
M````````````````````````````````````````````````````````````
M````````````````,#`P,#`P(``P,#`P,#`@````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````7%P_7&,Z7&9I;&4S,0``````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W
M-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,3,W-@`@,```````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``!U<W1A<@`P,```````````````````````````````````````````````
M```````````````````````````````````````P,#`P,#`@`#`P,#`P,"``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!<7#]<1#I<+BY<9FEL
M93,R````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````,#`P
M-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@
M,#$Q-C,P`"`P````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````'5S=&%R`#`P````````````````````````
M````````````````````````````````````````````````````````````
M`#`P,#`P,"``,#`P,#`P(```````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````%Q<7%QC.EQF:6QE,S,`````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P
M,#`P,"`Q,3$U,#8W-#8T,B`P,3$T,S4`(#``````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````=7-T87(`,#``
M````````````````````````````````````````````````````````````
M````````````````````````,#`P,#`P(``P,#`P,#`@````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````7%Q<7$,Z7%Q<7%QF:6QE,S0`````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````#`P,#8T-"``,#`Q-S4Q
M(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C$U-@`@,```
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````!U<W1A<@`P,```````````````````````````````````````
M```````````````````````````````````````````````P,#`P,#`@`#`P
M,#`P,"``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!<7#]<54Y#
M7'-E<G9E<EQS:&%R95QF:6QE,S4`````````````````````````````````
M````````````````````````````````````````````````````````````
M````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V
M-S0V-#(@,#$T,C4U`"`P````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````'5S=&%R`#`P````````````````
M````````````````````````````````````````````````````````````
M`````````#`P,#`P,"``,#`P,#`P(```````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````%Q</UQ53D-<9FEL93,V````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P
M,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$U,30`(#``````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````=7-T
M87(`,#``````````````````````````````````````````````````````
M````````````````````````````````,#`P,#`P(``P,#`P,#`@````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````7%P_7%5.0UPN+EQF:6QE,S<`
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````#`P,#8T-"``
M,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,C`P
M-0`@,```````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````!U<W1A<@`P,```````````````````````````````
M```````````````````````````````````````````````````````P,#`P
M,#`@`#`P,#`P,"``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!<
M7#]<=6YC7'-E<G9E<EQS:&%R95QF:6QE,S@`````````````````````````
M````````````````````````````````````````````````````````````
M````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@
M,3$Q-3`V-S0V-#(@,#$T-#(P`"`P````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````'5S=&%R`#`P````````
M````````````````````````````````````````````````````````````
M`````````````````#`P,#`P,"``,#`P,#`P(```````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````%Q</UQU;F-<9FEL93,Y````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````P,#`V-#0@`#`P,3<U,2``,#`Q
M-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$V-3<`(#``````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````=7-T87(`,#``````````````````````````````````````````````
M````````````````````````````````````````,#`P,#`P(``P,#`P,#`@
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````7%P_7'5N8UPN+EQF
M:6QE-#``````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````#`P
M,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R
M(#`Q,C$S-P`@,```````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````!U<W1A<@`P,```````````````````````
M````````````````````````````````````````````````````````````
M```P,#`P,#`@`#`P,#`P,"``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!<+BXO9FEL930Q````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P
M,#`P,#`@,3$Q-3`V-S0V-#(@,#$P-C,R`"`P````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````'5S=&%R`#`P
M````````````````````````````````````````````````````````````
M`````````````````````````#`P,#`P,"``,#`P,#`P(```````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````%PN+B\N+EQF:6QE-#(`````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````P,#`V-#0@`#`P,3<U
M,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$Q,C,`(#``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````=7-T87(`,#``````````````````````````````````````
M````````````````````````````````````````````````,#`P,#`P(``P
M,#`P,#`@````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````8SHN+B\N
M+EQF:6QE-#,`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P(#$Q,34P
M-C<T-C0R(#`Q,3(R-0`@,```````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````!U<W1A<@`P,```````````````
M````````````````````````````````````````````````````````````
M```````````P,#`P,#`@`#`P,#`P,"``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````!#.B\N+EQF:6QE-#0`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P,3<U,2``
M,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,#,R`"`P````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````````'5S
M=&%R`#`P````````````````````````````````````````````````````
M`````````````````````````````````#`P,#`P,"``,#`P,#`P(```````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````$0Z7"XN+RXN7&9I;&4T-0``
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````P,#`V-#0@
M`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T,B`P,3$S
M,C0`(#``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````=7-T87(`,#``````````````````````````````
M````````````````````````````````````````````````````````,#`P
M,#`P(``P,#`P,#`@````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M7"\N+V,Z7&9I;&4T-@``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P,#`P,#`P
M(#$Q,34P-C<T-C0R(#`Q,3(S,0`@,```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<@`P,```````
M````````````````````````````````````````````````````````````
M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````!<7"XO0SI<+BY<9FEL930W````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````,#`P-C0T(``P,#$W-3$@`#`P
M,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q-3,W`"`P````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````'5S=&%R`#`P````````````````````````````````````````````
M`````````````````````````````````````````#`P,#`P,"``,#`P,#`P
M(```````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````%PO/UQC.B]F:6QE
M-#@`````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````P
M,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U,#8W-#8T
M,B`P,3$R-30`(#``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````=7-T87(`,#``````````````````````
M````````````````````````````````````````````````````````````
M````,#`P,#`P(``P,#`P,#`@````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````7%P_+T0Z+RXN7&9I;&4T.0``````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@`#`P,#`P
M,#`P,#`P(#$Q,34P-C<T-C0R(#`Q,34P-@`@,```````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<@`P
M,```````````````````````````````````````````````````````````
M```````````````````````````P,#`P,#`@`#`P,#`P,"``````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!<+R]<1#I<9FEL934P````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````,#`P-C0T(``P,#$W
M-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q,C0S`"`P
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````'5S=&%R`#`P````````````````````````````````````
M`````````````````````````````````````````````````#`P,#`P,"``
M,#`P,#`P(```````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````````````%Q<+R]C
M.EPO+UQ<9FEL934Q````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P,"`Q,3$U
M,#8W-#8T,B`P,3$W,S$`(#``````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````=7-T87(`,#``````````````
M````````````````````````````````````````````````````````````
M````````````,#`P,#`P(``P,#`P,#`@````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````7"\_+W5.8R]S97)V97)<<VAA<F5<9FEL934R````````
M````````````````````````````````````````````````````````````
M`````````````````````````````#`P,#8T-"``,#`Q-S4Q(``P,#$W-3$@
M`#`P,#`P,#`P,#`P(#$Q,34P-C<T-C0R(#`Q-#$T-0`@,```````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````!U
M<W1A<@`P,```````````````````````````````````````````````````
M```````````````````````````````````P,#`P,#`@`#`P,#`P,"``````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````!<7#\O54YC7&9I;&4U,P``
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````,#`P-C0T
M(``P,#$W-3$@`#`P,3<U,2``,#`P,#`P,#`P,#`@,3$Q-3`V-S0V-#(@,#$Q
M-#<V`"`P````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````'5S=&%R`#`P````````````````````````````
M`````````````````````````````````````````````````````````#`P
M,#`P,"``,#`P,#`P(```````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`%PO/UQ5;D-<+BXO9FEL934T````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````P,#`V-#0@`#`P,3<U,2``,#`Q-S4Q(``P,#`P,#`P,#`P
M,"`Q,3$U,#8W-#8T,B`P,3$W,3(`(#``````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````=7-T87(`,#``````
M````````````````````````````````````````````````````````````
M````````````````````,#`P,#`P(``P,#`P,#`@````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
'````````````
`
end

File Added: pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt
############################################
#
# How to build bsdtar_test
#
############################################
IF(ENABLE_TAR AND ENABLE_TEST)
  SET(bsdtar_test_SOURCES
    ../getdate.c
    main.c
    test.h
    test_0.c
    test_basic.c
    test_copy.c
    test_empty_mtree.c
    test_getdate.c
    test_help.c
    test_option_T_upper.c
    test_option_q.c
    test_option_r.c
    test_option_s.c
    test_patterns.c
    test_stdio.c
    test_strip_components.c
    test_symlink_dir.c
    test_version.c
    test_windows.c
  )
  IF(WIN32 AND NOT CYGWIN)
    LIST(APPEND bsdtar_test_SOURCES ../bsdtar_windows.c)
    LIST(APPEND bsdtar_test_SOURCES ../bsdtar_windows.h)
  ENDIF(WIN32 AND NOT CYGWIN)

  #
  # Register target
  #
  ADD_EXECUTABLE(bsdtar_test ${bsdtar_test_SOURCES})
  SET_PROPERTY(TARGET bsdtar_test PROPERTY COMPILE_DEFINITIONS LIST_H)

  #
  # Generate list.h by grepping DEFINE_TEST() lines out of the C sources.
  #
  GENERATE_LIST_H(${CMAKE_CURRENT_BINARY_DIR}/list.h
    ${CMAKE_CURRENT_LIST_FILE} ${bsdtar_test_SOURCES})
  SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
    ${CMAKE_CURRENT_BINARY_DIR})

  # list.h has a line DEFINE_TEST(testname) for every
  # test.  We can use that to define the tests for cmake by
  # defining a DEFINE_TEST macro and reading list.h in.
  MACRO (DEFINE_TEST _testname)
    ADD_TEST_28(
      NAME bsdtar_${_testname}
      COMMAND bsdtar_test -vv
                          -p $<TARGET_FILE:bsdtar>
                          -r ${CMAKE_CURRENT_SOURCE_DIR}
                          ${_testname})
  ENDMACRO (DEFINE_TEST _testname)

  INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)

  # Experimental new test handling
  ADD_CUSTOM_TARGET(run_bsdtar_test
	COMMAND	bsdtar_test -p ${BSDTAR} -r ${CMAKE_CURRENT_SOURCE_DIR})
  ADD_DEPENDENCIES(run_bsdtar_test bsdtar)
  ADD_DEPENDENCIES(run_all_tests run_bsdtar_test)

ENDIF (ENABLE_TAR AND ENABLE_TEST)

File Added: pkgsrc/archivers/libarchive/files/contrib/untar.c
/*
 * "untar" is an extremely simple tar extractor:
 *  * A single C source file, so it should be easy to compile
 *    and run on any system with a C compiler.
 *  * Extremely portable standard C.  The only non-ANSI function
 *    used is mkdir().
 *  * Reads basic ustar tar archives.
 *  * Does not require libarchive or any other special library.
 *
 * To compile: cc -o untar untar.c
 *
 * Usage:  untar <archive>
 *
 * In particular, this program should be sufficient to extract the
 * distribution for libarchive, allowing people to bootstrap
 * libarchive on systems that do not already have a tar program.
 *
 * To unpack libarchive-x.y.z.tar.gz:
 *    * gunzip libarchive-x.y.z.tar.gz
 *    * untar libarchive-x.y.z.tar
 *
 * Written by Tim Kientzle, March 2009.
 *
 * Released into the public domain.
 */

/* These are all highly standard and portable headers. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* This is for mkdir(); this may need to be changed for some platforms. */
#include <sys/stat.h>  /* For mkdir() */

/* Parse an octal number, ignoring leading and trailing nonsense. */
static int
parseoct(const char *p, size_t n)
{
	int i = 0;

	while (*p < '0' || *p > '7') {
		++p;
		--n;
	}
	while (*p >= '0' && *p <= '7' && n > 0) {
		i *= 8;
		i += *p - '0';
		++p;
		--n;
	}
	return (i);
}

/* Returns true if this is 512 zero bytes. */
static int
is_end_of_archive(const char *p)
{
	int n;
	for (n = 511; n >= 0; --n)
		if (p[n] != '\0')
			return (0);
	return (1);
}

/* Create a directory, including parent directories as necessary. */
static void
create_dir(char *pathname, int mode)
{
	char *p;
	int r;

	/* Strip trailing '/' */
	if (pathname[strlen(pathname) - 1] == '/')
		pathname[strlen(pathname) - 1] = '\0';

	/* Try creating the directory. */
	r = mkdir(pathname, mode);

	if (r != 0) {
		/* On failure, try creating parent directory. */
		p = strrchr(pathname, '/');
		if (p != NULL) {
			*p = '\0';
			create_dir(pathname, 0755);
			*p = '/';
			r = mkdir(pathname, mode);
		}
	}
	if (r != 0)
		fprintf(stderr, "Could not create directory %s\n", pathname);
}

/* Create a file, including parent directory as necessary. */
static FILE *
create_file(char *pathname, int mode)
{
	FILE *f;
	f = fopen(pathname, "w+");
	if (f == NULL) {
		/* Try creating parent dir and then creating file. */
		char *p = strrchr(pathname, '/');
		if (p != NULL) {
			*p = '\0';
			create_dir(pathname, 0755);
			*p = '/';
			f = fopen(pathname, "w+");
		}
	}
	return (f);
}

/* Verify the tar checksum. */
static int
verify_checksum(const char *p)
{
	int n, u = 0;
	for (n = 0; n < 512; ++n) {
		if (n < 148 || n > 155)
			/* Standard tar checksum adds unsigned bytes. */
			u += ((unsigned char *)p)[n];
		else
			u += 0x20;

	}
	return (u == parseoct(p + 148, 8));
}

/* Extract a tar archive. */
static void
untar(FILE *a, const char *path)
{
	char buff[512];
	FILE *f = NULL;
	size_t bytes_read;
	int filesize;

	printf("Extracting from %s\n", path);
	for (;;) {
		bytes_read = fread(buff, 1, 512, a);
		if (bytes_read < 512) {
			fprintf(stderr,
			    "Short read on %s: expected 512, got %d\n",
			    path, bytes_read);
			return;
		}
		if (is_end_of_archive(buff)) {
			printf("End of %s\n", path);
			return;
		}
		if (!verify_checksum(buff)) {
			fprintf(stderr, "Checksum failure\n");
			return;
		}
		filesize = parseoct(buff + 124, 12);
		switch (buff[156]) {
		case '1':
			printf(" Ignoring hardlink %s\n", buff);
			break;
		case '2':
			printf(" Ignoring symlink %s\n", buff);
			break;
		case '3':
			printf(" Ignoring character device %s\n", buff);
				break;
		case '4':
			printf(" Ignoring block device %s\n", buff);
			break;
		case '5':
			printf(" Extracting dir %s\n", buff);
			create_dir(buff, parseoct(buff + 100, 8));
			filesize = 0;
			break;
		case '6':
			printf(" Ignoring FIFO %s\n", buff);
			break;
		default:
			printf(" Extracting file %s\n", buff);
			f = create_file(buff, parseoct(buff + 100, 8));
			break;
		}
		while (filesize > 0) {
			bytes_read = fread(buff, 1, 512, a);
			if (bytes_read < 512) {
				fprintf(stderr,
				    "Short read on %s: Expected 512, got %d\n",
				    path, bytes_read);
				return;
			}
			if (filesize < 512)
				bytes_read = filesize;
			if (f != NULL) {
				if (fwrite(buff, 1, bytes_read, f)
				    != bytes_read)
				{
					fprintf(stderr, "Failed write\n");
					fclose(f);
					f = NULL;
				}
			}
			filesize -= bytes_read;
		}
		if (f != NULL) {
			fclose(f);
			f = NULL;
		}
	}
}

int
main(int argc, char **argv)
{
	FILE *a;

	++argv; /* Skip program name */
	for ( ;*argv != NULL; ++argv) {
		a = fopen(*argv, "r");
		if (a == NULL)
			fprintf(stderr, "Unable to open %s\n", *argv);
		else {
			untar(a, *argv);
			fclose(a);
		}
	}
	return (0);
}

File Deleted: pkgsrc/archivers/libarchive/files/contrib/libarchive_autodetect-st_lib_archive.m4

File Deleted: pkgsrc/archivers/libarchive/files/contrib/libarchive.1aix53.spec

File Deleted: pkgsrc/archivers/libarchive/files/contrib/libarchive.spec

File Deleted: pkgsrc/archivers/libarchive/files/contrib/README

File Added: pkgsrc/archivers/libarchive/files/contrib/shar/tree.c
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*-
 * This is a new directory-walking system that addresses a number
 * of problems I've had with fts(3).  In particular, it has no
 * pathname-length limits (other than the size of 'int'), handles
 * deep logical traversals, uses considerably less memory, and has
 * an opaque interface (easier to modify in the future).
 *
 * Internally, it keeps a single list of "tree_entry" items that
 * represent filesystem objects that require further attention.
 * Non-directories are not kept in memory: they are pulled from
 * readdir(), returned to the client, then freed as soon as possible.
 * Any directory entry to be traversed gets pushed onto the stack.
 *
 * There is surprisingly little information that needs to be kept for
 * each item on the stack.  Just the name, depth (represented here as the
 * string length of the parent directory's pathname), and some markers
 * indicating how to get back to the parent (via chdir("..") for a
 * regular dir or via fchdir(2) for a symlink).
 */
#include "tree_config.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include "tree.h"

/*
 * TODO:
 *    1) Loop checking.
 *    3) Arbitrary logical traversals by closing/reopening intermediate fds.
 */

struct tree_entry {
	struct tree_entry *next;
	struct tree_entry *parent;
	char *name;
	size_t dirname_length;
	dev_t dev;
	ino_t ino;
	int fd;
	int flags;
};

/* Definitions for tree_entry.flags bitmap. */
#define	isDir 1 /* This entry is a regular directory. */
#define	isDirLink 2 /* This entry is a symbolic link to a directory. */
#define	needsPreVisit 4 /* This entry needs to be previsited. */
#define	needsPostVisit 8 /* This entry needs to be postvisited. */

/*
 * Local data for this package.
 */
struct tree {
	struct tree_entry	*stack;
	struct tree_entry	*current;
	DIR	*d;
	int	 initialDirFd;
	int	 flags;
	int	 visit_type;
	int	 tree_errno; /* Error code from last failed operation. */

	char	*buff;
	const char	*basename;
	size_t	 buff_length;
	size_t	 path_length;
	size_t	 dirname_length;

	int	 depth;
	int	 openCount;
	int	 maxOpenCount;

	struct stat	lst;
	struct stat	st;
};

/* Definitions for tree.flags bitmap. */
#define needsReturn 8  /* Marks first entry as not having been returned yet. */
#define hasStat 16  /* The st entry is set. */
#define hasLstat 32 /* The lst entry is set. */


#ifdef HAVE_DIRENT_D_NAMLEN
/* BSD extension; avoids need for a strlen() call. */
#define D_NAMELEN(dp)	(dp)->d_namlen
#else
#define D_NAMELEN(dp)	(strlen((dp)->d_name))
#endif

#if 0
#include <stdio.h>
void
tree_dump(struct tree *t, FILE *out)
{
	struct tree_entry *te;

	fprintf(out, "\tdepth: %d\n", t->depth);
	fprintf(out, "\tbuff: %s\n", t->buff);
	fprintf(out, "\tpwd: "); fflush(stdout); system("pwd");
	fprintf(out, "\taccess: %s\n", t->basename);
	fprintf(out, "\tstack:\n");
	for (te = t->stack; te != NULL; te = te->next) {
		fprintf(out, "\t\tte->name: %s%s%s\n", te->name,
		    te->flags & needsPreVisit ? "" : " *",
		    t->current == te ? " (current)" : "");
	}
}
#endif

/*
 * Add a directory path to the current stack.
 */
static void
tree_push(struct tree *t, const char *path)
{
	struct tree_entry *te;

	te = malloc(sizeof(*te));
	memset(te, 0, sizeof(*te));
	te->next = t->stack;
	t->stack = te;
	te->fd = -1;
	te->name = strdup(path);
	te->flags = needsPreVisit | needsPostVisit;
	te->dirname_length = t->dirname_length;
}

/*
 * Append a name to the current path.
 */
static void
tree_append(struct tree *t, const char *name, size_t name_length)
{
	char *p;

	if (t->buff != NULL)
		t->buff[t->dirname_length] = '\0';
	/* Strip trailing '/' from name, unless entire name is "/". */
	while (name_length > 1 && name[name_length - 1] == '/')
		name_length--;

	/* Resize pathname buffer as needed. */
	while (name_length + 1 + t->dirname_length >= t->buff_length) {
		t->buff_length *= 2;
		if (t->buff_length < 1024)
			t->buff_length = 1024;
		t->buff = realloc(t->buff, t->buff_length);
	}
	p = t->buff + t->dirname_length;
	t->path_length = t->dirname_length + name_length;
	/* Add a separating '/' if it's needed. */
	if (t->dirname_length > 0 && p[-1] != '/') {
		*p++ = '/';
		t->path_length ++;
	}
	strncpy(p, name, name_length);
	p[name_length] = '\0';
	t->basename = p;
}

/*
 * Open a directory tree for traversal.
 */
struct tree *
tree_open(const char *path)
{
	struct tree *t;

	t = malloc(sizeof(*t));
	memset(t, 0, sizeof(*t));
	tree_append(t, path, strlen(path));
	t->initialDirFd = open(".", O_RDONLY);
	/*
	 * During most of the traversal, items are set up and then
	 * returned immediately from tree_next().  That doesn't work
	 * for the very first entry, so we set a flag for this special
	 * case.
	 */
	t->flags = needsReturn;
	return (t);
}

/*
 * We've finished a directory; ascend back to the parent.
 */
static void
tree_ascend(struct tree *t)
{
	struct tree_entry *te;

	te = t->stack;
	t->depth--;
	if (te->flags & isDirLink) {
		fchdir(te->fd);
		close(te->fd);
		t->openCount--;
	} else {
		chdir("..");
	}
}

/*
 * Pop the working stack.
 */
static void
tree_pop(struct tree *t)
{
	struct tree_entry *te;

	t->buff[t->dirname_length] = '\0';
	if (t->stack == t->current && t->current != NULL)
		t->current = t->current->parent;
	te = t->stack;
	t->stack = te->next;
	t->dirname_length = te->dirname_length;
	t->basename = t->buff + t->dirname_length;
	/* Special case: starting dir doesn't skip leading '/'. */
	if (t->dirname_length > 0)
		t->basename++;
	free(te->name);
	free(te);
}

/*
 * Get the next item in the tree traversal.
 */
int
tree_next(struct tree *t)
{
	struct dirent *de = NULL;

	/* Handle the startup case by returning the initial entry. */
	if (t->flags & needsReturn) {
		t->flags &= ~needsReturn;
		return (t->visit_type = TREE_REGULAR);
	}

	while (t->stack != NULL) {
		/* If there's an open dir, get the next entry from there. */
		while (t->d != NULL) {
			de = readdir(t->d);
			if (de == NULL) {
				closedir(t->d);
				t->d = NULL;
			} else if (de->d_name[0] == '.'
			    && de->d_name[1] == '\0') {
				/* Skip '.' */
			} else if (de->d_name[0] == '.'
			    && de->d_name[1] == '.'
			    && de->d_name[2] == '\0') {
				/* Skip '..' */
			} else {
				/*
				 * Append the path to the current path
				 * and return it.
				 */
				tree_append(t, de->d_name, D_NAMELEN(de));
				t->flags &= ~hasLstat;
				t->flags &= ~hasStat;
				return (t->visit_type = TREE_REGULAR);
			}
		}

		/* If the current dir needs to be visited, set it up. */
		if (t->stack->flags & needsPreVisit) {
			t->current = t->stack;
			tree_append(t, t->stack->name, strlen(t->stack->name));
			t->stack->flags &= ~needsPreVisit;
			/* If it is a link, set up fd for the ascent. */
			if (t->stack->flags & isDirLink) {
				t->stack->fd = open(".", O_RDONLY);
				t->openCount++;
				if (t->openCount > t->maxOpenCount)
					t->maxOpenCount = t->openCount;
			}
			t->dirname_length = t->path_length;
			if (chdir(t->stack->name) != 0) {
				/* chdir() failed; return error */
				tree_pop(t);
				t->tree_errno = errno;
				return (t->visit_type = TREE_ERROR_DIR);
			}
			t->depth++;
			t->d = opendir(".");
			if (t->d == NULL) {
				tree_ascend(t); /* Undo "chdir" */
				tree_pop(t);
				t->tree_errno = errno;
				return (t->visit_type = TREE_ERROR_DIR);
			}
			t->flags &= ~hasLstat;
			t->flags &= ~hasStat;
			t->basename = ".";
			return (t->visit_type = TREE_POSTDESCENT);
		}

		/* We've done everything necessary for the top stack entry. */
		if (t->stack->flags & needsPostVisit) {
			tree_ascend(t);
			tree_pop(t);
			t->flags &= ~hasLstat;
			t->flags &= ~hasStat;
			return (t->visit_type = TREE_POSTASCENT);
		}
	}
	return (t->visit_type = 0);
}

/*
 * Return error code.
 */
int
tree_errno(struct tree *t)
{
	return (t->tree_errno);
}

/*
 * Called by the client to mark the directory just returned from
 * tree_next() as needing to be visited.
 */
void
tree_descend(struct tree *t)
{
	if (t->visit_type != TREE_REGULAR)
		return;

	if (tree_current_is_physical_dir(t)) {
		tree_push(t, t->basename);
		t->stack->flags |= isDir;
	} else if (tree_current_is_dir(t)) {
		tree_push(t, t->basename);
		t->stack->flags |= isDirLink;
	}
}

/*
 * Get the stat() data for the entry just returned from tree_next().
 */
const struct stat *
tree_current_stat(struct tree *t)
{
	if (!(t->flags & hasStat)) {
		if (stat(t->basename, &t->st) != 0)
			return NULL;
		t->flags |= hasStat;
	}
	return (&t->st);
}

/*
 * Get the lstat() data for the entry just returned from tree_next().
 */
const struct stat *
tree_current_lstat(struct tree *t)
{
	if (!(t->flags & hasLstat)) {
		if (lstat(t->basename, &t->lst) != 0)
			return NULL;
		t->flags |= hasLstat;
	}
	return (&t->lst);
}

/*
 * Test whether current entry is a dir or link to a dir.
 */
int
tree_current_is_dir(struct tree *t)
{
	const struct stat *st;

	/*
	 * If we already have lstat() info, then try some
	 * cheap tests to determine if this is a dir.
	 */
	if (t->flags & hasLstat) {
		/* If lstat() says it's a dir, it must be a dir. */
		if (S_ISDIR(tree_current_lstat(t)->st_mode))
			return 1;
		/* Not a dir; might be a link to a dir. */
		/* If it's not a link, then it's not a link to a dir. */
		if (!S_ISLNK(tree_current_lstat(t)->st_mode))
			return 0;
		/*
		 * It's a link, but we don't know what it's a link to,
		 * so we'll have to use stat().
		 */
	}

	st = tree_current_stat(t);
	/* If we can't stat it, it's not a dir. */
	if (st == NULL)
		return 0;
	/* Use the definitive test.  Hopefully this is cached. */
	return (S_ISDIR(st->st_mode));
}

/*
 * Test whether current entry is a physical directory.  Usually, we
 * already have at least one of stat() or lstat() in memory, so we
 * use tricks to try to avoid an extra trip to the disk.
 */
int
tree_current_is_physical_dir(struct tree *t)
{
	const struct stat *st;

	/*
	 * If stat() says it isn't a dir, then it's not a dir.
	 * If stat() data is cached, this check is free, so do it first.
	 */
	if ((t->flags & hasStat)
	    && (!S_ISDIR(tree_current_stat(t)->st_mode)))
		return 0;

	/*
	 * Either stat() said it was a dir (in which case, we have
	 * to determine whether it's really a link to a dir) or
	 * stat() info wasn't available.  So we use lstat(), which
	 * hopefully is already cached.
	 */

	st = tree_current_lstat(t);
	/* If we can't stat it, it's not a dir. */
	if (st == NULL)
		return 0;
	/* Use the definitive test.  Hopefully this is cached. */
	return (S_ISDIR(st->st_mode));
}

/*
 * Test whether current entry is a symbolic link.
 */
int
tree_current_is_physical_link(struct tree *t)
{
	const struct stat *st = tree_current_lstat(t);
	if (st == NULL)
		return 0;
	return (S_ISLNK(st->st_mode));
}

/*
 * Return the access path for the entry just returned from tree_next().
 */
const char *
tree_current_access_path(struct tree *t)
{
	return (t->basename);
}

/*
 * Return the full path for the entry just returned from tree_next().
 */
const char *
tree_current_path(struct tree *t)
{
	return (t->buff);
}

/*
 * Return the length of the path for the entry just returned from tree_next().
 */
size_t
tree_current_pathlen(struct tree *t)
{
	return (t->path_length);
}

/*
 * Return the nesting depth of the entry just returned from tree_next().
 */
int
tree_current_depth(struct tree *t)
{
	return (t->depth);
}

/*
 * Terminate the traversal and release any resources.
 */
void
tree_close(struct tree *t)
{
	/* Release anything remaining in the stack. */
	while (t->stack != NULL)
		tree_pop(t);
	if (t->buff)
		free(t->buff);
	/* chdir() back to where we started. */
	if (t->initialDirFd >= 0) {
		fchdir(t->initialDirFd);
		close(t->initialDirFd);
		t->initialDirFd = -1;
	}
	free(t);
}

File Added: pkgsrc/archivers/libarchive/files/contrib/shar/shar.1
.\" Copyright (c) 1990, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)shar.1	8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
.Dd April 17, 2008
.Dt SHAR 1
.Os
.Sh NAME
.Nm shar
.Nd create a shell archive of files
.Sh SYNOPSIS
.Nm
.Op Fl br
.Op Fl o Ar archive-file
.Ar
.Sh DESCRIPTION
The
.Nm
command writes a
.Xr sh 1
shell script which will recreate the file hierarchy specified by the command
line operands.
.Pp
The
.Nm
command is normally used for distributing files by
.Xr ftp 1
or
.Xr mail 1 .
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl b
Use an alternative binary format.  Content of files will be uuencoded.
This option should be used to archive binary files correctly.
In this mode also file permissions will be stored to the archive.
uudecode(1) is needed to extract archives created with this option.
.It Fl o Ar archive-file
Redirect output to
.Ar archive-file .
.It Fl r
If
.Ar file
given on command line is a directory the entire subtree will be archived.
Symbolic links given on command line are followed.  Other symbolic links will
be archived as such.
.El
.Sh EXAMPLES
To create a shell archive of the program
.Xr ls 1
and mail it to Rick:
.Bd -literal -offset indent
cd ls
shar -r . \&| mail -s "ls source" rick
.Ed
.Pp
To recreate the program directory:
.Bd -literal -offset indent
mkdir ls
cd ls
\&...
<delete header lines and examine mailed archive>
\&...
sh archive
.Ed
.Sh SEE ALSO
.Xr compress 1 ,
.Xr mail 1 ,
.Xr tar 1 ,
.Xr uuencode 1 ,
.Xr uuencode 5
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.4 .
This is a re-implementation based on the libarchive(3) library.
.Sh BUGS
The
.Nm
command makes no provisions for hard links.
.Pp
Files containing magic characters or files without a newline ('\\n') as the
last character are not handled correctly with the default format.  Use the -b
option for binary files.
.Pp
It is easy to insert trojan horses into
.Nm
files.
It is strongly recommended that all shell archive files be examined
before running them through
.Xr sh 1 .
Archives produced using this implementation of
.Nm
may be easily examined with the command:
.Bd -literal -offset indent
egrep -v '^[X#]' shar.file
.Ed

File Added: pkgsrc/archivers/libarchive/files/contrib/shar/tree_config.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */
#ifndef TREE_CONFIG_H_INCLUDED
#define	TREE_CONFIG_H_INCLUDED

#if defined(PLATFORM_CONFIG_H)
/*
 * Use hand-built config.h in environments that need it.
 */
#include PLATFORM_CONFIG_H
#elif defined(HAVE_CONFIG_H)
/*
 * Most POSIX platforms use the 'configure' script to build config.h
 */
#include "../config.h"
#elif defined(__FreeBSD__)
/*
 * Built-in definitions for FreeBSD.
 */
#define	HAVE_DIRENT_D_NAMLEN 1
#define	HAVE_DIRENT_H 1
#define	HAVE_ERRNO_H 1
#define	HAVE_FCNTL_H 1
#define	HAVE_LIBARCHIVE 1
#define	HAVE_STDLIB_H 1
#define	HAVE_STRING_H 1
#define	HAVE_SYS_STAT_H 1
#define	HAVE_UNISTD_H 1
#else
/*
 * Warn if there's no platform configuration.
 */
#error Oops: No config.h and no built-in configuration in bsdtar_platform.h.
#endif /* !HAVE_CONFIG_H */

/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
#ifdef __FreeBSD__
#include <sys/cdefs.h>  /* For __FBSDID */
#else
/* Just leaving this macro replacement empty leads to a dangling semicolon. */
#define	__FBSDID(a)     struct _undefined_hack
#endif

#ifdef HAVE_LIBARCHIVE
/* If we're using the platform libarchive, include system headers. */
#include <archive.h>
#include <archive_entry.h>
#else
/* Otherwise, include user headers. */
#include "archive.h"
#include "archive_entry.h"
#endif

#endif /* !TREE_CONFIG_H_INCLUDED */

File Added: pkgsrc/archivers/libarchive/files/contrib/shar/shar.c
/*-
 * Copyright (c) 2008 Jaakko Heinonen
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <sys/cdefs.h>
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
#endif

#include <sys/stat.h>
#include <sys/types.h>

#include <archive.h>
#include <archive_entry.h>
#include <assert.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>

#include "tree.h"

/* command line options */
static int	b_opt;	/* use alternative shar binary format */
static int	r_opt;	/* recurse into subdirectories */
static char	*o_arg;	/* output file name */

static void
usage(void)
{
	fprintf(stderr, "Usage: shar [-br] [-o filename] file ...\n");
	exit(EX_USAGE);
}

/*
 * Initialize archive structure and create a shar archive.
 */
static struct archive *
shar_create(void)
{
	struct archive *a;

	if ((a = archive_write_new()) == NULL)
		errx(EXIT_FAILURE, "%s", archive_error_string(a));

	if (b_opt)
		archive_write_set_format_shar_dump(a);
	else
		archive_write_set_format_shar(a);
	archive_write_set_compression_none(a);

	if (archive_write_open_filename(a, o_arg) != ARCHIVE_OK)
		errx(EX_CANTCREAT, "%s", archive_error_string(a));

	return (a);
}

/* buffer for file data */
static char buffer[32768];

/*
 * Write file data to an archive entry.
 */
static int
shar_write_entry_data(struct archive *a, const int fd)
{
	ssize_t bytes_read, bytes_written;

	assert(a != NULL);
	assert(fd >= 0);

	bytes_read = read(fd, buffer, sizeof(buffer));
	while (bytes_read != 0) {
		if (bytes_read < 0) {
			archive_set_error(a, errno, "Read failed");
			return (ARCHIVE_WARN);
		}
		bytes_written = archive_write_data(a, buffer, bytes_read);
		if (bytes_written < 0)
			return (ARCHIVE_WARN);
		bytes_read = read(fd, buffer, sizeof(buffer));
	}

	return (ARCHIVE_OK);
}

/*
 * Write a file to the archive. We have special handling for symbolic links.
 */
static int
shar_write_entry(struct archive *a, const char *pathname, const char *accpath,
    const struct stat *st)
{
	struct archive_entry *entry;
	int fd = -1;
	int ret = ARCHIVE_OK;

	assert(a != NULL);
	assert(pathname != NULL);
	assert(accpath != NULL);
	assert(st != NULL);

	entry = archive_entry_new();

	if (S_ISREG(st->st_mode) && st->st_size > 0) {
		/* regular file */
		if ((fd = open(accpath, O_RDONLY)) == -1) {
			warn("%s", accpath);
			ret = ARCHIVE_WARN;
			goto out;
		}
	} else if (S_ISLNK(st->st_mode)) {
		/* symbolic link */
		char lnkbuff[PATH_MAX + 1];
		int lnklen;
		if ((lnklen = readlink(accpath, lnkbuff, PATH_MAX)) == -1) {
			warn("%s", accpath);
			ret = ARCHIVE_WARN;
			goto out;
		}
		lnkbuff[lnklen] = '\0';
		archive_entry_set_symlink(entry, lnkbuff);
	}
	archive_entry_copy_stat(entry, st);
	archive_entry_set_pathname(entry, pathname);
	if (!S_ISREG(st->st_mode) || st->st_size == 0)
		archive_entry_set_size(entry, 0);
	if (archive_write_header(a, entry) != ARCHIVE_OK) {
		warnx("%s: %s", pathname, archive_error_string(a));
		ret = ARCHIVE_WARN;
		goto out;
	}
	if (fd >= 0) {
		if ((ret = shar_write_entry_data(a, fd)) != ARCHIVE_OK)
			warnx("%s: %s", accpath, archive_error_string(a));
	}
out:
	archive_entry_free(entry);
	if (fd >= 0)
		close(fd);

	return (ret);
}

/*
 * Write singe path to the archive. The path can be a regular file, directory
 * or device. Symbolic links are followed.
 */
static int
shar_write_path(struct archive *a, const char *pathname)
{
	struct stat st;

	assert(a != NULL);
	assert(pathname != NULL);

	if ((stat(pathname, &st)) == -1) {
		warn("%s", pathname);
		return (ARCHIVE_WARN);
	}

	return (shar_write_entry(a, pathname, pathname, &st));
}

/*
 * Write tree to the archive. If pathname is a symbolic link it will be
 * followed. Other symbolic links are stored as such to the archive.
 */
static int
shar_write_tree(struct archive *a, const char *pathname)
{
	struct tree *t;
	const struct stat *lst, *st;
	int error = 0;
	int tree_ret;
	int first;

	assert(a != NULL);
	assert(pathname != NULL);

	t = tree_open(pathname);
	for (first = 1; (tree_ret = tree_next(t)); first = 0) {
		if (tree_ret == TREE_ERROR_DIR) {
			warnx("%s: %s", tree_current_path(t),
			    strerror(tree_errno(t)));
			error = 1;
			continue;
		} else if (tree_ret != TREE_REGULAR)
			continue;
		if ((lst = tree_current_lstat(t)) == NULL) {
			warn("%s", tree_current_path(t));
			error = 1;
			continue;
		}
		/*
		 * If the symlink was given on command line then
		 * follow it rather than write it as symlink.
		 */
		if (first && S_ISLNK(lst->st_mode)) {
			if ((st = tree_current_stat(t)) == NULL) {
				warn("%s", tree_current_path(t));
				error = 1;
				continue;
			}
		} else
			st = lst;

		if (shar_write_entry(a, tree_current_path(t),
		    tree_current_access_path(t), st) != ARCHIVE_OK)
			error = 1;

		tree_descend(t);
	}

	tree_close(t);

	return ((error != 0) ? ARCHIVE_WARN : ARCHIVE_OK);
}

/*
 * Create a shar archive and write files/trees into it.
 */
static int
shar_write(char **fn, size_t nfn)
{
	struct archive *a;
	size_t i;
	int error = 0;

	assert(fn != NULL);
	assert(nfn > 0);

	a = shar_create();

	for (i = 0; i < nfn; i++) {
		if (r_opt) {
			if (shar_write_tree(a, fn[i]) !=  ARCHIVE_OK)
				error = 1;
		} else {
			if (shar_write_path(a, fn[i]) != ARCHIVE_OK)
				error = 1;
		}
	}

	if (archive_write_finish(a) != ARCHIVE_OK)
		errx(EXIT_FAILURE, "%s", archive_error_string(a));

	if (error != 0)
		warnx("Error exit delayed from previous errors.");

	return (error);
}

int
main(int argc, char **argv)
{
	int opt;

	while ((opt = getopt(argc, argv, "bro:")) != -1) {
		switch (opt) {
		case 'b':
			b_opt = 1;
			break;
		case 'o':
			o_arg = optarg;
			break;
		case 'r':
			r_opt = 1;
			break;
		default:
			usage();
			/* NOTREACHED */
		}
	}
	argc -= optind;
	argv += optind;

	if(argc < 1)
		usage();

	if (shar_write(argv, argc) != 0)
		exit(EXIT_FAILURE);
	else
		exit(EXIT_SUCCESS);
	/* NOTREACHED */
}


File Added: pkgsrc/archivers/libarchive/files/contrib/shar/tree.h
/*-
 * Copyright (c) 2003-2007 Tim Kientzle
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

/*-
 * A set of routines for traversing directory trees.
 * Similar in concept to the fts library, but with a few
 * important differences:
 *    * Uses less memory.  In particular, fts stores an entire directory
 *      in memory at a time.  This package only keeps enough subdirectory
 *      information in memory to track the traversal.  Information
 *      about non-directories is discarded as soon as possible.
 *    * Supports very deep logical traversals.  The fts package
 *      uses "non-chdir" approach for logical traversals.  This
 *      package does use a chdir approach for logical traversals
 *      and can therefore handle pathnames much longer than
 *      PATH_MAX.
 *    * Supports deep physical traversals "out of the box."
 *      Due to the memory optimizations above, there's no need to
 *      limit dir names to 32k.
 */

#include <sys/stat.h>
#include <stdio.h>

struct tree;

/* Initiate/terminate a tree traversal. */
struct tree *tree_open(const char * /* pathname */);
void tree_close(struct tree *);

/*
 * tree_next() returns Zero if there is no next entry, non-zero if there is.
 * Note that directories are potentially visited three times.  The first
 * time as "regular" file.  If tree_descend() is invoked at that time,
 * the directory is added to a work list and will be visited two more
 * times:  once just after descending into the directory and again
 * just after ascending back to the parent.
 *
 * TREE_ERROR is returned if the descent failed (because the
 * directory couldn't be opened, for instance).  This is returned
 * instead of TREE_PREVISIT/TREE_POSTVISIT.
 */
#define	TREE_REGULAR	1
#define	TREE_POSTDESCENT	2
#define	TREE_POSTASCENT	3
#define	TREE_ERROR_DIR	-1
int tree_next(struct tree *);

int tree_errno(struct tree *);

/*
 * Request that current entry be visited.  If you invoke it on every
 * directory, you'll get a physical traversal.  This is ignored if the
 * current entry isn't a directory or a link to a directory.  So, if
 * you invoke this on every returned path, you'll get a full logical
 * traversal.
 */
void tree_descend(struct tree *);

/*
 * Return information about the current entry.
 */

int tree_current_depth(struct tree *);
/*
 * The current full pathname, length of the full pathname,
 * and a name that can be used to access the file.
 * Because tree does use chdir extensively, the access path is
 * almost never the same as the full current path.
 */
const char *tree_current_path(struct tree *);
size_t tree_current_pathlen(struct tree *);
const char *tree_current_access_path(struct tree *);
/*
 * Request the lstat() or stat() data for the current path.  Since the
 * tree package needs to do some of this anyway, and caches the
 * results, you should take advantage of it here if you need it rather
 * than make a redundant stat() or lstat() call of your own.
 */
const struct stat *tree_current_stat(struct tree *);
const struct stat *tree_current_lstat(struct tree *);
/* The following tests may use mechanisms much faster than stat()/lstat(). */
/* "is_physical_dir" is equivalent to S_ISDIR(tree_current_lstat()->st_mode) */
int tree_current_is_physical_dir(struct tree *);
/* "is_physical_link" is equivalent to S_ISLNK(tree_current_lstat()->st_mode) */
int tree_current_is_physical_link(struct tree *);
/* "is_dir" is equivalent to S_ISDIR(tree_current_stat()->st_mode) */
int tree_current_is_dir(struct tree *);

/* For testing/debugging: Dump the internal status to the given filehandle. */
void tree_dump(struct tree *, FILE *);

File Deleted: pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/results.txt

File Deleted: pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh

File Added: pkgsrc/archivers/libarchive/files/doc/mdoc2wiki.awk
#!/usr/bin/awk
#
# Copyright (c) 2003 Peter Stuge <stuge-mdoc2man@cdy.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

# Dramatically overhauled by Tim Kientzle.  This version almost
# handles library-style pages with Fn, Ft, etc commands.  Still
# a lot of problems...

BEGIN {
  displaylines = 0
  listdepth = 0
  trailer = ""
  out = ""
  sep = ""
  nextsep = " "
  spaces = "                    "
}

# Add a word with appropriate preceding whitespace
# Maintain a short queue of the expected upcoming word separators.
function add(str) {
  out=out sep str
  sep = nextsep
  nextsep = " "
}

# Add a word with no following whitespace
# Use for opening punctuation such as '('
function addopen(str) {
  add(str)
  sep = ""
}

# Add a word with no preceding whitespace
# Use for closing punctuation such as ')' or '.'
function addclose(str) {
  sep = ""
  add(str)
}

# Add a word with no space before or after
# Use for separating punctuation such as '='
function addpunct(str) {
  sep = ""
  add(str)
  sep = ""
}

# Emit the current line so far
function endline() {
  addclose(trailer)
  trailer = ""
  if(length(out) > 0) {
    print out
    out=""
  }
  if(displaylines > 0) {
    displaylines = displaylines - 1
    if (displaylines == 0)
      dispend()
  }
  # First word on next line has no preceding whitespace
  sep = ""
}

function linecmd(cmd) {
  endline()
  add(cmd)
  endline()
}

function breakline() {
  linecmd("<br>")
}

# Start an indented display
function dispstart() {
  linecmd("{{{")
}

# End an indented display
function dispend() {
  linecmd("}}}")
}

# Collect rest of input line
function wtail() {
  retval=""
  while(w<nwords) {
    if(length(retval))
      retval=retval " "
    retval=retval words[++w]
  }
  return retval
}

function splitwords(l, dest, n, o, w) {
  n = 1
  delete dest
  while (length(l) > 0) {
    sub("^[ \t]*", "", l)
    if (match(l, "^\"")) {
      l = substr(l, 2)
      o = index(l, "\"")
      if (o > 0) {
	w = substr(l, 1, o-1)
	l = substr(l, o+1)
	dest[n++] = w
      } else {
	dest[n++] = l
	l = ""
      }
    } else {
      o = match(l, "[ \t]")
      if (o > 0) {
	w = substr(l, 1, o-1)
	l = substr(l, o+1)
	dest[n++] = w
      } else {
	dest[n++] = l
	l = ""
      }
    }
  }
  return n-1
}

! /^\./ {
  out = $0
  endline()
  next
}

/^\.\\"/ { next }

{
  sub("^\\.","")
  nwords=splitwords($0, words)
  # TODO: Instead of iterating 'w' over the array, have a separate
  # function that returns 'next word' and use that.  This will allow
  # proper handling of double-quoted arguments as well.
  for(w=1;w<=nwords;w++) {
    if(match(words[w],"^Li$")) { # Literal; rest of line is unformatted
      dispstart()
      displaylines = 1
    } else if(match(words[w],"^Dl$")) { # Display literal
      dispstart()
      displaylines = 1
    } else if(match(words[w],"^Bd$")) { # Begin display
      if(match(words[w+1],"-literal")) {
        dispstart()
	displaylines=10000
	w=nwords
      }
    } else if(match(words[w],"^Ed$")) { # End display
      displaylines = 0
      dispend()
    } else if(match(words[w],"^Ns$")) { # Suppress space before next word
      sep=""
    } else if(match(words[w],"^No$")) { # Normal text
      add(words[++w])
    } else if(match(words[w],"^Dq$")) { # Quote
      addopen("\"")
      add(words[++w])
      while(w<nwords&&!match(words[w+1],"^[\\.,]"))
	add(words[++w])
      addclose("\"")
    } else if(match(words[w],"^Do$")) {
      addopen("\"")
    } else if(match(words[w],"^Dc$")) {
      addclose("\"")
    } else if(match(words[w],"^Oo$")) {
      addopen("`[`")
    } else if(match(words[w],"^Oc$")) {
      addclose("`]`")
    } else if(match(words[w],"^Ao$")) {
      addopen("`<`")
    } else if(match(words[w],"^Ac$")) {
      addclose("`>`")
    } else if(match(words[w],"^Dd$")) {
      date=wtail()
      next
    } else if(match(words[w],"^Dt$")) {
      id=wtail()
      next
    } else if(match(words[w],"^Ox$")) {
      add("OpenBSD")
    } else if(match(words[w],"^Fx$")) {
      add("FreeBSD")
    } else if(match(words[w],"^Bx$")) {
      add("BSD")
    } else if(match(words[w],"^Nx$")) {
      add("NetBSD")
    } else if(match(words[w],"^St$")) {
      if (match(words[w+1], "^-p1003.1$")) {
         w++
         add("IEEE Std 1003.1 (``POSIX.1'')")
      } else if(match(words[w+1], "^-p1003.1-96$")) {
         w++
         add("ISO/IEC 9945-1:1996 (``POSIX.1'')")
      } else if(match(words[w+1], "^-p1003.1-88$")) {
         w++
         add("IEEE Std 1003.1-1988 (``POSIX.1'')")
      } else if(match(words[w+1], "^-p1003.1-2001$")) {
         w++
         add("IEEE Std 1003.1-2001 (``POSIX.1'')")
      } else if(match(words[w+1], "^-susv2$")) {
         w++
         add("Version 2 of the Single UNIX Specification (``SUSv2'')")
      }
    } else if(match(words[w],"^Ex$")) {
      if (match(words[w+1], "^-std$")) {
         w++
         add("The *" name "* utility exits 0 on success, and >0 if an error occurs.")
      }
    } else if(match(words[w],"^Os$")) {
      add("#summary " id " manual page")
    } else if(match(words[w],"^Sh$")) {
      section=wtail()
      linecmd("== " section " ==")
    } else if(match(words[w],"^Xr$")) {
      add("*" words[++w] "*(" words[++w] ")" words[++w])
    } else if(match(words[w],"^Nm$")) {
      if(match(section,"SYNOPSIS"))
        breakline()
      if(w >= nwords)
	n=name
      else if (match(words[w+1], "^[A-Z][a-z]$"))
	n=name
      else if (match(words[w+1], "^[.,;:]$"))
	n=name
      else {
        n=words[++w]
        if(!length(name))
          name=n
      }
      if(!length(n))
        n=name
      if (displaylines == 0)
	add("*" n "*")
      else
	add(n)
    } else if(match(words[w],"^Nd$")) {
      add("- " wtail())
    } else if(match(words[w],"^Fl$")) {
      if (displaylines == 0)
	add("*-" words[++w] "*")
      else
	add("-" words[++w])
    } else if(match(words[w],"^Ar$")) {
      if(w==nwords)
	add("_file ..._")
      else {
	++w
	gsub("<", "`<`", words[w])
	add("_" words[w] "_")
      }
    } else if(match(words[w],"^Cm$")) {
      ++w
      if (displaylines == 0) {
	gsub("^_", "`_`", words[w])
	gsub("\\*$", "`*`", words[w])
	add("*" words[w] "*")
      } else
	add(words[w])
    } else if(match(words[w],"^Op$")) {
      addopen("`[`")
      option=1
      trailer="`]`" trailer
    } else if(match(words[w],"^Pp$")) {
      ++w
      endline()
      print ""
    } else if(match(words[w],"^An$")) {
      if (match(words[w+1],"-nosplit"))
	++w
      endline()
    } else if(match(words[w],"^Ss$")) {
      add("===")
      trailer="==="
    } else if(match(words[w],"^Ft$")) {
      if (match(section, "SYNOPSIS")) {
	breakline()
      }
      l = wtail()
      gsub("\\*", "`*`", l)

      add("*" l "*")
      if (match(section, "SYNOPSIS")) {
	breakline()
      }
    } else if(match(words[w],"^Fn$")) {
      ++w
      F = "*" words[w] "*("
      Fsep = ""
      while(w<nwords) {
	++w
	if (match(words[w], "^[.,:]$")) {
	  --w
	  break
	}
	gsub("\\*", "`*`", words[w])
	F = F Fsep "_"  words[w] "_"
	Fsep = ", "
      }
      add(F ")")
      if (match(section, "SYNOPSIS")) {
	addclose(";")
      }
    } else if(match(words[w],"^Fo$")) {
      w++
      F = "*" words[w] "*("
      Fsep = ""
    } else if(match(words[w],"^Fa$")) {
      w++
      gsub("\\*", "`*`", words[w])
      F = F Fsep "_"  words[w] "_"
      Fsep = ", "
    } else if(match(words[w],"^Fc$")) {
      add(F ")")
      if (match(section, "SYNOPSIS")) {
	addclose(";")
      }
    } else if(match(words[w],"^Va$")) {
      w++
      add("_" words[w] "_")
    } else if(match(words[w],"^In$")) {
      w++
      add("*#include <" words[w] ">*")
    } else if(match(words[w],"^Pa$")) {
      w++
#      if(match(words[w],"^\\."))
#	add("\\&")
      if (displaylines == 0)
	add("_" words[w] "_")
      else
	add(words[w])
    } else if(match(words[w],"^Dv$")) {
      linecmd()
    } else if(match(words[w],"^Em|Ev$")) {
      add(".IR")
    } else if(match(words[w],"^Pq$")) {
      addopen("(")
      trailer=")" trailer
    } else if(match(words[w],"^Aq$")) {
      addopen(" <")
      trailer=">" trailer
    } else if(match(words[w],"^Brq$")) {
      addopen("{")
      trailer="}" trailer
    } else if(match(words[w],"^S[xy]$")) {
      add(".B " wtail())
    } else if(match(words[w],"^Tn$")) {
      n=wtail()
      gsub("\\*$", "`*`", n)
      add("*" n "*")
    } else if(match(words[w],"^Ic$")) {
      add("\\fB")
      trailer="\\fP" trailer
    } else if(match(words[w],"^Bl$")) {
      ++listdepth
      listnext[listdepth]=""
      if(match(words[w+1],"-bullet")) {
	optlist[listdepth]=1
	addopen("<ul>")
	listclose[listdepth]="</ul>"
      } else if(match(words[w+1],"-enum")) {
	optlist[listdepth]=2
	enum=0
	addopen("<ol>")
	listclose[listdepth]="</ol>"
      } else if(match(words[w+1],"-tag")) {
	optlist[listdepth]=3
	addopen("<dl>")
	listclose[listdepth]="</dl>"
      } else if(match(words[w+1],"-item")) {
	optlist[listdepth]=4
	addopen("<ul>")
	listclose[listdepth]="</ul>"
      }
      w=nwords
    } else if(match(words[w],"^El$")) {
      addclose(listnext[listdepth])
      addclose(listclose[listdepth])
      listclose[listdepth]=""
      listdepth--
    } else if(match(words[w],"^It$")) {
      addclose(listnext[listdepth])
      if(optlist[listdepth]==1) {
	addpunct("<li>")
	listnext[listdepth] = "</li>"
      } else if(optlist[listdepth]==2) {
	addpunct("<li>")
	listnext[listdepth] = "</li>"
      } else if(optlist[listdepth]==3) {
	addpunct("<dt>")
	listnext[listdepth] = "</dt>"
	if(match(words[w+1],"^Xo$")) {
	  # Suppress trailer
	  w++
	} else if(match(words[w+1],"^Pa$|^Ev$")) {
	  addopen("*")
	  w++
	  add(words[++w] "*")
	} else {
	  trailer = listnext[listdepth] "<dd>" trailer
	  listnext[listdepth] = "</dd>"
	}
      } else if(optlist[listdepth]==4) {
	addpunct("<li>")
	listnext[listdepth] = "</li>"
      }
    } else if(match(words[w],"^Xo$")) {
      # TODO: Figure out how to handle this
    } else if(match(words[w],"^Xc$")) {
      # TODO: Figure out how to handle this
      if (optlist[listdepth] == 3) {
	addclose(listnext[listdepth])
	addopen("<dd>")
	listnext[listdepth] = "</dd>"
      }
    } else if(match(words[w],"^[=]$")) {
      addpunct(words[w])
    } else if(match(words[w],"^[\[{(]$")) {
      addopen(words[w])
    } else if(match(words[w],"^[\\\])}.,;:]$")) {
      addclose(words[w])
    } else {
      sub("\\\\&", "", words[w])
      add(words[w])
    }
  }
  if(match(out,"^\\.[^a-zA-Z]"))
    sub("^\\.","",out)
  endline()
}

File Deleted: pkgsrc/archivers/libarchive/files/doc/mdoc2man.awk

File Deleted: pkgsrc/archivers/libarchive/files/doc/update.sh

File Added: pkgsrc/archivers/libarchive/files/doc/html/Makefile

default: all


archive_entry.3.html: ../mdoc2man.awk ../../libarchive/archive_entry.3
	groff -mdoc -T html ../../libarchive/archive_entry.3 > archive_entry.3.html

archive_read.3.html: ../mdoc2man.awk ../../libarchive/archive_read.3
	groff -mdoc -T html ../../libarchive/archive_read.3 > archive_read.3.html

archive_read_disk.3.html: ../mdoc2man.awk ../../libarchive/archive_read_disk.3
	groff -mdoc -T html ../../libarchive/archive_read_disk.3 > archive_read_disk.3.html

archive_util.3.html: ../mdoc2man.awk ../../libarchive/archive_util.3
	groff -mdoc -T html ../../libarchive/archive_util.3 > archive_util.3.html

archive_write.3.html: ../mdoc2man.awk ../../libarchive/archive_write.3
	groff -mdoc -T html ../../libarchive/archive_write.3 > archive_write.3.html

archive_write_disk.3.html: ../mdoc2man.awk ../../libarchive/archive_write_disk.3
	groff -mdoc -T html ../../libarchive/archive_write_disk.3 > archive_write_disk.3.html

cpio.5.html: ../mdoc2man.awk ../../libarchive/cpio.5
	groff -mdoc -T html ../../libarchive/cpio.5 > cpio.5.html

libarchive-formats.5.html: ../mdoc2man.awk ../../libarchive/libarchive-formats.5
	groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html

libarchive.3.html: ../mdoc2man.awk ../../libarchive/libarchive.3
	groff -mdoc -T html ../../libarchive/libarchive.3 > libarchive.3.html

libarchive_internals.3.html: ../mdoc2man.awk ../../libarchive/libarchive_internals.3
	groff -mdoc -T html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html

mtree.5.html: ../mdoc2man.awk ../../libarchive/mtree.5
	groff -mdoc -T html ../../libarchive/mtree.5 > mtree.5.html

tar.5.html: ../mdoc2man.awk ../../libarchive/tar.5
	groff -mdoc -T html ../../libarchive/tar.5 > tar.5.html

bsdtar.1.html: ../mdoc2man.awk ../../tar/bsdtar.1
	groff -mdoc -T html ../../tar/bsdtar.1 > bsdtar.1.html

bsdcpio.1.html: ../mdoc2man.awk ../../cpio/bsdcpio.1
	groff -mdoc -T html ../../cpio/bsdcpio.1 > bsdcpio.1.html
all: archive_entry.3.html archive_read.3.html archive_read_disk.3.html archive_util.3.html archive_write.3.html archive_write_disk.3.html cpio.5.html libarchive-formats.5.html libarchive.3.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:29 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_entry(3) FreeBSD Library Functions
Manual archive_entry(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>


<p style="margin-left:8%;"><b>archive_entry_acl_add_entry</b>,
<b>archive_entry_acl_add_entry_w</b>,
<b>archive_entry_acl_clear</b>,
<b>archive_entry_acl_count</b>,
<b>archive_entry_acl_next</b>,
<b>archive_entry_acl_next_w</b>,
<b>archive_entry_acl_reset</b>,
<b>archive_entry_acl_text_w</b>, <b>archive_entry_atime</b>,
<b>archive_entry_atime_nsec</b>, <b>archive_entry_clear</b>,
<b>archive_entry_clone</b>,
<b>archive_entry_copy_fflags_text</b>,
<b>archive_entry_copy_fflags_text_w</b>,
<b>archive_entry_copy_gname</b>,
<b>archive_entry_copy_gname_w</b>,
<b>archive_entry_copy_hardlink</b>,
<b>archive_entry_copy_hardlink_w</b>,
<b>archive_entry_copy_link</b>,
<b>archive_entry_copy_link_w</b>,
<b>archive_entry_copy_pathname_w</b>,
<b>archive_entry_copy_sourcepath</b>,
<b>archive_entry_copy_stat</b>,
<b>archive_entry_copy_symlink</b>,
<b>archive_entry_copy_symlink_w</b>,
<b>archive_entry_copy_uname</b>,
<b>archive_entry_copy_uname_w</b>, <b>archive_entry_dev</b>,
<b>archive_entry_devmajor</b>,
<b>archive_entry_devminor</b>,
<b>archive_entry_filetype</b>, <b>archive_entry_fflags</b>,
<b>archive_entry_fflags_text</b>, <b>archive_entry_free</b>,
<b>archive_entry_gid</b>, <b>archive_entry_gname</b>,
<b>archive_entry_hardlink</b>, <b>archive_entry_ino</b>,
<b>archive_entry_mode</b>, <b>archive_entry_mtime</b>,
<b>archive_entry_mtime_nsec</b>, <b>archive_entry_nlink</b>,
<b>archive_entry_new</b>, <b>archive_entry_pathname</b>,
<b>archive_entry_pathname_w</b>, <b>archive_entry_rdev</b>,
<b>archive_entry_rdevmajor</b>,
<b>archive_entry_rdevminor</b>,
<b>archive_entry_set_atime</b>,
<b>archive_entry_set_ctime</b>,
<b>archive_entry_set_dev</b>,
<b>archive_entry_set_devmajor</b>,
<b>archive_entry_set_devminor</b>,
<b>archive_entry_set_filetype</b>,
<b>archive_entry_set_fflags</b>,
<b>archive_entry_set_gid</b>,
<b>archive_entry_set_gname</b>,
<b>archive_entry_set_hardlink</b>,
<b>archive_entry_set_link</b>,
<b>archive_entry_set_mode</b>,
<b>archive_entry_set_mtime</b>,
<b>archive_entry_set_pathname</b>,
<b>archive_entry_set_rdevmajor</b>,
<b>archive_entry_set_rdevminor</b>,
<b>archive_entry_set_size</b>,
<b>archive_entry_set_symlink</b>,
<b>archive_entry_set_uid</b>,
<b>archive_entry_set_uname</b>, <b>archive_entry_size</b>,
<b>archive_entry_sourcepath</b>, <b>archive_entry_stat</b>,
<b>archive_entry_symlink</b>, <b>archive_entry_uid</b>,
<b>archive_entry_uname</b> &mdash; functions for
manipulating archive entry descriptions</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive_entry.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_entry_acl_add_entry</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;type</i>, <i>int&nbsp;permset</i>,
<i>int&nbsp;tag</i>, <i>int&nbsp;qual</i>,
<i>const&nbsp;char&nbsp;*name</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_entry_acl_add_entry_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;type</i>, <i>int&nbsp;permset</i>,
<i>int&nbsp;tag</i>, <i>int&nbsp;qual</i>,
<i>const&nbsp;wchar_t&nbsp;*name</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_acl_clear</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_entry_acl_count</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;type</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_entry_acl_next</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;want_type</i>, <i>int&nbsp;*type</i>,
<i>int&nbsp;*permset</i>, <i>int&nbsp;*tag</i>,
<i>int&nbsp;*qual</i>,
<i>const&nbsp;char&nbsp;**name</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_entry_acl_next_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;want_type</i>, <i>int&nbsp;*type</i>,
<i>int&nbsp;*permset</i>, <i>int&nbsp;*tag</i>,
<i>int&nbsp;*qual</i>,
<i>const&nbsp;wchar_t&nbsp;**name</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_entry_acl_reset</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;want_type</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_acl_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;flags</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>time_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_atime</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>long</i></p>


<p style="margin-left:14%;"><b>archive_entry_atime_nsec</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:14%;"><b>archive_entry_clear</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:14%;"><b>archive_entry_clone</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char *
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_fflags_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_fflags_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_gname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_gname_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_hardlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_hardlink_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_sourcepath</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_pathname_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_stat</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;struct&nbsp;stat&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_symlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_symlink_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_uname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_copy_uname_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_dev</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_devmajor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_devminor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>mode_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_filetype</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_entry_fflags</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>unsigned&nbsp;long&nbsp;*set</i>,
<i>unsigned&nbsp;long&nbsp;*clear</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_fflags_text</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_free</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_gname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_hardlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>ino_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_ino</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>mode_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_mode</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>time_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_mtime</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>long</i></p>


<p style="margin-left:14%;"><b>archive_entry_mtime_nsec</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>unsigned
int</i></p>


<p style="margin-left:14%;"><b>archive_entry_nlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:14%;"><b>archive_entry_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_pathname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_pathname_w</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_rdev</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_rdevmajor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_rdevminor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_dev</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_devmajor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_devminor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_filetype</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>unsigned&nbsp;int</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_entry_set_fflags</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>unsigned&nbsp;long&nbsp;set</i>,
<i>unsigned&nbsp;long&nbsp;clear</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_gid</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>gid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_gname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_hardlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_ino</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>unsigned&nbsp;long</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_link</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_mode</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>mode_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_mtime</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>time_t</i>, <i>long&nbsp;nanos</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_nlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>unsigned&nbsp;int</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_pathname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_rdev</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_rdevmajor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_rdevminor</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>dev_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_size</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int64_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_symlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_uid</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>uid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_entry_set_uname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>int64_t</i></p>


<p style="margin-left:14%;"><b>archive_entry_size</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_sourcepath</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const struct
stat *</i></p>


<p style="margin-left:14%;"><b>archive_entry_stat</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_symlink</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_entry_uname</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions create and
manipulate data objects that represent entries within an
archive. You can think of a struct archive_entry as a
heavy-duty version of struct stat: it includes everything
from struct stat plus associated pathname, textual group and
user names, etc. These objects are used by libarchive(3) to
represent the metadata associated with a particular entry in
an archive.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Create and
Destroy</b> <br>
There are functions to allocate, destroy, clear, and copy
<i>archive_entry</i> objects:</p>

<p valign="top"><b>archive_entry_clear</b>()</p>

<p style="margin-left:20%;">Erases the object, resetting
all internal fields to the same state as a newly-created
object. This is provided to allow you to quickly recycle
objects without thrashing the heap.</p>

<p valign="top"><b>archive_entry_clone</b>()</p>

<p style="margin-left:20%;">A deep copy operation; all text
fields are duplicated.</p>

<p valign="top"><b>archive_entry_free</b>()</p>

<p style="margin-left:20%;">Releases the struct
archive_entry object.</p>

<p valign="top"><b>archive_entry_new</b>()</p>

<p style="margin-left:20%;">Allocate and return a blank
struct archive_entry object.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Set and Get
Functions</b> <br>
Most of the functions here set or read entries in an object.
Such functions have one of the following forms:</p>

<p valign="top"><b>archive_entry_set_XXXX</b>()</p>

<p style="margin-left:20%;">Stores the provided data in the
object. In particular, for strings, the pointer is stored,
not the referenced string.</p>

<p valign="top"><b>archive_entry_copy_XXXX</b>()</p>

<p style="margin-left:20%;">As above, except that the
referenced data is copied into the object.</p>

<p valign="top"><b>archive_entry_XXXX</b>()</p>

<p style="margin-left:20%;">Returns the specified data. In
the case of strings, a const-qualified pointer to the string
is returned.</p>

<p style="margin-left:8%;">String data can be set or
accessed as wide character strings or normal <i>char</i>
strings. The functions that use wide character strings are
suffixed with <b>_w</b>. Note that these are different
representations of the same data: For example, if you store
a narrow string and read the corresponding wide string, the
object will transparently convert formats using the current
locale. Similarly, if you store a wide string and then store
a narrow string for the same data, the previously-set wide
string will be discarded in favor of the new data.</p>

<p style="margin-left:8%; margin-top: 1em">There are a few
set/get functions that merit additional description:</p>

<p valign="top"><b>archive_entry_set_link</b>()</p>

<p style="margin-left:20%;">This function sets the symlink
field if it is already set. Otherwise, it sets the hardlink
field.</p>

<p style="margin-left:8%; margin-top: 1em"><b>File
Flags</b> <br>
File flags are transparently converted between a bitmap
representation and a textual format. For example, if you set
the bitmap and ask for text, the library will build a
canonical text format. However, if you set a text format and
request a text format, you will get back the same text, even
if it is ill-formed. If you need to canonicalize a textual
flags string, you should first set the text form, then
request the bitmap form, then use that to set the bitmap
form. Setting the bitmap format will clear the internal text
representation and force it to be reconstructed when you
next request the text form.</p>

<p style="margin-left:8%; margin-top: 1em">The bitmap
format consists of two integers, one containing bits that
should be set, the other specifying bits that should be
cleared. Bits not mentioned in either bitmap will be
ignored. Usually, the bitmap of bits to be cleared will be
set to zero. In unusual circumstances, you can force a
fully-specified set of file flags by setting the bitmap of
flags to clear to the complement of the bitmap of flags to
set. (This differs from fflagstostr(3), which only includes
names for set bits.) Converting a bitmap to a textual string
is a platform-specific operation; bits that are not
meaningful on the current platform will be ignored.</p>

<p style="margin-left:8%; margin-top: 1em">The canonical
text format is a comma-separated list of flag names. The
<b>archive_entry_copy_fflags_text</b>() and
<b>archive_entry_copy_fflags_text_w</b>() functions parse
the provided text and sets the internal bitmap values. This
is a platform-specific operation; names that are not
meaningful on the current platform will be ignored. The
function returns a pointer to the start of the first name
that was not recognized, or NULL if every name was
recognized. Note that every name--including names that
follow an unrecognized name--will be evaluated, and the
bitmaps will be set to reflect every name that is
recognized. (In particular, this differs from
strtofflags(3), which stops parsing at the first
unrecognized name.)</p>

<p style="margin-left:8%; margin-top: 1em"><b>ACL
Handling</b> <br>
XXX This needs serious help. XXX</p>

<p style="margin-left:8%; margin-top: 1em">An
&lsquo;&lsquo;Access Control List&rsquo;&rsquo; (ACL) is a
list of permissions that grant access to particular users or
groups beyond what would normally be provided by standard
POSIX mode bits. The ACL handling here addresses some
deficiencies in the POSIX.1e draft 17 ACL specification. In
particular, POSIX.1e draft 17 specifies several different
formats, but none of those formats include both textual
user/group names and numeric UIDs/GIDs.</p>

<p style="margin-left:8%; margin-top: 1em">XXX explain ACL
stuff XXX</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
May&nbsp;12, 2008 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:31 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_read(3) FreeBSD Library Functions
Manual archive_read(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_read_new</b>,
<b>archive_read_set_filter_options</b>,
<b>archive_read_set_format_options</b>,
<b>archive_read_set_options</b>,
<b>archive_read_support_compression_all</b>,
<b>archive_read_support_compression_bzip2</b>,
<b>archive_read_support_compression_compress</b>,
<b>archive_read_support_compression_gzip</b>,
<b>archive_read_support_compression_lzma</b>,
<b>archive_read_support_compression_none</b>,
<b>archive_read_support_compression_xz</b>,
<b>archive_read_support_compression_program</b>,
<b>archive_read_support_compression_program_signature</b>,
<b>archive_read_support_format_all</b>,
<b>archive_read_support_format_ar</b>,
<b>archive_read_support_format_cpio</b>,
<b>archive_read_support_format_empty</b>,
<b>archive_read_support_format_iso9660</b>,
<b>archive_read_support_format_mtree,
archive_read_support_format_raw,
archive_read_support_format_tar</b>,
<b>archive_read_support_format_zip</b>,
<b>archive_read_open</b>, <b>archive_read_open2</b>,
<b>archive_read_open_fd</b>, <b>archive_read_open_FILE</b>,
<b>archive_read_open_filename</b>,
<b>archive_read_open_memory</b>,
<b>archive_read_next_header</b>,
<b>archive_read_next_header2</b>, <b>archive_read_data</b>,
<b>archive_read_data_block</b>,
<b>archive_read_data_skip</b>,
<b>archive_read_data_into_buffer</b>,
<b>archive_read_data_into_fd</b>,
<b>archive_read_extract</b>, <b>archive_read_extract2</b>,
<b>archive_read_extract_set_progress_callback</b>,
<b>archive_read_close</b>, <b>archive_read_finish</b>
&mdash; functions for reading streaming archives</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_read_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_all</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_bzip2</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_compress</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_gzip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_lzma</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_none</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_compression_xz</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_support_compression_program</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*cmd</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_support_compression_program_signature</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*cmd</i>,
<i>const&nbsp;void&nbsp;*signature</i>,
<i>size_t&nbsp;signature_length</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_all</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_ar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_cpio</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_empty</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_iso9660</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_mtree</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_raw</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_tar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_support_format_zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_set_filter_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_set_format_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_set_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>archive_open_callback&nbsp;*</i>,
<i>archive_read_callback&nbsp;*</i>,
<i>archive_close_callback&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_open2</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>archive_open_callback&nbsp;*</i>,
<i>archive_read_callback&nbsp;*</i>,
<i>archive_skip_callback&nbsp;*</i>,
<i>archive_close_callback&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_open_FILE</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>FILE&nbsp;*file</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_open_fd</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;fd</i>, <i>size_t&nbsp;block_size</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_open_filename</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*filename</i>,
<i>size_t&nbsp;block_size</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_open_memory</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*buff</i>, <i>size_t&nbsp;size</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_next_header</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;**</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_next_header2</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p>


<p style="margin-left:14%;"><b>archive_read_data</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*buff</i>, <i>size_t&nbsp;len</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_data_block</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;void&nbsp;**buff</i>, <i>size_t&nbsp;*len</i>,
<i>off_t&nbsp;*offset</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_data_skip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_data_into_buffer</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>, <i>ssize_t&nbsp;len</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_data_into_fd</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;fd</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_extract</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;flags</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_extract2</b>(<i>struct&nbsp;archive&nbsp;*src</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>struct&nbsp;archive&nbsp;*dest</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_read_extract_set_progress_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;(*func)(void&nbsp;*)</i>,
<i>void&nbsp;*user_data</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide a
complete API for reading streaming archives. The general
process is to first create the struct archive object, set
options, initialize the reader, iterate over the archive
headers and associated data, then close the archive and
release all resources. The following summary describes the
functions in approximately the order they would be used:</p>

<p valign="top"><b>archive_read_new</b>()</p>

<p style="margin-left:20%;">Allocates and initializes a
struct archive object suitable for reading from an
archive.</p>


<p valign="top"><b>archive_read_support_compression_bzip2</b>(),
<b>archive_read_support_compression_compress</b>(),
<b>archive_read_support_compression_gzip</b>(),
<b>archive_read_support_compression_lzma</b>(),
<b>archive_read_support_compression_none</b>(),
<b>archive_read_support_compression_xz</b>()</p>

<p style="margin-left:20%;">Enables auto-detection code and
decompression support for the specified compression. Returns
<b>ARCHIVE_OK</b> if the compression is fully supported, or
<b>ARCHIVE_WARN</b> if the compression is supported only
through an external program. Note that decompression using
an external program is usually slower than decompression
through built-in libraries. Note that
&lsquo;&lsquo;none&rsquo;&rsquo; is always enabled by
default.</p>


<p valign="top"><b>archive_read_support_compression_all</b>()</p>

<p style="margin-left:20%;">Enables all available
decompression filters.</p>


<p valign="top"><b>archive_read_support_compression_program</b>()</p>

<p style="margin-left:20%;">Data is fed through the
specified external program before being dearchived. Note
that this disables automatic detection of the compression
format, so it makes no sense to specify this in conjunction
with any other decompression option.</p>


<p valign="top"><b>archive_read_support_compression_program_signature</b>()</p>

<p style="margin-left:20%;">This feeds data through the
specified external program but only if the initial bytes of
the data match the specified signature value.</p>

<p valign="top"><b>archive_read_support_format_all</b>(),
<b>archive_read_support_format_ar</b>(),
<b>archive_read_support_format_cpio</b>(),
<b>archive_read_support_format_empty</b>(),
<b>archive_read_support_format_iso9660</b>(),
<b>archive_read_support_format_mtree</b>(),
<b>archive_read_support_format_tar</b>(),
<b>archive_read_support_format_zip</b>()</p>

<p style="margin-left:20%;">Enables support---including
auto-detection code---for the specified archive format. For
example, <b>archive_read_support_format_tar</b>() enables
support for a variety of standard tar formats, old-style
tar, ustar, pax interchange format, and many common
variants. For convenience,
<b>archive_read_support_format_all</b>() enables support for
all available formats. Only empty archives are supported by
default.</p>


<p valign="top"><b>archive_read_support_format_raw</b>()</p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;raw&rsquo;&rsquo; format handler allows
libarchive to be used to read arbitrary data. It treats any
data stream as an archive with a single entry. The pathname
of this entry is &lsquo;&lsquo;data&rsquo;&rsquo;; all other
entry fields are unset. This is not enabled by
<b>archive_read_support_format_all</b>() in order to avoid
erroneous handling of damaged archives.</p>

<p valign="top"><b>archive_read_set_filter_options</b>(),
<b>archive_read_set_format_options</b>(),
<b>archive_read_set_options</b>()</p>

<p style="margin-left:20%;">Specifies options that will be
passed to currently-registered filters (including
decompression filters) and/or format readers. The argument
is a comma-separated list of individual options. Individual
options have one of the following forms:</p>

<p valign="top"><i>option=value</i></p>

<p style="margin-left:32%;">The option/value pair will be
provided to every module. Modules that do not accept an
option with this name will ignore it.</p>

<p valign="top"><i>option</i></p>

<p style="margin-left:32%; margin-top: 1em">The option will
be provided to every module with a value of
&lsquo;&lsquo;1&rsquo;&rsquo;.</p>

<p valign="top"><i>!option</i></p>

<p style="margin-left:32%;">The option will be provided to
every module with a NULL value.</p>

<p valign="top"><i>module:option=value</i>,
<i>module:option</i>, <i>module:!option</i></p>

<p style="margin-left:32%;">As above, but the corresponding
option and value will be provided only to modules whose name
matches <i>module</i>.</p>

<p style="margin-left:20%;">The return value will be
<b>ARCHIVE_OK</b> if any module accepts the option, or
<b>ARCHIVE_WARN</b> if no module accepted the option, or
<b>ARCHIVE_FATAL</b> if there was a fatal error while
attempting to process the option.</p>

<p style="margin-left:20%; margin-top: 1em">The currently
supported options are:</p>

<p valign="top">Format iso9660 <b><br>
joliet</b></p>

<p style="margin-left:45%; margin-top: 1em">Support Joliet
extensions. Defaults to enabled, use <b>!joliet</b> to
disable.</p>

<p valign="top"><b>archive_read_open</b>()</p>

<p style="margin-left:20%;">The same as
<b>archive_read_open2</b>(), except that the skip callback
is assumed to be NULL.</p>

<p valign="top"><b>archive_read_open2</b>()</p>

<p style="margin-left:20%;">Freeze the settings, open the
archive, and prepare for reading entries. This is the most
generic version of this call, which accepts four callback
functions. Most clients will want to use
<b>archive_read_open_filename</b>(),
<b>archive_read_open_FILE</b>(),
<b>archive_read_open_fd</b>(), or
<b>archive_read_open_memory</b>() instead. The library
invokes the client-provided functions to obtain raw bytes
from the archive.</p>

<p valign="top"><b>archive_read_open_FILE</b>()</p>

<p style="margin-left:20%;">Like
<b>archive_read_open</b>(), except that it accepts a <i>FILE
*</i> pointer. This function should not be used with tape
drives or other devices that require strict I/O
blocking.</p>

<p valign="top"><b>archive_read_open_fd</b>()</p>

<p style="margin-left:20%;">Like
<b>archive_read_open</b>(), except that it accepts a file
descriptor and block size rather than a set of function
pointers. Note that the file descriptor will not be
automatically closed at end-of-archive. This function is
safe for use with tape drives or other blocked devices.</p>

<p valign="top"><b>archive_read_open_file</b>()</p>

<p style="margin-left:20%;">This is a deprecated synonym
for <b>archive_read_open_filename</b>().</p>

<p valign="top"><b>archive_read_open_filename</b>()</p>

<p style="margin-left:20%;">Like
<b>archive_read_open</b>(), except that it accepts a simple
filename and a block size. A NULL filename represents
standard input. This function is safe for use with tape
drives or other blocked devices.</p>

<p valign="top"><b>archive_read_open_memory</b>()</p>

<p style="margin-left:20%;">Like
<b>archive_read_open</b>(), except that it accepts a pointer
and size of a block of memory containing the archive
data.</p>

<p valign="top"><b>archive_read_next_header</b>()</p>

<p style="margin-left:20%;">Read the header for the next
entry and return a pointer to a struct archive_entry. This
is a convenience wrapper around
<b>archive_read_next_header2</b>() that reuses an internal
struct archive_entry object for each request.</p>

<p valign="top"><b>archive_read_next_header2</b>()</p>

<p style="margin-left:20%;">Read the header for the next
entry and populate the provided struct archive_entry.</p>

<p valign="top"><b>archive_read_data</b>()</p>

<p style="margin-left:20%;">Read data associated with the
header just read. Internally, this is a convenience function
that calls <b>archive_read_data_block</b>() and fills any
gaps with nulls so that callers see a single continuous
stream of data.</p>

<p valign="top"><b>archive_read_data_block</b>()</p>

<p style="margin-left:20%;">Return the next available block
of data for this entry. Unlike <b>archive_read_data</b>(),
the <b>archive_read_data_block</b>() function avoids copying
data and allows you to correctly handle sparse files, as
supported by some archive formats. The library guarantees
that offsets will increase and that blocks will not overlap.
Note that the blocks returned from this function can be much
larger than the block size read from disk, due to
compression and internal buffer optimizations.</p>

<p valign="top"><b>archive_read_data_skip</b>()</p>

<p style="margin-left:20%;">A convenience function that
repeatedly calls <b>archive_read_data_block</b>() to skip
all of the data for this archive entry.</p>

<p valign="top"><b>archive_read_data_into_buffer</b>()</p>

<p style="margin-left:20%;">This function is deprecated and
will be removed. Use <b>archive_read_data</b>() instead.</p>

<p valign="top"><b>archive_read_data_into_fd</b>()</p>

<p style="margin-left:20%;">A convenience function that
repeatedly calls <b>archive_read_data_block</b>() to copy
the entire entry to the provided file descriptor.</p>

<p valign="top"><b>archive_read_extract</b>(),
<b>archive_read_extract_set_skip_file</b>()</p>

<p style="margin-left:20%;">A convenience function that
wraps the corresponding archive_write_disk(3) interfaces.
The first call to <b>archive_read_extract</b>() creates a
restore object using archive_write_disk_new(3) and
archive_write_disk_set_standard_lookup(3), then
transparently invokes archive_write_disk_set_options(3),
archive_write_header(3), archive_write_data(3), and
archive_write_finish_entry(3) to create the entry on disk
and copy data into it. The <i>flags</i> argument is passed
unmodified to archive_write_disk_set_options(3).</p>

<p valign="top"><b>archive_read_extract2</b>()</p>

<p style="margin-left:20%;">This is another version of
<b>archive_read_extract</b>() that allows you to provide
your own restore object. In particular, this allows you to
override the standard lookup functions using
archive_write_disk_set_group_lookup(3), and
archive_write_disk_set_user_lookup(3). Note that
<b>archive_read_extract2</b>() does not accept a
<i>flags</i> argument; you should use
<b>archive_write_disk_set_options</b>() to set the restore
options yourself.</p>


<p valign="top"><b>archive_read_extract_set_progress_callback</b>()</p>

<p style="margin-left:20%;">Sets a pointer to a
user-defined callback that can be used for updating progress
displays during extraction. The progress function will be
invoked during the extraction of large regular files. The
progress function will be invoked with the pointer provided
to this call. Generally, the data pointed to should include
a reference to the archive object and the archive_entry
object so that various statistics can be retrieved for the
progress display.</p>

<p valign="top"><b>archive_read_close</b>()</p>

<p style="margin-left:20%;">Complete the archive and invoke
the close callback.</p>

<p valign="top"><b>archive_read_finish</b>()</p>

<p style="margin-left:20%;">Invokes
<b>archive_read_close</b>() if it was not invoked manually,
then release all resources. Note: In libarchive 1.x, this
function was declared to return <i>void</i>, which made it
impossible to detect certain errors when
<b>archive_read_close</b>() was invoked implicitly from this
function. The declaration is corrected beginning with
libarchive 2.0.</p>

<p style="margin-left:8%; margin-top: 1em">Note that the
library determines most of the relevant information about
the archive by inspection. In particular, it automatically
detects gzip(1) or bzip2(1) compression and transparently
performs the appropriate decompression. It also
automatically detects the archive format.</p>

<p style="margin-left:8%; margin-top: 1em">A complete
description of the struct archive and struct archive_entry
objects can be found in the overview manual page for
libarchive(3).</p>

<p style="margin-top: 1em" valign="top"><b>CLIENT
CALLBACKS</b></p>

<p style="margin-left:8%;">The callback functions must
match the following prototypes:</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
ssize_t</i></p>


<p valign="top"><b>archive_read_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>const&nbsp;void&nbsp;**buffer</i>)</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
int</i></p>


<p valign="top"><b>archive_skip_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>size_t&nbsp;request</i>)</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
int</i> <b>archive_open_callback</b>(<i>struct archive
*</i>, <i>void *client_data</i>)</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
int</i> <b>archive_close_callback</b>(<i>struct archive
*</i>, <i>void *client_data</i>)</p>

<p style="margin-left:8%; margin-top: 1em">The open
callback is invoked by <b>archive_open</b>(). It should
return <b>ARCHIVE_OK</b> if the underlying file or data
source is successfully opened. If the open fails, it should
call <b>archive_set_error</b>() to register an error code
and message and return <b>ARCHIVE_FATAL</b>.</p>

<p style="margin-left:8%; margin-top: 1em">The read
callback is invoked whenever the library requires raw bytes
from the archive. The read callback should read data into a
buffer, set the const void **buffer argument to point to the
available data, and return a count of the number of bytes
available. The library will invoke the read callback again
only after it has consumed this data. The library imposes no
constraints on the size of the data blocks returned. On
end-of-file, the read callback should return zero. On error,
the read callback should invoke <b>archive_set_error</b>()
to register an error code and message and return -1.</p>

<p style="margin-left:8%; margin-top: 1em">The skip
callback is invoked when the library wants to ignore a block
of data. The return value is the number of bytes actually
skipped, which may differ from the request. If the callback
cannot skip data, it should return zero. If the skip
callback is not provided (the function pointer is NULL ),
the library will invoke the read function instead and simply
discard the result. A skip callback can provide significant
performance gains when reading uncompressed archives from
slow disk drives or other media that can skip quickly.</p>

<p style="margin-left:8%; margin-top: 1em">The close
callback is invoked by archive_close when the archive
processing is complete. The callback should return
<b>ARCHIVE_OK</b> on success. On failure, the callback
should invoke <b>archive_set_error</b>() to register an
error code and message and return <b>ARCHIVE_FATAL.</b></p>

<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p>

<p style="margin-left:8%;">The following illustrates basic
usage of the library. In this example, the callback
functions are simply wrappers around the standard open(2),
read(2), and close(2) system calls.</p>

<p style="margin-left:17%; margin-top: 1em">void <br>
list_archive(const char *name) <br>
{ <br>
struct mydata *mydata; <br>
struct archive *a; <br>
struct archive_entry *entry;</p>

<p style="margin-left:17%; margin-top: 1em">mydata =
malloc(sizeof(struct mydata)); <br>
a = archive_read_new(); <br>
mydata-&gt;name = name; <br>
archive_read_support_compression_all(a); <br>
archive_read_support_format_all(a); <br>
archive_read_open(a, mydata, myopen, myread, myclose); <br>
while (archive_read_next_header(a, &amp;entry) ==
ARCHIVE_OK) { <br>
printf(&quot;%s\n&quot;,archive_entry_pathname(entry)); <br>
archive_read_data_skip(a); <br>
} <br>
archive_read_finish(a); <br>
free(mydata); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">ssize_t <br>
myread(struct archive *a, void *client_data, const void
**buff) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">*buff =
mydata-&gt;buff; <br>
return (read(mydata-&gt;fd, mydata-&gt;buff, 10240)); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">int <br>
myopen(struct archive *a, void *client_data) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">mydata-&gt;fd =
open(mydata-&gt;name, O_RDONLY); <br>
return (mydata-&gt;fd &gt;= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
<br>
}</p>

<p style="margin-left:17%; margin-top: 1em">int <br>
myclose(struct archive *a, void *client_data) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">if
(mydata-&gt;fd &gt; 0) <br>
close(mydata-&gt;fd); <br>
return (ARCHIVE_OK); <br>
}</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return zero on
success, non-zero on error. The possible return codes
include: <b>ARCHIVE_OK</b> (the operation succeeded),
<b>ARCHIVE_WARN</b> (the operation succeeded but a
non-critical error was encountered), <b>ARCHIVE_EOF</b>
(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the
operation failed but can be retried), and
<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive
should be closed immediately). Detailed error codes and
textual descriptions are available from the
<b>archive_errno</b>() and <b>archive_error_string</b>()
functions.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>()
returns a pointer to a freshly allocated struct archive
object. It returns NULL on error.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>()
returns a count of bytes actually read or zero at the end of
the entry. On error, a value of <b>ARCHIVE_FATAL</b>,
<b>ARCHIVE_WARN</b>, or <b>ARCHIVE_RETRY</b> is returned and
an error code and textual description can be retrieved from
the <b>archive_errno</b>() and <b>archive_error_string</b>()
functions.</p>

<p style="margin-left:8%; margin-top: 1em">The library
expects the client callbacks to behave similarly. If there
is an error, you can use <b>archive_set_error</b>() to set
an appropriate error code and description, then return one
of the non-zero values above. (Note that the value
eventually returned to the client may not be the same; many
errors that are not critical at the level of basic I/O can
prevent the archive from being properly read, thus most I/O
errors eventually cause <b>ARCHIVE_FATAL</b> to be
returned.)</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">tar(1), archive(3),
archive_util(3), tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">Many traditional archiver
programs treat empty files as valid empty archives. For
example, many implementations of tar(1) allow you to append
entries to an empty file. Of course, it is impossible to
determine the format of an empty file by inspecting the
contents, so this library treats empty files as having a
special &lsquo;&lsquo;empty&rsquo;&rsquo; format.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
April&nbsp;13, 2009 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:31 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_read_disk(3) FreeBSD Library
Functions Manual archive_read_disk(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_read_disk_new</b>,
<b>archive_read_disk_set_symlink_logical</b>,
<b>archive_read_disk_set_symlink_physical</b>,
<b>archive_read_disk_set_symlink_hybrid</b>,
<b>archive_read_disk_entry_from_file</b>,
<b>archive_read_disk_gname</b>,
<b>archive_read_disk_uname</b>,
<b>archive_read_disk_set_uname_lookup</b>,
<b>archive_read_disk_set_gname_lookup</b>,
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_close</b>, <b>archive_read_finish</b>
&mdash; functions for reading objects from disk</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>gid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>uid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_set_gname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;gid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_set_uname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;uid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_entry_from_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>, <i>int&nbsp;fd</i>,
<i>const&nbsp;struct&nbsp;stat&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide an API
for reading information about objects on disk. In
particular, they provide an interface for populating struct
archive_entry objects.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_new</b>()</p>

<p style="margin-left:20%;">Allocates and initializes a
struct archive object suitable for reading object
information from disk.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_symlink_logical</b>(),
<b>archive_read_disk_set_symlink_physical</b>(),
<b>archive_read_disk_set_symlink_hybrid</b>()</p>

<p style="margin-left:20%;">This sets the mode used for
handling symbolic links. The
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
mode.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_gname</b>(),
<b>archive_read_disk_uname</b>()</p>

<p style="margin-left:20%;">Returns a user or group name
given a gid or uid value. By default, these always return a
NULL string.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_gname_lookup</b>(),
<b>archive_read_disk_set_uname_lookup</b>()</p>

<p style="margin-left:20%;">These allow you to override the
functions used for user and group name lookups. You may also
provide a void * pointer to a private data structure and a
cleanup function for that data. The cleanup function will be
invoked when the struct archive object is destroyed or when
new lookup functions are registered.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_standard_lookup</b>()</p>

<p style="margin-left:20%;">This convenience function
installs a standard set of user and group name lookup
functions. These functions use getpwid(3) and getgrid(3) to
convert ids to names, defaulting to NULL if the names cannot
be looked up. These functions also implement a simple memory
cache to reduce the number of calls to getpwid(3) and
getgrid(3).</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_entry_from_file</b>()</p>

<p style="margin-left:20%;">Populates a struct
archive_entry object with information about a particular
file. The archive_entry object must have already been
created with archive_entry_new(3) and at least one of the
source path or path fields must already be set. (If both are
set, the source path will be used.)</p>

<p style="margin-left:20%; margin-top: 1em">Information is
read from disk using the path name from the struct
archive_entry object. If a file descriptor is provided, some
information will be obtained using that file descriptor, on
platforms that support the appropriate system calls.</p>

<p style="margin-left:20%; margin-top: 1em">If a pointer to
a struct stat is provided, information from that structure
will be used instead of reading from the disk where
appropriate. This can provide performance benefits in
scenarios where struct stat information has already been
read from the disk as a side effect of some other operation.
(For example, directory traversal libraries often provide
this information.)</p>

<p style="margin-left:20%; margin-top: 1em">Where
necessary, user and group ids are converted to user and
group names using the currently registered lookup functions
above. This affects the file ownership fields and ACL values
in the struct archive_entry object.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_close</b>()</p>

<p style="margin-left:20%;">This currently does
nothing.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p>

<p style="margin-left:20%;">Invokes
<b>archive_write_close</b>() if it was not invoked manually,
then releases all resources.</p>

<p style="margin-left:8%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the libarchive(3) overview.</p>

<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p>

<p style="margin-left:8%;">The following illustrates basic
usage of the library by showing how to use it to copy an
item on disk into an archive.</p>

<p style="margin-left:17%; margin-top: 1em">void <br>
file_to_archive(struct archive *a, const char *name) <br>
{ <br>
char buff[8192]; <br>
size_t bytes_read; <br>
struct archive *ard; <br>
struct archive_entry *entry; <br>
int fd;</p>

<p style="margin-left:17%; margin-top: 1em">ard =
archive_read_disk_new(); <br>
archive_read_disk_set_standard_lookup(ard); <br>
entry = archive_entry_new(); <br>
fd = open(name, O_RDONLY); <br>
if (fd &lt; 0) <br>
return; <br>
archive_entry_copy_sourcepath(entry, name); <br>
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
<br>
archive_write_header(a, entry); <br>
while ((bytes_read = read(fd, buff, sizeof(buff))) &gt; 0)
<br>
archive_write_data(a, buff, bytes_read); <br>
archive_write_finish_entry(a); <br>
archive_read_finish(ard); <br>
archive_entry_free(entry); <br>
}</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
negative error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible. The archive_errno(3) and
archive_error_string(3) functions can be used to retrieve an
appropriate error code and a textual error message. (See
archive_util(3) for details.)</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_new</b>()
returns a pointer to a newly-allocated struct archive object
or NULL if the allocation failed for any reason.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_gname</b>()
and <b>archive_read_disk_uname</b>() return const char *
pointers to the textual name or NULL if the lookup failed
for any reason. The returned pointer points to internal
storage that may be reused on the next call to either of
these functions; callers should copy the string if they need
to continue accessing it.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive_read(3),
archive_write(3), archive_write_disk(3), tar(1),
libarchive(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3. The
<b>archive_read_disk</b> interface was added to
<b>libarchive 2.6</b> and first appeared in
FreeBSD&nbsp;8.0.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@freebsd.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrid(3) and getpwid(3) are sometimes too large for
particular applications. The current design allows the
application author to use a more compact implementation when
appropriate.</p>

<p style="margin-left:8%; margin-top: 1em">The full list of
metadata read from disk by
<b>archive_read_disk_entry_from_file</b>() is necessarily
system-dependent.</p>

<p style="margin-left:8%; margin-top: 1em">The
<b>archive_read_disk_entry_from_file</b>() function reads as
much information as it can from disk. Some method should be
provided to limit this so that clients who do not need ACLs,
for instance, can avoid the extra work needed to look up
such information.</p>

<p style="margin-left:8%; margin-top: 1em">This API should
provide a set of methods for walking a directory tree. That
would make it a direct parallel of the archive_read(3) API.
When such methods are implemented, the
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
March&nbsp;10, 2009 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:32 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_util(3) FreeBSD Library Functions
Manual archive_util(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_clear_error</b>,
<b>archive_compression</b>, <b>archive_compression_name</b>,
<b>archive_copy_error</b>, <b>archive_errno</b>,
<b>archive_error_string</b>, <b>archive_file_count</b>,
<b>archive_format</b>, <b>archive_format_name</b>,
<b>archive_set_error</b> &mdash; libarchive utility
functions</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_clear_error</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_compression</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_compression_name</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:14%;"><b>archive_copy_error</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_errno</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_error_string</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_file_count</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_format</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_format_name</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>void</i></p>


<p valign="top"><b>archive_set_error</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;error_code</i>,
<i>const&nbsp;char&nbsp;*fmt</i>, <i>...</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide access
to various information about the struct archive object used
in the libarchive(3) library.</p>

<p valign="top"><b>archive_clear_error</b>()</p>

<p style="margin-left:20%;">Clears any error information
left over from a previous call. Not generally used in client
code.</p>

<p valign="top"><b>archive_compression</b>()</p>

<p style="margin-left:20%;">Returns a numeric code
indicating the current compression. This value is set by
<b>archive_read_open</b>().</p>

<p valign="top"><b>archive_compression_name</b>()</p>

<p style="margin-left:20%;">Returns a text description of
the current compression suitable for display.</p>

<p valign="top"><b>archive_copy_error</b>()</p>

<p style="margin-left:20%;">Copies error information from
one archive to another.</p>

<p valign="top"><b>archive_errno</b>()</p>

<p style="margin-left:20%;">Returns a numeric error code
(see errno(2)) indicating the reason for the most recent
error return.</p>

<p valign="top"><b>archive_error_string</b>()</p>

<p style="margin-left:20%;">Returns a textual error message
suitable for display. The error message here is usually more
specific than that obtained from passing the result of
<b>archive_errno</b>() to strerror(3).</p>

<p valign="top"><b>archive_file_count</b>()</p>

<p style="margin-left:20%;">Returns a count of the number
of files processed by this archive object. The count is
incremented by calls to archive_write_header or
archive_read_next_header.</p>

<p valign="top"><b>archive_format</b>()</p>

<p style="margin-left:20%;">Returns a numeric code
indicating the format of the current archive entry. This
value is set by a successful call to
<b>archive_read_next_header</b>(). Note that it is common
for this value to change from entry to entry. For example, a
tar archive might have several entries that utilize GNU tar
extensions and several entries that do not. These entries
will have different format codes.</p>

<p valign="top"><b>archive_format_name</b>()</p>

<p style="margin-left:20%;">A textual description of the
format of the current entry.</p>

<p valign="top"><b>archive_set_error</b>()</p>

<p style="margin-left:20%;">Sets the numeric error code and
error description that will be returned by
<b>archive_errno</b>() and <b>archive_error_string</b>().
This function should be used within I/O callbacks to set
system-specific error codes and error descriptions. This
function accepts a printf-like format string and arguments.
However, you should be careful to use only the following
printf format specifiers: &lsquo;&lsquo;%c&rsquo;&rsquo;,
&lsquo;&lsquo;%d&rsquo;&rsquo;,
&lsquo;&lsquo;%jd&rsquo;&rsquo;,
&lsquo;&lsquo;%jo&rsquo;&rsquo;,
&lsquo;&lsquo;%ju&rsquo;&rsquo;,
&lsquo;&lsquo;%jx&rsquo;&rsquo;,
&lsquo;&lsquo;%ld&rsquo;&rsquo;,
&lsquo;&lsquo;%lo&rsquo;&rsquo;,
&lsquo;&lsquo;%lu&rsquo;&rsquo;,
&lsquo;&lsquo;%lx&rsquo;&rsquo;,
&lsquo;&lsquo;%o&rsquo;&rsquo;,
&lsquo;&lsquo;%u&rsquo;&rsquo;,
&lsquo;&lsquo;%s&rsquo;&rsquo;,
&lsquo;&lsquo;%x&rsquo;&rsquo;,
&lsquo;&lsquo;%%&rsquo;&rsquo;. Field-width specifiers and
other printf features are not uniformly supported and should
not be used.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive_read(3),
archive_write(3), libarchive(3), printf(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
January&nbsp;8, 2005 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:33 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_write(3) FreeBSD Library Functions
Manual archive_write(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_write_new</b>,
<b>archive_write_set_format_cpio</b>,
<b>archive_write_set_format_pax</b>,
<b>archive_write_set_format_pax_restricted</b>,
<b>archive_write_set_format_shar</b>,
<b>archive_write_set_format_shar_binary</b>,
<b>archive_write_set_format_ustar</b>,
<b>archive_write_get_bytes_per_block</b>,
<b>archive_write_set_bytes_per_block</b>,
<b>archive_write_set_bytes_in_last_block</b>,
<b>archive_write_set_compression_bzip2</b>,
<b>archive_write_set_compression_compress</b>,
<b>archive_write_set_compression_gzip</b>,
<b>archive_write_set_compression_none</b>,
<b>archive_write_set_compression_program</b>,
<b>archive_write_set_compressor_options</b>,
<b>archive_write_set_format_options</b>,
<b>archive_write_set_options</b>, <b>archive_write_open</b>,
<b>archive_write_open_fd</b>,
<b>archive_write_open_FILE</b>,
<b>archive_write_open_filename</b>,
<b>archive_write_open_memory</b>,
<b>archive_write_header</b>, <b>archive_write_data</b>,
<b>archive_write_finish_entry</b>,
<b>archive_write_close</b>, <b>archive_write_finish</b>
&mdash; functions for creating archives</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_write_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_get_bytes_per_block</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_bytes_per_block</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;bytes_per_block</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_bytes_in_last_block</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compression_bzip2</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compression_compress</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compression_gzip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compression_none</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compression_program</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*&nbsp;cmd</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_cpio</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_pax</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_pax_restricted</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_shar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_shar_binary</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_ustar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_format_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_compressor_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_set_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_write_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>archive_open_callback&nbsp;*</i>,
<i>archive_write_callback&nbsp;*</i>,
<i>archive_close_callback&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_open_fd</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;fd</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_open_FILE</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>FILE&nbsp;*file</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_open_filename</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*filename</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_write_open_memory</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*buffer</i>, <i>size_t&nbsp;bufferSize</i>,
<i>size_t&nbsp;*outUsed</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_header</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p>


<p style="margin-left:14%;"><b>archive_write_data</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;void&nbsp;*</i>, <i>size_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_finish_entry</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide a
complete API for creating streaming archive files. The
general process is to first create the struct archive
object, set any desired options, initialize the archive,
append entries, then close the archive and release all
resources. The following summary describes the functions in
approximately the order they are ordinarily used:</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_new</b>()</p>

<p style="margin-left:20%;">Allocates and initializes a
struct archive object suitable for writing a tar
archive.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_bytes_per_block</b>()</p>

<p style="margin-left:20%;">Sets the block size used for
writing the archive data. Every call to the write callback
function, except possibly the last one, will use this value
for the length. The third parameter is a boolean that
specifies whether or not the final block written will be
padded to the full block size. If it is zero, the last block
will not be padded. If it is non-zero, padding will be added
both before and after compression. The default is to use a
block size of 10240 bytes and to pad the last block. Note
that a block size of zero will suppress internal blocking
and cause writes to be sent directly to the write callback
as they occur.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_get_bytes_per_block</b>()</p>

<p style="margin-left:20%;">Retrieve the block size to be
used for writing. A value of -1 here indicates that the
library should use default values. A value of zero indicates
that internal blocking is suppressed.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_bytes_in_last_block</b>()</p>

<p style="margin-left:20%;">Sets the block size used for
writing the last block. If this value is zero, the last
block will be padded to the same size as the other blocks.
Otherwise, the final block will be padded to a multiple of
this size. In particular, setting it to 1 will cause the
final block to not be padded. For compressed output, any
padding generated by this option is applied only after the
compression. The uncompressed data is always unpadded. The
default is to pad the last block to the full block size
(note that <b>archive_write_open_filename</b>() will set
this based on the file type). Unlike the other
&lsquo;&lsquo;set&rsquo;&rsquo; functions, this function can
be called after the archive is opened.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_get_bytes_in_last_block</b>()</p>

<p style="margin-left:20%;">Retrieve the currently-set
value for last block size. A value of -1 here indicates that
the library should use default values.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_format_cpio</b>(),
<b>archive_write_set_format_pax</b>(),
<b>archive_write_set_format_pax_restricted</b>(),
<b>archive_write_set_format_shar</b>(),
<b>archive_write_set_format_shar_binary</b>(),
<b>archive_write_set_format_ustar</b>()</p>

<p style="margin-left:20%;">Sets the format that will be
used for the archive. The library can write POSIX
octet-oriented cpio format archives, POSIX-standard
&lsquo;&lsquo;pax interchange&rsquo;&rsquo; format archives,
traditional &lsquo;&lsquo;shar&rsquo;&rsquo; archives,
enhanced &lsquo;&lsquo;binary&rsquo;&rsquo; shar archives
that store a variety of file attributes and handle binary
files, and POSIX-standard &lsquo;&lsquo;ustar&rsquo;&rsquo;
archives. The pax interchange format is a
backwards-compatible tar format that adds key/value
attributes to each entry and supports arbitrary filenames,
linknames, uids, sizes, etc. &lsquo;&lsquo;Restricted pax
interchange format&rsquo;&rsquo; is the library default;
this is the same as pax format, but suppresses the pax
extended header for most normal files. In most cases, this
will result in ordinary ustar archives.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_compression_bzip2</b>(),
<b>archive_write_set_compression_compress</b>(),
<b>archive_write_set_compression_gzip</b>(),
<b>archive_write_set_compression_none</b>()</p>

<p style="margin-left:20%;">The resulting archive will be
compressed as specified. Note that the compressed output is
always properly blocked.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_compression_program</b>()</p>

<p style="margin-left:20%;">The archive will be fed into
the specified compression program. The output of that
program is blocked and written to the client write
callbacks.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_set_compressor_options</b>(),
<b>archive_write_set_format_options</b>(),
<b>archive_write_set_options</b>()</p>

<p style="margin-left:20%;">Specifies options that will be
passed to the currently-enabled compressor and/or format
writer. The argument is a comma-separated list of individual
options. Individual options have one of the following
forms:</p>

<p valign="top"><i>option=value</i></p>

<p style="margin-left:32%;">The option/value pair will be
provided to every module. Modules that do not accept an
option with this name will ignore it.</p>

<p valign="top"><i>option</i></p>

<p style="margin-left:32%; margin-top: 1em">The option will
be provided to every module with a value of
&lsquo;&lsquo;1&rsquo;&rsquo;.</p>

<p valign="top"><i>!option</i></p>

<p style="margin-left:32%;">The option will be provided to
every module with a NULL value.</p>

<p valign="top"><i>module:option=value</i>,
<i>module:option</i>, <i>module:!option</i></p>

<p style="margin-left:32%;">As above, but the corresponding
option and value will be provided only to modules whose name
matches <i>module</i>.</p>

<p style="margin-left:20%;">The return value will be
<b>ARCHIVE_OK</b> if any module accepts the option, or
<b>ARCHIVE_WARN</b> if no module accepted the option, or
<b>ARCHIVE_FATAL</b> if there was a fatal error while
attempting to process the option.</p>

<p style="margin-left:20%; margin-top: 1em">The currently
supported options are:</p>

<p valign="top">Compressor gzip <b><br>
compression-level</b></p>

<p style="margin-left:45%;">The value is interpreted as a
decimal integer specifying the gzip compression level.</p>

<p valign="top">Compressor xz <b><br>
compression-level</b></p>

<p style="margin-left:45%;">The value is interpreted as a
decimal integer specifying the compression level.</p>

<p valign="top">Format mtree <b><br>
cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>,
<b>gname</b>, <b>indent</b>, <b>link</b>, <b>md5</b>,
<b>mode</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>,
<b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>,
<b>time</b>, <b>uid</b>, <b>uname</b></p>

<p style="margin-left:45%;">Enable a particular keyword in
the mtree output. Prefix with an exclamation mark to disable
the corresponding keyword. The default is equivalent to
&lsquo;&lsquo;device, flags, gid, gname, link, mode, nlink,
size, time, type, uid, uname&rsquo;&rsquo;.</p>

<p valign="top"><b>all</b></p>

<p style="margin-left:45%; margin-top: 1em">Enables all of
the above keywords.</p>

<p valign="top"><b>use-set</b></p>

<p style="margin-left:45%;">Enables generation of
<b>/set</b> lines that specify default values for the
following files and/or directories.</p>

<p valign="top"><b>indent</b></p>

<p style="margin-left:45%; margin-top: 1em">XXX needs
explanation XXX</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open</b>()</p>

<p style="margin-left:20%;">Freeze the settings, open the
archive, and prepare for writing entries. This is the most
generic form of this function, which accepts pointers to
three callback functions which will be invoked by the
compression layer to write the constructed archive.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open_fd</b>()</p>

<p style="margin-left:20%;">A convenience form of
<b>archive_write_open</b>() that accepts a file descriptor.
The <b>archive_write_open_fd</b>() function is safe for use
with tape drives or other block-oriented devices.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open_FILE</b>()</p>

<p style="margin-left:20%;">A convenience form of
<b>archive_write_open</b>() that accepts a <i>FILE *</i>
pointer. Note that <b>archive_write_open_FILE</b>() is not
safe for writing to tape drives or other devices that
require correct blocking.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open_file</b>()</p>

<p style="margin-left:20%;">A deprecated synonym for
<b>archive_write_open_filename</b>().</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open_filename</b>()</p>

<p style="margin-left:20%;">A convenience form of
<b>archive_write_open</b>() that accepts a filename. A NULL
argument indicates that the output should be written to
standard output; an argument of
&lsquo;&lsquo;-&rsquo;&rsquo; will open a file with that
name. If you have not invoked
<b>archive_write_set_bytes_in_last_block</b>(), then
<b>archive_write_open_filename</b>() will adjust the
last-block padding depending on the file: it will enable
padding when writing to standard output or to a character or
block device node, it will disable padding otherwise. You
can override this by manually invoking
<b>archive_write_set_bytes_in_last_block</b>() before
calling <b>archive_write_open</b>(). The
<b>archive_write_open_filename</b>() function is safe for
use with tape drives or other block-oriented devices.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_open_memory</b>()</p>

<p style="margin-left:20%;">A convenience form of
<b>archive_write_open</b>() that accepts a pointer to a
block of memory that will receive the archive. The final
<i>size_t *</i> argument points to a variable that will be
updated after each write to reflect how much of the buffer
is currently in use. You should be careful to ensure that
this variable remains allocated until after the archive is
closed.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_header</b>()</p>

<p style="margin-left:20%;">Build and write a header using
the data in the provided struct archive_entry structure. See
archive_entry(3) for information on creating and populating
struct archive_entry objects.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_data</b>()</p>

<p style="margin-left:20%;">Write data corresponding to the
header just written. Returns number of bytes written or -1
on error.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish_entry</b>()</p>

<p style="margin-left:20%;">Close out the entry just
written. In particular, this writes out the final padding
required by some formats. Ordinarily, clients never need to
call this, as it is called automatically by
<b>archive_write_next_header</b>() and
<b>archive_write_close</b>() as needed.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_close</b>()</p>

<p style="margin-left:20%;">Complete the archive and invoke
the close callback.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p>

<p style="margin-left:20%;">Invokes
<b>archive_write_close</b>() if it was not invoked manually,
then releases all resources. Note that this function was
declared to return <i>void</i> in libarchive 1.x, which made
it impossible to detect errors when
<b>archive_write_close</b>() was invoked implicitly from
this function. This is corrected beginning with libarchive
2.0.</p>

<p style="margin-left:8%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the libarchive(3) overview.</p>


<p style="margin-top: 1em" valign="top"><b>IMPLEMENTATION</b></p>

<p style="margin-left:8%;">Compression support is built-in
to libarchive, which uses zlib and bzlib to handle gzip and
bzip2 compression, respectively.</p>

<p style="margin-top: 1em" valign="top"><b>CLIENT
CALLBACKS</b></p>

<p style="margin-left:8%;">To use this library, you will
need to define and register callback functions that will be
invoked to write data to the resulting archive. These
functions are registered by calling
<b>archive_write_open</b>():</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
int</i> <b>archive_open_callback</b>(<i>struct archive
*</i>, <i>void *client_data</i>)</p>

<p style="margin-left:8%; margin-top: 1em">The open
callback is invoked by <b>archive_write_open</b>(). It
should return <b>ARCHIVE_OK</b> if the underlying file or
data source is successfully opened. If the open fails, it
should call <b>archive_set_error</b>() to register an error
code and message and return <b>ARCHIVE_FATAL</b>.</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
ssize_t</i></p>


<p valign="top"><b>archive_write_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*client_data</i>,
<i>const&nbsp;void&nbsp;*buffer</i>,
<i>size_t&nbsp;length</i>)</p>

<p style="margin-left:8%; margin-top: 1em">The write
callback is invoked whenever the library needs to write raw
bytes to the archive. For correct blocking, each call to the
write callback function should translate into a single
write(2) system call. This is especially critical when
writing archives to tape drives. On success, the write
callback should return the number of bytes actually written.
On error, the callback should invoke
<b>archive_set_error</b>() to register an error code and
message and return -1.</p>

<p style="margin-left:17%; margin-top: 1em"><i>typedef
int</i> <b>archive_close_callback</b>(<i>struct archive
*</i>, <i>void *client_data</i>)</p>

<p style="margin-left:8%; margin-top: 1em">The close
callback is invoked by archive_close when the archive
processing is complete. The callback should return
<b>ARCHIVE_OK</b> on success. On failure, the callback
should invoke <b>archive_set_error</b>() to register an
error code and message and return <b>ARCHIVE_FATAL.</b></p>

<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p>

<p style="margin-left:8%;">The following sketch illustrates
basic usage of the library. In this example, the callback
functions are simply wrappers around the standard open(2),
write(2), and close(2) system calls.</p>

<p style="margin-left:17%; margin-top: 1em">#ifdef
__linux__</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="17%"></td>
<td width="12%">


<p valign="top">#define</p></td>
<td width="13%">


<p valign="top">_FILE_OFFSET_BITS 64</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">#endif <br>
#include &lt;sys/stat.h&gt; <br>
#include &lt;archive.h&gt; <br>
#include &lt;archive_entry.h&gt; <br>
#include &lt;fcntl.h&gt; <br>
#include &lt;stdlib.h&gt; <br>
#include &lt;unistd.h&gt;</p>

<p style="margin-left:17%; margin-top: 1em">struct mydata
{</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">const char *name;</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">int fd;</p></td>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-left:17%; margin-top: 1em">int <br>
myopen(struct archive *a, void *client_data) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">mydata-&gt;fd =
open(mydata-&gt;name, O_WRONLY | O_CREAT, 0644); <br>
if (mydata-&gt;fd &gt;= 0) <br>
return (ARCHIVE_OK); <br>
else <br>
return (ARCHIVE_FATAL); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">ssize_t <br>
mywrite(struct archive *a, void *client_data, const void
*buff, size_t n) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">return
(write(mydata-&gt;fd, buff, n)); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">int <br>
myclose(struct archive *a, void *client_data) <br>
{ <br>
struct mydata *mydata = client_data;</p>

<p style="margin-left:17%; margin-top: 1em">if
(mydata-&gt;fd &gt; 0) <br>
close(mydata-&gt;fd); <br>
return (0); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">void <br>
write_archive(const char *outname, const char **filename)
<br>
{ <br>
struct mydata *mydata = malloc(sizeof(struct mydata)); <br>
struct archive *a; <br>
struct archive_entry *entry; <br>
struct stat st; <br>
char buff[8192]; <br>
int len; <br>
int fd;</p>

<p style="margin-left:17%; margin-top: 1em">a =
archive_write_new(); <br>
mydata-&gt;name = outname; <br>
archive_write_set_compression_gzip(a); <br>
archive_write_set_format_ustar(a); <br>
archive_write_open(a, mydata, myopen, mywrite, myclose);
<br>
while (*filename) { <br>
stat(*filename, &amp;st); <br>
entry = archive_entry_new(); <br>
archive_entry_copy_stat(entry, &amp;st); <br>
archive_entry_set_pathname(entry, *filename); <br>
archive_write_header(a, entry); <br>
fd = open(*filename, O_RDONLY); <br>
len = read(fd, buff, sizeof(buff)); <br>
while ( len &gt; 0 ) {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">archive_write_data(a, buff, len);</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">len = read(fd, buff, sizeof(buff));</p></td>
</table>

<p style="margin-left:17%;">} <br>
archive_entry_free(entry); <br>
filename++; <br>
} <br>
archive_write_finish(a); <br>
}</p>

<p style="margin-left:17%; margin-top: 1em">int main(int
argc, const char **argv) <br>
{</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">const char *outname;</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">argv++;</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">outname = argv++;</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">write_archive(outname, argv);</p></td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">return 0;</p></td>
</table>

<p style="margin-left:17%;">}</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
non-zero error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible. The <b>archive_errno</b>() and
<b>archive_error_string</b>() functions can be used to
retrieve an appropriate error code and a textual error
message.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_write_new</b>()
returns a pointer to a newly-allocated struct archive
object.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_write_data</b>()
returns a count of the number of bytes actually written. On
error, -1 is returned and the <b>archive_errno</b>() and
<b>archive_error_string</b>() functions will return
appropriate values. Note that if the client-provided write
callback function returns a non-zero value, that error will
be propagated back to the caller through whatever API
function resulted in that call, which may include
<b>archive_write_header</b>(), <b>archive_write_data</b>(),
<b>archive_write_close</b>(), or
<b>archive_write_finish</b>(). The client callback can call
<b>archive_set_error</b>() to provide values that can then
be retrieved by <b>archive_errno</b>() and
<b>archive_error_string</b>().</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">tar(1), libarchive(3),
tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">There are many peculiar bugs in
historic tar implementations that may cause certain programs
to reject archives written by this library. For example,
several historic implementations calculated header checksums
incorrectly and will thus reject valid archives; GNU tar
does not fully support pax interchange format; some old tar
implementations required specific field terminations.</p>

<p style="margin-left:8%; margin-top: 1em">The default pax
interchange format eliminates most of the historic tar
limitations and provides a generic key/value attribute
facility for vendor-defined extensions. One oversight in
POSIX is the failure to provide a standard attribute for
large device numbers. This library uses
&lsquo;&lsquo;SCHILY.devminor&rsquo;&rsquo; and
&lsquo;&lsquo;SCHILY.devmajor&rsquo;&rsquo; for device
numbers that exceed the range supported by the
backwards-compatible ustar header. These keys are compatible
with Joerg Schilling&rsquo;s <b>star</b> archiver. Other
implementations may not recognize these keys and will thus
be unable to correctly restore device nodes with large
device numbers from archives created by this library.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
May&nbsp;11, 2008 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:34 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_write_disk(3) FreeBSD Library
Functions Manual archive_write_disk(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_write_disk_new</b>,
<b>archive_write_disk_set_options</b>,
<b>archive_write_disk_set_skip_file</b>,
<b>archive_write_disk_set_group_lookup</b>,
<b>archive_write_disk_set_standard_lookup</b>,
<b>archive_write_disk_set_user_lookup</b>,
<b>archive_write_header</b>, <b>archive_write_data</b>,
<b>archive_write_finish_entry</b>,
<b>archive_write_close</b>, <b>archive_write_finish</b>
&mdash; functions for creating objects on disk</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_write_disk_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_disk_set_options</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;flags</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_disk_set_skip_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>dev_t</i>, <i>ino_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_write_disk_set_group_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>gid_t&nbsp;(*)(void&nbsp;*,&nbsp;const&nbsp;char&nbsp;*gname,&nbsp;gid_t&nbsp;gid)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_write_disk_set_user_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>uid_t&nbsp;(*)(void&nbsp;*,&nbsp;const&nbsp;char&nbsp;*uname,&nbsp;uid_t&nbsp;uid)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_header</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>


<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p>


<p style="margin-left:14%;"><b>archive_write_data</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;void&nbsp;*</i>, <i>size_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_finish_entry</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_write_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide a
complete API for creating objects on disk from struct
archive_entry descriptions. They are most naturally used
when extracting objects from an archive using the
<b>archive_read</b>() interface. The general process is to
read struct archive_entry objects from an archive, then
write those objects to a struct archive object created using
the <b>archive_write_disk</b>() family functions. This
interface is deliberately very similar to the
<b>archive_write</b>() interface used to write objects to a
streaming archive.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_disk_new</b>()</p>

<p style="margin-left:20%;">Allocates and initializes a
struct archive object suitable for writing objects to
disk.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_skip_file</b>()</p>

<p style="margin-left:20%;">Records the device and inode
numbers of a file that should not be overwritten. This is
typically used to ensure that an extraction process does not
overwrite the archive from which objects are being read.
This capability is technically unnecessary but can be a
significant performance optimization in practice.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_options</b>()</p>

<p style="margin-left:20%;">The options field consists of a
bitwise OR of one or more of the following values:</p>

<p valign="top"><b>ARCHIVE_EXTRACT_OWNER</b></p>

<p style="margin-left:32%;">The user and group IDs should
be set on the restored file. By default, the user and group
IDs are not restored.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_PERM</b></p>

<p style="margin-left:32%;">Full permissions (including
SGID, SUID, and sticky bits) should be restored exactly as
specified, without obeying the current umask. Note that SUID
and SGID bits can only be restored if the user and group ID
of the object on disk are correct. If
<b>ARCHIVE_EXTRACT_OWNER</b> is not specified, then SUID and
SGID bits will only be restored if the default user and
group IDs of newly-created objects on disk happen to match
those specified in the archive entry. By default, only basic
permissions are restored, and umask is obeyed.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_TIME</b></p>

<p style="margin-left:32%;">The timestamps (mtime, ctime,
and atime) should be restored. By default, they are ignored.
Note that restoring of atime is not currently supported.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_NO_OVERWRITE</b></p>

<p style="margin-left:32%;">Existing files on disk will not
be overwritten. By default, existing regular files are
truncated and overwritten; existing directories will have
their permissions updated; other pre-existing objects are
unlinked and recreated from scratch.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_UNLINK</b></p>

<p style="margin-left:32%;">Existing files on disk will be
unlinked before any attempt to create them. In some cases,
this can prove to be a significant performance improvement.
By default, existing files are truncated and rewritten, but
the file is not recreated. In particular, the default
behavior does not break existing hard links.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_ACL</b></p>

<p style="margin-left:32%;">Attempt to restore ACLs. By
default, extended ACLs are ignored.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_FFLAGS</b></p>

<p style="margin-left:32%;">Attempt to restore extended
file flags. By default, file flags are ignored.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_XATTR</b></p>

<p style="margin-left:32%;">Attempt to restore POSIX.1e
extended attributes. By default, they are ignored.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_SECURE_SYMLINKS</b></p>

<p style="margin-left:32%;">Refuse to extract any object
whose final location would be altered by a symlink on disk.
This is intended to help guard against a variety of mischief
caused by archives that (deliberately or otherwise) extract
files outside of the current directory. The default is not
to perform this check. If <b>ARCHIVE_EXTRACT_UNLINK</b> is
specified together with this option, the library will remove
any intermediate symlinks it finds and return an error only
if such symlink could not be removed.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_SECURE_NODOTDOT</b></p>

<p style="margin-left:32%;">Refuse to extract a path that
contains a <i>..</i> element anywhere within it. The default
is to not refuse such paths. Note that paths ending in
<i>..</i> always cause an error, regardless of this
flag.</p>

<p valign="top"><b>ARCHIVE_EXTRACT_SPARSE</b></p>

<p style="margin-left:32%;">Scan data for blocks of NUL
bytes and try to recreate them with holes. This results in
sparse files, independent of whether the archive format
supports or uses them.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_group_lookup</b>(),
<b>archive_write_disk_set_user_lookup</b>()</p>

<p style="margin-left:20%;">The struct archive_entry
objects contain both names and ids that can be used to
identify users and groups. These names and ids describe the
ownership of the file itself and also appear in ACL lists.
By default, the library uses the ids and ignores the names,
but this can be overridden by registering user and group
lookup functions. To register, you must provide a lookup
function which accepts both a name and id and returns a
suitable id. You may also provide a void * pointer to a
private data structure and a cleanup function for that data.
The cleanup function will be invoked when the struct archive
object is destroyed.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_standard_lookup</b>()</p>

<p style="margin-left:20%;">This convenience function
installs a standard set of user and group lookup functions.
These functions use getpwnam(3) and getgrnam(3) to convert
names to ids, defaulting to the ids if the names cannot be
looked up. These functions also implement a simple memory
cache to reduce the number of calls to getpwnam(3) and
getgrnam(3).</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_header</b>()</p>

<p style="margin-left:20%;">Build and write a header using
the data in the provided struct archive_entry structure. See
archive_entry(3) for information on creating and populating
struct archive_entry objects.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_data</b>()</p>

<p style="margin-left:20%;">Write data corresponding to the
header just written. Returns number of bytes written or -1
on error.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish_entry</b>()</p>

<p style="margin-left:20%;">Close out the entry just
written. Ordinarily, clients never need to call this, as it
is called automatically by
<b>archive_write_next_header</b>() and
<b>archive_write_close</b>() as needed.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_close</b>()</p>

<p style="margin-left:20%;">Set any attributes that could
not be set during the initial restore. For example,
directory timestamps are not restored initially because
restoring a subsequent file would alter that timestamp.
Similarly, non-writable directories are initially created
with write permissions (so that their contents can be
restored). The <b>archive_write_disk_new</b> library
maintains a list of all such deferred attributes and sets
them when this function is invoked.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p>

<p style="margin-left:20%;">Invokes
<b>archive_write_close</b>() if it was not invoked manually,
then releases all resources.</p>

<p style="margin-left:8%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the libarchive(3) overview. Many of
these functions are also documented under
archive_write(3).</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
non-zero error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible. The <b>archive_errno</b>() and
<b>archive_error_string</b>() functions can be used to
retrieve an appropriate error code and a textual error
message.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_write_disk_new</b>()
returns a pointer to a newly-allocated struct archive
object.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_write_data</b>()
returns a count of the number of bytes actually written. On
error, -1 is returned and the <b>archive_errno</b>() and
<b>archive_error_string</b>() functions will return
appropriate values.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive_read(3),
archive_write(3), tar(1), libarchive(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3. The
<b>archive_write_disk</b> interface was added to
<b>libarchive 2.0</b> and first appeared in
FreeBSD&nbsp;6.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">Directories are actually
extracted in two distinct phases. Directories are created
during <b>archive_write_header</b>(), but final permissions
are not set until <b>archive_write_close</b>(). This
separation is necessary to correctly handle borderline cases
such as a non-writable directory containing files, but can
cause unexpected results. In particular, directory
permissions are not fully restored until the archive is
closed. If you use chdir(2) to change the current directory
between calls to <b>archive_read_extract</b>() or before
calling <b>archive_read_close</b>(), you may confuse the
permission-setting logic with the result that directory
permissions are restored incorrectly.</p>

<p style="margin-left:8%; margin-top: 1em">The library
attempts to create objects with filenames longer than
<b>PATH_MAX</b> by creating prefixes of the full path and
changing the current directory. Currently, this logic is
limited in scope; the fixup pass does not work correctly for
such objects and the symlink security check option disables
the support for very long pathnames.</p>

<p style="margin-left:8%; margin-top: 1em">Restoring the
path <i>aa/../bb</i> does create each intermediate
directory. In particular, the directory <i>aa</i> is created
as well as the final object <i>bb</i>. In theory, this can
be exploited to create an entire directory heirarchy with a
single request. Of course, this does not work if the
<b>ARCHIVE_EXTRACT_NODOTDOT</b> option is specified.</p>

<p style="margin-left:8%; margin-top: 1em">Implicit
directories are always created obeying the current umask.
Explicit objects are created obeying the current umask
unless <b>ARCHIVE_EXTRACT_PERM</b> is specified, in which
case they current umask is ignored.</p>

<p style="margin-left:8%; margin-top: 1em">SGID and SUID
bits are restored only if the correct user and group could
be set. If <b>ARCHIVE_EXTRACT_OWNER</b> is not specified,
then no attempt is made to set the ownership. In this case,
SGID and SUID bits are restored only if the user and group
of the final object happen to match those specified in the
entry.</p>

<p style="margin-left:8%; margin-top: 1em">The
&lsquo;&lsquo;standard&rsquo;&rsquo; user-id and group-id
lookup functions are not the defaults because getgrnam(3)
and getpwnam(3) are sometimes too large for particular
applications. The current design allows the application
author to use a more compact implementation when
appropriate.</p>

<p style="margin-left:8%; margin-top: 1em">There should be
a corresponding <b>archive_read_disk</b> interface that
walks a directory heirarchy and returns archive entry
objects.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
August&nbsp;5, 2008 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:34 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">CPIO(5) FreeBSD File Formats Manual
CPIO(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>cpio</b> &mdash; format of
cpio archive files</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>cpio</b> archive format
collects any number of files, directories, and other file
system objects (symbolic links, device nodes, etc.) into a
single stream of bytes.</p>

<p style="margin-left:8%; margin-top: 1em"><b>General
Format</b> <br>
Each file system object in a <b>cpio</b> archive comprises a
header record with basic numeric metadata followed by the
full pathname of the entry and the file data. The header
record stores a series of integer values that generally
follow the fields in <i>struct stat</i>. (See stat(2) for
details.) The variants differ primarily in how they store
those integers (binary, octal, or hexadecimal). The header
is followed by the pathname of the entry (the length of the
pathname is stored in the header) and any file data. The end
of the archive is indicated by a special record with the
pathname &lsquo;&lsquo;TRAILER!!!&rsquo;&rsquo;.</p>

<p style="margin-left:8%; margin-top: 1em"><b>PWB
format</b> <br>
XXX Any documentation of the original PWB/UNIX 1.0 format?
XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>Old Binary
Format</b> <br>
The old binary <b>cpio</b> format stores numbers as 2-byte
and 4-byte binary values. Each entry begins with a header in
the following format:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_old_cpio { <br>
unsigned short c_magic; <br>
unsigned short c_dev; <br>
unsigned short c_ino; <br>
unsigned short c_mode; <br>
unsigned short c_uid; <br>
unsigned short c_gid; <br>
unsigned short c_nlink; <br>
unsigned short c_rdev;</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">unsigned short c_mtime[2];</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">unsigned short c_namesize;</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="71%">


<p valign="top">unsigned short c_filesize[2];</p></td>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-left:8%; margin-top: 1em">The <i>unsigned
short</i> fields here are 16-bit integer values; the
<i>unsigned int</i> fields are 32-bit integer values. The
fields are as follows</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">The integer
value octal 070707. This value can be used to determine
whether this archive is written with little-endian or
big-endian integers.</p>

<p style="margin-top: 1em" valign="top"><i>dev</i>,
<i>ino</i></p>

<p style="margin-left:20%;">The device and inode numbers
from the disk. These are used by programs that read
<b>cpio</b> archives to determine when two entries refer to
the same file. Programs that synthesize <b>cpio</b> archives
should be careful to set these to distinct values for each
entry.</p>

<p style="margin-top: 1em" valign="top"><i>mode</i></p>

<p style="margin-left:20%; margin-top: 1em">The mode
specifies both the regular permissions and the file type. It
consists of several bit fields as follows:</p>

<p valign="top">0170000</p>

<p style="margin-left:34%; margin-top: 1em">This masks the
file type bits.</p>

<p valign="top">0140000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for sockets.</p>

<p valign="top">0120000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for symbolic links. For symbolic links, the link body is
stored as file data.</p>

<p valign="top">0100000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for regular files.</p>

<p valign="top">0060000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for block special devices.</p>

<p valign="top">0040000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for directories.</p>

<p valign="top">0020000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for character special devices.</p>

<p valign="top">0010000</p>

<p style="margin-left:34%; margin-top: 1em">File type value
for named pipes or FIFOs.</p>

<p valign="top">0004000</p>

<p style="margin-left:34%; margin-top: 1em">SUID bit.</p>

<p valign="top">0002000</p>

<p style="margin-left:34%; margin-top: 1em">SGID bit.</p>

<p valign="top">0001000</p>

<p style="margin-left:34%; margin-top: 1em">Sticky bit. On
some systems, this modifies the behavior of executables
and/or directories.</p>

<p valign="top">0000777</p>

<p style="margin-left:34%; margin-top: 1em">The lower 9
bits specify read/write/execute permissions for world,
group, and user following standard POSIX conventions.</p>

<p style="margin-top: 1em" valign="top"><i>uid</i>,
<i>gid</i></p>

<p style="margin-left:20%;">The numeric user id and group
id of the owner.</p>

<p style="margin-top: 1em" valign="top"><i>nlink</i></p>

<p style="margin-left:20%; margin-top: 1em">The number of
links to this file. Directories always have a value of at
least two here. Note that hardlinked files include file data
with every copy in the archive.</p>

<p style="margin-top: 1em" valign="top"><i>rdev</i></p>

<p style="margin-left:20%; margin-top: 1em">For block
special and character special entries, this field contains
the associated device number. For all other entry types, it
should be set to zero by writers and ignored by readers.</p>

<p style="margin-top: 1em" valign="top"><i>mtime</i></p>

<p style="margin-left:20%; margin-top: 1em">Modification
time of the file, indicated as the number of seconds since
the start of the epoch, 00:00:00 UTC January 1, 1970. The
four-byte integer is stored with the most-significant 16
bits first followed by the least-significant 16 bits. Each
of the two 16 bit values are stored in machine-native byte
order.</p>


<p style="margin-top: 1em" valign="top"><i>namesize</i></p>

<p style="margin-left:20%;">The number of bytes in the
pathname that follows the header. This count includes the
trailing NUL byte.</p>


<p style="margin-top: 1em" valign="top"><i>filesize</i></p>

<p style="margin-left:20%;">The size of the file. Note that
this archive format is limited to four gigabyte file sizes.
See <i>mtime</i> above for a description of the storage of
four-byte integers.</p>

<p style="margin-left:8%; margin-top: 1em">The pathname
immediately follows the fixed header. If the <b>namesize</b>
is odd, an additional NUL byte is added after the pathname.
The file data is then appended, padded with NUL bytes to an
even length.</p>

<p style="margin-left:8%; margin-top: 1em">Hardlinked files
are not given special treatment; the full file contents are
included with each copy of the file.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Portable
ASCII Format</b> <br>
Version&nbsp;2 of the Single UNIX Specification
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;) standardized an ASCII
variant that is portable across all platforms. It is
commonly known as the &lsquo;&lsquo;old
character&rsquo;&rsquo; format or as the
&lsquo;&lsquo;odc&rsquo;&rsquo; format. It stores the same
numeric fields as the old binary format, but represents them
as 6-character or 11-character octal values.</p>

<p style="margin-left:17%; margin-top: 1em">struct
cpio_odc_header { <br>
char c_magic[6]; <br>
char c_dev[6]; <br>
char c_ino[6]; <br>
char c_mode[6]; <br>
char c_uid[6]; <br>
char c_gid[6]; <br>
char c_nlink[6]; <br>
char c_rdev[6]; <br>
char c_mtime[11]; <br>
char c_namesize[6]; <br>
char c_filesize[11]; <br>
};</p>

<p style="margin-left:8%; margin-top: 1em">The fields are
identical to those in the old binary format. The name and
file body follow the fixed header. Unlike the old binary
format, there is no additional padding after the pathname or
file contents. If the files being archived are themselves
entirely ASCII, then the resulting archive will be entirely
ASCII, except for the NUL byte that terminates the name
field.</p>

<p style="margin-left:8%; margin-top: 1em"><b>New ASCII
Format</b> <br>
The &quot;new&quot; ASCII format uses 8-byte hexadecimal
fields for all numbers and separates device numbers into
separate fields for major and minor numbers.</p>

<p style="margin-left:17%; margin-top: 1em">struct
cpio_newc_header { <br>
char c_magic[6]; <br>
char c_ino[8]; <br>
char c_mode[8]; <br>
char c_uid[8]; <br>
char c_gid[8]; <br>
char c_nlink[8]; <br>
char c_mtime[8]; <br>
char c_filesize[8]; <br>
char c_devmajor[8]; <br>
char c_devminor[8]; <br>
char c_rdevmajor[8]; <br>
char c_rdevminor[8]; <br>
char c_namesize[8]; <br>
char c_check[8]; <br>
};</p>

<p style="margin-left:8%; margin-top: 1em">Except as
specified below, the fields here match those specified for
the old binary format above.</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">The string
&lsquo;&lsquo;070701&rsquo;&rsquo;.</p>

<p style="margin-top: 1em" valign="top"><i>check</i></p>

<p style="margin-left:20%; margin-top: 1em">This field is
always set to zero by writers and ignored by readers. See
the next section for more details.</p>

<p style="margin-left:8%; margin-top: 1em">The pathname is
followed by NUL bytes so that the total size of the fixed
header plus pathname is a multiple of four. Likewise, the
file data is padded to a multiple of four bytes. Note that
this format supports only 4 gigabyte files (unlike the older
ASCII format, which supports 8 gigabyte files).</p>

<p style="margin-left:8%; margin-top: 1em">In this format,
hardlinked files are handled by setting the filesize to zero
for each entry except the last one that appears in the
archive.</p>

<p style="margin-left:8%; margin-top: 1em"><b>New CRC
Format</b> <br>
The CRC format is identical to the new ASCII format
described in the previous section except that the magic
field is set to &lsquo;&lsquo;070702&rsquo;&rsquo; and the
<i>check</i> field is set to the sum of all bytes in the
file data. This sum is computed treating all bytes as
unsigned values and using unsigned arithmetic. Only the
least-significant 32 bits of the sum are stored.</p>

<p style="margin-left:8%; margin-top: 1em"><b>HP
variants</b> <br>
The <b>cpio</b> implementation distributed with HPUX used
XXXX but stored device numbers differently XXX.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Other
Extensions and Variants</b> <br>
Sun Solaris uses additional file types to store extended
file data, including ACLs and extended attributes, as
special entries in cpio archives.</p>

<p style="margin-left:8%; margin-top: 1em">XXX Others?
XXX</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The
&lsquo;&lsquo;CRC&rsquo;&rsquo; format is mis-named, as it
uses a simple checksum and not a cyclic redundancy
check.</p>

<p style="margin-left:8%; margin-top: 1em">The old binary
format is limited to 16 bits for user id, group id, device,
and inode numbers. It is limited to 4 gigabyte file
sizes.</p>

<p style="margin-left:8%; margin-top: 1em">The old ASCII
format is limited to 18 bits for the user id, group id,
device, and inode numbers. It is limited to 8 gigabyte file
sizes.</p>

<p style="margin-left:8%; margin-top: 1em">The new ASCII
format is limited to 4 gigabyte file sizes.</p>

<p style="margin-left:8%; margin-top: 1em">None of the cpio
formats store user or group names, which are essential when
moving files between systems with dissimilar user or group
numbering.</p>

<p style="margin-left:8%; margin-top: 1em">Especially when
writing older cpio variants, it may be necessary to map
actual device/inode values to synthesized values that fit
the available fields. With very large filesystems, this may
be necessary even for the newer formats.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">cpio(1), tar(5)</p>


<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>

<p style="margin-left:8%;">The <b>cpio</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The portable ASCII format
is currently part of the specification for the pax(1)
utility.</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The original cpio utility was
written by Dick Haight while working in AT&amp;T&rsquo;s
Unix Support Group. It appeared in 1977 as part of PWB/UNIX
1.0, the &lsquo;&lsquo;Programmer&rsquo;s Work
Bench&rsquo;&rsquo; derived from Version&nbsp;6 AT&amp;T
UNIX that was used internally at AT&amp;T. Both the old
binary and old character formats were in use by 1980,
according to the System III source released by SCO under
their &lsquo;&lsquo;Ancient Unix&rsquo;&rsquo; license. The
character format was adopted as part of IEEE Std 1003.1-1988
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;). XXX when did
&quot;newc&quot; appear? Who invented it? When did HP come
out with their variant? When did Sun introduce ACLs and
extended attributes? XXX</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
October&nbsp;5, 2007 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:35 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">libarchive-formats(5) FreeBSD File Formats
Manual libarchive-formats(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>libarchive-formats</b>
&mdash; archive formats supported by the libarchive
library</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The libarchive(3) library reads
and writes a variety of streaming archive formats. Generally
speaking, all of these archive formats consist of a series
of &lsquo;&lsquo;entries&rsquo;&rsquo;. Each entry stores a
single file system object, such as a file, directory, or
symbolic link.</p>

<p style="margin-left:8%; margin-top: 1em">The following
provides a brief description of each format supported by
libarchive, with some information about recognized
extensions or limitations of the current library support.
Note that just because a format is supported by libarchive
does not imply that a program that uses libarchive will
support that format. Applications that use libarchive
specify which formats they wish to support, though many
programs do use libarchive convenience functions to enable
all supported formats.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Tar
Formats</b> <br>
The libarchive(3) library can read most tar archives.
However, it only writes POSIX-standard
&lsquo;&lsquo;ustar&rsquo;&rsquo; and &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; formats.</p>

<p style="margin-left:8%; margin-top: 1em">All tar formats
store each entry in one or more 512-byte records. The first
record is used for file metadata, including filename,
timestamp, and mode information, and the file data is stored
in subsequent records. Later variants have extended this by
either appropriating undefined areas of the header record,
extending the header to multiple records, or by storing
special entries that modify the interpretation of subsequent
entries.</p>

<p style="margin-top: 1em" valign="top"><b>gnutar</b></p>

<p style="margin-left:20%; margin-top: 1em">The
libarchive(3) library can read GNU-format tar archives. It
currently supports the most popular GNU extensions,
including modern long filename and linkname support, as well
as atime and ctime data. The libarchive library does not
support multi-volume archives, nor the old GNU long filename
format. It can read GNU sparse file entries, including the
new POSIX-based formats, but cannot write GNU sparse file
entries.</p>

<p style="margin-top: 1em" valign="top"><b>pax</b></p>

<p style="margin-left:20%; margin-top: 1em">The
libarchive(3) library can read and write POSIX-compliant pax
interchange format archives. Pax interchange format archives
are an extension of the older ustar format that adds a
separate entry with additional attributes stored as
key/value pairs immediately before each regular entry. The
presence of these additional entries is the only difference
between pax interchange format and the older ustar format.
The extended attributes are of unlimited length and are
stored as UTF-8 Unicode strings. Keywords defined in the
standard are in all lowercase; vendors are allowed to define
custom keys by preceding them with the vendor name in all
uppercase. When writing pax archives, libarchive uses many
of the SCHILY keys defined by Joerg Schilling&rsquo;s
&lsquo;&lsquo;star&rsquo;&rsquo; archiver and a few
LIBARCHIVE keys. The libarchive library can read most of the
SCHILY keys and most of the GNU keys introduced by GNU tar.
It silently ignores any keywords that it does not
understand.</p>

<p style="margin-top: 1em" valign="top"><b>restricted
pax</b></p>

<p style="margin-left:20%;">The libarchive library can also
write pax archives in which it attempts to suppress the
extended attributes entry whenever possible. The result will
be identical to a ustar archive unless the extended
attributes entry is required to store a long file name, long
linkname, extended ACL, file flags, or if any of the
standard ustar data (user name, group name, UID, GID, etc)
cannot be fully represented in the ustar header. In all
cases, the result can be dearchived by any program that can
read POSIX-compliant pax interchange format archives.
Programs that correctly read ustar format (see below) will
also be able to read this format; any extended attributes
will be extracted as separate files stored in
<i>PaxHeader</i> directories.</p>

<p style="margin-top: 1em" valign="top"><b>ustar</b></p>

<p style="margin-left:20%; margin-top: 1em">The libarchive
library can both read and write this format. This format has
the following limitations:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:26%;">Device major and minor numbers
are limited to 21 bits. Nodes with larger numbers will not
be added to the archive.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:26%;">Path names in the archive are
limited to 255 bytes. (Shorter if there is no / character in
exactly the right place.)</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:26%;">Symbolic links and hard links
are stored in the archive with the name of the referenced
file. This name is limited to 100 bytes.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:26%;">Extended attributes, file
flags, and other extended security information cannot be
stored.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:26%;">Archive entries are limited to
8 gigabytes in size.</p>

<p style="margin-left:20%;">Note that the pax interchange
format has none of these restrictions.</p>

<p style="margin-left:8%; margin-top: 1em">The libarchive
library also reads a variety of commonly-used extensions to
the basic tar format. These extensions are recognized
automatically whenever they appear.</p>

<p style="margin-top: 1em" valign="top">Numeric
extensions.</p>

<p style="margin-left:20%;">The POSIX standards require
fixed-length numeric fields to be written with some
character position reserved for terminators. Libarchive
allows these fields to be written without terminator
characters. This extends the allowable range; in particular,
ustar archives with this extension can support entries up to
64 gigabytes in size. Libarchive also recognizes base-256
values in most numeric fields. This essentially removes all
limitations on file size, modification time, and device
numbers.</p>

<p style="margin-top: 1em" valign="top">Solaris
extensions</p>

<p style="margin-left:20%;">Libarchive recognizes ACL and
extended attribute records written by Solaris tar.
Currently, libarchive only has support for old-style ACLs;
the newer NFSv4 ACLs are recognized but discarded.</p>

<p style="margin-left:8%; margin-top: 1em">The first tar
program appeared in Seventh Edition Unix in 1979. The first
official standard for the tar file format was the
&lsquo;&lsquo;ustar&rsquo;&rsquo; (Unix Standard Tar) format
defined by POSIX in 1988. POSIX.1-2001 extended the ustar
format to create the &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; format.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Cpio
Formats</b> <br>
The libarchive library can read a number of common cpio
variants and can write &lsquo;&lsquo;odc&rsquo;&rsquo; and
&lsquo;&lsquo;newc&rsquo;&rsquo; format archives. A cpio
archive stores each entry as a fixed-size header followed by
a variable-length filename and variable-length data. Unlike
the tar format, the cpio format does only minimal padding of
the header or file data. There are several cpio variants,
which differ primarily in how they store the initial header:
some store the values as octal or hexadecimal numbers in
ASCII, others as binary values of varying byte order and
length.</p>

<p style="margin-top: 1em" valign="top"><b>binary</b></p>

<p style="margin-left:20%; margin-top: 1em">The libarchive
library transparently reads both big-endian and
little-endian variants of the original binary cpio format.
This format used 32-bit binary values for file size and
mtime, and 16-bit binary values for the other fields.</p>

<p style="margin-top: 1em" valign="top"><b>odc</b></p>

<p style="margin-left:20%; margin-top: 1em">The libarchive
library can both read and write this POSIX-standard format,
which is officially known as the &lsquo;&lsquo;cpio
interchange format&rsquo;&rsquo; or the
&lsquo;&lsquo;octet-oriented cpio archive
format&rsquo;&rsquo; and sometimes unofficially referred to
as the &lsquo;&lsquo;old character format&rsquo;&rsquo;.
This format stores the header contents as octal values in
ASCII. It is standard, portable, and immune from byte-order
confusion. File sizes and mtime are limited to 33 bits (8GB
file size), other fields are limited to 18 bits.</p>

<p style="margin-top: 1em" valign="top"><b>SVR4</b></p>

<p style="margin-left:20%; margin-top: 1em">The libarchive
library can read both CRC and non-CRC variants of this
format. The SVR4 format uses eight-digit hexadecimal values
for all header fields. This limits file size to 4GB, and
also limits the mtime and other fields to 32 bits. The SVR4
format can optionally include a CRC of the file contents,
although libarchive does not currently verify this CRC.</p>

<p style="margin-left:8%; margin-top: 1em">Cpio first
appeared in PWB/UNIX 1.0, which was released within AT&amp;T
in 1977. PWB/UNIX 1.0 formed the basis of System III Unix,
released outside of AT&amp;T in 1981. This makes cpio older
than tar, although cpio was not included in Version 7
AT&amp;T Unix. As a result, the tar command became much
better known in universities and research groups that used
Version 7. The combination of the <b>find</b> and
<b>cpio</b> utilities provided very precise control over
file selection. Unfortunately, the format has many
limitations that make it unsuitable for widespread use. Only
the POSIX format permits files over 4GB, and its 18-bit
limit for most other fields makes it unsuitable for modern
systems. In addition, cpio formats only store numeric
UID/GID values (not usernames and group names), which can
make it very difficult to correctly transfer archives across
systems with dissimilar user numbering.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Shar
Formats</b> <br>
A &lsquo;&lsquo;shell archive&rsquo;&rsquo; is a shell
script that, when executed on a POSIX-compliant system, will
recreate a collection of file system objects. The libarchive
library can write two different kinds of shar archives:</p>

<p style="margin-top: 1em" valign="top"><b>shar</b></p>

<p style="margin-left:20%; margin-top: 1em">The traditional
shar format uses a limited set of POSIX commands, including
echo(1), mkdir(1), and sed(1). It is suitable for portably
archiving small collections of plain text files. However, it
is not generally well-suited for large archives (many
implementations of sh(1) have limits on the size of a
script) nor should it be used with non-text files.</p>


<p style="margin-top: 1em" valign="top"><b>shardump</b></p>

<p style="margin-left:20%;">This format is similar to shar
but encodes files using uuencode(1) so that the result will
be a plain text file regardless of the file contents. It
also includes additional shell commands that attempt to
reproduce as many file attributes as possible, including
owner, mode, and flags. The additional commands used to
restore file attributes make shardump archives less portable
than plain shar archives.</p>

<p style="margin-left:8%; margin-top: 1em"><b>ISO9660
format</b> <br>
Libarchive can read and extract from files containing
ISO9660-compliant CDROM images. In many cases, this can
remove the need to burn a physical CDROM just in order to
read the files contained in an ISO9660 image. It also avoids
security and complexity issues that come with virtual mounts
and loopback devices. Libarchive supports the most common
Rockridge extensions and has partial support for Joliet
extensions. If both extensions are present, the Joliet
extensions will be used and the Rockridge extensions will be
ignored. In particular, this can create problems with
hardlinks and symlinks, which are supported by Rockridge but
not by Joliet.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Zip
format</b> <br>
Libarchive can read and write zip format archives that have
uncompressed entries and entries compressed with the
&lsquo;&lsquo;deflate&rsquo;&rsquo; algorithm. Older zip
compression algorithms are not supported. It can extract jar
archives, archives that use Zip64 extensions and many
self-extracting zip archives. Libarchive reads Zip archives
as they are being streamed, which allows it to read archives
of arbitrary size. It currently does not use the central
directory; this limits libarchive&rsquo;s ability to support
some self-extracting archives and ones that have been
modified in certain ways.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Archive
(library) file format</b> <br>
The Unix archive format (commonly created by the ar(1)
archiver) is a general-purpose format which is used almost
exclusively for object files to be read by the link editor
ld(1). The ar format has never been standardised. There are
two common variants: the GNU format derived from SVR4, and
the BSD format, which first appeared in 4.4BSD. The two
differ primarily in their handling of filenames longer than
15 characters: the GNU/SVR4 variant writes a filename table
at the beginning of the archive; the BSD format stores each
long filename in an extension area adjacent to the entry.
Libarchive can read both extensions, including archives that
may include both types of long filenames. Programs using
libarchive can write GNU/SVR4 format if they provide a
filename table to be written into the archive before any of
the entries. Any entries whose names are not in the filename
table will be written using BSD-style long filenames. This
can cause problems for programs such as GNU ld that do not
support the BSD-style long filenames.</p>

<p style="margin-left:8%; margin-top: 1em"><b>mtree</b>
<br>
Libarchive can read and write files in mtree(5) format. This
format is not a true archive format, but rather a textual
description of a file hierarchy in which each line specifies
the name of a file and provides specific metadata about that
file. Libarchive can read all of the keywords supported by
both the NetBSD and FreeBSD versions of mtree(1), although
many of the keywords cannot currently be stored in an
archive_entry object. When writing, libarchive supports use
of the archive_write_set_options(3) interface to specify
which keywords should be included in the output. If
libarchive was compiled with access to suitable
cryptographic libraries (such as the OpenSSL libraries), it
can compute hash entries such as <b>sha512</b> or <b>md5</b>
from file data being written to the mtree writer.</p>

<p style="margin-left:8%; margin-top: 1em">When reading an
mtree file, libarchive will locate the corresponding files
on disk using the <b>contents</b> keyword if present or the
regular filename. If it can locate and open the file on
disk, it will use that to fill in any metadata that is
missing from the mtree file and will read the file contents
and return those to the program using libarchive. If it
cannot locate and open the file on disk, libarchive will
return an error for any attempt to read the entry body.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">ar(1), cpio(1), mkisofs(1),
shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5),
tar(5)</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
December&nbsp;27, 2009 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:35 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions
Manual LIBARCHIVE(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>libarchive</b> &mdash;
functions for reading and writing streaming archives</p>

<p style="margin-top: 1em" valign="top"><b>LIBRARY</b></p>

<p style="margin-left:8%;">Streaming Archive Library
(libarchive, &minus;larchive)</p>


<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
provides a flexible interface for reading and writing
streaming archive files such as tar and cpio. The library is
inherently stream-oriented; readers serially iterate through
the archive, writers serially add things to the archive. In
particular, note that there is no built-in support for
random access nor for in-place modification.</p>

<p style="margin-left:8%; margin-top: 1em">When reading an
archive, the library automatically detects the format and
the compression. The library currently has read support
for:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">old-style tar archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">most variants of the POSIX
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">the POSIX &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; format,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">GNU-format tar archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">most common cpio archive
formats,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">ISO9660 CD images (with or
without RockRidge extensions),</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">Zip archives.</p>

<p style="margin-left:8%;">The library automatically
detects archives compressed with gzip(1), bzip2(1), or
compress(1) and decompresses them transparently.</p>

<p style="margin-left:8%; margin-top: 1em">When writing an
archive, you can specify the compression to be used and the
format to use. The library can write</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX-standard
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX &lsquo;&lsquo;pax
interchange format&rsquo;&rsquo; archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">POSIX octet-oriented cpio
archives,</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:14%;">two different variants of shar
archives.</p>

<p style="margin-left:8%;">Pax interchange format is an
extension of the tar archive format that eliminates
essentially all of the limitations of historic tar formats
in a standard fashion that is supported by POSIX-compliant
pax(1) implementations on many systems as well as several
newer implementations of tar(1). Note that the default write
format will suppress the pax extended attributes for most
entries; explicitly requesting pax format will enable those
attributes for all entries.</p>

<p style="margin-left:8%; margin-top: 1em">The read and
write APIs are accessed through the
<b>archive_read_XXX</b>() functions and the
<b>archive_write_XXX</b>() functions, respectively, and
either can be used independently of the other.</p>

<p style="margin-left:8%; margin-top: 1em">The rest of this
manual page provides an overview of the library operation.
More detailed information can be found in the individual
manual pages for each API or utility function.</p>

<p style="margin-top: 1em" valign="top"><b>READING AN
ARCHIVE</b></p>

<p style="margin-left:8%;">To read an archive, you must
first obtain an initialized struct archive object from
<b>archive_read_new</b>(). You can then modify this object
for the desired operations with the various
<b>archive_read_set_XXX</b>() and
<b>archive_read_support_XXX</b>() functions. In particular,
you will need to invoke appropriate
<b>archive_read_support_XXX</b>() functions to enable the
corresponding compression and format support. Note that
these latter functions perform two distinct operations: they
cause the corresponding support code to be linked into your
program, and they enable the corresponding auto-detect code.
Unless you have specific constraints, you will generally
want to invoke <b>archive_read_support_compression_all</b>()
and <b>archive_read_support_format_all</b>() to enable
auto-detect for all formats and compression types currently
supported by the library.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
prepared the struct archive object, you call
<b>archive_read_open</b>() to actually open the archive and
prepare it for reading. There are several variants of this
function; the most basic expects you to provide pointers to
several functions that can provide blocks of bytes from the
archive. There are convenience forms that allow you to
specify a filename, file descriptor, <i>FILE *</i> object,
or a block of memory from which to read the archive data.
Note that the core library makes no assumptions about the
size of the blocks read; callback functions are free to read
whatever block size is most appropriate for the medium.</p>

<p style="margin-left:8%; margin-top: 1em">Each archive
entry consists of a header followed by a certain amount of
data. You can obtain the next header with
<b>archive_read_next_header</b>(), which returns a pointer
to an struct archive_entry structure with information about
the current archive element. If the entry is a regular file,
then the header will be followed by the file data. You can
use <b>archive_read_data</b>() (which works much like the
read(2) system call) to read this data from the archive. You
may prefer to use the higher-level
<b>archive_read_data_skip</b>(), which reads and discards
the data for this entry,
<b>archive_read_data_to_buffer</b>(), which reads the data
into an in-memory buffer,
<b>archive_read_data_to_file</b>(), which copies the data to
the provided file descriptor, or
<b>archive_read_extract</b>(), which recreates the specified
entry on disk and copies data from the archive. In
particular, note that <b>archive_read_extract</b>() uses the
struct archive_entry structure that you provide it, which
may differ from the entry just read from the archive. In
particular, many applications will want to override the
pathname, file permissions, or ownership.</p>

<p style="margin-left:8%; margin-top: 1em">Once you have
finished reading data from the archive, you should call
<b>archive_read_close</b>() to close the archive, then call
<b>archive_read_finish</b>() to release all resources,
including all memory allocated by the library.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_read(3) manual page provides more detailed calling
information for this API.</p>

<p style="margin-top: 1em" valign="top"><b>WRITING AN
ARCHIVE</b></p>

<p style="margin-left:8%;">You use a similar process to
write an archive. The <b>archive_write_new</b>() function
creates an archive object useful for writing, the various
<b>archive_write_set_XXX</b>() functions are used to set
parameters for writing the archive, and
<b>archive_write_open</b>() completes the setup and opens
the archive for writing.</p>

<p style="margin-left:8%; margin-top: 1em">Individual
archive entries are written in a three-step process: You
first initialize a struct archive_entry structure with
information about the new entry. At a minimum, you should
set the pathname of the entry and provide a <i>struct
stat</i> with a valid <i>st_mode</i> field, which specifies
the type of object and <i>st_size</i> field, which specifies
the size of the data portion of the object. The
<b>archive_write_header</b>() function actually writes the
header data to the archive. You can then use
<b>archive_write_data</b>() to write the actual data.</p>

<p style="margin-left:8%; margin-top: 1em">After all
entries have been written, use the
<b>archive_write_finish</b>() function to release all
resources.</p>

<p style="margin-left:8%; margin-top: 1em">The
archive_write(3) manual page provides more detailed calling
information for this API.</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">Detailed descriptions of each
function are provided by the corresponding manual pages.</p>

<p style="margin-left:8%; margin-top: 1em">All of the
functions utilize an opaque struct archive datatype that
provides access to the archive contents.</p>

<p style="margin-left:8%; margin-top: 1em">The struct
archive_entry structure contains a complete description of a
single archive entry. It uses an opaque interface that is
fully documented in archive_entry(3).</p>

<p style="margin-left:8%; margin-top: 1em">Users familiar
with historic formats should be aware that the newer
variants have eliminated most restrictions on the length of
textual fields. Clients should not assume that filenames,
link names, user names, or group names are limited in
length. In particular, pax interchange format can easily
accommodate pathnames in arbitrary character sets that
exceed <i>PATH_MAX</i>.</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return zero on
success, non-zero on error. The return value indicates the
general severity of the error, ranging from
<b>ARCHIVE_WARN</b>, which indicates a minor problem that
should probably be reported to the user, to
<b>ARCHIVE_FATAL</b>, which indicates a serious problem that
will prevent any further operations on this archive. On
error, the <b>archive_errno</b>() function can be used to
retrieve a numeric error code (see errno(2)). The
<b>archive_error_string</b>() returns a textual error
message suitable for display.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>()
and <b>archive_write_new</b>() return pointers to an
allocated and initialized struct archive object.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>()
and <b>archive_write_data</b>() return a count of the number
of bytes actually read or written. A value of zero indicates
the end of the data for this entry. A negative value
indicates an error, in which case the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions can be used to
obtain more information.</p>


<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>

<p style="margin-left:8%;">There are character set
conversions within the archive_entry(3) functions that are
impacted by the currently-selected locale.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">tar(1), archive_entry(3),
archive_read(3), archive_util(3), archive_write(3),
tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">Some archive formats support
information that is not supported by struct archive_entry.
Such information cannot be fully archived or restored using
this library. This includes, for example, comments,
character sets, or the arbitrary key/value pairs that can
appear in pax interchange format archives.</p>

<p style="margin-left:8%; margin-top: 1em">Conversely, of
course, not all of the information that can be stored in an
struct archive_entry is supported by all formats. For
example, cpio formats do not support nanosecond timestamps;
old tar formats do not support large device numbers.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
August&nbsp;19, 2006 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:36 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions
Manual LIBARCHIVE(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>libarchive_internals</b>
&mdash; description of libarchive internal interfaces</p>


<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
provides a flexible interface for reading and writing
streaming archive files such as tar and cpio. Internally, it
follows a modular layered design that should make it easy to
add new archive and compression formats.</p>

<p style="margin-top: 1em" valign="top"><b>GENERAL
ARCHITECTURE</b></p>

<p style="margin-left:8%;">Externally, libarchive exposes
most operations through an opaque, object-style interface.
The archive_entry(1) objects store information about a
single filesystem object. The rest of the library provides
facilities to write archive_entry(1) objects to archive
files, read them from archive files, and write them to disk.
(There are plans to add a facility to read archive_entry(1)
objects from disk as well.)</p>

<p style="margin-left:8%; margin-top: 1em">The read and
write APIs each have four layers: a public API layer, a
format layer that understands the archive file format, a
compression layer, and an I/O layer. The I/O layer is
completely exposed to clients who can replace it entirely
with their own functions.</p>

<p style="margin-left:8%; margin-top: 1em">In order to
provide as much consistency as possible for clients, some
public functions are virtualized. Eventually, it should be
possible for clients to open an archive or disk writer, and
then use a single set of code to select and write entries,
regardless of the target.</p>

<p style="margin-top: 1em" valign="top"><b>READ
ARCHITECTURE</b></p>

<p style="margin-left:8%;">From the outside, clients use
the archive_read(3) API to manipulate an <b>archive</b>
object to read entries and bodies from an archive stream.
Internally, the <b>archive</b> object is cast to an
<b>archive_read</b> object, which holds all read-specific
data. The API has four layers: The lowest layer is the I/O
layer. This layer can be overridden by clients, but most
clients use the packaged I/O callbacks provided, for
example, by archive_read_open_memory(3), and
archive_read_open_fd(3). The compression layer calls the I/O
layer to read bytes and decompresses them for the format
layer. The format layer unpacks a stream of uncompressed
bytes and creates <b>archive_entry</b> objects from the
incoming data. The API layer tracks overall state (for
example, it prevents clients from reading data before
reading a header) and invokes the format and compression
layer operations through registered function pointers. In
particular, the API layer drives the format-detection
process: When opening the archive, it reads an initial block
of data and offers it to each registered compression
handler. The one with the highest bid is initialized with
the first block. Similarly, the format handlers are polled
to see which handler is the best for each archive. (Prior to
2.4.0, the format bidders were invoked for each entry, but
this design hindered error recovery.)</p>

<p style="margin-left:8%; margin-top: 1em"><b>I/O Layer and
Client Callbacks</b> <br>
The read API goes to some lengths to be nice to clients. As
a result, there are few restrictions on the behavior of the
client callbacks.</p>

<p style="margin-left:8%; margin-top: 1em">The client read
callback is expected to provide a block of data on each
call. A zero-length return does indicate end of file, but
otherwise blocks may be as small as one byte or as large as
the entire file. In particular, blocks may be of different
sizes.</p>

<p style="margin-left:8%; margin-top: 1em">The client skip
callback returns the number of bytes actually skipped, which
may be much smaller than the skip requested. The only
requirement is that the skip not be larger. In particular,
clients are allowed to return zero for any skip that they
don&rsquo;t want to handle. The skip callback must never be
invoked with a negative value.</p>

<p style="margin-left:8%; margin-top: 1em">Keep in mind
that not all clients are reading from disk: clients reading
from networks may provide different-sized blocks on every
request and cannot skip at all; advanced clients may use
mmap(2) to read the entire file into memory at once and
return the entire file to libarchive as a single block;
other clients may begin asynchronous I/O operations for the
next block on each request.</p>


<p style="margin-left:8%; margin-top: 1em"><b>Decompresssion
Layer</b> <br>
The decompression layer not only handles decompression, it
also buffers data so that the format handlers see a much
nicer I/O model. The decompression API is a two stage
peek/consume model. A read_ahead request specifies a minimum
read amount; the decompression layer must provide a pointer
to at least that much data. If more data is immediately
available, it should return more: the format layer handles
bulk data reads by asking for a minimum of one byte and then
copying as much data as is available.</p>

<p style="margin-left:8%; margin-top: 1em">A subsequent
call to the <b>consume</b>() function advances the read
pointer. Note that data returned from a <b>read_ahead</b>()
call is guaranteed to remain in place until the next call to
<b>read_ahead</b>(). Intervening calls to <b>consume</b>()
should not cause the data to move.</p>

<p style="margin-left:8%; margin-top: 1em">Skip requests
must always be handled exactly. Decompression handlers that
cannot seek forward should not register a skip handler; the
API layer fills in a generic skip handler that reads and
discards data.</p>

<p style="margin-left:8%; margin-top: 1em">A decompression
handler has a specific lifecycle:</p>

<p valign="top">Registration/Configuration</p>

<p style="margin-left:20%;">When the client invokes the
public support function, the decompression handler invokes
the internal <b>__archive_read_register_compression</b>()
function to provide bid and initialization functions. This
function returns <b>NULL</b> on error or else a pointer to a
<b>struct decompressor_t</b>. This structure contains a
<i>void * config</i> slot that can be used for storing any
customization information.</p>

<p valign="top">Bid</p>

<p style="margin-left:20%; margin-top: 1em">The bid
function is invoked with a pointer and size of a block of
data. The decompressor can access its config data through
the <i>decompressor</i> element of the <b>archive_read</b>
object. The bid function is otherwise stateless. In
particular, it must not perform any I/O operations.</p>

<p style="margin-left:20%; margin-top: 1em">The value
returned by the bid function indicates its suitability for
handling this data stream. A bid of zero will ensure that
this decompressor is never invoked. Return zero if magic
number checks fail. Otherwise, your initial implementation
should return the number of bits actually checked. For
example, if you verify two full bytes and three bits of
another byte, bid 19. Note that the initial block may be
very short; be careful to only inspect the data you are
given. (The current decompressors require two bytes for
correct bidding.)</p>

<p valign="top">Initialize</p>

<p style="margin-left:20%;">The winning bidder will have
its init function called. This function should initialize
the remaining slots of the <i>struct decompressor_t</i>
object pointed to by the <i>decompressor</i> element of the
<i>archive_read</i> object. In particular, it should
allocate any working data it needs in the <i>data</i> slot
of that structure. The init function is called with the
block of data that was used for tasting. At this point, the
decompressor is responsible for all I/O requests to the
client callbacks. The decompressor is free to read more data
as and when necessary.</p>

<p valign="top">Satisfy I/O requests</p>

<p style="margin-left:20%;">The format handler will invoke
the <i>read_ahead</i>, <i>consume</i>, and <i>skip</i>
functions as needed.</p>

<p valign="top">Finish</p>

<p style="margin-left:20%; margin-top: 1em">The finish
method is called only once when the archive is closed. It
should release anything stored in the <i>data</i> and
<i>config</i> slots of the <i>decompressor</i> object. It
should not invoke the client close callback.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Format
Layer</b> <br>
The read formats have a similar lifecycle to the
decompression handlers:</p>

<p valign="top">Registration</p>

<p style="margin-left:20%;">Allocate your private data and
initialize your pointers.</p>

<p valign="top">Bid</p>

<p style="margin-left:20%; margin-top: 1em">Formats bid by
invoking the <b>read_ahead</b>() decompression method but
not calling the <b>consume</b>() method. This allows each
bidder to look ahead in the input stream. Bidders should not
look further ahead than necessary, as long look aheads put
pressure on the decompression layer to buffer lots of data.
Most formats only require a few hundred bytes of look ahead;
look aheads of a few kilobytes are reasonable. (The ISO9660
reader sometimes looks ahead by 48k, which should be
considered an upper limit.)</p>

<p valign="top">Read header</p>

<p style="margin-left:20%;">The header read is usually the
most complex part of any format. There are a few strategies
worth mentioning: For formats such as tar or cpio, reading
and parsing the header is straightforward since headers
alternate with data. For formats that store all header data
at the beginning of the file, the first header read request
may have to read all headers into memory and store that
data, sorted by the location of the file data. Subsequent
header read requests will skip forward to the beginning of
the file data and return the corresponding header.</p>

<p valign="top">Read Data</p>

<p style="margin-left:20%;">The read data interface
supports sparse files; this requires that each call return a
block of data specifying the file offset and size. This may
require you to carefully track the location so that you can
return accurate file offsets for each read. Remember that
the decompressor will return as much data as it has.
Generally, you will want to request one byte, examine the
return value to see how much data is available, and possibly
trim that to the amount you can use. You should invoke
consume for each block just before you return it.</p>

<p valign="top">Skip All Data</p>

<p style="margin-left:20%;">The skip data call should skip
over all file data and trailing padding. This is called
automatically by the API layer just before each header read.
It is also called in response to the client calling the
public <b>data_skip</b>() function.</p>

<p valign="top">Cleanup</p>

<p style="margin-left:20%;">On cleanup, the format should
release all of its allocated memory.</p>

<p style="margin-left:8%; margin-top: 1em"><b>API Layer</b>
<br>
XXX to do XXX</p>

<p style="margin-top: 1em" valign="top"><b>WRITE
ARCHITECTURE</b></p>

<p style="margin-left:8%;">The write API has a similar set
of four layers: an API layer, a format layer, a compression
layer, and an I/O layer. The registration here is much
simpler because only one format and one compression can be
registered at a time.</p>

<p style="margin-left:8%; margin-top: 1em"><b>I/O Layer and
Client Callbacks</b> <br>
XXX To be written XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>Compression
Layer</b> <br>
XXX To be written XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>Format
Layer</b> <br>
XXX To be written XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>API Layer</b>
<br>
XXX To be written XXX</p>

<p style="margin-top: 1em" valign="top"><b>WRITE_DISK
ARCHITECTURE</b></p>

<p style="margin-left:8%;">The write_disk API is intended
to look just like the write API to clients. Since it does
not handle multiple formats or compression, it is not
layered internally.</p>

<p style="margin-top: 1em" valign="top"><b>GENERAL
SERVICES</b></p>

<p style="margin-left:8%;">The <b>archive_read</b>,
<b>archive_write</b>, and <b>archive_write_disk</b> objects
all contain an initial <b>archive</b> object which provides
common support for a set of standard services. (Recall that
ANSI/ISO C90 guarantees that you can cast freely between a
pointer to a structure and a pointer to the first element of
that structure.) The <b>archive</b> object has a magic value
that indicates which API this object is associated with,
slots for storing error information, and function pointers
for virtualized API functions.</p>

<p style="margin-top: 1em" valign="top"><b>MISCELLANEOUS
NOTES</b></p>

<p style="margin-left:8%;">Connecting existing archiving
libraries into libarchive is generally quite difficult. In
particular, many existing libraries strongly assume that you
are reading from a file; they seek forwards and backwards as
necessary to locate various pieces of information. In
contrast, libarchive never seeks backwards in its input,
which sometimes requires very different approaches.</p>

<p style="margin-left:8%; margin-top: 1em">For example,
libarchive&rsquo;s ISO9660 support operates very differently
from most ISO9660 readers. The libarchive support utilizes a
work-queue design that keeps a list of known entries sorted
by their location in the input. Whenever libarchive&rsquo;s
ISO9660 implementation is asked for the next header, checks
this list to find the next item on the disk. Directories are
parsed when they are encountered and new items are added to
the list. This design relies heavily on the ISO9660 image
being optimized so that directories always occur earlier on
the disk than the files they describe.</p>

<p style="margin-left:8%; margin-top: 1em">Depending on the
specific format, such approaches may not be possible. The
ZIP format specification, for example, allows archivers to
store key information only at the end of the file. In
theory, it is possible to create ZIP archives that cannot be
read without seeking. Fortunately, such archives are very
rare, and libarchive can read most ZIP archives, though it
cannot always extract as much information as a dedicated ZIP
program.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive(3), archive_entry(3),
archive_read(3), archive_write(3), archive_write_disk(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@acm.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">FreeBSD&nbsp;8.0 April&nbsp;16,
2007 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:37 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">MTREE(5) FreeBSD File Formats Manual
MTREE(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>mtree</b> &mdash; format of
mtree dir hierarchy files</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>mtree</b> format is a
textual format that describes a collection of filesystem
objects. Such files are typically used to create or verify
directory hierarchies.</p>

<p style="margin-left:8%; margin-top: 1em"><b>General
Format</b> <br>
An <b>mtree</b> file consists of a series of lines, each
providing information about a single filesystem object.
Leading whitespace is always ignored.</p>

<p style="margin-left:8%; margin-top: 1em">When encoding
file or pathnames, any backslash character or character
outside of the 95 printable ASCII characters must be encoded
as a a backslash followed by three octal digits. When
reading mtree files, any appearance of a backslash followed
by three octal digits should be converted into the
corresponding character.</p>

<p style="margin-left:8%; margin-top: 1em">Each line is
interpreted independently as one of the following types:</p>

<p style="margin-top: 1em" valign="top">Signature</p>

<p style="margin-left:26%; margin-top: 1em">The first line
of any mtree file must begin with
&lsquo;&lsquo;#mtree&rsquo;&rsquo;. If a file contains any
full path entries, the first line should begin with
&lsquo;&lsquo;#mtree v2.0&rsquo;&rsquo;, otherwise, the
first line should begin with &lsquo;&lsquo;#mtree
v1.0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em" valign="top">Blank</p>

<p style="margin-left:26%; margin-top: 1em">Blank lines are
ignored.</p>

<p style="margin-top: 1em" valign="top">Comment</p>

<p style="margin-left:26%; margin-top: 1em">Lines beginning
with <b>#</b> are ignored.</p>

<p style="margin-top: 1em" valign="top">Special</p>

<p style="margin-left:26%; margin-top: 1em">Lines beginning
with <b>/</b> are special commands that influence the
interpretation of later lines.</p>

<p style="margin-top: 1em" valign="top">Relative</p>

<p style="margin-left:26%; margin-top: 1em">If the first
whitespace-delimited word has no <b>/</b> characters, it is
the name of a file in the current directory. Any relative
entry that describes a directory changes the current
directory.</p>

<p style="margin-top: 1em" valign="top">dot-dot</p>

<p style="margin-left:26%; margin-top: 1em">As a special
case, a relative entry with the filename <i>..</i> changes
the current directory to the parent directory. Options on
dot-dot entries are always ignored.</p>

<p style="margin-top: 1em" valign="top">Full</p>

<p style="margin-left:26%; margin-top: 1em">If the first
whitespace-delimited word has a <b>/</b> character after the
first character, it is the pathname of a file relative to
the starting directory. There can be multiple full entries
describing the same file.</p>

<p style="margin-left:8%; margin-top: 1em">Some tools that
process <b>mtree</b> files may require that multiple lines
describing the same file occur consecutively. It is not
permitted for the same file to be mentioned using both a
relative and a full file specification.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Special
commands</b> <br>
Two special commands are currently defined:</p>

<p style="margin-top: 1em" valign="top"><b>/set</b></p>

<p style="margin-left:26%; margin-top: 1em">This command
defines default values for one or more keywords. It is
followed on the same line by one or more
whitespace-separated keyword definitions. These definitions
apply to all following files that do not specify a value for
that keyword.</p>

<p style="margin-top: 1em" valign="top"><b>/unset</b></p>

<p style="margin-left:26%; margin-top: 1em">This command
removes any default value set by a previous <b>/set</b>
command. It is followed on the same line by one or more
keywords separated by whitespace.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Keywords</b>
<br>
After the filename, a full or relative entry consists of
zero or more whitespace-separated keyword definitions. Each
such definition consists of a key from the following list
immediately followed by an &rsquo;=&rsquo; sign and a value.
Software programs reading mtree files should warn about
unrecognized keywords.</p>

<p style="margin-left:8%; margin-top: 1em">Currently
supported keywords are as follows:</p>

<p style="margin-top: 1em" valign="top"><b>cksum</b></p>

<p style="margin-left:26%; margin-top: 1em">The checksum of
the file using the default algorithm specified by the
cksum(1) utility.</p>


<p style="margin-top: 1em" valign="top"><b>contents</b></p>

<p style="margin-left:26%; margin-top: 1em">The full
pathname of a file that holds the contents of this file.</p>

<p style="margin-top: 1em" valign="top"><b>flags</b></p>

<p style="margin-left:26%; margin-top: 1em">The file flags
as a symbolic name. See chflags(1) for information on these
names. If no flags are to be set the string
&lsquo;&lsquo;none&rsquo;&rsquo; may be used to override the
current default.</p>

<p style="margin-top: 1em" valign="top"><b>gid</b></p>

<p style="margin-left:26%; margin-top: 1em">The file group
as a numeric value.</p>

<p style="margin-top: 1em" valign="top"><b>gname</b></p>

<p style="margin-left:26%; margin-top: 1em">The file group
as a symbolic name.</p>

<p style="margin-top: 1em" valign="top"><b>ignore</b></p>

<p style="margin-left:26%; margin-top: 1em">Ignore any file
hierarchy below this file.</p>

<p style="margin-top: 1em" valign="top"><b>link</b></p>

<p style="margin-left:26%; margin-top: 1em">The target of
the symbolic link when type=link.</p>

<p style="margin-top: 1em" valign="top"><b>md5</b></p>

<p style="margin-left:26%; margin-top: 1em">The MD5 message
digest of the file.</p>


<p style="margin-top: 1em" valign="top"><b>md5digest</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>md5</b>.</p>

<p style="margin-top: 1em" valign="top"><b>mode</b></p>

<p style="margin-left:26%; margin-top: 1em">The current
file&rsquo;s permissions as a numeric (octal) or symbolic
value.</p>

<p style="margin-top: 1em" valign="top"><b>nlink</b></p>

<p style="margin-left:26%; margin-top: 1em">The number of
hard links the file is expected to have.</p>


<p style="margin-top: 1em" valign="top"><b>nochange</b></p>

<p style="margin-left:26%; margin-top: 1em">Make sure this
file or directory exists but otherwise ignore all
attributes.</p>


<p style="margin-top: 1em" valign="top"><b>ripemd160digest</b></p>

<p style="margin-left:26%;">The RIPEMD160 message digest of
the file.</p>

<p style="margin-top: 1em" valign="top"><b>rmd160</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>ripemd160digest</b>.</p>


<p style="margin-top: 1em" valign="top"><b>rmd160digest</b></p>

<p style="margin-left:26%;">A synonym for
<b>ripemd160digest</b>.</p>

<p style="margin-top: 1em" valign="top"><b>sha1</b></p>

<p style="margin-left:26%; margin-top: 1em">The FIPS 160-1
(&lsquo;&lsquo;SHA-1&rsquo;&rsquo;) message digest of the
file.</p>


<p style="margin-top: 1em" valign="top"><b>sha1digest</b></p>

<p style="margin-left:26%; margin-top: 1em">A synonym for
<b>sha1</b>.</p>

<p style="margin-top: 1em" valign="top"><b>sha256</b></p>

<p style="margin-left:26%; margin-top: 1em">The FIPS 180-2
(&lsquo;&lsquo;SHA-256&rsquo;&rsquo;) message digest of the
file.</p>


<p style="margin-top: 1em" valign="top"><b>sha256digest</b></p>

<p style="margin-left:26%;">A synonym for
<b>sha256</b>.</p>

<p style="margin-top: 1em" valign="top"><b>size</b></p>

<p style="margin-left:26%; margin-top: 1em">The size, in
bytes, of the file.</p>

<p style="margin-top: 1em" valign="top"><b>time</b></p>

<p style="margin-left:26%; margin-top: 1em">The last
modification time of the file.</p>

<p style="margin-top: 1em" valign="top"><b>type</b></p>

<p style="margin-left:26%; margin-top: 1em">The type of the
file; may be set to any one of the following:</p>

<p style="margin-top: 1em" valign="top"><b>block</b></p>

<p style="margin-left:45%; margin-top: 1em">block special
device</p>

<p valign="top"><b>char</b></p>

<p style="margin-left:45%; margin-top: 1em">character
special device</p>

<p valign="top"><b>dir</b></p>

<p style="margin-left:45%; margin-top: 1em">directory</p>

<p valign="top"><b>fifo</b></p>

<p style="margin-left:45%; margin-top: 1em">fifo</p>

<p valign="top"><b>file</b></p>

<p style="margin-left:45%; margin-top: 1em">regular
file</p>

<p valign="top"><b>link</b></p>

<p style="margin-left:45%; margin-top: 1em">symbolic
link</p>

<p valign="top"><b>socket</b></p>

<p style="margin-left:45%; margin-top: 1em">socket</p>

<p style="margin-top: 1em" valign="top"><b>uid</b></p>

<p style="margin-left:26%; margin-top: 1em">The file owner
as a numeric value.</p>

<p style="margin-top: 1em" valign="top"><b>uname</b></p>

<p style="margin-left:26%; margin-top: 1em">The file owner
as a symbolic name.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">cksum(1), find(1), mtree(8)</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The FreeBSD implementation of
mtree does not currently support the <b>mtree</b> 2.0
format. The requirement for a
&lsquo;&lsquo;#mtree&rsquo;&rsquo; signature line is new and
not yet widely implemented.</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>mtree</b> utility
appeared in 4.3BSD&minus;Reno. The MD5 digest capability was
added in FreeBSD&nbsp;2.1, in response to the widespread use
of programs which can spoof cksum(1). The SHA-1 and
RIPEMD160 digests were added in FreeBSD&nbsp;4.0, as new
attacks have demonstrated weaknesses in MD5. The SHA-256
digest was added in FreeBSD&nbsp;6.0. Support for file flags
was added in FreeBSD&nbsp;4.0, and mostly comes from NetBSD.
The &lsquo;&lsquo;full&rsquo;&rsquo; entry format was added
by NetBSD.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
August&nbsp;20, 2007 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/tar.5.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:38 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">tar(5) FreeBSD File Formats Manual
tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>tar</b> &mdash; format of
tape archive files</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>tar</b> archive format
collects any number of files, directories, and other file
system objects (symbolic links, device nodes, etc.) into a
single stream of bytes. The format was originally designed
to be used with tape drives that operate with fixed-size
blocks, but is widely used as a general packaging
mechanism.</p>

<p style="margin-left:8%; margin-top: 1em"><b>General
Format</b> <br>
A <b>tar</b> archive consists of a series of 512-byte
records. Each file system object requires a header record
which stores basic metadata (pathname, owner, permissions,
etc.) and zero or more records containing any file data. The
end of the archive is indicated by two records consisting
entirely of zero bytes.</p>

<p style="margin-left:8%; margin-top: 1em">For
compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a
fixed number of records with each I/O operation. These
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
implementations was 10240 bytes or 20 records. This is still
the default for most implementations although block sizes of
1MiB (2048 records) or larger are commonly used with modern
high-speed tape drives. (Note: the terms
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>

<p style="margin-left:8%; margin-top: 1em"><b>Old-Style
Archive Format</b> <br>
The original tar archive format has been extended many times
to include additional information that various implementors
found necessary. This section describes the variant
implemented by the tar command included in Version&nbsp;7
AT&amp;T UNIX, which seems to be the earliest widely-used
version of the tar program.</p>

<p style="margin-left:8%; margin-top: 1em">The header
record for an old-style <b>tar</b> archive consists of the
following:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_old_tar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkflag[1];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[255];</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-left:8%;">All unused bytes in the header
record are filled with nulls.</p>

<p style="margin-top: 1em" valign="top"><i>name</i></p>

<p style="margin-left:20%; margin-top: 1em">Pathname,
stored as a null-terminated string. Early tar
implementations only stored regular files (including
hardlinks to those files). One common early convention used
a trailing &quot;/&quot; character to indicate a directory
name, allowing directory permissions and owner information
to be archived and restored.</p>

<p style="margin-top: 1em" valign="top"><i>mode</i></p>

<p style="margin-left:20%; margin-top: 1em">File mode,
stored as an octal number in ASCII.</p>

<p style="margin-top: 1em" valign="top"><i>uid</i>,
<i>gid</i></p>

<p style="margin-left:20%;">User id and group id of owner,
as octal numbers in ASCII.</p>

<p style="margin-top: 1em" valign="top"><i>size</i></p>

<p style="margin-left:20%; margin-top: 1em">Size of file,
as octal number in ASCII. For regular files only, this
indicates the amount of data that follows the header. In
particular, this field was ignored by early tar
implementations when extracting hardlinks. Modern writers
should always store a zero length for hardlink entries.</p>

<p style="margin-top: 1em" valign="top"><i>mtime</i></p>

<p style="margin-left:20%; margin-top: 1em">Modification
time of file, as an octal number in ASCII. This indicates
the number of seconds since the start of the epoch, 00:00:00
UTC January 1, 1970. Note that negative values should be
avoided here, as they are handled inconsistently.</p>


<p style="margin-top: 1em" valign="top"><i>checksum</i></p>

<p style="margin-left:20%;">Header checksum, stored as an
octal number in ASCII. To compute the checksum, set the
checksum field to all spaces, then sum all bytes in the
header using unsigned arithmetic. This field should be
stored as six octal digits followed by a null and a space
character. Note that many early implementations of tar used
signed arithmetic for the checksum field, which can cause
interoperability problems when transferring archives between
systems. Modern robust readers compute the checksum both
ways and accept the header if either computation
matches.</p>

<p style="margin-top: 1em" valign="top"><i>linkflag</i>,
<i>linkname</i></p>

<p style="margin-left:20%;">In order to preserve hardlinks
and conserve tape, a file with multiple links is only
written to the archive the first time it is encountered. The
next time it is encountered, the <i>linkflag</i> is set to
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
the first name under which this file appears. (Note that
regular files have a null value in the <i>linkflag</i>
field.)</p>

<p style="margin-left:8%; margin-top: 1em">Early tar
implementations varied in how they terminated these fields.
The tar command in Version&nbsp;7 AT&amp;T UNIX used the
following conventions (this is also documented in early BSD
manpages): the pathname must be null-terminated; the mode,
uid, and gid fields must end in a space and a null byte; the
size and mtime fields must end in a space; the checksum is
terminated by a null and a space. Early implementations
filled the numeric fields with leading spaces. This seems to
have been common practice until the IEEE Std 1003.1-1988
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Pre-POSIX
Archives</b> <br>
An early draft of IEEE Std 1003.1-1988
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
described below with the following variations:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The magic value is
&lsquo;&lsquo;ustar&nbsp;&rsquo;&rsquo; (note the following
space). The version field contains a space character
followed by a null.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The numeric fields are
generally filled with leading spaces (not leading zeros as
recommended in the final standard).</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The prefix field is often not
used, limiting pathnames to the 100 characters of old-style
archives.</p>

<p style="margin-left:8%; margin-top: 1em"><b>POSIX ustar
Archives</b> <br>
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_posix_ustar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char typeflag[1];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char magic[6];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char version[2];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uname[32];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gname[32];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devmajor[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devminor[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char prefix[155];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[12];</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">};</p>


<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">Type of entry. POSIX extended
the earlier <i>linkflag</i> field with several new type
values:</p>

<p valign="top">&lsquo;&lsquo;0&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Regular file.
NUL should be treated as a synonym, for compatibility
purposes.</p>

<p valign="top">&lsquo;&lsquo;1&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Hard link.</p>

<p valign="top">&lsquo;&lsquo;2&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Symbolic
link.</p>

<p valign="top">&lsquo;&lsquo;3&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Character
device node.</p>

<p valign="top">&lsquo;&lsquo;4&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Block device
node.</p>

<p valign="top">&lsquo;&lsquo;5&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Directory.</p>

<p valign="top">&lsquo;&lsquo;6&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">FIFO node.</p>

<p valign="top">&lsquo;&lsquo;7&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Reserved.</p>

<p valign="top">Other</p>

<p style="margin-left:32%; margin-top: 1em">A
POSIX-compliant implementation must treat any unrecognized
typeflag value as a regular file. In particular, writers
should ensure that all entries have a valid filename so that
they can be restored by readers that do not support the
corresponding extension. Uppercase letters &quot;A&quot;
through &quot;Z&quot; are reserved for custom extensions.
Note that sockets and whiteout entries are not
archivable.</p>

<p style="margin-left:20%;">It is worth noting that the
<i>size</i> field, in particular, has different meanings
depending on the type. For regular files, of course, it
indicates the amount of data following the header. For
directories, it may be used to indicate the total size of
all files in the directory, for use by operating systems
that pre-allocate directory space. For all other types, it
should be set to zero by writers and ignored by readers.</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">Contains the
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>

<p style="margin-top: 1em" valign="top"><i>version</i></p>

<p style="margin-left:20%;">Version. This should be
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>

<p style="margin-top: 1em" valign="top"><i>uname</i>,
<i>gname</i></p>

<p style="margin-left:20%;">User and group names, as
null-terminated ASCII strings. These should be used in
preference to the uid/gid values when they are set and the
corresponding names exist on the system.</p>

<p style="margin-top: 1em" valign="top"><i>devmajor</i>,
<i>devminor</i></p>

<p style="margin-left:20%;">Major and minor numbers for
character device or block device entry.</p>

<p style="margin-top: 1em" valign="top"><i>name</i>,
<i>prefix</i></p>

<p style="margin-left:20%;">If the pathname is too long to
fit in the 100 bytes provided by the standard format, it can
be split at any <i>/</i> character with the first portion
going into the prefix field. If the prefix field is not
empty, the reader will prepend the prefix value and a
<i>/</i> character to the regular name field to obtain the
full pathname. The standard does not require a trailing
<i>/</i> character on directory names, though most
implementations still include this for compatibility
reasons.</p>

<p style="margin-left:8%; margin-top: 1em">Note that all
unused bytes must be set to NUL.</p>

<p style="margin-left:8%; margin-top: 1em">Field
termination is specified slightly differently by POSIX than
by previous implementations. The <i>magic</i>, <i>uname</i>,
and <i>gname</i> fields must have a trailing NUL. The
<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields
must have a trailing NUL unless they fill the entire field.
(In particular, it is possible to store a 256-character
pathname if it happens to have a <i>/</i> as the 156th
character.) POSIX requires numeric fields to be zero-padded
in the front, and requires them to be terminated with either
space or NUL characters.</p>

<p style="margin-left:8%; margin-top: 1em">Currently, most
tar implementations comply with the ustar format,
occasionally extending it by adding new fields to the blank
area at the end of the header record.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Pax
Interchange Format</b> <br>
There are many attributes that cannot be portably stored in
a POSIX ustar archive. IEEE Std 1003.1-2001
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>

<p style="margin-left:8%; margin-top: 1em">An entry in a
pax interchange format archive consists of one or two
standard ustar entries, each with its own header and data.
The first optional entry stores the extended attributes for
the following entry. This optional first entry has an
&quot;x&quot; typeflag and a size field that indicates the
total size of the extended attributes. The extended
attributes themselves are stored as a series of text-format
lines encoded in the portable UTF-8 encoding. Each line
consists of a decimal number, a space, a key string, an
equals sign, a value string, and a new line. The decimal
number indicates the length of the entire line, including
the initial length field and the trailing newline. An
example of such a field is:</p>

<p style="margin-left:17%;">25 ctime=1084839148.1212\n</p>

<p style="margin-left:8%;">Keys in all lowercase are
standard keys. Vendors can add their own keys by prefixing
them with an all uppercase vendor name and a period. Note
that, unlike the historic header, numeric values are stored
using decimal, not octal. A description of some common keys
follows:</p>

<p style="margin-top: 1em" valign="top"><b>atime</b>,
<b>ctime</b>, <b>mtime</b></p>

<p style="margin-left:20%;">File access, inode change, and
modification times. These fields can be negative or include
a decimal point and a fractional value.</p>

<p style="margin-top: 1em" valign="top"><b>uname</b>,
<b>uid</b>, <b>gname</b>, <b>gid</b></p>

<p style="margin-left:20%;">User name, group name, and
numeric UID and GID values. The user name and group name
stored here are encoded in UTF8 and can thus include
non-ASCII characters. The UID and GID fields can be of
arbitrary length.</p>


<p style="margin-top: 1em" valign="top"><b>linkpath</b></p>

<p style="margin-left:20%;">The full path of the linked-to
file. Note that this is encoded in UTF8 and can thus include
non-ASCII characters.</p>

<p style="margin-top: 1em" valign="top"><b>path</b></p>

<p style="margin-left:20%; margin-top: 1em">The full
pathname of the entry. Note that this is encoded in UTF8 and
can thus include non-ASCII characters.</p>

<p style="margin-top: 1em" valign="top"><b>realtime.*</b>,
<b>security.*</b></p>

<p style="margin-left:20%;">These keys are reserved and may
be used for future standardization.</p>

<p style="margin-top: 1em" valign="top"><b>size</b></p>

<p style="margin-left:20%; margin-top: 1em">The size of the
file. Note that there is no length limit on this field,
allowing conforming archives to store files much larger than
the historic 8GB limit.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.*</b></p>

<p style="margin-left:20%;">Vendor-specific attributes used
by Joerg Schilling&rsquo;s <b>star</b> implementation.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.acl.access</b>,
<b>SCHILY.acl.default</b></p>

<p style="margin-left:20%;">Stores the access and default
ACLs as textual strings in a format that is an extension of
the format specified by POSIX.1e draft 17. In particular,
each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID. This
allows ACLs to be restored on systems that may not have
complete user or group information available (such as when
NIS/YP or LDAP services are temporarily unavailable).</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.devminor</b>,
<b>SCHILY.devmajor</b></p>

<p style="margin-left:20%;">The full minor and major
numbers for device nodes.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.fflags</b></p>

<p style="margin-left:20%;">The file flags.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.realsize</b></p>

<p style="margin-left:20%;">The full size of the file on
disk. XXX explain? XXX</p>

<p style="margin-top: 1em" valign="top"><b>SCHILY.dev,
SCHILY.ino</b>, <b>SCHILY.nlinks</b></p>

<p style="margin-left:20%;">The device number, inode
number, and link count for the entry. In particular, note
that a pax interchange format archive using Joerg
Schilling&rsquo;s <b>SCHILY.*</b> extensions can store all
of the data from <i>struct stat</i>.</p>


<p style="margin-top: 1em" valign="top"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p>

<p style="margin-left:20%;">Libarchive stores
POSIX.1e-style extended attributes using keys of this form.
The <i>key</i> value is URL-encoded: All non-ASCII
characters and the two special characters
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>


<p style="margin-top: 1em" valign="top"><b>VENDOR.*</b></p>

<p style="margin-left:20%;">XXX document other
vendor-specific extensions XXX</p>

<p style="margin-left:8%; margin-top: 1em">Any values
stored in an extended attribute override the corresponding
values in the regular tar header. Note that compliant
readers should ignore the regular fields when they are
overridden. This is important, as existing archivers are
known to store non-compliant values in the standard header
fields in this situation. There are no limits on length for
any of these fields. In particular, numeric fields can be
arbitrarily large. All text fields are encoded in UTF8.
Compliant writers should store only portable 7-bit ASCII
characters in the standard ustar header and use extended
attributes whenever a text value contains non-ASCII
characters.</p>

<p style="margin-left:8%; margin-top: 1em">In addition to
the <b>x</b> entry described above, the pax interchange
format also supports a <b>g</b> entry. The <b>g</b> entry is
identical in format, but specifies attributes that serve as
defaults for all subsequent archive entries. The <b>g</b>
entry is not widely used.</p>

<p style="margin-left:8%; margin-top: 1em">Besides the new
<b>x</b> and <b>g</b> entries, the pax interchange format
has a few other minor variations from the earlier ustar
format. The most troubling one is that hardlinks are
permitted to have data following them. This allows readers
to restore any hardlink to a file without having to rewind
the archive to find an earlier entry. However, it creates
complications for robust readers, as it is no longer clear
whether or not they should ignore the size field for
hardlink entries.</p>

<p style="margin-left:8%; margin-top: 1em"><b>GNU Tar
Archives</b> <br>
The GNU tar program started with a pre-POSIX format similar
to that described earlier and has extended it using several
different mechanisms: It added new fields to the empty space
in the header (some of which was later used by POSIX for
conflicting purposes); it allowed the header to be continued
over multiple records; and it defined new entries that
modify following entries (similar in principle to the
<b>x</b> entry described above, but each GNU special entry
is single-purpose, unlike the general-purpose <b>x</b>
entry). As a result, GNU tar archives are not POSIX
compatible, although more lenient POSIX-compliant readers
can successfully extract most GNU tar archives.</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_gnu_tar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char typeflag[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char magic[6];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char version[2];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devmajor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devminor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char atime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char ctime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char offset[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char longnames[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char unused[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">
</td>
<td width="12%">


<p valign="top">char offset[12];</p></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">
</td>
<td width="12%">


<p valign="top">char numbytes[12];</p></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">} sparse[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char realsize[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[17];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
</table>

<p style="margin-left:17%;">};</p>


<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">GNU tar uses the following
special entry types, in addition to those defined by
POSIX:</p>

<p style="margin-top: 1em" valign="top">7</p>

<p style="margin-left:32%; margin-top: 1em">GNU tar treats
type &quot;7&quot; records identically to type &quot;0&quot;
records, except on one obscure RTOS where they are used to
indicate the pre-allocation of a contiguous file on
disk.</p>

<p style="margin-top: 1em" valign="top">D</p>

<p style="margin-left:32%; margin-top: 1em">This indicates
a directory entry. Unlike the POSIX-standard &quot;5&quot;
typeflag, the header is followed by data records listing the
names of files in this directory. Each name is preceded by
an ASCII &quot;Y&quot; if the file is stored in this archive
or &quot;N&quot; if the file is not stored in this archive.
Each name is terminated with a null, and an extra null marks
the end of the name list. The purpose of this entry is to
support incremental backups; a program restoring from such
an archive may wish to delete files on disk that did not
exist in the directory when the archive was made.</p>

<p style="margin-left:32%; margin-top: 1em">Note that the
&quot;D&quot; typeflag specifically violates POSIX, which
requires that unrecognized typeflags be restored as normal
files. In this case, restoring the &quot;D&quot; entry as a
file could interfere with subsequent creation of the
like-named directory.</p>

<p style="margin-top: 1em" valign="top">K</p>

<p style="margin-left:32%; margin-top: 1em">The data for
this entry is a long linkname for the following regular
entry.</p>

<p style="margin-top: 1em" valign="top">L</p>

<p style="margin-left:32%; margin-top: 1em">The data for
this entry is a long pathname for the following regular
entry.</p>

<p style="margin-top: 1em" valign="top">M</p>

<p style="margin-left:32%; margin-top: 1em">This is a
continuation of the last file on the previous volume. GNU
multi-volume archives guarantee that each volume begins with
a valid entry header. To ensure this, a file may be split,
with part stored at the end of one volume, and part stored
at the beginning of the next volume. The &quot;M&quot;
typeflag indicates that this entry continues an existing
file. Such entries can only occur as the first or second
entry in an archive (the latter only if the first entry is a
volume label). The <i>size</i> field specifies the size of
this entry. The <i>offset</i> field at bytes 369-380
specifies the offset where this file fragment begins. The
<i>realsize</i> field specifies the total size of the file
(which must equal <i>size</i> plus <i>offset</i>). When
extracting, GNU tar checks that the header file name is the
one it is expecting, that the header offset is in the
correct sequence, and that the sum of offset and size is
equal to realsize.</p>

<p style="margin-top: 1em" valign="top">N</p>

<p style="margin-left:32%; margin-top: 1em">Type
&quot;N&quot; records are no longer generated by GNU tar.
They contained a list of files to be renamed or symlinked
after extraction; this was originally used to support long
names. The contents of this record are a text description of
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
archives.</p>

<p style="margin-top: 1em" valign="top">S</p>

<p style="margin-left:32%; margin-top: 1em">This is a
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>

<p style="margin-top: 1em" valign="top">V</p>

<p style="margin-left:32%; margin-top: 1em">The <i>name</i>
field should be interpreted as a tape/volume header name.
This entry should generally be ignored on extraction.</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">The magic field
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>

<p style="margin-top: 1em" valign="top"><i>version</i></p>

<p style="margin-left:20%;">The version field holds a space
character followed by a null. Note that POSIX ustar archives
use two copies of the ASCII digit
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em" valign="top"><i>atime</i>,
<i>ctime</i></p>

<p style="margin-left:20%;">The time the file was last
accessed and the time of last change of file information,
stored in octal as with <i>mtime</i>.</p>


<p style="margin-top: 1em" valign="top"><i>longnames</i></p>

<p style="margin-left:20%;">This field is apparently no
longer used.</p>

<p style="margin-top: 1em" valign="top">Sparse <i>offset /
numbytes</i></p>

<p style="margin-left:20%;">Each such structure specifies a
single fragment of a sparse file. The two fields store
values as octal numbers. The fragments are each padded to a
multiple of 512 bytes in the archive. On extraction, the
list of fragments is collected from the header (including
any extension headers), and the data is then read and
written to the file at appropriate offsets.</p>


<p style="margin-top: 1em" valign="top"><i>isextended</i></p>

<p style="margin-left:20%;">If this is set to non-zero, the
header will be followed by additional &lsquo;&lsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>

<p style="margin-left:29%; margin-top: 1em">struct
gnu_sparse_header {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">
</td>
<td width="12%">


<p valign="top">char offset[12];</p></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">
</td>
<td width="12%">


<p valign="top">char numbytes[12];</p></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">} sparse[21];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">char padding[7];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
</table>

<p style="margin-left:29%;">};</p>


<p style="margin-top: 1em" valign="top"><i>realsize</i></p>

<p style="margin-left:20%;">A binary representation of the
file&rsquo;s complete size, with a much larger range than
the POSIX file size. In particular, with <b>M</b> type
files, the current entry is only a portion of the file. In
that case, the POSIX size field will indicate the size of
this entry; the <i>realsize</i> field will indicate the
total size of the file.</p>

<p style="margin-left:8%; margin-top: 1em"><b>GNU tar pax
archives</b> <br>
GNU tar 1.14 (XXX check this XXX) and later will write pax
interchange format archives when you specify the
<b>&minus;-posix</b> flag. This format uses custom keywords
to store sparse file information. There have been three
iterations of this support, referred to as
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.numblocks</b>,
<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>,
<b>GNU.sparse.size</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
size of each block, and a single <b>GNU.sparse.size</b> to
indicate the full size of the file. This is not the same as
the size in the tar header because the latter value does not
include the size of any holes. This format required that the
order of attributes be preserved and relied on readers
accepting multiple appearances of the same attribute names,
which is not officially permitted by the standards.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.map</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
the archive is extracted by an archiver that does not
recognize this extension, since many pax implementations
simply discard unrecognized attributes.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.major</b>,
<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>,
<b>GNU.sparse.realsize</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
<b>GNU.sparse.minor</b> fields) and the full size of the
file. The <b>GNU.sparse.name</b> holds the true name of the
file. To avoid confusion, the name stored in the regular tar
header is a modified name so that extraction errors will be
apparent to users.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Solaris
Tar</b> <br>
XXX More Details Needed XXX</p>

<p style="margin-left:8%; margin-top: 1em">Solaris tar
(beginning with SunOS XXX 5.7 ?? XXX) supports an
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">Extended attributes are stored
in an entry whose type is <b>X</b>, not <b>x</b>, as used by
pax interchange format. The detailed format of this entry
appears to be the same as detailed above for the <b>x</b>
entry.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">An additional <b>A</b> entry is
used to store an ACL for the following regular entry. The
body of this entry contains a seven-digit octal number
followed by a zero byte, followed by the textual ACL
description. The octal value is the number of ACL entries
plus a constant that indicates the ACL type: 01000000 for
POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p>

<p style="margin-left:8%; margin-top: 1em"><b>AIX Tar</b>
<br>
XXX More details needed XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>Mac OS X
Tar</b> <br>
The tar distributed with Apple&rsquo;s Mac OS X stores most
regular files as two separate entries in the tar archive.
The two entries have the same name except that the first one
has &lsquo;&lsquo;._&rsquo;&rsquo; added to the beginning of
the name. This first entry stores the &lsquo;&lsquo;resource
fork&rsquo;&rsquo; with additional attributes for the file.
The Mac OS X <b>CopyFile</b>() API is used to separate a
file on disk into separate resource and data streams and to
reassemble those separate streams when the file is restored
to disk.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Other
Extensions</b> <br>
One obvious extension to increase the size of files is to
eliminate the terminating characters from the various
numeric fields. For example, the standard only allows the
size field to contain 11 octal digits, reserving the twelfth
byte for a trailing NUL character. Allowing 12 octal digits
allows file sizes up to 64 GB.</p>

<p style="margin-left:8%; margin-top: 1em">Another
extension, utilized by GNU tar, star, and other newer
<b>tar</b> implementations, permits binary numbers in the
standard numeric fields. This is flagged by setting the high
bit of the first byte. This permits 95-bit values for the
length and time fields and 63-bit values for the uid, gid,
and device numbers. GNU tar supports this extension for the
length, mtime, ctime, and atime fields. Joerg
Schilling&rsquo;s star program supports this extension for
all numeric fields. Note that this extension is largely
obsoleted by the extended attribute record provided by the
pax interchange format.</p>

<p style="margin-left:8%; margin-top: 1em">Another early
GNU extension allowed base-64 values rather than octal. This
extension was short-lived and is no longer supported by any
implementation.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">ar(1), pax(1), tar(1)</p>


<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>

<p style="margin-left:8%;">The <b>tar</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">A <b>tar</b> command appeared in
Seventh Edition Unix, which was released in January, 1979.
It replaced the <b>tp</b> program from Fourth Edition Unix
which in turn replaced the <b>tap</b> program from First
Edition Unix. John Gilmore&rsquo;s <b>pdtar</b>
public-domain implementation (circa 1987) was highly
influential and formed the basis of <b>GNU tar</b> (circa
1988). Joerg Shilling&rsquo;s <b>star</b> archiver is
another open-source (GPL) archiver (originally developed
circa 1985) which features complete support for pax
interchange format.</p>

<p style="margin-left:8%; margin-top: 1em">This
documentation was written as part of the <b>libarchive</b>
and <b>bsdtar</b> project by Tim Kientzle
&lang;kientzle@FreeBSD.org&rang;.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
December&nbsp;27, 2009 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:40 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">BSDTAR(1) FreeBSD General Commands Manual
BSDTAR(1)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>tar</b> &mdash; manipulate
tape archives</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:14%;"><b>tar</b>
[<i>bundled-flags&nbsp;</i>&lang;</p>

<p valign="top">args &rang;] [&lang; <i><br>
file</i> &rang;&nbsp;|&nbsp;&lang; <i><br>
pattern</i> &rang;&nbsp;...]</p>

<p style="margin-left:14%;"><b>tar</b> {<b>&minus;c</b>}
[<i>options</i>]
[<i>files&nbsp;</i>|&nbsp;<i>directories</i>] <b><br>
tar</b> {<b>&minus;r&nbsp;</b>|&nbsp;<b>&minus;u</b>}
<b>&minus;f</b> <i>archive-file</i> [<i>options</i>]
[<i>files&nbsp;</i>|&nbsp;<i>directories</i>] <b><br>
tar</b> {<b>&minus;t&nbsp;</b>|&nbsp;<b>&minus;x</b>}
[<i>options</i>] [<i>patterns</i>]</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;"><b>tar</b> creates and
manipulates streaming archive files. This implementation can
extract from tar, pax, cpio, zip, jar, ar, and ISO 9660
cdrom images and can create tar, pax, cpio, ar, and shar
archives.</p>

<p style="margin-left:8%; margin-top: 1em">The first
synopsis form shows a &lsquo;&lsquo;bundled&rsquo;&rsquo;
option word. This usage is provided for compatibility with
historical implementations. See COMPATIBILITY below for
details.</p>

<p style="margin-left:8%; margin-top: 1em">The other
synopsis forms show the preferred usage. The first option to
<b>tar</b> is a mode indicator from the following list:</p>

<p valign="top"><b>&minus;c</b></p>

<p style="margin-left:20%; margin-top: 1em">Create a new
archive containing the specified items.</p>

<p valign="top"><b>&minus;r</b></p>

<p style="margin-left:20%; margin-top: 1em">Like
<b>&minus;c</b>, but new entries are appended to the
archive. Note that this only works on uncompressed archives
stored in regular files. The <b>&minus;f</b> option is
required.</p>

<p valign="top"><b>&minus;t</b></p>

<p style="margin-left:20%; margin-top: 1em">List archive
contents to stdout.</p>

<p valign="top"><b>&minus;u</b></p>

<p style="margin-left:20%; margin-top: 1em">Like
<b>&minus;r</b>, but new entries are added only if they have
a modification date newer than the corresponding entry in
the archive. Note that this only works on uncompressed
archives stored in regular files. The <b>&minus;f</b> option
is required.</p>

<p valign="top"><b>&minus;x</b></p>

<p style="margin-left:20%; margin-top: 1em">Extract to disk
from the archive. If a file with the same name appears more
than once in the archive, each copy will be extracted, with
later copies overwriting (replacing) earlier copies.</p>

<p style="margin-left:8%; margin-top: 1em">In
<b>&minus;c</b>, <b>&minus;r</b>, or <b>&minus;u</b> mode,
each specified file or directory is added to the archive in
the order specified on the command line. By default, the
contents of each directory are also archived.</p>

<p style="margin-left:8%; margin-top: 1em">In extract or
list mode, the entire command line is read and parsed before
the archive is opened. The pathnames or patterns on the
command line indicate which items in the archive should be
processed. Patterns are shell-style globbing patterns as
documented in tcsh(1).</p>

<p style="margin-top: 1em" valign="top"><b>OPTIONS</b></p>

<p style="margin-left:8%;">Unless specifically stated
otherwise, options are applicable in all operating
modes.</p>


<p style="margin-top: 1em" valign="top"><b>@</b><i>archive</i></p>

<p style="margin-left:20%;">(c and r mode only) The
specified archive is opened and the entries in it will be
appended to the current archive. As a simple example,</p>

<p style="margin-left:29%;"><b>tar &minus;c &minus;f</b>
<i>- newfile</i> <b>@</b><i>original.tar</i></p>

<p style="margin-left:20%;">writes a new archive to
standard output containing a file <i>newfile</i> and all of
the entries from <i>original.tar</i>. In contrast,</p>

<p style="margin-left:29%;"><b>tar &minus;c &minus;f</b>
<i>- newfile original.tar</i></p>

<p style="margin-left:20%;">creates a new archive with only
two entries. Similarly,</p>

<p style="margin-left:29%;"><b>tar &minus;czf</b> <i>-</i>
<b>&minus;-format pax @</b><i>-</i></p>

<p style="margin-left:20%;">reads an archive from standard
input (whose format will be determined automatically) and
converts it into a gzip-compressed pax-format archive on
stdout. In this way, <b>tar</b> can be used to convert
archives from one format to another.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;b</b>
<i>blocksize</i></p>

<p style="margin-left:20%;">Specify the block size, in
512-byte records, for tape drive I/O. As a rule, this
argument is only needed when reading from or writing to tape
drives, and usually not even then as the default block size
of 20 records (10240 bytes) is very common.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;C</b>
<i>directory</i></p>

<p style="margin-left:20%;">In c and r mode, this changes
the directory before adding the following files. In x mode,
change directories after opening the archive but before
extracting entries from the archive.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-check-links</b></p>

<p style="margin-left:20%;">(c and r modes only) Issue a
warning message unless all links to each file are
archived.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-chroot</b></p>

<p style="margin-left:20%;">(x mode only) <b>chroot</b>()
to the current directory after processing any
<b>&minus;C</b> options and before extracting any files.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-exclude</b>
<i>pattern</i></p>

<p style="margin-left:20%;">Do not process files or
directories that match the specified pattern. Note that
exclusions take precedence over patterns or filenames
specified on the command line.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-format</b>
<i>format</i></p>

<p style="margin-left:20%;">(c, r, u mode only) Use the
specified format for the created archive. Supported formats
include &lsquo;&lsquo;cpio&rsquo;&rsquo;,
&lsquo;&lsquo;pax&rsquo;&rsquo;,
&lsquo;&lsquo;shar&rsquo;&rsquo;, and
&lsquo;&lsquo;ustar&rsquo;&rsquo;. Other formats may also be
supported; see libarchive-formats(5) for more information
about currently-supported formats. In r and u modes, when
extending an existing archive, the format specified here
must be compatible with the format of the existing archive
on disk.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;f</b>
<i>file</i></p>

<p style="margin-left:20%;">Read the archive from or write
the archive to the specified file. The filename can be
<i>-</i> for standard input or standard output. If not
specified, the default tape device will be used. (On
FreeBSD, the default tape device is <i>/dev/sa0</i>.)</p>


<p style="margin-top: 1em" valign="top"><b>&minus;H</b></p>

<p style="margin-left:20%; margin-top: 1em">(c and r mode
only) Symbolic links named on the command line will be
followed; the target of the link will be archived, not the
link itself.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;h</b></p>

<p style="margin-left:20%; margin-top: 1em">(c and r mode
only) Synonym for <b>&minus;L</b>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;I</b></p>

<p style="margin-left:20%; margin-top: 1em">Synonym for
<b>&minus;T</b>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-include</b>
<i>pattern</i></p>

<p style="margin-left:20%;">Process only files or
directories that match the specified pattern. Note that
exclusions specified with <b>&minus;-exclude</b> take
precedence over inclusions. If no inclusions are explicitly
specified, all entries are processed by default. The
<b>&minus;-include</b> option is especially useful when
filtering archives. For example, the command</p>

<p style="margin-left:29%;"><b>tar &minus;c &minus;f</b>
<i>new.tar</i> <b>&minus;-include=&rsquo;*foo*&rsquo;
@</b><i>old.tgz</i></p>

<p style="margin-left:20%;">creates a new archive
<i>new.tar</i> containing only the entries from
<i>old.tgz</i> containing the string &lsquo;foo&rsquo;.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;j</b></p>

<p style="margin-left:20%; margin-top: 1em">(c mode only)
Compress the resulting archive with bzip2(1). In extract or
list modes, this option is ignored. Note that, unlike other
<b>tar</b> implementations, this implementation recognizes
bzip2 compression automatically when reading archives.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;k</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode only)
Do not overwrite existing files. In particular, if a file
appears more than once in an archive, later copies will not
overwrite earlier copies.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-keep-newer-files</b></p>

<p style="margin-left:20%;">(x mode only) Do not overwrite
existing files that are newer than the versions appearing in
the archive being extracted.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;L</b></p>

<p style="margin-left:20%; margin-top: 1em">(c and r mode
only) All symbolic links will be followed. Normally,
symbolic links are archived as such. With this option, the
target of the link will be archived instead.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;l</b></p>

<p style="margin-left:20%; margin-top: 1em">This is a
synonym for the <b>&minus;-check-links</b> option.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;m</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode only)
Do not extract modification time. By default, the
modification time is set to the time stored in the
archive.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;n</b></p>

<p style="margin-left:20%; margin-top: 1em">(c, r, u modes
only) Do not recursively archive the contents of
directories.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-newer</b>
<i>date</i></p>

<p style="margin-left:20%;">(c, r, u modes only) Only
include files and directories newer than the specified date.
This compares ctime entries.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-newer-mtime</b>
<i>date</i></p>

<p style="margin-left:20%;">(c, r, u modes only) Like
<b>&minus;-newer</b>, except it compares mtime entries
instead of ctime entries.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-newer-than</b>
<i>file</i></p>

<p style="margin-left:20%;">(c, r, u modes only) Only
include files and directories newer than the specified file.
This compares ctime entries.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-newer-mtime-than</b>
<i>file</i></p>

<p style="margin-left:20%;">(c, r, u modes only) Like
<b>&minus;-newer-than</b>, except it compares mtime entries
instead of ctime entries.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-nodump</b></p>

<p style="margin-left:20%;">(c and r modes only) Honor the
nodump file flag by skipping this file.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-null</b></p>

<p style="margin-left:20%; margin-top: 1em">(use with
<b>&minus;I</b>, <b>&minus;T</b>, or <b>&minus;X</b>)
Filenames or patterns are separated by null characters, not
by newlines. This is often used to read filenames output by
the <b>&minus;print0</b> option to find(1).</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-numeric-owner</b></p>

<p style="margin-left:20%;">(x mode only) Ignore symbolic
user and group names when restoring archives to disk, only
numeric uid and gid values will be obeyed.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;O</b></p>

<p style="margin-left:20%; margin-top: 1em">(x, t modes
only) In extract (-x) mode, files will be written to
standard out rather than being extracted to disk. In list
(-t) mode, the file listing will be written to stderr rather
than the usual stdout.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;o</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode) Use
the user and group of the user running the program rather
than those specified in the archive. Note that this has no
significance unless <b>&minus;p</b> is specified, and the
program is being run by the root user. In this case, the
file modes and flags from the archive will be restored, but
ACLs or owner information in the archive will be
discarded.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;o</b></p>

<p style="margin-left:20%; margin-top: 1em">(c, r, u mode)
A synonym for <b>&minus;-format</b> <i>ustar</i></p>


<p style="margin-top: 1em" valign="top"><b>&minus;-one-file-system</b></p>

<p style="margin-left:20%;">(c, r, and u modes) Do not
cross mount points.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-options</b>
<i>options</i></p>

<p style="margin-left:20%;">Select optional behaviors for
particular modules. The argument is a text string containing
comma-separated keywords and values. These are passed to the
modules that handle particular formats to control how those
formats will behave. Each option has one of the following
forms:</p>

<p valign="top"><i>key=value</i></p>

<p style="margin-left:32%;">The key will be set to the
specified value in every module that supports it. Modules
that do not support this key will ignore it.</p>

<p valign="top"><i>key</i></p>

<p style="margin-left:32%; margin-top: 1em">The key will be
enabled in every module that supports it. This is equivalent
to <i>key</i><b>=1</b>.</p>

<p valign="top"><i>!key</i></p>

<p style="margin-left:32%; margin-top: 1em">The key will be
disabled in every module that supports it.</p>

<p valign="top"><i>module:key=value</i>, <i>module:key</i>,
<i>module:!key</i></p>

<p style="margin-left:32%;">As above, but the corresponding
key and value will be provided only to modules whose name
matches <i>module</i>.</p>

<p style="margin-left:20%;">The currently supported modules
and keys are:</p>

<p valign="top"><b>iso9660:joliet</b></p>

<p style="margin-left:32%;">Support Joliet extensions. This
is enabled by default, use <b>!joliet</b> or
<b>iso9660:!joliet</b> to disable.</p>

<p valign="top"><b>iso9660:rockridge</b></p>

<p style="margin-left:32%;">Support Rock Ridge extensions.
This is enabled by default, use <b>!rockridge</b> or
<b>iso9660:!rockridge</b> to disable.</p>

<p valign="top"><b>gzip:compression-level</b></p>

<p style="margin-left:32%;">A decimal integer from 0 to 9
specifying the gzip compression level.</p>

<p valign="top"><b>xz:compression-level</b></p>

<p style="margin-left:32%;">A decimal integer from 0 to 9
specifying the xz compression level.</p>

<p valign="top"><b>mtree:</b><i>keyword</i></p>

<p style="margin-left:32%;">The mtree writer module allows
you to specify which mtree keywords will be included in the
output. Supported keywords include: <b>cksum</b>,
<b>device</b>, <b>flags</b>, <b>gid</b>, <b>gname</b>,
<b>indent</b>, <b>link</b>, <b>md5</b>, <b>mode</b>,
<b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, <b>sha256</b>,
<b>sha384</b>, <b>sha512</b>, <b>size</b>, <b>time</b>,
<b>uid</b>, <b>uname</b>. The default is equivalent to:
&lsquo;&lsquo;device, flags, gid, gname, link, mode, nlink,
size, time, type, uid, uname&rsquo;&rsquo;.</p>

<p valign="top"><b>mtree:all</b></p>

<p style="margin-left:32%;">Enables all of the above
keywords. You can also use <b>mtree:!all</b> to disable all
keywords.</p>

<p valign="top"><b>mtree:use-set</b></p>

<p style="margin-left:32%;">Enable generation of
<b>/set</b> lines in the output.</p>

<p valign="top"><b>mtree:indent</b></p>

<p style="margin-left:32%;">Produce human-readable output
by indenting options and splitting lines to fit into 80
columns.</p>

<p valign="top"><b>zip:compression</b>=<i>type</i></p>

<p style="margin-left:32%;">Use <i>type</i> as compression
method. Supported values are store (uncompressed) and
deflate (gzip algorithm).</p>

<p style="margin-left:20%;">If a provided option is not
supported by any module, that is a fatal error.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;P</b></p>

<p style="margin-left:20%; margin-top: 1em">Preserve
pathnames. By default, absolute pathnames (those that begin
with a / character) have the leading slash removed both when
creating archives and extracting from them. Also, <b>tar</b>
will refuse to extract archive entries whose pathnames
contain <i>..</i> or whose target directory would be altered
by a symlink. This option suppresses these behaviors.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;p</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode only)
Preserve file permissions. Attempt to restore the full
permissions, including owner, file modes, file flags and
ACLs, if available, for each item extracted from the
archive. By default, newly-created files are owned by the
user running <b>tar</b>, the file mode is restored for
newly-created regular files, and all other types of entries
receive default permissions. If <b>tar</b> is being run by
root, the default is to restore the owner unless the
<b>&minus;o</b> option is also specified.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;q</b>
(<b>&minus;-fast-read</b>)</p>

<p style="margin-left:20%;">(x and t mode only) Extract or
list only the first archive entry that matches each pattern
or filename operand. Exit as soon as each specified pattern
or filename has been matched. By default, the archive is
always read to the very end, since there can be multiple
entries with the same name and, by convention, later entries
overwrite earlier entries. This option is provided as a
performance optimization.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;S</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode only)
Extract files as sparse files. For every block on disk,
check first if it contains only NULL bytes and seek over it
otherwise. This works similiar to the conv=sparse option of
dd.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-strip-components</b>
<i>count</i></p>

<p style="margin-left:20%;">(x mode only) Remove the
specified number of leading path elements. Pathnames with
fewer elements will be silently skipped. Note that the
pathname is edited after checking inclusion/exclusion
patterns but before security checks.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;s</b>
<i>pattern</i></p>

<p style="margin-left:20%;">Modify file or archive member
names according to <i>pattern</i>. The pattern has the
format <i>/old/new/</i>[gps] where <i>old</i> is a basic
regular expression, <i>new</i> is the replacement string of
the matched part, and the optional trailing letters modify
how the replacement is handled. If <i>old</i> is not
matched, the pattern is skipped. Within <i>new</i>, ~ is
substituted with the match, 1 to 9 with the content of the
corresponding captured group. The optional trailing g
specifies that matching should continue after the matched
part and stopped on the first unmatched pattern. The
optional trailing s specifies that the pattern applies to
the value of symbolic links. The optional trailing p
specifies that after a successful substitution the original
path name and the new path name should be printed to
standard error.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;T</b>
<i>filename</i></p>

<p style="margin-left:20%;">In x or t mode, <b>tar</b> will
read the list of names to be extracted from <i>filename</i>.
In c mode, <b>tar</b> will read names to be archived from
<i>filename</i>. The special name
&lsquo;&lsquo;-C&rsquo;&rsquo; on a line by itself will
cause the current directory to be changed to the directory
specified on the following line. Names are terminated by
newlines unless <b>&minus;-null</b> is specified. Note that
<b>&minus;-null</b> also disables the special handling of
lines containing &lsquo;&lsquo;-C&rsquo;&rsquo;.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;U</b></p>

<p style="margin-left:20%; margin-top: 1em">(x mode only)
Unlink files before creating them. Without this option,
<b>tar</b> overwrites existing files, which preserves
existing hardlinks. With this option, existing hardlinks
will be broken, as will any symlink that would affect the
location of an extracted file.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-use-compress-program</b>
<i>program</i></p>

<p style="margin-left:20%;">Pipe the input (in x or t mode)
or the output (in c mode) through <i>program</i> instead of
using the builtin compression support.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;v</b></p>

<p style="margin-left:20%; margin-top: 1em">Produce verbose
output. In create and extract modes, <b>tar</b> will list
each file name as it is read from or written to the archive.
In list mode, <b>tar</b> will produce output similar to that
of ls(1). Additional <b>&minus;v</b> options will provide
additional detail.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-version</b></p>

<p style="margin-left:20%;">Print version of <b>tar</b> and
<b>libarchive</b>, and exit.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;w</b></p>

<p style="margin-left:20%; margin-top: 1em">Ask for
confirmation for every action.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;X</b>
<i>filename</i></p>

<p style="margin-left:20%;">Read a list of exclusion
patterns from the specified file. See <b>&minus;-exclude</b>
for more information about the handling of exclusions.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;y</b></p>

<p style="margin-left:20%; margin-top: 1em">(c mode only)
Compress the resulting archive with bzip2(1). In extract or
list modes, this option is ignored. Note that, unlike other
<b>tar</b> implementations, this implementation recognizes
bzip2 compression automatically when reading archives.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;z</b></p>

<p style="margin-left:20%; margin-top: 1em">(c mode only)
Compress the resulting archive with gzip(1). In extract or
list modes, this option is ignored. Note that, unlike other
<b>tar</b> implementations, this implementation recognizes
gzip compression automatically when reading archives.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;Z</b></p>

<p style="margin-left:20%; margin-top: 1em">(c mode only)
Compress the resulting archive with compress(1). In extract
or list modes, this option is ignored. Note that, unlike
other <b>tar</b> implementations, this implementation
recognizes compress compression automatically when reading
archives.</p>


<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>

<p style="margin-left:8%;">The following environment
variables affect the execution of <b>tar</b>:</p>

<p style="margin-top: 1em" valign="top">LANG</p>

<p style="margin-left:25%; margin-top: 1em">The locale to
use. See environ(7) for more information.</p>

<p style="margin-top: 1em" valign="top">TAPE</p>

<p style="margin-left:25%; margin-top: 1em">The default
tape device. The <b>&minus;f</b> option overrides this.</p>

<p style="margin-top: 1em" valign="top">TZ</p>

<p style="margin-left:25%; margin-top: 1em">The timezone to
use when displaying dates. See environ(7) for more
information.</p>

<p style="margin-top: 1em" valign="top"><b>FILES</b> <br>
/dev/sa0</p>

<p style="margin-left:25%; margin-top: 1em">The default
tape device, if not overridden by the TAPE environment
variable or the <b>&minus;f</b> option.</p>

<p style="margin-top: 1em" valign="top"><b>EXIT
STATUS</b></p>

<p style="margin-left:8%;">The <b>tar</b> utility
exits&nbsp;0 on success, and&nbsp;&gt;0 if an error
occurs.</p>


<p style="margin-top: 1em" valign="top"><b>EXAMPLES</b></p>

<p style="margin-left:8%;">The following creates a new
archive called <i>file.tar.gz</i> that contains two files
<i>source.c</i> and <i>source.h</i>:</p>

<p style="margin-left:17%;"><b>tar &minus;czf</b>
<i>file.tar.gz source.c source.h</i></p>

<p style="margin-left:8%; margin-top: 1em">To view a
detailed table of contents for this archive:</p>

<p style="margin-left:17%;"><b>tar &minus;tvf</b>
<i>file.tar.gz</i></p>

<p style="margin-left:8%; margin-top: 1em">To extract all
entries from the archive on the default tape drive:</p>

<p style="margin-left:17%;"><b>tar &minus;x</b></p>

<p style="margin-left:8%; margin-top: 1em">To examine the
contents of an ISO 9660 cdrom image:</p>

<p style="margin-left:17%;"><b>tar &minus;tf</b>
<i>image.iso</i></p>

<p style="margin-left:8%; margin-top: 1em">To move file
hierarchies, invoke <b>tar</b> as</p>

<p style="margin-left:17%;"><b>tar &minus;cf</b> <i>-</i>
<b>&minus;C</b> <i>srcdir&nbsp;.</i> | <b>tar &minus;xpf</b>
<i>-</i> <b>&minus;C</b> <i>destdir</i></p>

<p style="margin-left:8%;">or more traditionally</p>

<p style="margin-left:17%;">cd srcdir ; <b>tar
&minus;cf</b> <i>-&nbsp;.</i> | (<i>cd destdir ;</i> <b>tar
&minus;xpf</b> <i>-</i>)</p>

<p style="margin-left:8%; margin-top: 1em">In create mode,
the list of files and directories to be archived can also
include directory change instructions of the form
<b>-C</b><i>foo/baz</i> and archive inclusions of the form
<b>@</b><i>archive-file</i>. For example, the command
line</p>

<p style="margin-left:17%;"><b>tar &minus;c &minus;f</b>
<i>new.tar foo1</i> <b>@</b><i>old.tgz</i> <b>-C</b><i>/tmp
foo2</i></p>

<p style="margin-left:8%;">will create a new archive
<i>new.tar</i>. <b>tar</b> will read the file <i>foo1</i>
from the current directory and add it to the output archive.
It will then read each entry from <i>old.tgz</i> and add
those entries to the output archive. Finally, it will switch
to the <i>/tmp</i> directory and add <i>foo2</i> to the
output archive.</p>

<p style="margin-left:8%; margin-top: 1em">An input file in
mtree(5) format can be used to create an output archive with
arbitrary ownership, permissions, or names that differ from
existing data on disk:</p>

<p style="margin-left:17%; margin-top: 1em">$ cat
input.mtree <br>
#mtree <br>
usr/bin uid=0 gid=0 mode=0755 type=dir <br>
usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls <br>
$ tar -cvf output.tar @input.mtree</p>

<p style="margin-left:8%; margin-top: 1em">The
<b>&minus;-newer</b> and <b>&minus;-newer-mtime</b> switches
accept a variety of common date and time specifications,
including &lsquo;&lsquo;12 Mar 2005 7:14:29pm&rsquo;&rsquo;,
&lsquo;&lsquo;2005-03-12 19:14&rsquo;&rsquo;,
&lsquo;&lsquo;5 minutes ago&rsquo;&rsquo;, and
&lsquo;&lsquo;19:14 PST May 1&rsquo;&rsquo;.</p>

<p style="margin-left:8%; margin-top: 1em">The
<b>&minus;-options</b> argument can be used to control
various details of archive generation or reading. For
example, you can generate mtree output which only contains
<b>type</b>, <b>time</b>, and <b>uid</b> keywords:</p>

<p style="margin-left:17%;"><b>tar &minus;cf</b>
<i>file.tar</i> <b>&minus;-format=mtree
&minus;-options=&rsquo;!all,type,time,uid&rsquo;</b>
<i>dir</i></p>

<p style="margin-left:8%;">or you can set the compression
level used by gzip or xz compression:</p>

<p style="margin-left:17%;"><b>tar &minus;czf</b>
<i>file.tar</i>
<b>&minus;-options=&rsquo;compression-level=9&rsquo;</b>.</p>

<p style="margin-left:8%;">For more details, see the
explanation of the <b>archive_read_set_options</b>() and
<b>archive_write_set_options</b>() API calls that are
described in archive_read(3) and archive_write(3).</p>


<p style="margin-top: 1em" valign="top"><b>COMPATIBILITY</b></p>

<p style="margin-left:8%;">The bundled-arguments format is
supported for compatibility with historic implementations.
It consists of an initial word (with no leading - character)
in which each character indicates an option. Arguments
follow as separate words. The order of the arguments must
match the order of the corresponding characters in the
bundled command word. For example,</p>

<p style="margin-left:17%;"><b>tar tbf 32</b>
<i>file.tar</i></p>

<p style="margin-left:8%;">specifies three flags <b>t</b>,
<b>b</b>, and <b>f</b>. The <b>b</b> and <b>f</b> flags both
require arguments, so there must be two additional items on
the command line. The <i>32</i> is the argument to the
<b>b</b> flag, and <i>file.tar</i> is the argument to the
<b>f</b> flag.</p>

<p style="margin-left:8%; margin-top: 1em">The mode options
c, r, t, u, and x and the options b, f, l, m, o, v, and w
comply with SUSv2.</p>

<p style="margin-left:8%; margin-top: 1em">For maximum
portability, scripts that invoke <b>tar</b> should use the
bundled-argument format above, should limit themselves to
the <b>c</b>, <b>t</b>, and <b>x</b> modes, and the
<b>b</b>, <b>f</b>, <b>m</b>, <b>v</b>, and <b>w</b>
options.</p>

<p style="margin-left:8%; margin-top: 1em">Additional long
options are provided to improve compatibility with other tar
implementations.</p>


<p style="margin-top: 1em" valign="top"><b>SECURITY</b></p>

<p style="margin-left:8%;">Certain security issues are
common to many archiving programs, including <b>tar</b>. In
particular, carefully-crafted archives can request that
<b>tar</b> extract files to locations outside of the target
directory. This can potentially be used to cause unwitting
users to overwrite files they did not intend to overwrite.
If the archive is being extracted by the superuser, any file
on the system can potentially be overwritten. There are
three ways this can happen. Although <b>tar</b> has
mechanisms to protect against each one, savvy users should
be aware of the implications:</p>

<p style="margin-top: 1em" valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">Archive entries can have
absolute pathnames. By default, <b>tar</b> removes the
leading <i>/</i> character from filenames before restoring
them to guard against this problem.</p>

<p style="margin-top: 1em" valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">Archive entries can have
pathnames that include <i>..</i> components. By default,
<b>tar</b> will not extract files containing <i>..</i>
components in their pathname.</p>

<p style="margin-top: 1em" valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">Archive entries can exploit
symbolic links to restore files to other directories. An
archive can restore a symbolic link to another directory,
then use that link to restore a file into that directory. To
guard against this, <b>tar</b> checks each extracted path
for symlinks. If the final path element is a symlink, it
will be removed and replaced with the archive entry. If
<b>&minus;U</b> is specified, any intermediate symlink will
also be unconditionally removed. If neither <b>&minus;U</b>
nor <b>&minus;P</b> is specified, <b>tar</b> will refuse to
extract the entry.</p>

<p style="margin-left:8%;">To protect yourself, you should
be wary of any archives that come from untrusted sources.
You should examine the contents of an archive with</p>

<p style="margin-left:17%;"><b>tar &minus;tf</b>
<i>filename</i></p>

<p style="margin-left:8%;">before extraction. You should
use the <b>&minus;k</b> option to ensure that <b>tar</b>
will not overwrite any existing files or the <b>&minus;U</b>
option to remove any pre-existing files. You should
generally not extract archives while running with super-user
privileges. Note that the <b>&minus;P</b> option to
<b>tar</b> disables the security checks above and allows you
to extract an archive while preserving any absolute
pathnames, <i>..</i> components, or symlinks to other
directories.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">bzip2(1), compress(1), cpio(1),
gzip(1), mt(1), pax(1), shar(1), libarchive(3),
libarchive-formats(5), tar(5)</p>


<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>

<p style="margin-left:8%;">There is no current POSIX
standard for the tar command; it appeared in ISO/IEC
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) but was
dropped from IEEE Std 1003.1-2001
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;). The options used by
this implementation were developed by surveying a number of
existing tar implementations as well as the old POSIX
specification for tar and the current POSIX specification
for pax.</p>

<p style="margin-left:8%; margin-top: 1em">The ustar and
pax interchange file formats are defined by IEEE Std
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
pax command.</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">A <b>tar</b> command appeared in
Seventh Edition Unix, which was released in January, 1979.
There have been numerous other implementations, many of
which extended the file format. John Gilmore&rsquo;s
<b>pdtar</b> public-domain implementation (circa November,
1987) was quite influential, and formed the basis of GNU
tar. GNU tar was included as the standard system tar in
FreeBSD beginning with FreeBSD&nbsp;1.0.</p>

<p style="margin-left:8%; margin-top: 1em">This is a
complete re-implementation based on the libarchive(3)
library.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">This program follows ISO/IEC
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
definition of the <b>&minus;l</b> option. Note that GNU tar
prior to version 1.15 treated <b>&minus;l</b> as a synonym
for the <b>&minus;-one-file-system</b> option.</p>

<p style="margin-left:8%; margin-top: 1em">The
<b>&minus;C</b> <i>dir</i> option may differ from historic
implementations.</p>

<p style="margin-left:8%; margin-top: 1em">All archive
output is written in correctly-sized blocks, even if the
output is being compressed. Whether or not the last output
block is padded to a full block size varies depending on the
format and the output device. For tar and cpio formats, the
last block of output is padded to a full block size if the
output is being written to standard output or to a character
or block device such as a tape drive. If the output is being
written to a regular file, the last block will not be
padded. Many compressors, including gzip(1) and bzip2(1),
complain about the null padding when decompressing an
archive created by <b>tar</b>, although they still extract
it correctly.</p>

<p style="margin-left:8%; margin-top: 1em">The compression
and decompression is implemented internally, so there may be
insignificant differences between the compressed output
generated by</p>

<p style="margin-left:17%;"><b>tar &minus;czf</b> <i>-
file</i></p>

<p style="margin-left:8%;">and that generated by</p>

<p style="margin-left:17%;"><b>tar &minus;cf</b> <i>-
file</i> | <b>gzip</b></p>

<p style="margin-left:8%; margin-top: 1em">The default
should be to read and write archives to the standard I/O
paths, but tradition (and POSIX) dictates otherwise.</p>

<p style="margin-left:8%; margin-top: 1em">The <b>r</b> and
<b>u</b> modes require that the archive be uncompressed and
located in a regular file on disk. Other archives can be
modified using <b>c</b> mode with the <i>@archive-file</i>
extension.</p>

<p style="margin-left:8%; margin-top: 1em">To archive a
file called <i>@foo</i> or <i>-foo</i> you must specify it
as <i>./@foo</i> or <i>./-foo</i>, respectively.</p>

<p style="margin-left:8%; margin-top: 1em">In create mode,
a leading <i>./</i> is always removed. A leading <i>/</i> is
stripped unless the <b>&minus;P</b> option is specified.</p>

<p style="margin-left:8%; margin-top: 1em">There needs to
be better support for file selection on both create and
extract.</p>

<p style="margin-left:8%; margin-top: 1em">There is not yet
any support for multi-volume archives or for archiving
sparse files.</p>

<p style="margin-left:8%; margin-top: 1em">Converting
between dissimilar archive formats (such as tar and cpio)
using the <b>@</b><i>-</i> convention can cause hard link
information to be lost. (This is a consequence of the
incompatible ways that different archive formats store
hardlink information.)</p>

<p style="margin-left:8%; margin-top: 1em">There are
alternative long options for many of the short options that
are deliberately not documented.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
Oct&nbsp;12, 2009 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:41 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">BSDCPIO(1) FreeBSD General Commands Manual
BSDCPIO(1)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>cpio</b> &mdash; copy files
to and from archives</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:15%;"><b>cpio</b> {<b>&minus;i</b>}
[<i>options</i>] [<i>pattern&nbsp;...</i>]
[<i>&lt;&nbsp;archive</i>] <b><br>
cpio</b> {<b>&minus;o</b>} [<i>options</i>] <i>&lt;
name-list</i> [<i>&gt;&nbsp;archive</i>] <b><br>
cpio</b> {<b>&minus;p</b>} [<i>options</i>] <i>dest-dir &lt;
name-list</i></p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;"><b>cpio</b> copies files between
archives and directories. This implementation can extract
from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images
and can create tar, pax, cpio, ar, and shar archives.</p>

<p style="margin-left:8%; margin-top: 1em">The first option
to <b>cpio</b> is a mode indicator from the following
list:</p>

<p valign="top"><b>&minus;i</b></p>

<p style="margin-left:20%; margin-top: 1em">Input. Read an
archive from standard input (unless overriden) and extract
the contents to disk or (if the <b>&minus;t</b> option is
specified) list the contents to standard output. If one or
more file patterns are specified, only files matching one of
the patterns will be extracted.</p>

<p valign="top"><b>&minus;o</b></p>

<p style="margin-left:20%; margin-top: 1em">Output. Read a
list of filenames from standard input and produce a new
archive on standard output (unless overriden) containing the
specified items.</p>

<p valign="top"><b>&minus;p</b></p>

<p style="margin-left:20%; margin-top: 1em">Pass-through.
Read a list of filenames from standard input and copy the
files to the specified directory.</p>

<p style="margin-top: 1em" valign="top"><b>OPTIONS</b></p>

<p style="margin-left:8%;">Unless specifically stated
otherwise, options are applicable in all operating
modes.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;0</b></p>

<p style="margin-left:20%; margin-top: 1em">Read filenames
separated by NUL characters instead of newlines. This is
necessary if any of the filenames being read might contain
newlines.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;A</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Append to the specified archive. (Not yet implemented.)</p>


<p style="margin-top: 1em" valign="top"><b>&minus;a</b></p>

<p style="margin-left:20%; margin-top: 1em">(o and p modes)
Reset access times on files after they are read.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;B</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Block output to records of 5120 bytes.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;C</b>
<i>size</i></p>

<p style="margin-left:20%;">(o mode only) Block output to
records of <i>size</i> bytes.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;c</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Use the old POSIX portable character format. Equivalent to
<b>&minus;-format</b> <i>odc</i>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;d</b></p>

<p style="margin-left:20%; margin-top: 1em">(i and p modes)
Create directories as necessary.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;E</b>
<i>file</i></p>

<p style="margin-left:20%;">(i mode only) Read list of file
name patterns from <i>file</i> to list and extract.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;F</b>
<i>file</i></p>

<p style="margin-left:20%;">Read archive from or write
archive to <i>file</i>.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;f</b>
<i>pattern</i></p>

<p style="margin-left:20%;">(i mode only) Ignore files that
match <i>pattern</i>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-format</b>
<i>format</i></p>

<p style="margin-left:20%;">(o mode only) Produce the
output archive in the specified format. Supported formats
include:</p>

<p style="margin-top: 1em" valign="top"><i>cpio</i></p>

<p style="margin-left:34%; margin-top: 1em">Synonym for
<i>odc</i>.</p>

<p valign="top"><i>newc</i></p>

<p style="margin-left:34%; margin-top: 1em">The SVR4
portable cpio format.</p>

<p valign="top"><i>odc</i></p>

<p style="margin-left:34%; margin-top: 1em">The old POSIX.1
portable octet-oriented cpio format.</p>

<p valign="top"><i>pax</i></p>

<p style="margin-left:34%; margin-top: 1em">The POSIX.1 pax
format, an extension of the ustar format.</p>

<p valign="top"><i>ustar</i></p>

<p style="margin-left:34%; margin-top: 1em">The POSIX.1 tar
format.</p>

<p style="margin-left:20%; margin-top: 1em">The default
format is <i>odc</i>. See libarchive_formats(5) for more
complete information about the formats currently supported
by the underlying libarchive(3) library.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;H</b>
<i>format</i></p>

<p style="margin-left:20%;">Synonym for
<b>&minus;-format</b>.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;h</b>,
<b>&minus;-help</b></p>

<p style="margin-left:20%;">Print usage information.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;I</b>
<i>file</i></p>

<p style="margin-left:20%;">Read archive from
<i>file</i>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;i</b></p>

<p style="margin-left:20%; margin-top: 1em">Input mode. See
above for description.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-insecure</b></p>

<p style="margin-left:20%;">(i and p mode only) Disable
security checks during extraction or copying. This allows
extraction via symbolic links and path names containing
&lsquo;..&rsquo; in the name.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;J</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Compress the file with xz-compatible compression before
writing it. In input mode, this option is ignored; xz
compression is recognized automatically on input.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;j</b></p>

<p style="margin-left:20%; margin-top: 1em">Synonym for
<b>&minus;y</b>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;L</b></p>

<p style="margin-left:20%; margin-top: 1em">(o and p modes)
All symbolic links will be followed. Normally, symbolic
links are archived and copied as symbolic links. With this
option, the target of the link will be archived or copied
instead.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;l</b></p>

<p style="margin-left:20%; margin-top: 1em">(p mode only)
Create links from the target directory to the original
files, instead of copying.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;lzma</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Compress the file with lzma-compatible compression before
writing it. In input mode, this option is ignored; lzma
compression is recognized automatically on input.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;m</b></p>

<p style="margin-left:20%; margin-top: 1em">(i and p modes)
Set file modification time on created files to match those
in the source.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;n</b></p>

<p style="margin-left:20%; margin-top: 1em">(i mode, only
with <b>&minus;t</b>) Display numeric uid and gid. By
default, <b>cpio</b> displays the user and group names when
they are provided in the archive, or looks up the user and
group names in the system password database.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;no-preserve-owner</b></p>

<p style="margin-left:20%;">(i mode only) Do not attempt to
restore file ownership. This is the default when run by
non-root users.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;O</b>
<i>file</i></p>

<p style="margin-left:20%;">Write archive to
<i>file</i>.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;o</b></p>

<p style="margin-left:20%; margin-top: 1em">Output mode.
See above for description.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;p</b></p>

<p style="margin-left:20%; margin-top: 1em">Pass-through
mode. See above for description.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;preserve-owner</b></p>

<p style="margin-left:20%;">(i mode only) Restore file
ownership. This is the default when run by the root
user.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-quiet</b></p>

<p style="margin-left:20%;">Suppress unnecessary
messages.</p>

<p style="margin-top: 1em" valign="top"><b>&minus;R</b> [
<br>
user][ <br>
:][ <br>
group]</p>

<p style="margin-left:20%;">Set the owner and/or group on
files in the output. If group is specified with no user (for
example, <b>&minus;R</b> <i>:wheel</i>) then the group will
be set but not the user. If the user is specified with a
trailing colon and no group (for example, <b>&minus;R</b>
<i>root:</i>) then the group will be set to the user&rsquo;s
default group. If the user is specified with no trailing
colon, then the user will be set but not the group. In
<b>&minus;i</b> and <b>&minus;p</b> modes, this option can
only be used by the super-user. (For compatibility, a period
can be used in place of the colon.)</p>


<p style="margin-top: 1em" valign="top"><b>&minus;r</b></p>

<p style="margin-left:20%; margin-top: 1em">(All modes.)
Rename files interactively. For each file, a prompt is
written to <i>/dev/tty</i> containing the name of the file
and a line is read from <i>/dev/tty</i>. If the line read is
blank, the file is skipped. If the line contains a single
period, the file is processed normally. Otherwise, the line
is taken to be the new name of the file.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;t</b></p>

<p style="margin-left:20%; margin-top: 1em">(i mode only)
List the contents of the archive to stdout; do not restore
the contents to disk.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;u</b></p>

<p style="margin-left:20%; margin-top: 1em">(i and p modes)
Unconditionally overwrite existing files. Ordinarily, an
older file will not overwrite a newer file on disk.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;v</b></p>

<p style="margin-left:20%; margin-top: 1em">Print the name
of each file to stderr as it is processed. With
<b>&minus;t</b>, provide a detailed listing of each
file.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;-version</b></p>

<p style="margin-left:20%;">Print the program version
information and exit.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;y</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Compress the archive with bzip2-compatible compression
before writing it. In input mode, this option is ignored;
bzip2 compression is recognized automatically on input.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;Z</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Compress the archive with compress-compatible compression
before writing it. In input mode, this option is ignored;
compression is recognized automatically on input.</p>


<p style="margin-top: 1em" valign="top"><b>&minus;z</b></p>

<p style="margin-left:20%; margin-top: 1em">(o mode only)
Compress the archive with gzip-compatible compression before
writing it. In input mode, this option is ignored; gzip
compression is recognized automatically on input.</p>


<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>

<p style="margin-left:8%;">The following environment
variables affect the execution of <b>cpio</b>:</p>

<p style="margin-top: 1em" valign="top">LANG</p>

<p style="margin-left:25%; margin-top: 1em">The locale to
use. See environ(7) for more information.</p>

<p style="margin-top: 1em" valign="top">TZ</p>

<p style="margin-left:25%; margin-top: 1em">The timezone to
use when displaying dates. See environ(7) for more
information.</p>

<p style="margin-top: 1em" valign="top"><b>EXIT
STATUS</b></p>

<p style="margin-left:8%;">The <b>cpio</b> utility
exits&nbsp;0 on success, and&nbsp;&gt;0 if an error
occurs.</p>


<p style="margin-top: 1em" valign="top"><b>EXAMPLES</b></p>

<p style="margin-left:8%;">The <b>cpio</b> command is
traditionally used to copy file heirarchies in conjunction
with the find(1) command. The first example here simply
copies all files from <i>src</i> to <i>dest</i>:</p>

<p style="margin-left:17%;"><b>find</b> <i>src</i> |
<b>cpio &minus;pmud</b> <i>dest</i></p>

<p style="margin-left:8%; margin-top: 1em">By carefully
selecting options to the find(1) command and combining it
with other standard utilities, it is possible to exercise
very fine control over which files are copied. This next
example copies files from <i>src</i> to <i>dest</i> that are
more than 2 days old and whose names match a particular
pattern:</p>

<p style="margin-left:17%;"><b>find</b> <i>src</i>
<b>&minus;mtime</b> <i>+2</i> | <b>grep foo[bar]</b> |
<b>cpio &minus;pdmu</b> <i>dest</i></p>

<p style="margin-left:8%; margin-top: 1em">This example
copies files from <i>src</i> to <i>dest</i> that are more
than 2 days old and which contain the word
&lsquo;&lsquo;</p>

<p valign="top">foobar &rsquo;&rsquo;:</p>

<p style="margin-left:17%;"><b>find</b> <i>src</i>
<b>&minus;mtime</b> <i>+2</i> | <b>xargs grep -l foobar</b>
| <b>cpio &minus;pdmu</b> <i>dest</i></p>


<p style="margin-top: 1em" valign="top"><b>COMPATIBILITY</b></p>

<p style="margin-left:8%;">The mode options i, o, and p and
the options a, B, c, d, f, l, m, r, t, u, and v comply with
SUSv2.</p>

<p style="margin-left:8%; margin-top: 1em">The old POSIX.1
standard specified that only <b>&minus;i</b>,
<b>&minus;o</b>, and <b>&minus;p</b> were interpreted as
command-line options. Each took a single argument of a list
of modifier characters. For example, the standard syntax
allows <b>&minus;imu</b> but does not support
<b>&minus;miu</b> or <b>&minus;i &minus;m &minus;u</b>,
since <i>m</i> and <i>u</i> are only modifiers to
<b>&minus;i</b>, they are not command-line options in their
own right. The syntax supported by this implementation is
backwards-compatible with the standard. For best
compatibility, scripts should limit themselves to the
standard syntax.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">bzip2(1), tar(1), gzip(1),
mt(1), pax(1), libarchive(3), cpio(5),
libarchive-formats(5), tar(5)</p>


<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>

<p style="margin-left:8%;">There is no current POSIX
standard for the cpio command; it appeared in ISO/IEC
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) but was
dropped from IEEE Std 1003.1-2001
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>

<p style="margin-left:8%; margin-top: 1em">The cpio, ustar,
and pax interchange file formats are defined by IEEE Std
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
pax command.</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The original <b>cpio</b> and
<b>find</b> utilities were written by Dick Haight while
working in AT&amp;T&rsquo;s Unix Support Group. They first
appeared in 1977 in PWB/UNIX 1.0, the
&lsquo;&lsquo;Programmer&rsquo;s Work Bench&rsquo;&rsquo;
system developed for use within AT&amp;T. They were first
released outside of AT&amp;T as part of System III Unix in
1981. As a result, <b>cpio</b> actually predates <b>tar</b>,
even though it was not well-known outside of AT&amp;T until
some time later.</p>

<p style="margin-left:8%; margin-top: 1em">This is a
complete re-implementation based on the libarchive(3)
library.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The cpio archive format has
several basic limitations: It does not store user and group
names, only numbers. As a result, it cannot be reliably used
to transfer files between systems with dissimilar user and
group numbering. Older cpio formats limit the user and group
numbers to 16 or 18 bits, which is insufficient for modern
systems. The cpio archive formats cannot support files over
4 gigabytes, except for the &lsquo;&lsquo;odc&rsquo;&rsquo;
variant, which can support files up to 8 gigabytes.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
December&nbsp;21, 2007 FreeBSD&nbsp;8.0</p>
<hr>
</body>
</html>

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/Makefile

default: all


ManPageArchiveEntry3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_entry.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_entry.3 > ManPageArchiveEntry3.wiki

ManPageArchiveRead3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_read.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_read.3 > ManPageArchiveRead3.wiki

ManPageArchiveReadDisk3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_read_disk.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_read_disk.3 > ManPageArchiveReadDisk3.wiki

ManPageArchiveUtil3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_util.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_util.3 > ManPageArchiveUtil3.wiki

ManPageArchiveWrite3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_write.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_write.3 > ManPageArchiveWrite3.wiki

ManPageArchiveWriteDisk3.wiki: ../mdoc2wiki.awk ../../libarchive/archive_write_disk.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/archive_write_disk.3 > ManPageArchiveWriteDisk3.wiki

ManPageCpio5.wiki: ../mdoc2wiki.awk ../../libarchive/cpio.5
	awk -f ../mdoc2wiki.awk < ../../libarchive/cpio.5 > ManPageCpio5.wiki

ManPageLibarchiveFormats5.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive-formats.5
	awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive-formats.5 > ManPageLibarchiveFormats5.wiki

ManPageLibarchive3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive.3 > ManPageLibarchive3.wiki

ManPageLibarchiveInternals3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive_internals.3
	awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive_internals.3 > ManPageLibarchiveInternals3.wiki

ManPageMtree5.wiki: ../mdoc2wiki.awk ../../libarchive/mtree.5
	awk -f ../mdoc2wiki.awk < ../../libarchive/mtree.5 > ManPageMtree5.wiki

ManPageTar5.wiki: ../mdoc2wiki.awk ../../libarchive/tar.5
	awk -f ../mdoc2wiki.awk < ../../libarchive/tar.5 > ManPageTar5.wiki

ManPageBsdtar1.wiki: ../mdoc2wiki.awk ../../tar/bsdtar.1
	awk -f ../mdoc2wiki.awk < ../../tar/bsdtar.1 > ManPageBsdtar1.wiki

ManPageBsdcpio1.wiki: ../mdoc2wiki.awk ../../cpio/bsdcpio.1
	awk -f ../mdoc2wiki.awk < ../../cpio/bsdcpio.1 > ManPageBsdcpio1.wiki
all: ManPageArchiveEntry3.wiki ManPageArchiveRead3.wiki ManPageArchiveReadDisk3.wiki ManPageArchiveUtil3.wiki ManPageArchiveWrite3.wiki ManPageArchiveWriteDisk3.wiki ManPageCpio5.wiki ManPageLibarchiveFormats5.wiki ManPageLibarchive3.wiki ManPageLibarchiveInternals3.wiki ManPageMtree5.wiki ManPageTar5.wiki ManPageBsdtar1.wiki ManPageBsdcpio1.wiki

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki
#summary archive_entry 3 manual page
== NAME ==
*archive_entry_acl_add_entry*,
*archive_entry_acl_add_entry_w*,
*archive_entry_acl_clear*,
*archive_entry_acl_count*,
*archive_entry_acl_next*,
*archive_entry_acl_next_w*,
*archive_entry_acl_reset*,
*archive_entry_acl_text_w*,
*archive_entry_atime*,
*archive_entry_atime_nsec*,
*archive_entry_clear*,
*archive_entry_clone*,
*archive_entry_copy_fflags_text*,
*archive_entry_copy_fflags_text_w*,
*archive_entry_copy_gname*,
*archive_entry_copy_gname_w*,
*archive_entry_copy_hardlink*,
*archive_entry_copy_hardlink_w*,
*archive_entry_copy_link*,
*archive_entry_copy_link_w*,
*archive_entry_copy_pathname_w*,
*archive_entry_copy_sourcepath*,
*archive_entry_copy_stat*,
*archive_entry_copy_symlink*,
*archive_entry_copy_symlink_w*,
*archive_entry_copy_uname*,
*archive_entry_copy_uname_w*,
*archive_entry_dev*,
*archive_entry_devmajor*,
*archive_entry_devminor*,
*archive_entry_filetype*,
*archive_entry_fflags*,
*archive_entry_fflags_text*,
*archive_entry_free*,
*archive_entry_gid*,
*archive_entry_gname*,
*archive_entry_hardlink*,
*archive_entry_ino*,
*archive_entry_mode*,
*archive_entry_mtime*,
*archive_entry_mtime_nsec*,
*archive_entry_nlink*,
*archive_entry_new*,
*archive_entry_pathname*,
*archive_entry_pathname_w*,
*archive_entry_rdev*,
*archive_entry_rdevmajor*,
*archive_entry_rdevminor*,
*archive_entry_set_atime*,
*archive_entry_set_ctime*,
*archive_entry_set_dev*,
*archive_entry_set_devmajor*,
*archive_entry_set_devminor*,
*archive_entry_set_filetype*,
*archive_entry_set_fflags*,
*archive_entry_set_gid*,
*archive_entry_set_gname*,
*archive_entry_set_hardlink*,
*archive_entry_set_link*,
*archive_entry_set_mode*,
*archive_entry_set_mtime*,
*archive_entry_set_pathname*,
*archive_entry_set_rdevmajor*,
*archive_entry_set_rdevminor*,
*archive_entry_set_size*,
*archive_entry_set_symlink*,
*archive_entry_set_uid*,
*archive_entry_set_uname*,
*archive_entry_size*,
*archive_entry_sourcepath*,
*archive_entry_stat*,
*archive_entry_symlink*,
*archive_entry_uid*,
*archive_entry_uname*
- functions for manipulating archive entry descriptions
== SYNOPSIS ==
*#include <archive_entry.h>*
<br>
*void*
<br>
*archive_entry_acl_add_entry*(_struct archive_entry `*`_, _int type_, _int permset_, _int tag_, _int qual_, _const char `*`name_);
<br>
*void*
<br>
*archive_entry_acl_add_entry_w*(_struct archive_entry `*`_, _int type_, _int permset_, _int tag_, _int qual_, _const wchar_t `*`name_);
<br>
*void*
<br>
*archive_entry_acl_clear*(_struct archive_entry `*`_);
<br>
*int*
<br>
*archive_entry_acl_count*(_struct archive_entry `*`_, _int type_);
<br>
*int*
<br>
*archive_entry_acl_next*(_struct archive_entry `*`_, _int want_type_, _int `*`type_, _int `*`permset_, _int `*`tag_, _int `*`qual_, _const char `*``*`name_);
<br>
*int*
<br>
*archive_entry_acl_next_w*(_struct archive_entry `*`_, _int want_type_, _int `*`type_, _int `*`permset_, _int `*`tag_, _int `*`qual_, _const wchar_t `*``*`name_);
<br>
*int*
<br>
*archive_entry_acl_reset*(_struct archive_entry `*`_, _int want_type_);
<br>
*const wchar_t `*`*
<br>
*archive_entry_acl_text_w*(_struct archive_entry `*`_, _int flags_);
<br>
*time_t*
<br>
*archive_entry_atime*(_struct archive_entry `*`_);
<br>
*long*
<br>
*archive_entry_atime_nsec*(_struct archive_entry `*`_);
<br>
*struct archive_entry `*`*
<br>
*archive_entry_clear*(_struct archive_entry `*`_);
<br>
*struct archive_entry `*`*
<br>
*archive_entry_clone*(_struct archive_entry `*`_);
<br>
*const char `*` `*`*
<br>
*archive_entry_copy_fflags_text_w*(_struct archive_entry `*`_, _const char `*`_);
<br>
*const wchar_t `*`*
<br>
*archive_entry_copy_fflags_text_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*void*
<br>
*archive_entry_copy_gname*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_copy_gname_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*void*
<br>
*archive_entry_copy_hardlink*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_copy_hardlink_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*void*
<br>
*archive_entry_copy_sourcepath*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_copy_pathname_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*void*
<br>
*archive_entry_copy_stat*(_struct archive_entry `*`_, _const struct stat `*`_);
<br>
*void*
<br>
*archive_entry_copy_symlink*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_copy_symlink_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*void*
<br>
*archive_entry_copy_uname*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_copy_uname_w*(_struct archive_entry `*`_, _const wchar_t `*`_);
<br>
*dev_t*
<br>
*archive_entry_dev*(_struct archive_entry `*`_);
<br>
*dev_t*
<br>
*archive_entry_devmajor*(_struct archive_entry `*`_);
<br>
*dev_t*
<br>
*archive_entry_devminor*(_struct archive_entry `*`_);
<br>
*mode_t*
<br>
*archive_entry_filetype*(_struct archive_entry `*`_);
<br>
*void*
<br>
*archive_entry_fflags*(_struct archive_entry `*`_, _unsigned long `*`set_, _unsigned long `*`clear_);
<br>
*const char `*`*
<br>
*archive_entry_fflags_text*(_struct archive_entry `*`_);
<br>
*void*
<br>
*archive_entry_free*(_struct archive_entry `*`_);
<br>
*const char `*`*
<br>
*archive_entry_gname*(_struct archive_entry `*`_);
<br>
*const char `*`*
<br>
*archive_entry_hardlink*(_struct archive_entry `*`_);
<br>
*ino_t*
<br>
*archive_entry_ino*(_struct archive_entry `*`_);
<br>
*mode_t*
<br>
*archive_entry_mode*(_struct archive_entry `*`_);
<br>
*time_t*
<br>
*archive_entry_mtime*(_struct archive_entry `*`_);
<br>
*long*
<br>
*archive_entry_mtime_nsec*(_struct archive_entry `*`_);
<br>
*unsigned int*
<br>
*archive_entry_nlink*(_struct archive_entry `*`_);
<br>
*struct archive_entry `*`*
<br>
*archive_entry_new*(_void_);
<br>
*const char `*`*
<br>
*archive_entry_pathname*(_struct archive_entry `*`_);
<br>
*const wchar_t `*`*
<br>
*archive_entry_pathname_w*(_struct archive_entry `*`_);
<br>
*dev_t*
<br>
*archive_entry_rdev*(_struct archive_entry `*`_);
<br>
*dev_t*
<br>
*archive_entry_rdevmajor*(_struct archive_entry `*`_);
<br>
*dev_t*
<br>
*archive_entry_rdevminor*(_struct archive_entry `*`_);
<br>
*void*
<br>
*archive_entry_set_dev*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_devmajor*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_devminor*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_filetype*(_struct archive_entry `*`_, _unsigned int_);
<br>
*void*
<br>
*archive_entry_set_fflags*(_struct archive_entry `*`_, _unsigned long set_, _unsigned long clear_);
<br>
*void*
<br>
*archive_entry_set_gid*(_struct archive_entry `*`_, _gid_t_);
<br>
*void*
<br>
*archive_entry_set_gname*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_set_hardlink*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_set_ino*(_struct archive_entry `*`_, _unsigned long_);
<br>
*void*
<br>
*archive_entry_set_link*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_set_mode*(_struct archive_entry `*`_, _mode_t_);
<br>
*void*
<br>
*archive_entry_set_mtime*(_struct archive_entry `*`_, _time_t_, _long nanos_);
<br>
*void*
<br>
*archive_entry_set_nlink*(_struct archive_entry `*`_, _unsigned int_);
<br>
*void*
<br>
*archive_entry_set_pathname*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_set_rdev*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_rdevmajor*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_rdevminor*(_struct archive_entry `*`_, _dev_t_);
<br>
*void*
<br>
*archive_entry_set_size*(_struct archive_entry `*`_, _int64_t_);
<br>
*void*
<br>
*archive_entry_set_symlink*(_struct archive_entry `*`_, _const char `*`_);
<br>
*void*
<br>
*archive_entry_set_uid*(_struct archive_entry `*`_, _uid_t_);
<br>
*void*
<br>
*archive_entry_set_uname*(_struct archive_entry `*`_, _const char `*`_);
<br>
*int64_t*
<br>
*archive_entry_size*(_struct archive_entry `*`_);
<br>
*const char `*`*
<br>
*archive_entry_sourcepath*(_struct archive_entry `*`_);
<br>
*const struct stat `*`*
<br>
*archive_entry_stat*(_struct archive_entry `*`_);
<br>
*const char `*`*
<br>
*archive_entry_symlink*(_struct archive_entry `*`_);
<br>
*const char `*`*
<br>
*archive_entry_uname*(_struct archive_entry `*`_);
== DESCRIPTION ==
These functions create and manipulate data objects that
represent entries within an archive.
You can think of a
*struct archive_entry*
as a heavy-duty version of
*struct stat :*
it includes everything from
*struct stat*
plus associated pathname, textual group and user names, etc.
These objects are used by
*libarchive*(3)
to represent the metadata associated with a particular
entry in an archive.
=== Create and Destroy===
There are functions to allocate, destroy, clear, and copy
_archive_entry_
objects:
<dl>
<dt>*archive_entry_clear*()</dt><dd>
Erases the object, resetting all internal fields to the
same state as a newly-created object.
This is provided to allow you to quickly recycle objects
without thrashing the heap.
</dd><dt>*archive_entry_clone*()</dt><dd>
A deep copy operation; all text fields are duplicated.
</dd><dt>*archive_entry_free*()</dt><dd>
Releases the
*struct archive_entry*
object.
</dd><dt>*archive_entry_new*()</dt><dd>
Allocate and return a blank
*struct archive_entry*
object.
</dd></dl>
=== Set and Get Functions===
Most of the functions here set or read entries in an object.
Such functions have one of the following forms:
<dl>
<dt>*archive_entry_set_XXXX*()</dt><dd>
Stores the provided data in the object.
In particular, for strings, the pointer is stored,
not the referenced string.
</dd><dt>*archive_entry_copy_XXXX*()</dt><dd>
As above, except that the referenced data is copied
into the object.
</dd><dt>*archive_entry_XXXX*()</dt><dd>
Returns the specified data.
In the case of strings, a const-qualified pointer to
the string is returned.
</dd></dl>
String data can be set or accessed as wide character strings
or normal
_char_
strings.
The functions that use wide character strings are suffixed with
*`_`w*.
Note that these are different representations of the same data:
For example, if you store a narrow string and read the corresponding
wide string, the object will transparently convert formats
using the current locale.
Similarly, if you store a wide string and then store a
narrow string for the same data, the previously-set wide string will
be discarded in favor of the new data.

There are a few set/get functions that merit additional description:
<dl>
<dt>*archive_entry_set_link*()</dt><dd>
This function sets the symlink field if it is already set.
Otherwise, it sets the hardlink field.
</dd></dl>
=== File Flags===
File flags are transparently converted between a bitmap
representation and a textual format.
For example, if you set the bitmap and ask for text, the library
will build a canonical text format.
However, if you set a text format and request a text format,
you will get back the same text, even if it is ill-formed.
If you need to canonicalize a textual flags string, you should first set the
text form, then request the bitmap form, then use that to set the bitmap form.
Setting the bitmap format will clear the internal text representation
and force it to be reconstructed when you next request the text form.

The bitmap format consists of two integers, one containing bits
that should be set, the other specifying bits that should be
cleared.
Bits not mentioned in either bitmap will be ignored.
Usually, the bitmap of bits to be cleared will be set to zero.
In unusual circumstances, you can force a fully-specified set
of file flags by setting the bitmap of flags to clear to the complement
of the bitmap of flags to set.
(This differs from
*fflagstostr*(3),
which only includes names for set bits.)
Converting a bitmap to a textual string is a platform-specific
operation; bits that are not meaningful on the current platform
will be ignored.

The canonical text format is a comma-separated list of flag names.
The
*archive_entry_copy_fflags_text*()
and
*archive_entry_copy_fflags_text_w*()
functions parse the provided text and sets the internal bitmap values.
This is a platform-specific operation; names that are not meaningful
on the current platform will be ignored.
The function returns a pointer to the start of the first name that was not
recognized, or NULL if every name was recognized.
Note that every name--including names that follow an unrecognized name--will
be evaluated, and the bitmaps will be set to reflect every name that is
recognized.
(In particular, this differs from
*strtofflags*(3),
which stops parsing at the first unrecognized name.)
=== ACL Handling===
XXX This needs serious help.
XXX

An
"Access Control List"
(ACL) is a list of permissions that grant access to particular users or
groups beyond what would normally be provided by standard POSIX mode bits.
The ACL handling here addresses some deficiencies in the POSIX.1e draft 17 ACL
specification.
In particular, POSIX.1e draft 17 specifies several different formats, but
none of those formats include both textual user/group names and numeric
UIDs/GIDs.

XXX explain ACL stuff XXX
== SEE ALSO ==
*archive*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki
#summary archive_read 3 manual page
== NAME ==
*archive_read_new*,
*archive_read_set_filter_options*,
*archive_read_set_format_options*,
*archive_read_set_options*,
*archive_read_support_compression_all*,
*archive_read_support_compression_bzip2*,
*archive_read_support_compression_compress*,
*archive_read_support_compression_gzip*,
*archive_read_support_compression_lzma*,
*archive_read_support_compression_none*,
*archive_read_support_compression_xz*,
*archive_read_support_compression_program*,
*archive_read_support_compression_program_signature*,
*archive_read_support_format_all*,
*archive_read_support_format_ar*,
*archive_read_support_format_cpio*,
*archive_read_support_format_empty*,
*archive_read_support_format_iso9660*,
*archive_read_support_format_mtree,*
*archive_read_support_format_raw,*
*archive_read_support_format_tar*,
*archive_read_support_format_zip*,
*archive_read_open*,
*archive_read_open2*,
*archive_read_open_fd*,
*archive_read_open_FILE*,
*archive_read_open_filename*,
*archive_read_open_memory*,
*archive_read_next_header*,
*archive_read_next_header2*,
*archive_read_data*,
*archive_read_data_block*,
*archive_read_data_skip*,
*archive_read_data_into_buffer*,
*archive_read_data_into_fd*,
*archive_read_extract*,
*archive_read_extract2*,
*archive_read_extract_set_progress_callback*,
*archive_read_close*,
*archive_read_finish*
- functions for reading streaming archives
== SYNOPSIS ==
*#include <archive.h>*
<br>
*struct archive `*`*
<br>
*archive_read_new*(_void_);
<br>
*int*
<br>
*archive_read_support_compression_all*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_bzip2*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_compress*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_gzip*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_lzma*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_none*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_xz*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_compression_program*(_struct archive `*`_, _const char `*`cmd_);
<br>
*int*
<br>
*archive_read_support_compression_program_signature*(_struct archive `*`_, _const char `*`cmd_, _const void `*`signature_, _size_t signature_length_);
<br>
*int*
<br>
*archive_read_support_format_all*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_ar*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_cpio*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_empty*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_iso9660*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_mtree*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_raw*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_tar*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_support_format_zip*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_set_filter_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_read_set_format_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_read_set_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_read_open*(_struct archive `*`_, _void `*`client_data_, _archive_open_callback `*`_, _archive_read_callback `*`_, _archive_close_callback `*`_);
<br>
*int*
<br>
*archive_read_open2*(_struct archive `*`_, _void `*`client_data_, _archive_open_callback `*`_, _archive_read_callback `*`_, _archive_skip_callback `*`_, _archive_close_callback `*`_);
<br>
*int*
<br>
*archive_read_open_FILE*(_struct archive `*`_, _FILE `*`file_);
<br>
*int*
<br>
*archive_read_open_fd*(_struct archive `*`_, _int fd_, _size_t block_size_);
<br>
*int*
<br>
*archive_read_open_filename*(_struct archive `*`_, _const char `*`filename_, _size_t block_size_);
<br>
*int*
<br>
*archive_read_open_memory*(_struct archive `*`_, _void `*`buff_, _size_t size_);
<br>
*int*
<br>
*archive_read_next_header*(_struct archive `*`_, _struct archive_entry `*``*`_);
<br>
*int*
<br>
*archive_read_next_header2*(_struct archive `*`_, _struct archive_entry `*`_);
<br>
*ssize_t*
<br>
*archive_read_data*(_struct archive `*`_, _void `*`buff_, _size_t len_);
<br>
*int*
<br>
*archive_read_data_block*(_struct archive `*`_, _const void `*``*`buff_, _size_t `*`len_, _off_t `*`offset_);
<br>
*int*
<br>
*archive_read_data_skip*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_data_into_buffer*(_struct archive `*`_, _void `*`_, _ssize_t len_);
<br>
*int*
<br>
*archive_read_data_into_fd*(_struct archive `*`_, _int fd_);
<br>
*int*
<br>
*archive_read_extract*(_struct archive `*`_, _struct archive_entry `*`_, _int flags_);
<br>
*int*
<br>
*archive_read_extract2*(_struct archive `*`src_, _struct archive_entry `*`_, _struct archive `*`dest_);
<br>
*void*
<br>
*archive_read_extract_set_progress_callback*(_struct archive `*`_, _void (`*`func)(void `*`)_, _void `*`user_data_);
<br>
*int*
<br>
*archive_read_close*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_finish*(_struct archive `*`_);
== DESCRIPTION ==
These functions provide a complete API for reading streaming archives.
The general process is to first create the
*struct archive*
object, set options, initialize the reader, iterate over the archive
headers and associated data, then close the archive and release all
resources.
The following summary describes the functions in approximately the
order they would be used:
<dl>
<dt>*archive_read_new*()</dt><dd>
Allocates and initializes a
*struct archive*
object suitable for reading from an archive.
</dd><dt>
*archive_read_support_compression_bzip2*(),
*archive_read_support_compression_compress*(),
*archive_read_support_compression_gzip*(),
*archive_read_support_compression_lzma*(),
*archive_read_support_compression_none*(),
*archive_read_support_compression_xz*()
</dt> <dd>
Enables auto-detection code and decompression support for the
specified compression.
Returns
*ARCHIVE_OK*
if the compression is fully supported, or
*ARCHIVE_WARN*
if the compression is supported only through an external program.
Note that decompression using an external program is usually slower than
decompression through built-in libraries.
Note that
"none"
is always enabled by default.
</dd><dt>*archive_read_support_compression_all*()</dt><dd>
Enables all available decompression filters.
</dd><dt>*archive_read_support_compression_program*()</dt><dd>
Data is fed through the specified external program before being dearchived.
Note that this disables automatic detection of the compression format,
so it makes no sense to specify this in conjunction with any other
decompression option.
</dd><dt>*archive_read_support_compression_program_signature*()</dt><dd>
This feeds data through the specified external program
but only if the initial bytes of the data match the specified
signature value.
</dd><dt>
*archive_read_support_format_all*(),
*archive_read_support_format_ar*(),
*archive_read_support_format_cpio*(),
*archive_read_support_format_empty*(),
*archive_read_support_format_iso9660*(),
*archive_read_support_format_mtree*(),
*archive_read_support_format_tar*(),
*archive_read_support_format_zip*()
</dt> <dd>
Enables support---including auto-detection code---for the
specified archive format.
For example,
*archive_read_support_format_tar*()
enables support for a variety of standard tar formats, old-style tar,
ustar, pax interchange format, and many common variants.
For convenience,
*archive_read_support_format_all*()
enables support for all available formats.
Only empty archives are supported by default.
</dd><dt>*archive_read_support_format_raw*()</dt><dd>
The
"raw"
format handler allows libarchive to be used to read arbitrary data.
It treats any data stream as an archive with a single entry.
The pathname of this entry is
"data ;"
all other entry fields are unset.
This is not enabled by
*archive_read_support_format_all*()
in order to avoid erroneous handling of damaged archives.
</dd><dt>
*archive_read_set_filter_options*(),
*archive_read_set_format_options*(),
*archive_read_set_options*()
</dt> <dd>
Specifies options that will be passed to currently-registered
filters (including decompression filters) and/or format readers.
The argument is a comma-separated list of individual options.
Individual options have one of the following forms:
<dl>
<dt>_option=value_</dt><dd>
The option/value pair will be provided to every module.
Modules that do not accept an option with this name will ignore it.
</dd><dt>_option_</dt><dd>
The option will be provided to every module with a value of
"1".
</dd><dt>_!option_</dt><dd>
The option will be provided to every module with a NULL value.
</dd><dt>_module:option=value_, _module:option_, _module:!option_</dt><dd>
As above, but the corresponding option and value will be provided
only to modules whose name matches
_module_.
</dd></dl>
The return value will be
*ARCHIVE_OK*
if any module accepts the option, or
*ARCHIVE_WARN*
if no module accepted the option, or
*ARCHIVE_FATAL*
if there was a fatal error while attempting to process the option.

The currently supported options are:
<dl>
<dt>Format iso9660</dt><dd>
<dl>
<dt>*joliet*</dt><dd>
Support Joliet extensions.
Defaults to enabled, use
*!joliet*
to disable.
</dd></dl>
</dd></dl>
</dd><dt>*archive_read_open*()</dt><dd>
The same as
*archive_read_open2*(),
except that the skip callback is assumed to be
NULL.
</dd><dt>*archive_read_open2*()</dt><dd>
Freeze the settings, open the archive, and prepare for reading entries.
This is the most generic version of this call, which accepts
four callback functions.
Most clients will want to use
*archive_read_open_filename*(),
*archive_read_open_FILE*(),
*archive_read_open_fd*(),
or
*archive_read_open_memory*()
instead.
The library invokes the client-provided functions to obtain
raw bytes from the archive.
</dd><dt>*archive_read_open_FILE*()</dt><dd>
Like
*archive_read_open*(),
except that it accepts a
*FILE `*`*
pointer.
This function should not be used with tape drives or other devices
that require strict I/O blocking.
</dd><dt>*archive_read_open_fd*()</dt><dd>
Like
*archive_read_open*(),
except that it accepts a file descriptor and block size rather than
a set of function pointers.
Note that the file descriptor will not be automatically closed at
end-of-archive.
This function is safe for use with tape drives or other blocked devices.
</dd><dt>*archive_read_open_file*()</dt><dd>
This is a deprecated synonym for
*archive_read_open_filename*().
</dd><dt>*archive_read_open_filename*()</dt><dd>
Like
*archive_read_open*(),
except that it accepts a simple filename and a block size.
A NULL filename represents standard input.
This function is safe for use with tape drives or other blocked devices.
</dd><dt>*archive_read_open_memory*()</dt><dd>
Like
*archive_read_open*(),
except that it accepts a pointer and size of a block of
memory containing the archive data.
</dd><dt>*archive_read_next_header*()</dt><dd>
Read the header for the next entry and return a pointer to
a
*struct archive_entry .*
This is a convenience wrapper around
*archive_read_next_header2*()
that reuses an internal
*struct archive_entry*
object for each request.
</dd><dt>*archive_read_next_header2*()</dt><dd>
Read the header for the next entry and populate the provided
*struct archive_entry .*
</dd><dt>*archive_read_data*()</dt><dd>
Read data associated with the header just read.
Internally, this is a convenience function that calls
*archive_read_data_block*()
and fills any gaps with nulls so that callers see a single
continuous stream of data.
</dd><dt>*archive_read_data_block*()</dt><dd>
Return the next available block of data for this entry.
Unlike
*archive_read_data*(),
the
*archive_read_data_block*()
function avoids copying data and allows you to correctly handle
sparse files, as supported by some archive formats.
The library guarantees that offsets will increase and that blocks
will not overlap.
Note that the blocks returned from this function can be much larger
than the block size read from disk, due to compression
and internal buffer optimizations.
</dd><dt>*archive_read_data_skip*()</dt><dd>
A convenience function that repeatedly calls
*archive_read_data_block*()
to skip all of the data for this archive entry.
</dd><dt>*archive_read_data_into_buffer*()</dt><dd>
This function is deprecated and will be removed.
Use
*archive_read_data*()
instead.
</dd><dt>*archive_read_data_into_fd*()</dt><dd>
A convenience function that repeatedly calls
*archive_read_data_block*()
to copy the entire entry to the provided file descriptor.
</dd><dt>*archive_read_extract*(), *archive_read_extract_set_skip_file*()</dt><dd>
A convenience function that wraps the corresponding
*archive_write_disk*(3)
interfaces.
The first call to
*archive_read_extract*()
creates a restore object using
*archive_write_disk_new*(3)
and
*archive_write_disk_set_standard_lookup*(3),
then transparently invokes
*archive_write_disk_set_options*(3),
*archive_write_header*(3),
*archive_write_data*(3),
and
*archive_write_finish_entry*(3)
to create the entry on disk and copy data into it.
The
_flags_
argument is passed unmodified to
*archive_write_disk_set_options*(3).
</dd><dt>*archive_read_extract2*()</dt><dd>
This is another version of
*archive_read_extract*()
that allows you to provide your own restore object.
In particular, this allows you to override the standard lookup functions
using
*archive_write_disk_set_group_lookup*(3),
and
*archive_write_disk_set_user_lookup*(3).
Note that
*archive_read_extract2*()
does not accept a
_flags_
argument; you should use
*archive_write_disk_set_options*()
to set the restore options yourself.
</dd><dt>*archive_read_extract_set_progress_callback*()</dt><dd>
Sets a pointer to a user-defined callback that can be used
for updating progress displays during extraction.
The progress function will be invoked during the extraction of large
regular files.
The progress function will be invoked with the pointer provided to this call.
Generally, the data pointed to should include a reference to the archive
object and the archive_entry object so that various statistics
can be retrieved for the progress display.
</dd><dt>*archive_read_close*()</dt><dd>
Complete the archive and invoke the close callback.
</dd><dt>*archive_read_finish*()</dt><dd>
Invokes
*archive_read_close*()
if it was not invoked manually, then release all resources.
Note: In libarchive 1.x, this function was declared to return
*void ,*
which made it impossible to detect certain errors when
*archive_read_close*()
was invoked implicitly from this function.
The declaration is corrected beginning with libarchive 2.0.
</dd></dl>

Note that the library determines most of the relevant information about
the archive by inspection.
In particular, it automatically detects
*gzip*(1)
or
*bzip2*(1)
compression and transparently performs the appropriate decompression.
It also automatically detects the archive format.

A complete description of the
*struct archive*
and
*struct archive_entry*
objects can be found in the overview manual page for
*libarchive*(3).
== CLIENT CALLBACKS ==
The callback functions must match the following prototypes:
<ul>
<li>
*typedef ssize_t*
*archive_read_callback*(_struct archive `*`_, _void `*`client_data_, _const void `*``*`buffer_)
</li><li>
*typedef int*
*archive_skip_callback*(_struct archive `*`_, _void `*`client_data_, _size_t request_)
</li><li>
*typedef int*
*archive_open_callback*(_struct archive `*`_, _void `*`client_data_)
</li><li>
*typedef int*
*archive_close_callback*(_struct archive `*`_, _void `*`client_data_)
</li></ul>

The open callback is invoked by
*archive_open*().
It should return
*ARCHIVE_OK*
if the underlying file or data source is successfully
opened.
If the open fails, it should call
*archive_set_error*()
to register an error code and message and return
*ARCHIVE_FATAL*.

The read callback is invoked whenever the library
requires raw bytes from the archive.
The read callback should read data into a buffer,
set the
{{{
const void **buffer
}}}
argument to point to the available data, and
return a count of the number of bytes available.
The library will invoke the read callback again
only after it has consumed this data.
The library imposes no constraints on the size
of the data blocks returned.
On end-of-file, the read callback should
return zero.
On error, the read callback should invoke
*archive_set_error*()
to register an error code and message and
return -1.

The skip callback is invoked when the
library wants to ignore a block of data.
The return value is the number of bytes actually
skipped, which may differ from the request.
If the callback cannot skip data, it should return
zero.
If the skip callback is not provided (the
function pointer is
NULL ),
the library will invoke the read function
instead and simply discard the result.
A skip callback can provide significant
performance gains when reading uncompressed
archives from slow disk drives or other media
that can skip quickly.

The close callback is invoked by archive_close when
the archive processing is complete.
The callback should return
*ARCHIVE_OK*
on success.
On failure, the callback should invoke
*archive_set_error*()
to register an error code and message and
return
*ARCHIVE_FATAL.*
== EXAMPLE ==
The following illustrates basic usage of the library.
In this example,
the callback functions are simply wrappers around the standard
*open*(2),
*read*(2),
and
*close*(2)
system calls.
{{{
void
list_archive(const char *name)
{
  struct mydata *mydata;
  struct archive *a;
  struct archive_entry *entry;
  mydata = malloc(sizeof(struct mydata));
  a = archive_read_new();
  mydata->name = name;
  archive_read_support_compression_all(a);
  archive_read_support_format_all(a);
  archive_read_open(a, mydata, myopen, myread, myclose);
  while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
    printf("%s\\n",archive_entry_pathname(entry));
    archive_read_data_skip(a);
  }
  archive_read_finish(a);
  free(mydata);
}
ssize_t
myread(struct archive *a, void *client_data, const void **buff)
{
  struct mydata *mydata = client_data;
  *buff = mydata->buff;
  return (read(mydata->fd, mydata->buff, 10240));
}
int
myopen(struct archive *a, void *client_data)
{
  struct mydata *mydata = client_data;
  mydata->fd = open(mydata->name, O_RDONLY);
  return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
}
int
myclose(struct archive *a, void *client_data)
{
  struct mydata *mydata = client_data;
  if (mydata->fd > 0)
    close(mydata->fd);
  return (ARCHIVE_OK);
}
}}}
== RETURN VALUES ==
Most functions return zero on success, non-zero on error.
The possible return codes include:
*ARCHIVE_OK*
(the operation succeeded),
*ARCHIVE_WARN*
(the operation succeeded but a non-critical error was encountered),
*ARCHIVE_EOF*
(end-of-archive was encountered),
*ARCHIVE_RETRY*
(the operation failed but can be retried),
and
*ARCHIVE_FATAL*
(there was a fatal error; the archive should be closed immediately).
Detailed error codes and textual descriptions are available from the
*archive_errno*()
and
*archive_error_string*()
functions.

*archive_read_new*()
returns a pointer to a freshly allocated
*struct archive*
object.
It returns
NULL
on error.

*archive_read_data*()
returns a count of bytes actually read or zero at the end of the entry.
On error, a value of
*ARCHIVE_FATAL*,
*ARCHIVE_WARN*,
or
*ARCHIVE_RETRY*
is returned and an error code and textual description can be retrieved from the
*archive_errno*()
and
*archive_error_string*()
functions.

The library expects the client callbacks to behave similarly.
If there is an error, you can use
*archive_set_error*()
to set an appropriate error code and description,
then return one of the non-zero values above.
(Note that the value eventually returned to the client may
not be the same; many errors that are not critical at the level
of basic I/O can prevent the archive from being properly read,
thus most I/O errors eventually cause
*ARCHIVE_FATAL*
to be returned.)
== SEE ALSO ==
*tar*(1),
*archive*(3),
*archive_util*(3),
*tar*(5)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>
== BUGS ==
Many traditional archiver programs treat
empty files as valid empty archives.
For example, many implementations of
*tar*(1)
allow you to append entries to an empty file.
Of course, it is impossible to determine the format of an empty file
by inspecting the contents, so this library treats empty files as
having a special
"empty"
format.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki
#summary archive_read_disk 3 manual page
== NAME ==
*archive_read_disk_new*,
*archive_read_disk_set_symlink_logical*,
*archive_read_disk_set_symlink_physical*,
*archive_read_disk_set_symlink_hybrid*,
*archive_read_disk_entry_from_file*,
*archive_read_disk_gname*,
*archive_read_disk_uname*,
*archive_read_disk_set_uname_lookup*,
*archive_read_disk_set_gname_lookup*,
*archive_read_disk_set_standard_lookup*,
*archive_read_close*,
*archive_read_finish*
- functions for reading objects from disk
== SYNOPSIS ==
*#include <archive.h>*
<br>
*struct archive `*`*
<br>
*archive_read_disk_new*(_void_);
<br>
*int*
<br>
*archive_read_disk_set_symlink_logical*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_disk_set_symlink_physical*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_disk_set_symlink_hybrid*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_disk_gname*(_struct archive `*`_, _gid_t_);
<br>
*int*
<br>
*archive_read_disk_uname*(_struct archive `*`_, _uid_t_);
<br>
*int*
<br>
*archive_read_disk_set_gname_lookup*(_struct archive `*`_, _void `*`_, _const char `*`(`*`lookup)(void `*`, gid_t)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_read_disk_set_uname_lookup*(_struct archive `*`_, _void `*`_, _const char `*`(`*`lookup)(void `*`, uid_t)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_read_disk_set_standard_lookup*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_disk_entry_from_file*(_struct archive `*`_, _struct archive_entry `*`_, _int fd_, _const struct stat `*`_);
<br>
*int*
<br>
*archive_read_close*(_struct archive `*`_);
<br>
*int*
<br>
*archive_read_finish*(_struct archive `*`_);
== DESCRIPTION ==
These functions provide an API for reading information about
objects on disk.
In particular, they provide an interface for populating
*struct archive_entry*
objects.
<dl>
<dt>*archive_read_disk_new*()</dt><dd>
Allocates and initializes a
*struct archive*
object suitable for reading object information from disk.
</dd><dt>
*archive_read_disk_set_symlink_logical*(),
*archive_read_disk_set_symlink_physical*(),
*archive_read_disk_set_symlink_hybrid*()
</dt> <dd>
This sets the mode used for handling symbolic links.
The
"logical"
mode follows all symbolic links.
The
"physical"
mode does not follow any symbolic links.
The
"hybrid"
mode currently behaves identically to the
"logical"
mode.
</dd><dt>
*archive_read_disk_gname*(),
*archive_read_disk_uname*()
</dt> <dd>
Returns a user or group name given a gid or uid value.
By default, these always return a NULL string.
</dd><dt>
*archive_read_disk_set_gname_lookup*(),
*archive_read_disk_set_uname_lookup*()
</dt> <dd>
These allow you to override the functions used for
user and group name lookups.
You may also provide a
*void `*`*
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
*struct archive*
object is destroyed or when new lookup functions are registered.
</dd><dt>*archive_read_disk_set_standard_lookup*()</dt><dd>
This convenience function installs a standard set of user
and group name lookup functions.
These functions use
*getpwid*(3)
and
*getgrid*(3)
to convert ids to names, defaulting to NULL if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
*getpwid*(3)
and
*getgrid*(3).
</dd><dt>*archive_read_disk_entry_from_file*()</dt><dd>
Populates a
*struct archive_entry*
object with information about a particular file.
The
*archive_entry*
object must have already been created with
*archive_entry_new*(3)
and at least one of the source path or path fields must already be set.
(If both are set, the source path will be used.)

Information is read from disk using the path name from the
*struct archive_entry*
object.
If a file descriptor is provided, some information will be obtained using
that file descriptor, on platforms that support the appropriate
system calls.

If a pointer to a
*struct stat*
is provided, information from that structure will be used instead
of reading from the disk where appropriate.
This can provide performance benefits in scenarios where
*struct stat*
information has already been read from the disk as a side effect
of some other operation.
(For example, directory traversal libraries often provide this information.)

Where necessary, user and group ids are converted to user and group names
using the currently registered lookup functions above.
This affects the file ownership fields and ACL values in the
*struct archive_entry*
object.
</dd><dt>*archive_read_close*()</dt><dd>
This currently does nothing.
</dd><dt>*archive_write_finish*()</dt><dd>
Invokes
*archive_write_close*()
if it was not invoked manually, then releases all resources.
</dd></dl>
More information about the
_struct_ archive
object and the overall design of the library can be found in the
*libarchive*(3)
overview.
== EXAMPLE ==
The following illustrates basic usage of the library by
showing how to use it to copy an item on disk into an archive.
{{{
void
file_to_archive(struct archive *a, const char *name)
{
  char buff[8192];
  size_t bytes_read;
  struct archive *ard;
  struct archive_entry *entry;
  int fd;
  ard = archive_read_disk_new();
  archive_read_disk_set_standard_lookup(ard);
  entry = archive_entry_new();
  fd = open(name, O_RDONLY);
  if (fd < 0)
     return;
  archive_entry_copy_sourcepath(entry, name);
  archive_read_disk_entry_from_file(ard, entry, fd, NULL);
  archive_write_header(a, entry);
  while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
    archive_write_data(a, buff, bytes_read);
  archive_write_finish_entry(a);
  archive_read_finish(ard);
  archive_entry_free(entry);
}
}}}
== RETURN VALUES ==
Most functions return
*ARCHIVE_OK*
(zero) on success, or one of several negative
error codes for errors.
Specific error codes include:
*ARCHIVE_RETRY*
for operations that might succeed if retried,
*ARCHIVE_WARN*
for unusual conditions that do not prevent further operations, and
*ARCHIVE_FATAL*
for serious errors that make remaining operations impossible.
The
*archive_errno*(3)
and
*archive_error_string*(3)
functions can be used to retrieve an appropriate error code and a
textual error message.
(See
*archive_util*(3)
for details.)

*archive_read_disk_new*()
returns a pointer to a newly-allocated
*struct archive*
object or NULL if the allocation failed for any reason.

*archive_read_disk_gname*()
and
*archive_read_disk_uname*()
return
*const char `*`*
pointers to the textual name or NULL if the lookup failed for any reason.
The returned pointer points to internal storage that
may be reused on the next call to either of these functions;
callers should copy the string if they need to continue accessing it.

== SEE ALSO ==
*archive_read*(3),
*archive_write*(3),
*archive_write_disk*(3),
*tar*(1),
*libarchive*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
The
*archive_read_disk*
interface was added to
*libarchive* 2.6
and first appeared in
FreeBSD 8.0.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@freebsd.org.>
== BUGS ==
The
"standard"
user name and group name lookup functions are not the defaults because
*getgrid*(3)
and
*getpwid*(3)
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.

The full list of metadata read from disk by
*archive_read_disk_entry_from_file*()
is necessarily system-dependent.

The
*archive_read_disk_entry_from_file*()
function reads as much information as it can from disk.
Some method should be provided to limit this so that clients who
do not need ACLs, for instance, can avoid the extra work needed
to look up such information.

This API should provide a set of methods for walking a directory tree.
That would make it a direct parallel of the
*archive_read*(3)
API.
When such methods are implemented, the
"hybrid"
symbolic link mode will make sense.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki
#summary archive_util 3 manual page
== NAME ==
*archive_clear_error*,
*archive_compression*,
*archive_compression_name*,
*archive_copy_error*,
*archive_errno*,
*archive_error_string*,
*archive_file_count*,
*archive_format*,
*archive_format_name*,
*archive_set_error*
- libarchive utility functions
== SYNOPSIS ==
*#include <archive.h>*
<br>
*void*
<br>
*archive_clear_error*(_struct archive `*`_);
<br>
*int*
<br>
*archive_compression*(_struct archive `*`_);
<br>
*const char `*`*
<br>
*archive_compression_name*(_struct archive `*`_);
<br>
*void*
<br>
*archive_copy_error*(_struct archive `*`_, _struct archive `*`_);
<br>
*int*
<br>
*archive_errno*(_struct archive `*`_);
<br>
*const char `*`*
<br>
*archive_error_string*(_struct archive `*`_);
<br>
*int*
<br>
*archive_file_count*(_struct archive `*`_);
<br>
*int*
<br>
*archive_format*(_struct archive `*`_);
<br>
*const char `*`*
<br>
*archive_format_name*(_struct archive `*`_);
<br>
*void*
<br>
*archive_set_error*(_struct archive `*`_, _int error_code_, _const char `*`fmt_, _..._);
== DESCRIPTION ==
These functions provide access to various information about the
*struct archive*
object used in the
*libarchive*(3)
library.
<dl>
<dt>*archive_clear_error*()</dt><dd>
Clears any error information left over from a previous call.
Not generally used in client code.
</dd><dt>*archive_compression*()</dt><dd>
Returns a numeric code indicating the current compression.
This value is set by
*archive_read_open*().
</dd><dt>*archive_compression_name*()</dt><dd>
Returns a text description of the current compression suitable for display.
</dd><dt>*archive_copy_error*()</dt><dd>
Copies error information from one archive to another.
</dd><dt>*archive_errno*()</dt><dd>
Returns a numeric error code (see
*errno*(2))
indicating the reason for the most recent error return.
</dd><dt>*archive_error_string*()</dt><dd>
Returns a textual error message suitable for display.
The error message here is usually more specific than that
obtained from passing the result of
*archive_errno*()
to
*strerror*(3).
</dd><dt>*archive_file_count*()</dt><dd>
Returns a count of the number of files processed by this archive object.
The count is incremented by calls to
*archive_write_header*()
or
*archive_read_next_header*(.)
</dd><dt>*archive_format*()</dt><dd>
Returns a numeric code indicating the format of the current
archive entry.
This value is set by a successful call to
*archive_read_next_header*().
Note that it is common for this value to change from
entry to entry.
For example, a tar archive might have several entries that
utilize GNU tar extensions and several entries that do not.
These entries will have different format codes.
</dd><dt>*archive_format_name*()</dt><dd>
A textual description of the format of the current entry.
</dd><dt>*archive_set_error*()</dt><dd>
Sets the numeric error code and error description that will be returned
by
*archive_errno*()
and
*archive_error_string*().
This function should be used within I/O callbacks to set system-specific
error codes and error descriptions.
This function accepts a printf-like format string and arguments.
However, you should be careful to use only the following printf
format specifiers:
"%c",
"%d",
"%jd",
"%jo",
"%ju",
"%jx",
"%ld",
"%lo",
"%lu",
"%lx",
"%o",
"%u",
"%s",
"%x",
"%%".
Field-width specifiers and other printf features are
not uniformly supported and should not be used.
</dd></dl>
== SEE ALSO ==
*archive_read*(3),
*archive_write*(3),
*libarchive*(3),
*printf*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki
#summary archive_write 3 manual page
== NAME ==
*archive_write_new*,
*archive_write_set_format_cpio*,
*archive_write_set_format_pax*,
*archive_write_set_format_pax_restricted*,
*archive_write_set_format_shar*,
*archive_write_set_format_shar_binary*,
*archive_write_set_format_ustar*,
*archive_write_get_bytes_per_block*,
*archive_write_set_bytes_per_block*,
*archive_write_set_bytes_in_last_block*,
*archive_write_set_compression_bzip2*,
*archive_write_set_compression_compress*,
*archive_write_set_compression_gzip*,
*archive_write_set_compression_none*,
*archive_write_set_compression_program*,
*archive_write_set_compressor_options*,
*archive_write_set_format_options*,
*archive_write_set_options*,
*archive_write_open*,
*archive_write_open_fd*,
*archive_write_open_FILE*,
*archive_write_open_filename*,
*archive_write_open_memory*,
*archive_write_header*,
*archive_write_data*,
*archive_write_finish_entry*,
*archive_write_close*,
*archive_write_finish*
- functions for creating archives
== SYNOPSIS ==
*#include <archive.h>*
<br>
*struct archive `*`*
<br>
*archive_write_new*(_void_);
<br>
*int*
<br>
*archive_write_get_bytes_per_block*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_bytes_per_block*(_struct archive `*`_, _int bytes_per_block_);
<br>
*int*
<br>
*archive_write_set_bytes_in_last_block*(_struct archive `*`_, _int_);
<br>
*int*
<br>
*archive_write_set_compression_bzip2*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_compression_compress*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_compression_gzip*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_compression_none*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_compression_program*(_struct archive `*`_, _const char `*` cmd_);
<br>
*int*
<br>
*archive_write_set_format_cpio*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_pax*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_pax_restricted*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_shar*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_shar_binary*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_ustar*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_set_format_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_write_set_compressor_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_write_set_options*(_struct archive `*`_, _const char `*`_);
<br>
*int*
<br>
*archive_write_open*(_struct archive `*`_, _void `*`client_data_, _archive_open_callback `*`_, _archive_write_callback `*`_, _archive_close_callback `*`_);
<br>
*int*
<br>
*archive_write_open_fd*(_struct archive `*`_, _int fd_);
<br>
*int*
<br>
*archive_write_open_FILE*(_struct archive `*`_, _FILE `*`file_);
<br>
*int*
<br>
*archive_write_open_filename*(_struct archive `*`_, _const char `*`filename_);
<br>
*int*
<br>
*archive_write_open_memory*(_struct archive `*`_, _void `*`buffer_, _size_t bufferSize_, _size_t `*`outUsed_);
<br>
*int*
<br>
*archive_write_header*(_struct archive `*`_, _struct archive_entry `*`_);
<br>
*ssize_t*
<br>
*archive_write_data*(_struct archive `*`_, _const void `*`_, _size_t_);
<br>
*int*
<br>
*archive_write_finish_entry*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_close*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_finish*(_struct archive `*`_);
== DESCRIPTION ==
These functions provide a complete API for creating streaming
archive files.
The general process is to first create the
*struct archive*
object, set any desired options, initialize the archive, append entries, then
close the archive and release all resources.
The following summary describes the functions in approximately
the order they are ordinarily used:
<dl>
<dt>*archive_write_new*()</dt><dd>
Allocates and initializes a
*struct archive*
object suitable for writing a tar archive.
</dd><dt>*archive_write_set_bytes_per_block*()</dt><dd>
Sets the block size used for writing the archive data.
Every call to the write callback function, except possibly the last one, will
use this value for the length.
The third parameter is a boolean that specifies whether or not the final block
written will be padded to the full block size.
If it is zero, the last block will not be padded.
If it is non-zero, padding will be added both before and after compression.
The default is to use a block size of 10240 bytes and to pad the last block.
Note that a block size of zero will suppress internal blocking
and cause writes to be sent directly to the write callback as they occur.
</dd><dt>*archive_write_get_bytes_per_block*()</dt><dd>
Retrieve the block size to be used for writing.
A value of -1 here indicates that the library should use default values.
A value of zero indicates that internal blocking is suppressed.
</dd><dt>*archive_write_set_bytes_in_last_block*()</dt><dd>
Sets the block size used for writing the last block.
If this value is zero, the last block will be padded to the same size
as the other blocks.
Otherwise, the final block will be padded to a multiple of this size.
In particular, setting it to 1 will cause the final block to not be padded.
For compressed output, any padding generated by this option
is applied only after the compression.
The uncompressed data is always unpadded.
The default is to pad the last block to the full block size (note that
*archive_write_open_filename*()
will set this based on the file type).
Unlike the other
"set"
functions, this function can be called after the archive is opened.
</dd><dt>*archive_write_get_bytes_in_last_block*()</dt><dd>
Retrieve the currently-set value for last block size.
A value of -1 here indicates that the library should use default values.
</dd><dt>
*archive_write_set_format_cpio*(),
*archive_write_set_format_pax*(),
*archive_write_set_format_pax_restricted*(),
*archive_write_set_format_shar*(),
*archive_write_set_format_shar_binary*(),
*archive_write_set_format_ustar*()
</dt> <dd>
Sets the format that will be used for the archive.
The library can write
POSIX octet-oriented cpio format archives,
POSIX-standard
"pax interchange"
format archives,
traditional
"shar"
archives,
enhanced
"binary"
shar archives that store a variety of file attributes and handle binary files,
and
POSIX-standard
"ustar"
archives.
The pax interchange format is a backwards-compatible tar format that
adds key/value attributes to each entry and supports arbitrary
filenames, linknames, uids, sizes, etc.
"Restricted pax interchange format"
is the library default; this is the same as pax format, but suppresses
the pax extended header for most normal files.
In most cases, this will result in ordinary ustar archives.
</dd><dt>
*archive_write_set_compression_bzip2*(),
*archive_write_set_compression_compress*(),
*archive_write_set_compression_gzip*(),
*archive_write_set_compression_none*()
</dt> <dd>
The resulting archive will be compressed as specified.
Note that the compressed output is always properly blocked.
</dd><dt>*archive_write_set_compression_program*()</dt><dd>
The archive will be fed into the specified compression program.
The output of that program is blocked and written to the client
write callbacks.
</dd><dt>
*archive_write_set_compressor_options*(),
*archive_write_set_format_options*(),
*archive_write_set_options*()
</dt> <dd>
Specifies options that will be passed to the currently-enabled
compressor and/or format writer.
The argument is a comma-separated list of individual options.
Individual options have one of the following forms:
<dl>
<dt>_option=value_</dt><dd>
The option/value pair will be provided to every module.
Modules that do not accept an option with this name will ignore it.
</dd><dt>_option_</dt><dd>
The option will be provided to every module with a value of
"1".
</dd><dt>_!option_</dt><dd>
The option will be provided to every module with a NULL value.
</dd><dt>_module:option=value_, _module:option_, _module:!option_</dt><dd>
As above, but the corresponding option and value will be provided
only to modules whose name matches
_module_.
</dd></dl>
The return value will be
*ARCHIVE_OK*
if any module accepts the option, or
*ARCHIVE_WARN*
if no module accepted the option, or
*ARCHIVE_FATAL*
if there was a fatal error while attempting to process the option.

The currently supported options are:
<dl>
<dt>Compressor gzip</dt><dd>
<dl>
<dt>*compression-level*</dt><dd>
The value is interpreted as a decimal integer specifying the
gzip compression level.
</dd></dl>
</dd><dt>Compressor xz</dt><dd>
<dl>
<dt>*compression-level*</dt><dd>
The value is interpreted as a decimal integer specifying the
compression level.
</dd></dl>
</dd><dt>Format mtree</dt><dd>
<dl>
<dt>*cksum*, *device*, *flags*, *gid*, *gname*, *indent*, *link*, *md5*, *mode*, *nlink*, *rmd160*, *sha1*, *sha256*, *sha384*, *sha512*, *size*, *time*, *uid*, *uname*</dt><dd>
Enable a particular keyword in the mtree output.
Prefix with an exclamation mark to disable the corresponding keyword.
The default is equivalent to
"device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname".
</dd><dt>*all*</dt><dd>
Enables all of the above keywords.
</dd><dt>*use-set*</dt><dd>
Enables generation of
*/set*
lines that specify default values for the following files and/or directories.
</dd><dt>*indent*</dt><dd>
XXX needs explanation XXX
</dd></dl>
</dd></dl>
</dd><dt>*archive_write_open*()</dt><dd>
Freeze the settings, open the archive, and prepare for writing entries.
This is the most generic form of this function, which accepts
pointers to three callback functions which will be invoked by
the compression layer to write the constructed archive.
</dd><dt>*archive_write_open_fd*()</dt><dd>
A convenience form of
*archive_write_open*()
that accepts a file descriptor.
The
*archive_write_open_fd*()
function is safe for use with tape drives or other
block-oriented devices.
</dd><dt>*archive_write_open_FILE*()</dt><dd>
A convenience form of
*archive_write_open*()
that accepts a
*FILE `*`*
pointer.
Note that
*archive_write_open_FILE*()
is not safe for writing to tape drives or other devices
that require correct blocking.
</dd><dt>*archive_write_open_file*()</dt><dd>
A deprecated synonym for
*archive_write_open_filename*().
</dd><dt>*archive_write_open_filename*()</dt><dd>
A convenience form of
*archive_write_open*()
that accepts a filename.
A NULL argument indicates that the output should be written to standard output;
an argument of
"-"
will open a file with that name.
If you have not invoked
*archive_write_set_bytes_in_last_block*(),
then
*archive_write_open_filename*()
will adjust the last-block padding depending on the file:
it will enable padding when writing to standard output or
to a character or block device node, it will disable padding otherwise.
You can override this by manually invoking
*archive_write_set_bytes_in_last_block*()
before calling
*archive_write_open*().
The
*archive_write_open_filename*()
function is safe for use with tape drives or other
block-oriented devices.
</dd><dt>*archive_write_open_memory*()</dt><dd>
A convenience form of
*archive_write_open*()
that accepts a pointer to a block of memory that will receive
the archive.
The final
*size_t `*`*
argument points to a variable that will be updated
after each write to reflect how much of the buffer
is currently in use.
You should be careful to ensure that this variable
remains allocated until after the archive is
closed.
</dd><dt>*archive_write_header*()</dt><dd>
Build and write a header using the data in the provided
*struct archive_entry*
structure.
See
*archive_entry*(3)
for information on creating and populating
*struct archive_entry*
objects.
</dd><dt>*archive_write_data*()</dt><dd>
Write data corresponding to the header just written.
Returns number of bytes written or -1 on error.
</dd><dt>*archive_write_finish_entry*()</dt><dd>
Close out the entry just written.
In particular, this writes out the final padding required by some formats.
Ordinarily, clients never need to call this, as it
is called automatically by
*archive_write_next_header*()
and
*archive_write_close*()
as needed.
</dd><dt>*archive_write_close*()</dt><dd>
Complete the archive and invoke the close callback.
</dd><dt>*archive_write_finish*()</dt><dd>
Invokes
*archive_write_close*()
if it was not invoked manually, then releases all resources.
Note that this function was declared to return
*void*
in libarchive 1.x, which made it impossible to detect errors when
*archive_write_close*()
was invoked implicitly from this function.
This is corrected beginning with libarchive 2.0.
</dd></dl>
More information about the
_struct_ archive
object and the overall design of the library can be found in the
*libarchive*(3)
overview.
== IMPLEMENTATION ==
Compression support is built-in to libarchive, which uses zlib and bzlib
to handle gzip and bzip2 compression, respectively.
== CLIENT CALLBACKS ==
To use this library, you will need to define and register
callback functions that will be invoked to write data to the
resulting archive.
These functions are registered by calling
*archive_write_open*():
<ul>
<li>
*typedef int*
*archive_open_callback*(_struct archive `*`_, _void `*`client_data_)
</li></ul>

The open callback is invoked by
*archive_write_open*().
It should return
*ARCHIVE_OK*
if the underlying file or data source is successfully
opened.
If the open fails, it should call
*archive_set_error*()
to register an error code and message and return
*ARCHIVE_FATAL*.
<ul>
<li>
*typedef ssize_t*
*archive_write_callback*(_struct archive `*`_, _void `*`client_data_, _const void `*`buffer_, _size_t length_)
</li></ul>

The write callback is invoked whenever the library
needs to write raw bytes to the archive.
For correct blocking, each call to the write callback function
should translate into a single
*write*(2)
system call.
This is especially critical when writing archives to tape drives.
On success, the write callback should return the
number of bytes actually written.
On error, the callback should invoke
*archive_set_error*()
to register an error code and message and return -1.
<ul>
<li>
*typedef int*
*archive_close_callback*(_struct archive `*`_, _void `*`client_data_)
</li></ul>

The close callback is invoked by archive_close when
the archive processing is complete.
The callback should return
*ARCHIVE_OK*
on success.
On failure, the callback should invoke
*archive_set_error*()
to register an error code and message and
return
*ARCHIVE_FATAL.*
== EXAMPLE ==
The following sketch illustrates basic usage of the library.
In this example,
the callback functions are simply wrappers around the standard
*open*(2),
*write*(2),
and
*close*(2)
system calls.
{{{
#ifdef __linux__
#define	_FILE_OFFSET_BITS 64
#endif
#include <sys/stat.h>
#include <archive.h>
#include <archive_entry.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
struct mydata {
	const char *name;
	int fd;
};
int
myopen(struct archive *a, void *client_data)
{
  struct mydata *mydata = client_data;
  mydata->fd = open(mydata->name, O_WRONLY | O_CREAT, 0644);
  if (mydata->fd >= 0)
    return (ARCHIVE_OK);
  else
    return (ARCHIVE_FATAL);
}
ssize_t
mywrite(struct archive *a, void *client_data, const void *buff, size_t n)
{
  struct mydata *mydata = client_data;
  return (write(mydata->fd, buff, n));
}
int
myclose(struct archive *a, void *client_data)
{
  struct mydata *mydata = client_data;
  if (mydata->fd > 0)
    close(mydata->fd);
  return (0);
}
void
write_archive(const char *outname, const char **filename)
{
  struct mydata *mydata = malloc(sizeof(struct mydata));
  struct archive *a;
  struct archive_entry *entry;
  struct stat st;
  char buff[8192];
  int len;
  int fd;
  a = archive_write_new();
  mydata->name = outname;
  archive_write_set_compression_gzip(a);
  archive_write_set_format_ustar(a);
  archive_write_open(a, mydata, myopen, mywrite, myclose);
  while (*filename) {
    stat(*filename, &st);
    entry = archive_entry_new();
    archive_entry_copy_stat(entry, &st);
    archive_entry_set_pathname(entry, *filename);
    archive_write_header(a, entry);
    fd = open(*filename, O_RDONLY);
    len = read(fd, buff, sizeof(buff));
    while ( len > 0 ) {
	archive_write_data(a, buff, len);
	len = read(fd, buff, sizeof(buff));
    }
    archive_entry_free(entry);
    filename++;
  }
  archive_write_finish(a);
}
int main(int argc, const char **argv)
{
	const char *outname;
	argv++;
	outname = argv++;
	write_archive(outname, argv);
	return 0;
}
}}}
== RETURN VALUES ==
Most functions return
*ARCHIVE_OK*
(zero) on success, or one of several non-zero
error codes for errors.
Specific error codes include:
*ARCHIVE_RETRY*
for operations that might succeed if retried,
*ARCHIVE_WARN*
for unusual conditions that do not prevent further operations, and
*ARCHIVE_FATAL*
for serious errors that make remaining operations impossible.
The
*archive_errno*()
and
*archive_error_string*()
functions can be used to retrieve an appropriate error code and a
textual error message.

*archive_write_new*()
returns a pointer to a newly-allocated
*struct archive*
object.

*archive_write_data*()
returns a count of the number of bytes actually written.
On error, -1 is returned and the
*archive_errno*()
and
*archive_error_string*()
functions will return appropriate values.
Note that if the client-provided write callback function
returns a non-zero value, that error will be propagated back to the caller
through whatever API function resulted in that call, which
may include
*archive_write_header*(),
*archive_write_data*(),
*archive_write_close*(),
or
*archive_write_finish*().
The client callback can call
*archive_set_error*()
to provide values that can then be retrieved by
*archive_errno*()
and
*archive_error_string*().
== SEE ALSO ==
*tar*(1),
*libarchive*(3),
*tar*(5)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>
== BUGS ==
There are many peculiar bugs in historic tar implementations that may cause
certain programs to reject archives written by this library.
For example, several historic implementations calculated header checksums
incorrectly and will thus reject valid archives; GNU tar does not fully support
pax interchange format; some old tar implementations required specific
field terminations.

The default pax interchange format eliminates most of the historic
tar limitations and provides a generic key/value attribute facility
for vendor-defined extensions.
One oversight in POSIX is the failure to provide a standard attribute
for large device numbers.
This library uses
"SCHILY.devminor"
and
"SCHILY.devmajor"
for device numbers that exceed the range supported by the backwards-compatible
ustar header.
These keys are compatible with Joerg Schilling's
*star*
archiver.
Other implementations may not recognize these keys and will thus be unable
to correctly restore device nodes with large device numbers from archives
created by this library.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki
#summary archive_write_disk 3 manual page
== NAME ==
*archive_write_disk_new*,
*archive_write_disk_set_options*,
*archive_write_disk_set_skip_file*,
*archive_write_disk_set_group_lookup*,
*archive_write_disk_set_standard_lookup*,
*archive_write_disk_set_user_lookup*,
*archive_write_header*,
*archive_write_data*,
*archive_write_finish_entry*,
*archive_write_close*,
*archive_write_finish*
- functions for creating objects on disk
== SYNOPSIS ==
*#include <archive.h>*
<br>
*struct archive `*`*
<br>
*archive_write_disk_new*(_void_);
<br>
*int*
<br>
*archive_write_disk_set_options*(_struct archive `*`_, _int flags_);
<br>
*int*
<br>
*archive_write_disk_set_skip_file*(_struct archive `*`_, _dev_t_, _ino_t_);
<br>
*int*
<br>
*archive_write_disk_set_group_lookup*(_struct archive `*`_, _void `*`_, _gid_t (`*`)(void `*`, const char `*`gname, gid_t gid)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_write_disk_set_standard_lookup*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_disk_set_user_lookup*(_struct archive `*`_, _void `*`_, _uid_t (`*`)(void `*`, const char `*`uname, uid_t uid)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_write_header*(_struct archive `*`_, _struct archive_entry `*`_);
<br>
*ssize_t*
<br>
*archive_write_data*(_struct archive `*`_, _const void `*`_, _size_t_);
<br>
*int*
<br>
*archive_write_finish_entry*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_close*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_finish*(_struct archive `*`_);
== DESCRIPTION ==
These functions provide a complete API for creating objects on
disk from
*struct archive_entry*
descriptions.
They are most naturally used when extracting objects from an archive
using the
*archive_read*()
interface.
The general process is to read
*struct archive_entry*
objects from an archive, then write those objects to a
*struct archive*
object created using the
*archive_write_disk*()
family functions.
This interface is deliberately very similar to the
*archive_write*()
interface used to write objects to a streaming archive.
<dl>
<dt>*archive_write_disk_new*()</dt><dd>
Allocates and initializes a
*struct archive*
object suitable for writing objects to disk.
</dd><dt>*archive_write_disk_set_skip_file*()</dt><dd>
Records the device and inode numbers of a file that should not be
overwritten.
This is typically used to ensure that an extraction process does not
overwrite the archive from which objects are being read.
This capability is technically unnecessary but can be a significant
performance optimization in practice.
</dd><dt>*archive_write_disk_set_options*()</dt><dd>
The options field consists of a bitwise OR of one or more of the
following values:
<dl>
<dt>*ARCHIVE_EXTRACT_OWNER*</dt><dd>
The user and group IDs should be set on the restored file.
By default, the user and group IDs are not restored.
</dd><dt>*ARCHIVE_EXTRACT_PERM*</dt><dd>
Full permissions (including SGID, SUID, and sticky bits) should
be restored exactly as specified, without obeying the
current umask.
Note that SUID and SGID bits can only be restored if the
user and group ID of the object on disk are correct.
If
*ARCHIVE_EXTRACT_OWNER*
is not specified, then SUID and SGID bits will only be restored
if the default user and group IDs of newly-created objects on disk
happen to match those specified in the archive entry.
By default, only basic permissions are restored, and umask is obeyed.
</dd><dt>*ARCHIVE_EXTRACT_TIME*</dt><dd>
The timestamps (mtime, ctime, and atime) should be restored.
By default, they are ignored.
Note that restoring of atime is not currently supported.
</dd><dt>*ARCHIVE_EXTRACT_NO_OVERWRITE*</dt><dd>
Existing files on disk will not be overwritten.
By default, existing regular files are truncated and overwritten;
existing directories will have their permissions updated;
other pre-existing objects are unlinked and recreated from scratch.
</dd><dt>*ARCHIVE_EXTRACT_UNLINK*</dt><dd>
Existing files on disk will be unlinked before any attempt to
create them.
In some cases, this can prove to be a significant performance improvement.
By default, existing files are truncated and rewritten, but
the file is not recreated.
In particular, the default behavior does not break existing hard links.
</dd><dt>*ARCHIVE_EXTRACT_ACL*</dt><dd>
Attempt to restore ACLs.
By default, extended ACLs are ignored.
</dd><dt>*ARCHIVE_EXTRACT_FFLAGS*</dt><dd>
Attempt to restore extended file flags.
By default, file flags are ignored.
</dd><dt>*ARCHIVE_EXTRACT_XATTR*</dt><dd>
Attempt to restore POSIX.1e extended attributes.
By default, they are ignored.
</dd><dt>*ARCHIVE_EXTRACT_SECURE_SYMLINKS*</dt><dd>
Refuse to extract any object whose final location would be altered
by a symlink on disk.
This is intended to help guard against a variety of mischief
caused by archives that (deliberately or otherwise) extract
files outside of the current directory.
The default is not to perform this check.
If
*ARCHIVE_EXTRACT_UNLINK*
is specified together with this option, the library will
remove any intermediate symlinks it finds and return an
error only if such symlink could not be removed.
</dd><dt>*ARCHIVE_EXTRACT_SECURE_NODOTDOT*</dt><dd>
Refuse to extract a path that contains a
_.._
element anywhere within it.
The default is to not refuse such paths.
Note that paths ending in
_.._
always cause an error, regardless of this flag.
</dd><dt>*ARCHIVE_EXTRACT_SPARSE*</dt><dd>
Scan data for blocks of NUL bytes and try to recreate them with holes.
This results in sparse files, independent of whether the archive format
supports or uses them.
</dd></dl>
</dd><dt>
*archive_write_disk_set_group_lookup*(),
*archive_write_disk_set_user_lookup*()
</dt> <dd>
The
*struct archive_entry*
objects contain both names and ids that can be used to identify users
and groups.
These names and ids describe the ownership of the file itself and
also appear in ACL lists.
By default, the library uses the ids and ignores the names, but
this can be overridden by registering user and group lookup functions.
To register, you must provide a lookup function which
accepts both a name and id and returns a suitable id.
You may also provide a
*void `*`*
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
*struct archive*
object is destroyed.
</dd><dt>*archive_write_disk_set_standard_lookup*()</dt><dd>
This convenience function installs a standard set of user
and group lookup functions.
These functions use
*getpwnam*(3)
and
*getgrnam*(3)
to convert names to ids, defaulting to the ids if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
*getpwnam*(3)
and
*getgrnam*(3).
</dd><dt>*archive_write_header*()</dt><dd>
Build and write a header using the data in the provided
*struct archive_entry*
structure.
See
*archive_entry*(3)
for information on creating and populating
*struct archive_entry*
objects.
</dd><dt>*archive_write_data*()</dt><dd>
Write data corresponding to the header just written.
Returns number of bytes written or -1 on error.
</dd><dt>*archive_write_finish_entry*()</dt><dd>
Close out the entry just written.
Ordinarily, clients never need to call this, as it
is called automatically by
*archive_write_next_header*()
and
*archive_write_close*()
as needed.
</dd><dt>*archive_write_close*()</dt><dd>
Set any attributes that could not be set during the initial restore.
For example, directory timestamps are not restored initially because
restoring a subsequent file would alter that timestamp.
Similarly, non-writable directories are initially created with
write permissions (so that their contents can be restored).
The
*archive_write_disk_new*
library maintains a list of all such deferred attributes and
sets them when this function is invoked.
</dd><dt>*archive_write_finish*()</dt><dd>
Invokes
*archive_write_close*()
if it was not invoked manually, then releases all resources.
</dd></dl>
More information about the
_struct_ archive
object and the overall design of the library can be found in the
*libarchive*(3)
overview.
Many of these functions are also documented under
*archive_write*(3).
== RETURN VALUES ==
Most functions return
*ARCHIVE_OK*
(zero) on success, or one of several non-zero
error codes for errors.
Specific error codes include:
*ARCHIVE_RETRY*
for operations that might succeed if retried,
*ARCHIVE_WARN*
for unusual conditions that do not prevent further operations, and
*ARCHIVE_FATAL*
for serious errors that make remaining operations impossible.
The
*archive_errno*()
and
*archive_error_string*()
functions can be used to retrieve an appropriate error code and a
textual error message.

*archive_write_disk_new*()
returns a pointer to a newly-allocated
*struct archive*
object.

*archive_write_data*()
returns a count of the number of bytes actually written.
On error, -1 is returned and the
*archive_errno*()
and
*archive_error_string*()
functions will return appropriate values.
== SEE ALSO ==
*archive_read*(3),
*archive_write*(3),
*tar*(1),
*libarchive*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
The
*archive_write_disk*
interface was added to
*libarchive* 2.0
and first appeared in
FreeBSD 6.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>
== BUGS ==
Directories are actually extracted in two distinct phases.
Directories are created during
*archive_write_header*(),
but final permissions are not set until
*archive_write_close*().
This separation is necessary to correctly handle borderline
cases such as a non-writable directory containing
files, but can cause unexpected results.
In particular, directory permissions are not fully
restored until the archive is closed.
If you use
*chdir*(2)
to change the current directory between calls to
*archive_read_extract*()
or before calling
*archive_read_close*(),
you may confuse the permission-setting logic with
the result that directory permissions are restored
incorrectly.

The library attempts to create objects with filenames longer than
*PATH_MAX*
by creating prefixes of the full path and changing the current directory.
Currently, this logic is limited in scope; the fixup pass does
not work correctly for such objects and the symlink security check
option disables the support for very long pathnames.

Restoring the path
_aa/../bb_
does create each intermediate directory.
In particular, the directory
_aa_
is created as well as the final object
_bb_.
In theory, this can be exploited to create an entire directory heirarchy
with a single request.
Of course, this does not work if the
*ARCHIVE_EXTRACT_NODOTDOT*
option is specified.

Implicit directories are always created obeying the current umask.
Explicit objects are created obeying the current umask unless
*ARCHIVE_EXTRACT_PERM*
is specified, in which case they current umask is ignored.

SGID and SUID bits are restored only if the correct user and
group could be set.
If
*ARCHIVE_EXTRACT_OWNER*
is not specified, then no attempt is made to set the ownership.
In this case, SGID and SUID bits are restored only if the
user and group of the final object happen to match those specified
in the entry.

The
"standard"
user-id and group-id lookup functions are not the defaults because
*getgrnam*(3)
and
*getpwnam*(3)
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.

There should be a corresponding
*archive_read_disk*
interface that walks a directory heirarchy and returns archive
entry objects.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki
#summary CPIO 5 manual page
== NAME ==
*cpio*
- format of cpio archive files
== DESCRIPTION ==
The
*cpio*
archive format collects any number of files, directories, and other
file system objects (symbolic links, device nodes, etc.) into a single
stream of bytes.
=== General Format===
Each file system object in a
*cpio*
archive comprises a header record with basic numeric metadata
followed by the full pathname of the entry and the file data.
The header record stores a series of integer values that generally
follow the fields in
_struct_ stat.
(See
*stat*(2)
for details.)
The variants differ primarily in how they store those integers
(binary, octal, or hexadecimal).
The header is followed by the pathname of the
entry (the length of the pathname is stored in the header)
and any file data.
The end of the archive is indicated by a special record with
the pathname
"TRAILER!!!".
=== PWB format===
XXX Any documentation of the original PWB/UNIX 1.0 format? XXX
=== Old Binary Format===
The old binary
*cpio*
format stores numbers as 2-byte and 4-byte binary values.
Each entry begins with a header in the following format:
{{{
struct header_old_cpio {
        unsigned short   c_magic;
        unsigned short   c_dev;
        unsigned short   c_ino;
        unsigned short   c_mode;
        unsigned short   c_uid;
        unsigned short   c_gid;
        unsigned short   c_nlink;
        unsigned short   c_rdev;
	unsigned short   c_mtime[2];
        unsigned short   c_namesize;
	unsigned short   c_filesize[2];
};
}}}

The
_unsigned_ short
fields here are 16-bit integer values; the
_unsigned_ int
fields are 32-bit integer values.
The fields are as follows
<dl>
<dt>_magic_</dt><dd>
The integer value octal 070707.
This value can be used to determine whether this archive is
written with little-endian or big-endian integers.
</dd><dt>_dev_, _ino_</dt><dd>
The device and inode numbers from the disk.
These are used by programs that read
*cpio*
archives to determine when two entries refer to the same file.
Programs that synthesize
*cpio*
archives should be careful to set these to distinct values for each entry.
</dd><dt>_mode_</dt><dd>
The mode specifies both the regular permissions and the file type.
It consists of several bit fields as follows:
<dl>
<dt>0170000</dt><dd>
This masks the file type bits.
</dd><dt>0140000</dt><dd>
File type value for sockets.
</dd><dt>0120000</dt><dd>
File type value for symbolic links.
For symbolic links, the link body is stored as file data.
</dd><dt>0100000</dt><dd>
File type value for regular files.
</dd><dt>0060000</dt><dd>
File type value for block special devices.
</dd><dt>0040000</dt><dd>
File type value for directories.
</dd><dt>0020000</dt><dd>
File type value for character special devices.
</dd><dt>0010000</dt><dd>
File type value for named pipes or FIFOs.
</dd><dt>0004000</dt><dd>
SUID bit.
</dd><dt>0002000</dt><dd>
SGID bit.
</dd><dt>0001000</dt><dd>
Sticky bit.
On some systems, this modifies the behavior of executables and/or directories.
</dd><dt>0000777</dt><dd>
The lower 9 bits specify read/write/execute permissions
for world, group, and user following standard POSIX conventions.
</dd></dl>
</dd><dt>_uid_, _gid_</dt><dd>
The numeric user id and group id of the owner.
</dd><dt>_nlink_</dt><dd>
The number of links to this file.
Directories always have a value of at least two here.
Note that hardlinked files include file data with every copy in the archive.
</dd><dt>_rdev_</dt><dd>
For block special and character special entries,
this field contains the associated device number.
For all other entry types, it should be set to zero by writers
and ignored by readers.
</dd><dt>_mtime_</dt><dd>
Modification time of the file, indicated as the number
of seconds since the start of the epoch,
00:00:00 UTC January 1, 1970.
The four-byte integer is stored with the most-significant 16 bits first
followed by the least-significant 16 bits.
Each of the two 16 bit values are stored in machine-native byte order.
</dd><dt>_namesize_</dt><dd>
The number of bytes in the pathname that follows the header.
This count includes the trailing NUL byte.
</dd><dt>_filesize_</dt><dd>
The size of the file.
Note that this archive format is limited to
four gigabyte file sizes.
See
_mtime_
above for a description of the storage of four-byte integers.
</dd></dl>

The pathname immediately follows the fixed header.
If the
*namesize*
is odd, an additional NUL byte is added after the pathname.
The file data is then appended, padded with NUL
bytes to an even length.

Hardlinked files are not given special treatment;
the full file contents are included with each copy of the
file.
=== Portable ASCII Format===
Version 2 of the Single UNIX Specification (``SUSv2'')
standardized an ASCII variant that is portable across all
platforms.
It is commonly known as the
"old character"
format or as the
"odc"
format.
It stores the same numeric fields as the old binary format, but
represents them as 6-character or 11-character octal values.
{{{
struct cpio_odc_header {
        char    c_magic[6];
        char    c_dev[6];
        char    c_ino[6];
        char    c_mode[6];
        char    c_uid[6];
        char    c_gid[6];
        char    c_nlink[6];
        char    c_rdev[6];
        char    c_mtime[11];
        char    c_namesize[6];
        char    c_filesize[11];
};
}}}

The fields are identical to those in the old binary format.
The name and file body follow the fixed header.
Unlike the old binary format, there is no additional padding
after the pathname or file contents.
If the files being archived are themselves entirely ASCII, then
the resulting archive will be entirely ASCII, except for the
NUL byte that terminates the name field.
=== New ASCII Format===
The "new" ASCII format uses 8-byte hexadecimal fields for
all numbers and separates device numbers into separate fields
for major and minor numbers.
{{{
struct cpio_newc_header {
        char    c_magic[6];
        char    c_ino[8];
        char    c_mode[8];
        char    c_uid[8];
        char    c_gid[8];
        char    c_nlink[8];
        char    c_mtime[8];
        char    c_filesize[8];
        char    c_devmajor[8];
        char    c_devminor[8];
        char    c_rdevmajor[8];
        char    c_rdevminor[8];
        char    c_namesize[8];
        char    c_check[8];
};
}}}

Except as specified below, the fields here match those specified
for the old binary format above.
<dl>
<dt>_magic_</dt><dd>
The string
"070701".
</dd><dt>_check_</dt><dd>
This field is always set to zero by writers and ignored by readers.
See the next section for more details.
</dd></dl>

The pathname is followed by NUL bytes so that the total size
of the fixed header plus pathname is a multiple of four.
Likewise, the file data is padded to a multiple of four bytes.
Note that this format supports only 4 gigabyte files (unlike the
older ASCII format, which supports 8 gigabyte files).

In this format, hardlinked files are handled by setting the
filesize to zero for each entry except the last one that
appears in the archive.
=== New CRC Format===
The CRC format is identical to the new ASCII format described
in the previous section except that the magic field is set
to
"070702"
and the
_check_
field is set to the sum of all bytes in the file data.
This sum is computed treating all bytes as unsigned values
and using unsigned arithmetic.
Only the least-significant 32 bits of the sum are stored.
=== HP variants===
The
*cpio*
implementation distributed with HPUX used XXXX but stored
device numbers differently XXX.
=== Other Extensions and Variants===
Sun Solaris uses additional file types to store extended file
data, including ACLs and extended attributes, as special
entries in cpio archives.

XXX Others? XXX
== BUGS ==
The
"CRC"
format is mis-named, as it uses a simple checksum and
not a cyclic redundancy check.

The old binary format is limited to 16 bits for user id,
group id, device, and inode numbers.
It is limited to 4 gigabyte file sizes.

The old ASCII format is limited to 18 bits for
the user id, group id, device, and inode numbers.
It is limited to 8 gigabyte file sizes.

The new ASCII format is limited to 4 gigabyte file sizes.

None of the cpio formats store user or group names,
which are essential when moving files between systems with
dissimilar user or group numbering.

Especially when writing older cpio variants, it may be necessary
to map actual device/inode values to synthesized values that
fit the available fields.
With very large filesystems, this may be necessary even for
the newer formats.
== SEE ALSO ==
*cpio*(1),
*tar*(5)
== STANDARDS ==
The
*cpio*
utility is no longer a part of POSIX or the Single Unix Standard.
It last appeared in
Version 2 of the Single UNIX Specification (``SUSv2'').
It has been supplanted in subsequent standards by
*pax*(1).
The portable ASCII format is currently part of the specification for the
*pax*(1)
utility.
== HISTORY ==
The original cpio utility was written by Dick Haight
while working in AT&T's Unix Support Group.
It appeared in 1977 as part of PWB/UNIX 1.0, the
"Programmer's Work Bench"
derived from
At v6
that was used internally at AT&T.
Both the old binary and old character formats were in use
by 1980, according to the System III source released
by SCO under their
"Ancient Unix"
license.
The character format was adopted as part of
IEEE Std 1003.1-1988 (``POSIX.1'').
XXX when did "newc" appear?  Who invented it?  When did HP come out with their variant?  When did Sun introduce ACLs and extended attributes? XXX

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki
#summary libarchive-formats 5 manual page
== NAME ==
*libarchive-formats*
- archive formats supported by the libarchive library
== DESCRIPTION ==
The
*libarchive*(3)
library reads and writes a variety of streaming archive formats.
Generally speaking, all of these archive formats consist of a series of
"entries".
Each entry stores a single file system object, such as a file, directory,
or symbolic link.

The following provides a brief description of each format supported
by libarchive, with some information about recognized extensions or
limitations of the current library support.
Note that just because a format is supported by libarchive does not
imply that a program that uses libarchive will support that format.
Applications that use libarchive specify which formats they wish
to support, though many programs do use libarchive convenience
functions to enable all supported formats.
=== Tar Formats===
The
*libarchive*(3)
library can read most tar archives.
However, it only writes POSIX-standard
"ustar"
and
"pax interchange"
formats.

All tar formats store each entry in one or more 512-byte records.
The first record is used for file metadata, including filename,
timestamp, and mode information, and the file data is stored in
subsequent records.
Later variants have extended this by either appropriating undefined
areas of the header record, extending the header to multiple records,
or by storing special entries that modify the interpretation of
subsequent entries.

<dl>
<dt>*gnutar*</dt><dd>
The
*libarchive*(3)
library can read GNU-format tar archives.
It currently supports the most popular GNU extensions, including
modern long filename and linkname support, as well as atime and ctime data.
The libarchive library does not support multi-volume
archives, nor the old GNU long filename format.
It can read GNU sparse file entries, including the new POSIX-based
formats, but cannot write GNU sparse file entries.
</dd><dt>*pax*</dt><dd>
The
*libarchive*(3)
library can read and write POSIX-compliant pax interchange format
archives.
Pax interchange format archives are an extension of the older ustar
format that adds a separate entry with additional attributes stored
as key/value pairs immediately before each regular entry.
The presence of these additional entries is the only difference between
pax interchange format and the older ustar format.
The extended attributes are of unlimited length and are stored
as UTF-8 Unicode strings.
Keywords defined in the standard are in all lowercase; vendors are allowed
to define custom keys by preceding them with the vendor name in all uppercase.
When writing pax archives, libarchive uses many of the SCHILY keys
defined by Joerg Schilling's
"star"
archiver and a few LIBARCHIVE keys.
The libarchive library can read most of the SCHILY keys
and most of the GNU keys introduced by GNU tar.
It silently ignores any keywords that it does not understand.
</dd><dt>*restricted* pax</dt><dd>
The libarchive library can also write pax archives in which it
attempts to suppress the extended attributes entry whenever
possible.
The result will be identical to a ustar archive unless the
extended attributes entry is required to store a long file
name, long linkname, extended ACL, file flags, or if any of the standard
ustar data (user name, group name, UID, GID, etc) cannot be fully
represented in the ustar header.
In all cases, the result can be dearchived by any program that
can read POSIX-compliant pax interchange format archives.
Programs that correctly read ustar format (see below) will also be
able to read this format; any extended attributes will be extracted as
separate files stored in
_PaxHeader_
directories.
</dd><dt>*ustar*</dt><dd>
The libarchive library can both read and write this format.
This format has the following limitations:
<ul>
<li>
Device major and minor numbers are limited to 21 bits.
Nodes with larger numbers will not be added to the archive.
</li><li>
Path names in the archive are limited to 255 bytes.
(Shorter if there is no / character in exactly the right place.)
</li><li>
Symbolic links and hard links are stored in the archive with
the name of the referenced file.
This name is limited to 100 bytes.
</li><li>
Extended attributes, file flags, and other extended
security information cannot be stored.
</li><li>
Archive entries are limited to 8 gigabytes in size.
</li></ul>
Note that the pax interchange format has none of these restrictions.
</dd></dl>

The libarchive library also reads a variety of commonly-used extensions to
the basic tar format.
These extensions are recognized automatically whenever they appear.
<dl>
<dt>Numeric extensions.</dt><dd>
The POSIX standards require fixed-length numeric fields to be written with
some character position reserved for terminators.
Libarchive allows these fields to be written without terminator characters.
This extends the allowable range; in particular, ustar archives with this
extension can support entries up to 64 gigabytes in size.
Libarchive also recognizes base-256 values in most numeric fields.
This essentially removes all limitations on file size, modification time,
and device numbers.
</dd><dt>Solaris extensions</dt><dd>
Libarchive recognizes ACL and extended attribute records written
by Solaris tar.
Currently, libarchive only has support for old-style ACLs; the
newer NFSv4 ACLs are recognized but discarded.
</dd></dl>

The first tar program appeared in Seventh Edition Unix in 1979.
The first official standard for the tar file format was the
"ustar"
(Unix Standard Tar) format defined by POSIX in 1988.
POSIX.1-2001 extended the ustar format to create the
"pax interchange"
format.
=== Cpio Formats===
The libarchive library can read a number of common cpio variants and can write
"odc"
and
"newc"
format archives.
A cpio archive stores each entry as a fixed-size header followed
by a variable-length filename and variable-length data.
Unlike the tar format, the cpio format does only minimal padding
of the header or file data.
There are several cpio variants, which differ primarily in
how they store the initial header: some store the values as
octal or hexadecimal numbers in ASCII, others as binary values of
varying byte order and length.
<dl>
<dt>*binary*</dt><dd>
The libarchive library transparently reads both big-endian and little-endian
variants of the original binary cpio format.
This format used 32-bit binary values for file size and mtime,
and 16-bit binary values for the other fields.
</dd><dt>*odc*</dt><dd>
The libarchive library can both read and write this
POSIX-standard format, which is officially known as the
"cpio interchange format"
or the
"octet-oriented cpio archive format"
and sometimes unofficially referred to as the
"old character format".
This format stores the header contents as octal values in ASCII.
It is standard, portable, and immune from byte-order confusion.
File sizes and mtime are limited to 33 bits (8GB file size),
other fields are limited to 18 bits.
</dd><dt>*SVR4*</dt><dd>
The libarchive library can read both CRC and non-CRC variants of
this format.
The SVR4 format uses eight-digit hexadecimal values for
all header fields.
This limits file size to 4GB, and also limits the mtime and
other fields to 32 bits.
The SVR4 format can optionally include a CRC of the file
contents, although libarchive does not currently verify this CRC.
</dd></dl>

Cpio first appeared in PWB/UNIX 1.0, which was released within
AT&T in 1977.
PWB/UNIX 1.0 formed the basis of System III Unix, released outside
of AT&T in 1981.
This makes cpio older than tar, although cpio was not included
in Version 7 AT&T Unix.
As a result, the tar command became much better known in universities
and research groups that used Version 7.
The combination of the
*find*
and
*cpio*
utilities provided very precise control over file selection.
Unfortunately, the format has many limitations that make it unsuitable
for widespread use.
Only the POSIX format permits files over 4GB, and its 18-bit
limit for most other fields makes it unsuitable for modern systems.
In addition, cpio formats only store numeric UID/GID values (not
usernames and group names), which can make it very difficult to correctly
transfer archives across systems with dissimilar user numbering.
=== Shar Formats===
A
"shell archive"
is a shell script that, when executed on a POSIX-compliant
system, will recreate a collection of file system objects.
The libarchive library can write two different kinds of shar archives:
<dl>
<dt>*shar*</dt><dd>
The traditional shar format uses a limited set of POSIX
commands, including
*echo*(1),
*mkdir*(1),
and
*sed*(1).
It is suitable for portably archiving small collections of plain text files.
However, it is not generally well-suited for large archives
(many implementations of
*sh*(1)
have limits on the size of a script) nor should it be used with non-text files.
</dd><dt>*shardump*</dt><dd>
This format is similar to shar but encodes files using
*uuencode*(1)
so that the result will be a plain text file regardless of the file contents.
It also includes additional shell commands that attempt to reproduce as
many file attributes as possible, including owner, mode, and flags.
The additional commands used to restore file attributes make
shardump archives less portable than plain shar archives.
</dd></dl>
=== ISO9660 format===
Libarchive can read and extract from files containing ISO9660-compliant
CDROM images.
In many cases, this can remove the need to burn a physical CDROM
just in order to read the files contained in an ISO9660 image.
It also avoids security and complexity issues that come with
virtual mounts and loopback devices.
Libarchive supports the most common Rockridge extensions and has partial
support for Joliet extensions.
If both extensions are present, the Joliet extensions will be
used and the Rockridge extensions will be ignored.
In particular, this can create problems with hardlinks and symlinks,
which are supported by Rockridge but not by Joliet.
=== Zip format===
Libarchive can read and write zip format archives that have
uncompressed entries and entries compressed with the
"deflate"
algorithm.
Older zip compression algorithms are not supported.
It can extract jar archives, archives that use Zip64 extensions and many
self-extracting zip archives.
Libarchive reads Zip archives as they are being streamed,
which allows it to read archives of arbitrary size.
It currently does not use the central directory; this
limits libarchive's ability to support some self-extracting
archives and ones that have been modified in certain ways.
=== Archive (library) file format===
The Unix archive format (commonly created by the
*ar*(1)
archiver) is a general-purpose format which is
used almost exclusively for object files to be
read by the link editor
*ld*(1).
The ar format has never been standardised.
There are two common variants:
the GNU format derived from SVR4,
and the BSD format, which first appeared in 4.4BSD.
The two differ primarily in their handling of filenames
longer than 15 characters:
the GNU/SVR4 variant writes a filename table at the beginning of the archive;
the BSD format stores each long filename in an extension
area adjacent to the entry.
Libarchive can read both extensions,
including archives that may include both types of long filenames.
Programs using libarchive can write GNU/SVR4 format
if they provide a filename table to be written into
the archive before any of the entries.
Any entries whose names are not in the filename table
will be written using BSD-style long filenames.
This can cause problems for programs such as
GNU ld that do not support the BSD-style long filenames.
=== mtree===
Libarchive can read and write files in
*mtree*(5)
format.
This format is not a true archive format, but rather a textual description
of a file hierarchy in which each line specifies the name of a file and
provides specific metadata about that file.
Libarchive can read all of the keywords supported by both
the NetBSD and FreeBSD versions of
*mtree*(1),
although many of the keywords cannot currently be stored in an
*archive_entry*
object.
When writing, libarchive supports use of the
*archive_write_set_options*(3)
interface to specify which keywords should be included in the
output.
If libarchive was compiled with access to suitable
cryptographic libraries (such as the OpenSSL libraries),
it can compute hash entries such as
*sha512*
or
*md5*
from file data being written to the mtree writer.

When reading an mtree file, libarchive will locate the corresponding
files on disk using the
*contents*
keyword if present or the regular filename.
If it can locate and open the file on disk, it will use that
to fill in any metadata that is missing from the mtree file
and will read the file contents and return those to the program
using libarchive.
If it cannot locate and open the file on disk, libarchive
will return an error for any attempt to read the entry
body.
== SEE ALSO ==
*ar*(1),
*cpio*(1),
*mkisofs*(1),
*shar*(1),
*tar*(1),
*zip*(1),
*zlib*(3),
*cpio*(5),
*mtree*(5),
*tar*(5)

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki
#summary LIBARCHIVE 3 manual page
== NAME ==
*libarchive*
- functions for reading and writing streaming archives
== LIBRARY ==
Lb libarchive
== OVERVIEW ==
The
*libarchive*
library provides a flexible interface for reading and writing
streaming archive files such as tar and cpio.
The library is inherently stream-oriented; readers serially iterate through
the archive, writers serially add things to the archive.
In particular, note that there is no built-in support for
random access nor for in-place modification.

When reading an archive, the library automatically detects the
format and the compression.
The library currently has read support for:
<ul>
<li>
old-style tar archives,
</li><li>
most variants of the POSIX
"ustar"
format,
</li><li>
the POSIX
"pax interchange"
format,
</li><li>
GNU-format tar archives,
</li><li>
most common cpio archive formats,
</li><li>
ISO9660 CD images (with or without RockRidge extensions),
</li><li>
Zip archives.
</li></ul>
The library automatically detects archives compressed with
*gzip*(1),
*bzip2*(1),
or
*compress*(1)
and decompresses them transparently.

When writing an archive, you can specify the compression
to be used and the format to use.
The library can write
<ul>
<li>
POSIX-standard
"ustar"
archives,
</li><li>
POSIX
"pax interchange format"
archives,
</li><li>
POSIX octet-oriented cpio archives,
</li><li>
two different variants of shar archives.
</li></ul>
Pax interchange format is an extension of the tar archive format that
eliminates essentially all of the limitations of historic tar formats
in a standard fashion that is supported
by POSIX-compliant
*pax*(1)
implementations on many systems as well as several newer implementations of
*tar*(1).
Note that the default write format will suppress the pax extended
attributes for most entries; explicitly requesting pax format will
enable those attributes for all entries.

The read and write APIs are accessed through the
*archive_read_XXX*()
functions and the
*archive_write_XXX*()
functions, respectively, and either can be used independently
of the other.

The rest of this manual page provides an overview of the library
operation.
More detailed information can be found in the individual manual
pages for each API or utility function.
== READING AN ARCHIVE ==
To read an archive, you must first obtain an initialized
*struct archive*
object from
*archive_read_new*().
You can then modify this object for the desired operations with the
various
*archive_read_set_XXX*()
and
*archive_read_support_XXX*()
functions.
In particular, you will need to invoke appropriate
*archive_read_support_XXX*()
functions to enable the corresponding compression and format
support.
Note that these latter functions perform two distinct operations:
they cause the corresponding support code to be linked into your
program, and they enable the corresponding auto-detect code.
Unless you have specific constraints, you will generally want
to invoke
*archive_read_support_compression_all*()
and
*archive_read_support_format_all*()
to enable auto-detect for all formats and compression types
currently supported by the library.

Once you have prepared the
*struct archive*
object, you call
*archive_read_open*()
to actually open the archive and prepare it for reading.
There are several variants of this function;
the most basic expects you to provide pointers to several
functions that can provide blocks of bytes from the archive.
There are convenience forms that allow you to
specify a filename, file descriptor,
*FILE `*`*
object, or a block of memory from which to read the archive data.
Note that the core library makes no assumptions about the
size of the blocks read;
callback functions are free to read whatever block size is
most appropriate for the medium.

Each archive entry consists of a header followed by a certain
amount of data.
You can obtain the next header with
*archive_read_next_header*(),
which returns a pointer to an
*struct archive_entry*
structure with information about the current archive element.
If the entry is a regular file, then the header will be followed
by the file data.
You can use
*archive_read_data*()
(which works much like the
*read*(2)
system call)
to read this data from the archive.
You may prefer to use the higher-level
*archive_read_data_skip*(),
which reads and discards the data for this entry,
*archive_read_data_to_buffer*(),
which reads the data into an in-memory buffer,
*archive_read_data_to_file*(),
which copies the data to the provided file descriptor, or
*archive_read_extract*(),
which recreates the specified entry on disk and copies data
from the archive.
In particular, note that
*archive_read_extract*()
uses the
*struct archive_entry*
structure that you provide it, which may differ from the
entry just read from the archive.
In particular, many applications will want to override the
pathname, file permissions, or ownership.

Once you have finished reading data from the archive, you
should call
*archive_read_close*()
to close the archive, then call
*archive_read_finish*()
to release all resources, including all memory allocated by the library.

The
*archive_read*(3)
manual page provides more detailed calling information for this API.
== WRITING AN ARCHIVE ==
You use a similar process to write an archive.
The
*archive_write_new*()
function creates an archive object useful for writing,
the various
*archive_write_set_XXX*()
functions are used to set parameters for writing the archive, and
*archive_write_open*()
completes the setup and opens the archive for writing.

Individual archive entries are written in a three-step
process:
You first initialize a
*struct archive_entry*
structure with information about the new entry.
At a minimum, you should set the pathname of the
entry and provide a
_struct_ stat
with a valid
_st_mode_
field, which specifies the type of object and
_st_size_
field, which specifies the size of the data portion of the object.
The
*archive_write_header*()
function actually writes the header data to the archive.
You can then use
*archive_write_data*()
to write the actual data.

After all entries have been written, use the
*archive_write_finish*()
function to release all resources.

The
*archive_write*(3)
manual page provides more detailed calling information for this API.
== DESCRIPTION ==
Detailed descriptions of each function are provided by the
corresponding manual pages.

All of the functions utilize an opaque
*struct archive*
datatype that provides access to the archive contents.

The
*struct archive_entry*
structure contains a complete description of a single archive
entry.
It uses an opaque interface that is fully documented in
*archive_entry*(3).

Users familiar with historic formats should be aware that the newer
variants have eliminated most restrictions on the length of textual fields.
Clients should not assume that filenames, link names, user names, or
group names are limited in length.
In particular, pax interchange format can easily accommodate pathnames
in arbitrary character sets that exceed
_PATH_MAX_.
== RETURN VALUES ==
Most functions return zero on success, non-zero on error.
The return value indicates the general severity of the error, ranging
from
*ARCHIVE_WARN*,
which indicates a minor problem that should probably be reported
to the user, to
*ARCHIVE_FATAL*,
which indicates a serious problem that will prevent any further
operations on this archive.
On error, the
*archive_errno*()
function can be used to retrieve a numeric error code (see
*errno*(2)).
The
*archive_error_string*()
returns a textual error message suitable for display.

*archive_read_new*()
and
*archive_write_new*()
return pointers to an allocated and initialized
*struct archive*
object.

*archive_read_data*()
and
*archive_write_data*()
return a count of the number of bytes actually read or written.
A value of zero indicates the end of the data for this entry.
A negative value indicates an error, in which case the
*archive_errno*()
and
*archive_error_string*()
functions can be used to obtain more information.
== ENVIRONMENT ==
There are character set conversions within the
*archive_entry*(3)
functions that are impacted by the currently-selected locale.
== SEE ALSO ==
*tar*(1),
*archive_entry*(3),
*archive_read*(3),
*archive_util*(3),
*archive_write*(3),
*tar*(5)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>
== BUGS ==
Some archive formats support information that is not supported by
*struct archive_entry .*
Such information cannot be fully archived or restored using this library.
This includes, for example, comments, character sets,
or the arbitrary key/value pairs that can appear in
pax interchange format archives.

Conversely, of course, not all of the information that can be
stored in an
*struct archive_entry*
is supported by all formats.
For example, cpio formats do not support nanosecond timestamps;
old tar formats do not support large device numbers.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki
#summary LIBARCHIVE 3 manual page
== NAME ==
*libarchive_internals*
- description of libarchive internal interfaces
== OVERVIEW ==
The
*libarchive*
library provides a flexible interface for reading and writing
streaming archive files such as tar and cpio.
Internally, it follows a modular layered design that should
make it easy to add new archive and compression formats.
== GENERAL ARCHITECTURE ==
Externally, libarchive exposes most operations through an
opaque, object-style interface.
The
*archive_entry*(1)
objects store information about a single filesystem object.
The rest of the library provides facilities to write
*archive_entry*(1)
objects to archive files,
read them from archive files,
and write them to disk.
(There are plans to add a facility to read
*archive_entry*(1)
objects from disk as well.)

The read and write APIs each have four layers: a public API
layer, a format layer that understands the archive file format,
a compression layer, and an I/O layer.
The I/O layer is completely exposed to clients who can replace
it entirely with their own functions.

In order to provide as much consistency as possible for clients,
some public functions are virtualized.
Eventually, it should be possible for clients to open
an archive or disk writer, and then use a single set of
code to select and write entries, regardless of the target.
== READ ARCHITECTURE ==
From the outside, clients use the
*archive_read*(3)
API to manipulate an
*archive*
object to read entries and bodies from an archive stream.
Internally, the
*archive*
object is cast to an
*archive_read*
object, which holds all read-specific data.
The API has four layers:
The lowest layer is the I/O layer.
This layer can be overridden by clients, but most clients use
the packaged I/O callbacks provided, for example, by
*archive_read_open_memory*(3),
and
*archive_read_open_fd*(3).
The compression layer calls the I/O layer to
read bytes and decompresses them for the format layer.
The format layer unpacks a stream of uncompressed bytes and
creates
*archive_entry*
objects from the incoming data.
The API layer tracks overall state
(for example, it prevents clients from reading data before reading a header)
and invokes the format and compression layer operations
through registered function pointers.
In particular, the API layer drives the format-detection process:
When opening the archive, it reads an initial block of data
and offers it to each registered compression handler.
The one with the highest bid is initialized with the first block.
Similarly, the format handlers are polled to see which handler
is the best for each archive.
(Prior to 2.4.0, the format bidders were invoked for each
entry, but this design hindered error recovery.)
=== I/O Layer and Client Callbacks===
The read API goes to some lengths to be nice to clients.
As a result, there are few restrictions on the behavior of
the client callbacks.

The client read callback is expected to provide a block
of data on each call.
A zero-length return does indicate end of file, but otherwise
blocks may be as small as one byte or as large as the entire file.
In particular, blocks may be of different sizes.

The client skip callback returns the number of bytes actually
skipped, which may be much smaller than the skip requested.
The only requirement is that the skip not be larger.
In particular, clients are allowed to return zero for any
skip that they don't want to handle.
The skip callback must never be invoked with a negative value.

Keep in mind that not all clients are reading from disk:
clients reading from networks may provide different-sized
blocks on every request and cannot skip at all;
advanced clients may use
*mmap*(2)
to read the entire file into memory at once and return the
entire file to libarchive as a single block;
other clients may begin asynchronous I/O operations for the
next block on each request.
=== Decompresssion Layer===
The decompression layer not only handles decompression,
it also buffers data so that the format handlers see a
much nicer I/O model.
The decompression API is a two stage peek/consume model.
A read_ahead request specifies a minimum read amount;
the decompression layer must provide a pointer to at least
that much data.
If more data is immediately available, it should return more:
the format layer handles bulk data reads by asking for a minimum
of one byte and then copying as much data as is available.

A subsequent call to the
*consume*()
function advances the read pointer.
Note that data returned from a
*read_ahead*()
call is guaranteed to remain in place until
the next call to
*read_ahead*().
Intervening calls to
*consume*()
should not cause the data to move.

Skip requests must always be handled exactly.
Decompression handlers that cannot seek forward should
not register a skip handler;
the API layer fills in a generic skip handler that reads and discards data.

A decompression handler has a specific lifecycle:
<dl>
<dt>Registration/Configuration</dt><dd>
When the client invokes the public support function,
the decompression handler invokes the internal
*__archive_read_register_compression*()
function to provide bid and initialization functions.
This function returns
*NULL*
on error or else a pointer to a
*struct* decompressor_t.
This structure contains a
_void_ * config
slot that can be used for storing any customization information.
</dd><dt>Bid</dt><dd>
The bid function is invoked with a pointer and size of a block of data.
The decompressor can access its config data
through the
_decompressor_
element of the
*archive_read*
object.
The bid function is otherwise stateless.
In particular, it must not perform any I/O operations.

The value returned by the bid function indicates its suitability
for handling this data stream.
A bid of zero will ensure that this decompressor is never invoked.
Return zero if magic number checks fail.
Otherwise, your initial implementation should return the number of bits
actually checked.
For example, if you verify two full bytes and three bits of another
byte, bid 19.
Note that the initial block may be very short;
be careful to only inspect the data you are given.
(The current decompressors require two bytes for correct bidding.)
</dd><dt>Initialize</dt><dd>
The winning bidder will have its init function called.
This function should initialize the remaining slots of the
_struct_ decompressor_t
object pointed to by the
_decompressor_
element of the
_archive_read_
object.
In particular, it should allocate any working data it needs
in the
_data_
slot of that structure.
The init function is called with the block of data that
was used for tasting.
At this point, the decompressor is responsible for all I/O
requests to the client callbacks.
The decompressor is free to read more data as and when
necessary.
</dd><dt>Satisfy I/O requests</dt><dd>
The format handler will invoke the
_read_ahead_,
_consume_,
and
_skip_
functions as needed.
</dd><dt>Finish</dt><dd>
The finish method is called only once when the archive is closed.
It should release anything stored in the
_data_
and
_config_
slots of the
_decompressor_
object.
It should not invoke the client close callback.
</dd></dl>
=== Format Layer===
The read formats have a similar lifecycle to the decompression handlers:
<dl>
<dt>Registration</dt><dd>
Allocate your private data and initialize your pointers.
</dd><dt>Bid</dt><dd>
Formats bid by invoking the
*read_ahead*()
decompression method but not calling the
*consume*()
method.
This allows each bidder to look ahead in the input stream.
Bidders should not look further ahead than necessary, as long
look aheads put pressure on the decompression layer to buffer
lots of data.
Most formats only require a few hundred bytes of look ahead;
look aheads of a few kilobytes are reasonable.
(The ISO9660 reader sometimes looks ahead by 48k, which
should be considered an upper limit.)
</dd><dt>Read header</dt><dd>
The header read is usually the most complex part of any format.
There are a few strategies worth mentioning:
For formats such as tar or cpio, reading and parsing the header is
straightforward since headers alternate with data.
For formats that store all header data at the beginning of the file,
the first header read request may have to read all headers into
memory and store that data, sorted by the location of the file
data.
Subsequent header read requests will skip forward to the
beginning of the file data and return the corresponding header.
</dd><dt>Read Data</dt><dd>
The read data interface supports sparse files; this requires that
each call return a block of data specifying the file offset and
size.
This may require you to carefully track the location so that you
can return accurate file offsets for each read.
Remember that the decompressor will return as much data as it has.
Generally, you will want to request one byte,
examine the return value to see how much data is available, and
possibly trim that to the amount you can use.
You should invoke consume for each block just before you return it.
</dd><dt>Skip All Data</dt><dd>
The skip data call should skip over all file data and trailing padding.
This is called automatically by the API layer just before each
header read.
It is also called in response to the client calling the public
*data_skip*()
function.
</dd><dt>Cleanup</dt><dd>
On cleanup, the format should release all of its allocated memory.
</dd></dl>
=== API Layer===
XXX to do XXX
== WRITE ARCHITECTURE ==
The write API has a similar set of four layers:
an API layer, a format layer, a compression layer, and an I/O layer.
The registration here is much simpler because only
one format and one compression can be registered at a time.
=== I/O Layer and Client Callbacks===
XXX To be written XXX
=== Compression Layer===
XXX To be written XXX
=== Format Layer===
XXX To be written XXX
=== API Layer===
XXX To be written XXX
== WRITE_DISK ARCHITECTURE ==
The write_disk API is intended to look just like the write API
to clients.
Since it does not handle multiple formats or compression, it
is not layered internally.
== GENERAL SERVICES ==
The
*archive_read*,
*archive_write*,
and
*archive_write_disk*
objects all contain an initial
*archive*
object which provides common support for a set of standard services.
(Recall that ANSI/ISO C90 guarantees that you can cast freely between
a pointer to a structure and a pointer to the first element of that
structure.)
The
*archive*
object has a magic value that indicates which API this object
is associated with,
slots for storing error information,
and function pointers for virtualized API functions.
== MISCELLANEOUS NOTES ==
Connecting existing archiving libraries into libarchive is generally
quite difficult.
In particular, many existing libraries strongly assume that you
are reading from a file; they seek forwards and backwards as necessary
to locate various pieces of information.
In contrast, libarchive never seeks backwards in its input, which
sometimes requires very different approaches.

For example, libarchive's ISO9660 support operates very differently
from most ISO9660 readers.
The libarchive support utilizes a work-queue design that
keeps a list of known entries sorted by their location in the input.
Whenever libarchive's ISO9660 implementation is asked for the next
header, checks this list to find the next item on the disk.
Directories are parsed when they are encountered and new
items are added to the list.
This design relies heavily on the ISO9660 image being optimized so that
directories always occur earlier on the disk than the files they
describe.

Depending on the specific format, such approaches may not be possible.
The ZIP format specification, for example, allows archivers to store
key information only at the end of the file.
In theory, it is possible to create ZIP archives that cannot
be read without seeking.
Fortunately, such archives are very rare, and libarchive can read
most ZIP archives, though it cannot always extract as much information
as a dedicated ZIP program.
== SEE ALSO ==
*archive*(3),
*archive_entry*(3),
*archive_read*(3),
*archive_write*(3),
*archive_write_disk*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle  <kientzle@acm.org.>
== BUGS ==

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki
#summary MTREE 5 manual page
== NAME ==
*mtree*
- format of mtree dir hierarchy files
== DESCRIPTION ==
The
*mtree*
format is a textual format that describes a collection of filesystem objects.
Such files are typically used to create or verify directory hierarchies.
=== General Format===
An
*mtree*
file consists of a series of lines, each providing information
about a single filesystem object.
Leading whitespace is always ignored.

When encoding file or pathnames, any backslash character or
character outside of the 95 printable ASCII characters must be
encoded as a a backslash followed by three
octal digits.
When reading mtree files, any appearance of a backslash
followed by three octal digits should be converted into the
corresponding character.

Each line is interpreted independently as one of the following types:
<dl>
<dt>Signature</dt><dd>
The first line of any mtree file must begin with
"#mtree".
If a file contains any full path entries, the first line should
begin with
"#mtree v2.0",
otherwise, the first line should begin with
"#mtree v1.0".
</dd><dt>Blank</dt><dd>
Blank lines are ignored.
</dd><dt>Comment</dt><dd>
Lines beginning with
*#*
are ignored.
</dd><dt>Special</dt><dd>
Lines beginning with
*/*
are special commands that influence
the interpretation of later lines.
</dd><dt>Relative</dt><dd>
If the first whitespace-delimited word has no
*/*
characters,
it is the name of a file in the current directory.
Any relative entry that describes a directory changes the
current directory.
</dd><dt>dot-dot</dt><dd>
As a special case, a relative entry with the filename
_.._
changes the current directory to the parent directory.
Options on dot-dot entries are always ignored.
</dd><dt>Full</dt><dd>
If the first whitespace-delimited word has a
*/*
character after
the first character, it is the pathname of a file relative to the
starting directory.
There can be multiple full entries describing the same file.
</dd></dl>

Some tools that process
*mtree*
files may require that multiple lines describing the same file
occur consecutively.
It is not permitted for the same file to be mentioned using
both a relative and a full file specification.
=== Special commands===
Two special commands are currently defined:
<dl>
<dt>*/set*</dt><dd>
This command defines default values for one or more keywords.
It is followed on the same line by one or more whitespace-separated
keyword definitions.
These definitions apply to all following files that do not specify
a value for that keyword.
</dd><dt>*/unset*</dt><dd>
This command removes any default value set by a previous
*/set*
command.
It is followed on the same line by one or more keywords
separated by whitespace.
</dd></dl>
=== Keywords===
After the filename, a full or relative entry consists of zero
or more whitespace-separated keyword definitions.
Each such definition consists of a key from the following
list immediately followed by an '=' sign
and a value.
Software programs reading mtree files should warn about
unrecognized keywords.

Currently supported keywords are as follows:
<dl>
<dt>*cksum*</dt><dd>
The checksum of the file using the default algorithm specified by
the
*cksum*(1)
utility.
</dd><dt>*contents*</dt><dd>
The full pathname of a file that holds the contents of this file.
</dd><dt>*flags*</dt><dd>
The file flags as a symbolic name.
See
*chflags*(1)
for information on these names.
If no flags are to be set the string
"none"
may be used to override the current default.
</dd><dt>*gid*</dt><dd>
The file group as a numeric value.
</dd><dt>*gname*</dt><dd>
The file group as a symbolic name.
</dd><dt>*ignore*</dt><dd>
Ignore any file hierarchy below this file.
</dd><dt>*link*</dt><dd>
The target of the symbolic link when type=link.
</dd><dt>*md5*</dt><dd>
The MD5 message digest of the file.
</dd><dt>*md5digest*</dt><dd>
A synonym for
*md5*.
</dd><dt>*mode*</dt><dd>
The current file's permissions as a numeric (octal) or symbolic
value.
</dd><dt>*nlink*</dt><dd>
The number of hard links the file is expected to have.
</dd><dt>*nochange*</dt><dd>
Make sure this file or directory exists but otherwise ignore all attributes.
</dd><dt>*ripemd160digest*</dt><dd>
The
*RIPEMD160*
message digest of the file.
</dd><dt>*rmd160*</dt><dd>
A synonym for
*ripemd160digest*.
</dd><dt>*rmd160digest*</dt><dd>
A synonym for
*ripemd160digest*.
</dd><dt>*sha1*</dt><dd>
The
*FIPS*
160-1
("Tn SHA-1")
message digest of the file.
</dd><dt>*sha1digest*</dt><dd>
A synonym for
*sha1*.
</dd><dt>*sha256*</dt><dd>
The
*FIPS*
180-2
("Tn SHA-256")
message digest of the file.
</dd><dt>*sha256digest*</dt><dd>
A synonym for
*sha256*.
</dd><dt>*size*</dt><dd>
The size, in bytes, of the file.
</dd><dt>*time*</dt><dd>
The last modification time of the file.
</dd><dt>*type*</dt><dd>
The type of the file; may be set to any one of the following:

<dl>
<dt>*block*</dt><dd>
block special device
</dd><dt>*char*</dt><dd>
character special device
</dd><dt>*dir*</dt><dd>
directory
</dd><dt>*fifo*</dt><dd>
fifo
</dd><dt>*file*</dt><dd>
regular file
</dd><dt>*link*</dt><dd>
symbolic link
</dd><dt>*socket*</dt><dd>
socket
</dd></dl>
</dd><dt>*uid*</dt><dd>
The file owner as a numeric value.
</dd><dt>*uname*</dt><dd>
The file owner as a symbolic name.
</dd></dl>

== SEE ALSO ==
*cksum*(1),
*find*(1),
*mtree*(8)
== BUGS ==
The
FreeBSD
implementation of mtree does not currently support
the
*mtree*
2.0
format.
The requirement for a
"#mtree"
signature line is new and not yet widely implemented.
== HISTORY ==
The
*mtree*
utility appeared in
BSD 4.3 Reno.
The
*MD5*
digest capability was added in
FreeBSD 2.1,
in response to the widespread use of programs which can spoof
*cksum*(1).
The
*SHA-1*
and
*RIPEMD160*
digests were added in
FreeBSD 4.0,
as new attacks have demonstrated weaknesses in
*MD5 .*
The
*SHA-256*
digest was added in
FreeBSD 6.0.
Support for file flags was added in
FreeBSD 4.0,
and mostly comes from
NetBSD.
The
"full"
entry format was added by
NetBSD.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki
#summary tar 5 manual page
== NAME ==
*tar*
- format of tape archive files
== DESCRIPTION ==
The
*tar*
archive format collects any number of files, directories, and other
file system objects (symbolic links, device nodes, etc.) into a single
stream of bytes.
The format was originally designed to be used with
tape drives that operate with fixed-size blocks, but is widely used as
a general packaging mechanism.
=== General Format===
A
*tar*
archive consists of a series of 512-byte records.
Each file system object requires a header record which stores basic metadata
(pathname, owner, permissions, etc.) and zero or more records containing any
file data.
The end of the archive is indicated by two records consisting
entirely of zero bytes.

For compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a fixed
number of records with each I/O operation.
These
"blocks"
are always a multiple of the record size.
The maximum block size supported by early
implementations was 10240 bytes or 20 records.
This is still the default for most implementations
although block sizes of 1MiB (2048 records) or larger are
commonly used with modern high-speed tape drives.
(Note: the terms
"block"
and
"record"
here are not entirely standard; this document follows the
convention established by John Gilmore in documenting
*pdtar*.)
=== Old-Style Archive Format===
The original tar archive format has been extended many times to
include additional information that various implementors found
necessary.
This section describes the variant implemented by the tar command
included in
At v7,
which seems to be the earliest widely-used version of the tar program.

The header record for an old-style
*tar*
archive consists of the following:
{{{
struct header_old_tar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char linkflag[1];
	char linkname[100];
	char pad[255];
};
}}}
All unused bytes in the header record are filled with nulls.
<dl>
<dt>_name_</dt><dd>
Pathname, stored as a null-terminated string.
Early tar implementations only stored regular files (including
hardlinks to those files).
One common early convention used a trailing "/" character to indicate
a directory name, allowing directory permissions and owner information
to be archived and restored.
</dd><dt>_mode_</dt><dd>
File mode, stored as an octal number in ASCII.
</dd><dt>_uid_, _gid_</dt><dd>
User id and group id of owner, as octal numbers in ASCII.
</dd><dt>_size_</dt><dd>
Size of file, as octal number in ASCII.
For regular files only, this indicates the amount of data
that follows the header.
In particular, this field was ignored by early tar implementations
when extracting hardlinks.
Modern writers should always store a zero length for hardlink entries.
</dd><dt>_mtime_</dt><dd>
Modification time of file, as an octal number in ASCII.
This indicates the number of seconds since the start of the epoch,
00:00:00 UTC January 1, 1970.
Note that negative values should be avoided
here, as they are handled inconsistently.
</dd><dt>_checksum_</dt><dd>
Header checksum, stored as an octal number in ASCII.
To compute the checksum, set the checksum field to all spaces,
then sum all bytes in the header using unsigned arithmetic.
This field should be stored as six octal digits followed by a null and a space
character.
Note that many early implementations of tar used signed arithmetic
for the checksum field, which can cause interoperability problems
when transferring archives between systems.
Modern robust readers compute the checksum both ways and accept the
header if either computation matches.
</dd><dt>_linkflag_, _linkname_</dt><dd>
In order to preserve hardlinks and conserve tape, a file
with multiple links is only written to the archive the first
time it is encountered.
The next time it is encountered, the
_linkflag_
is set to an ASCII
Sq 1
and the
_linkname_
field holds the first name under which this file appears.
(Note that regular files have a null value in the
_linkflag_
field.)
</dd></dl>

Early tar implementations varied in how they terminated these fields.
The tar command in
At v7
used the following conventions (this is also documented in early BSD manpages):
the pathname must be null-terminated;
the mode, uid, and gid fields must end in a space and a null byte;
the size and mtime fields must end in a space;
the checksum is terminated by a null and a space.
Early implementations filled the numeric fields with leading spaces.
This seems to have been common practice until the
IEEE Std 1003.1-1988 (``POSIX.1'')
standard was released.
For best portability, modern implementations should fill the numeric
fields with leading zeros.
=== Pre-POSIX Archives===
An early draft of
IEEE Std 1003.1-1988 (``POSIX.1'')
served as the basis for John Gilmore's
*pdtar*
program and many system implementations from the late 1980s
and early 1990s.
These archives generally follow the POSIX ustar
format described below with the following variations:
<ul>
<li>
The magic value is
"ustar\ \&"
(note the following space).
The version field contains a space character followed by a null.
</li><li>
The numeric fields are generally filled with leading spaces
(not leading zeros as recommended in the final standard).
</li><li>
The prefix field is often not used, limiting pathnames to
the 100 characters of old-style archives.
</li></ul>
=== POSIX ustar Archives===
IEEE Std 1003.1-1988 (``POSIX.1'')
defined a standard tar file format to be read and written
by compliant implementations of
*tar*(1).
This format is often called the
"ustar"
format, after the magic value used
in the header.
(The name is an acronym for
"Unix Standard TAR".)
It extends the historic format with new fields:
{{{
struct header_posix_ustar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char typeflag[1];
	char linkname[100];
	char magic[6];
	char version[2];
	char uname[32];
	char gname[32];
	char devmajor[8];
	char devminor[8];
	char prefix[155];
	char pad[12];
};
}}}
<dl>
<dt>_typeflag_</dt><dd>
Type of entry.
POSIX extended the earlier
_linkflag_
field with several new type values:
<dl>
<dt>"0"</dt><dd>
Regular file.
NUL should be treated as a synonym, for compatibility purposes.
</dd><dt>"1"</dt><dd>
Hard link.
</dd><dt>"2"</dt><dd>
Symbolic link.
</dd><dt>"3"</dt><dd>
Character device node.
</dd><dt>"4"</dt><dd>
Block device node.
</dd><dt>"5"</dt><dd>
Directory.
</dd><dt>"6"</dt><dd>
FIFO node.
</dd><dt>"7"</dt><dd>
Reserved.
</dd><dt>Other</dt><dd>
A POSIX-compliant implementation must treat any unrecognized typeflag value
as a regular file.
In particular, writers should ensure that all entries
have a valid filename so that they can be restored by readers that do not
support the corresponding extension.
Uppercase letters "A" through "Z" are reserved for custom extensions.
Note that sockets and whiteout entries are not archivable.
</dd></dl>
It is worth noting that the
_size_
field, in particular, has different meanings depending on the type.
For regular files, of course, it indicates the amount of data
following the header.
For directories, it may be used to indicate the total size of all
files in the directory, for use by operating systems that pre-allocate
directory space.
For all other types, it should be set to zero by writers and ignored
by readers.
</dd><dt>_magic_</dt><dd>
Contains the magic value
"ustar"
followed by a NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be properly set.
</dd><dt>_version_</dt><dd>
Version.
This should be
"00"
(two copies of the ASCII digit zero) for POSIX standard archives.
</dd><dt>_uname_, _gname_</dt><dd>
User and group names, as null-terminated ASCII strings.
These should be used in preference to the uid/gid values
when they are set and the corresponding names exist on
the system.
</dd><dt>_devmajor_, _devminor_</dt><dd>
Major and minor numbers for character device or block device entry.
</dd><dt>_name_, _prefix_</dt><dd>
If the pathname is too long to fit in the 100 bytes provided by the standard
format, it can be split at any
_/_
character with the first portion going into the prefix field.
If the prefix field is not empty, the reader will prepend
the prefix value and a
_/_
character to the regular name field to obtain the full pathname.
The standard does not require a trailing
_/_
character on directory names, though most implementations still
include this for compatibility reasons.
</dd></dl>

Note that all unused bytes must be set to
NUL.

Field termination is specified slightly differently by POSIX
than by previous implementations.
The
_magic_,
_uname_,
and
_gname_
fields must have a trailing
NUL.
The
_pathname_,
_linkname_,
and
_prefix_
fields must have a trailing
NUL
unless they fill the entire field.
(In particular, it is possible to store a 256-character pathname if it
happens to have a
_/_
as the 156th character.)
POSIX requires numeric fields to be zero-padded in the front, and requires
them to be terminated with either space or
NUL
characters.

Currently, most tar implementations comply with the ustar
format, occasionally extending it by adding new fields to the
blank area at the end of the header record.
=== Pax Interchange Format===
There are many attributes that cannot be portably stored in a
POSIX ustar archive.
IEEE Std 1003.1-2001 (``POSIX.1'')
defined a
"pax interchange format"
that uses two new types of entries to hold text-formatted
metadata that applies to following entries.
Note that a pax interchange format archive is a ustar archive in every
respect.
The new data is stored in ustar-compatible archive entries that use the
"x"
or
"g"
typeflag.
In particular, older implementations that do not fully support these
extensions will extract the metadata into regular files, where the
metadata can be examined as necessary.

An entry in a pax interchange format archive consists of one or
two standard ustar entries, each with its own header and data.
The first optional entry stores the extended attributes
for the following entry.
This optional first entry has an "x" typeflag and a size field that
indicates the total size of the extended attributes.
The extended attributes themselves are stored as a series of text-format
lines encoded in the portable UTF-8 encoding.
Each line consists of a decimal number, a space, a key string, an equals
sign, a value string, and a new line.
The decimal number indicates the length of the entire line, including the
initial length field and the trailing newline.
An example of such a field is:
{{{
25 ctime=1084839148.1212\en
}}}
Keys in all lowercase are standard keys.
Vendors can add their own keys by prefixing them with an all uppercase
vendor name and a period.
Note that, unlike the historic header, numeric values are stored using
decimal, not octal.
A description of some common keys follows:
<dl>
<dt>*atime*, *ctime*, *mtime*</dt><dd>
File access, inode change, and modification times.
These fields can be negative or include a decimal point and a fractional value.
</dd><dt>*uname*, *uid*, *gname*, *gid*</dt><dd>
User name, group name, and numeric UID and GID values.
The user name and group name stored here are encoded in UTF8
and can thus include non-ASCII characters.
The UID and GID fields can be of arbitrary length.
</dd><dt>*linkpath*</dt><dd>
The full path of the linked-to file.
Note that this is encoded in UTF8 and can thus include non-ASCII characters.
</dd><dt>*path*</dt><dd>
The full pathname of the entry.
Note that this is encoded in UTF8 and can thus include non-ASCII characters.
</dd><dt>*realtime.`*`*, *security.`*`*</dt><dd>
These keys are reserved and may be used for future standardization.
</dd><dt>*size*</dt><dd>
The size of the file.
Note that there is no length limit on this field, allowing conforming
archives to store files much larger than the historic 8GB limit.
</dd><dt>*SCHILY.`*`*</dt><dd>
Vendor-specific attributes used by Joerg Schilling's
*star*
implementation.
</dd><dt>*SCHILY.acl.access*, *SCHILY.acl.default*</dt><dd>
Stores the access and default ACLs as textual strings in a format
that is an extension of the format specified by POSIX.1e draft 17.
In particular, each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID.
This allows ACLs to be restored on systems that may not have complete
user or group information available (such as when NIS/YP or LDAP services
are temporarily unavailable).
</dd><dt>*SCHILY.devminor*, *SCHILY.devmajor*</dt><dd>
The full minor and major numbers for device nodes.
</dd><dt>*SCHILY.fflags*</dt><dd>
The file flags.
</dd><dt>*SCHILY.realsize*</dt><dd>
The full size of the file on disk.
XXX explain? XXX
</dd><dt>*SCHILY.dev,* *SCHILY.ino*, *SCHILY.nlinks*</dt><dd>
The device number, inode number, and link count for the entry.
In particular, note that a pax interchange format archive using Joerg
Schilling's
*SCHILY.`*`*
extensions can store all of the data from
_struct_ stat.
</dd><dt>*LIBARCHIVE.xattr.*_namespace_._key_</dt><dd>
Libarchive stores POSIX.1e-style extended attributes using
keys of this form.
The
_key_
value is URL-encoded:
All non-ASCII characters and the two special characters
"="
and
"%"
are encoded as
"%"
followed by two uppercase hexadecimal digits.
The value of this key is the extended attribute value
encoded in base 64.
XXX Detail the base-64 format here XXX
</dd><dt>*VENDOR.`*`*</dt><dd>
XXX document other vendor-specific extensions XXX
</dd></dl>

Any values stored in an extended attribute override the corresponding
values in the regular tar header.
Note that compliant readers should ignore the regular fields when they
are overridden.
This is important, as existing archivers are known to store non-compliant
values in the standard header fields in this situation.
There are no limits on length for any of these fields.
In particular, numeric fields can be arbitrarily large.
All text fields are encoded in UTF8.
Compliant writers should store only portable 7-bit ASCII characters in
the standard ustar header and use extended
attributes whenever a text value contains non-ASCII characters.

In addition to the
*x*
entry described above, the pax interchange format
also supports a
*g*
entry.
The
*g*
entry is identical in format, but specifies attributes that serve as
defaults for all subsequent archive entries.
The
*g*
entry is not widely used.

Besides the new
*x*
and
*g*
entries, the pax interchange format has a few other minor variations
from the earlier ustar format.
The most troubling one is that hardlinks are permitted to have
data following them.
This allows readers to restore any hardlink to a file without
having to rewind the archive to find an earlier entry.
However, it creates complications for robust readers, as it is no longer
clear whether or not they should ignore the size field for hardlink entries.
=== GNU Tar Archives===
The GNU tar program started with a pre-POSIX format similar to that
described earlier and has extended it using several different mechanisms:
It added new fields to the empty space in the header (some of which was later
used by POSIX for conflicting purposes);
it allowed the header to be continued over multiple records;
and it defined new entries that modify following entries
(similar in principle to the
*x*
entry described above, but each GNU special entry is single-purpose,
unlike the general-purpose
*x*
entry).
As a result, GNU tar archives are not POSIX compatible, although
more lenient POSIX-compliant readers can successfully extract most
GNU tar archives.
{{{
struct header_gnu_tar {
	char name[100];
	char mode[8];
	char uid[8];
	char gid[8];
	char size[12];
	char mtime[12];
	char checksum[8];
	char typeflag[1];
	char linkname[100];
	char magic[6];
	char version[2];
	char uname[32];
	char gname[32];
	char devmajor[8];
	char devminor[8];
	char atime[12];
	char ctime[12];
	char offset[12];
	char longnames[4];
	char unused[1];
	struct {
		char offset[12];
		char numbytes[12];
	} sparse[4];
	char isextended[1];
	char realsize[12];
	char pad[17];
};
}}}
<dl>
<dt>_typeflag_</dt><dd>
GNU tar uses the following special entry types, in addition to
those defined by POSIX:
<dl>
<dt>7</dt><dd>
GNU tar treats type "7" records identically to type "0" records,
except on one obscure RTOS where they are used to indicate the
pre-allocation of a contiguous file on disk.
</dd><dt>D</dt><dd>
This indicates a directory entry.
Unlike the POSIX-standard "5"
typeflag, the header is followed by data records listing the names
of files in this directory.
Each name is preceded by an ASCII "Y"
if the file is stored in this archive or "N" if the file is not
stored in this archive.
Each name is terminated with a null, and
an extra null marks the end of the name list.
The purpose of this
entry is to support incremental backups; a program restoring from
such an archive may wish to delete files on disk that did not exist
in the directory when the archive was made.

Note that the "D" typeflag specifically violates POSIX, which requires
that unrecognized typeflags be restored as normal files.
In this case, restoring the "D" entry as a file could interfere
with subsequent creation of the like-named directory.
</dd><dt>K</dt><dd>
The data for this entry is a long linkname for the following regular entry.
</dd><dt>L</dt><dd>
The data for this entry is a long pathname for the following regular entry.
</dd><dt>M</dt><dd>
This is a continuation of the last file on the previous volume.
GNU multi-volume archives guarantee that each volume begins with a valid
entry header.
To ensure this, a file may be split, with part stored at the end of one volume,
and part stored at the beginning of the next volume.
The "M" typeflag indicates that this entry continues an existing file.
Such entries can only occur as the first or second entry
in an archive (the latter only if the first entry is a volume label).
The
_size_
field specifies the size of this entry.
The
_offset_
field at bytes 369-380 specifies the offset where this file fragment
begins.
The
_realsize_
field specifies the total size of the file (which must equal
_size_
plus
_offset_).
When extracting, GNU tar checks that the header file name is the one it is
expecting, that the header offset is in the correct sequence, and that
the sum of offset and size is equal to realsize.
</dd><dt>N</dt><dd>
Type "N" records are no longer generated by GNU tar.
They contained a
list of files to be renamed or symlinked after extraction; this was
originally used to support long names.
The contents of this record
are a text description of the operations to be done, in the form
"Rename %s to %s\en"
or
"Symlink %s to %s\en ;"
in either case, both
filenames are escaped using K&R C syntax.
Due to security concerns, "N" records are now generally ignored
when reading archives.
</dd><dt>S</dt><dd>
This is a
"sparse"
regular file.
Sparse files are stored as a series of fragments.
The header contains a list of fragment offset/length pairs.
If more than four such entries are required, the header is
extended as necessary with
"extra"
header extensions (an older format that is no longer used), or
"sparse"
extensions.
</dd><dt>V</dt><dd>
The
_name_
field should be interpreted as a tape/volume header name.
This entry should generally be ignored on extraction.
</dd></dl>
</dd><dt>_magic_</dt><dd>
The magic field holds the five characters
"ustar"
followed by a space.
Note that POSIX ustar archives have a trailing null.
</dd><dt>_version_</dt><dd>
The version field holds a space character followed by a null.
Note that POSIX ustar archives use two copies of the ASCII digit
"0".
</dd><dt>_atime_, _ctime_</dt><dd>
The time the file was last accessed and the time of
last change of file information, stored in octal as with
_mtime_.
</dd><dt>_longnames_</dt><dd>
This field is apparently no longer used.
</dd><dt>Sparse _offset_ / _numbytes_</dt><dd>
Each such structure specifies a single fragment of a sparse
file.
The two fields store values as octal numbers.
The fragments are each padded to a multiple of 512 bytes
in the archive.
On extraction, the list of fragments is collected from the
header (including any extension headers), and the data
is then read and written to the file at appropriate offsets.
</dd><dt>_isextended_</dt><dd>
If this is set to non-zero, the header will be followed by additional
"sparse header"
records.
Each such record contains information about as many as 21 additional
sparse blocks as shown here:
{{{
struct gnu_sparse_header {
	struct {
		char offset[12];
		char numbytes[12];
	} sparse[21];
	char    isextended[1];
	char    padding[7];
};
}}}
</dd><dt>_realsize_</dt><dd>
A binary representation of the file's complete size, with a much larger range
than the POSIX file size.
In particular, with
*M*
type files, the current entry is only a portion of the file.
In that case, the POSIX size field will indicate the size of this
entry; the
_realsize_
field will indicate the total size of the file.
</dd></dl>
=== GNU tar pax archives===
GNU tar 1.14 (XXX check this XXX) and later will write
pax interchange format archives when you specify the
*--posix*
flag.
This format uses custom keywords to store sparse file information.
There have been three iterations of this support, referred to
as
"0.0",
"0.1",
and
"1.0".
<dl>
<dt>*GNU.sparse.numblocks*, *GNU.sparse.offset*, *GNU.sparse.numbytes*, *GNU.sparse.size*</dt><dd>
The
"0.0"
format used an initial
*GNU.sparse.numblocks*
attribute to indicate the number of blocks in the file, a pair of
*GNU.sparse.offset*
and
*GNU.sparse.numbytes*
to indicate the offset and size of each block,
and a single
*GNU.sparse.size*
to indicate the full size of the file.
This is not the same as the size in the tar header because the
latter value does not include the size of any holes.
This format required that the order of attributes be preserved and
relied on readers accepting multiple appearances of the same attribute
names, which is not officially permitted by the standards.
</dd><dt>*GNU.sparse.map*</dt><dd>
The
"0.1"
format used a single attribute that stored a comma-separated
list of decimal numbers.
Each pair of numbers indicated the offset and size, respectively,
of a block of data.
This does not work well if the archive is extracted by an archiver
that does not recognize this extension, since many pax implementations
simply discard unrecognized attributes.
</dd><dt>*GNU.sparse.major*, *GNU.sparse.minor*, *GNU.sparse.name*, *GNU.sparse.realsize*</dt><dd>
The
"1.0"
format stores the sparse block map in one or more 512-byte blocks
prepended to the file data in the entry body.
The pax attributes indicate the existence of this map
(via the
*GNU.sparse.major*
and
*GNU.sparse.minor*
fields)
and the full size of the file.
The
*GNU.sparse.name*
holds the true name of the file.
To avoid confusion, the name stored in the regular tar header
is a modified name so that extraction errors will be apparent
to users.
</dd></dl>
=== Solaris Tar===
XXX More Details Needed XXX

Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an
"extended"
format that is fundamentally similar to pax interchange format,
with the following differences:
<ul>
<li>
Extended attributes are stored in an entry whose type is
*X*,
not
*x*,
as used by pax interchange format.
The detailed format of this entry appears to be the same
as detailed above for the
*x*
entry.
</li><li>
An additional
*A*
entry is used to store an ACL for the following regular entry.
The body of this entry contains a seven-digit octal number
followed by a zero byte, followed by the
textual ACL description.
The octal value is the number of ACL entries
plus a constant that indicates the ACL type: 01000000
for POSIX.1e ACLs and 03000000 for NFSv4 ACLs.
</li></ul>
=== AIX Tar===
XXX More details needed XXX
=== Mac OS X Tar===
The tar distributed with Apple's Mac OS X stores most regular files
as two separate entries in the tar archive.
The two entries have the same name except that the first
one has
"._"
added to the beginning of the name.
This first entry stores the
"resource fork"
with additional attributes for the file.
The Mac OS X
*CopyFile*()
API is used to separate a file on disk into separate
resource and data streams and to reassemble those separate
streams when the file is restored to disk.
=== Other Extensions===
One obvious extension to increase the size of files is to
eliminate the terminating characters from the various
numeric fields.
For example, the standard only allows the size field to contain
11 octal digits, reserving the twelfth byte for a trailing
NUL character.
Allowing 12 octal digits allows file sizes up to 64 GB.

Another extension, utilized by GNU tar, star, and other newer
*tar*
implementations, permits binary numbers in the standard numeric fields.
This is flagged by setting the high bit of the first byte.
This permits 95-bit values for the length and time fields
and 63-bit values for the uid, gid, and device numbers.
GNU tar supports this extension for the
length, mtime, ctime, and atime fields.
Joerg Schilling's star program supports this extension for
all numeric fields.
Note that this extension is largely obsoleted by the extended attribute
record provided by the pax interchange format.

Another early GNU extension allowed base-64 values rather than octal.
This extension was short-lived and is no longer supported by any
implementation.
== SEE ALSO ==
*ar*(1),
*pax*(1),
*tar*(1)
== STANDARDS ==
The
*tar*
utility is no longer a part of POSIX or the Single Unix Standard.
It last appeared in
Version 2 of the Single UNIX Specification (``SUSv2'').
It has been supplanted in subsequent standards by
*pax*(1).
The ustar format is currently part of the specification for the
*pax*(1)
utility.
The pax interchange file format is new with
IEEE Std 1003.1-2001 (``POSIX.1'').
== HISTORY ==
A
*tar*
command appeared in Seventh Edition Unix, which was released in January, 1979.
It replaced the
*tp*
program from Fourth Edition Unix which in turn replaced the
*tap*
program from First Edition Unix.
John Gilmore's
*pdtar*
public-domain implementation (circa 1987) was highly influential
and formed the basis of
*GNU* tar
(circa 1988).
Joerg Shilling's
*star*
archiver is another open-source (GPL) archiver (originally developed
circa 1985) which features complete support for pax interchange
format.

This documentation was written as part of the
*libarchive*
and
*bsdtar*
project by
Tim Kientzle  <kientzle@FreeBSD.org.>

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
#summary BSDTAR 1 manual page
== NAME ==
*tar*
- manipulate tape archives
== SYNOPSIS ==
<br>
*tar*
`[`_bundled-flags_ `<`args`>``]`
`[``<`_file_`>` | `<`_pattern_`>` ...`]`
<br>
*tar*
{*-c*}
`[`_options_`]`
`[`_files_ | _directories_`]`
<br>
*tar*
{*-r* | *-u*}
*-f* _archive-file_
`[`_options_`]`
`[`_files_ | _directories_`]`
<br>
*tar*
{*-t* | *-x*}
`[`_options_`]`
`[`_patterns_`]`
== DESCRIPTION ==
*tar*
creates and manipulates streaming archive files.
This implementation can extract from tar, pax, cpio, zip, jar, ar,
and ISO 9660 cdrom images and can create tar, pax, cpio, ar,
and shar archives.

The first synopsis form shows a
"bundled"
option word.
This usage is provided for compatibility with historical implementations.
See COMPATIBILITY below for details.

The other synopsis forms show the preferred usage.
The first option to
*tar*
is a mode indicator from the following list:
<dl>
<dt>*-c*</dt><dd>
Create a new archive containing the specified items.
</dd><dt>*-r*</dt><dd>
Like
*-c*,
but new entries are appended to the archive.
Note that this only works on uncompressed archives stored in regular files.
The
*-f*
option is required.
</dd><dt>*-t*</dt><dd>
List archive contents to stdout.
</dd><dt>*-u*</dt><dd>
Like
*-r*,
but new entries are added only if they have a modification date
newer than the corresponding entry in the archive.
Note that this only works on uncompressed archives stored in regular files.
The
*-f*
option is required.
</dd><dt>*-x*</dt><dd>
Extract to disk from the archive.
If a file with the same name appears more than once in the archive,
each copy will be extracted, with later copies overwriting (replacing)
earlier copies.
</dd></dl>

In
*-c*,
*-r*,
or
*-u*
mode, each specified file or directory is added to the
archive in the order specified on the command line.
By default, the contents of each directory are also archived.

In extract or list mode, the entire command line
is read and parsed before the archive is opened.
The pathnames or patterns on the command line indicate
which items in the archive should be processed.
Patterns are shell-style globbing patterns as
documented in
*tcsh*(1).
== OPTIONS ==
Unless specifically stated otherwise, options are applicable in
all operating modes.
<dl>
<dt>*@*_archive_</dt><dd>
(c and r mode only)
The specified archive is opened and the entries
in it will be appended to the current archive.
As a simple example,
{{{
tar -c -f - newfile @original.tar
}}}
writes a new archive to standard output containing a file
_newfile_
and all of the entries from
_original.tar_.
In contrast,
{{{
tar -c -f - newfile original.tar
}}}
creates a new archive with only two entries.
Similarly,
{{{
tar -czf - --format pax @-
}}}
reads an archive from standard input (whose format will be determined
automatically) and converts it into a gzip-compressed
pax-format archive on stdout.
In this way,
*tar*
can be used to convert archives from one format to another.
</dd><dt>*-b* _blocksize_</dt><dd>
Specify the block size, in 512-byte records, for tape drive I/O.
As a rule, this argument is only needed when reading from or writing
to tape drives, and usually not even then as the default block size of
20 records (10240 bytes) is very common.
</dd><dt>*-C* _directory_</dt><dd>
In c and r mode, this changes the directory before adding
the following files.
In x mode, change directories after opening the archive
but before extracting entries from the archive.
</dd><dt>*--check-links*</dt><dd>
(c and r modes only)
Issue a warning message unless all links to each file are archived.
</dd><dt>*--chroot*</dt><dd>
(x mode only)
*chroot*()
to the current directory after processing any
*-C*
options and before extracting any files.
</dd><dt>*--exclude* _pattern_</dt><dd>
Do not process files or directories that match the
specified pattern.
Note that exclusions take precedence over patterns or filenames
specified on the command line.
</dd><dt>*--format* _format_</dt><dd>
(c, r, u mode only)
Use the specified format for the created archive.
Supported formats include
"cpio",
"pax",
"shar",
and
"ustar".
Other formats may also be supported; see
*libarchive-formats*(5)
for more information about currently-supported formats.
In r and u modes, when extending an existing archive, the format specified
here must be compatible with the format of the existing archive on disk.
</dd><dt>*-f* _file_</dt><dd>
Read the archive from or write the archive to the specified file.
The filename can be
_-_
for standard input or standard output.
If not specified, the default tape device will be used.
(On
FreeBSD,
the default tape device is
_/dev/sa0_.)
</dd><dt>*-H*</dt><dd>
(c and r mode only)
Symbolic links named on the command line will be followed; the
target of the link will be archived, not the link itself.
</dd><dt>*-h*</dt><dd>
(c and r mode only)
Synonym for
*-L*.
</dd><dt>*-I*</dt><dd>
Synonym for
*-T*.
</dd><dt>*--include* _pattern_</dt><dd>
Process only files or directories that match the specified pattern.
Note that exclusions specified with
*--exclude*
take precedence over inclusions.
If no inclusions are explicitly specified, all entries are processed by
default.
The
*--include*
option is especially useful when filtering archives.
For example, the command
{{{
tar -c -f new.tar --include='*foo*' @old.tgz
}}}
creates a new archive
_new.tar_
containing only the entries from
_old.tgz_
containing the string
Sq foo.
</dd><dt>*-j*</dt><dd>
(c mode only)
Compress the resulting archive with
*bzip2*(1).
In extract or list modes, this option is ignored.
Note that, unlike other
*tar*
implementations, this implementation recognizes bzip2 compression
automatically when reading archives.
</dd><dt>*-k*</dt><dd>
(x mode only)
Do not overwrite existing files.
In particular, if a file appears more than once in an archive,
later copies will not overwrite earlier copies.
</dd><dt>*--keep-newer-files*</dt><dd>
(x mode only)
Do not overwrite existing files that are newer than the
versions appearing in the archive being extracted.
</dd><dt>*-L*</dt><dd>
(c and r mode only)
All symbolic links will be followed.
Normally, symbolic links are archived as such.
With this option, the target of the link will be archived instead.
</dd><dt>*-l*</dt><dd>
This is a synonym for the
*--check-links*
option.
</dd><dt>*-m*</dt><dd>
(x mode only)
Do not extract modification time.
By default, the modification time is set to the time stored in the archive.
</dd><dt>*-n*</dt><dd>
(c, r, u modes only)
Do not recursively archive the contents of directories.
</dd><dt>*--newer* _date_</dt><dd>
(c, r, u modes only)
Only include files and directories newer than the specified date.
This compares ctime entries.
</dd><dt>*--newer-mtime* _date_</dt><dd>
(c, r, u modes only)
Like
*--newer*,
except it compares mtime entries instead of ctime entries.
</dd><dt>*--newer-than* _file_</dt><dd>
(c, r, u modes only)
Only include files and directories newer than the specified file.
This compares ctime entries.
</dd><dt>*--newer-mtime-than* _file_</dt><dd>
(c, r, u modes only)
Like
*--newer-than*,
except it compares mtime entries instead of ctime entries.
</dd><dt>*--nodump*</dt><dd>
(c and r modes only)
Honor the nodump file flag by skipping this file.
</dd><dt>*--null*</dt><dd>
(use with
*-I*,
*-T*,
or
*-X*)
Filenames or patterns are separated by null characters,
not by newlines.
This is often used to read filenames output by the
*-print0*
option to
*find*(1).
</dd><dt>*--numeric-owner*</dt><dd>
(x mode only)
Ignore symbolic user and group names when restoring archives to disk,
only numeric uid and gid values will be obeyed.
</dd><dt>*-O*</dt><dd>
(x, t modes only)
In extract (-x) mode, files will be written to standard out rather than
being extracted to disk.
In list (-t) mode, the file listing will be written to stderr rather than
the usual stdout.
</dd><dt>*-o*</dt><dd>
(x mode)
Use the user and group of the user running the program rather
than those specified in the archive.
Note that this has no significance unless
*-p*
is specified, and the program is being run by the root user.
In this case, the file modes and flags from
the archive will be restored, but ACLs or owner information in
the archive will be discarded.
</dd><dt>*-o*</dt><dd>
(c, r, u mode)
A synonym for
*--format* _ustar_
</dd><dt>*--one-file-system*</dt><dd>
(c, r, and u modes)
Do not cross mount points.
</dd><dt>*--options* _options_</dt><dd>
Select optional behaviors for particular modules.
The argument is a text string containing comma-separated
keywords and values.
These are passed to the modules that handle particular
formats to control how those formats will behave.
Each option has one of the following forms:
<dl>
<dt>_key=value_</dt><dd>
The key will be set to the specified value in every module that supports it.
Modules that do not support this key will ignore it.
</dd><dt>_key_</dt><dd>
The key will be enabled in every module that supports it.
This is equivalent to
_key_*=1*.
</dd><dt>_!key_</dt><dd>
The key will be disabled in every module that supports it.
</dd><dt>_module:key=value_, _module:key_, _module:!key_</dt><dd>
As above, but the corresponding key and value will be provided
only to modules whose name matches
_module_.
</dd></dl>
The currently supported modules and keys are:
<dl>
<dt>*iso9660:joliet*</dt><dd>
Support Joliet extensions.
This is enabled by default, use
*!joliet*
or
*iso9660:!joliet*
to disable.
</dd><dt>*iso9660:rockridge*</dt><dd>
Support Rock Ridge extensions.
This is enabled by default, use
*!rockridge*
or
*iso9660:!rockridge*
to disable.
</dd><dt>*gzip:compression-level*</dt><dd>
A decimal integer from 0 to 9 specifying the gzip compression level.
</dd><dt>*xz:compression-level*</dt><dd>
A decimal integer from 0 to 9 specifying the xz compression level.
</dd><dt>*mtree:*_keyword_</dt><dd>
The mtree writer module allows you to specify which mtree keywords
will be included in the output.
Supported keywords include:
*cksum*, *device*, *flags*, *gid*, *gname*, *indent*,
*link*, *md5*, *mode*, *nlink*, *rmd160*, *sha1*, *sha256*,
*sha384*, *sha512*, *size*, *time*, *uid*, *uname*.
The default is equivalent to:
"device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname".
</dd><dt>*mtree:all*</dt><dd>
Enables all of the above keywords.
You can also use
*mtree:!all*
to disable all keywords.
</dd><dt>*mtree:use-set*</dt><dd>
Enable generation of
*/set*
lines in the output.
</dd><dt>*mtree:indent*</dt><dd>
Produce human-readable output by indenting options and splitting lines
to fit into 80 columns.
</dd><dt>*zip:compression*=_type_</dt><dd>
Use
_type_
as compression method.
Supported values are store (uncompressed) and deflate (gzip algorithm).
</dd></dl>
If a provided option is not supported by any module, that
is a fatal error.
</dd><dt>*-P*</dt><dd>
Preserve pathnames.
By default, absolute pathnames (those that begin with a /
character) have the leading slash removed both when creating archives
and extracting from them.
Also,
*tar*
will refuse to extract archive entries whose pathnames contain
_.._
or whose target directory would be altered by a symlink.
This option suppresses these behaviors.
</dd><dt>*-p*</dt><dd>
(x mode only)
Preserve file permissions.
Attempt to restore the full permissions, including owner, file modes, file
flags and ACLs, if available, for each item extracted from the archive.
By default, newly-created files are owned by the user running
*tar*,
the file mode is restored for newly-created regular files, and
all other types of entries receive default permissions.
If
*tar*
is being run by root, the default is to restore the owner unless the
*-o*
option is also specified.
</dd><dt>*-q* (*--fast-read*)</dt><dd>
(x and t mode only)
Extract or list only the first archive entry that matches each pattern
or filename operand.
Exit as soon as each specified pattern or filename has been matched.
By default, the archive is always read to the very end, since
there can be multiple entries with the same name and, by convention,
later entries overwrite earlier entries.
This option is provided as a performance optimization.
</dd><dt>*-S*</dt><dd>
(x mode only)
Extract files as sparse files.
For every block on disk, check first if it contains only NULL bytes and seek
over it otherwise.
This works similiar to the conv=sparse option of dd.
</dd><dt>*--strip-components* _count_</dt><dd>
(x mode only)
Remove the specified number of leading path elements.
Pathnames with fewer elements will be silently skipped.
Note that the pathname is edited after checking inclusion/exclusion patterns
but before security checks.
</dd><dt>*-s* _pattern_</dt><dd>
Modify file or archive member names according to
_pattern_.
The pattern has the format
_/old/new/_`[`gps`]`
where
_old_
is a basic regular expression,
_new_
is the replacement string of the matched part,
and the optional trailing letters modify
how the replacement is handled.
If
_old_
is not matched, the pattern is skipped.
Within
_new_,
~ is substituted with the match, \1 to \9 with the content of
the corresponding captured group.
The optional trailing g specifies that matching should continue
after the matched part and stopped on the first unmatched pattern.
The optional trailing s specifies that the pattern applies to the value
of symbolic links.
The optional trailing p specifies that after a successful substitution
the original path name and the new path name should be printed to
standard error.
</dd><dt>*-T* _filename_</dt><dd>
In x or t mode,
*tar*
will read the list of names to be extracted from
_filename_.
In c mode,
*tar*
will read names to be archived from
_filename_.
The special name
"-C"
on a line by itself will cause the current directory to be changed to
the directory specified on the following line.
Names are terminated by newlines unless
*--null*
is specified.
Note that
*--null*
also disables the special handling of lines containing
"-C".
</dd><dt>*-U*</dt><dd>
(x mode only)
Unlink files before creating them.
Without this option,
*tar*
overwrites existing files, which preserves existing hardlinks.
With this option, existing hardlinks will be broken, as will any
symlink that would affect the location of an extracted file.
</dd><dt>*--use-compress-program* _program_</dt><dd>
Pipe the input (in x or t mode) or the output (in c mode) through
_program_
instead of using the builtin compression support.
</dd><dt>*-v*</dt><dd>
Produce verbose output.
In create and extract modes,
*tar*
will list each file name as it is read from or written to
the archive.
In list mode,
*tar*
will produce output similar to that of
*ls*(1).
Additional
*-v*
options will provide additional detail.
</dd><dt>*--version*</dt><dd>
Print version of
*tar*
and
*libarchive*,
and exit.
</dd><dt>*-w*</dt><dd>
Ask for confirmation for every action.
</dd><dt>*-X* _filename_</dt><dd>
Read a list of exclusion patterns from the specified file.
See
*--exclude*
for more information about the handling of exclusions.
</dd><dt>*-y*</dt><dd>
(c mode only)
Compress the resulting archive with
*bzip2*(1).
In extract or list modes, this option is ignored.
Note that, unlike other
*tar*
implementations, this implementation recognizes bzip2 compression
automatically when reading archives.
</dd><dt>*-z*</dt><dd>
(c mode only)
Compress the resulting archive with
*gzip*(1).
In extract or list modes, this option is ignored.
Note that, unlike other
*tar*
implementations, this implementation recognizes gzip compression
automatically when reading archives.
</dd><dt>*-Z*</dt><dd>
(c mode only)
Compress the resulting archive with
*compress*(1).
In extract or list modes, this option is ignored.
Note that, unlike other
*tar*
implementations, this implementation recognizes compress compression
automatically when reading archives.
</dd></dl>
== ENVIRONMENT ==
The following environment variables affect the execution of
*tar*:
<dl>
<dt>*LANG*
The locale to use.
See
*environ*(7)
for more information.
</dt><dt>*TAPE*
The default tape device.
The
*-f*
option overrides this.
</dt><dt>*TZ*
The timezone to use when displaying dates.
See
*environ*(7)
for more information.
</dt></dl>
== FILES ==
<dl>
<dt>*/dev/sa0*
The default tape device, if not overridden by the
.IR TAPE
environment variable or the
*-f*
option.
</dt></dl>
== EXIT STATUS ==
The *tar* utility exits 0 on success, and >0 if an error occurs.
== EXAMPLES ==
The following creates a new archive
called
_file.tar.gz_
that contains two files
_source.c_
and
_source.h_:
{{{
tar -czf file.tar.gz source.c source.h
}}}

To view a detailed table of contents for this
archive:
{{{
tar -tvf file.tar.gz
}}}

To extract all entries from the archive on
the default tape drive:
{{{
tar -x
}}}

To examine the contents of an ISO 9660 cdrom image:
{{{
tar -tf image.iso
}}}

To move file hierarchies, invoke
*tar*
as
{{{
tar -cf - -C srcdir\. | tar -xpf - -C destdir
}}}
or more traditionally
{{{
cd srcdir ; tar -cf -\. | (cd destdir ; tar -xpf -)
}}}

In create mode, the list of files and directories to be archived
can also include directory change instructions of the form
*-C*_foo/baz_
and archive inclusions of the form
*@*_archive-file_.
For example, the command line
{{{
tar -c -f new.tar foo1 @old.tgz -C/tmp foo2
}}}
will create a new archive
_new.tar_.
*tar*
will read the file
_foo1_
from the current directory and add it to the output archive.
It will then read each entry from
_old.tgz_
and add those entries to the output archive.
Finally, it will switch to the
_/tmp_
directory and add
_foo2_
to the output archive.

An input file in
*mtree*(5)
format can be used to create an output archive with arbitrary ownership,
permissions, or names that differ from existing data on disk:

{{{
$ cat input.mtree
}}}
{{{
#mtree
}}}
{{{
usr/bin uid=0 gid=0 mode=0755 type=dir
}}}
{{{
usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls
}}}
{{{
$ tar -cvf output.tar @input.mtree
}}}

The
*--newer*
and
*--newer-mtime*
switches accept a variety of common date and time specifications, including
"12 Mar 2005 7:14:29pm",
"2005-03-12 19:14",
"5 minutes ago",
and
"19:14 PST May 1".

The
*--options*
argument can be used to control various details of archive generation
or reading.
For example, you can generate mtree output which only contains
*type*, *time*,
and
*uid*
keywords:
{{{
tar -cf file.tar --format=mtree --options='!all,type,time,uid' dir
}}}
or you can set the compression level used by gzip or xz compression:
{{{
tar -czf file.tar --options='compression-level=9'.
}}}
For more details, see the explanation of the
*archive_read_set_options*()
and
*archive_write_set_options*()
API calls that are described in
*archive_read*(3)
and
*archive_write*(3).
== COMPATIBILITY ==
The bundled-arguments format is supported for compatibility
with historic implementations.
It consists of an initial word (with no leading - character) in which
each character indicates an option.
Arguments follow as separate words.
The order of the arguments must match the order
of the corresponding characters in the bundled command word.
For example,
{{{
tar tbf 32 file.tar
}}}
specifies three flags
*t*,
*b*,
and
*f*.
The
*b*
and
*f*
flags both require arguments,
so there must be two additional items
on the command line.
The
_32_
is the argument to the
*b*
flag, and
_file.tar_
is the argument to the
*f*
flag.

The mode options c, r, t, u, and x and the options
b, f, l, m, o, v, and w comply with SUSv2.

For maximum portability, scripts that invoke
*tar*
should use the bundled-argument format above, should limit
themselves to the
*c*,
*t*,
and
*x*
modes, and the
*b*,
*f*,
*m*,
*v*,
and
*w*
options.

Additional long options are provided to improve compatibility with other
tar implementations.
== SECURITY ==
Certain security issues are common to many archiving programs, including
*tar*.
In particular, carefully-crafted archives can request that
*tar*
extract files to locations outside of the target directory.
This can potentially be used to cause unwitting users to overwrite
files they did not intend to overwrite.
If the archive is being extracted by the superuser, any file
on the system can potentially be overwritten.
There are three ways this can happen.
Although
*tar*
has mechanisms to protect against each one,
savvy users should be aware of the implications:
<ul>
<li>
Archive entries can have absolute pathnames.
By default,
*tar*
removes the leading
_/_
character from filenames before restoring them to guard against this problem.
</li><li>
Archive entries can have pathnames that include
_.._
components.
By default,
*tar*
will not extract files containing
_.._
components in their pathname.
</li><li>
Archive entries can exploit symbolic links to restore
files to other directories.
An archive can restore a symbolic link to another directory,
then use that link to restore a file into that directory.
To guard against this,
*tar*
checks each extracted path for symlinks.
If the final path element is a symlink, it will be removed
and replaced with the archive entry.
If
*-U*
is specified, any intermediate symlink will also be unconditionally removed.
If neither
*-U*
nor
*-P*
is specified,
*tar*
will refuse to extract the entry.
</li></ul>
To protect yourself, you should be wary of any archives that
come from untrusted sources.
You should examine the contents of an archive with
{{{
tar -tf filename
}}}
before extraction.
You should use the
*-k*
option to ensure that
*tar*
will not overwrite any existing files or the
*-U*
option to remove any pre-existing files.
You should generally not extract archives while running with super-user
privileges.
Note that the
*-P*
option to
*tar*
disables the security checks above and allows you to extract
an archive while preserving any absolute pathnames,
_.._
components, or symlinks to other directories.
== SEE ALSO ==
*bzip2*(1),
*compress*(1),
*cpio*(1),
*gzip*(1),
*mt*(1),
*pax*(1),
*shar*(1),
*libarchive*(3),
*libarchive-formats*(5),
*tar*(5)
== STANDARDS ==
There is no current POSIX standard for the tar command; it appeared
in
ISO/IEC 9945-1:1996 (``POSIX.1'')
but was dropped from
IEEE Std 1003.1-2001 (``POSIX.1'').
The options used by this implementation were developed by surveying a
number of existing tar implementations as well as the old POSIX specification
for tar and the current POSIX specification for pax.

The ustar and pax interchange file formats are defined by
IEEE Std 1003.1-2001 (``POSIX.1'')
for the pax command.
== HISTORY ==
A
*tar*
command appeared in Seventh Edition Unix, which was released in January, 1979.
There have been numerous other implementations,
many of which extended the file format.
John Gilmore's
*pdtar*
public-domain implementation (circa November, 1987)
was quite influential, and formed the basis of GNU tar.
GNU tar was included as the standard system tar
in
FreeBSD
beginning with
FreeBSD 1.0.

This is a complete re-implementation based on the
*libarchive*(3)
library.
== BUGS ==
This program follows
ISO/IEC 9945-1:1996 (``POSIX.1'')
for the definition of the
*-l*
option.
Note that GNU tar prior to version 1.15 treated
*-l*
as a synonym for the
*--one-file-system*
option.

The
*-C* _dir_
option may differ from historic implementations.

All archive output is written in correctly-sized blocks, even
if the output is being compressed.
Whether or not the last output block is padded to a full
block size varies depending on the format and the
output device.
For tar and cpio formats, the last block of output is padded
to a full block size if the output is being
written to standard output or to a character or block device such as
a tape drive.
If the output is being written to a regular file, the last block
will not be padded.
Many compressors, including
*gzip*(1)
and
*bzip2*(1),
complain about the null padding when decompressing an archive created by
*tar*,
although they still extract it correctly.

The compression and decompression is implemented internally, so
there may be insignificant differences between the compressed output
generated by
{{{
tar -czf - file
}}}
and that generated by
{{{
tar -cf - file | gzip
}}}

The default should be to read and write archives to the standard I/O paths,
but tradition (and POSIX) dictates otherwise.

The
*r*
and
*u*
modes require that the archive be uncompressed
and located in a regular file on disk.
Other archives can be modified using
*c*
mode with the
_@archive-file_
extension.

To archive a file called
_@foo_
or
_-foo_
you must specify it as
_./@foo_
or
_./-foo_,
respectively.

In create mode, a leading
_./_
is always removed.
A leading
_/_
is stripped unless the
*-P*
option is specified.

There needs to be better support for file selection on both create
and extract.

There is not yet any support for multi-volume archives or for archiving
sparse files.

Converting between dissimilar archive formats (such as tar and cpio) using the
*@*_-_
convention can cause hard link information to be lost.
(This is a consequence of the incompatible ways that different archive
formats store hardlink information.)

There are alternative long options for many of the short options that
are deliberately not documented.

File Added: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki
#summary BSDCPIO 1 manual page
== NAME ==
*cpio*
- copy files to and from archives
== SYNOPSIS ==
<br>
*cpio*
{*-i*}
`[`_options_`]`
`[`_pattern_ ...`]`
`[`_`<`_ archive`]`
<br>
*cpio*
{*-o*}
`[`_options_`]`
_`<`_ name-list
`[`_>_ archive`]`
<br>
*cpio*
{*-p*}
`[`_options_`]`
_dest-dir_
_`<`_ name-list
== DESCRIPTION ==
*cpio*
copies files between archives and directories.
This implementation can extract from tar, pax, cpio, zip, jar, ar,
and ISO 9660 cdrom images and can create tar, pax, cpio, ar,
and shar archives.

The first option to
*cpio*
is a mode indicator from the following list:
<dl>
<dt>*-i*</dt><dd>
Input.
Read an archive from standard input (unless overriden) and extract the
contents to disk or (if the
*-t*
option is specified)
list the contents to standard output.
If one or more file patterns are specified, only files matching
one of the patterns will be extracted.
</dd><dt>*-o*</dt><dd>
Output.
Read a list of filenames from standard input and produce a new archive
on standard output (unless overriden) containing the specified items.
</dd><dt>*-p*</dt><dd>
Pass-through.
Read a list of filenames from standard input and copy the files to the
specified directory.
</dd></dl>

== OPTIONS ==
Unless specifically stated otherwise, options are applicable in
all operating modes.
<dl>
<dt>*-0*</dt><dd>
Read filenames separated by NUL characters instead of newlines.
This is necessary if any of the filenames being read might contain newlines.
</dd><dt>*-A*</dt><dd>
(o mode only)
Append to the specified archive.
(Not yet implemented.)
</dd><dt>*-a*</dt><dd>
(o and p modes)
Reset access times on files after they are read.
</dd><dt>*-B*</dt><dd>
(o mode only)
Block output to records of 5120 bytes.
</dd><dt>*-C* _size_</dt><dd>
(o mode only)
Block output to records of
_size_
bytes.
</dd><dt>*-c*</dt><dd>
(o mode only)
Use the old POSIX portable character format.
Equivalent to
*--format* _odc_.
</dd><dt>*-d*</dt><dd>
(i and p modes)
Create directories as necessary.
</dd><dt>*-E* _file_</dt><dd>
(i mode only)
Read list of file name patterns from
_file_
to list and extract.
</dd><dt>*-F* _file_</dt><dd>
Read archive from or write archive to
_file_.
</dd><dt>*-f* _pattern_</dt><dd>
(i mode only)
Ignore files that match
_pattern_.
</dd><dt>*--format* _format_</dt><dd>
(o mode only)
Produce the output archive in the specified format.
Supported formats include:

<dl>
<dt>_cpio_</dt><dd>
Synonym for
_odc_.
</dd><dt>_newc_</dt><dd>
The SVR4 portable cpio format.
</dd><dt>_odc_</dt><dd>
The old POSIX.1 portable octet-oriented cpio format.
</dd><dt>_pax_</dt><dd>
The POSIX.1 pax format, an extension of the ustar format.
</dd><dt>_ustar_</dt><dd>
The POSIX.1 tar format.
</dd></dl>

The default format is
_odc_.
See
*libarchive_formats*(5)
for more complete information about the
formats currently supported by the underlying
*libarchive*(3)
library.
</dd><dt>*-H* _format_</dt><dd>
Synonym for
*--format*.
</dd><dt>*-h*, *--help*</dt><dd>
Print usage information.
</dd><dt>*-I* _file_</dt><dd>
Read archive from
_file_.
</dd><dt>*-i*</dt><dd>
Input mode.
See above for description.
</dd><dt>*--insecure*</dt><dd>
(i and p mode only)
Disable security checks during extraction or copying.
This allows extraction via symbolic links and path names containing
Sq ..
in the name.
</dd><dt>*-J*</dt><dd>
(o mode only)
Compress the file with xz-compatible compression before writing it.
In input mode, this option is ignored; xz compression is recognized
automatically on input.
</dd><dt>*-j*</dt><dd>
Synonym for
*-y*.
</dd><dt>*-L*</dt><dd>
(o and p modes)
All symbolic links will be followed.
Normally, symbolic links are archived and copied as symbolic links.
With this option, the target of the link will be archived or copied instead.
</dd><dt>*-l*</dt><dd>
(p mode only)
Create links from the target directory to the original files,
instead of copying.
</dd><dt>*-lzma*</dt><dd>
(o mode only)
Compress the file with lzma-compatible compression before writing it.
In input mode, this option is ignored; lzma compression is recognized
automatically on input.
</dd><dt>*-m*</dt><dd>
(i and p modes)
Set file modification time on created files to match
those in the source.
</dd><dt>*-n*</dt><dd>
(i mode, only with
*-t*)
Display numeric uid and gid.
By default,
*cpio*
displays the user and group names when they are provided in the
archive, or looks up the user and group names in the system
password database.
</dd><dt>*-no-preserve-owner*</dt><dd>
(i mode only)
Do not attempt to restore file ownership.
This is the default when run by non-root users.
</dd><dt>*-O* _file_</dt><dd>
Write archive to
_file_.
</dd><dt>*-o*</dt><dd>
Output mode.
See above for description.
</dd><dt>*-p*</dt><dd>
Pass-through mode.
See above for description.
</dd><dt>*-preserve-owner*</dt><dd>
(i mode only)
Restore file ownership.
This is the default when run by the root user.
</dd><dt>*--quiet*</dt><dd>
Suppress unnecessary messages.
</dd><dt>*-R* `[`user`]``[`:`]``[`group`]`</dt><dd>
Set the owner and/or group on files in the output.
If group is specified with no user
(for example,
*-R* _:wheel_)
then the group will be set but not the user.
If the user is specified with a trailing colon and no group
(for example,
*-R* _root:_)
then the group will be set to the user's default group.
If the user is specified with no trailing colon, then
the user will be set but not the group.
In
*-i*
and
*-p*
modes, this option can only be used by the super-user.
(For compatibility, a period can be used in place of the colon.)
</dd><dt>*-r*</dt><dd>
(All modes.)
Rename files interactively.
For each file, a prompt is written to
_/dev/tty_
containing the name of the file and a line is read from
_/dev/tty_.
If the line read is blank, the file is skipped.
If the line contains a single period, the file is processed normally.
Otherwise, the line is taken to be the new name of the file.
</dd><dt>*-t*</dt><dd>
(i mode only)
List the contents of the archive to stdout;
do not restore the contents to disk.
</dd><dt>*-u*</dt><dd>
(i and p modes)
Unconditionally overwrite existing files.
Ordinarily, an older file will not overwrite a newer file on disk.
</dd><dt>*-v*</dt><dd>
Print the name of each file to stderr as it is processed.
With
*-t*,
provide a detailed listing of each file.
</dd><dt>*--version*</dt><dd>
Print the program version information and exit.
</dd><dt>*-y*</dt><dd>
(o mode only)
Compress the archive with bzip2-compatible compression before writing it.
In input mode, this option is ignored;
bzip2 compression is recognized automatically on input.
</dd><dt>*-Z*</dt><dd>
(o mode only)
Compress the archive with compress-compatible compression before writing it.
In input mode, this option is ignored;
compression is recognized automatically on input.
</dd><dt>*-z*</dt><dd>
(o mode only)
Compress the archive with gzip-compatible compression before writing it.
In input mode, this option is ignored;
gzip compression is recognized automatically on input.
</dd></dl>
== ENVIRONMENT ==
The following environment variables affect the execution of
*cpio*:
<dl>
<dt>*LANG*
The locale to use.
See
*environ*(7)
for more information.
</dt><dt>*TZ*
The timezone to use when displaying dates.
See
*environ*(7)
for more information.
</dt></dl>
== EXIT STATUS ==
The *cpio* utility exits 0 on success, and >0 if an error occurs.
== EXAMPLES ==
The
*cpio*
command is traditionally used to copy file heirarchies in conjunction
with the
*find*(1)
command.
The first example here simply copies all files from
_src_
to
_dest_:
{{{
find src | cpio -pmud dest
}}}

By carefully selecting options to the
*find*(1)
command and combining it with other standard utilities,
it is possible to exercise very fine control over which files are copied.
This next example copies files from
_src_
to
_dest_
that are more than 2 days old and whose names match a particular pattern:
{{{
find src -mtime _+2_ | grep foo[bar] | cpio -pdmu dest
}}}

This example copies files from
_src_
to
_dest_
that are more than 2 days old and which contain the word
"foobar":
{{{
find src -mtime _+2_ | xargs grep -l foobar | cpio -pdmu dest
}}}
== COMPATIBILITY ==
The mode options i, o, and p and the options
a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2.

The old POSIX.1 standard specified that only
*-i*,
*-o*,
and
*-p*
were interpreted as command-line options.
Each took a single argument of a list of modifier
characters.
For example, the standard syntax allows
*-imu*
but does not support
*-miu*
or
*-i* *-m* *-u*,
since
_m_
and
_u_
are only modifiers to
*-i*,
they are not command-line options in their own right.
The syntax supported by this implementation is backwards-compatible
with the standard.
For best compatibility, scripts should limit themselves to the
standard syntax.
== SEE ALSO ==
*bzip2*(1),
*tar*(1),
*gzip*(1),
*mt*(1),
*pax*(1),
*libarchive*(3),
*cpio*(5),
*libarchive-formats*(5),
*tar*(5)
== STANDARDS ==
There is no current POSIX standard for the cpio command; it appeared
in
ISO/IEC 9945-1:1996 (``POSIX.1'')
but was dropped from
IEEE Std 1003.1-2001 (``POSIX.1'').

The cpio, ustar, and pax interchange file formats are defined by
IEEE Std 1003.1-2001 (``POSIX.1'')
for the pax command.
== HISTORY ==
The original
*cpio*
and
*find*
utilities were written by Dick Haight
while working in AT&T's Unix Support Group.
They first appeared in 1977 in PWB/UNIX 1.0, the
"Programmer's Work Bench"
system developed for use within AT&T.
They were first released outside of AT&T as part of System III Unix in 1981.
As a result,
*cpio*
actually predates
*tar*,
even though it was not well-known outside of AT&T until some time later.

This is a complete re-implementation based on the
*libarchive*(3)
library.
== BUGS ==
The cpio archive format has several basic limitations:
It does not store user and group names, only numbers.
As a result, it cannot be reliably used to transfer
files between systems with dissimilar user and group numbering.
Older cpio formats limit the user and group numbers to
16 or 18 bits, which is insufficient for modern systems.
The cpio archive formats cannot support files over 4 gigabytes,
except for the
"odc"
variant, which can support files up to 8 gigabytes.

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/Makefile

default: all


archive_entry.3.pdf: ../../libarchive/archive_entry.3
	groff -mdoc -T ps ../../libarchive/archive_entry.3 | ps2pdf - - > archive_entry.3.pdf

archive_read.3.pdf: ../../libarchive/archive_read.3
	groff -mdoc -T ps ../../libarchive/archive_read.3 | ps2pdf - - > archive_read.3.pdf

archive_read_disk.3.pdf: ../../libarchive/archive_read_disk.3
	groff -mdoc -T ps ../../libarchive/archive_read_disk.3 | ps2pdf - - > archive_read_disk.3.pdf

archive_util.3.pdf: ../../libarchive/archive_util.3
	groff -mdoc -T ps ../../libarchive/archive_util.3 | ps2pdf - - > archive_util.3.pdf

archive_write.3.pdf: ../../libarchive/archive_write.3
	groff -mdoc -T ps ../../libarchive/archive_write.3 | ps2pdf - - > archive_write.3.pdf

archive_write_disk.3.pdf: ../../libarchive/archive_write_disk.3
	groff -mdoc -T ps ../../libarchive/archive_write_disk.3 | ps2pdf - - > archive_write_disk.3.pdf

cpio.5.pdf: ../../libarchive/cpio.5
	groff -mdoc -T ps ../../libarchive/cpio.5 | ps2pdf - - > cpio.5.pdf

libarchive-formats.5.pdf: ../../libarchive/libarchive-formats.5
	groff -mdoc -T ps ../../libarchive/libarchive-formats.5 | ps2pdf - - > libarchive-formats.5.pdf

libarchive.3.pdf: ../../libarchive/libarchive.3
	groff -mdoc -T ps ../../libarchive/libarchive.3 | ps2pdf - - > libarchive.3.pdf

libarchive_internals.3.pdf: ../../libarchive/libarchive_internals.3
	groff -mdoc -T ps ../../libarchive/libarchive_internals.3 | ps2pdf - - > libarchive_internals.3.pdf

mtree.5.pdf: ../../libarchive/mtree.5
	groff -mdoc -T ps ../../libarchive/mtree.5 | ps2pdf - - > mtree.5.pdf

tar.5.pdf: ../../libarchive/tar.5
	groff -mdoc -T ps ../../libarchive/tar.5 | ps2pdf - - > tar.5.pdf

bsdtar.1.pdf: ../../tar/bsdtar.1
	groff -mdoc -T ps ../../tar/bsdtar.1 | ps2pdf - - > bsdtar.1.pdf

bsdcpio.1.pdf: ../../cpio/bsdcpio.1
	groff -mdoc -T ps ../../cpio/bsdcpio.1 | ps2pdf - - > bsdcpio.1.pdf
all: archive_entry.3.pdf archive_read.3.pdf archive_read_disk.3.pdf archive_util.3.pdf archive_write.3.pdf archive_write_disk.3.pdf cpio.5.pdf libarchive-formats.5.pdf libarchive.3.pdf libarchive_internals.3.pdf mtree.5.pdf tar.5.pdf bsdtar.1.pdf bsdcpio.1.pdf

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateD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'zt%wKfVu8xkʪ	o4![؏Ֆws(nO1ΡCZQHc澘[=Y,E
Ri]<g|nCQF|:yendstream
endobj
39 0 obj
2609
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 13 0 R
/Font 14 0 R
>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 16 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 28 0 R
/Font 29 0 R
>>
/Contents 26 0 R
>>
endobj
30 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 35 0 R
/Font 36 0 R
>>
/Contents 31 0 R
>>
endobj
37 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 40 0 R
/Font 41 0 R
>>
/Contents 38 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
20 0 R
25 0 R
30 0 R
37 0 R
] /Count 6
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 44 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R12
12 0 R/R10
10 0 R/R8
8 0 R/R11
11 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R12
12 0 R/R10
10 0 R/R8
8 0 R/R11
11 0 R>>
endobj
28 0 obj
<</R7
7 0 R>>
endobj
29 0 obj
<</R12
12 0 R/R10
10 0 R/R8
8 0 R/R11
11 0 R>>
endobj
35 0 obj
<</R7
7 0 R>>
endobj
36 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R34
34 0 R/R33
33 0 R/R8
8 0 R/R11
11 0 R>>
endobj
40 0 obj
<</R7
7 0 R>>
endobj
41 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R33
33 0 R/R8
8 0 R>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 42 0 R/Subtype/Type1>>
endobj
42 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
34 0 obj
<</BaseFont/Times-Italic/Type/Font
/Subtype/Type1>>
endobj
33 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 43 0 R/Subtype/Type1>>
endobj
43 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
44 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8969d985-4a2c-11ea-0000-79978386c594' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8969d985-4a2c-11ea-0000-79978386c594' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:12-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:12-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8969d985-4a2c-11ea-0000-79978386c594' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8969d985-4a2c-11ea-0000-79978386c594'/>
<rdf:Description rdf:about='8969d985-4a2c-11ea-0000-79978386c594' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203612-08'00')
/ModDate(D:20100204203612-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 45
0000000000 65535 f 
0000010096 00000 n 
0000012926 00000 n 
0000010002 00000 n 
0000009032 00000 n 
0000000015 00000 n 
0000001451 00000 n 
0000010161 00000 n 
0000011274 00000 n 
0000011078 00000 n 
0000011010 00000 n 
0000011457 00000 n 
0000010809 00000 n 
0000010202 00000 n 
0000010232 00000 n 
0000009192 00000 n 
0000001471 00000 n 
0000002272 00000 n 
0000010304 00000 n 
0000010334 00000 n 
0000009354 00000 n 
0000002292 00000 n 
0000003070 00000 n 
0000010397 00000 n 
0000010427 00000 n 
0000009516 00000 n 
0000003090 00000 n 
0000003861 00000 n 
0000010490 00000 n 
0000010520 00000 n 
0000009678 00000 n 
0000003881 00000 n 
0000006309 00000 n 
0000011211 00000 n 
0000011143 00000 n 
0000010583 00000 n 
0000010613 00000 n 
0000009840 00000 n 
0000006330 00000 n 
0000009011 00000 n 
0000010707 00000 n 
0000010737 00000 n 
0000010887 00000 n 
0000011356 00000 n 
0000011528 00000 n 
trailer
<< /Size 45 /Root 1 0 R /Info 2 0 R
/ID [<AD85EB8FF1C4692F8389C83927EC56A4><AD85EB8FF1C4692F8389C83927EC56A4>]
>>
startxref
13080
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xݘ[o6+)$Ea@%EK!Ȳl.Oد!-m,@aÏãaD;vЪ0zߕY#B?a^@̖nAEchhtQkYpLB| A]ewM@iS.KLj؀bK3,o*A
]nӰDtl`Hχ{Mzϯ:m"U%̠{]kZcctBK$n'8ܳk4jueTxSEE]"qUH0Q5+z,`Kqcc4yVT~%y%p`)QχqN%4uhn%:S+
jysOCN4z{y{`ùy C2^A-$ߘX]Qg)["2PagS:(ɫo2SU̳m<tQ6@פ(fVN԰Epw*9`;SOS7q4dY2eL9_.$UE=
o.$47(
l ֘/IdBMs<k)OQENL.p"7YI%h姃Q
8)N̟o;cg$ʌHAX
Np@%B	C(@/T!q'deOSZ ][ZLtXqlP	%&Hӑ.1ilVTM&(ċT8>|?y{#Yk)?i."Km&m
A+X*aՔ.B6F?~W"u'v;7
nVmR2vR
K٠®d:HhaܠVN;Jnۉ-E&
:ִm
Om:
;9<F>WtƈG1Ft?1Мw4L`TS)
۶ni{*u|[D0~_N_-߿u
<ՉEy0yQ=cݡ]̴endstream
endobj
6 0 obj
1089
endobj
16 0 obj
<</Length 17 0 R/Filter /FlateDecode>>
stream
xXn@}+
d/S&U)ou
,DwKMZ!239{
&0Վ/0)5>DPگ0'trXkC,ग़*x?5CjatF~UFX]ZADtGu2T`P<g<N}%=8f_l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
/o%4Qi#C5!@M;̨tiYVJga	̸qǴIU8[`͛rX@.z(v/cM7TtEγCoKr~75VuUi,A0DGo{	hUxCvMkr6ǠTr*J:DtHOTȹ(۪)d;ye;6J"zXݽEs
 (qQ)b	<<UXdX*w (Bims2qf&*pa@b:@*-9H0*a(Ma]a	Вh,
>7AYMJDYx梠|AgmϮtn|Xy>2
D
s%pXzWoVMg]~)x]PؔA/jtőgǽ4MOO
~԰WD$]\wWSMg
g:&xwR}W<u(V9&xrNIpu=+7OkyU'ഓ1mq߯
T@~٭TQ/{8"}bV@a[\A:8?o@'J0zsBDMVpꀖtSpK)/%yIX5,bF.
>Lm=~Fi24S)|_-t~se:7*T+@\͐Al](VqE<
I)nM:0:(R1xk	V
nYYS05^v>	55b/ XiȠYF >e])zՃ|:;㸺ի[YRySnd62s;f,V0|>z7Lj20ЌOE.7DG%JV_m0ܴS[0lE%P `$h6CpoE*X+3*{:`5N^H&@SifH/Ҥɮty~6~L;7i(8
A3Da*5̽BLO/.endstream
endobj
49 0 obj
2532
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 13 0 R
/Font 14 0 R
>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 16 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 29 0 R
/Font 30 0 R
>>
/Contents 26 0 R
>>
endobj
31 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 34 0 R
/Font 35 0 R
>>
/Contents 32 0 R
>>
endobj
36 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 40 0 R
/Font 41 0 R
>>
/Contents 37 0 R
>>
endobj
42 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 45 0 R
/Font 46 0 R
>>
/Contents 43 0 R
>>
endobj
47 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 50 0 R
/Font 51 0 R
>>
/Contents 48 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
20 0 R
25 0 R
31 0 R
36 0 R
42 0 R
47 0 R
] /Count 8
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 55 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R12
12 0 R/R10
10 0 R/R8
8 0 R/R11
11 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
29 0 obj
<</R7
7 0 R>>
endobj
30 0 obj
<</R10
10 0 R/R28
28 0 R/R8
8 0 R/R11
11 0 R>>
endobj
34 0 obj
<</R7
7 0 R>>
endobj
35 0 obj
<</R12
12 0 R/R10
10 0 R/R28
28 0 R/R8
8 0 R/R11
11 0 R>>
endobj
40 0 obj
<</R7
7 0 R>>
endobj
41 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R39
39 0 R/R28
28 0 R/R8
8 0 R/R11
11 0 R>>
endobj
45 0 obj
<</R7
7 0 R>>
endobj
46 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R28
28 0 R/R8
8 0 R>>
endobj
50 0 obj
<</R7
7 0 R>>
endobj
51 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R28
28 0 R/R8
8 0 R>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 52 0 R/Subtype/Type1>>
endobj
52 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
39 0 obj
<</BaseFont/Times-Italic/Type/Font
/Encoding 53 0 R/Subtype/Type1>>
endobj
53 0 obj
<</Type/Encoding/Differences[
141/fl]>>
endobj
28 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 54 0 R/Subtype/Type1>>
endobj
54 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
55 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8a027005-4a2c-11ea-0000-7805df7a7dba' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8a027005-4a2c-11ea-0000-7805df7a7dba' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:13-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:13-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8a027005-4a2c-11ea-0000-7805df7a7dba' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8a027005-4a2c-11ea-0000-7805df7a7dba'/>
<rdf:Description rdf:about='8a027005-4a2c-11ea-0000-7805df7a7dba' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203613-08'00')
/ModDate(D:20100204203613-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 56
0000000000 65535 f 
0000019144 00000 n 
0000022258 00000 n 
0000019036 00000 n 
0000017742 00000 n 
0000000015 00000 n 
0000001174 00000 n 
0000019209 00000 n 
0000020609 00000 n 
0000020341 00000 n 
0000020273 00000 n 
0000020789 00000 n 
0000020072 00000 n 
0000019250 00000 n 
0000019280 00000 n 
0000017902 00000 n 
0000001194 00000 n 
0000002112 00000 n 
0000019352 00000 n 
0000019382 00000 n 
0000018064 00000 n 
0000002132 00000 n 
0000003870 00000 n 
0000019445 00000 n 
0000019475 00000 n 
0000018226 00000 n 
0000003891 00000 n 
0000006625 00000 n 
0000020546 00000 n 
0000019547 00000 n 
0000019577 00000 n 
0000018388 00000 n 
0000006646 00000 n 
0000009622 00000 n 
0000019640 00000 n 
0000019670 00000 n 
0000018550 00000 n 
0000009643 00000 n 
0000013149 00000 n 
0000020406 00000 n 
0000019744 00000 n 
0000019774 00000 n 
0000018712 00000 n 
0000013170 00000 n 
0000015096 00000 n 
0000019868 00000 n 
0000019898 00000 n 
0000018874 00000 n 
0000015117 00000 n 
0000017721 00000 n 
0000019970 00000 n 
0000020000 00000 n 
0000020150 00000 n 
0000020490 00000 n 
0000020691 00000 n 
0000020860 00000 n 
trailer
<< /Size 56 /Root 1 0 R /Info 2 0 R
/ID [<2C2D1B4268101A173C929AB885373B92><2C2D1B4268101A173C929AB885373B92>]
>>
startxref
22412
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xXnF}W,ЇP](4I v\[/EU4EI)JŁ	&"mYiAw윳ÙO-k;7>4o^`F3XGÐ#-
ӍE0}0kgP$LM
׃D(̤'Üľ;LM>3l^>ioby
nc7ޠ7Y*JЅen8: XҨFoV1YL9V"CA	vGC!s˳
̶B\הTbZر	CC	vI*3D;iIbu$~:I60&jxU1փ;~w׋M.aЋmL[O
FPÏx3ūd~KakcJ#wF}hR=#Wwٺ"}*>S#@sԍn<uVJnp$9 Y[E$]ol,(2[U4li!
8Cm9&n|us~Ӳ~./lZ!a&iy)*
^)HIǶJf
H}׼r!x
-om`9bN/{z>*tgaJ&\lbSz+\ ?Kv/am[_*v΃$m.礟>s,gOg_^lxr%^QR"+xR-ܸoM=j5,(]t.|?h{ghPj~Z:
hw<:ч7Z7{lWԫ/BX)~{vv
GZwp=/
Hvy]WH	"ȃ(\gH&ȓne0~gz]:3(_jtrW:'~t-Gf_ǫ(iP^::oA^U=<o){:0Y8aK#v4H4;z3„y]b"rʁXhp6+)5)z`(Ėk
y
x6Pvt=?WbZ)3l,A0y[E`*~VbnUٍuPbU
lڛ(r%:Õ~rM4poQkaK7`	R4x$R6;ZK
L0C,(smk0Bÿ́OϏUIR
zd#+endstream
endobj
6 0 obj
1260
endobj
16 0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]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 20 0 R
/Font 21 0 R
>>
/Contents 16 0 R
>>
endobj
22 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 25 0 R
/Font 26 0 R
>>
/Contents 23 0 R
>>
endobj
27 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 30 0 R
/Font 31 0 R
>>
/Contents 28 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
22 0 R
27 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 34 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
20 0 obj
<</R7
7 0 R>>
endobj
21 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R19
19 0 R/R18
18 0 R/R8
8 0 R>>
endobj
25 0 obj
<</R7
7 0 R>>
endobj
26 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R18
18 0 R/R8
8 0 R>>
endobj
30 0 obj
<</R7
7 0 R>>
endobj
31 0 obj
<</R10
10 0 R/R18
18 0 R/R8
8 0 R>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 32 0 R/Subtype/Type1>>
endobj
32 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
19 0 obj
<</BaseFont/Times-Italic/Type/Font
/Subtype/Type1>>
endobj
18 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 33 0 R/Subtype/Type1>>
endobj
33 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
34 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8a9b0685-4a2c-11ea-0000-45efe6968b6a' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8a9b0685-4a2c-11ea-0000-45efe6968b6a' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:14-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:14-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8a9b0685-4a2c-11ea-0000-45efe6968b6a' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8a9b0685-4a2c-11ea-0000-45efe6968b6a'/>
<rdf:Description rdf:about='8a9b0685-4a2c-11ea-0000-45efe6968b6a' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203614-08'00')
/ModDate(D:20100204203614-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 35
0000000000 65535 f 
0000008457 00000 n 
0000011076 00000 n 
0000008377 00000 n 
0000007731 00000 n 
0000000015 00000 n 
0000001345 00000 n 
0000008522 00000 n 
0000009427 00000 n 
0000009231 00000 n 
0000009163 00000 n 
0000009607 00000 n 
0000008962 00000 n 
0000008563 00000 n 
0000008593 00000 n 
0000007891 00000 n 
0000001365 00000 n 
0000004424 00000 n 
0000009364 00000 n 
0000009296 00000 n 
0000008665 00000 n 
0000008695 00000 n 
0000008053 00000 n 
0000004445 00000 n 
0000006776 00000 n 
0000008778 00000 n 
0000008808 00000 n 
0000008215 00000 n 
0000006797 00000 n 
0000007711 00000 n 
0000008880 00000 n 
0000008910 00000 n 
0000009040 00000 n 
0000009509 00000 n 
0000009678 00000 n 
trailer
<< /Size 35 /Root 1 0 R /Info 2 0 R
/ID [<BF9EC78049C04416FD4BBBA9AABF1404><BF9EC78049C04416FD4BBBA9AABF1404>]
>>
startxref
11230
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xXَ6}WC"fHLq1Yr(ɭG,Yilw9wD0E|f2@Ō_vaF76zV(`(<̜Hwx?@xF%ab5sv, 1e=̹$EK/]r}ۈyz|JntyegzeUsJl}s)?Y XafKaqs-(0,<5OSf7Xyw:NUֹOt68h䛭VEL0YQ#,F`q\OF@1P,!DpB@1BR'HF:IbUV	sF )UI!
UaXTp{⯴g!YHnmmdza)6ܣu޵}Dsk~x՘ФwIJmOn*
$˓`.LIC/4A::骸D
^5[eKnlMteؤ Z%bdR?KEzC>`8ɜ@W˳~Ɍ%Di.~np":%VGhԥ~='9ϕR(O3ڃoK}c2dfٰꈍȲ08߻͸ߔvq'8Ƹz$ưu}κ鳫'/.^J_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HcX/VKT͏Vsc=*G3|}tqg]+ZiJf?5_Όp+`/[}&C(ܐz^r9v3oT̠u*uUn}:FW>
͉N0v
z=yuu1PC|3ҌAl<
|ZzLY8K6v8<?M2-˫&E$4?\H^O$[et/T#n'!O0S>
LAGB(
UQHtᄔH
1Fຏ~?M|) R	&*=ρ۱-XJ߻Y?!,3{g,bz[gۄ^Hi1_ڷY	11^SLg9/_mr!7Ly6_endstream
endobj
18 0 obj
1736
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 14 0 R
/Font 15 0 R
>>
/Contents 5 0 R
>>
endobj
16 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 19 0 R
/Font 20 0 R
>>
/Contents 17 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
16 0 R
] /Count 2
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 23 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
14 0 obj
<</R7
7 0 R>>
endobj
15 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R11
11 0 R/R12
12 0 R/R10
10 0 R>>
endobj
19 0 obj
<</R7
7 0 R>>
endobj
20 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R12
12 0 R/R10
10 0 R>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 21 0 R/Subtype/Type1>>
endobj
21 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi
153/quotedblleft/quotedblright]>>
endobj
13 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 22 0 R/Subtype/Type1>>
endobj
22 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
23 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8bcc3385-4a2c-11ea-0000-241892034983' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8bcc3385-4a2c-11ea-0000-241892034983' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:16-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:16-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8bcc3385-4a2c-11ea-0000-241892034983' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8bcc3385-4a2c-11ea-0000-241892034983'/>
<rdf:Description rdf:about='8bcc3385-4a2c-11ea-0000-241892034983' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203616-08'00')
/ModDate(D:20100204203616-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 24
0000000000 65535 f 
0000003823 00000 n 
0000006190 00000 n 
0000003757 00000 n 
0000003435 00000 n 
0000000015 00000 n 
0000001586 00000 n 
0000003888 00000 n 
0000004209 00000 n 
0000004144 00000 n 
0000004724 00000 n 
0000004452 00000 n 
0000004523 00000 n 
0000004389 00000 n 
0000003929 00000 n 
0000003959 00000 n 
0000003595 00000 n 
0000001606 00000 n 
0000003414 00000 n 
0000004042 00000 n 
0000004072 00000 n 
0000004291 00000 n 
0000004601 00000 n 
0000004792 00000 n 
trailer
<< /Size 24 /Root 1 0 R /Info 2 0 R
/ID [<62741098999A5C4AFFF0D3A8148A9720><62741098999A5C4AFFF0D3A8148A9720>]
>>
startxref
6344
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xXn6}WŊIТ@M,le)EmHr'XhQ0Ggg'|&D,_{kg	~3ACUh|D+Ze/ [3
PC.tD7G^.1sU/pFēOYTppQT`UqfE80
\EY=UQ:HVbd!_
#l3{<#[Q°&Xzk,7\g\hCWG^:\Hﷀ\ب$i.Tt,a[ {J) 	MQϋ,
>"cZ<w-(U(QETWyŕ
PQp	4GtU葸hH3JE}:`'0r1)%LQ.퇻,V\.=%XSUXU2h&|_Ѓ^f,7\ڍf~F6Dj=lUyaqsL<U%
Si"|Ԁ..%4vjVIK5QW1SyhTy0ƇL"wFI}҆VHsYu|5LMum䪿o1EF͂poFe,,Y_=uQA񠈒v	mZ#ӛlm	U-?|c|9]f%b5F8F
+SE
Єޕ!	qE0wĀ@B̶HvQk9F?IVrj%θJoxvTCUmu:إj.
)[TBl!&1tKq6w lZŶ(:7wb׽vDKݻe;*ʥ/2Y[}Px%ANi|sܯML{`X>s^t%DkťQ'z*@17U&jOrTWc'v7;^͑l( `խEIJsOSM&endstream
endobj
6 0 obj
1040
endobj
16 0 obj
<</Length 17 0 R/Filter /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8.\Cdӡ{U6伜K΄j$6"ގ3 /_>̋xp9iwQj0JfB`dvnjLa}О?yYp137W78>Ci:
$vËgF1Ff]oiZ( V?5Ĭh<Vru'W($_AP`1Lx>bAoXӐM췣y}қOZRiXL^7ˬ!{\`a>	z:	T~{IWc0bdaUP>LF'/TlR%o]nɏwSNZ}\N:~կ(Knڀ4!qUŵdMFG;pj7ZkH=\0Ǎ?ԡjSqqH'~<[LN>Kn*amsY!`
ڑ		z6sӶPҤ] +oҾVeɄvq_jA;1Gz *	"_H_?%ZXendstream
endobj
49 0 obj
2727
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 13 0 R
/Font 14 0 R
>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 16 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 28 0 R
/Font 29 0 R
>>
/Contents 26 0 R
>>
endobj
30 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 35 0 R
/Font 36 0 R
>>
/Contents 31 0 R
>>
endobj
37 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 40 0 R
/Font 41 0 R
>>
/Contents 38 0 R
>>
endobj
42 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 45 0 R
/Font 46 0 R
>>
/Contents 43 0 R
>>
endobj
47 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 50 0 R
/Font 51 0 R
>>
/Contents 48 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
20 0 R
25 0 R
30 0 R
37 0 R
42 0 R
47 0 R
] /Count 8
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 54 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R10
10 0 R/R8
8 0 R>>
endobj
28 0 obj
<</R7
7 0 R>>
endobj
29 0 obj
<</R12
12 0 R/R10
10 0 R/R8
8 0 R/R11
11 0 R>>
endobj
35 0 obj
<</R7
7 0 R>>
endobj
36 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R34
34 0 R/R33
33 0 R/R8
8 0 R/R11
11 0 R>>
endobj
40 0 obj
<</R7
7 0 R>>
endobj
41 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R33
33 0 R/R8
8 0 R/R11
11 0 R>>
endobj
45 0 obj
<</R7
7 0 R>>
endobj
46 0 obj
<</R12
12 0 R/R33
33 0 R/R8
8 0 R>>
endobj
50 0 obj
<</R7
7 0 R>>
endobj
51 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R33
33 0 R/R8
8 0 R>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 52 0 R/Subtype/Type1>>
endobj
52 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
34 0 obj
<</BaseFont/Times-Italic/Type/Font
/Subtype/Type1>>
endobj
33 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 53 0 R/Subtype/Type1>>
endobj
53 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
54 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8c64ca05-4a2c-11ea-0000-0c1e19e0ad97' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8c64ca05-4a2c-11ea-0000-0c1e19e0ad97' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:17-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:17-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8c64ca05-4a2c-11ea-0000-0c1e19e0ad97' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8c64ca05-4a2c-11ea-0000-0c1e19e0ad97'/>
<rdf:Description rdf:about='8c64ca05-4a2c-11ea-0000-0c1e19e0ad97' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203617-08'00')
/ModDate(D:20100204203617-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 55
0000000000 65535 f 
0000018496 00000 n 
0000021508 00000 n 
0000018388 00000 n 
0000017094 00000 n 
0000000015 00000 n 
0000001125 00000 n 
0000018561 00000 n 
0000019856 00000 n 
0000019660 00000 n 
0000019592 00000 n 
0000020039 00000 n 
0000019391 00000 n 
0000018602 00000 n 
0000018632 00000 n 
0000017254 00000 n 
0000001145 00000 n 
0000002766 00000 n 
0000018704 00000 n 
0000018734 00000 n 
0000017416 00000 n 
0000002787 00000 n 
0000005484 00000 n 
0000018806 00000 n 
0000018836 00000 n 
0000017578 00000 n 
0000005505 00000 n 
0000008114 00000 n 
0000018877 00000 n 
0000018907 00000 n 
0000017740 00000 n 
0000008135 00000 n 
0000011389 00000 n 
0000019793 00000 n 
0000019725 00000 n 
0000018970 00000 n 
0000019000 00000 n 
0000017902 00000 n 
0000011410 00000 n 
0000013239 00000 n 
0000019094 00000 n 
0000019124 00000 n 
0000018064 00000 n 
0000013260 00000 n 
0000014254 00000 n 
0000019207 00000 n 
0000019237 00000 n 
0000018226 00000 n 
0000014274 00000 n 
0000017073 00000 n 
0000019289 00000 n 
0000019319 00000 n 
0000019469 00000 n 
0000019938 00000 n 
0000020110 00000 n 
trailer
<< /Size 55 /Root 1 0 R /Info 2 0 R
/ID [<5688380C7C5CF533F5E4CE860A9E4419><5688380C7C5CF533F5E4CE860A9E4419>]
>>
startxref
21662
%%EOF

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cSet[/PDF /Text]
/ExtGState 13 0 R
/Font 14 0 R
>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 19 0 R
/Font 20 0 R
>>
/Contents 16 0 R
>>
endobj
21 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 25 0 R
/Font 26 0 R
>>
/Contents 22 0 R
>>
endobj
27 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 30 0 R
/Font 31 0 R
>>
/Contents 28 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
21 0 R
27 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 34 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
19 0 obj
<</R7
7 0 R>>
endobj
20 0 obj
<</R10
10 0 R/R18
18 0 R/R8
8 0 R>>
endobj
25 0 obj
<</R7
7 0 R>>
endobj
26 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R24
24 0 R/R18
18 0 R/R8
8 0 R>>
endobj
30 0 obj
<</R7
7 0 R>>
endobj
31 0 obj
<</R12
12 0 R/R10
10 0 R/R9
9 0 R/R18
18 0 R/R8
8 0 R>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 32 0 R/Subtype/Type1>>
endobj
32 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
24 0 obj
<</BaseFont/Times-Italic/Type/Font
/Subtype/Type1>>
endobj
18 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 33 0 R/Subtype/Type1>>
endobj
33 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
34 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8cfd6085-4a2c-11ea-0000-722979d91984' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8cfd6085-4a2c-11ea-0000-722979d91984' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:18-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:18-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8cfd6085-4a2c-11ea-0000-722979d91984' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8cfd6085-4a2c-11ea-0000-722979d91984'/>
<rdf:Description rdf:about='8cfd6085-4a2c-11ea-0000-722979d91984' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203618-08'00')
/ModDate(D:20100204203618-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 35
0000000000 65535 f 
0000011466 00000 n 
0000014088 00000 n 
0000011386 00000 n 
0000010740 00000 n 
0000000015 00000 n 
0000001713 00000 n 
0000011531 00000 n 
0000012436 00000 n 
0000012240 00000 n 
0000012172 00000 n 
0000012619 00000 n 
0000011971 00000 n 
0000011572 00000 n 
0000011602 00000 n 
0000010900 00000 n 
0000001733 00000 n 
0000004733 00000 n 
0000012373 00000 n 
0000011674 00000 n 
0000011704 00000 n 
0000011062 00000 n 
0000004754 00000 n 
0000008022 00000 n 
0000012305 00000 n 
0000011756 00000 n 
0000011786 00000 n 
0000011224 00000 n 
0000008043 00000 n 
0000010719 00000 n 
0000011869 00000 n 
0000011899 00000 n 
0000012049 00000 n 
0000012518 00000 n 
0000012690 00000 n 
trailer
<< /Size 35 /Root 1 0 R /Info 2 0 R
/ID [<1F76E722852F2C90D361BB06FE2564CA><1F76E722852F2C90D361BB06FE2564CA>]
>>
startxref
14242
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/cpio.5.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xXێ}W
,y_?Ů
b`faPTĵDΒL ?ͩc4SUC8~m63c&fU{|M9}seeq̖قyOw7U\g"̰{h_/;w$"NۗC~-Cy&"Lel,H^a[đ"f8g.2*r#3-<y+,	KRonꖶ01w8do_'P,^3ʮVkEfi(DQ#a*$4#wNFcoHq'[&ZŻ^Y^~e9}#mZnչyXU<26c?AaAbMaaxvS_6t 48<<s:6'iH#kiJu'Rۮ?fau,jޫ?WajBd $U%lRuXӮIjfY_7fT'VA8B=FՕ;Tat`M]*i&HyQV-z<>e<F#Ip~5v~%q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>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 16 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 28 0 R
/Font 29 0 R
>>
/Contents 26 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
20 0 R
25 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 32 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
28 0 obj
<</R7
7 0 R>>
endobj
29 0 obj
<</R9
9 0 R/R12
12 0 R/R8
8 0 R/R10
10 0 R>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
12 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 30 0 R/Subtype/Type1>>
endobj
30 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Times-Italic/Type/Font
/Encoding 31 0 R/Subtype/Type1>>
endobj
31 0 obj
<</Type/Encoding/Differences[
140/fi]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
32 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8d95f705-4a2c-11ea-0000-c789a53f94bc' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8d95f705-4a2c-11ea-0000-c789a53f94bc' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:19-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:19-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8d95f705-4a2c-11ea-0000-c789a53f94bc' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8d95f705-4a2c-11ea-0000-c789a53f94bc'/>
<rdf:Description rdf:about='8d95f705-4a2c-11ea-0000-c789a53f94bc' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203619-08'00')
/ModDate(D:20100204203619-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 33
0000000000 65535 f 
0000010004 00000 n 
0000012421 00000 n 
0000009924 00000 n 
0000009278 00000 n 
0000000015 00000 n 
0000002465 00000 n 
0000010069 00000 n 
0000010635 00000 n 
0000010507 00000 n 
0000010955 00000 n 
0000010815 00000 n 
0000010572 00000 n 
0000010110 00000 n 
0000010140 00000 n 
0000009438 00000 n 
0000002485 00000 n 
0000004959 00000 n 
0000010212 00000 n 
0000010242 00000 n 
0000009600 00000 n 
0000004980 00000 n 
0000007129 00000 n 
0000010314 00000 n 
0000010344 00000 n 
0000009762 00000 n 
0000007150 00000 n 
0000009257 00000 n 
0000010416 00000 n 
0000010446 00000 n 
0000010717 00000 n 
0000010899 00000 n 
0000011023 00000 n 
trailer
<< /Size 33 /Root 1 0 R /Info 2 0 R
/ID [<DEECC7DA623A80E563B3E14A7A8FCD8B><DEECC7DA623A80E563B3E14A7A8FCD8B>]
>>
startxref
12575
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xZْ}[0)B7X'Z<,+(KIyɞ$@F'6
OR.Yaw9b]<yEğۋOL
_]5=94
w^UbEpH(EY'1xQcK_˛UC|KeӘNo=^[d"YfUsBy2^!ICN3-M)LeZu_?u"'oYl)<yd\
,4GBbJoE'C,?[DֶaoAn1d0rˈglǶ W]=%E<Uc=۫7W?ؙN2k"*bt,'E1L>^\A'MT&A
LGqɅ\uA{61QG0~,fPc1QR6[eX{Y}jˤ,R0k&[
}햎	7rY`΍f9K2je6}K篲ߢ˥q>w2s; şrzX w:
ƴE;Lhux͝>8zQ.nn5b%R)cu,WF7vKKFq'=~ߵj<$fHmz=nP
IMtO3o6@Vp1Dmtj{0HQwAdP7z_D`Q!|e,׮Va@ۦ'/%'2H!^o.Xwf){%Hpї1Ab2@kTf;/KyX(6qf"~3W!,tb“M3ۣ>dE'?E%yw#WUӌn[#͵.*\K^&|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т&k"Lk-(=	YИ3#רäfL`T2Z[X.Li
P,HJ:H1$>颐<vgxg/O!-5G7'Sv);)TMZnAUl^p&dOH:dQL;EZi;o ^
mm\:@<@I-7ٱB{}Lb*|HWϮ4n@Q xU|M?+EXv@ѠYRq)4fZmue+Tznp/=p~sAK$#v;R .QeaޙY7VVzk4 BaLPH>膤60`c]
$>a~mݢWuKG8/"ƞlFF@}r:ץ@	ܴ\U]TycR@OuƠ<IJ(+*^F8mOJ
~A)BOB@%e4VDҵ*.H6à#/$T*P<~{a3bbLȂC9#MgZ@$QkltasD^`.zN\܄^:֎MW@o 2L 0$UݠG-UnYLEx8E'G*`ia4kѫփtjQ9dV 9mk=`io0kƺ0F"u8B fٰeNeE7VnHڵh
L1}뇅IouHBƿ7Kp(
ȢwePa>B.%+Ee\QJ>*/avsO
]_WA}y~]yn;=z	3OZ6{h\uwѓN8Ϛm'4@
g=3~g]e\n(ɪ01S""n{6Yr*G:?,t
H\rR.-Lǝ~lOGL$
’V	|<&fUGg;?6˩t&l70h9K$/4k$체e1S˄۸ą:q[ۋdf!uʧ%oNQ4){Seml`ɎYIWsXQ2*v3VOa؞9
^Bv`<6ow\Cwt.F'ۑ._D7n\L\?܃twoe^~Ɲ?tMп㠉 QX݂Eğ5{^Z+x+d
1ؘ<yzy˸r'|q>dendstream
endobj
26 0 obj
1678
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 12 0 R
/Font 13 0 R
>>
/Contents 5 0 R
>>
endobj
14 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 17 0 R
/Font 18 0 R
>>
/Contents 15 0 R
>>
endobj
19 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 22 0 R
/Font 23 0 R
>>
/Contents 20 0 R
>>
endobj
24 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 27 0 R
/Font 28 0 R
>>
/Contents 25 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
14 0 R
19 0 R
24 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 31 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
12 0 obj
<</R7
7 0 R>>
endobj
13 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R/R9
9 0 R>>
endobj
17 0 obj
<</R7
7 0 R>>
endobj
18 0 obj
<</R8
8 0 R/R10
10 0 R/R9
9 0 R>>
endobj
22 0 obj
<</R7
7 0 R>>
endobj
23 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R/R9
9 0 R>>
endobj
27 0 obj
<</R7
7 0 R>>
endobj
28 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R/R9
9 0 R>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 29 0 R/Subtype/Type1>>
endobj
29 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Encoding 30 0 R/Subtype/Type1>>
endobj
30 0 obj
<</Type/Encoding/Differences[
131/bullet
140/fi]>>
endobj
31 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8ec72405-4a2c-11ea-0000-b27cda7bd5a4' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8ec72405-4a2c-11ea-0000-b27cda7bd5a4' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:21-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:21-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8ec72405-4a2c-11ea-0000-b27cda7bd5a4' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8ec72405-4a2c-11ea-0000-b27cda7bd5a4'/>
<rdf:Description rdf:about='8ec72405-4a2c-11ea-0000-b27cda7bd5a4' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203621-08'00')
/ModDate(D:20100204203621-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 32
0000000000 65535 f 
0000014101 00000 n 
0000016420 00000 n 
0000014021 00000 n 
0000013375 00000 n 
0000000015 00000 n 
0000003830 00000 n 
0000014166 00000 n 
0000014560 00000 n 
0000014874 00000 n 
0000014806 00000 n 
0000014743 00000 n 
0000014207 00000 n 
0000014237 00000 n 
0000013535 00000 n 
0000003850 00000 n 
0000007331 00000 n 
0000014298 00000 n 
0000014328 00000 n 
0000013697 00000 n 
0000007352 00000 n 
0000011583 00000 n 
0000014378 00000 n 
0000014408 00000 n 
0000013859 00000 n 
0000011604 00000 n 
0000013354 00000 n 
0000014469 00000 n 
0000014499 00000 n 
0000014642 00000 n 
0000014955 00000 n 
0000015022 00000 n 
trailer
<< /Size 32 /Root 1 0 R /Info 2 0 R
/ID [<9C7DDDAE53D57069528521D2B99450AB><9C7DDDAE53D57069528521D2B99450AB>]
>>
startxref
16574
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xYrF}WۂUdfpINǑYyC		hyݷ-v
%LO>}0	g9:'#g\/ G!On`Q,{IBn6gӫ'_xJ	xz83Z,W//(~=Ej2\s})7i}וݞ|kn|_6r=紐?nv&|<apϓߎ]BxOda_\sܷNι]U…ƒVm1A"HEܓY~O7Sg1eΎ9#(dq! d9b`/gqJOeJ̼/Y.ΒeX{N9_XNcph{-c7y`PE?c/66/.>' YC4+Rfb[^&6ۮ4zW/TOJoQ$4K9wkEfPr&,8J}6(q ȌʼpVO‡	\A5U+4$n=N-+z)D=8Rj:0oV5!Ȱ
~yh&fJԡxQIR>z3}?TXA #G"LNϔDaLy<zPEv<^N\vC] &/ǂ1Λ0)s2nA)%w3]uPnn0(n7*`N0NsNWpy̷kD]9V#?E~Jjxe4qqp~tŃw]y*}5jU¹6Ymby	BqwĹRhcB~9ӳv(C'sh]:?(L84`~yn& 1_1{ËW?_s˿O{mUܫq?c4w|:nEd'!qE}5@զm4s8, /+O$\{s|$GcՋd17ޔP^G"
亭~(j<_
ޞP|4A$kKPp
1˳iHa|0:pVWp$-vO1ӷAbz&Q'μ
)FP=7doKCr,#|	4;sa-sj>r`W9mr;R~z?$vw;hcd~|ecgppu\n
:t8B-<)gͣ9yqm@Nd%M?8m5ŏ'-+O//G"_$ XR]]*
k_"46I95z^qcS&,6Yl2QB
!{w8` 4dөJRdf{vqP%b@sqUJxtf>3c"gae\*
w7dƋo$˳#H@M	]~y$\!1H\VRA$qeaߏPm|PÞ<(`]Tpcsu4ʀ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#pb`P(XaJd	RJW"?ܭ3F»b	DS:gkأPI^רuz0oCfr8HH]G}<1'J`Lf>Z(0s6(^NdgNJ=B%knWp=G5Nun:e>_tP%p9vS֍	bsH	\]Ivt_珧(3Jf޺+$c:hC7_f"QT>wG(ƽD:JFbdQ11?4p(5{wC(lGEU|o-3Ђ.x:x6O۽),`N0>4!3!T곈rL5
.""ssʊ4o72QGޗd4W&S_?k&:kt<!\ny(ʎ;$Ye[:sx,vzl'.F:6UvSU[QW0Q{SmC9A_we/tm|IY-h30JMw_-?2MWoPvf
VOԥrj>xjީu>5
9"|!+m
hSiIQ'(AeC.eRȺ0qhA\χ.cMd`^̭o۰y
ek1BB]rjO!Uendstream
endobj
24 0 obj
2250
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 12 0 R
/Font 13 0 R
>>
/Contents 5 0 R
>>
endobj
14 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 20 0 R
/Font 21 0 R
>>
/Contents 15 0 R
>>
endobj
22 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 25 0 R
/Font 26 0 R
>>
/Contents 23 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
14 0 R
22 0 R
] /Count 3
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 30 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
12 0 obj
<</R7
7 0 R>>
endobj
13 0 obj
<</R10
10 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
20 0 obj
<</R7
7 0 R>>
endobj
21 0 obj
<</R10
10 0 R/R18
18 0 R/R9
9 0 R/R19
19 0 R/R17
17 0 R/R8
8 0 R/R11
11 0 R>>
endobj
25 0 obj
<</R7
7 0 R>>
endobj
26 0 obj
<</R10
10 0 R/R18
18 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
18 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 27 0 R/Subtype/Type1>>
endobj
27 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Encoding 28 0 R/Subtype/Type1>>
endobj
28 0 obj
<</Type/Encoding/Differences[
131/bullet]>>
endobj
19 0 obj
<</BaseFont/Times-Italic/Type/Font
/Subtype/Type1>>
endobj
17 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 29 0 R/Subtype/Type1>>
endobj
29 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright
173/minus]>>
endobj
11 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
30 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8f5fba85-4a2c-11ea-0000-2e11a1f9b632' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8f5fba85-4a2c-11ea-0000-2e11a1f9b632' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:22-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:22-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8f5fba85-4a2c-11ea-0000-2e11a1f9b632' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8f5fba85-4a2c-11ea-0000-2e11a1f9b632'/>
<rdf:Description rdf:about='8f5fba85-4a2c-11ea-0000-2e11a1f9b632' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203622-08'00')
/ModDate(D:20100204203622-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 31
0000000000 65535 f 
0000009800 00000 n 
0000012426 00000 n 
0000009727 00000 n 
0000009243 00000 n 
0000000015 00000 n 
0000003062 00000 n 
0000009865 00000 n 
0000010772 00000 n 
0000010492 00000 n 
0000010223 00000 n 
0000010965 00000 n 
0000009906 00000 n 
0000009936 00000 n 
0000009403 00000 n 
0000003082 00000 n 
0000006879 00000 n 
0000010701 00000 n 
0000010291 00000 n 
0000010633 00000 n 
0000009997 00000 n 
0000010027 00000 n 
0000009565 00000 n 
0000006900 00000 n 
0000009222 00000 n 
0000010121 00000 n 
0000010151 00000 n 
0000010369 00000 n 
0000010573 00000 n 
0000010854 00000 n 
0000011028 00000 n 
trailer
<< /Size 31 /Root 1 0 R /Info 2 0 R
/ID [<E0D7B8D68A4287556872408DC6B65AD5><E0D7B8D68A4287556872408DC6B65AD5>]
>>
startxref
12580
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xZے}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 19 0 R
/Font 20 0 R
>>
/Contents 15 0 R
>>
endobj
21 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 24 0 R
/Font 25 0 R
>>
/Contents 22 0 R
>>
endobj
26 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 29 0 R
/Font 30 0 R
>>
/Contents 27 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
14 0 R
21 0 R
26 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 34 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
12 0 obj
<</R7
7 0 R>>
endobj
13 0 obj
<</R9
9 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
19 0 obj
<</R7
7 0 R>>
endobj
20 0 obj
<</R18
18 0 R/R9
9 0 R/R17
17 0 R/R8
8 0 R/R10
10 0 R>>
endobj
24 0 obj
<</R7
7 0 R>>
endobj
25 0 obj
<</R9
9 0 R/R8
8 0 R/R10
10 0 R>>
endobj
29 0 obj
<</R7
7 0 R>>
endobj
30 0 obj
<</R18
18 0 R/R9
9 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
18 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 31 0 R/Subtype/Type1>>
endobj
31 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
17 0 obj
<</BaseFont/Times-Italic/Type/Font
/Encoding 32 0 R/Subtype/Type1>>
endobj
32 0 obj
<</Type/Encoding/Differences[
140/fi]>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 33 0 R/Subtype/Type1>>
endobj
33 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl]>>
endobj
11 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
34 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='8ff85105-4a2c-11ea-0000-6cb9eb3d5c75' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='8ff85105-4a2c-11ea-0000-6cb9eb3d5c75' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:23-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:23-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='8ff85105-4a2c-11ea-0000-6cb9eb3d5c75' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='8ff85105-4a2c-11ea-0000-6cb9eb3d5c75'/>
<rdf:Description rdf:about='8ff85105-4a2c-11ea-0000-6cb9eb3d5c75' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203623-08'00')
/ModDate(D:20100204203623-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 35
0000000000 65535 f 
0000013559 00000 n 
0000016127 00000 n 
0000013479 00000 n 
0000012833 00000 n 
0000000015 00000 n 
0000003990 00000 n 
0000013624 00000 n 
0000014446 00000 n 
0000014241 00000 n 
0000014661 00000 n 
0000014598 00000 n 
0000013665 00000 n 
0000013695 00000 n 
0000012993 00000 n 
0000004010 00000 n 
0000007905 00000 n 
0000014306 00000 n 
0000014040 00000 n 
0000013756 00000 n 
0000013786 00000 n 
0000013155 00000 n 
0000007926 00000 n 
0000010526 00000 n 
0000013858 00000 n 
0000013888 00000 n 
0000013317 00000 n 
0000010547 00000 n 
0000012812 00000 n 
0000013938 00000 n 
0000013968 00000 n 
0000014118 00000 n 
0000014390 00000 n 
0000014528 00000 n 
0000014729 00000 n 
trailer
<< /Size 35 /Root 1 0 R /Info 2 0 R
/ID [<8112901B3C0DF6237AC0F6C1707BA38A><8112901B3C0DF6237AC0F6C1707BA38A>]
>>
startxref
16281
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/mtree.5.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xYn}W`B	NMfX@<}#THʮ:_۵ύdȤ|xxm/|.Onc~LX؛%er3	,">B8>,?^]_|LR_q7zZ)ޕd"澈iwE߱E}(?Qc闟'[`n\D,b(w.ODă0އ+zm1O?`ҙZBH[/FkXa..[-e[bg<'JvZags R~yoiVg<M3`=FWv`ԱL1daŷVmy'઩*˦&|MǮ;;qS̛j^aE+Yܗ0ykڪ#;trZY5-{l͑M{tA)Qaz	D(kPP 
y§:pꀍe}~r,0<"m#]!{ςuL߫o9i=벾geCD(CO/n<"kdq>q^mn_DeS{,|>vVz[L[-ledj\/m]By7Is2nZIfs+Vl-b˖.wZ[dyu_Akp4Y]6,()
v4 Ay`e~=B=Uȭ%
řM,<Ԛh⡐ZAe]4@h9"T%tWRTO.Hy8b8|VsmC&''GރtyYw
ƪi[ ՚<~Cqik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[^B0T گIJj$;+V9ܔE6a:(IGvN5~nN$ݳ[˦ޚ_IDX؂5l/d>n	hw!^9D{ΛmH
Ch
[;(]ųXhendstream
endobj
21 0 obj
1112
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 12 0 R
/Font 13 0 R
>>
/Contents 5 0 R
>>
endobj
14 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 17 0 R
/Font 18 0 R
>>
/Contents 15 0 R
>>
endobj
19 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 22 0 R
/Font 23 0 R
>>
/Contents 20 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
14 0 R
19 0 R
] /Count 3
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 25 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
12 0 obj
<</R7
7 0 R>>
endobj
13 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R/R9
9 0 R>>
endobj
17 0 obj
<</R7
7 0 R>>
endobj
18 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
22 0 obj
<</R7
7 0 R>>
endobj
23 0 obj
<</R8
8 0 R/R11
11 0 R/R10
10 0 R/R9
9 0 R>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 24 0 R/Subtype/Type1>>
endobj
24 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright
173/minus]>>
endobj
11 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
25 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-182ee625e7ac' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-182ee625e7ac' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:24-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:24-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-182ee625e7ac' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9090e785-4a2c-11ea-0000-182ee625e7ac'/>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-182ee625e7ac' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203624-08'00')
/ModDate(D:20100204203624-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 26
0000000000 65535 f 
0000006157 00000 n 
0000008314 00000 n 
0000006084 00000 n 
0000005600 00000 n 
0000000015 00000 n 
0000002830 00000 n 
0000006222 00000 n 
0000006527 00000 n 
0000006851 00000 n 
0000006783 00000 n 
0000006720 00000 n 
0000006263 00000 n 
0000006293 00000 n 
0000005760 00000 n 
0000002850 00000 n 
0000004374 00000 n 
0000006354 00000 n 
0000006384 00000 n 
0000005922 00000 n 
0000004395 00000 n 
0000005579 00000 n 
0000006436 00000 n 
0000006466 00000 n 
0000006609 00000 n 
0000006916 00000 n 
trailer
<< /Size 26 /Root 1 0 R /Info 2 0 R
/ID [<C062DD953454DC7A3A2CC14EFD961C57><C062DD953454DC7A3A2CC14EFD961C57>]
>>
startxref
8468
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/tar.5.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xYnF}W444yk;kOHA"3Lxb`vOd;pK3dwW9Nu޳,?ߢ9{&e,`/w{hؓ
ͻ3g`iMs,Og({v׫3
_xxSbe|}=z){^Պ=_xx]q`/e{͏g"~G/m8\n"b(7W`@Oa%Gox4	[sNc_Ĭw1E&(ֽc+&bWCsd1mh^C>͋~`<ܧHxo.\~et)NFas
|~x=r.Ej?
3&=EWת@eK/NJXwZ8͍)ٟsVV=V~mɺq%Q5M{
wMWW'e,01ЭwZYDȽUXەzŪvdCniWS܍j
EGC
O
{gryɁ!mʺCmUɰɍb?VNv[{e\<8<q{$-ZA{z9*}fUnꮠݬzU/GmUjnYl19[><uGE#}ayNGB?::Ǹ^X?qqJN
+쯳"&VKn,30ڡK8R`9bM buח:8{dl<P~wJ@yՀ
ty΍*6:xFUZUrܵQ3#[p8t~@΍B&>uP}grC7QV-a(X8
WbA МShT]-('a:eU2%Er]jn,=W*NAgJkڦ)>)i"y};NH5AuSxg`I?
{~Eg tԅXI|C|&)
#t}e3h KBm_=dC0{VT|±-ڻjZUwr p-^Rk"4CSr ֹSDG8PDQb 0<]P0xׁ1_4bNJt"?RMF~CH;}[d+UShC؁ĕ03GX`%Y)[sS"4OPךåznCIz*cG;lwKPf	NP"RPT{,-M笒PtMӵi4p}vvCtAitDB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=ShH3Ġ]n	Yy8ı>+$1V,/[
h r<f֙śa[dDICtaZo̘3"JyAp8t栏JSp魀s0AmSFDMv*wn{+լ(]M PhK>&>?-̈́f7$@-i0um{Snnezewg7W=Ĭ~}:)ouͳ4X;&P-ͪT!
+YNfTlx3+a7FA
%zkE<h_L1XA{)uծdJ[f9D9Y<3>rls@M)cAurK ∵^΀6ZZ+
>S0s[˽.jM_«n1iO6YS;h?T9j>,֨0Pܼ
	=H#n7St>et4JZMe;.Àr0HNGC}žn٭m½%ȁIoc+,,Ȃ:m̋
R'd{a&=) |۽ⲲC
m%#0u=TM=d_z7~&Xx:ջ[;_ uFN1xZ?endstream
endobj
54 0 obj
1647
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 13 0 R
/Font 14 0 R
>>
/Contents 5 0 R
>>
endobj
15 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 16 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 29 0 R
/Font 30 0 R
>>
/Contents 26 0 R
>>
endobj
31 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 35 0 R
/Font 36 0 R
>>
/Contents 32 0 R
>>
endobj
37 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 40 0 R
/Font 41 0 R
>>
/Contents 38 0 R
>>
endobj
42 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 45 0 R
/Font 46 0 R
>>
/Contents 43 0 R
>>
endobj
47 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 50 0 R
/Font 51 0 R
>>
/Contents 48 0 R
>>
endobj
52 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 55 0 R
/Font 56 0 R
>>
/Contents 53 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
15 0 R
20 0 R
25 0 R
31 0 R
37 0 R
42 0 R
47 0 R
52 0 R
] /Count 9
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 62 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
13 0 obj
<</R7
7 0 R>>
endobj
14 0 obj
<</R10
10 0 R/R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R10
10 0 R/R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
29 0 obj
<</R7
7 0 R>>
endobj
30 0 obj
<</R10
10 0 R/R9
9 0 R/R28
28 0 R/R8
8 0 R/R11
11 0 R>>
endobj
35 0 obj
<</R7
7 0 R>>
endobj
36 0 obj
<</R10
10 0 R/R9
9 0 R/R34
34 0 R/R28
28 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
40 0 obj
<</R7
7 0 R>>
endobj
41 0 obj
<</R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
45 0 obj
<</R7
7 0 R>>
endobj
46 0 obj
<</R10
10 0 R/R9
9 0 R/R12
12 0 R/R8
8 0 R/R11
11 0 R>>
endobj
50 0 obj
<</R7
7 0 R>>
endobj
51 0 obj
<</R10
10 0 R/R9
9 0 R/R8
8 0 R>>
endobj
55 0 obj
<</R7
7 0 R>>
endobj
56 0 obj
<</R10
10 0 R/R9
9 0 R/R28
28 0 R/R8
8 0 R/R11
11 0 R>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Encoding 57 0 R/Subtype/Type1>>
endobj
57 0 obj
<</Type/Encoding/Differences[
173/minus]>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Encoding 58 0 R/Subtype/Type1>>
endobj
58 0 obj
<</Type/Encoding/Differences[
131/bullet]>>
endobj
34 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
28 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 59 0 R/Subtype/Type1>>
endobj
59 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
12 0 obj
<</BaseFont/Times-Italic/Type/Font
/Encoding 60 0 R/Subtype/Type1>>
endobj
60 0 obj
<</Type/Encoding/Differences[
140/fi/fl]>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 61 0 R/Subtype/Type1>>
endobj
61 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
11 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
62 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-9bfa91741ba9' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-9bfa91741ba9' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:24-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:24-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-9bfa91741ba9' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9090e785-4a2c-11ea-0000-9bfa91741ba9'/>
<rdf:Description rdf:about='9090e785-4a2c-11ea-0000-9bfa91741ba9' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203624-08'00')
/ModDate(D:20100204203624-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 63
0000000000 65535 f 
0000028098 00000 n 
0000031425 00000 n 
0000027983 00000 n 
0000026527 00000 n 
0000000015 00000 n 
0000002867 00000 n 
0000028163 00000 n 
0000029781 00000 n 
0000029225 00000 n 
0000029082 00000 n 
0000029964 00000 n 
0000029638 00000 n 
0000028204 00000 n 
0000028234 00000 n 
0000026687 00000 n 
0000002887 00000 n 
0000005968 00000 n 
0000028306 00000 n 
0000028336 00000 n 
0000026849 00000 n 
0000005989 00000 n 
0000009142 00000 n 
0000028408 00000 n 
0000028438 00000 n 
0000027011 00000 n 
0000009163 00000 n 
0000012463 00000 n 
0000029437 00000 n 
0000028490 00000 n 
0000028520 00000 n 
0000027173 00000 n 
0000012484 00000 n 
0000015960 00000 n 
0000029366 00000 n 
0000028592 00000 n 
0000028622 00000 n 
0000027335 00000 n 
0000015981 00000 n 
0000018614 00000 n 
0000028716 00000 n 
0000028746 00000 n 
0000027497 00000 n 
0000018635 00000 n 
0000021382 00000 n 
0000028798 00000 n 
0000028828 00000 n 
0000027659 00000 n 
0000021403 00000 n 
0000024766 00000 n 
0000028900 00000 n 
0000028930 00000 n 
0000027821 00000 n 
0000024787 00000 n 
0000026506 00000 n 
0000028980 00000 n 
0000029010 00000 n 
0000029166 00000 n 
0000029306 00000 n 
0000029515 00000 n 
0000029722 00000 n 
0000029863 00000 n 
0000030027 00000 n 
trailer
<< /Size 63 /Root 1 0 R /Info 2 0 R
/ID [<6C00A82AB229817CDA253954AC992A02><6C00A82AB229817CDA253954AC992A02>]
>>
startxref
31579
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xZK)jgtD^'ڡd5hi&&F Z/;P>oCd;#M|qr{՛g>ݞxLܲ\Y4b{<fq,$,Ù
{C^;[o˦슚=kۢY컢8^$yYD_<?l乒܍"KQFOEy&wt{Nz}t쥉0Ⅱ^,	|"l_LE(MPؕ薛JIŞit4+ϔN/5*8#0=WW3uB0ЖV+zy<;Y]ŭ7_;8CUs[s=xEiM.2ژ	 	`*j"rƚa<u*2`bʮ3$Tԋ8K[h#w3`c`_fd>Mc/Nro6|wz{ɁuGzwUurhj2I&ْRC-Ld,'(ee3CD.+1⟞}Gte>V*Mle'lzgo._/._y%)GpQC]3p5g۪=QVyziB]>3XhŦI]DvW۲
<[
!CW,-SJqB8$ts;k.rWB'.jw~ l^(E_D)Mأ`(A`gW%\>նU!3H_)ov
OϵcuQg*#I~St'P2+QN] KRX4CM뫞n[QL0M_/J%="7<<Hɟd @9I3T[Y?u98mősWǖA\Tu5ܳC5lC,F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W,3dgJ#T_]D3&/?>ށݸϔ^	ᶈ̺7@
xSDLt['Pw:!['#fV|u۶'S6wڣ?B_ϞZ#/=M}MdAJ*
/|Z)+3}J:Jo0*aDp|ͽ|$mc3OZO2O
y jOWGJP=D#sT)<ꇮRuf&23?>:C՗:fXˈN.-7kԦ,=J
d
WphAQ#&tВ	cIK+Ju_CI.AeBe:N4Y2Whtf[{9V󢑷+hvT70B]wZUP m3-sNfN}g%ZS_+jV(H\Ebyq""&8oϘv`&oӨ
W;)D{Xx,Y~͎Gd`}e`AOT]P]5?}A^EM޻^H}*xBW)P5Y	)z-zP%sh츭>${[$3-Ah(L:,K.kټVhO"YC֣1d}gK,ݼTe0ERPt-JR;*z{
6jjl⨧Em4PIhIYZ(Js-Lo(3^]_>Tendstream
endobj
48 0 obj
3462
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 14 0 R
/Font 15 0 R
>>
/Contents 5 0 R
>>
endobj
16 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 19 0 R
/Font 20 0 R
>>
/Contents 17 0 R
>>
endobj
21 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 24 0 R
/Font 25 0 R
>>
/Contents 22 0 R
>>
endobj
26 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 29 0 R
/Font 30 0 R
>>
/Contents 27 0 R
>>
endobj
31 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 34 0 R
/Font 35 0 R
>>
/Contents 32 0 R
>>
endobj
36 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 39 0 R
/Font 40 0 R
>>
/Contents 37 0 R
>>
endobj
41 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 44 0 R
/Font 45 0 R
>>
/Contents 42 0 R
>>
endobj
46 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 49 0 R
/Font 50 0 R
>>
/Contents 47 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
16 0 R
21 0 R
26 0 R
31 0 R
36 0 R
41 0 R
46 0 R
] /Count 8
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 55 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
14 0 obj
<</R7
7 0 R>>
endobj
15 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R11
11 0 R/R12
12 0 R/R10
10 0 R>>
endobj
19 0 obj
<</R7
7 0 R>>
endobj
20 0 obj
<</R8
8 0 R/R13
13 0 R/R11
11 0 R/R12
12 0 R/R10
10 0 R>>
endobj
24 0 obj
<</R7
7 0 R>>
endobj
25 0 obj
<</R8
8 0 R/R13
13 0 R/R11
11 0 R/R10
10 0 R>>
endobj
29 0 obj
<</R7
7 0 R>>
endobj
30 0 obj
<</R8
8 0 R/R13
13 0 R/R11
11 0 R/R10
10 0 R>>
endobj
34 0 obj
<</R7
7 0 R>>
endobj
35 0 obj
<</R8
8 0 R/R13
13 0 R/R11
11 0 R/R10
10 0 R>>
endobj
39 0 obj
<</R7
7 0 R>>
endobj
40 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R11
11 0 R/R10
10 0 R>>
endobj
44 0 obj
<</R7
7 0 R>>
endobj
45 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R11
11 0 R/R10
10 0 R>>
endobj
49 0 obj
<</R7
7 0 R>>
endobj
50 0 obj
<</R9
9 0 R/R8
8 0 R/R13
13 0 R/R10
10 0 R>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Encoding 51 0 R/Subtype/Type1>>
endobj
51 0 obj
<</Type/Encoding/Differences[
131/bullet]>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 52 0 R/Subtype/Type1>>
endobj
52 0 obj
<</Type/Encoding/Differences[
126/tilde
138/emdash
140/fi/fl
153/quotedblleft/quotedblright]>>
endobj
13 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
12 0 obj
<</BaseFont/Symbol/Type/Font
/Encoding 53 0 R/Subtype/Type1>>
endobj
53 0 obj
<</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[
42/asteriskmath
225/angleleft
241/angleright]>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Encoding 54 0 R/Subtype/Type1>>
endobj
54 0 obj
<</Type/Encoding/Differences[
173/minus]>>
endobj
55 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='91c21485-4a2c-11ea-0000-7c85887d4921' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='91c21485-4a2c-11ea-0000-7c85887d4921' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:26-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:26-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='91c21485-4a2c-11ea-0000-7c85887d4921' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='91c21485-4a2c-11ea-0000-7c85887d4921'/>
<rdf:Description rdf:about='91c21485-4a2c-11ea-0000-7c85887d4921' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203626-08'00')
/ModDate(D:20100204203626-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 56
0000000000 65535 f 
0000027574 00000 n 
0000030681 00000 n 
0000027466 00000 n 
0000026172 00000 n 
0000000015 00000 n 
0000003598 00000 n 
0000027639 00000 n 
0000028612 00000 n 
0000028471 00000 n 
0000029140 00000 n 
0000028868 00000 n 
0000028939 00000 n 
0000028805 00000 n 
0000027680 00000 n 
0000027710 00000 n 
0000026332 00000 n 
0000003618 00000 n 
0000006529 00000 n 
0000027793 00000 n 
0000027823 00000 n 
0000026494 00000 n 
0000006550 00000 n 
0000009021 00000 n 
0000027897 00000 n 
0000027927 00000 n 
0000026656 00000 n 
0000009042 00000 n 
0000012376 00000 n 
0000027990 00000 n 
0000028020 00000 n 
0000026818 00000 n 
0000012397 00000 n 
0000015482 00000 n 
0000028083 00000 n 
0000028113 00000 n 
0000026980 00000 n 
0000015503 00000 n 
0000018410 00000 n 
0000028176 00000 n 
0000028206 00000 n 
0000027142 00000 n 
0000018431 00000 n 
0000022596 00000 n 
0000028278 00000 n 
0000028308 00000 n 
0000027304 00000 n 
0000022617 00000 n 
0000026151 00000 n 
0000028380 00000 n 
0000028410 00000 n 
0000028552 00000 n 
0000028694 00000 n 
0000029017 00000 n 
0000029224 00000 n 
0000029283 00000 n 
trailer
<< /Size 56 /Root 1 0 R /Info 2 0 R
/ID [<8F50550A81CBD8C65BB24706907105D3><8F50550A81CBD8C65BB24706907105D3>]
>>
startxref
30835
%%EOF

File Added: pkgsrc/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
%PDF-1.4
%쏢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xYn8}psD-rر`<jLHqzJqHv<Y#!ŪSNĥNnBX/\{\|X0=yE><,>FBNB!fX4fsrull:.d.dG}okcn⾠A$/YwlR.n[	ƩV"k\*&(Hu~<0惧.'+Ղ

m?ig=qg({[cu4;Y y=I)kdR.(69͂¢ZqޮyyuXI1k/"8<o3+}k+̾<Ɋ>aJp7P2ohÃLF PI*'TS?N@R3Qz*AE

t*maNu:^0h0-)qzNfeVY*jд0?f,J]oo|+	`+f*Jm0A[yw~{sqZE&v'-*lgԏ@؟Q\vӭ
a˴)*8.WS<e5Ne$2I/G4f~G*IMRwD+)099+vAYy" ׵_v9KZt_x6~P!auFz@p^4.W$tqd=O+4.)6	kOz.N|Gꧤ!dQ
|2=l$T
mvPr2u(	[I|	0PvŒ<t`1EѨ/-1z)n=a6$ulqQƽȤ<lW%sX83m.wV7@B`J&Ű>a
:Ume~T,K8uȔ˜yuơmVFJ![u`pǡp(pdQ_aՐp,LץLOrb'Y`C='\<"8p(m>?֕TbǛCUq4R2B=g&b	Eh[:!^,K4l=OzٙWmN-= |8D=53"!PdQx.8̦w8=aYv
zh_ls#Ό
amfv81\:'*cBA%Y{-xG*׋\8-tUTǧ
T	]?"Aಠ.*!!0m[Iꂁ@JCԭ~\X:9d2F;{q}r전!<(FRGsV˳)) IYﰥon`L2..ꪪ.brWW1eR)I
=5A(\ijk,G]w'Րް6`&LH@\qoέs,-fC2rXH;m|0}Ԙˆlק
/4Z
,%wLĭ03;O.eM
HXbQiHRi2*bZn;q7Ф/o#xLD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ε:O2iYn
r@Vy,{<)VWi)HHӒ(h4y{Zk<`ffDK%es[ғoy~}D.ƛ&hgYCS>Oƌ&,xVAʾ8I)7_Yxw<Q(6вSQ#);p_4=/XE%c}^rhh`^&~²^.S
8nEf'c%#V<6Ha){"9Ii2y1l[TƩf옸mzJ'wnD޿`YVJc-J@pl?Kh+ԦMhkZ4(*Ǽ5ߗ(ktnDm凲	YF4˷n+ҡe#BP)?phve2
ɄĞF%k[Niw58/R&$RM,I._J\tlw2k!
d4~PӠrE.ES`vPZ d|sٞ[QU-p8JW}_Ap1#⌱iqeS_zb&RT"WHt{Ԫ܂wp1'i=R+rIPtI/"PmКuH]
.:V#<Ot<}4O+[=kL&T=5So.~1-9tY6)y{Fe'If\0!atQUM;лoK;Jpl D K0:Q0[B.<2S4?;]1K7Jh/JlAX,4$8Bc91cFaO2guSHҡoVgX"N{*lՌŊݎht	c? kd)j"#,08벰7.{d
[!	zm%M^uͱpq4&"r
08$ycoL2\dި;Aa@VU\d[*\~ٱ^tmA}{˂GT[,(F˔V2q	8bmoJ1{Qǻ4
Ǣ4sQߺ.,.UP:*.4
F9z[]&XM:L~;sz(_m۩"D,>SȘ9$c9Ж&=$EB\e
E
qVVm?⠇v[|!F+w i)jCN$̴IwȻ0x ]I1Mhܹ^XEendstream
endobj
27 0 obj
1875
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 12 0 R
/Font 13 0 R
>>
/Contents 5 0 R
>>
endobj
14 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 18 0 R
/Font 19 0 R
>>
/Contents 15 0 R
>>
endobj
20 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 23 0 R
/Font 24 0 R
>>
/Contents 21 0 R
>>
endobj
25 0 obj
<</Type/Page/MediaBox [0 0 612 792]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/ExtGState 28 0 R
/Font 29 0 R
>>
/Contents 26 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
14 0 R
20 0 R
25 0 R
] /Count 4
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 32 0 R
>>
endobj
7 0 obj
<</Type/ExtGState
/OPM 1>>endobj
12 0 obj
<</R7
7 0 R>>
endobj
13 0 obj
<</R9
9 0 R/R8
8 0 R/R11
11 0 R/R10
10 0 R>>
endobj
18 0 obj
<</R7
7 0 R>>
endobj
19 0 obj
<</R8
8 0 R/R17
17 0 R/R11
11 0 R/R10
10 0 R>>
endobj
23 0 obj
<</R7
7 0 R>>
endobj
24 0 obj
<</R9
9 0 R/R8
8 0 R/R17
17 0 R/R11
11 0 R/R10
10 0 R>>
endobj
28 0 obj
<</R7
7 0 R>>
endobj
29 0 obj
<</R9
9 0 R/R8
8 0 R/R17
17 0 R/R10
10 0 R>>
endobj
9 0 obj
<</BaseFont/Times-Bold/Type/Font
/Subtype/Type1>>
endobj
8 0 obj
<</BaseFont/Times-Roman/Type/Font
/Encoding 30 0 R/Subtype/Type1>>
endobj
30 0 obj
<</Type/Encoding/Differences[
138/emdash
140/fi
153/quotedblleft/quotedblright]>>
endobj
17 0 obj
<</BaseFont/Courier/Type/Font
/Subtype/Type1>>
endobj
11 0 obj
<</BaseFont/Courier-Oblique/Type/Font
/Subtype/Type1>>
endobj
10 0 obj
<</BaseFont/Courier-Bold/Type/Font
/Encoding 31 0 R/Subtype/Type1>>
endobj
31 0 obj
<</Type/Encoding/Differences[
173/minus]>>
endobj
32 0 obj
<</Type/Metadata
/Subtype/XML/Length 1321>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='92f34185-4a2c-11ea-0000-b4d3dadbcb85' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.64'/>
<rdf:Description rdf:about='92f34185-4a2c-11ea-0000-b4d3dadbcb85' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-02-04T20:36:28-08:00</xmp:ModifyDate>
<xmp:CreateDate>2010-02-04T20:36:28-08:00</xmp:CreateDate>
<xmp:CreatorTool>groff version 1.19.2</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='92f34185-4a2c-11ea-0000-b4d3dadbcb85' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='92f34185-4a2c-11ea-0000-b4d3dadbcb85'/>
<rdf:Description rdf:about='92f34185-4a2c-11ea-0000-b4d3dadbcb85' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
                                                                        
                                                                        
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20100204203628-08'00')
/ModDate(D:20100204203628-08'00')
/Creator(groff version 1.19.2)>>endobj
xref
0 33
0000000000 65535 f 
0000010586 00000 n 
0000012989 00000 n 
0000010506 00000 n 
0000009860 00000 n 
0000000015 00000 n 
0000002370 00000 n 
0000010651 00000 n 
0000011134 00000 n 
0000011069 00000 n 
0000011448 00000 n 
0000011377 00000 n 
0000010692 00000 n 
0000010722 00000 n 
0000010020 00000 n 
0000002390 00000 n 
0000004867 00000 n 
0000011314 00000 n 
0000010783 00000 n 
0000010813 00000 n 
0000010182 00000 n 
0000004888 00000 n 
0000007871 00000 n 
0000010876 00000 n 
0000010906 00000 n 
0000010344 00000 n 
0000007892 00000 n 
0000009839 00000 n 
0000010978 00000 n 
0000011008 00000 n 
0000011216 00000 n 
0000011532 00000 n 
0000011591 00000 n 
trailer
<< /Size 33 /Root 1 0 R /Info 2 0 R
/ID [<11EF748CFBA5365E95D958D90E1843F4><11EF748CFBA5365E95D958D90E1843F4>]
>>
startxref
13143
%%EOF

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/Makefile

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/archive_entry.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/archive_read.3.txt

File Added: pkgsrc/archivers/libarchive/files/doc/text/archive_read_disk.3.txt
archive_read_disk(3)   FreeBSD Library Functions Manual   archive_read_disk(3)

NAME
     archive_read_disk_new, archive_read_disk_set_symlink_logical,
     archive_read_disk_set_symlink_physical,
     archive_read_disk_set_symlink_hybrid, archive_read_disk_entry_from_file,
     archive_read_disk_gname, archive_read_disk_uname,
     archive_read_disk_set_uname_lookup, archive_read_disk_set_gname_lookup,
     archive_read_disk_set_standard_lookup, archive_read_close,
     archive_read_finish -- functions for reading objects from disk

SYNOPSIS
     #include <archive.h>

     struct archive *
     archive_read_disk_new(void);

     int
     archive_read_disk_set_symlink_logical(struct archive *);

     int
     archive_read_disk_set_symlink_physical(struct archive *);

     int
     archive_read_disk_set_symlink_hybrid(struct archive *);

     int
     archive_read_disk_gname(struct archive *, gid_t);

     int
     archive_read_disk_uname(struct archive *, uid_t);

     int
     archive_read_disk_set_gname_lookup(struct archive *, void *,
	 const char *(*lookup)(void *, gid_t), void (*cleanup)(void *));

     int
     archive_read_disk_set_uname_lookup(struct archive *, void *,
	 const char *(*lookup)(void *, uid_t), void (*cleanup)(void *));

     int
     archive_read_disk_set_standard_lookup(struct archive *);

     int
     archive_read_disk_entry_from_file(struct archive *,
	 struct archive_entry *, int fd, const struct stat *);

     int
     archive_read_close(struct archive *);

     int
     archive_read_finish(struct archive *);

DESCRIPTION
     These functions provide an API for reading information about objects on
     disk.  In particular, they provide an interface for populating struct
     archive_entry objects.

     archive_read_disk_new()
	     Allocates and initializes a struct archive object suitable for
	     reading object information from disk.

     archive_read_disk_set_symlink_logical(),
	     archive_read_disk_set_symlink_physical(),
	     archive_read_disk_set_symlink_hybrid()
	     This sets the mode used for handling symbolic links.  The
	     ``logical'' mode follows all symbolic links.  The ``physical''
	     mode does not follow any symbolic links.  The ``hybrid'' mode
	     currently behaves identically to the ``logical'' mode.

     archive_read_disk_gname(), archive_read_disk_uname()
	     Returns a user or group name given a gid or uid value.  By
	     default, these always return a NULL string.

     archive_read_disk_set_gname_lookup(),
	     archive_read_disk_set_uname_lookup()
	     These allow you to override the functions used for user and group
	     name lookups.  You may also provide a void * pointer to a private
	     data structure and a cleanup function for that data.  The cleanup
	     function will be invoked when the struct archive object is
	     destroyed or when new lookup functions are registered.

     archive_read_disk_set_standard_lookup()
	     This convenience function installs a standard set of user and
	     group name lookup functions.  These functions use getpwid(3) and
	     getgrid(3) to convert ids to names, defaulting to NULL if the
	     names cannot be looked up.  These functions also implement a sim-
	     ple memory cache to reduce the number of calls to getpwid(3) and
	     getgrid(3).

     archive_read_disk_entry_from_file()
	     Populates a struct archive_entry object with information about a
	     particular file.  The archive_entry object must have already been
	     created with archive_entry_new(3) and at least one of the source
	     path or path fields must already be set.  (If both are set, the
	     source path will be used.)

	     Information is read from disk using the path name from the struct
	     archive_entry object.  If a file descriptor is provided, some
	     information will be obtained using that file descriptor, on plat-
	     forms that support the appropriate system calls.

	     If a pointer to a struct stat is provided, information from that
	     structure will be used instead of reading from the disk where
	     appropriate.  This can provide performance benefits in scenarios
	     where struct stat information has already been read from the disk
	     as a side effect of some other operation.	(For example, direc-
	     tory traversal libraries often provide this information.)

	     Where necessary, user and group ids are converted to user and
	     group names using the currently registered lookup functions
	     above.  This affects the file ownership fields and ACL values in
	     the struct archive_entry object.

     archive_read_close()
	     This currently does nothing.

     archive_write_finish()
	     Invokes archive_write_close() if it was not invoked manually,
	     then releases all resources.
     More information about the struct archive object and the overall design
     of the library can be found in the libarchive(3) overview.

EXAMPLE
     The following illustrates basic usage of the library by showing how to
     use it to copy an item on disk into an archive.

	   void
	   file_to_archive(struct archive *a, const char *name)
	   {
	     char buff[8192];
	     size_t bytes_read;
	     struct archive *ard;
	     struct archive_entry *entry;
	     int fd;

	     ard = archive_read_disk_new();
	     archive_read_disk_set_standard_lookup(ard);
	     entry = archive_entry_new();
	     fd = open(name, O_RDONLY);
	     if (fd < 0)
		return;
	     archive_entry_copy_sourcepath(entry, name);
	     archive_read_disk_entry_from_file(ard, entry, fd, NULL);
	     archive_write_header(a, entry);
	     while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
	       archive_write_data(a, buff, bytes_read);
	     archive_write_finish_entry(a);
	     archive_read_finish(ard);
	     archive_entry_free(entry);
	   }

RETURN VALUES
     Most functions return ARCHIVE_OK (zero) on success, or one of several
     negative error codes for errors.  Specific error codes include:
     ARCHIVE_RETRY for operations that might succeed if retried, ARCHIVE_WARN
     for unusual conditions that do not prevent further operations, and
     ARCHIVE_FATAL for serious errors that make remaining operations impossi-
     ble.  The archive_errno(3) and archive_error_string(3) functions can be
     used to retrieve an appropriate error code and a textual error message.
     (See archive_util(3) for details.)

     archive_read_disk_new() returns a pointer to a newly-allocated struct
     archive object or NULL if the allocation failed for any reason.

     archive_read_disk_gname() and archive_read_disk_uname() return const char
     * pointers to the textual name or NULL if the lookup failed for any rea-
     son.  The returned pointer points to internal storage that may be reused
     on the next call to either of these functions; callers should copy the
     string if they need to continue accessing it.

SEE ALSO
     archive_read(3), archive_write(3), archive_write_disk(3), tar(1),
     libarchive(3)

HISTORY
     The libarchive library first appeared in FreeBSD 5.3.  The
     archive_read_disk interface was added to libarchive 2.6 and first
     appeared in FreeBSD 8.0.

AUTHORS
     The libarchive library was written by Tim Kientzle
     <kientzle@freebsd.org>.

BUGS
     The ``standard'' user name and group name lookup functions are not the
     defaults because getgrid(3) and getpwid(3) are sometimes too large for
     particular applications.  The current design allows the application
     author to use a more compact implementation when appropriate.

     The full list of metadata read from disk by
     archive_read_disk_entry_from_file() is necessarily system-dependent.

     The archive_read_disk_entry_from_file() function reads as much informa-
     tion as it can from disk.	Some method should be provided to limit this
     so that clients who do not need ACLs, for instance, can avoid the extra
     work needed to look up such information.

     This API should provide a set of methods for walking a directory tree.
     That would make it a direct parallel of the archive_read(3) API.  When
     such methods are implemented, the ``hybrid'' symbolic link mode will make
     sense.

FreeBSD 8.0			March 10, 2009			   FreeBSD 8.0

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/archive_util.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/archive_write.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/archive_write_disk.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/cpio.5.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/libarchive.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/libarchive_internals.3.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/mtree.5.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/tar.5.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/text/bsdcpio.1.txt

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/Makefile

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/archive_entry.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/archive_read.3

File Added: pkgsrc/archivers/libarchive/files/doc/man/archive_read_disk.3
.TH archive_read_disk 3 "March 10, 2009" ""
.SH NAME
.ad l
\fB\%archive_read_disk_new\fP,
\fB\%archive_read_disk_set_symlink_logical\fP,
\fB\%archive_read_disk_set_symlink_physical\fP,
\fB\%archive_read_disk_set_symlink_hybrid\fP,
\fB\%archive_read_disk_entry_from_file\fP,
\fB\%archive_read_disk_gname\fP,
\fB\%archive_read_disk_uname\fP,
\fB\%archive_read_disk_set_uname_lookup\fP,
\fB\%archive_read_disk_set_gname_lookup\fP,
\fB\%archive_read_disk_set_standard_lookup\fP,
\fB\%archive_read_close\fP,
\fB\%archive_read_finish\fP
\- functions for reading objects from disk
.SH SYNOPSIS
.ad l
\fB#include <archive.h>\fP
.br
\fIstruct archive *\fP
.br
\fB\%archive_read_disk_new\fP(\fI\%void\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_symlink_logical\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_symlink_physical\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_symlink_hybrid\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_gname\fP(\fI\%struct\ archive\ *\fP, \fI\%gid_t\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_uname\fP(\fI\%struct\ archive\ *\fP, \fI\%uid_t\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_gname_lookup\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ *\fP, \fI\%const\ char\ *(*lookup)(void\ *,\ gid_t)\fP, \fI\%void\ (*cleanup)(void\ *)\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_uname_lookup\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ *\fP, \fI\%const\ char\ *(*lookup)(void\ *,\ uid_t)\fP, \fI\%void\ (*cleanup)(void\ *)\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_set_standard_lookup\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_disk_entry_from_file\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ *\fP, \fI\%int\ fd\fP, \fI\%const\ struct\ stat\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_close\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
.br
\fB\%archive_read_finish\fP(\fI\%struct\ archive\ *\fP);
.SH DESCRIPTION
.ad l
These functions provide an API for reading information about
objects on disk.
In particular, they provide an interface for populating
Tn struct archive_entry
objects.
.RS 5
.TP
\fB\%archive_read_disk_new\fP()
Allocates and initializes a
Tn struct archive
object suitable for reading object information from disk.
.TP
\fB\%archive_read_disk_set_symlink_logical\fP(),
\fB\%archive_read_disk_set_symlink_physical\fP(),
\fB\%archive_read_disk_set_symlink_hybrid\fP()
This sets the mode used for handling symbolic links.
The
``logical''
mode follows all symbolic links.
The
``physical''
mode does not follow any symbolic links.
The
``hybrid''
mode currently behaves identically to the
``logical''
mode.
.TP
\fB\%archive_read_disk_gname\fP(),
\fB\%archive_read_disk_uname\fP()
Returns a user or group name given a gid or uid value.
By default, these always return a NULL string.
.TP
\fB\%archive_read_disk_set_gname_lookup\fP(),
\fB\%archive_read_disk_set_uname_lookup\fP()
These allow you to override the functions used for
user and group name lookups.
You may also provide a
Tn void *
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
Tn struct archive
object is destroyed or when new lookup functions are registered.
.TP
\fB\%archive_read_disk_set_standard_lookup\fP()
This convenience function installs a standard set of user
and group name lookup functions.
These functions use
\fBgetpwid\fP(3)
and
\fBgetgrid\fP(3)
to convert ids to names, defaulting to NULL if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
\fBgetpwid\fP(3)
and
\fBgetgrid\fP(3).
.TP
\fB\%archive_read_disk_entry_from_file\fP()
Populates a
Tn struct archive_entry
object with information about a particular file.
The
Tn archive_entry
object must have already been created with
\fBarchive_entry_new\fP(3)
and at least one of the source path or path fields must already be set.
(If both are set, the source path will be used.)
.PP
Information is read from disk using the path name from the
Tn struct archive_entry
object.
If a file descriptor is provided, some information will be obtained using
that file descriptor, on platforms that support the appropriate
system calls.
.PP
If a pointer to a
Tn struct stat
is provided, information from that structure will be used instead
of reading from the disk where appropriate.
This can provide performance benefits in scenarios where
Tn struct stat
information has already been read from the disk as a side effect
of some other operation.
(For example, directory traversal libraries often provide this information.)
.PP
Where necessary, user and group ids are converted to user and group names
using the currently registered lookup functions above.
This affects the file ownership fields and ACL values in the
Tn struct archive_entry
object.
.TP
\fB\%archive_read_close\fP()
This currently does nothing.
.TP
\fB\%archive_write_finish\fP()
Invokes
\fB\%archive_write_close\fP()
if it was not invoked manually, then releases all resources.
.RE
More information about the
\fIstruct\fP archive
object and the overall design of the library can be found in the
\fBlibarchive\fP(3)
overview.
.SH EXAMPLE
.ad l
The following illustrates basic usage of the library by
showing how to use it to copy an item on disk into an archive.
.RS 4
.nf
void
file_to_archive(struct archive *a, const char *name)
{
  char buff[8192];
  size_t bytes_read;
  struct archive *ard;
  struct archive_entry *entry;
  int fd;
  ard = archive_read_disk_new();
  archive_read_disk_set_standard_lookup(ard);
  entry = archive_entry_new();
  fd = open(name, O_RDONLY);
  if (fd < 0)
     return;
  archive_entry_copy_sourcepath(entry, name);
  archive_read_disk_entry_from_file(ard, entry, fd, NULL);
  archive_write_header(a, entry);
  while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
    archive_write_data(a, buff, bytes_read);
  archive_write_finish_entry(a);
  archive_read_finish(ard);
  archive_entry_free(entry);
}
.RE
.SH RETURN VALUES
.ad l
Most functions return
\fBARCHIVE_OK\fP
(zero) on success, or one of several negative
error codes for errors.
Specific error codes include:
\fBARCHIVE_RETRY\fP
for operations that might succeed if retried,
\fBARCHIVE_WARN\fP
for unusual conditions that do not prevent further operations, and
\fBARCHIVE_FATAL\fP
for serious errors that make remaining operations impossible.
The
\fBarchive_errno\fP(3)
and
\fBarchive_error_string\fP(3)
functions can be used to retrieve an appropriate error code and a
textual error message.
(See
\fBarchive_util\fP(3)
for details.)
.PP
\fB\%archive_read_disk_new\fP()
returns a pointer to a newly-allocated
Tn struct archive
object or NULL if the allocation failed for any reason.
.PP
\fB\%archive_read_disk_gname\fP()
and
\fB\%archive_read_disk_uname\fP()
return
Tn const char *
pointers to the textual name or NULL if the lookup failed for any reason.
The returned pointer points to internal storage that
may be reused on the next call to either of these functions;
callers should copy the string if they need to continue accessing it.
.PP
.SH SEE ALSO
.ad l
\fBarchive_read\fP(3),
\fBarchive_write\fP(3),
\fBarchive_write_disk\fP(3),
\fBtar\fP(1),
\fBlibarchive\fP(3)
.SH HISTORY
.ad l
The
\fB\%libarchive\fP
library first appeared in
FreeBSD 5.3.
The
\fB\%archive_read_disk\fP
interface was added to
\fB\%libarchive\fP 2.6
and first appeared in
FreeBSD 8.0.
.SH AUTHORS
.ad l
-nosplit
The
\fB\%libarchive\fP
library was written by
Tim Kientzle \%<kientzle@freebsd.org.>
.SH BUGS
.ad l
The
``standard''
user name and group name lookup functions are not the defaults because
\fBgetgrid\fP(3)
and
\fBgetpwid\fP(3)
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.
.PP
The full list of metadata read from disk by
\fB\%archive_read_disk_entry_from_file\fP()
is necessarily system-dependent.
.PP
The
\fB\%archive_read_disk_entry_from_file\fP()
function reads as much information as it can from disk.
Some method should be provided to limit this so that clients who
do not need ACLs, for instance, can avoid the extra work needed
to look up such information.
.PP
This API should provide a set of methods for walking a directory tree.
That would make it a direct parallel of the
\fBarchive_read\fP(3)
API.
When such methods are implemented, the
``hybrid''
symbolic link mode will make sense.

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/archive_util.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/archive_write.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/archive_write_disk.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/cpio.5

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/libarchive.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/libarchive_internals.3

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/mtree.5

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/tar.5

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1

File Deleted: pkgsrc/archivers/libarchive/files/doc/man/bsdcpio.1

File Deleted: pkgsrc/archivers/libarchive/files/examples/tarfilter.c

File Deleted: pkgsrc/archivers/libarchive/files/examples/untar.c

File Deleted: pkgsrc/archivers/libarchive/files/examples/minitar/minitar.c

File Deleted: pkgsrc/archivers/libarchive/files/examples/minitar/Attic/tree.c

File Deleted: pkgsrc/archivers/libarchive/files/examples/minitar/Attic/tree.h

File Deleted: pkgsrc/archivers/libarchive/files/examples/minitar/README