xref: /titanic_50/usr/src/lib/libast/common/comp/fnmatch.h (revision 51f34d4b950abb3636d536e2250bdc05baba902e)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1985-2008 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                 Glenn Fowler <gsf@research.att.com>                  *
18 *                  David Korn <dgk@research.att.com>                   *
19 *                   Phong Vo <kpv@research.att.com>                    *
20 *                                                                      *
21 ***********************************************************************/
22 #pragma prototyped
23 /*
24  * posix fnmatch interface definitions
25  */
26 
27 #ifndef _FNMATCH_H
28 #define _FNMATCH_H
29 
30 #include <ast_common.h>
31 
32 /* fnmatch flags */
33 
34 #define FNM_NOESCAPE	0x0001		/* \ is literal			*/
35 #define FNM_PATHNAME	0x0002		/* explicit match for /		*/
36 #define FNM_PERIOD	0x0004		/* explicit match for leading .	*/
37 #define FNM_NOSYS	0x0010		/* not implemented		*/
38 
39 /* nonstandard fnmatch() flags */
40 
41 #define FNM_AUGMENTED	0x0008		/* enable ! & ( | )		*/
42 #define FNM_ICASE	0x0020		/* ignore case in match		*/
43 #define FNM_LEADING_DIR	0x0040		/* match up to implicit /	*/
44 
45 #define FNM_CASEFOLD	FNM_ICASE	/* gnu compatibility		*/
46 #define FNM_FILE_NAME	FNM_PATHNAME	/* gnu compatibility		*/
47 
48 /* fnmatch error codes -- other non-zero values from <regex.h> */
49 
50 #define FNM_NOMATCH	1		/* == REG_NOMATCH		*/
51 
52 #if _BLD_ast && defined(__EXPORT__)
53 #define extern	__EXPORT__
54 #endif
55 
56 extern int	fnmatch(const char*, const char*, int);
57 
58 #undef	extern
59 
60 #endif
61