@papyrus-sdk/engine-native 0.2.22-beta.8 → 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 (274) 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 -608
  8. package/dist/index.d.ts +4 -608
  9. package/dist/index.js +8 -463
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +7 -456
  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 +4 -6
  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/java/com/papyrus/engine/PapyrusComicArchiveNative.java +0 -14
  24. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentView.java +0 -491
  25. package/android/src/main/java/com/papyrus/engine/PapyrusComicDocumentViewManager.java +0 -32
  26. package/android/src/main/java/com/papyrus/engine/PapyrusComicPageLayout.java +0 -38
  27. package/android/src/main/java/com/papyrus/engine/PapyrusNativeTextModel.java +0 -195
  28. package/android/src/main/java/com/papyrus/engine/PapyrusSelectionMenuIcon.java +0 -48
  29. package/android/src/main/java/com/papyrus/engine/PapyrusTextAnnotationModel.java +0 -22
  30. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentView.java +0 -661
  31. package/android/src/main/java/com/papyrus/engine/PapyrusTextDocumentViewManager.java +0 -49
  32. package/android/src/main/java/com/papyrus/engine/PapyrusTextStore.java +0 -43
  33. package/ios/PapyrusComicDocumentView.h +0 -21
  34. package/ios/PapyrusComicDocumentView.m +0 -547
  35. package/ios/PapyrusComicDocumentViewManager.m +0 -23
  36. package/ios/PapyrusPageRotationRegistry.h +0 -29
  37. package/ios/PapyrusPageRotationRegistry.m +0 -179
  38. package/ios/PapyrusPdfDocumentView.h +0 -55
  39. package/ios/PapyrusPdfDocumentView.m +0 -2338
  40. package/ios/PapyrusPdfDocumentViewManager.m +0 -61
  41. package/ios/PapyrusPdfPageTheme.h +0 -15
  42. package/ios/PapyrusPdfPageTheme.m +0 -218
  43. package/ios/PapyrusSelectionMenu.h +0 -27
  44. package/ios/PapyrusTextAnnotationRange.h +0 -2
  45. package/ios/PapyrusTextAnnotationRange.m +0 -29
  46. package/ios/PapyrusTextDocumentView.h +0 -32
  47. package/ios/PapyrusTextDocumentView.m +0 -518
  48. package/ios/PapyrusTextDocumentViewManager.m +0 -34
  49. package/ios/PapyrusTextStore.h +0 -13
  50. package/ios/PapyrusTextStore.m +0 -73
  51. package/third_party_licenses/BLAKE2-NOTICE.txt +0 -11
  52. package/third_party_licenses/libarchive-COPYING +0 -65
  53. package/vendor/libarchive/PapyrusComicArchive.cpp +0 -376
  54. package/vendor/libarchive/PapyrusComicArchive.h +0 -30
  55. package/vendor/libarchive/README.papyrus.md +0 -15
  56. package/vendor/libarchive/android.h +0 -192
  57. package/vendor/libarchive/config/PapyrusArchiveConfig.h +0 -71
  58. package/vendor/libarchive/libarchive/CMakeLists.txt +0 -293
  59. package/vendor/libarchive/libarchive/android_lf.h +0 -36
  60. package/vendor/libarchive/libarchive/archive.h +0 -1266
  61. package/vendor/libarchive/libarchive/archive_acl.c +0 -2025
  62. package/vendor/libarchive/libarchive/archive_acl_private.h +0 -85
  63. package/vendor/libarchive/libarchive/archive_blake2.h +0 -197
  64. package/vendor/libarchive/libarchive/archive_blake2_impl.h +0 -161
  65. package/vendor/libarchive/libarchive/archive_blake2s_ref.c +0 -369
  66. package/vendor/libarchive/libarchive/archive_blake2sp_ref.c +0 -361
  67. package/vendor/libarchive/libarchive/archive_check_magic.c +0 -183
  68. package/vendor/libarchive/libarchive/archive_cmdline.c +0 -211
  69. package/vendor/libarchive/libarchive/archive_cmdline_private.h +0 -45
  70. package/vendor/libarchive/libarchive/archive_crc32.h +0 -123
  71. package/vendor/libarchive/libarchive/archive_cryptor.c +0 -534
  72. package/vendor/libarchive/libarchive/archive_cryptor_private.h +0 -199
  73. package/vendor/libarchive/libarchive/archive_digest.c +0 -1584
  74. package/vendor/libarchive/libarchive/archive_digest_private.h +0 -431
  75. package/vendor/libarchive/libarchive/archive_disk_acl_darwin.c +0 -558
  76. package/vendor/libarchive/libarchive/archive_disk_acl_freebsd.c +0 -712
  77. package/vendor/libarchive/libarchive/archive_disk_acl_linux.c +0 -760
  78. package/vendor/libarchive/libarchive/archive_disk_acl_sunos.c +0 -824
  79. package/vendor/libarchive/libarchive/archive_endian.h +0 -234
  80. package/vendor/libarchive/libarchive/archive_entry.3 +0 -147
  81. package/vendor/libarchive/libarchive/archive_entry.c +0 -2297
  82. package/vendor/libarchive/libarchive/archive_entry.h +0 -763
  83. package/vendor/libarchive/libarchive/archive_entry_acl.3 +0 -458
  84. package/vendor/libarchive/libarchive/archive_entry_copy_bhfi.c +0 -55
  85. package/vendor/libarchive/libarchive/archive_entry_copy_stat.c +0 -82
  86. package/vendor/libarchive/libarchive/archive_entry_link_resolver.c +0 -472
  87. package/vendor/libarchive/libarchive/archive_entry_linkify.3 +0 -224
  88. package/vendor/libarchive/libarchive/archive_entry_locale.h +0 -90
  89. package/vendor/libarchive/libarchive/archive_entry_misc.3 +0 -63
  90. package/vendor/libarchive/libarchive/archive_entry_paths.3 +0 -153
  91. package/vendor/libarchive/libarchive/archive_entry_perms.3 +0 -210
  92. package/vendor/libarchive/libarchive/archive_entry_private.h +0 -205
  93. package/vendor/libarchive/libarchive/archive_entry_sparse.c +0 -156
  94. package/vendor/libarchive/libarchive/archive_entry_stat.3 +0 -274
  95. package/vendor/libarchive/libarchive/archive_entry_stat.c +0 -121
  96. package/vendor/libarchive/libarchive/archive_entry_strmode.c +0 -69
  97. package/vendor/libarchive/libarchive/archive_entry_time.3 +0 -127
  98. package/vendor/libarchive/libarchive/archive_entry_xattr.c +0 -155
  99. package/vendor/libarchive/libarchive/archive_hmac.c +0 -345
  100. package/vendor/libarchive/libarchive/archive_hmac_private.h +0 -119
  101. package/vendor/libarchive/libarchive/archive_integer.h +0 -267
  102. package/vendor/libarchive/libarchive/archive_match.c +0 -1869
  103. package/vendor/libarchive/libarchive/archive_openssl_evp_private.h +0 -54
  104. package/vendor/libarchive/libarchive/archive_openssl_hmac_private.h +0 -54
  105. package/vendor/libarchive/libarchive/archive_options.c +0 -219
  106. package/vendor/libarchive/libarchive/archive_options_private.h +0 -49
  107. package/vendor/libarchive/libarchive/archive_pack_dev.c +0 -330
  108. package/vendor/libarchive/libarchive/archive_pack_dev.h +0 -49
  109. package/vendor/libarchive/libarchive/archive_parse_date.c +0 -1173
  110. package/vendor/libarchive/libarchive/archive_pathmatch.c +0 -480
  111. package/vendor/libarchive/libarchive/archive_pathmatch.h +0 -50
  112. package/vendor/libarchive/libarchive/archive_platform.h +0 -213
  113. package/vendor/libarchive/libarchive/archive_platform_acl.h +0 -53
  114. package/vendor/libarchive/libarchive/archive_platform_stat.h +0 -45
  115. package/vendor/libarchive/libarchive/archive_platform_xattr.h +0 -45
  116. package/vendor/libarchive/libarchive/archive_ppmd7.c +0 -1173
  117. package/vendor/libarchive/libarchive/archive_ppmd7_private.h +0 -119
  118. package/vendor/libarchive/libarchive/archive_ppmd8.c +0 -1293
  119. package/vendor/libarchive/libarchive/archive_ppmd8_private.h +0 -123
  120. package/vendor/libarchive/libarchive/archive_ppmd_private.h +0 -159
  121. package/vendor/libarchive/libarchive/archive_private.h +0 -209
  122. package/vendor/libarchive/libarchive/archive_random.c +0 -274
  123. package/vendor/libarchive/libarchive/archive_random_private.h +0 -36
  124. package/vendor/libarchive/libarchive/archive_rb.c +0 -709
  125. package/vendor/libarchive/libarchive/archive_rb.h +0 -113
  126. package/vendor/libarchive/libarchive/archive_read.3 +0 -250
  127. package/vendor/libarchive/libarchive/archive_read.c +0 -1814
  128. package/vendor/libarchive/libarchive/archive_read_add_passphrase.3 +0 -72
  129. package/vendor/libarchive/libarchive/archive_read_add_passphrase.c +0 -189
  130. package/vendor/libarchive/libarchive/archive_read_append_filter.c +0 -209
  131. package/vendor/libarchive/libarchive/archive_read_data.3 +0 -128
  132. package/vendor/libarchive/libarchive/archive_read_data_into_fd.c +0 -207
  133. package/vendor/libarchive/libarchive/archive_read_disk.3 +0 -422
  134. package/vendor/libarchive/libarchive/archive_read_disk_entry_from_file.c +0 -1086
  135. package/vendor/libarchive/libarchive/archive_read_disk_posix.c +0 -2639
  136. package/vendor/libarchive/libarchive/archive_read_disk_private.h +0 -97
  137. package/vendor/libarchive/libarchive/archive_read_disk_set_standard_lookup.c +0 -315
  138. package/vendor/libarchive/libarchive/archive_read_disk_windows.c +0 -2603
  139. package/vendor/libarchive/libarchive/archive_read_extract.3 +0 -135
  140. package/vendor/libarchive/libarchive/archive_read_extract.c +0 -59
  141. package/vendor/libarchive/libarchive/archive_read_extract2.c +0 -154
  142. package/vendor/libarchive/libarchive/archive_read_filter.3 +0 -163
  143. package/vendor/libarchive/libarchive/archive_read_format.3 +0 -190
  144. package/vendor/libarchive/libarchive/archive_read_free.3 +0 -91
  145. package/vendor/libarchive/libarchive/archive_read_header.3 +0 -89
  146. package/vendor/libarchive/libarchive/archive_read_new.3 +0 -57
  147. package/vendor/libarchive/libarchive/archive_read_open.3 +0 -247
  148. package/vendor/libarchive/libarchive/archive_read_open_fd.c +0 -236
  149. package/vendor/libarchive/libarchive/archive_read_open_file.c +0 -257
  150. package/vendor/libarchive/libarchive/archive_read_open_filename.c +0 -652
  151. package/vendor/libarchive/libarchive/archive_read_open_memory.c +0 -188
  152. package/vendor/libarchive/libarchive/archive_read_private.h +0 -274
  153. package/vendor/libarchive/libarchive/archive_read_set_format.c +0 -116
  154. package/vendor/libarchive/libarchive/archive_read_set_options.3 +0 -290
  155. package/vendor/libarchive/libarchive/archive_read_set_options.c +0 -132
  156. package/vendor/libarchive/libarchive/archive_read_support_filter_all.c +0 -84
  157. package/vendor/libarchive/libarchive/archive_read_support_filter_by_code.c +0 -68
  158. package/vendor/libarchive/libarchive/archive_read_support_filter_bzip2.c +0 -360
  159. package/vendor/libarchive/libarchive/archive_read_support_filter_compress.c +0 -457
  160. package/vendor/libarchive/libarchive/archive_read_support_filter_grzip.c +0 -108
  161. package/vendor/libarchive/libarchive/archive_read_support_filter_gzip.c +0 -538
  162. package/vendor/libarchive/libarchive/archive_read_support_filter_lrzip.c +0 -119
  163. package/vendor/libarchive/libarchive/archive_read_support_filter_lz4.c +0 -829
  164. package/vendor/libarchive/libarchive/archive_read_support_filter_lzop.c +0 -493
  165. package/vendor/libarchive/libarchive/archive_read_support_filter_none.c +0 -51
  166. package/vendor/libarchive/libarchive/archive_read_support_filter_program.c +0 -497
  167. package/vendor/libarchive/libarchive/archive_read_support_filter_rpm.c +0 -249
  168. package/vendor/libarchive/libarchive/archive_read_support_filter_uu.c +0 -739
  169. package/vendor/libarchive/libarchive/archive_read_support_filter_xz.c +0 -792
  170. package/vendor/libarchive/libarchive/archive_read_support_filter_zstd.c +0 -356
  171. package/vendor/libarchive/libarchive/archive_read_support_format_7zip.c +0 -4650
  172. package/vendor/libarchive/libarchive/archive_read_support_format_all.c +0 -88
  173. package/vendor/libarchive/libarchive/archive_read_support_format_ar.c +0 -597
  174. package/vendor/libarchive/libarchive/archive_read_support_format_by_code.c +0 -76
  175. package/vendor/libarchive/libarchive/archive_read_support_format_cab.c +0 -3410
  176. package/vendor/libarchive/libarchive/archive_read_support_format_cpio.c +0 -1152
  177. package/vendor/libarchive/libarchive/archive_read_support_format_empty.c +0 -95
  178. package/vendor/libarchive/libarchive/archive_read_support_format_iso9660.c +0 -3516
  179. package/vendor/libarchive/libarchive/archive_read_support_format_lha.c +0 -2931
  180. package/vendor/libarchive/libarchive/archive_read_support_format_mtree.c +0 -2113
  181. package/vendor/libarchive/libarchive/archive_read_support_format_rar.c +0 -3932
  182. package/vendor/libarchive/libarchive/archive_read_support_format_rar5.c +0 -4501
  183. package/vendor/libarchive/libarchive/archive_read_support_format_raw.c +0 -194
  184. package/vendor/libarchive/libarchive/archive_read_support_format_tar.c +0 -3785
  185. package/vendor/libarchive/libarchive/archive_read_support_format_warc.c +0 -875
  186. package/vendor/libarchive/libarchive/archive_read_support_format_xar.c +0 -3770
  187. package/vendor/libarchive/libarchive/archive_read_support_format_zip.c +0 -4710
  188. package/vendor/libarchive/libarchive/archive_string.c +0 -4391
  189. package/vendor/libarchive/libarchive/archive_string.h +0 -244
  190. package/vendor/libarchive/libarchive/archive_string_composition.h +0 -2289
  191. package/vendor/libarchive/libarchive/archive_string_sprintf.c +0 -200
  192. package/vendor/libarchive/libarchive/archive_time.c +0 -168
  193. package/vendor/libarchive/libarchive/archive_time_private.h +0 -47
  194. package/vendor/libarchive/libarchive/archive_util.3 +0 -239
  195. package/vendor/libarchive/libarchive/archive_util.c +0 -668
  196. package/vendor/libarchive/libarchive/archive_version_details.c +0 -516
  197. package/vendor/libarchive/libarchive/archive_virtual.c +0 -162
  198. package/vendor/libarchive/libarchive/archive_windows.c +0 -1035
  199. package/vendor/libarchive/libarchive/archive_windows.h +0 -332
  200. package/vendor/libarchive/libarchive/archive_write.3 +0 -266
  201. package/vendor/libarchive/libarchive/archive_write.c +0 -896
  202. package/vendor/libarchive/libarchive/archive_write_add_filter.c +0 -71
  203. package/vendor/libarchive/libarchive/archive_write_add_filter_b64encode.c +0 -329
  204. package/vendor/libarchive/libarchive/archive_write_add_filter_by_name.c +0 -76
  205. package/vendor/libarchive/libarchive/archive_write_add_filter_bzip2.c +0 -411
  206. package/vendor/libarchive/libarchive/archive_write_add_filter_compress.c +0 -459
  207. package/vendor/libarchive/libarchive/archive_write_add_filter_grzip.c +0 -143
  208. package/vendor/libarchive/libarchive/archive_write_add_filter_gzip.c +0 -493
  209. package/vendor/libarchive/libarchive/archive_write_add_filter_lrzip.c +0 -214
  210. package/vendor/libarchive/libarchive/archive_write_add_filter_lz4.c +0 -710
  211. package/vendor/libarchive/libarchive/archive_write_add_filter_lzop.c +0 -500
  212. package/vendor/libarchive/libarchive/archive_write_add_filter_none.c +0 -42
  213. package/vendor/libarchive/libarchive/archive_write_add_filter_program.c +0 -398
  214. package/vendor/libarchive/libarchive/archive_write_add_filter_uuencode.c +0 -320
  215. package/vendor/libarchive/libarchive/archive_write_add_filter_xz.c +0 -547
  216. package/vendor/libarchive/libarchive/archive_write_add_filter_zstd.c +0 -608
  217. package/vendor/libarchive/libarchive/archive_write_blocksize.3 +0 -112
  218. package/vendor/libarchive/libarchive/archive_write_data.3 +0 -88
  219. package/vendor/libarchive/libarchive/archive_write_disk.3 +0 -360
  220. package/vendor/libarchive/libarchive/archive_write_disk_posix.c +0 -4789
  221. package/vendor/libarchive/libarchive/archive_write_disk_private.h +0 -43
  222. package/vendor/libarchive/libarchive/archive_write_disk_set_standard_lookup.c +0 -265
  223. package/vendor/libarchive/libarchive/archive_write_disk_windows.c +0 -2952
  224. package/vendor/libarchive/libarchive/archive_write_filter.3 +0 -140
  225. package/vendor/libarchive/libarchive/archive_write_finish_entry.3 +0 -77
  226. package/vendor/libarchive/libarchive/archive_write_format.3 +0 -187
  227. package/vendor/libarchive/libarchive/archive_write_free.3 +0 -94
  228. package/vendor/libarchive/libarchive/archive_write_header.3 +0 -71
  229. package/vendor/libarchive/libarchive/archive_write_new.3 +0 -56
  230. package/vendor/libarchive/libarchive/archive_write_open.3 +0 -270
  231. package/vendor/libarchive/libarchive/archive_write_open_fd.c +0 -141
  232. package/vendor/libarchive/libarchive/archive_write_open_file.c +0 -102
  233. package/vendor/libarchive/libarchive/archive_write_open_filename.c +0 -272
  234. package/vendor/libarchive/libarchive/archive_write_open_memory.c +0 -110
  235. package/vendor/libarchive/libarchive/archive_write_private.h +0 -166
  236. package/vendor/libarchive/libarchive/archive_write_set_format.c +0 -124
  237. package/vendor/libarchive/libarchive/archive_write_set_format_7zip.c +0 -2571
  238. package/vendor/libarchive/libarchive/archive_write_set_format_ar.c +0 -540
  239. package/vendor/libarchive/libarchive/archive_write_set_format_by_name.c +0 -93
  240. package/vendor/libarchive/libarchive/archive_write_set_format_cpio.c +0 -11
  241. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_binary.c +0 -618
  242. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_newc.c +0 -457
  243. package/vendor/libarchive/libarchive/archive_write_set_format_cpio_odc.c +0 -508
  244. package/vendor/libarchive/libarchive/archive_write_set_format_filter_by_ext.c +0 -141
  245. package/vendor/libarchive/libarchive/archive_write_set_format_gnutar.c +0 -790
  246. package/vendor/libarchive/libarchive/archive_write_set_format_iso9660.c +0 -8216
  247. package/vendor/libarchive/libarchive/archive_write_set_format_mtree.c +0 -2307
  248. package/vendor/libarchive/libarchive/archive_write_set_format_pax.c +0 -2249
  249. package/vendor/libarchive/libarchive/archive_write_set_format_private.h +0 -40
  250. package/vendor/libarchive/libarchive/archive_write_set_format_raw.c +0 -123
  251. package/vendor/libarchive/libarchive/archive_write_set_format_shar.c +0 -650
  252. package/vendor/libarchive/libarchive/archive_write_set_format_ustar.c +0 -768
  253. package/vendor/libarchive/libarchive/archive_write_set_format_v7tar.c +0 -648
  254. package/vendor/libarchive/libarchive/archive_write_set_format_warc.c +0 -491
  255. package/vendor/libarchive/libarchive/archive_write_set_format_xar.c +0 -3799
  256. package/vendor/libarchive/libarchive/archive_write_set_format_zip.c +0 -2548
  257. package/vendor/libarchive/libarchive/archive_write_set_options.3 +0 -779
  258. package/vendor/libarchive/libarchive/archive_write_set_options.c +0 -129
  259. package/vendor/libarchive/libarchive/archive_write_set_passphrase.3 +0 -72
  260. package/vendor/libarchive/libarchive/archive_write_set_passphrase.c +0 -95
  261. package/vendor/libarchive/libarchive/archive_xxhash.h +0 -48
  262. package/vendor/libarchive/libarchive/config_freebsd.h +0 -275
  263. package/vendor/libarchive/libarchive/cpio.5 +0 -389
  264. package/vendor/libarchive/libarchive/filter_fork.h +0 -44
  265. package/vendor/libarchive/libarchive/filter_fork_posix.c +0 -269
  266. package/vendor/libarchive/libarchive/filter_fork_windows.c +0 -270
  267. package/vendor/libarchive/libarchive/libarchive-formats.5 +0 -478
  268. package/vendor/libarchive/libarchive/libarchive.3 +0 -297
  269. package/vendor/libarchive/libarchive/libarchive_changes.3 +0 -339
  270. package/vendor/libarchive/libarchive/libarchive_internals.3 +0 -363
  271. package/vendor/libarchive/libarchive/module.modulemap +0 -34
  272. package/vendor/libarchive/libarchive/mtree.5 +0 -323
  273. package/vendor/libarchive/libarchive/tar.5 +0 -947
  274. 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