fts(3) updates
[unix-history] / include / glob.h
index 4bc1320..cedabb2 100644 (file)
@@ -33,7 +33,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     @(#)glob.h      5.6 (Berkeley) 4/3/91
+ *     @(#)glob.h      5.8 (Berkeley) 12/2/92
  */
 
 #ifndef _GLOB_H_
  */
 
 #ifndef _GLOB_H_
@@ -45,20 +45,26 @@ typedef struct {
        int gl_offs;            /* reserved at beginning of gl_pathv */
        int gl_flags;           /* copy of flags parameter to glob() */
        int (*gl_errfunc)();    /* copy of errfunc parameter to glob() */
        int gl_offs;            /* reserved at beginning of gl_pathv */
        int gl_flags;           /* copy of flags parameter to glob() */
        int (*gl_errfunc)();    /* copy of errfunc parameter to glob() */
+       void *(*gl_opendir)();  /* alternate opendir() function for glob() */
+       struct dirent *(*gl_readdir)(); /* alternate readdir() function */
+       void (*gl_closedir)();  /* alternate closedir() function for glob() */
+       int (*gl_lstat)();      /* alternate lstat() function for glob() */
+       int (*gl_stat)();       /* alternate stat() function for glob() */
        char **gl_pathv;        /* list of paths matching pattern */
 } glob_t;
 
        char **gl_pathv;        /* list of paths matching pattern */
 } glob_t;
 
-#define        GLOB_APPEND     0x01    /* append to output from previous call */
-#define        GLOB_DOOFFS     0x02    /* use gl_offs */
-#define        GLOB_ERR        0x04    /* return on error */
-#ifndef _POSIX_SOURCE
-#define        GLOB_MAGCHAR    0x08    /* pattern had globbing characters */
-#endif
-#define        GLOB_MARK       0x10    /* append / to matching directories */
-#define        GLOB_NOCHECK    0x20    /* return pattern itself if nothing matches */
-#define        GLOB_NOSORT     0x40    /* don't sort */
+#define        GLOB_APPEND     0x001   /* append to output from previous call */
+#define        GLOB_DOOFFS     0x002   /* use gl_offs */
+#define        GLOB_ERR        0x004   /* return on error */
+#define        GLOB_MARK       0x008   /* append / to matching directories */
+#define        GLOB_NOCHECK    0x010   /* return pattern itself if nothing matches */
+#define        GLOB_NOSORT     0x020   /* don't sort */
+
 #ifndef _POSIX_SOURCE
 #ifndef _POSIX_SOURCE
-#define        GLOB_QUOTE      0x80    /* quote special chars with \ */
+#define        GLOB_MAGCHAR    0x040   /* pattern had globbing characters */
+#define        GLOB_NOMAGIC    0x080   /* GLOB_NOCHECK without magic chars (csh) */
+#define        GLOB_QUOTE      0x100   /* quote special chars with \ */
+#define        GLOB_ALTDIRFUNC 0x200   /* use alternately specified directory funcs */
 #endif
 
 #define        GLOB_NOSPACE    (-1)    /* malloc call failed */
 #endif
 
 #define        GLOB_NOSPACE    (-1)    /* malloc call failed */
@@ -67,8 +73,8 @@ typedef struct {
 #include <sys/cdefs.h>
 
 __BEGIN_DECLS
 #include <sys/cdefs.h>
 
 __BEGIN_DECLS
-int glob __P((const char *, int, int (*)(char *, int), glob_t *));
-void globfree __P((glob_t *));
+int    glob __P((const char *, int, int (*)(char *, int), glob_t *));
+void   globfree __P((glob_t *));
 __END_DECLS
 
 #endif /* !_GLOB_H_ */
 __END_DECLS
 
 #endif /* !_GLOB_H_ */