Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _WORDEXP_H |
| 2 | #define _WORDEXP_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Rich Felker | 455f968 | 2012-09-08 17:14:52 -0400 | [diff] [blame] | 8 | #include <features.h> |
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 9 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 10 | #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 | |
| 21 | typedef struct |
| 22 | { |
| 23 | size_t we_wordc; |
Rich Felker | 5316d08 | 2011-02-19 12:44:36 -0500 | [diff] [blame] | 24 | char **we_wordv; |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 25 | 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 Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 35 | int wordexp (const char *__restrict, wordexp_t *__restrict, int); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 36 | void wordfree (wordexp_t *); |
| 37 | |
| 38 | #ifdef __cplusplus |
| 39 | } |
| 40 | #endif |
| 41 | |
| 42 | #endif |