logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

wordexp.h.0p (3811B)


  1. '\" et
  2. .TH wordexp.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. wordexp.h
  12. \(em word-expansion types
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <wordexp.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <wordexp.h>
  21. header shall define the structures and symbolic constants used by the
  22. \fIwordexp\fR()
  23. and
  24. \fIwordfree\fR()
  25. functions.
  26. .P
  27. The
  28. .IR <wordexp.h>
  29. header shall define the
  30. .BR wordexp_t
  31. structure type, which shall include at least the following members:
  32. .sp
  33. .RS 4
  34. .nf
  35. size_t we_wordc \fRCount of words matched by \fIwords.\fR
  36. char **we_wordv \fRPointer to list of expanded words.\fR
  37. size_t we_offs \fRSlots to reserve at the beginning of \fIwe_wordv.\fR
  38. .fi
  39. .P
  40. .RE
  41. .P
  42. The
  43. .IR <wordexp.h>
  44. header shall define the following symbolic constants for use as flags
  45. for the
  46. \fIwordexp\fR()
  47. function:
  48. .IP WRDE_APPEND 14
  49. Append words to those previously generated.
  50. .IP WRDE_DOOFFS 14
  51. Number of null pointers to prepend to
  52. .IR we_wordv .
  53. .IP WRDE_NOCMD 14
  54. Fail if command substitution is requested.
  55. .IP WRDE_REUSE 14
  56. The
  57. .IR pwordexp
  58. argument was passed to a previous successful call to
  59. \fIwordexp\fR(),
  60. and has not been passed to
  61. \fIwordfree\fR().
  62. The result is the same as if the application had called
  63. \fIwordfree\fR()
  64. and then called
  65. \fIwordexp\fR()
  66. without WRDE_REUSE.
  67. .IP WRDE_SHOWERR 14
  68. Do not redirect
  69. .IR stderr
  70. to
  71. .BR /dev/null .
  72. .IP WRDE_UNDEF 14
  73. Report error on an attempt to expand an undefined shell variable.
  74. .P
  75. The
  76. .IR <wordexp.h>
  77. header shall define the following symbolic constants as error
  78. return values:
  79. .IP WRDE_BADCHAR 14
  80. One of the unquoted characters\(em\c
  81. <newline>,
  82. .BR '|' ,
  83. .BR '&' ,
  84. .BR ';' ,
  85. .BR '<' ,
  86. .BR '>' ,
  87. .BR '(' ,
  88. .BR ')' ,
  89. .BR '{' ,
  90. .BR '}' \(em\c
  91. appears in
  92. .IR words
  93. in an inappropriate context.
  94. .IP WRDE_BADVAL 14
  95. Reference to undefined shell variable when WRDE_UNDEF is set in
  96. .IR flags .
  97. .IP WRDE_CMDSUB 14
  98. Command substitution requested when WRDE_NOCMD was set in
  99. .IR flags .
  100. .IP WRDE_NOSPACE 14
  101. Attempt to allocate memory failed.
  102. .IP WRDE_SYNTAX 14
  103. Shell syntax error, such as unbalanced parentheses or unterminated string.
  104. .P
  105. The
  106. .IR <wordexp.h>
  107. header shall define the
  108. .BR size_t
  109. type as described in
  110. .IR <stddef.h> .
  111. .P
  112. The following shall be declared as functions and may also be defined as
  113. macros. Function prototypes shall be provided.
  114. .sp
  115. .RS 4
  116. .nf
  117. int wordexp(const char *restrict, wordexp_t *restrict, int);
  118. void wordfree(wordexp_t *);
  119. .fi
  120. .P
  121. .RE
  122. .LP
  123. .IR "The following sections are informative."
  124. .SH "APPLICATION USAGE"
  125. None.
  126. .SH RATIONALE
  127. None.
  128. .SH "FUTURE DIRECTIONS"
  129. None.
  130. .SH "SEE ALSO"
  131. .IR "\fB<stddef.h>\fP"
  132. .P
  133. The System Interfaces volume of POSIX.1\(hy2017,
  134. .IR "Section 2.6" ", " "Word Expansions"
  135. .\"
  136. .SH COPYRIGHT
  137. Portions of this text are reprinted and reproduced in electronic form
  138. from IEEE Std 1003.1-2017, Standard for Information Technology
  139. -- Portable Operating System Interface (POSIX), The Open Group Base
  140. Specifications Issue 7, 2018 Edition,
  141. Copyright (C) 2018 by the Institute of
  142. Electrical and Electronics Engineers, Inc and The Open Group.
  143. In the event of any discrepancy between this version and the original IEEE and
  144. The Open Group Standard, the original IEEE and The Open Group Standard
  145. is the referee document. The original Standard can be obtained online at
  146. http://www.opengroup.org/unix/online.html .
  147. .PP
  148. Any typographical or formatting errors that appear
  149. in this page are most likely
  150. to have been introduced during the conversion of the source files to
  151. man page format. To report such errors, see
  152. https://www.kernel.org/doc/man-pages/reporting_bugs.html .