home *** CD-ROM | disk | FTP | other *** search
- /*
- EPSHeader
-
- File: match.h
- Author: J. Kercheval
- Created: Sat, 01/05/1991 22:27:18
- */
- /*
- EPSRevision History
-
- J. Kercheval Wed, 02/20/1991 22:28:37 Released to Public Domain
- */
-
- /*
- Wildcard Pattern Matching
- */
-
- #ifndef BOOLEAN
- # define BOOLEAN int
- # define TRUE 1
- # define FALSE 0
- #endif
-
- /*----------------------------------------------------------------------------
- *
- * Match the pattern PATTERN against the string TEXT;
- * return TRUE if it matches, FALSE otherwise.
- *
- * A match means the entire string TEXT is used up in matching.
- *
- * In the pattern string:
- * `*' matches any sequence of characters
- * `?' matches any character
- * [SET] matches any character in the specified set,
- * [!SET] or [^SET] matches any character not in the specified set.
- *
- * Note: the standard regex character '+' (one or more) should by
- * simulated by using "?*" which is equivelant here.
- *
- * A set is composed of characters or ranges; a range looks like
- * character hyphen character (as in 0-9 or A-Z).
- * [0-9a-zA-Z_] is the set of characters allowed in C identifiers.
- * Any other character in the pattern must be matched exactly.
- *
- * To suppress the special syntactic significance of any of `[]*?!^-\',
- * and match the character exactly, precede it with a `\'.
- *
- ----------------------------------------------------------------------------*/
-
- BOOLEAN match (char *pattern, char *text);
-
- /*----------------------------------------------------------------------------
- *
- * Return TRUE if PATTERN has any special wildcard characters
- *
- ----------------------------------------------------------------------------*/
-
- BOOLEAN is_pattern (char *pattern);
-