Blame lib/exclude.h

Packit 709fb3
/* exclude.h -- declarations for excluding file names
Packit 709fb3
Packit 709fb3
   Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2017 Free
Packit 709fb3
   Software Foundation, Inc.
Packit 709fb3
Packit 709fb3
   This program is free software: you can redistribute it and/or modify
Packit 709fb3
   it under the terms of the GNU General Public License as published by
Packit 709fb3
   the Free Software Foundation; either version 3 of the License, or
Packit 709fb3
   (at your option) any later version.
Packit 709fb3
Packit 709fb3
   This program is distributed in the hope that it will be useful,
Packit 709fb3
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 709fb3
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 709fb3
   GNU General Public License for more details.
Packit 709fb3
Packit 709fb3
   You should have received a copy of the GNU General Public License
Packit 709fb3
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit 709fb3
Packit 709fb3
#ifndef _GL_EXCLUDE_H
Packit 709fb3
#define _GL_EXCLUDE_H 1
Packit 709fb3
Packit 709fb3
#include <stdbool.h>
Packit 709fb3
#include <stdio.h>
Packit 709fb3
Packit 709fb3
/* Written by Paul Eggert <eggert@twinsun.com>
Packit 709fb3
   and Sergey Poznyakoff <gray@gnu.org> */
Packit 709fb3
Packit 709fb3
/* Exclude options, which can be ORed with fnmatch options.  */
Packit 709fb3
Packit 709fb3
/* Patterns must match the start of file names, instead of matching
Packit 709fb3
   anywhere after a '/'.  */
Packit 709fb3
#define EXCLUDE_ANCHORED (1 << 30)
Packit 709fb3
Packit 709fb3
/* Include instead of exclude.  */
Packit 709fb3
#define EXCLUDE_INCLUDE (1 << 29)
Packit 709fb3
Packit 709fb3
/* '?', '*', '[', and '\\' are special in patterns.  Without this
Packit 709fb3
   option, these characters are ordinary and fnmatch is not used.  */
Packit 709fb3
#define EXCLUDE_WILDCARDS (1 << 28)
Packit 709fb3
Packit 709fb3
/* Patterns are POSIX extended regular expressions */
Packit 709fb3
#define EXCLUDE_REGEX     (1 << 27)
Packit 709fb3
Packit 709fb3
/* Allocate storage for the pattern */
Packit 709fb3
#define EXCLUDE_ALLOC     (1 << 26)
Packit 709fb3
Packit 709fb3
struct exclude;
Packit 709fb3
Packit 709fb3
bool fnmatch_pattern_has_wildcards (const char *, int) _GL_ATTRIBUTE_PURE;
Packit 709fb3
Packit 709fb3
struct exclude *new_exclude (void);
Packit 709fb3
void free_exclude (struct exclude *);
Packit 709fb3
void add_exclude (struct exclude *, char const *, int);
Packit 709fb3
int add_exclude_file (void (*) (struct exclude *, char const *, int),
Packit 709fb3
                      struct exclude *, char const *, int, char);
Packit 709fb3
int add_exclude_fp (void (*) (struct exclude *, char const *, int, void *),
Packit 709fb3
		    struct exclude *, FILE *, int, char, void *);
Packit 709fb3
bool excluded_file_name (struct exclude const *, char const *);
Packit 709fb3
void exclude_add_pattern_buffer (struct exclude *ex, char *buf);
Packit 709fb3
bool exclude_fnmatch (char const *, char const *, int);
Packit 709fb3
Packit 709fb3
#endif /* _GL_EXCLUDE_H */