-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.h
More file actions
31 lines (28 loc) · 771 Bytes
/
options.h
File metadata and controls
31 lines (28 loc) · 771 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
/* this is a tiny bycicle to replace GNU GETOPT */
enum options {
CNVL_OPT_NOOPTS,
CNVL_OPT_RESIZE,
CNVL_OPT_BROKEN,
CNVL_OPT_AUTOORIENT,
CNVL_OPT_IGNORE_TWO,
CNVL_OPT_VERSION,
CNVL_OPT_IGNORE
};
typedef struct args_used {
char *argnam;
enum options opt_num;
} args_used;
args_used option[] = {
// having trailing and slashing zero is ambigious, choose one
{"-noopts", CNVL_OPT_IGNORE},
{"-resize", CNVL_OPT_RESIZE},
{"-thumbnail", CNVL_OPT_RESIZE},
{"-sample", CNVL_OPT_RESIZE},
{"registry:", CNVL_OPT_IGNORE}, // to be replaced with -define and ignore_two
{"-gravity", CNVL_OPT_IGNORE_TWO},
{"-extent", CNVL_OPT_IGNORE_TWO},
{"-broken", CNVL_OPT_BROKEN},
{"-auto-orient", CNVL_OPT_AUTOORIENT},
{"-version", CNVL_OPT_VERSION},
{"unused", CNVL_OPT_NOOPTS}
};