-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.h
48 lines (41 loc) · 1.37 KB
/
init.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef INIT_H
#define INIT_H
#include "args.h"
#include "utils.h" // logging
#include <stdio.h>
#include <errno.h> // errno
#include <limits.h> // UINT32_MAX
#include <getopt.h>
#ifndef THREAD_NUMBER
#define THREAD_NUMBER 8
#endif
#ifndef VERBOSE
#define VERBOSE false
#endif
#ifndef PREFIX
#define PREFIX "gc"
#endif
#ifndef COMPRESSION_RATIO
#define COMPRESSION_RATIO 4
#endif
/**
* @brief Parses command-line arguments.
*
* This function processes the command-line arguments passed to
* the program and populates the genome_arguments and program_arguments
* structures based on the provided options. It validates the input
* and handles any errors, potentially displaying usage information.
*
* @param argc The number of command-line arguments.
* @param argv An array of command-line argument strings.
* @param genome_arguments A pointer to array of gargs structures to be filled
* with genome-specific arguments based on
* parsed command-line options.
* @param program_arguments A pointer to pargs structure that stores global
* program settings and parameters.
*
* @note This function may exit the program if the provided arguments
* are invalid or if there are missing required options.
*/
void parse(int argc, char **argv, struct gargs **genome_arguments, struct pargs *program_arguments);
#endif