~ubuntu-branches/ubuntu/utopic/tinymux/utopic

« back to all changes in this revision

Viewing changes to src/pcre.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ervin Hearn III
  • Date: 2008-04-11 23:18:25 UTC
  • mfrom: (1.1.5 upstream) (6.1.1 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080411231825-1pq4trckagyk8roo
Tags: 2.6.5.27-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
is automated on Unix systems via the "configure" command. */
77
77
 
78
78
#define PUT(a,n,d)   \
79
 
  (a[n] = (d) >> 8), \
80
 
  (a[(n)+1] = (d) & 255)
 
79
  (a[n] = static_cast<uschar>((d) >> 8)), \
 
80
  (a[(n)+1] = static_cast<uschar>((d) & 255))
81
81
 
82
82
#define GET(a,n) \
83
83
  (((a)[n] << 8) | (a)[(n)+1])
95
95
capturing parenthesis numbers in back references. */
96
96
 
97
97
#define PUT2(a,n,d)   \
98
 
  a[n] = (d) >> 8; \
99
 
  a[(n)+1] = (d) & 255
 
98
  a[n] = static_cast<uschar>((d) >> 8); \
 
99
  a[(n)+1] = static_cast<uschar>((d) & 255)
100
100
 
101
101
#define GET2(a,n) \
102
102
  (((a)[n] << 8) | (a)[(n)+1])
840
840
const unsigned char *
841
841
pcre_maketables(void)
842
842
{
843
 
unsigned char *yield, *p;
844
 
int i;
845
 
 
846
 
yield = static_cast<unsigned char*>(malloc(tables_length));
847
 
 
848
 
if (yield == NULL) return NULL;
849
 
p = yield;
850
 
 
851
 
/* First comes the lower casing table */
852
 
 
853
 
for (i = 0; i < 256; i++) *p++ = tolower(i);
854
 
 
855
 
/* Next the case-flipping table */
856
 
 
857
 
for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);
858
 
 
859
 
/* Then the character class tables. Don't try to be clever and save effort
860
 
on exclusive ones - in some locales things may be different. Note that the
861
 
table for "space" includes everything "isspace" gives, including VT in the
862
 
default locale. This makes it work for the POSIX class [:space:]. */
863
 
 
864
 
memset(p, 0, cbit_length);
865
 
for (i = 0; i < 256; i++)
866
 
  {
867
 
  if (isdigit(i))
868
 
    {
869
 
    p[cbit_digit  + i/8] |= 1 << (i&7);
870
 
    p[cbit_word   + i/8] |= 1 << (i&7);
871
 
    }
872
 
  if (isupper(i))
873
 
    {
874
 
    p[cbit_upper  + i/8] |= 1 << (i&7);
875
 
    p[cbit_word   + i/8] |= 1 << (i&7);
876
 
    }
877
 
  if (islower(i))
878
 
    {
879
 
    p[cbit_lower  + i/8] |= 1 << (i&7);
880
 
    p[cbit_word   + i/8] |= 1 << (i&7);
881
 
    }
882
 
  if (i == '_')   p[cbit_word   + i/8] |= 1 << (i&7);
883
 
  if (isspace(i)) p[cbit_space  + i/8] |= 1 << (i&7);
884
 
  if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
885
 
  if (isgraph(i)) p[cbit_graph  + i/8] |= 1 << (i&7);
886
 
  if (isprint(i)) p[cbit_print  + i/8] |= 1 << (i&7);
887
 
  if (ispunct(i)) p[cbit_punct  + i/8] |= 1 << (i&7);
888
 
  if (iscntrl(i)) p[cbit_cntrl  + i/8] |= 1 << (i&7);
889
 
  }
890
 
p += cbit_length;
891
 
 
892
 
/* Finally, the character type table. In this, we exclude VT from the white
893
 
space chars, because Perl doesn't recognize it as such for \s and for comments
894
 
within regexes. */
895
 
 
896
 
for (i = 0; i < 256; i++)
897
 
  {
898
 
  int x = 0;
899
 
  if (i != 0x0b && isspace(i)) x += ctype_space;
900
 
  if (isalpha(i)) x += ctype_letter;
901
 
  if (isdigit(i)) x += ctype_digit;
902
 
  if (isxdigit(i)) x += ctype_xdigit;
903
 
  if (isalnum(i) || i == '_') x += ctype_word;
904
 
  if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta;
905
 
  *p++ = x;
906
 
  }
907
 
 
908
 
return yield;
 
843
    unsigned char *yield, *p;
 
844
    int i;
 
845
 
 
846
    yield = static_cast<unsigned char*>(malloc(tables_length));
 
847
 
 
848
    if (yield == NULL) return NULL;
 
849
    p = yield;
 
850
 
 
851
    /* First comes the lower casing table */
 
852
 
 
853
    for (i = 0; i < 256; i++)
 
854
    {
 
855
        *p++ = mux_tolower(i);
 
856
    }
 
857
 
 
858
    /* Next the case-flipping table */
 
859
 
 
860
    for (i = 0; i < 256; i++)
 
861
    {
 
862
        *p++ = mux_islower(i)? mux_toupper(i) : mux_tolower(i);
 
863
    }
 
864
 
 
865
    /* Then the character class tables. Don't try to be clever and save effort
 
866
    on exclusive ones - in some locales things may be different. Note that the
 
867
    table for "space" includes everything "isspace" gives, including VT in the
 
868
    default locale. This makes it work for the POSIX class [:space:]. */
 
869
 
 
870
    memset(p, 0, cbit_length);
 
871
    for (i = 0; i < 256; i++)
 
872
    {
 
873
        if (mux_isdigit(i))
 
874
        {
 
875
            p[cbit_digit  + i/8] |= 1 << (i&7);
 
876
            p[cbit_word   + i/8] |= 1 << (i&7);
 
877
        }
 
878
        if (mux_isupper(i))
 
879
        {
 
880
            p[cbit_upper  + i/8] |= 1 << (i&7);
 
881
            p[cbit_word   + i/8] |= 1 << (i&7);
 
882
        }
 
883
        if (mux_islower(i))
 
884
        {
 
885
            p[cbit_lower  + i/8] |= 1 << (i&7);
 
886
            p[cbit_word   + i/8] |= 1 << (i&7);
 
887
        }
 
888
        if (i == '_')       p[cbit_word   + i/8] |= 1 << (i&7);
 
889
        if (mux_isspace(i)) p[cbit_space  + i/8] |= 1 << (i&7);
 
890
        if (mux_isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
 
891
        if (isgraph(i))     p[cbit_graph  + i/8] |= 1 << (i&7);
 
892
        if (mux_isprint(i)) p[cbit_print  + i/8] |= 1 << (i&7);
 
893
        if (ispunct(i))     p[cbit_punct  + i/8] |= 1 << (i&7);
 
894
        if (iscntrl(i))     p[cbit_cntrl  + i/8] |= 1 << (i&7);
 
895
    }
 
896
    p += cbit_length;
 
897
 
 
898
    /* Finally, the character type table. In this, we exclude VT from the white
 
899
    space chars, because Perl doesn't recognize it as such for \s and for comments
 
900
    within regexes. */
 
901
 
 
902
    for (i = 0; i < 256; i++)
 
903
    {
 
904
        unsigned char x = 0;
 
905
        if (i != 0x0b && mux_isspace(i)) x += ctype_space;
 
906
        if (mux_isalpha(i)) x += ctype_letter;
 
907
        if (mux_isdigit(i)) x += ctype_digit;
 
908
        if (mux_isxdigit(i)) x += ctype_xdigit;
 
909
        if (mux_isalnum(i) || i == '_') x += ctype_word;
 
910
        if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta;
 
911
        *p++ = x;
 
912
    }
 
913
    return yield;
909
914
}
910
915
 
911
916
/* End of maketables.c */
1485
1490
changed by the caller, but are shared between all threads. However, when
1486
1491
compiling for Virtual Pascal, things are done differently (see pcre.in). */
1487
1492
 
1488
 
int   (*pcre_callout)(pcre_callout_block *) = NULL;
 
1493
static int   (*pcre_callout)(pcre_callout_block *) = NULL;
1489
1494
 
1490
1495
 
1491
1496
/*************************************************
2791
2796
        *code++ = OP_CHARS;
2792
2797
        *code++ = 1;
2793
2798
        }
2794
 
      *code++ = class_lastchar;
 
2799
      *code++ = static_cast<uschar>(class_lastchar);
2795
2800
      break;  /* End of class handling */
2796
2801
      }       /* End of 1-byte optimization */
2797
2802
 
2816
2821
    if (negate_class)
2817
2822
      {
2818
2823
      *code++ = OP_NCLASS;
2819
 
      for (c = 0; c < 32; c++) code[c] = ~classa[c];
 
2824
      for (c = 0; c < 32; c++) code[c] = static_cast<uschar>(~classa[c]);
2820
2825
      }
2821
2826
    else
2822
2827
      {
2980
2985
 
2981
2986
      if (repeat_min == 0)
2982
2987
        {
2983
 
        if (repeat_max == -1) *code++ = OP_STAR + repeat_type;
2984
 
          else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type;
 
2988
        if (repeat_max == -1) *code++ = static_cast<uschar>(OP_STAR + repeat_type);
 
2989
          else if (repeat_max == 1) *code++ = static_cast<uschar>(OP_QUERY + repeat_type);
2985
2990
        else
2986
2991
          {
2987
 
          *code++ = OP_UPTO + repeat_type;
 
2992
          *code++ = static_cast<uschar>(OP_UPTO + repeat_type);
2988
2993
          PUT2INC(code, 0, repeat_max);
2989
2994
          }
2990
2995
        }
2992
2997
      /* The case {1,} is handled as the special case + */
2993
2998
 
2994
2999
      else if (repeat_min == 1 && repeat_max == -1)
2995
 
        *code++ = OP_PLUS + repeat_type;
 
3000
        *code++ = static_cast<uschar>(OP_PLUS + repeat_type);
2996
3001
 
2997
3002
      /* The case {n,n} is just an EXACT, while the general case {n,m} is
2998
3003
      handled as an EXACT followed by an UPTO. An EXACT of 1 is optimized. */
3001
3006
        {
3002
3007
        if (repeat_min != 1)
3003
3008
          {
3004
 
          *code++ = OP_EXACT + op_type;  /* NB EXACT doesn't have repeat_type */
 
3009
          *code++ = static_cast<uschar>(OP_EXACT + op_type);  /* NB EXACT doesn't have repeat_type */
3005
3010
          PUT2INC(code, 0, repeat_min);
3006
3011
          }
3007
3012
 
3034
3039
 
3035
3040
        if (repeat_max < 0)
3036
3041
          {
3037
 
          *code++ = c;
3038
 
          *code++ = OP_STAR + repeat_type;
 
3042
          *code++ = static_cast<uschar>(c);
 
3043
          *code++ = static_cast<uschar>(OP_STAR + repeat_type);
3039
3044
          }
3040
3045
 
3041
3046
        /* Else insert an UPTO if the max is greater than the min, again
3043
3048
 
3044
3049
        else if (repeat_max != repeat_min)
3045
3050
          {
3046
 
          *code++ = c;
 
3051
          *code++ = static_cast<uschar>(c);
3047
3052
          repeat_max -= repeat_min;
3048
 
          *code++ = OP_UPTO + repeat_type;
 
3053
          *code++ = static_cast<uschar>(OP_UPTO + repeat_type);
3049
3054
          PUT2INC(code, 0, repeat_max);
3050
3055
          }
3051
3056
        }
3053
3058
      /* The character or character type itself comes last in all cases. */
3054
3059
 
3055
3060
 
3056
 
      *code++ = c;
 
3061
      *code++ = static_cast<uschar>(c);
3057
3062
      }
3058
3063
 
3059
3064
    /* If previous was a character class or a back reference, we put the repeat
3069
3074
        goto END_REPEAT;
3070
3075
        }
3071
3076
      if (repeat_min == 0 && repeat_max == -1)
3072
 
        *code++ = OP_CRSTAR + repeat_type;
 
3077
        *code++ = static_cast<uschar>(OP_CRSTAR + repeat_type);
3073
3078
      else if (repeat_min == 1 && repeat_max == -1)
3074
 
        *code++ = OP_CRPLUS + repeat_type;
 
3079
        *code++ = static_cast<uschar>(OP_CRPLUS + repeat_type);
3075
3080
      else if (repeat_min == 0 && repeat_max == 1)
3076
 
        *code++ = OP_CRQUERY + repeat_type;
 
3081
        *code++ = static_cast<uschar>(OP_CRQUERY + repeat_type);
3077
3082
      else
3078
3083
        {
3079
 
        *code++ = OP_CRRANGE + repeat_type;
 
3084
        *code++ = static_cast<uschar>(OP_CRRANGE + repeat_type);
3080
3085
        PUT2INC(code, 0, repeat_min);
3081
3086
        if (repeat_max == -1) repeat_max = 0;  /* 2-byte encoding for max */
3082
3087
        PUT2INC(code, 0, repeat_max);
3137
3142
          adjust_recurse(previous, 1, utf8, cd);
3138
3143
          memmove(previous+1, previous, len);
3139
3144
          code++;
3140
 
          *previous++ = OP_BRAZERO + repeat_type;
 
3145
          *previous++ = static_cast<uschar>(OP_BRAZERO + repeat_type);
3141
3146
          }
3142
3147
 
3143
3148
        /* If the maximum is greater than 1 and limited, we have to replicate
3155
3160
          adjust_recurse(previous, 2 + LINK_SIZE, utf8, cd);
3156
3161
          memmove(previous + 2 + LINK_SIZE, previous, len);
3157
3162
          code += 2 + LINK_SIZE;
3158
 
          *previous++ = OP_BRAZERO + repeat_type;
 
3163
          *previous++ = static_cast<uschar>(OP_BRAZERO + repeat_type);
3159
3164
          *previous++ = OP_BRA;
3160
3165
 
3161
3166
          /* We chain together the bracket offset fields that have to be
3198
3203
        {
3199
3204
        for (i = repeat_max - 1; i >= 0; i--)
3200
3205
          {
3201
 
          *code++ = OP_BRAZERO + repeat_type;
 
3206
          *code++ = static_cast<uschar>(OP_BRAZERO + repeat_type);
3202
3207
 
3203
3208
          /* All but the final copy start a new nesting, maintaining the
3204
3209
          chain of brackets outstanding. */
3237
3242
      don't know if there's been an options resetting after the ket. The
3238
3243
      correct offset was computed above. */
3239
3244
 
3240
 
      else code[-ketoffset] = OP_KETRMAX + repeat_type;
 
3245
      else code[-ketoffset] = static_cast<uschar>(OP_KETRMAX + repeat_type);
3241
3246
      }
3242
3247
 
3243
3248
    /* Else there's some kind of shambles */
3381
3386
            *errorptr = ERR38;
3382
3387
            goto FAILED;
3383
3388
            }
3384
 
          *code++ = n;
 
3389
          *code++ = static_cast<uschar>(n);
3385
3390
          }
3386
3391
        previous = NULL;
3387
3392
        continue;
3555
3560
          if ((options & PCRE_IMS) != (newoptions & PCRE_IMS))
3556
3561
            {
3557
3562
            *code++ = OP_OPT;
3558
 
            *code++ = newoptions & PCRE_IMS;
 
3563
            *code++ = static_cast<uschar>(newoptions & PCRE_IMS);
3559
3564
            }
3560
3565
 
3561
3566
          /* Change options at this level, and pass them back for use
3612
3617
    new setting for the ims options if they have changed. */
3613
3618
 
3614
3619
    previous = (bravalue >= OP_ONCE)? code : NULL;
3615
 
    *code = bravalue;
 
3620
    *code = static_cast<uschar>(bravalue);
3616
3621
    tempcode = code;
3617
3622
    tempreqvary = cd->req_varyopt;     /* Save value before bracket */
3618
3623
 
3775
3780
      else
3776
3781
        {
3777
3782
        previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;
3778
 
        *code++ = -c;
 
3783
        *code++ = static_cast<uschar>(-c);
3779
3784
        }
3780
3785
      continue;
3781
3786
      }
3809
3814
          }
3810
3815
        else
3811
3816
          {
3812
 
          *code++ = c;
 
3817
          *code++ = static_cast<uschar>(c);
3813
3818
          length++;
3814
3819
          }
3815
3820
        continue;
3847
3852
 
3848
3853
      /* Ordinary character or single-char escape */
3849
3854
 
3850
 
      *code++ = c;
 
3855
      *code++ = static_cast<uschar>(c);
3851
3856
      length++;
3852
3857
      }
3853
3858
 
3898
3903
 
3899
3904
    /* Set the length in the data vector, and advance to the next state. */
3900
3905
 
3901
 
    previous[1] = length;
 
3906
    previous[1] = static_cast<uschar>(length);
3902
3907
    if (length < MAXLIT) ptr--;
3903
3908
    break;
3904
3909
    }
3978
3983
  if ((options & PCRE_IMS) != oldims)
3979
3984
    {
3980
3985
    *code++ = OP_OPT;
3981
 
    *code++ = options & PCRE_IMS;
 
3986
    *code++ = static_cast<uschar>(options & PCRE_IMS);
3982
3987
    }
3983
3988
 
3984
3989
  /* Set up dummy OP_REVERSE if lookbehind assertion */
4089
4094
    if ((options & PCRE_IMS) != oldims && *ptr == ')')
4090
4095
      {
4091
4096
      *code++ = OP_OPT;
4092
 
      *code++ = oldims;
 
4097
      *code++ = static_cast<uschar>(oldims);
4093
4098
      }
4094
4099
 
4095
4100
    /* Set values to pass back */
5019
5024
      goto PCRE_ERROR_RETURN;
5020
5025
      }
5021
5026
 
5022
 
    bralenstack[brastackptr] = branch_extra;
 
5027
    bralenstack[brastackptr] = static_cast<uschar>(branch_extra);
5023
5028
    branch_extra = branch_newextra;
5024
5029
 
5025
5030
    brastack[brastackptr++] = length;
5200
5205
re->size = size;
5201
5206
re->options = options;
5202
5207
re->tables = tables;
5203
 
re->name_entry_size = max_name_size + 3;
5204
 
re->name_count = name_count;
 
5208
re->name_entry_size = static_cast<unsigned short>(max_name_size + 3);
 
5209
re->name_count = static_cast<unsigned short>(name_count);
5205
5210
 
5206
5211
/* The starting points of the name/number translation table and of the code are
5207
5212
passed around in the compile data block. */
5223
5228
bracount = 0;
5224
5229
(void)compile_regex(options, options & PCRE_IMS, &bracount, &code, &ptr,
5225
5230
  errorptr, false, 0, &firstbyte, &reqbyte, NULL, &compile_block);
5226
 
re->top_bracket = bracount;
5227
 
re->top_backref = compile_block.top_backref;
 
5231
re->top_bracket = static_cast<unsigned short>(bracount);
 
5232
re->top_backref = static_cast<unsigned short>(compile_block.top_backref);
5228
5233
 
5229
5234
/* If not reached end of pattern on success, there's an excess bracket. */
5230
5235
 
5274
5279
    if (firstbyte >= 0)   /* Remove caseless flag for non-caseable chars */
5275
5280
      {
5276
5281
      int ch = firstbyte & 255;
5277
 
      re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
5278
 
         compile_block.fcc[ch] == ch)? ch : firstbyte;
 
5282
      re->first_byte = static_cast<unsigned short>(((firstbyte & REQ_CASELESS) != 0 &&
 
5283
         compile_block.fcc[ch] == ch)? ch : firstbyte);
5279
5284
      re->options |= PCRE_FIRSTSET;
5280
5285
      }
5281
5286
    else if (is_startline(codestart, 0, compile_block.backref_map))
5291
5296
     ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))
5292
5297
  {
5293
5298
  int ch = reqbyte & 255;
5294
 
  re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
5295
 
    compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
 
5299
  re->req_byte = static_cast<unsigned short>(((reqbyte & REQ_CASELESS) != 0 &&
 
5300
    compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte);
5296
5301
  re->options |= PCRE_REQCHSET;
5297
5302
  }
5298
5303
 
5319
5324
*/
5320
5325
 
5321
5326
static bool
5322
 
match_ref(int offset, register const uschar *eptr, int length, match_data *md,
5323
 
  unsigned long int ims)
 
5327
match_ref
 
5328
(
 
5329
    int offset,
 
5330
    register const uschar *eptr,
 
5331
    int length,
 
5332
    match_data *md,
 
5333
    unsigned long int ims
 
5334
)
5324
5335
{
5325
 
const uschar *p = md->start_subject + md->offset_vector[offset];
5326
 
 
5327
 
/* Always fail if not enough characters left */
5328
 
 
5329
 
if (length > md->end_subject - eptr) return false;
5330
 
 
5331
 
/* Separate the caselesss case for speed */
5332
 
 
5333
 
if ((ims & PCRE_CASELESS) != 0)
5334
 
  {
5335
 
  while (length-- > 0)
5336
 
    if (md->lcc[*p++] != md->lcc[*eptr++]) return false;
5337
 
  }
5338
 
else
5339
 
  { while (length-- > 0) if (*p++ != *eptr++) return false; }
5340
 
 
5341
 
return true;
 
5336
    const uschar *p = md->start_subject + md->offset_vector[offset];
 
5337
 
 
5338
    /* Always fail if not enough characters left */
 
5339
 
 
5340
    if (length > md->end_subject - eptr)
 
5341
    {
 
5342
        return false;
 
5343
    }
 
5344
 
 
5345
    /* Separate the caselesss case for speed */
 
5346
 
 
5347
    if ((ims & PCRE_CASELESS) != 0)
 
5348
    {
 
5349
        while (length-- > 0)
 
5350
        {
 
5351
            if (md->lcc[*p] != md->lcc[*eptr])
 
5352
            {
 
5353
                p++;
 
5354
                eptr++;
 
5355
                return false;
 
5356
            }
 
5357
            p++;
 
5358
            eptr++;
 
5359
        }
 
5360
    }
 
5361
    else
 
5362
    {
 
5363
        while (length-- > 0)
 
5364
        {
 
5365
            if (*p != *eptr)
 
5366
            {
 
5367
                p++;
 
5368
                eptr++;
 
5369
                return false;
 
5370
            }
 
5371
            p++;
 
5372
            eptr++;
 
5373
        }
 
5374
    }
 
5375
 
 
5376
    return true;
5342
5377
}
5343
5378
 
5344
5379
/***************************************************************************
6453
6488
    /* Match a run of characters */
6454
6489
 
6455
6490
    case OP_CHARS:
6456
 
      {
6457
 
      register int slen = ecode[1];
6458
 
      ecode += 2;
6459
 
 
6460
 
      if (slen > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
6461
 
      if ((ims & PCRE_CASELESS) != 0)
6462
 
        {
6463
 
        while (slen-- > 0)
6464
 
          if (md->lcc[*ecode++] != md->lcc[*eptr++])
6465
 
            RRETURN(MATCH_NOMATCH);
6466
 
        }
6467
 
      else
6468
 
        {
6469
 
        while (slen-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH);
6470
 
        }
6471
 
      }
6472
 
    break;
 
6491
        {
 
6492
            register int slen = ecode[1];
 
6493
            ecode += 2;
 
6494
 
 
6495
            if (slen > md->end_subject - eptr)
 
6496
            {
 
6497
                RRETURN(MATCH_NOMATCH);
 
6498
            }
 
6499
 
 
6500
            if ((ims & PCRE_CASELESS) != 0)
 
6501
            {
 
6502
                while (slen-- > 0)
 
6503
                {
 
6504
                    if (md->lcc[*ecode] != md->lcc[*eptr])
 
6505
                    {
 
6506
                        ecode++;
 
6507
                        eptr++;
 
6508
                        RRETURN(MATCH_NOMATCH);
 
6509
                    }
 
6510
                    ecode++;
 
6511
                    eptr++;
 
6512
                }
 
6513
            }
 
6514
            else
 
6515
            {
 
6516
                while (slen-- > 0)
 
6517
                {
 
6518
                    if (*ecode != *eptr)
 
6519
                    {
 
6520
                        ecode++;
 
6521
                        eptr++;
 
6522
                        RRETURN(MATCH_NOMATCH);
 
6523
                    }
 
6524
                    ecode++;
 
6525
                    eptr++;
 
6526
                }
 
6527
            }
 
6528
        }
 
6529
        break;
6473
6530
 
6474
6531
    /* Match a single character repeatedly; different opcodes share code. */
6475
6532