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

Diff of /code/trunk/pcre_compile.c

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

revision 1630 by ph10, Fri Dec 18 16:58:41 2015 UTC revision 1631 by ph10, Wed Feb 10 19:13:17 2016 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2014 University of Cambridge             Copyright (c) 1997-2016 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 560  static const char error_texts[] = Line 560  static const char error_texts[] =
560    /* 85 */    /* 85 */
561    "parentheses are too deeply nested (stack check)\0"    "parentheses are too deeply nested (stack check)\0"
562    "digits missing in \\x{} or \\o{}\0"    "digits missing in \\x{} or \\o{}\0"
563      "regular expression is too complicated\0"
564    ;    ;
565    
566  /* Table to identify digits and hex digits. This is used when compiling  /* Table to identify digits and hex digits. This is used when compiling
# Line 4591  for (;; ptr++) Line 4592  for (;; ptr++)
4592      if (code > cd->start_workspace + cd->workspace_size -      if (code > cd->start_workspace + cd->workspace_size -
4593          WORK_SIZE_SAFETY_MARGIN)                       /* Check for overrun */          WORK_SIZE_SAFETY_MARGIN)                       /* Check for overrun */
4594        {        {
4595        *errorcodeptr = ERR52;        *errorcodeptr = (code >= cd->start_workspace + cd->workspace_size)?
4596            ERR52 : ERR87;
4597        goto FAILED;        goto FAILED;
4598        }        }
4599    
# Line 6626  for (;; ptr++) Line 6628  for (;; ptr++)
6628              cd->had_accept = TRUE;              cd->had_accept = TRUE;
6629              for (oc = cd->open_caps; oc != NULL; oc = oc->next)              for (oc = cd->open_caps; oc != NULL; oc = oc->next)
6630                {                {
6631                *code++ = OP_CLOSE;                if (lengthptr != NULL)
6632                PUT2INC(code, 0, oc->number);                  {
6633    #ifdef COMPILE_PCRE8
6634                    *lengthptr += 1 + IMM2_SIZE;
6635    #elif defined COMPILE_PCRE16
6636                    *lengthptr += 2 + IMM2_SIZE;
6637    #elif defined COMPILE_PCRE32
6638                    *lengthptr += 4 + IMM2_SIZE;
6639    #endif
6640                    }
6641                  else
6642                    {
6643                    *code++ = OP_CLOSE;
6644                    PUT2INC(code, 0, oc->number);
6645                    }
6646                }                }
6647              setverb = *code++ =              setverb = *code++ =
6648                (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;                (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;

Legend:
Removed from v.1630  
changed lines
  Added in v.1631

  ViewVC Help
Powered by ViewVC 1.1.5