1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <stdio.h>
18 #include <stdbool.h>
19
20
21 #include "arg-nonnull.h"
22
23 struct argv_iterator;
24
25 enum argv_iter_err
26 {
27 AI_ERR_OK = 1,
28 AI_ERR_EOF,
29 AI_ERR_MEM,
30 AI_ERR_READ
31 };
32
33 void argv_iter_free (struct argv_iterator *)
34 _GL_ARG_NONNULL ((1));
35
36 struct argv_iterator *argv_iter_init_argv (char **argv)
37 _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_DEALLOC (argv_iter_free, 1);
38 struct argv_iterator *argv_iter_init_stream (FILE *fp)
39 _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_DEALLOC (argv_iter_free, 1);
40 char *argv_iter (struct argv_iterator *, enum argv_iter_err *)
41 _GL_ARG_NONNULL ((1, 2));
42 size_t argv_iter_n_args (struct argv_iterator const *)
43 _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1));