@papyrus-sdk/engine-native 0.2.22-beta.9.epub.2 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PapyrusNativeEngine.podspec +45 -0
- package/android/build.gradle +1 -0
- package/android/src/main/cpp/CMakeLists.txt +137 -0
- package/android/src/main/cpp/PapyrusComicArchiveJni.cpp +68 -0
- package/android/src/main/cpp/PapyrusComicArchiveTest.cpp +55 -0
- package/android/src/main/cpp/papyrus_outline_loader_test.cpp +240 -0
- package/android/src/main/cpp/papyrus_text_word_test.cpp +72 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicArchiveNative.java +14 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +491 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +32 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +38 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +305 -35
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +195 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +3 -1
- package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerView.java +195 -5
- package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerViewManager.java +20 -1
- package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +48 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +22 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +661 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +49 -0
- package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +43 -0
- package/dist/index.d.mts +614 -4
- package/dist/index.d.ts +614 -4
- package/dist/index.js +484 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +477 -7
- package/dist/index.mjs.map +1 -1
- package/ios/PapyrusComicDocumentView.h +21 -0
- package/ios/PapyrusComicDocumentView.m +554 -0
- package/ios/PapyrusComicDocumentViewManager.m +23 -0
- package/ios/PapyrusEngineStore.h +3 -0
- package/ios/PapyrusEngineStore.m +32 -6
- package/ios/PapyrusNativeEngine.m +684 -5
- package/ios/PapyrusPageRotationRegistry.h +29 -0
- package/ios/PapyrusPageRotationRegistry.m +179 -0
- package/ios/PapyrusPageView.m +38 -11
- package/ios/PapyrusPdfDocumentView.h +55 -0
- package/ios/PapyrusPdfDocumentView.m +2370 -0
- package/ios/PapyrusPdfDocumentViewManager.m +61 -0
- package/ios/PapyrusPdfPageTheme.h +15 -0
- package/ios/PapyrusPdfPageTheme.m +218 -0
- package/ios/PapyrusSelectionMenu.h +27 -0
- package/ios/PapyrusTextAnnotationRange.h +2 -0
- package/ios/PapyrusTextAnnotationRange.m +29 -0
- package/ios/PapyrusTextDocumentView.h +32 -0
- package/ios/PapyrusTextDocumentView.m +518 -0
- package/ios/PapyrusTextDocumentViewManager.m +34 -0
- package/ios/PapyrusTextStore.h +13 -0
- package/ios/PapyrusTextStore.m +73 -0
- package/package.json +12 -10
- package/react-native.config.js +1 -1
- package/third_party_licenses/BLAKE2-NOTICE.txt +11 -0
- package/third_party_licenses/libarchive-COPYING +65 -0
- package/vendor/libarchive/PapyrusComicArchive.cpp +376 -0
- package/vendor/libarchive/PapyrusComicArchive.h +30 -0
- package/vendor/libarchive/README.papyrus.md +15 -0
- package/vendor/libarchive/android.h +192 -0
- package/vendor/libarchive/config/PapyrusArchiveConfig.h +71 -0
- package/vendor/libarchive/libarchive/CMakeLists.txt +293 -0
- package/vendor/libarchive/libarchive/android_lf.h +36 -0
- package/vendor/libarchive/libarchive/archive.h +1266 -0
- package/vendor/libarchive/libarchive/archive_acl.c +2025 -0
- package/vendor/libarchive/libarchive/archive_acl_private.h +85 -0
- package/vendor/libarchive/libarchive/archive_blake2.h +197 -0
- package/vendor/libarchive/libarchive/archive_blake2_impl.h +161 -0
- package/vendor/libarchive/libarchive/archive_blake2s_ref.c +369 -0
- package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +361 -0
- package/vendor/libarchive/libarchive/archive_check_magic.c +183 -0
- package/vendor/libarchive/libarchive/archive_cmdline.c +211 -0
- package/vendor/libarchive/libarchive/archive_cmdline_private.h +45 -0
- package/vendor/libarchive/libarchive/archive_crc32.h +123 -0
- package/vendor/libarchive/libarchive/archive_cryptor.c +534 -0
- package/vendor/libarchive/libarchive/archive_cryptor_private.h +199 -0
- package/vendor/libarchive/libarchive/archive_digest.c +1584 -0
- package/vendor/libarchive/libarchive/archive_digest_private.h +431 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +558 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +712 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +760 -0
- package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +824 -0
- package/vendor/libarchive/libarchive/archive_endian.h +234 -0
- package/vendor/libarchive/libarchive/archive_entry.3 +147 -0
- package/vendor/libarchive/libarchive/archive_entry.c +2297 -0
- package/vendor/libarchive/libarchive/archive_entry.h +763 -0
- package/vendor/libarchive/libarchive/archive_entry_acl.3 +458 -0
- package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +55 -0
- package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +82 -0
- package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +472 -0
- package/vendor/libarchive/libarchive/archive_entry_linkify.3 +224 -0
- package/vendor/libarchive/libarchive/archive_entry_locale.h +90 -0
- package/vendor/libarchive/libarchive/archive_entry_misc.3 +63 -0
- package/vendor/libarchive/libarchive/archive_entry_paths.3 +153 -0
- package/vendor/libarchive/libarchive/archive_entry_perms.3 +210 -0
- package/vendor/libarchive/libarchive/archive_entry_private.h +205 -0
- package/vendor/libarchive/libarchive/archive_entry_sparse.c +156 -0
- package/vendor/libarchive/libarchive/archive_entry_stat.3 +274 -0
- package/vendor/libarchive/libarchive/archive_entry_stat.c +121 -0
- package/vendor/libarchive/libarchive/archive_entry_strmode.c +69 -0
- package/vendor/libarchive/libarchive/archive_entry_time.3 +127 -0
- package/vendor/libarchive/libarchive/archive_entry_xattr.c +155 -0
- package/vendor/libarchive/libarchive/archive_hmac.c +345 -0
- package/vendor/libarchive/libarchive/archive_hmac_private.h +119 -0
- package/vendor/libarchive/libarchive/archive_integer.h +267 -0
- package/vendor/libarchive/libarchive/archive_match.c +1869 -0
- package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +54 -0
- package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +54 -0
- package/vendor/libarchive/libarchive/archive_options.c +219 -0
- package/vendor/libarchive/libarchive/archive_options_private.h +49 -0
- package/vendor/libarchive/libarchive/archive_pack_dev.c +330 -0
- package/vendor/libarchive/libarchive/archive_pack_dev.h +49 -0
- package/vendor/libarchive/libarchive/archive_parse_date.c +1173 -0
- package/vendor/libarchive/libarchive/archive_pathmatch.c +480 -0
- package/vendor/libarchive/libarchive/archive_pathmatch.h +50 -0
- package/vendor/libarchive/libarchive/archive_platform.h +213 -0
- package/vendor/libarchive/libarchive/archive_platform_acl.h +53 -0
- package/vendor/libarchive/libarchive/archive_platform_stat.h +45 -0
- package/vendor/libarchive/libarchive/archive_platform_xattr.h +45 -0
- package/vendor/libarchive/libarchive/archive_ppmd7.c +1173 -0
- package/vendor/libarchive/libarchive/archive_ppmd7_private.h +119 -0
- package/vendor/libarchive/libarchive/archive_ppmd8.c +1293 -0
- package/vendor/libarchive/libarchive/archive_ppmd8_private.h +123 -0
- package/vendor/libarchive/libarchive/archive_ppmd_private.h +159 -0
- package/vendor/libarchive/libarchive/archive_private.h +209 -0
- package/vendor/libarchive/libarchive/archive_random.c +274 -0
- package/vendor/libarchive/libarchive/archive_random_private.h +36 -0
- package/vendor/libarchive/libarchive/archive_rb.c +709 -0
- package/vendor/libarchive/libarchive/archive_rb.h +113 -0
- package/vendor/libarchive/libarchive/archive_read.3 +250 -0
- package/vendor/libarchive/libarchive/archive_read.c +1814 -0
- package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +72 -0
- package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +189 -0
- package/vendor/libarchive/libarchive/archive_read_append_filter.c +209 -0
- package/vendor/libarchive/libarchive/archive_read_data.3 +128 -0
- package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +207 -0
- package/vendor/libarchive/libarchive/archive_read_disk.3 +422 -0
- package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +1086 -0
- package/vendor/libarchive/libarchive/archive_read_disk_posix.c +2639 -0
- package/vendor/libarchive/libarchive/archive_read_disk_private.h +97 -0
- package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +315 -0
- package/vendor/libarchive/libarchive/archive_read_disk_windows.c +2603 -0
- package/vendor/libarchive/libarchive/archive_read_extract.3 +135 -0
- package/vendor/libarchive/libarchive/archive_read_extract.c +59 -0
- package/vendor/libarchive/libarchive/archive_read_extract2.c +154 -0
- package/vendor/libarchive/libarchive/archive_read_filter.3 +163 -0
- package/vendor/libarchive/libarchive/archive_read_format.3 +190 -0
- package/vendor/libarchive/libarchive/archive_read_free.3 +91 -0
- package/vendor/libarchive/libarchive/archive_read_header.3 +89 -0
- package/vendor/libarchive/libarchive/archive_read_new.3 +57 -0
- package/vendor/libarchive/libarchive/archive_read_open.3 +247 -0
- package/vendor/libarchive/libarchive/archive_read_open_fd.c +236 -0
- package/vendor/libarchive/libarchive/archive_read_open_file.c +257 -0
- package/vendor/libarchive/libarchive/archive_read_open_filename.c +652 -0
- package/vendor/libarchive/libarchive/archive_read_open_memory.c +188 -0
- package/vendor/libarchive/libarchive/archive_read_private.h +274 -0
- package/vendor/libarchive/libarchive/archive_read_set_format.c +116 -0
- package/vendor/libarchive/libarchive/archive_read_set_options.3 +290 -0
- package/vendor/libarchive/libarchive/archive_read_set_options.c +132 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +84 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +68 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +360 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +457 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +108 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +538 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +119 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +829 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +493 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +51 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +497 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +249 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +739 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +792 -0
- package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +356 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +4650 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_all.c +88 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +597 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +76 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +3410 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +1152 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +95 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +3516 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +2931 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +2113 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +3932 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +4501 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +194 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +3785 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +875 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +3770 -0
- package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +4710 -0
- package/vendor/libarchive/libarchive/archive_string.c +4391 -0
- package/vendor/libarchive/libarchive/archive_string.h +244 -0
- package/vendor/libarchive/libarchive/archive_string_composition.h +2289 -0
- package/vendor/libarchive/libarchive/archive_string_sprintf.c +200 -0
- package/vendor/libarchive/libarchive/archive_time.c +168 -0
- package/vendor/libarchive/libarchive/archive_time_private.h +47 -0
- package/vendor/libarchive/libarchive/archive_util.3 +239 -0
- package/vendor/libarchive/libarchive/archive_util.c +668 -0
- package/vendor/libarchive/libarchive/archive_version_details.c +516 -0
- package/vendor/libarchive/libarchive/archive_virtual.c +162 -0
- package/vendor/libarchive/libarchive/archive_windows.c +1035 -0
- package/vendor/libarchive/libarchive/archive_windows.h +332 -0
- package/vendor/libarchive/libarchive/archive_write.3 +266 -0
- package/vendor/libarchive/libarchive/archive_write.c +896 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter.c +71 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +329 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +76 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +411 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +459 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +143 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +493 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +214 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +710 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +500 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +42 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +398 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +320 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +547 -0
- package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +608 -0
- package/vendor/libarchive/libarchive/archive_write_blocksize.3 +112 -0
- package/vendor/libarchive/libarchive/archive_write_data.3 +88 -0
- package/vendor/libarchive/libarchive/archive_write_disk.3 +360 -0
- package/vendor/libarchive/libarchive/archive_write_disk_posix.c +4789 -0
- package/vendor/libarchive/libarchive/archive_write_disk_private.h +43 -0
- package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +265 -0
- package/vendor/libarchive/libarchive/archive_write_disk_windows.c +2952 -0
- package/vendor/libarchive/libarchive/archive_write_filter.3 +140 -0
- package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +77 -0
- package/vendor/libarchive/libarchive/archive_write_format.3 +187 -0
- package/vendor/libarchive/libarchive/archive_write_free.3 +94 -0
- package/vendor/libarchive/libarchive/archive_write_header.3 +71 -0
- package/vendor/libarchive/libarchive/archive_write_new.3 +56 -0
- package/vendor/libarchive/libarchive/archive_write_open.3 +270 -0
- package/vendor/libarchive/libarchive/archive_write_open_fd.c +141 -0
- package/vendor/libarchive/libarchive/archive_write_open_file.c +102 -0
- package/vendor/libarchive/libarchive/archive_write_open_filename.c +272 -0
- package/vendor/libarchive/libarchive/archive_write_open_memory.c +110 -0
- package/vendor/libarchive/libarchive/archive_write_private.h +166 -0
- package/vendor/libarchive/libarchive/archive_write_set_format.c +124 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +2571 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +540 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +93 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +11 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +618 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +457 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +508 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +141 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +790 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +8216 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +2307 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +2249 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_private.h +40 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +123 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +650 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +768 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +648 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +491 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +3799 -0
- package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +2548 -0
- package/vendor/libarchive/libarchive/archive_write_set_options.3 +779 -0
- package/vendor/libarchive/libarchive/archive_write_set_options.c +129 -0
- package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +72 -0
- package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +95 -0
- package/vendor/libarchive/libarchive/archive_xxhash.h +48 -0
- package/vendor/libarchive/libarchive/config_freebsd.h +275 -0
- package/vendor/libarchive/libarchive/cpio.5 +389 -0
- package/vendor/libarchive/libarchive/filter_fork.h +44 -0
- package/vendor/libarchive/libarchive/filter_fork_posix.c +269 -0
- package/vendor/libarchive/libarchive/filter_fork_windows.c +270 -0
- package/vendor/libarchive/libarchive/libarchive-formats.5 +478 -0
- package/vendor/libarchive/libarchive/libarchive.3 +297 -0
- package/vendor/libarchive/libarchive/libarchive_changes.3 +339 -0
- package/vendor/libarchive/libarchive/libarchive_internals.3 +363 -0
- package/vendor/libarchive/libarchive/module.modulemap +34 -0
- package/vendor/libarchive/libarchive/mtree.5 +323 -0
- package/vendor/libarchive/libarchive/tar.5 +947 -0
- package/vendor/libarchive/libarchive/xxhash.c +531 -0
- package/ios/PapyrusNativeEngine.podspec +0 -15
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/*-
|
|
2
|
+
* Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org>
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Redistribution and use in source and binary forms, with or without
|
|
6
|
+
* modification, are permitted provided that the following conditions
|
|
7
|
+
* are met:
|
|
8
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
9
|
+
* notice, this list of conditions and the following disclaimer.
|
|
10
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
* documentation and/or other materials provided with the distribution.
|
|
13
|
+
*
|
|
14
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
15
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
16
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
17
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
18
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
19
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
20
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
21
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
22
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
23
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
24
|
+
* SUCH DAMAGE.
|
|
25
|
+
*
|
|
26
|
+
* Borrowed from FreeBSD's <sys/endian.h>
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
#ifndef ARCHIVE_ENDIAN_H_INCLUDED
|
|
30
|
+
#define ARCHIVE_ENDIAN_H_INCLUDED
|
|
31
|
+
|
|
32
|
+
/* Note: This is a purely internal header! */
|
|
33
|
+
/* Do not use this outside of libarchive internal code! */
|
|
34
|
+
|
|
35
|
+
#ifndef __LIBARCHIVE_BUILD
|
|
36
|
+
#error This header is only to be used internally to libarchive.
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* Disabling inline keyword for compilers known to choke on it:
|
|
41
|
+
* - Watcom C++ in C code. (For any version?)
|
|
42
|
+
* - SGI MIPSpro
|
|
43
|
+
* - Microsoft Visual C++ 6.0 (supposedly newer versions too)
|
|
44
|
+
* - IBM VisualAge 6 (XL v6)
|
|
45
|
+
* - Sun WorkShop C (SunPro) before 5.9
|
|
46
|
+
*/
|
|
47
|
+
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
|
|
48
|
+
#define inline
|
|
49
|
+
#elif defined(__IBMC__) && __IBMC__ < 700
|
|
50
|
+
#define inline
|
|
51
|
+
#elif defined(__SUNPRO_C) && __SUNPRO_C < 0x590
|
|
52
|
+
#define inline
|
|
53
|
+
#elif defined(_MSC_VER) || defined(__osf__)
|
|
54
|
+
#define inline __inline
|
|
55
|
+
#endif
|
|
56
|
+
|
|
57
|
+
/* Alignment-agnostic encode/decode bytestream to/from little/big endian. */
|
|
58
|
+
|
|
59
|
+
static inline uint16_t
|
|
60
|
+
archive_be16dec(const void *pp)
|
|
61
|
+
{
|
|
62
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
63
|
+
|
|
64
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
65
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
66
|
+
which is undefined behaviour. */
|
|
67
|
+
unsigned int p1 = p[1];
|
|
68
|
+
unsigned int p0 = p[0];
|
|
69
|
+
|
|
70
|
+
return ((p0 << 8) | p1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static inline uint32_t
|
|
74
|
+
archive_be24dec(const void *pp)
|
|
75
|
+
{
|
|
76
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
77
|
+
|
|
78
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
79
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
80
|
+
which is undefined behaviour. */
|
|
81
|
+
unsigned int p2 = p[2];
|
|
82
|
+
unsigned int p1 = p[1];
|
|
83
|
+
unsigned int p0 = p[0];
|
|
84
|
+
|
|
85
|
+
return ((p0 << 16) | (p1 << 8) | p2);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
static inline uint32_t
|
|
90
|
+
archive_be32dec(const void *pp)
|
|
91
|
+
{
|
|
92
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
93
|
+
|
|
94
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
95
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
96
|
+
which is undefined behaviour. */
|
|
97
|
+
unsigned int p3 = p[3];
|
|
98
|
+
unsigned int p2 = p[2];
|
|
99
|
+
unsigned int p1 = p[1];
|
|
100
|
+
unsigned int p0 = p[0];
|
|
101
|
+
|
|
102
|
+
return ((p0 << 24) | (p1 << 16) | (p2 << 8) | p3);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static inline uint64_t
|
|
106
|
+
archive_be64dec(const void *pp)
|
|
107
|
+
{
|
|
108
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
109
|
+
|
|
110
|
+
return (((uint64_t)archive_be32dec(p) << 32) | archive_be32dec(p + 4));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static inline uint16_t
|
|
114
|
+
archive_le16dec(const void *pp)
|
|
115
|
+
{
|
|
116
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
117
|
+
|
|
118
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
119
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
120
|
+
which is undefined behaviour. */
|
|
121
|
+
unsigned int p1 = p[1];
|
|
122
|
+
unsigned int p0 = p[0];
|
|
123
|
+
|
|
124
|
+
return ((p1 << 8) | p0);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static inline uint32_t
|
|
128
|
+
archive_le24dec(const void *pp)
|
|
129
|
+
{
|
|
130
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
131
|
+
|
|
132
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
133
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
134
|
+
which is undefined behaviour. */
|
|
135
|
+
unsigned int p2 = p[2];
|
|
136
|
+
unsigned int p1 = p[1];
|
|
137
|
+
unsigned int p0 = p[0];
|
|
138
|
+
|
|
139
|
+
return ((p2 << 16) | (p1 << 8) | p0);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static inline uint32_t
|
|
143
|
+
archive_le32dec(const void *pp)
|
|
144
|
+
{
|
|
145
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
146
|
+
|
|
147
|
+
/* Store into unsigned temporaries before left shifting, to avoid
|
|
148
|
+
promotion to signed int and then left shifting into the sign bit,
|
|
149
|
+
which is undefined behaviour. */
|
|
150
|
+
unsigned int p3 = p[3];
|
|
151
|
+
unsigned int p2 = p[2];
|
|
152
|
+
unsigned int p1 = p[1];
|
|
153
|
+
unsigned int p0 = p[0];
|
|
154
|
+
|
|
155
|
+
return ((p3 << 24) | (p2 << 16) | (p1 << 8) | p0);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static inline uint64_t
|
|
159
|
+
archive_le64dec(const void *pp)
|
|
160
|
+
{
|
|
161
|
+
unsigned char const *p = (unsigned char const *)pp;
|
|
162
|
+
|
|
163
|
+
return (((uint64_t)archive_le32dec(p + 4) << 32) | archive_le32dec(p));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static inline void
|
|
167
|
+
archive_be16enc(void *pp, uint16_t u)
|
|
168
|
+
{
|
|
169
|
+
unsigned char *p = (unsigned char *)pp;
|
|
170
|
+
|
|
171
|
+
p[0] = (u >> 8) & 0xff;
|
|
172
|
+
p[1] = u & 0xff;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
static inline void
|
|
176
|
+
archive_be32enc(void *pp, uint32_t u)
|
|
177
|
+
{
|
|
178
|
+
unsigned char *p = (unsigned char *)pp;
|
|
179
|
+
|
|
180
|
+
p[0] = (u >> 24) & 0xff;
|
|
181
|
+
p[1] = (u >> 16) & 0xff;
|
|
182
|
+
p[2] = (u >> 8) & 0xff;
|
|
183
|
+
p[3] = u & 0xff;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static inline void
|
|
187
|
+
archive_be64enc(void *pp, uint64_t u)
|
|
188
|
+
{
|
|
189
|
+
unsigned char *p = (unsigned char *)pp;
|
|
190
|
+
|
|
191
|
+
archive_be32enc(p, (uint32_t)(u >> 32));
|
|
192
|
+
archive_be32enc(p + 4, (uint32_t)(u & 0xffffffff));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
static inline void
|
|
196
|
+
archive_le16enc(void *pp, uint16_t u)
|
|
197
|
+
{
|
|
198
|
+
unsigned char *p = (unsigned char *)pp;
|
|
199
|
+
|
|
200
|
+
p[0] = u & 0xff;
|
|
201
|
+
p[1] = (u >> 8) & 0xff;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
static inline void
|
|
205
|
+
archive_le24enc(void *pp, uint32_t u)
|
|
206
|
+
{
|
|
207
|
+
unsigned char *p = (unsigned char *)pp;
|
|
208
|
+
|
|
209
|
+
p[0] = u & 0xff;
|
|
210
|
+
p[1] = (u >> 8) & 0xff;
|
|
211
|
+
p[2] = (u >> 16) & 0xff;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static inline void
|
|
215
|
+
archive_le32enc(void *pp, uint32_t u)
|
|
216
|
+
{
|
|
217
|
+
unsigned char *p = (unsigned char *)pp;
|
|
218
|
+
|
|
219
|
+
p[0] = u & 0xff;
|
|
220
|
+
p[1] = (u >> 8) & 0xff;
|
|
221
|
+
p[2] = (u >> 16) & 0xff;
|
|
222
|
+
p[3] = (u >> 24) & 0xff;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static inline void
|
|
226
|
+
archive_le64enc(void *pp, uint64_t u)
|
|
227
|
+
{
|
|
228
|
+
unsigned char *p = (unsigned char *)pp;
|
|
229
|
+
|
|
230
|
+
archive_le32enc(p, (uint32_t)(u & 0xffffffff));
|
|
231
|
+
archive_le32enc(p + 4, (uint32_t)(u >> 32));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
#endif
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
.\" Copyright (c) 2003-2007 Tim Kientzle
|
|
2
|
+
.\" Copyright (c) 2010 Joerg Sonnenberger
|
|
3
|
+
.\" All rights reserved.
|
|
4
|
+
.\"
|
|
5
|
+
.\" Redistribution and use in source and binary forms, with or without
|
|
6
|
+
.\" modification, are permitted provided that the following conditions
|
|
7
|
+
.\" are met:
|
|
8
|
+
.\" 1. Redistributions of source code must retain the above copyright
|
|
9
|
+
.\" notice, this list of conditions and the following disclaimer.
|
|
10
|
+
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
.\" notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
.\" documentation and/or other materials provided with the distribution.
|
|
13
|
+
.\"
|
|
14
|
+
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
15
|
+
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
16
|
+
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
17
|
+
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
18
|
+
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
19
|
+
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
20
|
+
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
21
|
+
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
22
|
+
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
23
|
+
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
24
|
+
.\" SUCH DAMAGE.
|
|
25
|
+
.\"
|
|
26
|
+
.Dd February 2, 2012
|
|
27
|
+
.Dt ARCHIVE_ENTRY 3
|
|
28
|
+
.Os
|
|
29
|
+
.Sh NAME
|
|
30
|
+
.Nm archive_entry_clear ,
|
|
31
|
+
.Nm archive_entry_clone ,
|
|
32
|
+
.Nm archive_entry_free ,
|
|
33
|
+
.Nm archive_entry_new
|
|
34
|
+
.Nd functions for managing archive entry descriptions
|
|
35
|
+
.Sh LIBRARY
|
|
36
|
+
Streaming Archive Library (libarchive, -larchive)
|
|
37
|
+
.Sh SYNOPSIS
|
|
38
|
+
.In archive_entry.h
|
|
39
|
+
.Ft "struct archive_entry *"
|
|
40
|
+
.Fn archive_entry_clear "struct archive_entry *"
|
|
41
|
+
.Ft struct archive_entry *
|
|
42
|
+
.Fn archive_entry_clone "struct archive_entry *"
|
|
43
|
+
.Ft void
|
|
44
|
+
.Fn archive_entry_free "struct archive_entry *"
|
|
45
|
+
.Ft struct archive_entry *
|
|
46
|
+
.Fn archive_entry_new "void"
|
|
47
|
+
.Sh DESCRIPTION
|
|
48
|
+
These functions create and manipulate data objects that
|
|
49
|
+
represent entries within an archive.
|
|
50
|
+
You can think of a
|
|
51
|
+
.Tn struct archive_entry
|
|
52
|
+
as a heavy-duty version of
|
|
53
|
+
.Tn struct stat :
|
|
54
|
+
it includes everything from
|
|
55
|
+
.Tn struct stat
|
|
56
|
+
plus associated pathname, textual group and user names, etc.
|
|
57
|
+
These objects are used by
|
|
58
|
+
.Xr libarchive 3
|
|
59
|
+
to represent the metadata associated with a particular
|
|
60
|
+
entry in an archive.
|
|
61
|
+
.Ss Create and Destroy
|
|
62
|
+
There are functions to allocate, destroy, clear, and copy
|
|
63
|
+
.Va archive_entry
|
|
64
|
+
objects:
|
|
65
|
+
.Bl -tag -compact -width indent
|
|
66
|
+
.It Fn archive_entry_clear
|
|
67
|
+
Erases the object, resetting all internal fields to the
|
|
68
|
+
same state as a newly-created object.
|
|
69
|
+
This is provided to allow you to quickly recycle objects
|
|
70
|
+
without thrashing the heap.
|
|
71
|
+
.It Fn archive_entry_clone
|
|
72
|
+
A deep copy operation; all text fields are duplicated.
|
|
73
|
+
.It Fn archive_entry_free
|
|
74
|
+
Releases the
|
|
75
|
+
.Tn struct archive_entry
|
|
76
|
+
object.
|
|
77
|
+
.It Fn archive_entry_new
|
|
78
|
+
Allocate and return a blank
|
|
79
|
+
.Tn struct archive_entry
|
|
80
|
+
object.
|
|
81
|
+
.El
|
|
82
|
+
.Ss Function groups
|
|
83
|
+
Due to high number of functions, the accessor functions can be found in
|
|
84
|
+
man pages grouped by the purpose.
|
|
85
|
+
.Bl -tag -width ".Xr archive_entry_perms 3"
|
|
86
|
+
.It Xr archive_entry_acl 3
|
|
87
|
+
Access Control List manipulation
|
|
88
|
+
.It Xr archive_entry_paths 3
|
|
89
|
+
Path name manipulation
|
|
90
|
+
.It Xr archive_entry_perms 3
|
|
91
|
+
User, group and mode manipulation
|
|
92
|
+
.It Xr archive_entry_stat 3
|
|
93
|
+
Functions not in the other groups and copying to/from
|
|
94
|
+
.Vt struct stat .
|
|
95
|
+
.It Xr archive_entry_time 3
|
|
96
|
+
Time field manipulation
|
|
97
|
+
.El
|
|
98
|
+
.Pp
|
|
99
|
+
Most of the functions set or read entries in an object.
|
|
100
|
+
Such functions have one of the following forms:
|
|
101
|
+
.Bl -tag -compact -width indent
|
|
102
|
+
.It Fn archive_entry_set_XXXX
|
|
103
|
+
Stores the provided data in the object.
|
|
104
|
+
In particular, for strings, the pointer is stored,
|
|
105
|
+
not the referenced string.
|
|
106
|
+
.It Fn archive_entry_copy_XXXX
|
|
107
|
+
As above, except that the referenced data is copied
|
|
108
|
+
into the object.
|
|
109
|
+
.It Fn archive_entry_XXXX
|
|
110
|
+
Returns the specified data.
|
|
111
|
+
In the case of strings, a const-qualified pointer to
|
|
112
|
+
the string is returned.
|
|
113
|
+
.El
|
|
114
|
+
String data can be set or accessed as wide character strings
|
|
115
|
+
or normal
|
|
116
|
+
.Va char
|
|
117
|
+
strings.
|
|
118
|
+
The functions that use wide character strings are suffixed with
|
|
119
|
+
.Cm _w .
|
|
120
|
+
Note that these are different representations of the same data:
|
|
121
|
+
For example, if you store a narrow string and read the corresponding
|
|
122
|
+
wide string, the object will transparently convert formats
|
|
123
|
+
using the current locale.
|
|
124
|
+
Similarly, if you store a wide string and then store a
|
|
125
|
+
narrow string for the same data, the previously-set wide string will
|
|
126
|
+
be discarded in favor of the new data.
|
|
127
|
+
.\" .Sh EXAMPLE
|
|
128
|
+
.\" .Sh RETURN VALUES
|
|
129
|
+
.\" .Sh ERRORS
|
|
130
|
+
.Sh SEE ALSO
|
|
131
|
+
.Xr archive_entry_acl 3 ,
|
|
132
|
+
.Xr archive_entry_paths 3 ,
|
|
133
|
+
.Xr archive_entry_perms 3 ,
|
|
134
|
+
.Xr archive_entry_time 3 ,
|
|
135
|
+
.Xr libarchive 3
|
|
136
|
+
.Sh HISTORY
|
|
137
|
+
The
|
|
138
|
+
.Nm libarchive
|
|
139
|
+
library first appeared in
|
|
140
|
+
.Fx 5.3 .
|
|
141
|
+
.Sh AUTHORS
|
|
142
|
+
.An -nosplit
|
|
143
|
+
The
|
|
144
|
+
.Nm libarchive
|
|
145
|
+
library was written by
|
|
146
|
+
.An Tim Kientzle Aq kientzle@acm.org .
|
|
147
|
+
.\" .Sh BUGS
|