evo-crypter
 
Loading...
Searching...
No Matches
mod.h
Go to the documentation of this file.
1
6#ifndef EVO_CONFIG_MOD_H
7#define EVO_CONFIG_MOD_H
8
9#include <ctype.h> // isupper, tolower, isdigit
10#include <setjmp.h> // jmp_buf
11#include <stdarg.h> // va_list, va_start, va_end
12#include <stdbool.h> // bool
13#include <stddef.h> // size_t for snprintf, strncpy
14#include <stdio.h> // stderr, snprintf, fprintf, perror
15#include <stdlib.h> // free, malloc
16#include <string.h> // strncpy, strdup
17
24typedef struct {
25 char* input_file;
27 int threads;
28 bool decrypt;
29 bool error;
30 bool help;
31} Config;
32
47Config initialize_config(int argc, char* argv[]);
48
57void free_config(Config* config);
58
59#endif // EVO_CONFIG_MOD_H
Config initialize_config(int argc, char *argv[])
Initializes the configuration, validates it, and sets default values.
Definition mod.c:5
void free_config(Config *config)
Frees the dynamically allocated memory in the Config struct.
Definition mod.c:49
Represents the program's configuration settings.
Definition mod.h:24
bool help
Definition mod.h:30
char * input_file
Definition mod.h:25
bool decrypt
Definition mod.h:28
bool error
Definition mod.h:29
char * generations
Definition mod.h:26
int threads
Definition mod.h:27