1 /* $Id: glob.h,v 1.4 2002/10/29 04:45:10 rex Exp $
6 * pathname pattern-matching types. Conforming to the Single UNIX(r)
7 * Specification Version 2, System Interface & Headers Issue 5
9 * This file is part of the ReactOS Operating System.
12 * Created by KJK::Hyperion <noog@libero.it>
14 * THIS SOFTWARE IS NOT COPYRIGHTED
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 #ifndef __GLOB_H_INCLUDED__
26 #define __GLOB_H_INCLUDED__
33 typedef struct __tagglob_t
35 size_t gl_pathc
; /* count of paths matched by pattern */
36 char **gl_pathv
; /* pointer to a list of matched pathnames */
37 size_t gl_offs
; /* slots to reserve at the beginning of gl_pathv */
41 /* Values for the flags argument */
42 #define GLOB_APPEND (0x00000001) /* Append generated pathnames to \
43 those previously obtained. */
44 #define GLOB_DOOFFS (0x00000002) /* Specify how many null pointers to \
45 add to the beginning of */
46 #define GLOB_ERR (0x00000004) /* Cause glob() to return on error. */
47 #define GLOB_MARK (0x00000008) /* Each pathname that is a directory \
48 that matches pattern has a slash \
50 #define GLOB_NOCHECK (0x00000010) /* If pattern does not match any pathname, \
51 then return a list consisting of only \
53 #define GLOB_NOESCAPE (0x00000020) /* Disable backslash escaping. */
54 #define GLOB_NOSORT (0x00000040) /* Do not sort the pathnames returned. */
56 /* Error return values */
57 #define GLOB_ABORTED (-1) /* The scan was stopped because GLOB_ERR was set \
58 or errfunc returned non-zero. */
59 #define GLOB_NOMATCH (-2) /* The pattern does not match any existing pathname, \
60 and GLOB_NOCHECK was not set in flags. */
61 #define GLOB_NOSPACE (-3) /* An attempt to allocate memory failed. */
62 #define GLOB_NOSYS (-4) /* The implementation does not support this function. */
65 int glob(const char *, int, int (*)(const char *, int), glob_t
*);
66 void globfree (glob_t
*);
70 #endif /* __GLOB_H_INCLUDED__ */