-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_short_opt.h
More file actions
64 lines (58 loc) · 1.05 KB
/
parse_short_opt.h
File metadata and controls
64 lines (58 loc) · 1.05 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
/*
** parse_short_opt.h for parse_arg in /home/leroy_v/Perso/parse_arg
**
** Made by vincent leroy
** Login <leroy_v@epitech.eu>
**
** Started on Mon Aug 18 19:50:39 2014 vincent leroy
** Last update Thu Aug 21 14:00:41 2014 vincent leroy
*/
#ifndef PARSE_SHORT_OPT_H_
# define PARSE_SHORT_OPT_H_
/*
* h : NO_ARG
* a : OPTIONAL_ARG
* l : NO_ARG
*
* -hal argument
*
* 'argument' must be pass to 'a' option
*
* h : NO_ARG
* a : OPTIONAL_ARG
* l : REQUIRED_ARG
*
* -lah argument
*
* 'argument' must be pass to 'l' option
*
* h : NO_ARG
* a : OPTIONAL_ARG
* l : OPTIONAL_ARG
*
* -lah argument
*
* 'argument' must be pass to 'a' option
*
* h : NO_ARG
* l : OPTIONAL_ARG
*
* -l -- -h
*
* '-h' must be pass to 'l' option
*
* h : NO_ARG
* l : NO_ARG
*
* -l -- -h
*
* '-h' is not an option in this case
*/
#include "parse_arg.h"
struct opts_arg
{
const opts *opt;
const char *arg;
};
int parse_short_opt(const char *short_opt, const char **next_opt, const opts options[], opt_error *error);
#endif /* !PARSE_SHORT_OPT_H_ */