date and time created 90/05/15 19:17:03 by bostic
[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 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the University of California, Berkeley. The name of the
14 * University may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * @(#)glob.h 5.1 (Berkeley) %G%
21 */
22
23typedef struct {
24 int gl_pathc; /* count of paths matching pattern */
25 int gl_offs; /* reserved at beginning of gl_pathv */
26 int gl_flags; /* copy of flags parameter to glob() */
27 int (*gl_errfunc)(); /* copy of errfunc parameter to glob() */
28 char **gl_pathv; /* list of paths matching pattern */
29} glob_t;
30
31#define GLOB_ERR 0x01 /* return on error */
32#define GLOB_MARK 0x02 /* append / to matching directories */
33#define GLOB_NOSORT 0x04 /* don't sort */
34#define GLOB_NOCHECK 0x08 /* return pattern itself if nothing matches */
35#define GLOB_DOOFFS 0x10 /* use gl_offs */
36#define GLOB_APPEND 0x20 /* append to output from previous call */
37
38#ifndef _POSIX_SOURCE
39#define GLOB_QUOTE 0x40 /* quote special chars with \ */
40#endif
41
42#define GLOB_NOSPACE (-1) /* malloc call failed */
43#define GLOB_ABEND (-2) /* unignored error */
44
45void globfree();