-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargs.h
More file actions
70 lines (60 loc) · 3.03 KB
/
args.h
File metadata and controls
70 lines (60 loc) · 3.03 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/****************************************************************************
* ___ ____ ___ *
* / _ \| _ \ / __\ *
* | | | | |_| | |___ ___ *
* | |_| | /| |_ | __| *
* | _ | |\ \| |_| |__ | *
* |_| |_|_| \_|\___/|___| Command line parser *
* =========================================== *
* Copyright (C) 2004 Jiri Osoba <osoba@emai.cz> *
* *
* This program is free software; you can redistribute it *
* and/or modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; *
* either version 2 of the License, or (at your option) any *
* later version. *
* *
* This program is distributed in the hope that it will be *
* useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR *
* PURPOSE. See the GNU General Public License for more *
* details. *
*
* You should have received a copy of the GNU General Public *
* License along with this program; if not, write to the Free *
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA *
* 02139, USA. *
* *
****************************************************************************/
/****************************************************************************
* A R G S . H *
****************************************************************************/
#ifndef __ARGS_H__
#define __ARGS_H__
#define ARGS_NONE 0
#define ARGS_SWITCH 1
#define ARGS_CHOOSE 2
#define ARGS_OPTCHOOSE 3
#define ARGS_INTEGER 4
#define ARGS_OPTINTEGER 5
#define ARGS_FLOAT 6
#define ARGS_OPTFLOAT 7
#define ARGS_STRING 8
#define ARGS_MULTISTRING 9
#define ARGS_FILE 10
#define ARGS_PRESET 11
#define ARGS_PRESETCHOOSE 12
typedef struct {
int type;
char *option;
char *param;
void *value;
float add_value;
char *help;
} ARGS;
void args_print_help(const ARGS * args);
int args_parse_args(int argc, char **argv, const ARGS * args, char *separators);
const char *args_version(void);
const char *args_date(void);
const char *args_copyright(void);
#endif