First actual working libarchive function!

main
Jef Roosens 2022-01-12 22:08:27 +01:00
parent 476588274f
commit 74c8bfa158
Signed by untrusted user: Jef Roosens
GPG Key ID: 955C0660072F691F
1 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,8 @@ fn C.archive_read_new() &C.archive
fn C.archive_read_support_filter_all(&C.archive) fn C.archive_read_support_filter_all(&C.archive)
fn C.archive_read_support_format_all(&C.archive) fn C.archive_read_support_format_all(&C.archive)
fn C.archive_read_open_filename(&C.archive, &char, int) int fn C.archive_read_open_filename(&C.archive, &char, int) int
fn C.archive_read_next_header(&C.archive, &C.archive_entry) int fn C.archive_read_next_header(&C.archive, &&C.archive_entry) int
fn C.archive_entry_pathname(C.archive_entry) &char fn C.archive_entry_pathname(&C.archive_entry) &char
fn C.archive_read_data_skip(&C.archive) fn C.archive_read_data_skip(&C.archive)
fn C.archive_read_free(&C.archive) int fn C.archive_read_free(&C.archive) int
@ -27,8 +27,8 @@ pub fn list_filenames() {
r = C.archive_read_open_filename(a, c'test/homebank-5.5.1-1-x86_64.pkg.tar.zst', 10240) r = C.archive_read_open_filename(a, c'test/homebank-5.5.1-1-x86_64.pkg.tar.zst', 10240)
for (C.archive_read_next_header(a, entry) == C.ARCHIVE_OK) { for (C.archive_read_next_header(a, &entry) == C.ARCHIVE_OK) {
println(C.archive_entry_pathname(entry)) println(cstring_to_vstring(C.archive_entry_pathname(entry)))
C.archive_read_data_skip(a) // Note 2 C.archive_read_data_skip(a) // Note 2
} }