@papyrus-sdk/engine-native 0.2.22-beta.9.epub.1 → 0.2.22-beta.9.epub.2

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.
Files changed (276) hide show
  1. package/android/build.gradle +0 -1
  2. package/android/src/main/cpp/CMakeLists.txt +0 -137
  3. package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +35 -305
  4. package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +1 -3
  5. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerView.java +5 -195
  6. package/android/src/main/java/com/papyrus/engine/PapyrusPdfViewerViewManager.java +1 -20
  7. package/dist/index.d.mts +4 -614
  8. package/dist/index.d.ts +4 -614
  9. package/dist/index.js +8 -484
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +7 -477
  12. package/dist/index.mjs.map +1 -1
  13. package/ios/PapyrusEngineStore.h +0 -3
  14. package/ios/PapyrusEngineStore.m +6 -32
  15. package/ios/PapyrusNativeEngine.m +5 -684
  16. package/ios/PapyrusNativeEngine.podspec +15 -0
  17. package/ios/PapyrusPageView.m +11 -38
  18. package/package.json +8 -10
  19. package/react-native.config.js +1 -1
  20. package/PapyrusNativeEngine.podspec +0 -45
  21. package/android/src/main/cpp/PapyrusComicArchiveJni.cpp +0 -68
  22. package/android/src/main/cpp/PapyrusComicArchiveTest.cpp +0 -55
  23. package/android/src/main/cpp/papyrus_outline_loader_test.cpp +0 -240
  24. package/android/src/main/cpp/papyrus_text_word_test.cpp +0 -72
  25. package/android/src/main/java/com/papyrus/engine/PapyrusComicArchiveNative.java +0 -14
  26. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +0 -491
  27. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +0 -32
  28. package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +0 -38
  29. package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +0 -195
  30. package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +0 -48
  31. package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +0 -22
  32. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +0 -661
  33. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +0 -49
  34. package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +0 -43
  35. package/ios/PapyrusComicDocumentView.h +0 -21
  36. package/ios/PapyrusComicDocumentView.m +0 -554
  37. package/ios/PapyrusComicDocumentViewManager.m +0 -23
  38. package/ios/PapyrusPageRotationRegistry.h +0 -29
  39. package/ios/PapyrusPageRotationRegistry.m +0 -179
  40. package/ios/PapyrusPdfDocumentView.h +0 -55
  41. package/ios/PapyrusPdfDocumentView.m +0 -2339
  42. package/ios/PapyrusPdfDocumentViewManager.m +0 -61
  43. package/ios/PapyrusPdfPageTheme.h +0 -15
  44. package/ios/PapyrusPdfPageTheme.m +0 -218
  45. package/ios/PapyrusSelectionMenu.h +0 -27
  46. package/ios/PapyrusTextAnnotationRange.h +0 -2
  47. package/ios/PapyrusTextAnnotationRange.m +0 -29
  48. package/ios/PapyrusTextDocumentView.h +0 -32
  49. package/ios/PapyrusTextDocumentView.m +0 -518
  50. package/ios/PapyrusTextDocumentViewManager.m +0 -34
  51. package/ios/PapyrusTextStore.h +0 -13
  52. package/ios/PapyrusTextStore.m +0 -73
  53. package/third_party_licenses/BLAKE2-NOTICE.txt +0 -11
  54. package/third_party_licenses/libarchive-COPYING +0 -65
  55. package/vendor/libarchive/PapyrusComicArchive.cpp +0 -376
  56. package/vendor/libarchive/PapyrusComicArchive.h +0 -30
  57. package/vendor/libarchive/README.papyrus.md +0 -15
  58. package/vendor/libarchive/android.h +0 -192
  59. package/vendor/libarchive/config/PapyrusArchiveConfig.h +0 -71
  60. package/vendor/libarchive/libarchive/CMakeLists.txt +0 -293
  61. package/vendor/libarchive/libarchive/android_lf.h +0 -36
  62. package/vendor/libarchive/libarchive/archive.h +0 -1266
  63. package/vendor/libarchive/libarchive/archive_acl.c +0 -2025
  64. package/vendor/libarchive/libarchive/archive_acl_private.h +0 -85
  65. package/vendor/libarchive/libarchive/archive_blake2.h +0 -197
  66. package/vendor/libarchive/libarchive/archive_blake2_impl.h +0 -161
  67. package/vendor/libarchive/libarchive/archive_blake2s_ref.c +0 -369
  68. package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +0 -361
  69. package/vendor/libarchive/libarchive/archive_check_magic.c +0 -183
  70. package/vendor/libarchive/libarchive/archive_cmdline.c +0 -211
  71. package/vendor/libarchive/libarchive/archive_cmdline_private.h +0 -45
  72. package/vendor/libarchive/libarchive/archive_crc32.h +0 -123
  73. package/vendor/libarchive/libarchive/archive_cryptor.c +0 -534
  74. package/vendor/libarchive/libarchive/archive_cryptor_private.h +0 -199
  75. package/vendor/libarchive/libarchive/archive_digest.c +0 -1584
  76. package/vendor/libarchive/libarchive/archive_digest_private.h +0 -431
  77. package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +0 -558
  78. package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +0 -712
  79. package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +0 -760
  80. package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +0 -824
  81. package/vendor/libarchive/libarchive/archive_endian.h +0 -234
  82. package/vendor/libarchive/libarchive/archive_entry.3 +0 -147
  83. package/vendor/libarchive/libarchive/archive_entry.c +0 -2297
  84. package/vendor/libarchive/libarchive/archive_entry.h +0 -763
  85. package/vendor/libarchive/libarchive/archive_entry_acl.3 +0 -458
  86. package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +0 -55
  87. package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +0 -82
  88. package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +0 -472
  89. package/vendor/libarchive/libarchive/archive_entry_linkify.3 +0 -224
  90. package/vendor/libarchive/libarchive/archive_entry_locale.h +0 -90
  91. package/vendor/libarchive/libarchive/archive_entry_misc.3 +0 -63
  92. package/vendor/libarchive/libarchive/archive_entry_paths.3 +0 -153
  93. package/vendor/libarchive/libarchive/archive_entry_perms.3 +0 -210
  94. package/vendor/libarchive/libarchive/archive_entry_private.h +0 -205
  95. package/vendor/libarchive/libarchive/archive_entry_sparse.c +0 -156
  96. package/vendor/libarchive/libarchive/archive_entry_stat.3 +0 -274
  97. package/vendor/libarchive/libarchive/archive_entry_stat.c +0 -121
  98. package/vendor/libarchive/libarchive/archive_entry_strmode.c +0 -69
  99. package/vendor/libarchive/libarchive/archive_entry_time.3 +0 -127
  100. package/vendor/libarchive/libarchive/archive_entry_xattr.c +0 -155
  101. package/vendor/libarchive/libarchive/archive_hmac.c +0 -345
  102. package/vendor/libarchive/libarchive/archive_hmac_private.h +0 -119
  103. package/vendor/libarchive/libarchive/archive_integer.h +0 -267
  104. package/vendor/libarchive/libarchive/archive_match.c +0 -1869
  105. package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +0 -54
  106. package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +0 -54
  107. package/vendor/libarchive/libarchive/archive_options.c +0 -219
  108. package/vendor/libarchive/libarchive/archive_options_private.h +0 -49
  109. package/vendor/libarchive/libarchive/archive_pack_dev.c +0 -330
  110. package/vendor/libarchive/libarchive/archive_pack_dev.h +0 -49
  111. package/vendor/libarchive/libarchive/archive_parse_date.c +0 -1173
  112. package/vendor/libarchive/libarchive/archive_pathmatch.c +0 -480
  113. package/vendor/libarchive/libarchive/archive_pathmatch.h +0 -50
  114. package/vendor/libarchive/libarchive/archive_platform.h +0 -213
  115. package/vendor/libarchive/libarchive/archive_platform_acl.h +0 -53
  116. package/vendor/libarchive/libarchive/archive_platform_stat.h +0 -45
  117. package/vendor/libarchive/libarchive/archive_platform_xattr.h +0 -45
  118. package/vendor/libarchive/libarchive/archive_ppmd7.c +0 -1173
  119. package/vendor/libarchive/libarchive/archive_ppmd7_private.h +0 -119
  120. package/vendor/libarchive/libarchive/archive_ppmd8.c +0 -1293
  121. package/vendor/libarchive/libarchive/archive_ppmd8_private.h +0 -123
  122. package/vendor/libarchive/libarchive/archive_ppmd_private.h +0 -159
  123. package/vendor/libarchive/libarchive/archive_private.h +0 -209
  124. package/vendor/libarchive/libarchive/archive_random.c +0 -274
  125. package/vendor/libarchive/libarchive/archive_random_private.h +0 -36
  126. package/vendor/libarchive/libarchive/archive_rb.c +0 -709
  127. package/vendor/libarchive/libarchive/archive_rb.h +0 -113
  128. package/vendor/libarchive/libarchive/archive_read.3 +0 -250
  129. package/vendor/libarchive/libarchive/archive_read.c +0 -1814
  130. package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +0 -72
  131. package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +0 -189
  132. package/vendor/libarchive/libarchive/archive_read_append_filter.c +0 -209
  133. package/vendor/libarchive/libarchive/archive_read_data.3 +0 -128
  134. package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +0 -207
  135. package/vendor/libarchive/libarchive/archive_read_disk.3 +0 -422
  136. package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +0 -1086
  137. package/vendor/libarchive/libarchive/archive_read_disk_posix.c +0 -2639
  138. package/vendor/libarchive/libarchive/archive_read_disk_private.h +0 -97
  139. package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +0 -315
  140. package/vendor/libarchive/libarchive/archive_read_disk_windows.c +0 -2603
  141. package/vendor/libarchive/libarchive/archive_read_extract.3 +0 -135
  142. package/vendor/libarchive/libarchive/archive_read_extract.c +0 -59
  143. package/vendor/libarchive/libarchive/archive_read_extract2.c +0 -154
  144. package/vendor/libarchive/libarchive/archive_read_filter.3 +0 -163
  145. package/vendor/libarchive/libarchive/archive_read_format.3 +0 -190
  146. package/vendor/libarchive/libarchive/archive_read_free.3 +0 -91
  147. package/vendor/libarchive/libarchive/archive_read_header.3 +0 -89
  148. package/vendor/libarchive/libarchive/archive_read_new.3 +0 -57
  149. package/vendor/libarchive/libarchive/archive_read_open.3 +0 -247
  150. package/vendor/libarchive/libarchive/archive_read_open_fd.c +0 -236
  151. package/vendor/libarchive/libarchive/archive_read_open_file.c +0 -257
  152. package/vendor/libarchive/libarchive/archive_read_open_filename.c +0 -652
  153. package/vendor/libarchive/libarchive/archive_read_open_memory.c +0 -188
  154. package/vendor/libarchive/libarchive/archive_read_private.h +0 -274
  155. package/vendor/libarchive/libarchive/archive_read_set_format.c +0 -116
  156. package/vendor/libarchive/libarchive/archive_read_set_options.3 +0 -290
  157. package/vendor/libarchive/libarchive/archive_read_set_options.c +0 -132
  158. package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +0 -84
  159. package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +0 -68
  160. package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +0 -360
  161. package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +0 -457
  162. package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +0 -108
  163. package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +0 -538
  164. package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +0 -119
  165. package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +0 -829
  166. package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +0 -493
  167. package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +0 -51
  168. package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +0 -497
  169. package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +0 -249
  170. package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +0 -739
  171. package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +0 -792
  172. package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +0 -356
  173. package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +0 -4650
  174. package/vendor/libarchive/libarchive/archive_read_support_format_all.c +0 -88
  175. package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +0 -597
  176. package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +0 -76
  177. package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +0 -3410
  178. package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +0 -1152
  179. package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +0 -95
  180. package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +0 -3516
  181. package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +0 -2931
  182. package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +0 -2113
  183. package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +0 -3932
  184. package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +0 -4501
  185. package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +0 -194
  186. package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +0 -3785
  187. package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +0 -875
  188. package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +0 -3770
  189. package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +0 -4710
  190. package/vendor/libarchive/libarchive/archive_string.c +0 -4391
  191. package/vendor/libarchive/libarchive/archive_string.h +0 -244
  192. package/vendor/libarchive/libarchive/archive_string_composition.h +0 -2289
  193. package/vendor/libarchive/libarchive/archive_string_sprintf.c +0 -200
  194. package/vendor/libarchive/libarchive/archive_time.c +0 -168
  195. package/vendor/libarchive/libarchive/archive_time_private.h +0 -47
  196. package/vendor/libarchive/libarchive/archive_util.3 +0 -239
  197. package/vendor/libarchive/libarchive/archive_util.c +0 -668
  198. package/vendor/libarchive/libarchive/archive_version_details.c +0 -516
  199. package/vendor/libarchive/libarchive/archive_virtual.c +0 -162
  200. package/vendor/libarchive/libarchive/archive_windows.c +0 -1035
  201. package/vendor/libarchive/libarchive/archive_windows.h +0 -332
  202. package/vendor/libarchive/libarchive/archive_write.3 +0 -266
  203. package/vendor/libarchive/libarchive/archive_write.c +0 -896
  204. package/vendor/libarchive/libarchive/archive_write_add_filter.c +0 -71
  205. package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +0 -329
  206. package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +0 -76
  207. package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +0 -411
  208. package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +0 -459
  209. package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +0 -143
  210. package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +0 -493
  211. package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +0 -214
  212. package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +0 -710
  213. package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +0 -500
  214. package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +0 -42
  215. package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +0 -398
  216. package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +0 -320
  217. package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +0 -547
  218. package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +0 -608
  219. package/vendor/libarchive/libarchive/archive_write_blocksize.3 +0 -112
  220. package/vendor/libarchive/libarchive/archive_write_data.3 +0 -88
  221. package/vendor/libarchive/libarchive/archive_write_disk.3 +0 -360
  222. package/vendor/libarchive/libarchive/archive_write_disk_posix.c +0 -4789
  223. package/vendor/libarchive/libarchive/archive_write_disk_private.h +0 -43
  224. package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +0 -265
  225. package/vendor/libarchive/libarchive/archive_write_disk_windows.c +0 -2952
  226. package/vendor/libarchive/libarchive/archive_write_filter.3 +0 -140
  227. package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +0 -77
  228. package/vendor/libarchive/libarchive/archive_write_format.3 +0 -187
  229. package/vendor/libarchive/libarchive/archive_write_free.3 +0 -94
  230. package/vendor/libarchive/libarchive/archive_write_header.3 +0 -71
  231. package/vendor/libarchive/libarchive/archive_write_new.3 +0 -56
  232. package/vendor/libarchive/libarchive/archive_write_open.3 +0 -270
  233. package/vendor/libarchive/libarchive/archive_write_open_fd.c +0 -141
  234. package/vendor/libarchive/libarchive/archive_write_open_file.c +0 -102
  235. package/vendor/libarchive/libarchive/archive_write_open_filename.c +0 -272
  236. package/vendor/libarchive/libarchive/archive_write_open_memory.c +0 -110
  237. package/vendor/libarchive/libarchive/archive_write_private.h +0 -166
  238. package/vendor/libarchive/libarchive/archive_write_set_format.c +0 -124
  239. package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +0 -2571
  240. package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +0 -540
  241. package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +0 -93
  242. package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +0 -11
  243. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +0 -618
  244. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +0 -457
  245. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +0 -508
  246. package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +0 -141
  247. package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +0 -790
  248. package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +0 -8216
  249. package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +0 -2307
  250. package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +0 -2249
  251. package/vendor/libarchive/libarchive/archive_write_set_format_private.h +0 -40
  252. package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +0 -123
  253. package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +0 -650
  254. package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +0 -768
  255. package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +0 -648
  256. package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +0 -491
  257. package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +0 -3799
  258. package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +0 -2548
  259. package/vendor/libarchive/libarchive/archive_write_set_options.3 +0 -779
  260. package/vendor/libarchive/libarchive/archive_write_set_options.c +0 -129
  261. package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +0 -72
  262. package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +0 -95
  263. package/vendor/libarchive/libarchive/archive_xxhash.h +0 -48
  264. package/vendor/libarchive/libarchive/config_freebsd.h +0 -275
  265. package/vendor/libarchive/libarchive/cpio.5 +0 -389
  266. package/vendor/libarchive/libarchive/filter_fork.h +0 -44
  267. package/vendor/libarchive/libarchive/filter_fork_posix.c +0 -269
  268. package/vendor/libarchive/libarchive/filter_fork_windows.c +0 -270
  269. package/vendor/libarchive/libarchive/libarchive-formats.5 +0 -478
  270. package/vendor/libarchive/libarchive/libarchive.3 +0 -297
  271. package/vendor/libarchive/libarchive/libarchive_changes.3 +0 -339
  272. package/vendor/libarchive/libarchive/libarchive_internals.3 +0 -363
  273. package/vendor/libarchive/libarchive/module.modulemap +0 -34
  274. package/vendor/libarchive/libarchive/mtree.5 +0 -323
  275. package/vendor/libarchive/libarchive/tar.5 +0 -947
  276. package/vendor/libarchive/libarchive/xxhash.c +0 -531
@@ -1,472 +0,0 @@
1
- /*-
2
- * Copyright (c) 2003-2007 Tim Kientzle
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(S) ``AS IS'' AND ANY EXPRESS OR
15
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17
- * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
- */
25
-
26
- #include "archive_platform.h"
27
-
28
- #ifdef HAVE_SYS_STAT_H
29
- #include <sys/stat.h>
30
- #endif
31
- #ifdef HAVE_ERRNO_H
32
- #include <errno.h>
33
- #endif
34
- #include <stdio.h>
35
- #ifdef HAVE_STDLIB_H
36
- #include <stdlib.h>
37
- #endif
38
- #ifdef HAVE_STRING_H
39
- #include <string.h>
40
- #endif
41
-
42
- #include "archive.h"
43
- #include "archive_entry.h"
44
- #include "archive_integer.h"
45
-
46
- /*
47
- * This is mostly a pretty straightforward hash table implementation.
48
- * The only interesting bit is the different strategies used to
49
- * match up links. These strategies match those used by various
50
- * archiving formats:
51
- * tar - content stored with first link, remainder refer back to it.
52
- * This requires us to match each subsequent link up with the
53
- * first appearance.
54
- * cpio - Old cpio just stored body with each link, match-ups were
55
- * implicit. This is trivial.
56
- * new cpio - New cpio only stores body with last link, match-ups
57
- * are implicit. This is actually quite tricky; see the notes
58
- * below.
59
- */
60
-
61
- /* Users pass us a format code, we translate that into a strategy here. */
62
- #define ARCHIVE_ENTRY_LINKIFY_LIKE_TAR 0
63
- #define ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE 1
64
- #define ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO 2
65
- #define ARCHIVE_ENTRY_LINKIFY_LIKE_NEW_CPIO 3
66
-
67
- /* Initial size of link cache. */
68
- #define links_cache_initial_size 1024
69
-
70
- struct links_entry {
71
- struct links_entry *next;
72
- struct links_entry *previous;
73
- struct archive_entry *canonical;
74
- struct archive_entry *entry;
75
- size_t hash;
76
- unsigned int links; /* # links not yet seen */
77
- };
78
-
79
- struct archive_entry_linkresolver {
80
- struct links_entry **buckets;
81
- struct links_entry *spare;
82
- size_t number_entries;
83
- size_t number_buckets;
84
- int strategy;
85
- };
86
-
87
- #define NEXT_ENTRY_DEFERRED 1
88
- #define NEXT_ENTRY_PARTIAL 2
89
- #define NEXT_ENTRY_ALL (NEXT_ENTRY_DEFERRED | NEXT_ENTRY_PARTIAL)
90
-
91
- static struct links_entry *find_entry(struct archive_entry_linkresolver *,
92
- struct archive_entry *);
93
- static void grow_hash(struct archive_entry_linkresolver *);
94
- static struct links_entry *insert_entry(struct archive_entry_linkresolver *,
95
- struct archive_entry *);
96
- static struct links_entry *next_entry(struct archive_entry_linkresolver *,
97
- int);
98
-
99
- struct archive_entry_linkresolver *
100
- archive_entry_linkresolver_new(void)
101
- {
102
- struct archive_entry_linkresolver *res;
103
-
104
- /* Check for positive power-of-two */
105
- if (links_cache_initial_size == 0 ||
106
- (links_cache_initial_size & (links_cache_initial_size - 1)) != 0)
107
- return (NULL);
108
-
109
- res = calloc(1, sizeof(struct archive_entry_linkresolver));
110
- if (res == NULL)
111
- return (NULL);
112
- res->number_buckets = links_cache_initial_size;
113
- res->buckets = calloc(res->number_buckets, sizeof(res->buckets[0]));
114
- if (res->buckets == NULL) {
115
- free(res);
116
- return (NULL);
117
- }
118
- return (res);
119
- }
120
-
121
- void
122
- archive_entry_linkresolver_set_strategy(struct archive_entry_linkresolver *res,
123
- int fmt)
124
- {
125
- int fmtbase = fmt & ARCHIVE_FORMAT_BASE_MASK;
126
-
127
- switch (fmtbase) {
128
- case ARCHIVE_FORMAT_7ZIP:
129
- case ARCHIVE_FORMAT_AR:
130
- case ARCHIVE_FORMAT_ZIP:
131
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO;
132
- break;
133
- case ARCHIVE_FORMAT_CPIO:
134
- switch (fmt) {
135
- case ARCHIVE_FORMAT_CPIO_SVR4_NOCRC:
136
- case ARCHIVE_FORMAT_CPIO_SVR4_CRC:
137
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_NEW_CPIO;
138
- break;
139
- default:
140
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO;
141
- break;
142
- }
143
- break;
144
- case ARCHIVE_FORMAT_MTREE:
145
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE;
146
- break;
147
- case ARCHIVE_FORMAT_ISO9660:
148
- case ARCHIVE_FORMAT_SHAR:
149
- case ARCHIVE_FORMAT_TAR:
150
- case ARCHIVE_FORMAT_XAR:
151
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_TAR;
152
- break;
153
- default:
154
- res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO;
155
- break;
156
- }
157
- }
158
-
159
- void
160
- archive_entry_linkresolver_free(struct archive_entry_linkresolver *res)
161
- {
162
- if (res == NULL)
163
- return;
164
-
165
- while (next_entry(res, NEXT_ENTRY_ALL) != NULL) {
166
- /* Actual freeing done by next_entry() */
167
- }
168
- free(res->buckets);
169
- free(res);
170
- }
171
-
172
- void
173
- archive_entry_linkify(struct archive_entry_linkresolver *res,
174
- struct archive_entry **e, struct archive_entry **f)
175
- {
176
- struct links_entry *le;
177
- struct archive_entry *t;
178
-
179
- *f = NULL; /* Default: Don't return a second entry. */
180
-
181
- if (*e == NULL) {
182
- le = next_entry(res, NEXT_ENTRY_DEFERRED);
183
- if (le != NULL) {
184
- *e = le->entry;
185
- le->entry = NULL;
186
- }
187
- return;
188
- }
189
-
190
- /* If it has only one link, then we're done. */
191
- if (archive_entry_nlink(*e) == 1)
192
- return;
193
- /* Directories, devices never have hardlinks. */
194
- if (archive_entry_filetype(*e) == AE_IFDIR
195
- || archive_entry_filetype(*e) == AE_IFBLK
196
- || archive_entry_filetype(*e) == AE_IFCHR)
197
- return;
198
-
199
- switch (res->strategy) {
200
- case ARCHIVE_ENTRY_LINKIFY_LIKE_TAR:
201
- le = find_entry(res, *e);
202
- if (le != NULL) {
203
- archive_entry_unset_size(*e);
204
- #if defined(_WIN32) && !defined(__CYGWIN__)
205
- archive_entry_copy_hardlink_w(*e,
206
- archive_entry_pathname_w(le->canonical));
207
- #else
208
- archive_entry_copy_hardlink(*e,
209
- archive_entry_pathname(le->canonical));
210
- #endif
211
- } else
212
- insert_entry(res, *e);
213
- return;
214
- case ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE:
215
- le = find_entry(res, *e);
216
- if (le != NULL) {
217
- #if defined(_WIN32) && !defined(__CYGWIN__)
218
- archive_entry_copy_hardlink_w(*e,
219
- archive_entry_pathname_w(le->canonical));
220
- #else
221
- archive_entry_copy_hardlink(*e,
222
- archive_entry_pathname(le->canonical));
223
- #endif
224
- } else
225
- insert_entry(res, *e);
226
- return;
227
- case ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO:
228
- /* This one is trivial. */
229
- return;
230
- case ARCHIVE_ENTRY_LINKIFY_LIKE_NEW_CPIO:
231
- le = find_entry(res, *e);
232
- if (le != NULL) {
233
- /*
234
- * Put the new entry in le, return the
235
- * old entry from le.
236
- */
237
- t = *e;
238
- *e = le->entry;
239
- le->entry = t;
240
- /* Make the old entry into a hardlink. */
241
- archive_entry_unset_size(*e);
242
- #if defined(_WIN32) && !defined(__CYGWIN__)
243
- archive_entry_copy_hardlink_w(*e,
244
- archive_entry_pathname_w(le->canonical));
245
- #else
246
- archive_entry_copy_hardlink(*e,
247
- archive_entry_pathname(le->canonical));
248
- #endif
249
- /* If we ran out of links, return the
250
- * final entry as well. */
251
- if (le->links == 0) {
252
- *f = le->entry;
253
- le->entry = NULL;
254
- }
255
- } else {
256
- /*
257
- * If we haven't seen it, tuck it away
258
- * for future use.
259
- */
260
- le = insert_entry(res, *e);
261
- if (le == NULL)
262
- /* XXX We should return an error code XXX */
263
- return;
264
- le->entry = *e;
265
- *e = NULL;
266
- }
267
- return;
268
- default:
269
- break;
270
- }
271
- return;
272
- }
273
-
274
- static struct links_entry *
275
- find_entry(struct archive_entry_linkresolver *res,
276
- struct archive_entry *entry)
277
- {
278
- struct links_entry *le;
279
- size_t hash, bucket;
280
- dev_t dev;
281
- int64_t ino;
282
-
283
- if (!archive_entry_ino_is_set(entry) || !archive_entry_dev_is_set(entry)) {
284
- return (NULL);
285
- }
286
-
287
- /* Free a held entry. */
288
- if (res->spare != NULL) {
289
- archive_entry_free(res->spare->canonical);
290
- archive_entry_free(res->spare->entry);
291
- free(res->spare);
292
- res->spare = NULL;
293
- }
294
-
295
- dev = archive_entry_dev(entry);
296
- ino = archive_entry_ino64(entry);
297
- hash = (size_t)(dev ^ ino);
298
-
299
- /* Try to locate this entry in the links cache. */
300
- bucket = hash & (res->number_buckets - 1);
301
- for (le = res->buckets[bucket]; le != NULL; le = le->next) {
302
- if (le->hash == hash
303
- && dev == archive_entry_dev(le->canonical)
304
- && ino == archive_entry_ino64(le->canonical)) {
305
- /*
306
- * Decrement link count each time and release
307
- * the entry if it hits zero. This saves
308
- * memory and is necessary for detecting
309
- * missed links.
310
- */
311
- --le->links;
312
- if (le->links > 0)
313
- return (le);
314
- /* Remove it from this hash bucket. */
315
- if (le->previous != NULL)
316
- le->previous->next = le->next;
317
- if (le->next != NULL)
318
- le->next->previous = le->previous;
319
- if (res->buckets[bucket] == le)
320
- res->buckets[bucket] = le->next;
321
- res->number_entries--;
322
- /* Defer freeing this entry. */
323
- res->spare = le;
324
- return (le);
325
- }
326
- }
327
- return (NULL);
328
- }
329
-
330
- static struct links_entry *
331
- next_entry(struct archive_entry_linkresolver *res, int mode)
332
- {
333
- struct links_entry *le;
334
- size_t bucket;
335
-
336
- /* Free a held entry. */
337
- if (res->spare != NULL) {
338
- archive_entry_free(res->spare->canonical);
339
- archive_entry_free(res->spare->entry);
340
- free(res->spare);
341
- res->spare = NULL;
342
- }
343
-
344
- /* Look for next non-empty bucket in the links cache. */
345
- for (bucket = 0; bucket < res->number_buckets; bucket++) {
346
- for (le = res->buckets[bucket]; le != NULL; le = le->next) {
347
- if (le->entry != NULL &&
348
- (mode & NEXT_ENTRY_DEFERRED) == 0)
349
- continue;
350
- if (le->entry == NULL &&
351
- (mode & NEXT_ENTRY_PARTIAL) == 0)
352
- continue;
353
- /* Remove it from this hash bucket. */
354
- if (le->next != NULL)
355
- le->next->previous = le->previous;
356
- if (le->previous != NULL)
357
- le->previous->next = le->next;
358
- else
359
- res->buckets[bucket] = le->next;
360
- res->number_entries--;
361
- /* Defer freeing this entry. */
362
- res->spare = le;
363
- return (le);
364
- }
365
- }
366
- return (NULL);
367
- }
368
-
369
- static struct links_entry *
370
- insert_entry(struct archive_entry_linkresolver *res,
371
- struct archive_entry *entry)
372
- {
373
- struct links_entry *le;
374
- size_t hash, bucket;
375
-
376
- if (!archive_entry_ino_is_set(entry) || !archive_entry_dev_is_set(entry)) {
377
- return (NULL);
378
- }
379
-
380
- /* Add this entry to the links cache. */
381
- le = calloc(1, sizeof(struct links_entry));
382
- if (le == NULL)
383
- return (NULL);
384
- le->canonical = archive_entry_clone(entry);
385
- if (le->canonical == NULL) {
386
- free(le);
387
- return (NULL);
388
- }
389
-
390
- /* If the links cache is getting too full, enlarge the hash table. */
391
- if (res->number_entries / 2 > res->number_buckets)
392
- grow_hash(res);
393
-
394
- hash = (size_t)(archive_entry_dev(entry) ^ archive_entry_ino64(entry));
395
- bucket = hash & (res->number_buckets - 1);
396
-
397
- /* If we could allocate the entry, record it. */
398
- if (res->buckets[bucket] != NULL)
399
- res->buckets[bucket]->previous = le;
400
- res->number_entries++;
401
- le->next = res->buckets[bucket];
402
- le->previous = NULL;
403
- res->buckets[bucket] = le;
404
- le->hash = hash;
405
- le->links = archive_entry_nlink(entry) - 1;
406
- return (le);
407
- }
408
-
409
- static void
410
- grow_hash(struct archive_entry_linkresolver *res)
411
- {
412
- struct links_entry *le, **new_buckets;
413
- size_t new_size;
414
- size_t i, bucket;
415
-
416
- /* Try to enlarge the bucket list. */
417
- if (archive_ckd_mul_size(&new_size, res->number_buckets, 2))
418
- return;
419
- new_buckets = calloc(new_size, sizeof(struct links_entry *));
420
-
421
- if (new_buckets == NULL)
422
- return;
423
-
424
- for (i = 0; i < res->number_buckets; i++) {
425
- while (res->buckets[i] != NULL) {
426
- /* Remove entry from old bucket. */
427
- le = res->buckets[i];
428
- res->buckets[i] = le->next;
429
-
430
- /* Add entry to new bucket. */
431
- bucket = le->hash & (new_size - 1);
432
-
433
- if (new_buckets[bucket] != NULL)
434
- new_buckets[bucket]->previous = le;
435
- le->next = new_buckets[bucket];
436
- le->previous = NULL;
437
- new_buckets[bucket] = le;
438
- }
439
- }
440
- free(res->buckets);
441
- res->buckets = new_buckets;
442
- res->number_buckets = new_size;
443
- }
444
-
445
- struct archive_entry *
446
- archive_entry_partial_links(struct archive_entry_linkresolver *res,
447
- unsigned int *links)
448
- {
449
- struct archive_entry *e;
450
- struct links_entry *le;
451
-
452
- /* Free a held entry. */
453
- if (res->spare != NULL) {
454
- archive_entry_free(res->spare->canonical);
455
- archive_entry_free(res->spare->entry);
456
- free(res->spare);
457
- res->spare = NULL;
458
- }
459
-
460
- le = next_entry(res, NEXT_ENTRY_PARTIAL);
461
- if (le != NULL) {
462
- e = le->canonical;
463
- if (links != NULL)
464
- *links = le->links;
465
- le->canonical = NULL;
466
- } else {
467
- e = NULL;
468
- if (links != NULL)
469
- *links = 0;
470
- }
471
- return (e);
472
- }
@@ -1,224 +0,0 @@
1
- .\" Copyright (c) 2010 Joerg Sonnenberger
2
- .\" All rights reserved.
3
- .\"
4
- .\" Redistribution and use in source and binary forms, with or without
5
- .\" modification, are permitted provided that the following conditions
6
- .\" are met:
7
- .\" 1. Redistributions of source code must retain the above copyright
8
- .\" notice, this list of conditions and the following disclaimer.
9
- .\" 2. Redistributions in binary form must reproduce the above copyright
10
- .\" notice, this list of conditions and the following disclaimer in the
11
- .\" documentation and/or other materials provided with the distribution.
12
- .\"
13
- .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14
- .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
- .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
- .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17
- .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18
- .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19
- .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20
- .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21
- .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22
- .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23
- .\" SUCH DAMAGE.
24
- .\"
25
- .Dd February 2, 2012
26
- .Dt ARCHIVE_ENTRY_LINKIFY 3
27
- .Os
28
- .Sh NAME
29
- .Nm archive_entry_linkresolver ,
30
- .Nm archive_entry_linkresolver_new ,
31
- .Nm archive_entry_linkresolver_set_strategy ,
32
- .Nm archive_entry_linkresolver_free ,
33
- .Nm archive_entry_linkify
34
- .Nd hardlink resolver functions
35
- .Sh LIBRARY
36
- Streaming Archive Library (libarchive, -larchive)
37
- .Sh SYNOPSIS
38
- .In archive_entry.h
39
- .Ft struct archive_entry_linkresolver *
40
- .Fn archive_entry_linkresolver_new void
41
- .Ft void
42
- .Fo archive_entry_linkresolver_set_strategy
43
- .Fa "struct archive_entry_linkresolver *resolver"
44
- .Fa "int format"
45
- .Fc
46
- .Ft void
47
- .Fo archive_entry_linkresolver_free
48
- .Fa "struct archive_entry_linkresolver *resolver"
49
- .Fc
50
- .Ft void
51
- .Fo archive_entry_linkify
52
- .Fa "struct archive_entry_linkresolver *resolver"
53
- .Fa "struct archive_entry **entry"
54
- .Fa "struct archive_entry **sparse"
55
- .Fc
56
- .Sh DESCRIPTION
57
- Programs that want to create archives have to deal with hardlinks.
58
- Hardlinks are handled in different ways by the archive formats.
59
- The basic strategies are:
60
- .Bl -enum
61
- .It
62
- Ignore hardlinks and store the body for each reference (old cpio, zip).
63
- .It
64
- Store the body the first time an inode is seen (ustar, pax).
65
- .It
66
- Store the body the last time an inode is seen (new cpio).
67
- .El
68
- .Pp
69
- The
70
- .Nm
71
- functions help by providing a unified interface and handling the complexity
72
- behind the scene.
73
- .Pp
74
- The
75
- .Nm
76
- functions assume that
77
- .Vt archive_entry
78
- instances have valid nlinks, inode and device values.
79
- The inode and device value is used to match entries.
80
- The nlinks value is used to determined if all references have been found and
81
- if the internal references can be recycled.
82
- .Pp
83
- The
84
- .Fn archive_entry_linkresolver_new
85
- function allocates a new link resolver.
86
- The instance can be freed using
87
- .Fn archive_entry_linkresolver_free .
88
- All deferred entries are flushed and the internal storage is freed.
89
- .Pp
90
- The
91
- .Fn archive_entry_linkresolver_set_strategy
92
- function selects the optimal hardlink strategy for the given format.
93
- The format code can be obtained from
94
- .Xr archive_format 3 .
95
- The function can be called more than once, but it is recommended to
96
- flush all deferred entries first.
97
- .Pp
98
- The
99
- .Fn archive_entry_linkify
100
- function is the core of
101
- .Nm .
102
- The
103
- .Fn entry
104
- argument points to the
105
- .Vt archive_entry
106
- that should be written.
107
- Depending on the strategy one of the following actions is taken:
108
- .Bl -enum
109
- .It
110
- For the simple archive formats
111
- .Va *entry
112
- is left unmodified and
113
- .Va *sparse
114
- is set to
115
- .Dv NULL .
116
- .It
117
- For tar like archive formats,
118
- .Va *sparse
119
- is set to
120
- .Dv NULL .
121
- If
122
- .Va *entry
123
- is
124
- .Dv NULL ,
125
- no action is taken.
126
- If the hardlink count of
127
- .Va *entry
128
- is larger than 1 and the file type is a regular file or symbolic link,
129
- the internal list is searched for a matching inode.
130
- If such an inode is found, the link count is decremented and the file size
131
- of
132
- .Va *entry
133
- is set to 0 to notify that no body should be written.
134
- If no such inode is found, a copy of the entry is added to the internal cache
135
- with a link count reduced by one.
136
- .It
137
- For new cpio like archive formats a value for
138
- .Va *entry
139
- of
140
- .Dv NULL
141
- is used to flush deferred entries.
142
- In that case
143
- .Va *entry
144
- is set to an arbitrary deferred entry and the entry itself is removed from the
145
- internal list.
146
- If the internal list is empty,
147
- .Va *entry
148
- is set to
149
- .Dv NULL .
150
- In either case,
151
- .Va *sparse
152
- is set to
153
- .Dv NULL
154
- and the function returns.
155
- If the hardlink count of
156
- .Va *entry
157
- is one or the file type is a directory or device,
158
- .Va *sparse
159
- is set to
160
- .Dv NULL
161
- and no further action is taken.
162
- Otherwise, the internal list is searched for a matching inode.
163
- If such an inode is not found, the entry is added to the internal list,
164
- both
165
- .Va *entry
166
- and
167
- .Va *sparse
168
- are set to
169
- .Dv NULL
170
- and the function returns.
171
- If such an inode is found, the link count is decremented.
172
- If it remains larger than one, the existing entry on the internal list
173
- is swapped with
174
- .Va *entry
175
- after retaining the link count.
176
- The existing entry is returned in
177
- .Va *entry .
178
- If the link count reached one, the new entry is also removed from the
179
- internal list and returned in
180
- .Va *sparse .
181
- Otherwise
182
- .Va *sparse
183
- is set to
184
- .Dv NULL .
185
- .El
186
- .Pp
187
- The general usage is therefore:
188
- .Bl -enum
189
- .It
190
- For each new archive entry, call
191
- .Fn archive_entry_linkify .
192
- .It
193
- Keep in mind that the entries returned may have a size of 0 now.
194
- .It
195
- If
196
- .Va *entry
197
- is not
198
- .Dv NULL ,
199
- archive it.
200
- .It
201
- If
202
- .Va *sparse
203
- is not
204
- .Dv NULL ,
205
- archive it.
206
- .It
207
- After all entries have been written to disk, call
208
- .Fn archive_entry_linkify
209
- with
210
- .Va *entry
211
- set to
212
- .Dv NULL
213
- and archive the returned entry as long as it is not
214
- .Dv NULL .
215
- .El
216
- .Sh RETURN VALUES
217
- .Fn archive_entry_linkresolver_new
218
- returns
219
- .Dv NULL
220
- on
221
- .Xr malloc 3
222
- failures.
223
- .Sh SEE ALSO
224
- .Xr archive_entry 3