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
24
typedef
struct
{
25
char
*
input_file
;
26
char
*
generations
;
27
int
threads
;
28
bool
decrypt
;
29
bool
error
;
30
bool
help
;
31
}
Config
;
32
47
Config
initialize_config
(
int
argc,
char
* argv[]);
48
57
void
free_config
(
Config
* config);
58
59
#endif
// EVO_CONFIG_MOD_H
initialize_config
Config initialize_config(int argc, char *argv[])
Initializes the configuration, validates it, and sets default values.
Definition
mod.c:5
free_config
void free_config(Config *config)
Frees the dynamically allocated memory in the Config struct.
Definition
mod.c:49
Config
Represents the program's configuration settings.
Definition
mod.h:24
Config::help
bool help
Definition
mod.h:30
Config::input_file
char * input_file
Definition
mod.h:25
Config::decrypt
bool decrypt
Definition
mod.h:28
Config::error
bool error
Definition
mod.h:29
Config::generations
char * generations
Definition
mod.h:26
Config::threads
int threads
Definition
mod.h:27
src
config
mod.h
Generated by
1.9.8