apio
482ac6d949
This uses a new struct (struct minitar_w). This struct is initialized using the minitar_open_w function, and deleted using minitar_close_w. The functions to write to an archive are minitar_write_file_entry() and minitar_write_special_entry(). The difference is that regular files have content, while the rest (special entries) do not. This commit also adds a new example program (pack), which can create tar archives from files (no directory support though). Archives created using pack and minitar can be read and extracted using GNU tar!! Documentation is coming in another commit.
10 lines
324 B
CMake
10 lines
324 B
CMake
add_executable(list EXCLUDE_FROM_ALL list.c)
|
|
target_link_libraries(list PRIVATE minitar)
|
|
|
|
add_executable(untar EXCLUDE_FROM_ALL untar.c)
|
|
target_link_libraries(untar PRIVATE minitar)
|
|
|
|
add_executable(pack EXCLUDE_FROM_ALL pack.c)
|
|
target_link_libraries(pack PRIVATE minitar)
|
|
|
|
add_custom_target(examples DEPENDS list untar pack) |