sci/include/cli.h

29 lines
619 B
C
Raw Normal View History

2024-08-02 19:11:12 +02:00
#ifndef SCI_CLI_H
#define SCI_CLI_H
#include <stdio.h>
#include "optional.h"
2024-08-03 09:21:21 +02:00
typedef struct {
optional_str config_file;
int executors;
2024-08-02 19:11:12 +02:00
int verbosity;
bool help;
bool version;
2024-08-03 09:21:21 +02:00
bool use_colors;
optional_str log_file;
} cli_options;
2024-08-02 19:11:12 +02:00
// Construct a new cli_options struct instance.
2024-08-03 09:21:21 +02:00
cli_options new_options();
2024-08-02 19:11:12 +02:00
// Delete a cli_options struct instance.
void destroy_options(cli_options v);
2024-08-02 19:11:12 +02:00
// 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.
2024-08-03 09:21:21 +02:00
cli_options parse(int argc, char** argv);
2024-08-02 19:11:12 +02:00
#endif