aboutsummaryrefslogtreecommitdiff
path: root/include/glob.h
diff options
context:
space:
mode:
authorJonathan Lemon <jlemon@FreeBSD.org>2001-03-19 19:10:06 +0000
committerJonathan Lemon <jlemon@FreeBSD.org>2001-03-19 19:10:06 +0000
commitbae8632f82abfc086afbc1ad186b41e40f8d9c60 (patch)
tree3ead2fda29eb28b2a727ccf4308d7ee4e1352b2a /include/glob.h
parentc534fd78eb00df59ec2d39540e088d1fdfcc31d8 (diff)
downloadsrc-bae8632f82abfc086afbc1ad186b41e40f8d9c60.tar.gz
src-bae8632f82abfc086afbc1ad186b41e40f8d9c60.zip
Introduce the GLOB_MAXPATH flag, which allows the user to limit the
number of paths which glob(3) will return. Remove the hardcoded limit from the last commit, which restores the previous unbounded behavior. Document the new flag in the manual page.
Notes
Notes: svn path=/head/; revision=74469
Diffstat (limited to 'include/glob.h')
-rw-r--r--include/glob.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/glob.h b/include/glob.h
index 34da03a0c91b..7b74d33afd5a 100644
--- a/include/glob.h
+++ b/include/glob.h
@@ -34,6 +34,7 @@
* SUCH DAMAGE.
*
* @(#)glob.h 8.1 (Berkeley) 6/2/93
+ * $FreeBSD$
*/
#ifndef _GLOB_H_
@@ -76,9 +77,11 @@ typedef struct {
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
+#define GLOB_MAXPATH 0x1000 /* limit number of returned paths */
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
#define GLOB_ABEND (-2) /* Unignored error. */
+#define GLOB_LIMIT (-3) /* Path limit was hit. */
__BEGIN_DECLS
int glob __P((const char *, int, int (*)(const char *, int), glob_t *));