A minimal usage example.
#include <stdio.h>
#include <stdlib.h>
static void print_message_from_library(
const char *message,
splt_message_type type,
void *data);
static void print_split_filename(const char *filename, void *data);
int main(int argc, char *argv[])
{
if (argc != 2)
{
fprintf(stderr, "Please provide the input file to be split as the first argument.\n");
fflush(stderr);
return EXIT_FAILURE;
}
print_confirmation_and_exit_if_error(state, error);
print_confirmation_and_exit_if_error(state, error);
return EXIT_SUCCESS;
}
{
if (!message)
{
return;
}
if (error < 0)
{
fprintf(stderr, "%s\n", message);
fflush(stderr);
exit(1);
}
else
{
fprintf(stdout, "%s\n", message);
fflush(stdout);
}
free(message);
}
static void print_message_from_library(
const char *message,
splt_message_type type,
void *data)
{
{
fprintf(stdout, message);
fflush(stdout);
return;
}
fprintf(stderr, message);
fflush(stderr);
}
static void print_split_filename(const char *filename, void *data)
{
fprintf(stdout, " %s created.\n", filename);
fflush(stdout);
}