-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add cpymo_tool_package_packer api * rewrite cpymo pack in cpymo tool pack api * stricter pack api
Showing
2 changed files
with
140 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef INCLUDE_CPYMO_TOOL_PACKAGE | ||
#define INCLUDE_CPYMO_TOOL_PACKAGE | ||
|
||
#include <stdio.h> | ||
#include "../cpymo/cpymo_str.h" | ||
|
||
typedef struct { | ||
size_t max_file_count, current_file_count; | ||
long index_section_start_offset, data_section_start_offset; | ||
FILE *stream; | ||
} cpymo_tool_package_packer; | ||
|
||
error_t cpymo_tool_package_packer_open( | ||
cpymo_tool_package_packer *packer, | ||
const char *path, | ||
size_t max_files_count); | ||
|
||
error_t cpymo_tool_package_packer_add_data( | ||
cpymo_tool_package_packer *packer, | ||
cpymo_str name, | ||
void *data, | ||
size_t len); | ||
|
||
error_t cpymo_tool_package_packer_add_file( | ||
cpymo_tool_package_packer *packer, | ||
const char *file); | ||
|
||
void cpymo_tool_package_packer_close( | ||
cpymo_tool_package_packer *packer); | ||
|
||
#endif |