summaryrefslogtreecommitdiff
path: root/lib/args.h
blob: 0b89fca25caa7e430bc6639ccf1fcda2dc042207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef ARGS_H
#define ARGS_H

#define UNUSED(x) (void)(x)
#define ARG_UNUSED  0
#define ARG_USED    1
#define ARG_IGNORE  2
#define ARG_INVALID 3

void check_arg (char* arg);

void global_help(void (*help)(void));

void parse_help (int argc, char** argv, void (*help)(void));

int parse_args (int argc, char** argv, void (*help)(void), int (*short_arg)(char, char*), int (*long_arg)(char*, char*));

#endif