/[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 849 by ph10, Wed Jan 4 17:02:01 2012 UTC revision 852 by zherczeg, Thu Jan 5 19:18:12 2012 UTC
# Line 7563  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTIO Line 7563  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTIO
7563  pcre_compile(const char *pattern, int options, const char **errorptr,  pcre_compile(const char *pattern, int options, const char **errorptr,
7564    int *erroroffset, const unsigned char *tables)    int *erroroffset, const unsigned char *tables)
7565  #else  #else
7566  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION  PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
7567  pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errorptr,  pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errorptr,
7568    int *erroroffset, const unsigned char *tables)    int *erroroffset, const unsigned char *tables)
7569  #endif  #endif
# Line 7581  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTIO Line 7581  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTIO
7581  pcre_compile2(const char *pattern, int options, int *errorcodeptr,  pcre_compile2(const char *pattern, int options, int *errorcodeptr,
7582    const char **errorptr, int *erroroffset, const unsigned char *tables)    const char **errorptr, int *erroroffset, const unsigned char *tables)
7583  #else  #else
7584  PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION  PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
7585  pcre16_compile2(PCRE_SPTR16 pattern, int options, int *errorcodeptr,  pcre16_compile2(PCRE_SPTR16 pattern, int options, int *errorcodeptr,
7586    const char **errorptr, int *erroroffset, const unsigned char *tables)    const char **errorptr, int *erroroffset, const unsigned char *tables)
7587  #endif  #endif
7588  {  {
7589  real_pcre *re;  REAL_PCRE *re;
7590  int length = 1;  /* For final END opcode */  int length = 1;  /* For final END opcode */
7591  pcre_int32 firstchar, reqchar;  pcre_int32 firstchar, reqchar;
7592  int newline;  int newline;
# Line 7848  externally provided function. Integer ov Line 7848  externally provided function. Integer ov
7848  because nowadays we limit the maximum value of cd->names_found and  because nowadays we limit the maximum value of cd->names_found and
7849  cd->name_entry_size. */  cd->name_entry_size. */
7850    
7851  size = sizeof(real_pcre) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);  size = sizeof(REAL_PCRE) + (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);
7852  re = (real_pcre *)(PUBL(malloc))(size);  re = (REAL_PCRE *)(PUBL(malloc))(size);
7853    
7854  if (re == NULL)  if (re == NULL)
7855    {    {
# Line 7870  re->flags = cd->external_flags; Line 7870  re->flags = cd->external_flags;
7870  re->dummy1 = 0;  re->dummy1 = 0;
7871  re->first_char = 0;  re->first_char = 0;
7872  re->req_char = 0;  re->req_char = 0;
7873  re->name_table_offset = sizeof(real_pcre) / sizeof(pcre_uchar);  re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);
7874  re->name_entry_size = cd->name_entry_size;  re->name_entry_size = cd->name_entry_size;
7875  re->name_count = cd->names_found;  re->name_count = cd->names_found;
7876  re->ref_count = 0;  re->ref_count = 0;
# Line 8152  if (code - codestart > length) Line 8152  if (code - codestart > length)
8152    }    }
8153  #endif   /* PCRE_DEBUG */  #endif   /* PCRE_DEBUG */
8154    
8155    #ifdef COMPILE_PCRE8
8156  return (pcre *)re;  return (pcre *)re;
8157    #else
8158    return (pcre16 *)re;
8159    #endif
8160  }  }
8161    
8162  /* End of pcre_compile.c */  /* End of pcre_compile.c */

Legend:
Removed from v.849  
changed lines
  Added in v.852

  ViewVC Help
Powered by ViewVC 1.1.5