globtree.h revision 204556
1285SN/A/*- 2790Saefimov * Copyright (c) 2006, Maxime Henrion <mux@FreeBSD.org> 3285SN/A * All rights reserved. 4285SN/A * 5285SN/A * Redistribution and use in source and binary forms, with or without 6285SN/A * modification, are permitted provided that the following conditions 7285SN/A * are met: 8285SN/A * 1. Redistributions of source code must retain the above copyright 9285SN/A * notice, this list of conditions and the following disclaimer. 10285SN/A * 2. Redistributions in binary form must reproduce the above copyright 11285SN/A * notice, this list of conditions and the following disclaimer in the 12285SN/A * documentation and/or other materials provided with the distribution. 13285SN/A * 14285SN/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15285SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16285SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17285SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18285SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19285SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20285SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21285SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22285SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23285SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24285SN/A * SUCH DAMAGE. 25285SN/A * 26285SN/A * $FreeBSD: head/usr.bin/csup/globtree.h 204556 2010-03-02 07:26:07Z lulf $ 27285SN/A */ 28285SN/A#ifndef _GLOBTREE_H_ 29285SN/A#define _GLOBTREE_H_ 30611Smkos 31285SN/A#include "fnmatch.h" 32611Smkos 33285SN/Astruct globtree; 34611Smkos 35285SN/Astruct globtree *globtree_true(void); 36611Smkosstruct globtree *globtree_false(void); 37285SN/Astruct globtree *globtree_match(const char *, int); 38285SN/Astruct globtree *globtree_regex(const char *); 39611Smkosstruct globtree *globtree_and(struct globtree *, struct globtree *); 40285SN/Astruct globtree *globtree_or(struct globtree *, struct globtree *); 41285SN/Astruct globtree *globtree_not(struct globtree *); 42521SN/Aint globtree_test(struct globtree *, const char *); 43521SN/Avoid globtree_free(struct globtree *); 44285SN/A 45285SN/A#endif /* !_GLOBTREE_H_ */ 46285SN/A