Mercurial > hg > octave-lojdl > gnulib-hg
annotate lib/argv-iter.h @ 16229:daac1ca4c436
inttypes: Modernize.
* lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
* modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
(Makefile.am): Update inttypes.h rule.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 05 Jan 2012 18:42:08 +0100 |
parents | 8250f2777afc |
children | e542fd46ad6f |
rev | line source |
---|---|
11708 | 1 /* Iterate over arguments from argv or --files0-from=FILE |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
16128
diff
changeset
|
2 Copyright (C) 2008-2012 Free Software Foundation, Inc. |
11708 | 3 |
4 This program is free software: you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation, either version 3 of the License, or | |
7 (at your option) any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
16 | |
17 #include <stdio.h> | |
18 #include <stdbool.h> | |
19 | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
20 /* Definition of _GL_ARG_NONNULL. */ |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
21 #include "arg-nonnull.h" |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
22 |
11708 | 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 struct argv_iterator *argv_iter_init_argv (char **argv) | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
34 _GL_ARG_NONNULL ((1)); |
11708 | 35 struct argv_iterator *argv_iter_init_stream (FILE *fp) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
36 _GL_ARG_NONNULL ((1)); |
11708 | 37 char *argv_iter (struct argv_iterator *, enum argv_iter_err *) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
38 _GL_ARG_NONNULL ((1, 2)); |
11708 | 39 size_t argv_iter_n_args (struct argv_iterator const *) |
16128
6beadb731202
mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
40 _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1)); |
11708 | 41 void argv_iter_free (struct argv_iterator *) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
11708
diff
changeset
|
42 _GL_ARG_NONNULL ((1)); |