| 227 |
dpurdie |
1 |
/*
|
|
|
2 |
* glob - expand file name function
|
|
|
3 |
*/
|
|
|
4 |
|
|
|
5 |
#ifndef GLOB_H
|
|
|
6 |
#define GLOB_H
|
|
|
7 |
|
|
|
8 |
#include <sys/proto.h>
|
|
|
9 |
|
|
|
10 |
typedef struct glob_t {
|
|
|
11 |
int gl_flags; /* Saved flag value */
|
|
|
12 |
int gl_offs; /* Offset into paths to start */
|
|
|
13 |
int gl_pathc; /* Number of entries */
|
|
|
14 |
/* Function */
|
|
|
15 |
int (_CDECL *gl_ef) _PROTO ((char *, int));
|
|
|
16 |
char **gl_pathv; /* Pointers to path */
|
|
|
17 |
} glob_t;
|
|
|
18 |
|
|
|
19 |
#define GLOB_ERR 0x0001 /* Stop on error */
|
|
|
20 |
#define GLOB_MARK 0x0002 /* Mark directories */
|
|
|
21 |
#define GLOB_NOSORT 0x0004 /* No sorting */
|
|
|
22 |
#define GLOB_NOCHECK 0x0008 /* No match returns pattern */
|
|
|
23 |
#define GLOB_DOOFFS 0x0010 /* Add null pointers */
|
|
|
24 |
#define GLOB_APPEND 0x0020 /* Append file names */
|
|
|
25 |
|
|
|
26 |
#define GLOB_ABEND -1 /* Error */
|
|
|
27 |
#define GLOB_NOSPACE -2 /* Out of space */
|
|
|
28 |
|
|
|
29 |
extern int _CDECL glob _PROTO ((char *, int,
|
|
|
30 |
int (_CDECL *)(char *,
|
|
|
31 |
int), glob_t *));
|
|
|
32 |
extern void _CDECL globfree _PROTO ((glob_t *));
|
|
|
33 |
#endif
|