source: trunk/libs/newlib/src/newlib/libc/sys/linux/include/wordexp.h

Last change on this file was 444, checked in by satin@…, 8 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.3 KB
Line 
1/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
2 *
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
6
7#include <sys/types.h>
8
9struct _wordexp_t
10{
11 size_t we_wordc; /* Count of words matched by words. */
12 char **we_wordv; /* Pointer to list of expanded words. */
13 size_t we_offs; /* Slots to reserve at the beginning of we_wordv. */
14};
15
16typedef struct _wordexp_t wordexp_t;
17
18#define WRDE_DOOFFS 0x0001 /* Use we_offs. */
19#define WRDE_APPEND 0x0002 /* Append to output from previous call. */
20#define WRDE_NOCMD 0x0004 /* Don't perform command substitution. */
21#define WRDE_REUSE 0x0008 /* pwordexp points to a wordexp_t struct returned from
22 a previous successful call to wordexp. */
23#define WRDE_SHOWERR 0x0010 /* Print error messages to stderr. */
24#define WRDE_UNDEF 0x0020 /* Report attempt to expand undefined shell variable. */
25
26enum {
27 WRDE_SUCCESS,
28 WRDE_NOSPACE,
29 WRDE_BADCHAR,
30 WRDE_BADVAL,
31 WRDE_CMDSUB,
32 WRDE_SYNTAX,
33 WRDE_NOSYS
34};
35
36/* Note: This implementation of wordexp requires a version of bash
37 that supports the --wordexp and --protected arguments to be present
38 on the system. It does not support the WRDE_UNDEF flag. */
39int wordexp(const char *, wordexp_t *, int);
40void wordfree(wordexp_t *);
Note: See TracBrowser for help on using the repository browser.