-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.h
More file actions
36 lines (27 loc) · 681 Bytes
/
Copy pathoptions.h
File metadata and controls
36 lines (27 loc) · 681 Bytes
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
#ifndef TABLE_PRINTER_OPTIONS_H
#define TABLE_PRINTER_OPTIONS_H
#include "custom_string.h"
#include <stdio.h>
typedef struct {
char delimiter;
unsigned int flags;
FILE *stream;
FILE *out_stream;
} options_t;
typedef enum {
HEADER = 1 << 1,
COUNTER = 1 << 2,
COLORS = 1 << 3,
FRAME = 1 << 4,
ALIGN_RIGHT = 1 << 5,
FORCE = 1 << 6,
VERSION = 1 << 28,
HELP = 1 << 29,
UNKNOWN = 1 << 30,
} OPTION_FLAGS;
OPTION_FLAGS parse_argument(char *argument);
int check_color_capability();
options_t *parse_options(int argc, char *argv[]);
void print_help_menu();
void options_free(options_t *options);
#endif //TABLE_PRINTER_OPTIONS_H