#include "defines.h"
#include "tool.h"
-
/*
* The pattern matching functions [Matche(), Matche_After_Star()] are based
* on code of J. Kercheval. Version 1.1 has been released on 1991-03-12 as
* "public domain": <http://c.snippets.org/snip_lister.php?fname=match.c>
*/
-
static int Matche PARAMS(( const char *p, const char *t ));
static int Matche_After_Star PARAMS(( const char *p, const char *t ));
-
#define MATCH_PATTERN 6 /**< bad pattern */
#define MATCH_LITERAL 5 /**< match failure on literal match */
#define MATCH_RANGE 4 /**< match failure on [..] construct */
#define MATCH_END 2 /**< premature end of pattern string */
#define MATCH_VALID 1 /**< valid match */
-
/**
* Match string with pattern.
*
else return false;
} /* Match */
-
/**
* Match string with pattern case-insensitive.
*
return Match(Pattern, ngt_LowerStr(haystack));
} /* MatchCaseInsensitive */
-
/**
* Match string with pattern case-insensitive.
*
return false;
} /* MatchCaseInsensitive */
-
static int
Matche( const char *p, const char *t )
{
else return MATCH_VALID;
} /* Matche */
-
static int
Matche_After_Star( const char *p, const char *t )
{
return match;
} /* Matche_After_Star */
-
/* -eof- */