__ctype_ should be __ctype
[unix-history] / usr / src / include / glob.h
CommitLineData
68a121a5
KB
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Guido van Rossum.
7 *
863005e5 8 * %sccs.include.redist.c%
68a121a5 9 *
a5ba4a08 10 * @(#)glob.h 5.7 (Berkeley) %G%
68a121a5
KB
11 */
12
d2b7358e
KB
13#ifndef _GLOB_H_
14#define _GLOB_H_
15
68a121a5 16typedef struct {
3dd0f635
KB
17 int gl_pathc; /* count of total paths so far */
18 int gl_matchc; /* count of paths matching pattern */
68a121a5
KB
19 int gl_offs; /* reserved at beginning of gl_pathv */
20 int gl_flags; /* copy of flags parameter to glob() */
21 int (*gl_errfunc)(); /* copy of errfunc parameter to glob() */
22 char **gl_pathv; /* list of paths matching pattern */
23} glob_t;
24
a5ba4a08
KB
25#define GLOB_APPEND 0x001 /* append to output from previous call */
26#define GLOB_DOOFFS 0x002 /* use gl_offs */
27#define GLOB_ERR 0x004 /* return on error */
28#define GLOB_MARK 0x008 /* append / to matching directories */
29#define GLOB_NOCHECK 0x010 /* return pattern itself if nothing matches */
30#define GLOB_NOSORT 0x020 /* don't sort */
31
68a121a5 32#ifndef _POSIX_SOURCE
a5ba4a08
KB
33#define GLOB_MAGCHAR 0x040 /* pattern had globbing characters */
34#define GLOB_NOMAGIC 0x080 /* GLOB_NOCHECK without magic chars (csh) */
35#define GLOB_QUOTE 0x100 /* quote special chars with \ */
68a121a5
KB
36#endif
37
38#define GLOB_NOSPACE (-1) /* malloc call failed */
39#define GLOB_ABEND (-2) /* unignored error */
40
993000f1
DS
41#include <sys/cdefs.h>
42
43__BEGIN_DECLS
a5ba4a08
KB
44int glob __P((const char *, int, int (*)(char *, int), glob_t *));
45void globfree __P((glob_t *));
993000f1 46__END_DECLS
d2b7358e
KB
47
48#endif /* !_GLOB_H_ */