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