21 #include <FMI/fmi_zip_zip.h> 22 #include "config_test.h" 24 #define PRINT_MY_DEBUG printf("Line: %d \t File: %s \n",__LINE__, __FILE__) 30 printf(
"Press any key to exit\n");
38 printf(
"module = %s, log level = %d: %s\n", module, log_level, message);
45 int main(
int argc,
char *argv[])
50 const char* files_to_zip[] = {COMPRESS_DUMMY_FILE_PATH_SRC};
51 int n_files_to_zip = 1;
56 callbacks.
free = free;
62 status = fmi_zip_zip(COMPRESS_DUMMY_FILE_PATH_DIST, n_files_to_zip, files_to_zip, &callbacks);
65 printf(
"Failed to compress the file\n");
68 printf(
"Succesfully compressed the file\n");
jm_calloc_f calloc
Allocate zero initialized memory.
jm_log_level_enu_t
Log levels supported via the logger functions in jm_callbacks.
jm_log_level_enu_t log_level
Logging level.
jm_malloc_f malloc
Allocate non-initialized memory.
jm_voidp context
Arbitrary context pointer passed to the logger function.
const char * jm_string
A constant string.
The callbacks struct is sent to all the modules in the library.
jm_realloc_f realloc
Re-allocate memory.
jm_status_enu_t
Return status codes.
jm_free_f free
Free-allocated memory.
jm_logger_f logger
Logging callback.
int main(int argc, char *argv[])
Zip test. Tests the fmi_zip_zip function by compressing some file.
void importlogger(jm_callbacks *c, jm_string module, jm_log_level_enu_t log_level, jm_string message)