2024-08-10 18:44:04 +00:00
|
|
|
#ifndef ARGS_H
|
|
|
|
#define ARGS_H
|
2024-12-08 13:06:50 +00:00
|
|
|
#include "types.h"
|
|
|
|
#include "config.h"
|
2024-08-10 18:44:04 +00:00
|
|
|
|
2024-12-06 15:25:43 +00:00
|
|
|
void print_version(void);
|
2024-08-10 18:44:04 +00:00
|
|
|
void print_usage(const char *argv0);
|
2024-12-08 13:06:50 +00:00
|
|
|
int yparse_args(int argc, char *argv[]);
|
|
|
|
size_t print_config(char *buffer, size_t buffer_size);
|
|
|
|
|
|
|
|
// Initializes configuration storage.
|
|
|
|
int init_config(struct config_t *config);
|
|
|
|
// Allocates and initializes configuration section.
|
|
|
|
int init_section_config(struct section_config_t **section, struct section_config_t *prev);
|
|
|
|
// Frees configuration section
|
|
|
|
void free_config_section(struct section_config_t *config);
|
|
|
|
// Frees sections under config
|
|
|
|
void free_config(struct config_t config);
|
2024-08-10 18:44:04 +00:00
|
|
|
|
2024-08-11 18:43:32 +00:00
|
|
|
/* Prints starting messages */
|
2024-12-06 15:25:43 +00:00
|
|
|
void print_welcome(void);
|
2024-08-11 18:43:32 +00:00
|
|
|
|
2024-08-10 18:44:04 +00:00
|
|
|
#endif /* ARGS_H */
|