1fd082e96SMartin Matuska /*- 2fd082e96SMartin Matuska * Copyright (c) 2003-2007 Tim Kientzle 3fd082e96SMartin Matuska * All rights reserved. 4fd082e96SMartin Matuska * 5fd082e96SMartin Matuska * Redistribution and use in source and binary forms, with or without 6fd082e96SMartin Matuska * modification, are permitted provided that the following conditions 7fd082e96SMartin Matuska * are met: 8fd082e96SMartin Matuska * 1. Redistributions of source code must retain the above copyright 9fd082e96SMartin Matuska * notice, this list of conditions and the following disclaimer 10fd082e96SMartin Matuska * in this position and unchanged. 11fd082e96SMartin Matuska * 2. Redistributions in binary form must reproduce the above copyright 12fd082e96SMartin Matuska * notice, this list of conditions and the following disclaimer in the 13fd082e96SMartin Matuska * documentation and/or other materials provided with the distribution. 14fd082e96SMartin Matuska * 15fd082e96SMartin Matuska * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 16fd082e96SMartin Matuska * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17fd082e96SMartin Matuska * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18fd082e96SMartin Matuska * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 19fd082e96SMartin Matuska * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20fd082e96SMartin Matuska * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21fd082e96SMartin Matuska * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22fd082e96SMartin Matuska * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23fd082e96SMartin Matuska * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24fd082e96SMartin Matuska * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25fd082e96SMartin Matuska */ 26fd082e96SMartin Matuska 27*f9762417SMartin Matuska #ifndef ARCHIVE_PATHMATCH_H 28*f9762417SMartin Matuska #define ARCHIVE_PATHMATCH_H 29*f9762417SMartin Matuska 30fd082e96SMartin Matuska #ifndef __LIBARCHIVE_BUILD 31fd082e96SMartin Matuska #ifndef __LIBARCHIVE_TEST 32fd082e96SMartin Matuska #error This header is only to be used internally to libarchive. 33fd082e96SMartin Matuska #endif 34fd082e96SMartin Matuska #endif 35fd082e96SMartin Matuska 36fd082e96SMartin Matuska /* Don't anchor at beginning unless the pattern starts with "^" */ 37fd082e96SMartin Matuska #define PATHMATCH_NO_ANCHOR_START 1 38fd082e96SMartin Matuska /* Don't anchor at end unless the pattern ends with "$" */ 39fd082e96SMartin Matuska #define PATHMATCH_NO_ANCHOR_END 2 40fd082e96SMartin Matuska 41fd082e96SMartin Matuska /* Note that "^" and "$" are not special unless you set the corresponding 42fd082e96SMartin Matuska * flag above. */ 43fd082e96SMartin Matuska 44fd082e96SMartin Matuska int __archive_pathmatch(const char *p, const char *s, int flags); 45fd082e96SMartin Matuska int __archive_pathmatch_w(const wchar_t *p, const wchar_t *s, int flags); 46fd082e96SMartin Matuska 47fd082e96SMartin Matuska #define archive_pathmatch(p, s, f) __archive_pathmatch(p, s, f) 48fd082e96SMartin Matuska #define archive_pathmatch_w(p, s, f) __archive_pathmatch_w(p, s, f) 49fd082e96SMartin Matuska 50fd082e96SMartin Matuska #endif 51