Cleanup code. Remove VLAs. Support c89.
[OptFetch.git] / optfetch.h
blob4979001ba814b89accc2ebbc725b9b866dfd1444
1 struct opttype {
2 char *longname;
3 char shortname;
4 char type;
5 void *outdata;
6 };
8 #define OPTTYPE_BOOL 1
9 #define OPTTYPE_CHAR 2
10 #define OPTTYPE_SHORT 3
11 #define OPTTYPE_USHORT 4
12 #define OPTTYPE_INT 5
13 #define OPTTYPE_UINT 6
14 #define OPTTYPE_LONG 7
15 #define OPTTYPE_ULONG 8
16 #define OPTTYPE_LONGLONG 9
17 #define OPTTYPE_ULONGLONG 10
18 #define OPTTYPE_FLOAT 11
19 #define OPTTYPE_DOUBLE 12
20 #define OPTTYPE_LONGDOUBLE 13
21 #define OPTTYPE_STRING 14
23 void fetchopts(int *argc, char ***argv, struct opttype *opts);