20 #include <FMI/fmi_zip_zip.h> 24 printf(
"module = %s, log level = %d: %s\n", module, log_level, message);
27 int main(
int argc,
char *argv[])
32 const char** files_to_zip;
33 int i, n_files_to_zip;
38 callbacks.
free = free;
45 printf(
"Not enought input arguments\n");
49 output_name = argv[1];
50 files_to_zip = (
const char**)&argv[2];
51 n_files_to_zip = argc - 2;
53 printf(
"Will compress following files: \n");
54 for (i = 0; i < n_files_to_zip; i++) {
55 printf(
"\t%s\n", files_to_zip[i]);
57 status = fmi_zip_zip(output_name, n_files_to_zip, files_to_zip, &callbacks);
60 printf(
"Failed to compress the file\n");
63 printf(
"Succesfully compressed the file\n");
jm_calloc_f calloc
Allocate zero initialized memory.
static void importlogger(jm_callbacks *c, jm_string module, jm_log_level_enu_t log_level, jm_string message)
jm_log_level_enu_t
Log levels supported via the logger functions in jm_callbacks.
Errors that may be not critical for some FMUs.
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.
int main(int argc, char *argv[])
jm_free_f free
Free-allocated memory.
jm_logger_f logger
Logging callback.