check whether pattern has no special characters */
| 744 | |
| 745 | /* check whether pattern has no special characters */ |
| 746 | static int nospecials (const char *p, size_t l) { |
| 747 | size_t upto = 0; |
| 748 | do { |
| 749 | if (strpbrk(p + upto, SPECIALS)) |
| 750 | return 0; /* pattern has a special character */ |
| 751 | upto += strlen(p + upto) + 1; /* may have more after \0 */ |
| 752 | } while (upto <= l); |
| 753 | return 1; /* no special chars found */ |
| 754 | } |
| 755 | |
| 756 | |
| 757 | static void prepstate (MatchState *ms, lua_State *L, |