Changes On Branch regexp-x
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch regexp-x Excluding Merge-Ins

This is equivalent to a diff from acea7010b8 to bef9a956c0

2013-01-11
18:12
Off-by-one error in regexp \u escape sequence parsing. Regexp \x escape sequence should only accept exactly 2 hex digits. check-in: e4ca677a6c user: drh tags: trunk
18:03
Enhancements to the TICKETCHNG table: (1) Add the tkt_rid column and populate it (if present) with the recordID of the artifact. (2) For columns that appear in both TICKET and TICKETCHNG but are missing from the artifact, fill in the TICKETCHNG value with the value from TICKET at that point in time. (3) Add the test-ticket-rebuild command for tes... check-in: a18a49c875 user: drh tags: trunk
12:28
merge trunk check-in: 6e9e6436a6 user: jan.nijtmans tags: allow-backslash-in-card-filename
08:10
Off-by-one error in regexp \u escape sequence parsing. Regexp \x escape sequence should only accept exactly 2 hex digits. Typo. Closed-Leaf check-in: bef9a956c0 user: jan.nijtmans tags: regexp-x
2013-01-10
12:51
Added checkin-count to (fossil info) output (ML request). check-in: acea7010b8 user: stephan tags: trunk
2013-01-09
15:59
Fix incorrect license statement on the http_ssl.c file. No code changes. check-in: c7133bd79d user: drh tags: trunk

Changes to src/regexp.c.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
**     X|Y     X or Y
**     ^X      X occurring at the beginning of the string
**     X$      X occurring at the end of the string
**     .       Match any single character
**     \c      Character c where c is one of \{}()[]|*+?.
**     \c      C-language escapes for c in afnrtv.  ex: \t or \n
**     \uXXXX  Where XXXX is exactly 4 hex digits, unicode value XXXX
**     \xXXX   Where XXX is any number of hex digits, unicode value XXX
**     [abc]   Any single character from the set abc
**     [^abc]  Any single character not in the set abc
**     [a-z]   Any single character in the range a-z
**     [^a-z]  Any single character not in the range a-z
**     \b      Word boundary
**     \w      Word character.  [A-Za-z0-9_]
**     \W      Non-word character







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
**     X|Y     X or Y
**     ^X      X occurring at the beginning of the string
**     X$      X occurring at the end of the string
**     .       Match any single character
**     \c      Character c where c is one of \{}()[]|*+?.
**     \c      C-language escapes for c in afnrtv.  ex: \t or \n
**     \uXXXX  Where XXXX is exactly 4 hex digits, unicode value XXXX
**     \xXX    Where XX is exactly 2 hex digits, unicode value XX
**     [abc]   Any single character from the set abc
**     [^abc]  Any single character not in the set abc
**     [a-z]   Any single character in the range a-z
**     [^a-z]  Any single character not in the range a-z
**     \b      Word boundary
**     \w      Word character.  [A-Za-z0-9_]
**     \W      Non-word character
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412

413
414
415
416
417
418
419
    return 0;
  }
  *pV = (*pV)*16 + (c & 0xff);
  return 1;
}

/* A backslash character has been seen, read the next character and
** return its intepretation.
*/
static unsigned re_esc_char(ReCompiled *p){
  static const char zEsc[] = "afnrtv\\()*.+?[$^{|}]";
  static const char zTrans[] = "\a\f\n\r\t\v";
  int i, v = 0;
  char c;
  if( p->sIn.i>=p->sIn.mx ) return 0;
  c = p->sIn.z[p->sIn.i];
  if( c=='u' && p->sIn.i+5<p->sIn.mx ){
    const unsigned char *zIn = p->sIn.z + p->sIn.i;
    v = 0;
    if( re_hex(zIn[1],&v)
     && re_hex(zIn[2],&v)
     && re_hex(zIn[3],&v)
     && re_hex(zIn[4],&v)
    ){
      p->sIn.i += 5;
      return v;
    }
  }
  if( c=='x' ){
    v = 0;
    for(i=1; p->sIn.i<p->sIn.mx && re_hex(p->sIn.z[p->sIn.i+i], &v); i++){}
    if( i>1 ){
      p->sIn.i += i;
      return v;

    }
  }
  for(i=0; zEsc[i] && zEsc[i]!=c; i++){}
  if( zEsc[i] ){
    if( i<6 ) c = zTrans[i];
    p->sIn.i++;
  }else{







|








|

<










|
|
|
|
|
>







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
    return 0;
  }
  *pV = (*pV)*16 + (c & 0xff);
  return 1;
}

/* A backslash character has been seen, read the next character and
** return its interpretation.
*/
static unsigned re_esc_char(ReCompiled *p){
  static const char zEsc[] = "afnrtv\\()*.+?[$^{|}]";
  static const char zTrans[] = "\a\f\n\r\t\v";
  int i, v = 0;
  char c;
  if( p->sIn.i>=p->sIn.mx ) return 0;
  c = p->sIn.z[p->sIn.i];
  if( c=='u' && p->sIn.i+4<p->sIn.mx ){
    const unsigned char *zIn = p->sIn.z + p->sIn.i;

    if( re_hex(zIn[1],&v)
     && re_hex(zIn[2],&v)
     && re_hex(zIn[3],&v)
     && re_hex(zIn[4],&v)
    ){
      p->sIn.i += 5;
      return v;
    }
  }
  if( c=='x' ){
    const unsigned char *zIn = p->sIn.z + p->sIn.i;
    if( p->sIn.i+2<p->sIn.mx ){
      if( re_hex(zIn[1],&v) && re_hex(zIn[2],&v) ){
        p->sIn.i += 3;
        return v;
      }
    }
  }
  for(i=0; zEsc[i] && zEsc[i]!=c; i++){}
  if( zEsc[i] ){
    if( i<6 ) c = zTrans[i];
    p->sIn.i++;
  }else{