Geniet ervan Maxim
ci/woodpecker/push/woodpecker Pipeline was successful Details

pull/14/head
Jef Roosens 2022-01-12 21:50:17 +01:00
parent d6e686a8dc
commit 476588274f
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
2 changed files with 21 additions and 1 deletions

View File

@ -22,6 +22,10 @@ prod: vieter-prod
vieter-prod: $(SOURCES) vieter-prod: $(SOURCES)
$(V) -o vieter-prod -prod $(SRC_DIR) $(V) -o vieter-prod -prod $(SRC_DIR)
.PHONY: c
c:
$(V) -o vieter.c $(SRC_DIR)
# =====EXECUTION===== # =====EXECUTION=====
# Run the server in the default 'data' directory # Run the server in the default 'data' directory

View File

@ -11,10 +11,26 @@ struct C.archive_entry {}
fn C.archive_read_new() &C.archive 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_next_header(&C.archive, &C.archive_entry) int
fn C.archive_entry_pathname(C.archive_entry) &char
fn C.archive_read_data_skip(&C.archive)
fn C.archive_read_free(&C.archive) int
pub fn list_filenames() { pub fn list_filenames() {
a := C.archive_read_new() a := C.archive_read_new()
entry := &C.archive_entry{}
mut r := 0
C.archive_read_support_filter_all(a) C.archive_read_support_filter_all(a)
C.archive_read_support_format_all(a) C.archive_read_support_format_all(a)
// println(a)
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) {
println(C.archive_entry_pathname(entry))
C.archive_read_data_skip(a) // Note 2
}
r = C.archive_read_free(a) // Note 3
} }