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 | |
| 8 | #define __NEED_size_t |
| 9 | |
| 10 | #include <bits/alltypes.h> |
| 11 | |
| 12 | #define WRDE_DOOFFS 1 |
| 13 | #define WRDE_APPEND 2 |
| 14 | #define WRDE_NOCMD 4 |
| 15 | #define WRDE_REUSE 8 |
| 16 | #define WRDE_SHOWERR 16 |
| 17 | #define WRDE_UNDEF 32 |
| 18 | |
| 19 | typedef struct |
| 20 | { |
| 21 | size_t we_wordc; |
Rich Felker | 5316d08 | 2011-02-19 12:44:36 -0500 | [diff] [blame^] | 22 | char **we_wordv; |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 23 | size_t we_offs; |
| 24 | } wordexp_t; |
| 25 | |
| 26 | #define WRDE_NOSYS -1 |
| 27 | #define WRDE_NOSPACE 1 |
| 28 | #define WRDE_BADCHAR 2 |
| 29 | #define WRDE_BADVAL 3 |
| 30 | #define WRDE_CMDSUB 4 |
| 31 | #define WRDE_SYNTAX 5 |
| 32 | |
| 33 | int wordexp (const char *, wordexp_t *, int); |
| 34 | void wordfree (wordexp_t *); |
| 35 | |
| 36 | #ifdef __cplusplus |
| 37 | } |
| 38 | #endif |
| 39 | |
| 40 | #endif |