apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject apr_fnmatch deltas
Date Mon, 02 May 2011 16:44:00 GMT
I just started playing and ran into this doc issue:

Index: include/apr_fnmatch.h
===================================================================
--- include/apr_fnmatch.h	(revision 1098590)
+++ include/apr_fnmatch.h	(working copy)
@@ -90,9 +90,9 @@
  *
  * PATTERN: [ followed by a class description followed by ]<br/>
  * MATCHES: A single character described by the class description.
- *          (Never matches, if the class description reaches until the
- *          end of the string without a ].) If the first character of
- *          the class description is ^ or !, the sense of the description
+ *          (If the initial [ character is not matched by a ], that [
+ *          character will treated as a literal.)  If the first character
+ *          of the class description is ^ or !, the sense of the description
  *          is reversed.  The rest of the class description is a list of
  *          single characters or pairs of characters separated by -. Any
  *          of those characters can have a backslash in front of them,

That issue affects this type of pattern string:

    res = apr_fnmatch("aaa[a*b", "aaa[a*b", 0);
    ABTS_INT_EQUAL(tc, 0, res);

With the old code (1.3.x branch), it does not match.  With the new
code, it does match.

Just sayin', for now.  I'll spend more time with the new code.

Mime
View raw message