Doc patch for apr_fnmatch, to actually document the syntax that it takes in excruciating detail. Doesn't document behavior of flags any more than it currently is, but at least says that it isn't trying to do so. Hopefully it's decent doxygen -- I don't actually have doxygen installed here.
[[[ Document the variant of globbing implemented by apr_fnmatch. * include/apr_fnmatch.h (apr_fnmatch): Describe the recognized metacharacters, etc. ]]] --dave -- David Glasser | [EMAIL PROTECTED] | http://www.davidglasser.net/
--- apr_fnmatch.h.orig 2006-09-15 16:45:03.000000000 -0400 +++ apr_fnmatch.h 2006-09-15 16:52:39.000000000 -0400 @@ -66,7 +66,49 @@ /** * Try to match the string to the given pattern, return APR_SUCCESS if - * match, else return APR_FNM_NOMATCH. + * match, else return APR_FNM_NOMATCH. Note that there is no such thing as + * an illegal pattern. + * + * With all flags unset, a pattern is interpreted as such: + * + * PATTERN: Backslash followed by any character, including another backslash. + * MATCHES: That character exactly. + * + * PATTERN: ? + * MATCHES: Any single character. + * + * PATTERN: * + * MATCHES: Any sequence of zero or more characters. (Note that multiple + * *s in a row are equivalent to one.) + * + * PATTERN: Any character other than \?*[ or a \ at the end of the pattern + * MATCHES: That character exactly. (Case sensitive.) + * + * PATTERN: [ followed by a class description followed by ] + * 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 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, + * which is ignored; this lets you use the characters ] and - + * in the character class, as well as ^ and ! at the + * beginning. The pattern matches a single character if it + * is one of the listed characters or falls into one of the + * listed ranges (inclusive, case sensitive). Ranges with + * the first character larger than the second are legal but + * never match. + * + * Edge cases: [] never matches, and [^] and [!] always match + * without consuming a character. + * + * Note that these patterns attempt to match the entire string, not + * just find a substring matching the pattern. + * * @param pattern The pattern to match to * @param strings The string we are trying to match * @param flags flags to use in the match. Bitwise OR of:
