blob: d12081e80130ca235315fed808fe2d267b7c723c [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _WORDEXP_H
2#define _WORDEXP_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
Rich Felker455f9682012-09-08 17:14:52 -04008#include <features.h>
Rich Felker400c5e52012-09-06 22:44:55 -04009
Rich Felker0b44a032011-02-12 00:22:29 -050010#define __NEED_size_t
11
12#include <bits/alltypes.h>
13
14#define WRDE_DOOFFS 1
15#define WRDE_APPEND 2
16#define WRDE_NOCMD 4
17#define WRDE_REUSE 8
18#define WRDE_SHOWERR 16
19#define WRDE_UNDEF 32
20
21typedef struct
22{
23 size_t we_wordc;
Rich Felker5316d082011-02-19 12:44:36 -050024 char **we_wordv;
Rich Felker0b44a032011-02-12 00:22:29 -050025 size_t we_offs;
26} wordexp_t;
27
28#define WRDE_NOSYS -1
29#define WRDE_NOSPACE 1
30#define WRDE_BADCHAR 2
31#define WRDE_BADVAL 3
32#define WRDE_CMDSUB 4
33#define WRDE_SYNTAX 5
34
Rich Felker400c5e52012-09-06 22:44:55 -040035int wordexp (const char *__restrict, wordexp_t *__restrict, int);
Rich Felker0b44a032011-02-12 00:22:29 -050036void wordfree (wordexp_t *);
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif