#pragma prototyped
#ifndef _GLOB_H
#define _GLOB_H
#define GLOB_VERSION 20060717L
#include <stdlib.h>
struct dirent;
struct stat;
struct _glob_;
struct _globlist_;
typedef struct _glob_ glob_t;
typedef struct _globlist_ globlist_t;
struct _globlist_
{
globlist_t* gl_next;
char* gl_begin;
unsigned char gl_flags;
char gl_path[1];
};
struct _glob_
{
size_t gl_pathc;
char** gl_pathv;
size_t gl_offs;
globlist_t* gl_list;
int gl_flags;
const char* gl_fignore;
const char* gl_suffix;
unsigned char* gl_intr;
int gl_delim;
void* gl_handle;
void* (*gl_diropen)(glob_t*, const char*);
char* (*gl_dirnext)(glob_t*, void*);
void (*gl_dirclose)(glob_t*, void*);
int (*gl_type)(glob_t*, const char*);
int (*gl_attr)(glob_t*, const char*);
void* (*gl_opendir)(const char*);
struct dirent* (*gl_readdir)(void*);
void (*gl_closedir)(void*);
int (*gl_stat)(const char*, struct stat*);
int (*gl_lstat)(const char*, struct stat*);
char* (*gl_nextdir)(glob_t*, char*);
unsigned long gl_status;
unsigned long gl_version;
unsigned short gl_extra;
#ifdef _GLOB_PRIVATE_
_GLOB_PRIVATE_
#else
char* gl_pad[23];
#endif
};
#define GLOB_APPEND 0x0001
#define GLOB_DOOFFS 0x0002
#define GLOB_ERR 0x0004
#define GLOB_MARK 0x0008
#define GLOB_NOCHECK 0x0010
#define GLOB_NOESCAPE 0x0020
#define GLOB_NOSORT 0x0040
#define GLOB_STARSTAR 0x0080
#define GLOB_BRACE 0x0100
#define GLOB_ICASE 0x0200
#define GLOB_COMPLETE 0x0400
#define GLOB_AUGMENTED 0x0800
#define GLOB_STACK 0x1000
#define GLOB_LIST 0x2000
#define GLOB_ALTDIRFUNC 0x4000
#define GLOB_DISC 0x8000
#define GLOB_NOTDIR 0x0001
#define GLOB_NOTFOUND 0
#define GLOB_DEV 1
#define GLOB_DIR 2
#define GLOB_EXE 3
#define GLOB_REG 4
#define GLOB_ABORTED 1
#define GLOB_NOMATCH 2
#define GLOB_NOSPACE 3
#define GLOB_INTR 4
#define GLOB_APPERR 5
#define GLOB_NOSYS 6
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int glob(const char*, int, int(*)(const char*,int), glob_t*);
extern void globfree(glob_t*);
#undef extern
#endif