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

glob.h.0p (3433B)


  1. '\" et
  2. .TH glob.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. glob.h
  12. \(em pathname pattern-matching types
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <glob.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <glob.h>
  21. header shall define the structures and symbolic constants used by the
  22. \fIglob\fR()
  23. function.
  24. .P
  25. The
  26. .IR <glob.h>
  27. header shall define the
  28. .BR glob_t
  29. structure type, which shall include at least the following members:
  30. .sp
  31. .RS 4
  32. .nf
  33. size_t gl_pathc \fRCount of paths matched by \fIpattern.\fR
  34. char **gl_pathv \fRPointer to a list of matched pathnames.\fR
  35. size_t gl_offs \fRSlots to reserve at the beginning of \fIgl_pathv.\fR
  36. .fi
  37. .P
  38. .RE
  39. .P
  40. The
  41. .IR <glob.h>
  42. header shall define the
  43. .BR size_t
  44. type as described in
  45. .IR <sys/types.h> .
  46. .P
  47. The
  48. .IR <glob.h>
  49. header shall define the following symbolic constants as values for the
  50. .IR flags
  51. argument:
  52. .IP GLOB_APPEND 14
  53. Append generated pathnames to those previously obtained.
  54. .IP GLOB_DOOFFS 14
  55. Specify how many null pointers to add to the beginning of
  56. .IR gl_pathv .
  57. .IP GLOB_ERR 14
  58. Cause
  59. \fIglob\fR()
  60. to return on error.
  61. .IP GLOB_MARK 14
  62. Each pathname that is a directory that matches
  63. .IR pattern
  64. has a
  65. <slash>
  66. appended.
  67. .IP GLOB_NOCHECK 14
  68. If
  69. .IR pattern
  70. does not match any pathname, then return a list consisting of only
  71. .IR pattern .
  72. .IP GLOB_NOESCAPE 14
  73. Disable backslash escaping.
  74. .IP GLOB_NOSORT 14
  75. Do not sort the pathnames returned.
  76. .P
  77. The
  78. .IR <glob.h>
  79. header shall define the following symbolic constants as error
  80. return values:
  81. .IP GLOB_ABORTED 14
  82. The scan was stopped because GLOB_ERR was set or (*\fIerrfunc\fP)(\|)
  83. returned non-zero.
  84. .IP GLOB_NOMATCH 14
  85. The pattern does not match any existing pathname, and GLOB_NOCHECK was
  86. not set in
  87. .IR flags .
  88. .IP GLOB_NOSPACE 14
  89. An attempt to allocate memory failed.
  90. .P
  91. The following shall be declared as functions and may also be defined
  92. as macros. Function prototypes shall be provided.
  93. .sp
  94. .RS 4
  95. .nf
  96. int glob(const char *restrict, int, int(*)(const char *, int),
  97. glob_t *restrict);
  98. void globfree(glob_t *);
  99. .fi
  100. .P
  101. .RE
  102. .LP
  103. .IR "The following sections are informative."
  104. .SH "APPLICATION USAGE"
  105. None.
  106. .SH RATIONALE
  107. None.
  108. .SH "FUTURE DIRECTIONS"
  109. None.
  110. .SH "SEE ALSO"
  111. .IR "\fB<sys_types.h>\fP"
  112. .P
  113. The System Interfaces volume of POSIX.1\(hy2017,
  114. .IR "\fIglob\fR\^(\|)"
  115. .\"
  116. .SH COPYRIGHT
  117. Portions of this text are reprinted and reproduced in electronic form
  118. from IEEE Std 1003.1-2017, Standard for Information Technology
  119. -- Portable Operating System Interface (POSIX), The Open Group Base
  120. Specifications Issue 7, 2018 Edition,
  121. Copyright (C) 2018 by the Institute of
  122. Electrical and Electronics Engineers, Inc and The Open Group.
  123. In the event of any discrepancy between this version and the original IEEE and
  124. The Open Group Standard, the original IEEE and The Open Group Standard
  125. is the referee document. The original Standard can be obtained online at
  126. http://www.opengroup.org/unix/online.html .
  127. .PP
  128. Any typographical or formatting errors that appear
  129. in this page are most likely
  130. to have been introduced during the conversion of the source files to
  131. man page format. To report such errors, see
  132. https://www.kernel.org/doc/man-pages/reporting_bugs.html .