1754 |
|
return result; |
1755 |
|
} |
1756 |
|
|
1757 |
+ |
/* valid_wild_card_simple() |
1758 |
+ |
* |
1759 |
+ |
* inputs - data to check for sufficient non-wildcard characters |
1760 |
+ |
* outputs - 1 if valid, else 0 |
1761 |
+ |
* side effects - none |
1762 |
+ |
*/ |
1763 |
+ |
int |
1764 |
+ |
valid_wild_card_simple(const char *data) |
1765 |
+ |
{ |
1766 |
+ |
const unsigned char *p = (const unsigned char *)data; |
1767 |
+ |
unsigned char tmpch = '\0'; |
1768 |
+ |
int nonwild = 0; |
1769 |
+ |
|
1770 |
+ |
while ((tmpch = *p++)) |
1771 |
+ |
{ |
1772 |
+ |
if (tmpch == '\\') |
1773 |
+ |
{ |
1774 |
+ |
++p; |
1775 |
+ |
if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple) |
1776 |
+ |
return 1; |
1777 |
+ |
} |
1778 |
+ |
else if (!IsMWildChar(tmpch)) |
1779 |
+ |
{ |
1780 |
+ |
if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple) |
1781 |
+ |
return 1; |
1782 |
+ |
} |
1783 |
+ |
} |
1784 |
+ |
|
1785 |
+ |
return 0; |
1786 |
+ |
} |
1787 |
+ |
|
1788 |
|
/* valid_wild_card() |
1789 |
|
* |
1790 |
|
* input - pointer to client |