feat: add simple logging library

This commit is contained in:
2024-08-03 09:21:21 +02:00
parent 6c3ad9ffa5
commit 9d1408c174
8 changed files with 167 additions and 24 deletions
+7 -5
View File
@@ -3,23 +3,25 @@
#include <stdio.h>
#include "optional.h"
struct cli_options {
typedef struct {
optional_str file;
int verbosity;
bool help;
bool version;
};
bool use_colors;
optional_str log_file;
} cli_options;
// Construct a new cli_options struct instance.
struct cli_options new_options();
cli_options new_options();
// Delete a cli_options struct instance.
void free_options(struct cli_options v);
void free_options(cli_options v);
// Print the help message.
void print_help(FILE * out, char* prog_name);
// Parse the command line arguments and give a new cli_options struct instance.
struct cli_options parse(int argc, char** argv);
cli_options parse(int argc, char** argv);
#endif