1238825Smm/*-
2238825Smm * Copyright (c) 2003-2007 Tim Kientzle
3238825Smm * All rights reserved.
4238825Smm *
5238825Smm * Redistribution and use in source and binary forms, with or without
6238825Smm * modification, are permitted provided that the following conditions
7238825Smm * are met:
8238825Smm * 1. Redistributions of source code must retain the above copyright
9238825Smm *    notice, this list of conditions and the following disclaimer
10238825Smm *    in this position and unchanged.
11238825Smm * 2. Redistributions in binary form must reproduce the above copyright
12238825Smm *    notice, this list of conditions and the following disclaimer in the
13238825Smm *    documentation and/or other materials provided with the distribution.
14238825Smm *
15238825Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
16238825Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17238825Smm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18238825Smm * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
19238825Smm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20238825Smm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21238825Smm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22238825Smm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23238825Smm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24238825Smm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25238825Smm *
26238825Smm * $FreeBSD$
27238825Smm */
28238825Smm
29358090Smm#ifndef ARCHIVE_PATHMATCH_H
30358090Smm#define ARCHIVE_PATHMATCH_H
31358090Smm
32238825Smm#ifndef __LIBARCHIVE_BUILD
33238825Smm#ifndef __LIBARCHIVE_TEST
34238825Smm#error This header is only to be used internally to libarchive.
35238825Smm#endif
36238825Smm#endif
37238825Smm
38238825Smm/* Don't anchor at beginning unless the pattern starts with "^" */
39238825Smm#define PATHMATCH_NO_ANCHOR_START	1
40238825Smm/* Don't anchor at end unless the pattern ends with "$" */
41238825Smm#define PATHMATCH_NO_ANCHOR_END 	2
42238825Smm
43238825Smm/* Note that "^" and "$" are not special unless you set the corresponding
44238825Smm * flag above. */
45238825Smm
46238825Smmint __archive_pathmatch(const char *p, const char *s, int flags);
47238825Smmint __archive_pathmatch_w(const wchar_t *p, const wchar_t *s, int flags);
48238825Smm
49238825Smm#define archive_pathmatch(p, s, f)	__archive_pathmatch(p, s, f)
50238825Smm#define archive_pathmatch_w(p, s, f)	__archive_pathmatch_w(p, s, f)
51238825Smm
52238825Smm#endif
53