home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- #ifndef _WORDEXP_H
- #define _WORDEXP_H
- #ident "@(#)sgs-head:common/head/wordexp.h 1.4"
-
- #ifndef _SIZE_T
- # define _SIZE_T
- typedef unsigned int size_t;
- #endif
-
- #define WRDE_APPEND 0001 /* append pathnames */
- #define WRDE_DOOFFS 0002 /* specify how many null pointers to add */
- #define WRDE_NOCMD 0004 /* fail if command substitution is requested */
- #define WRDE_REUSE 0010 /* reuse old wordexp */
- #define WRDE_SHOWERR 0020 /* do not redirect stderr to /dev/null */
- #define WRDE_UNDEF 0040 /* error if shell variable is unset */
-
- #define WRDE_NOSYS (-1) /* unsuported */
- #define WRDE_BADCHAR (-2) /* special char in bad context */
- #define WRDE_BADVAL (-3) /* reference to unset shell variable */
- #define WRDE_CMDSUB (-4) /* command substitution requested */
- #define WRDE_NOSPACE (-5) /* an attempt to allocate memory failed */
- #define WRDE_SYNTAX (-6) /* shell syntax error */
- #define WRDE_ERROR (-7) /* other errors; errno is probably set */
-
- typedef struct
- {
- size_t we_wordc; /* count of paths matched by words */
- char **we_wordv; /* pointer to list of expanded words */
- size_t we_offs; /* slots to reserve at we_wordv[] start */
- } wordexp_t;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern int wordexp(const char *,wordexp_t *, int);
- extern void wordfree(wordexp_t *);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /*_WORDEXP_H*/
-