Debian Codegraph @

share/libc/wordexp.h

raw
1 /**************************************************************************/
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /**************************************************************************/
22
23 #ifndef __FC_WORDEXP
24 #define __FC_WORDEXP
25 #include "features.h"
26 __PUSH_FC_STDLIB
27 #include "__fc_define_size_t.h"
28
29 __BEGIN_DECLS
30
31 typedef struct __fc_wordexp_t {
32 size_t we_wordc;
33 char **we_wordv;
34 size_t we_offs;
35 } wordexp_t;
36
37 #define WRDE_DOOFFS (1 << 0)
38 #define WRDE_APPEND (1 << 1)
39 #define WRDE_NOCMD (1 << 2)
40 #define WRDE_REUSE (1 << 3)
41 #define WRDE_SHOWERR (1 << 4)
42 #define WRDE_UNDEF (1 << 5)
43
44 #define WRDE_NOSPACE 1
45 #define WRDE_BADCHAR 2
46 #define WRDE_BADVAL 3
47 #define WRDE_CMDSUB 4
48 #define WRDE_SYNTAX 5
49
50 extern int wordexp(const char *restrict words, wordexp_t *restrict pwordexp,
51 int flags);
52
53 extern void wordfree(wordexp_t *pwordexp);
54
55 __END_DECLS
56
57 __POP_FC_STDLIB
58 #endif