-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.37.2.1 2002/09/25 12:58:51 oes Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.37.2.3 2003/11/20 11:39:24 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/Attic/miscutil.c,v $
*
* Revisions :
* $Log: miscutil.c,v $
+ * Revision 1.37.2.3 2003/11/20 11:39:24 oes
+ * Bugfix: The "?" wildcard for domain names had never been implemented. Ooops\!
+ *
+ * Revision 1.37.2.2 2002/11/12 14:28:18 oes
+ * Proper backtracking in simplematch; fixes bug #632888
+ *
* Revision 1.37.2.1 2002/09/25 12:58:51 oes
* Made strcmpic and strncmpic safe against NULL arguments
* (which are now treated as empty strings).
/* EOF pattern but !EOF text? */
if (*pat == '\0')
{
- return 1;
+ if (wildcard)
+ {
+ pat = fallback;
+ }
+ else
+ {
+ return 1;
+ }
}
/* '*' in the pattern? */
/*
* Char match, or char range match?
*/
- if ((*pat == *txt)
- || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))) )
+ if ( (*pat == *txt)
+ || (*pat == '?')
+ || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))) )
{
/*
* Sucess: Go ahead
* Wildcard mode && nonmatch beyond fallback: Rewind pattern
*/
pat = fallback;
- continue;
}
txt++;
}