home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / include / wordexp.h < prev   
Encoding:
C/C++ Source or Header  |  1998-08-19  |  1.8 KB  |  54 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ifndef _WORDEXP_H
  12. #define _WORDEXP_H
  13. #ident    "@(#)sgs-head:common/head/wordexp.h    1.4"
  14.  
  15. #ifndef _SIZE_T
  16. #   define _SIZE_T
  17.     typedef unsigned int    size_t;
  18. #endif
  19.  
  20. #define WRDE_APPEND    0001    /* append pathnames */
  21. #define WRDE_DOOFFS    0002    /* specify how many null pointers to add */
  22. #define WRDE_NOCMD    0004    /* fail if command substitution is requested */
  23. #define WRDE_REUSE    0010    /* reuse old wordexp */
  24. #define WRDE_SHOWERR    0020    /* do not redirect stderr to /dev/null */
  25. #define WRDE_UNDEF    0040    /* error if shell variable is unset */
  26.  
  27. #define WRDE_NOSYS    (-1)    /* unsuported */
  28. #define WRDE_BADCHAR    (-2)    /* special char in bad context */
  29. #define WRDE_BADVAL    (-3)    /* reference to unset shell variable */
  30. #define WRDE_CMDSUB    (-4)    /* command substitution requested */
  31. #define WRDE_NOSPACE    (-5)    /* an attempt to allocate memory failed */
  32. #define WRDE_SYNTAX    (-6)    /* shell syntax error */
  33. #define WRDE_ERROR    (-7)    /* other errors; errno is probably set */
  34.  
  35. typedef struct
  36. {
  37.     size_t    we_wordc;    /* count of paths matched by words */
  38.     char    **we_wordv;    /* pointer to list of expanded words */
  39.     size_t    we_offs;    /* slots to reserve at we_wordv[] start */
  40. } wordexp_t;
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. extern int    wordexp(const char *,wordexp_t *, int);
  47. extern void    wordfree(wordexp_t *);
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52.  
  53. #endif /*_WORDEXP_H*/
  54.