Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/gen/fnmatch.c
RevisionDateAuthorComments
 1.26  12-Oct-2014  christos Fix fnmatch issues according to POSIX.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/\
xcu_chap02.html#tag_02_13_01
1. A [...] pattern containing a slash is not a pattern; the [ ]'s become regular
characters
2. A [] or a [!] is not an empty pattern, why would it? The first would never
match and the second would always match which makes it equivalent to ?
In those cases the ] is taken as a literal character and does not have
special meaning.
 1.25  25-Mar-2012  christos PR/41558: Stathis Kamperis: Treat a backslash followed by NUL as NUL, instead
of a backslash if FNM_NOESCAPE is not set. According to TOG: a backslash in
a pattern followed by any other character, will match that second character
in the string.
 1.24  31-Jan-2011  christos branches: 1.24.4;
add braces, per joerg.
 1.23  31-Jan-2011  christos bump down the recursion limit to 64.
 1.22  31-Jan-2011  christos Limit recursions to avoid DoS attacks from Maksymilian Arciemowicz
 1.21  24-Dec-2005  perry branches: 1.21.40;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.20  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19  06-Oct-2002  provos implement FNM_LEADING_DIR; matches Linux and other *BSDs; approved thorpej
 1.18  28-Jun-2000  thorpej branches: 1.18.2;
Implement FNM_CASEFOLD, for matching the pattern in a case-insensitive
way. Flag name taken from glibc.
 1.17  22-Jan-2000  mycroft branches: 1.17.4;
Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.16  20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.15  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.14  16-Mar-1999  christos Fix gcc-2.8.1 warnings.
 1.13  21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.12  13-Jul-1997  christos Fix gcc warnings.
Fix RCSID's
 1.11  27-Feb-1995  cgd branches: 1.11.4;
merge with Lite, keeping local changes. Also use new Id format.
 1.10  24-Nov-1993  jtc Change C library functions to use strchr() and strrchr() instead of index()
and rindex(). This will allow (strict {ANSI, POSIX, XOPEN}) applications
to redefine index() and rindex() without effecting the library internals.
 1.9  11-Nov-1993  jtc First pass at getting a clean compile with "gcc -Wall", mostly explictly
declaring function return values, etc.
 1.8  11-Nov-1993  jtc Implement the FNM_PERIOD flag.
 1.7  09-Nov-1993  jtc Fixed the most major defect in fnmatch(): backslash-escape processing in
bracket expressions. Still need to implement FNM_PERIOD...
 1.6  06-Nov-1993  cgd just berkeley copyright/version # changes.
 1.5  26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.4  30-Jul-1993  mycroft Add RCS frob.
 1.3  16-Jun-1993  jtc Update fnmatch() to be more posix complient (from bostic).
 1.2  10-Apr-1993  mycroft Make return status match POSIX and man page.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  25-Feb-1995  cgd from lite, with minor name rearrangement to fit.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.4.1  19-Sep-1996  jtc snapshot namespace cleanup: gen
 1.17.4.1  03-Jul-2000  thorpej Pull up rev. 1.18:
Implement FNM_CASEFOLD, for matching the pattern in a case-insensitive
way. Flag name taken from glibc.
 1.18.2.1  18-Oct-2002  nathanw Catch up to -current.
 1.21.40.1  08-Feb-2011  bouyer Sync with HEAD
 1.24.4.1  17-Apr-2012  yamt sync with head

RSS XML Feed