/[pcre]/code/trunk/pcre_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 77 by nigel, Sat Feb 24 21:40:45 2007 UTC revision 85 by nigel, Sat Feb 24 21:41:13 2007 UTC
# Line 1354  for (;;) Line 1354  for (;;)
1354        {        {
1355        int chartype, rqdtype;        int chartype, rqdtype;
1356        int othercase;        int othercase;
1357        int category = ucp_findchar(c, &chartype, &othercase);        int category = _pcre_ucp_findchar(c, &chartype, &othercase);
1358    
1359        rqdtype = *(++ecode);        rqdtype = *(++ecode);
1360        ecode++;        ecode++;
# Line 1381  for (;;) Line 1381  for (;;)
1381        {        {
1382        int chartype;        int chartype;
1383        int othercase;        int othercase;
1384        int category = ucp_findchar(c, &chartype, &othercase);        int category = _pcre_ucp_findchar(c, &chartype, &othercase);
1385        if (category == ucp_M) RRETURN(MATCH_NOMATCH);        if (category == ucp_M) RRETURN(MATCH_NOMATCH);
1386        while (eptr < md->end_subject)        while (eptr < md->end_subject)
1387          {          {
# Line 1390  for (;;) Line 1390  for (;;)
1390            {            {
1391            GETCHARLEN(c, eptr, len);            GETCHARLEN(c, eptr, len);
1392            }            }
1393          category = ucp_findchar(c, &chartype, &othercase);          category = _pcre_ucp_findchar(c, &chartype, &othercase);
1394          if (category != ucp_M) break;          if (category != ucp_M) break;
1395          eptr += len;          eptr += len;
1396          }          }
# Line 1841  for (;;) Line 1841  for (;;)
1841          ecode += length;          ecode += length;
1842    
1843          /* If we have Unicode property support, we can use it to test the other          /* If we have Unicode property support, we can use it to test the other
1844          case of the character, if there is one. The result of ucp_findchar() is          case of the character, if there is one. The result of _pcre_ucp_findchar() is
1845          < 0 if the char isn't found, and othercase is returned as zero if there          < 0 if the char isn't found, and othercase is returned as zero if there
1846          isn't one. */          isn't one. */
1847    
# Line 1850  for (;;) Line 1850  for (;;)
1850  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
1851            int chartype;            int chartype;
1852            int othercase;            int othercase;
1853            if (ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)            if (_pcre_ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
1854  #endif  #endif
1855              RRETURN(MATCH_NOMATCH);              RRETURN(MATCH_NOMATCH);
1856            }            }
# Line 1920  for (;;) Line 1920  for (;;)
1920          int othercase;          int othercase;
1921          int chartype;          int chartype;
1922          if ((ims & PCRE_CASELESS) != 0 &&          if ((ims & PCRE_CASELESS) != 0 &&
1923               ucp_findchar(fc, &chartype, &othercase) >= 0 &&               _pcre_ucp_findchar(fc, &chartype, &othercase) >= 0 &&
1924               othercase > 0)               othercase > 0)
1925            oclength = _pcre_ord2utf8(othercase, occhars);            oclength = _pcre_ord2utf8(othercase, occhars);
1926  #endif  /* SUPPORT_UCP */  #endif  /* SUPPORT_UCP */
# Line 2439  for (;;) Line 2439  for (;;)
2439          for (i = 1; i <= min; i++)          for (i = 1; i <= min; i++)
2440            {            {
2441            GETCHARINC(c, eptr);            GETCHARINC(c, eptr);
2442            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2443            if ((*prop_test_variable == prop_test_against) == prop_fail_result)            if ((*prop_test_variable == prop_test_against) == prop_fail_result)
2444              RRETURN(MATCH_NOMATCH);              RRETURN(MATCH_NOMATCH);
2445            }            }
# Line 2453  for (;;) Line 2453  for (;;)
2453          for (i = 1; i <= min; i++)          for (i = 1; i <= min; i++)
2454            {            {
2455            GETCHARINCTEST(c, eptr);            GETCHARINCTEST(c, eptr);
2456            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2457            if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);            if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
2458            while (eptr < md->end_subject)            while (eptr < md->end_subject)
2459              {              {
# Line 2462  for (;;) Line 2462  for (;;)
2462                {                {
2463                GETCHARLEN(c, eptr, len);                GETCHARLEN(c, eptr, len);
2464                }                }
2465              prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);              prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2466              if (prop_category != ucp_M) break;              if (prop_category != ucp_M) break;
2467              eptr += len;              eptr += len;
2468              }              }
# Line 2632  for (;;) Line 2632  for (;;)
2632            if (rrc != MATCH_NOMATCH) RRETURN(rrc);            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
2633            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
2634            GETCHARINC(c, eptr);            GETCHARINC(c, eptr);
2635            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2636            if ((*prop_test_variable == prop_test_against) == prop_fail_result)            if ((*prop_test_variable == prop_test_against) == prop_fail_result)
2637              RRETURN(MATCH_NOMATCH);              RRETURN(MATCH_NOMATCH);
2638            }            }
# Line 2649  for (;;) Line 2649  for (;;)
2649            if (rrc != MATCH_NOMATCH) RRETURN(rrc);            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
2650            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
2651            GETCHARINCTEST(c, eptr);            GETCHARINCTEST(c, eptr);
2652            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2653            if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);            if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
2654            while (eptr < md->end_subject)            while (eptr < md->end_subject)
2655              {              {
# Line 2658  for (;;) Line 2658  for (;;)
2658                {                {
2659                GETCHARLEN(c, eptr, len);                GETCHARLEN(c, eptr, len);
2660                }                }
2661              prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);              prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2662              if (prop_category != ucp_M) break;              if (prop_category != ucp_M) break;
2663              eptr += len;              eptr += len;
2664              }              }
# Line 2790  for (;;) Line 2790  for (;;)
2790            int len = 1;            int len = 1;
2791            if (eptr >= md->end_subject) break;            if (eptr >= md->end_subject) break;
2792            GETCHARLEN(c, eptr, len);            GETCHARLEN(c, eptr, len);
2793            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2794            if ((*prop_test_variable == prop_test_against) == prop_fail_result)            if ((*prop_test_variable == prop_test_against) == prop_fail_result)
2795              break;              break;
2796            eptr+= len;            eptr+= len;
# Line 2816  for (;;) Line 2816  for (;;)
2816            {            {
2817            if (eptr >= md->end_subject) break;            if (eptr >= md->end_subject) break;
2818            GETCHARINCTEST(c, eptr);            GETCHARINCTEST(c, eptr);
2819            prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);            prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2820            if (prop_category == ucp_M) break;            if (prop_category == ucp_M) break;
2821            while (eptr < md->end_subject)            while (eptr < md->end_subject)
2822              {              {
# Line 2825  for (;;) Line 2825  for (;;)
2825                {                {
2826                GETCHARLEN(c, eptr, len);                GETCHARLEN(c, eptr, len);
2827                }                }
2828              prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);              prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2829              if (prop_category != ucp_M) break;              if (prop_category != ucp_M) break;
2830              eptr += len;              eptr += len;
2831              }              }
# Line 2846  for (;;) Line 2846  for (;;)
2846                {                {
2847                GETCHARLEN(c, eptr, len);                GETCHARLEN(c, eptr, len);
2848                }                }
2849              prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);              prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
2850              if (prop_category != ucp_M) break;              if (prop_category != ucp_M) break;
2851              eptr--;              eptr--;
2852              }              }
# Line 3200  Returns: > 0 => success; value Line 3200  Returns: > 0 => success; value
3200                   < -1 => some kind of unexpected problem                   < -1 => some kind of unexpected problem
3201  */  */
3202    
3203  EXPORT int  PCRE_EXPORT int
3204  pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,  pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
3205    const char *subject, int length, int start_offset, int options, int *offsets,    const char *subject, int length, int start_offset, int options, int *offsets,
3206    int offsetcount)    int offsetcount)

Legend:
Removed from v.77  
changed lines
  Added in v.85

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12