• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl/tcl/generic/

Lines Matching refs:pattern

1308  *	See if a particular string matches a particular pattern.
1311 * The return value is 1 if string matches pattern, and 0 otherwise. The
1313 * pattern: *?\[] (see the manual entry for details on what these mean).
1324 CONST char *pattern) /* Pattern, which may contain special
1327 return Tcl_StringCaseMatch(str, pattern, 0);
1336 * See if a particular string matches a particular pattern. Allows case
1340 * The return value is 1 if string matches pattern, and 0 otherwise. The
1342 * pattern: *?\[] (see the manual entry for details on what these mean).
1353 CONST char *pattern, /* Pattern, which may contain special
1358 CONST char *pstart = pattern;
1362 p = *pattern;
1365 * See if we're at the end of both the pattern and the string. If so,
1366 * we succeeded. If we're at the end of the pattern but not at the end
1378 * Check for a "*" as the next pattern character. It matches any
1386 * Skip all successive *'s in the pattern
1389 while (*(++pattern) == '*') {}
1390 p = *pattern;
1399 if (UCHAR(*pattern) < 0x80) {
1401 (nocase ? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
1403 Tcl_UtfToUniChar(pattern, &ch2);
1412 * quickly if the next char in the pattern isn't a special
1441 if (Tcl_StringCaseMatch(str, pattern, nocase)) {
1452 * Check for a "?" as the next pattern character. It matches any
1457 pattern++;
1463 * Check for a "[" as the next pattern character. It is followed by a
1471 pattern++;
1483 if ((*pattern == ']') || (*pattern == '\0')) {
1486 if (UCHAR(*pattern) < 0x80) {
1488 ? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
1489 pattern++;
1491 pattern += Tcl_UtfToUniChar(pattern, &startChar);
1496 if (*pattern == '-') {
1497 pattern++;
1498 if (*pattern == '\0') {
1501 if (UCHAR(*pattern) < 0x80) {
1503 ? tolower(UCHAR(*pattern)) : UCHAR(*pattern));
1504 pattern++;
1506 pattern += Tcl_UtfToUniChar(pattern, &endChar);
1523 while (*pattern != ']') {
1524 if (*pattern == '\0') {
1525 pattern = Tcl_UtfPrev(pattern, pstart);
1528 pattern++;
1530 pattern++;
1535 * If the next pattern character is '\', just strip off the '\' so we
1540 pattern++;
1541 if (*pattern == '\0') {
1552 pattern += TclUtfToUniChar(pattern, &ch2);
1569 * See if a particular string matches a particular pattern. Does not
1574 * The return value is 1 if string matches pattern, and 0 otherwise. The
1576 * pattern: *?\[] (see the manual entry for details on what these mean).
1588 const unsigned char *pattern, /* Pattern, which may contain special
1597 patternEnd = pattern + ptnLen;
1601 * See if we're at the end of both the pattern and the string. If so,
1602 * we succeeded. If we're at the end of the pattern but not at the end
1606 if (pattern == patternEnd) {
1609 p = *pattern;
1615 * Check for a "*" as the next pattern character. It matches any
1617 * next matching one in the pattern, and then calling ourselves
1624 * Skip all successive *'s in the pattern.
1627 while ((++pattern < patternEnd) && (*pattern == '*')) {
1630 if (pattern == patternEnd) {
1633 p = *pattern;
1637 * quickly if the next char in the pattern isn't a special
1647 pattern, patternEnd - pattern, 0)) {
1658 * Check for a "?" as the next pattern character. It matches any
1663 pattern++;
1669 * Check for a "[" as the next pattern character. It is followed by a
1677 pattern++;
1681 if ((*pattern == ']') || (pattern == patternEnd)) {
1684 startChar = *pattern;
1685 pattern++;
1686 if (*pattern == '-') {
1687 pattern++;
1688 if (pattern == patternEnd) {
1691 endChar = *pattern;
1692 pattern++;
1704 while (*pattern != ']') {
1705 if (pattern == patternEnd) {
1706 pattern--;
1709 pattern++;
1711 pattern++;
1716 * If the next pattern character is '\', just strip off the '\' so we
1721 if (++pattern == patternEnd) {
1731 if (*string != *pattern) {
1735 pattern++;
1745 * See if a particular string matches a particular pattern.
1750 * The return value is 1 if string matches pattern, and 0 otherwise. The
1752 * pattern: *?\[] (see the manual entry for details on what these mean).
1763 Tcl_Obj *ptnObj, /* pattern object. */
3290 * Attempt to convert a regular expression to an equivalent glob pattern.
3295 * DString will contain an exact equivalent glob pattern. The caller is
3326 * At most, the glob pattern has length 2*reStrLen + 2 to
3352 * At most, the glob pattern has length reStrLen + 2 to account