summaryrefslogtreecommitdiff
path: root/lib/exclude.h
Commit message (Collapse)AuthorAgeFilesLines
* exclude: improve -fanalyzer malloc checkingPaul Eggert2021-08-011-2/+5
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* Continue to use spaces for indentation, not tabs.Bruno Haible2018-06-251-1/+1
|
* maint: port more modules to GCC 8Paul Eggert2018-05-031-1/+1
| | | | | | | | | | | | * lib/dirname.h (base_name): * lib/exclude.h (new_exclude): * lib/xstrndup.h (xstrndup): Add malloc attribute. * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy. * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify. This pacifies GCC 8. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_MALLOC here. All other definitions removed.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* exclude: add support for posix regexpsSergey Poznyakoff2014-02-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for POSIX extended regular expressions and fixes a long-standing memory leak (pattern buffer was never freed). It also implements a new interface function to read exclude patterns from a FILE, which passes an additional parameter to its callback function, thereby allowing to preserve its state between invocations. * lib/exclude.c (struct patopts): Pack regex and pattern into union. (pattern_buffer): New struct. (exclude): New member patbuf. (exclude_add_pattern_buffer): New function. (free_exclude_segment): Free regexps. (free_exclude): Free allocated pattern buffers. (exclude_patopts): New function. (file_pattern_matches): Use exclude_patopts. (add_exclude): support regexps. (add_exclude_fp): New function. (add_exclude_file): Rewrite using add_exclude_fp. (fnmatch_pattern_has_wildcards): Support posix extended regexps. * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags. (add_exclude_fp) (exclude_add_pattern_buffer): New prototypes. * modules/exclude: Depends on regex and filename.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* mark functions with const and pure attributesJim Meyering2011-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark functions per suggestions from gcc-4.6 when using these options: -Wsuggest-attribute=pure -Wsuggest-attribute=const. Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros. Follow these guidelines: when possible, apply the attribute to an extern declaration, not to its definition. Apply it to the definition only when the definition is static. * lib/argmatch.h (argmatch, argmatch_to_argument): Mark. * lib/argv-iter.h (argv_iter_n_args): Likewise. * lib/base64.h (isbase64): Likewise. * lib/basename-lgpl.c (last_component, base_len): Likewise. * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise. (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise. (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise. (c_tolower, c_toupper): Likewise. * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise. * lib/chdir-long.c (find_non_slash): Likewise. * lib/dirname.h (base_len, dir_len, last_component): Likewise. * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise. * lib/file-type.h (file_type): Likewise. * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise. * lib/filevercmp.c (verrevcmp): Likewise. * lib/freadahead.h (freadahead): Likewise. * lib/fts.c (fts_maxarglen): Likewise. * lib/hash-pjw.h (hash_pjw): Likewise. * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str): * lib/hash.c (is_prime, next_prime): Likewise. * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise. (hash_get_n_entries, hash_get_max_bucket_length): Likewise. (hash_table_ok, hash_get_first, hash_string): Likewise. (compute_bucket_size): Likewise. * lib/i-ring.h (i_ring_empty): Likewise. * lib/isnan.c (isnanl): Likewise. * lib/math.h (isnanl, rpl_isnanl): Likewise. * lib/memcasecmp.h (memcasecmp): Likewise. * lib/memchr2.h (memchr2): Likewise. * lib/memcmp2.h (memcmp2): Likewise. * lib/parse-datetime.y (lookup_zone): Likewise. * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup) [!WINDOWS_SOCKETS]: Likewise. * lib/strnlen1.h (strnlen1): Likewise. * lib/uniwidth.in.h (uc_width): Likewise, but since this is installed as a public header by libunistring, it cannot depend on the macro definitions of gnulib-common.m4, so open-code the __attribute__... * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from gcc's -Wsuggest-attribute=pure for quoting_options_from_style. (quoting_options_from_style): Add a comment. * lib/propername.h (proper_name): Add a comment.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-2/+2
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-2/+2
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-1/+1
|
* exclude: Fix header file problems.Paolo Bonzini2009-12-031-0/+7
| | | | * lib/exclude.h: Add multiple inclusion guards and include stdbool.h.
* Optimize exclude: use hash tables for non-wildcard patterns.Sergey Poznyakoff2009-08-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | * lib/exclude.c: Include hash.h and mbuiter.h (struct exclude_pattern, exclude_segment): New data types. (struct exclude): Rewrite. (fnmatch_pattern_has_wildcards): New function. (new_exclude_segment, free_exclude_segment): New functions. (excluded_file_pattern_p, excluded_file_name_p): New functions. (excluded_file_name, add_exclude): Rewrite using new struct exclude. * lib/exclude.h (is_fnmatch_pattern): New prototype. * modules/exclude: Depend on hash and mbuiter. * modules/exclude-tests: New file. * tests/test-exclude.c: New file. * tests/test-exclude1.sh: New file. * tests/test-exclude2.sh: New file. * tests/test-exclude3.sh: New file. * tests/test-exclude4.sh: New file. * tests/test-exclude5.sh: New file. * tests/test-exclude6.sh: New file. * tests/test-exclude7.sh: New file.
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-6/+4
|
* (excluded_file_name): New prototypeSergey Poznyakoff2006-05-251-2/+3
|
* Sync from coreutils.Paul Eggert2005-06-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "file name" when talking about file names, instead of "filename" or "path", as per the GNU coding standards. * MODULES.html.sh: mkdir-p renamed from makepath. filenamecat renamed from path-concat. * modules/filenamecat: Renamed from modules/path-concat. (Files): filenamecat.h and filenamecat.c renamed from path-concat.h and path-concat.c. (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT. (Include): filenamecat.h, not path-concat.h. * modules/mkdir-p: Renamed from modules/makepath. (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and makepath.c. (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH. (Include): mkdir-p.h, not makepath.h. * lib/mkdir-p.c: Renamed from makepath.c. (make_dir_parents): Renamed from make_path. All callers changed. * lib/mkdir-p.h: Likewise. All includers changed. * lib/filenamecat.c: Renamed from path-concat.c. (file_name_concat): Renamed from path_concat. All callers changed. [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT. * lib/filenamecat.h: Likewise. All includers changed. * lib/acl.c: Don't use "path" or "filename" to mean "file name" in comments or local variable names. * lib/basename.c: Likewise. * lib/canonicalize.c, canonicalize.h: Likewise. * lib/dirname.c, dirname.h: Likewise. * lib/euidaccess.c: Likewise. * lib/exclude.c: Likewise * lib/fnmatch_.h, fnmatch_loop.c: Likewise. * lib/fsusage.c, fsuage.h: Likewise. * lib/fts.c, fts_.h: Likewise. * lib/getcwd.c: Likewise. * lib/getloadavg.c: Likewise. * lib/mkstemp.c: Likewise. * lib/mountlist.c, mountlist.h: Likewise. * lib/openat.c, openat.h: Likewise. * lib/readlink-stub.c: Likewise. * lib/readutmp.c, readutmp.h: Likewise. * lib/rename.c: Likewise. * lib/rmdir.c: Likewise. * lib/same.c: Likewise. * lib/savedir.c: Likewise. * lib/stripslash.c: Likewise. * lib/tempname.c: Likewise. * lib/xreadlink.c: Likewise. * lib/exclude.c (excluded_file_name): Renamed from excluded_filename. All uses changed. * lib/exclude.h: Likewise. * m4/mkdir-p.m4: Renamed from makepath.m4. (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH. All uses changed. Rename files from makepath.c to mkdir-p.c, and from makepath.h to mkdir-p.h. * m4/filenamecat.m4: Renamed from path-concat.m4. (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT. All uses changed. Rename files from path-concat.c to filenamecat.c, and from path-concat.h to filenamecat.h. * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean "file name" in local variables or comments. * rename.m4: Likewise. * lib/euidaccess.c (getuid, getgid, getuid, getegid) [!defined _POSIX_VERSION]: Remove decls; not needed these days. * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam) [!defined _POSIX_VERSION]: Remove decls; not needed these days. * lib/pathmax.h: Include <limits.h> unconditionally, since other files have been getting away with it for years (MORE/BSD 4.3 is extinct now). * lib/userspec.c (getpwnam, getgrnam, getgrgid) [!defined _POSIX_VERSION]: Remove decls; not needed these days. * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]: Define to 256, not 255, as per modern POSIX.
* *** empty log message ***Paul Eggert2005-05-141-1/+1
|
* (PARAMS): Remove definition and uses.Jim Meyering2003-04-051-15/+7
|
* (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):Paul Eggert2002-12-101-4/+6
| | | | | Choose values that are less likely to collide with system fnmatch options.
* (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.Jim Meyering2001-08-311-5/+19
| | | | | | | (free_exclude): New decl. (add_exclude, add_exclude_file): Now takes int options arg. (excluded_filename): No longer requires options arg, as the options are determined by add_exclude. Now returns bool, not int.
* back out Copyright date changes for files with no changes yearJim Meyering2000-08-071-1/+1
|
* update copyright dateJim Meyering2000-07-091-1/+1
|
* Sync to the slightly more general version of GNU tar.Jim Meyering2000-01-121-3/+4
|
* Define and use PARAMS, not __EXCLUDE_P.Jim Meyering1997-12-311-8/+8
|
* .Jim Meyering1997-12-211-0/+34