/[pcre]/code/branches/pcre16/pcre_fullinfo.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_fullinfo.c

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

code/trunk/pcre_fullinfo.c revision 389 by ph10, Sun Mar 15 18:24:05 2009 UTC code/branches/pcre16/pcre_fullinfo.c revision 764 by zherczeg, Wed Nov 23 17:23:20 2011 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-2009 University of Cambridge             Copyright (c) 1997-2011 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 81  if (extra_data != NULL && (extra_data->f Line 81  if (extra_data != NULL && (extra_data->f
81    
82  if (re->magic_number != MAGIC_NUMBER)  if (re->magic_number != MAGIC_NUMBER)
83    {    {
84    re = _pcre_try_flipped(re, &internal_re, study, &internal_study);    re = PRIV(try_flipped)(re, &internal_re, study, &internal_study);
85    if (re == NULL) return PCRE_ERROR_BADMAGIC;    if (re == NULL) return PCRE_ERROR_BADMAGIC;
86    if (study != NULL) study = &internal_study;    if (study != NULL) study = &internal_study;
87    }    }
# Line 118  switch (what) Line 118  switch (what)
118    block, not the internal copy (with flipped integer fields). */    block, not the internal copy (with flipped integer fields). */
119    
120    case PCRE_INFO_FIRSTTABLE:    case PCRE_INFO_FIRSTTABLE:
121    *((const uschar **)where) =    *((const pcre_uint8 **)where) =
122      (study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)?      (study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)?
123        ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;        ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
124    break;    break;
125    
126      case PCRE_INFO_MINLENGTH:
127      *((int *)where) =
128        (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)?
129          study->minlength : -1;
130      break;
131    
132      case PCRE_INFO_JIT:
133      *((int *)where) = extra_data != NULL &&
134                        (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
135                        extra_data->executable_jit != NULL;
136      break;
137    
138    case PCRE_INFO_LASTLITERAL:    case PCRE_INFO_LASTLITERAL:
139    *((int *)where) =    *((int *)where) =
140      ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;      ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;
# Line 137  switch (what) Line 149  switch (what)
149    break;    break;
150    
151    case PCRE_INFO_NAMETABLE:    case PCRE_INFO_NAMETABLE:
152    *((const uschar **)where) = (const uschar *)re + re->name_table_offset;    *((const pcre_uchar **)where) = (const pcre_uchar *)re + re->name_table_offset;
153    break;    break;
154    
155    case PCRE_INFO_DEFAULT_TABLES:    case PCRE_INFO_DEFAULT_TABLES:
156    *((const uschar **)where) = (const uschar *)(_pcre_default_tables);    *((const pcre_uint8 **)where) = (const pcre_uint8 *)(PRIV(default_tables));
157    break;    break;
158    
159      /* From release 8.00 this will always return TRUE because NOPARTIAL is
160      no longer ever set (the restrictions have been removed). */
161    
162    case PCRE_INFO_OKPARTIAL:    case PCRE_INFO_OKPARTIAL:
163    *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;    *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
164    break;    break;

Legend:
Removed from v.389  
changed lines
  Added in v.764

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12