/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
* Neither the name of the University of Cambridge nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
/* This module contains the external function pcre_fullinfo(), which returns
information about a compiled pattern. */
#ifdef HAVE_PCRE_CONFIG_H
#include "pcre_config.h"
#endif
#include "pcre_internal.h"
/*************************************************
* Return info about compiled pattern *
*************************************************/
/* This is a newer "info" function which has an extensible interface so
that additional items can be added compatibly.
Arguments:
argument_re points to compiled code
extra_data points extra data, or NULL
what what information is required
where where to put the information
Returns: 0 if data returned, negative on error
*/
#if defined COMPILE_PCRE8
#elif defined COMPILE_PCRE16
#elif defined COMPILE_PCRE32
#endif
{
/* Check that the first field in the block is the magic number. If it is not,
return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
means that the pattern is likely compiled with different endianness. */
/* Check that this pattern was compiled in the correct bit mode */
switch (what)
{
case PCRE_INFO_OPTIONS:
break;
case PCRE_INFO_SIZE:
break;
case PCRE_INFO_STUDYSIZE:
break;
case PCRE_INFO_JITSIZE:
#ifdef SUPPORT_JIT
(extra_data != NULL &&
#else
#endif
break;
case PCRE_INFO_CAPTURECOUNT:
break;
case PCRE_INFO_BACKREFMAX:
break;
case PCRE_INFO_FIRSTBYTE:
*((int *)where) =
break;
case PCRE_INFO_FIRSTCHARACTER:
*((pcre_uint32 *)where) =
break;
*((int *)where) =
break;
/* Make sure we pass back the pointer to the bit vector in the external
block, not the internal copy (with flipped integer fields). */
case PCRE_INFO_FIRSTTABLE:
*((const pcre_uint8 **)where) =
break;
case PCRE_INFO_MINLENGTH:
*((int *)where) =
break;
case PCRE_INFO_JIT:
break;
case PCRE_INFO_LASTLITERAL:
*((int *)where) =
break;
case PCRE_INFO_REQUIREDCHAR:
*((pcre_uint32 *)where) =
break;
*((int *)where) =
break;
case PCRE_INFO_NAMEENTRYSIZE:
break;
case PCRE_INFO_NAMECOUNT:
break;
case PCRE_INFO_NAMETABLE:
break;
case PCRE_INFO_DEFAULT_TABLES:
break;
/* From release 8.00 this will always return TRUE because NOPARTIAL is
no longer ever set (the restrictions have been removed). */
case PCRE_INFO_OKPARTIAL:
break;
case PCRE_INFO_JCHANGED:
break;
case PCRE_INFO_HASCRORLF:
break;
case PCRE_INFO_MAXLOOKBEHIND:
break;
case PCRE_INFO_MATCHLIMIT:
break;
case PCRE_INFO_RECURSIONLIMIT:
break;
case PCRE_INFO_MATCH_EMPTY:
break;
default: return PCRE_ERROR_BADOPTION;
}
return 0;
}
/* End of pcre_fullinfo.c */