forked from misc0110/pdf-webslides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.h
24 lines (19 loc) · 635 Bytes
/
cli.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
#ifndef GETOPT_HELPER_H
#define GETOPT_HELPER_H
#include <getopt.h>
#include "webslides.h"
// ---------------------------------------------------------------------------
typedef struct {
const char* name;
int has_arg;
int* flag;
int val;
const char* description;
const char* arg_name;
} getopt_arg_t;
// ---------------------------------------------------------------------------
struct option* getopt_get_long_options(getopt_arg_t* opt);
void show_usage(char* binary, getopt_arg_t* cli_options);
int parse_cli_options(Options* options, getopt_arg_t* cli_options, int argc,
char* argv[]);
#endif