+++ /dev/null
-/* $NetBSD: glob.h,v 1.24 2008/09/13 17:05:07 christos Exp $ */\r
-\r
-/*\r
- * Copyright (c) 1989, 1993\r
- * The Regents of the University of California. All rights reserved.\r
- *\r
- * This code is derived from software contributed to Berkeley by\r
- * Guido van Rossum.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- * may be used to endorse or promote products derived from this software\r
- * without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- *\r
- * @(#)glob.h 8.1 (Berkeley) 6/2/93\r
- */\r
-\r
-#ifndef _GLOB_H_\r
-#define _GLOB_H_\r
-\r
-#include <sys/cdefs.h>\r
-#include <sys/featuretest.h>\r
-#include <sys/types.h>\r
-#include <sys/stat.h>\r
-\r
-#ifndef __gl_size_t\r
-#define __gl_size_t size_t\r
-#endif\r
-#ifndef __gl_stat_t\r
-#define __gl_stat_t struct stat\r
-#endif\r
-\r
-typedef struct {\r
- __gl_size_t gl_pathc; /* Count of total paths so far. */\r
- __gl_size_t gl_matchc; /* Count of paths matching pattern. */\r
- __gl_size_t gl_offs; /* Reserved at beginning of gl_pathv. */\r
- int gl_flags; /* Copy of flags parameter to glob. */\r
- char **gl_pathv; /* List of paths matching pattern. */\r
- /* Copy of errfunc parameter to glob. */\r
- int (*gl_errfunc)(const char *, int);\r
-\r
- /*\r
- * Alternate filesystem access methods for glob; replacement\r
- * versions of closedir(3), readdir(3), opendir(3), stat(2)\r
- * and lstat(2).\r
- */\r
- void (*gl_closedir)(void *);\r
- struct dirent *(*gl_readdir)(void *); \r
- void *(*gl_opendir)(const char *);\r
- int (*gl_lstat)(const char *, __gl_stat_t *);\r
- int (*gl_stat)(const char *, __gl_stat_t *);\r
-} glob_t;\r
-\r
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */\r
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */\r
-#define GLOB_ERR 0x0004 /* Return on error. */\r
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */\r
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */\r
-#define GLOB_NOSORT 0x0020 /* Don't sort. */\r
-#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */\r
-\r
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */\r
-#define GLOB_ABORTED (-2) /* Unignored error. */\r
-#define GLOB_NOMATCH (-3) /* No match, and GLOB_NOCHECK was not set. */\r
-#define GLOB_NOSYS (-4) /* Implementation does not support function. */\r
-\r
-#if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H)\r
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */\r
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */\r
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */\r
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */\r
-#define GLOB_LIMIT 0x0400 /* Limit memory used by matches to ARG_MAX */\r
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */\r
-/* GLOB_NOESCAPE 0x1000 above */\r
-#define GLOB_PERIOD 0x2000 /* Allow metachars to match leading periods. */\r
-#define GLOB_NO_DOTDIRS 0x4000 /* Make . and .. vanish from wildcards. */\r
-#define GLOB_QUOTE 0 /* source compatibility */\r
-\r
-#define GLOB_ABEND GLOB_ABORTED /* source compatibility */\r
-#endif\r
-\r
-__BEGIN_DECLS\r
-#ifndef __LIBC12_SOURCE__\r
-int glob(const char * __restrict, int,\r
- int (*)(const char *, int), glob_t * __restrict) __RENAME(__glob30);\r
-void globfree(glob_t *) __RENAME(__globfree30);\r
-#endif\r
-__END_DECLS\r
-\r
-#endif /* !_GLOB_H_ */\r