"Fossies" - the Fresh Open Source Software Archive

Member "AutoHotkey_L-1.1.33.09/source/lib_pcre/pcre/pcre_get.c" (8 May 2021, 19453 Bytes) of package /windows/misc/AutoHotkey_L-1.1.33.09.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pcre_get.c" see the Fossies "Dox" file reference documentation.

    1 /*************************************************
    2 *      Perl-Compatible Regular Expressions       *
    3 *************************************************/
    4 
    5 /* PCRE is a library of functions to support regular expressions whose syntax
    6 and semantics are as close as possible to those of the Perl 5 language.
    7 
    8                        Written by Philip Hazel
    9            Copyright (c) 1997-2012 University of Cambridge
   10 
   11 -----------------------------------------------------------------------------
   12 Redistribution and use in source and binary forms, with or without
   13 modification, are permitted provided that the following conditions are met:
   14 
   15     * Redistributions of source code must retain the above copyright notice,
   16       this list of conditions and the following disclaimer.
   17 
   18     * Redistributions in binary form must reproduce the above copyright
   19       notice, this list of conditions and the following disclaimer in the
   20       documentation and/or other materials provided with the distribution.
   21 
   22     * Neither the name of the University of Cambridge nor the names of its
   23       contributors may be used to endorse or promote products derived from
   24       this software without specific prior written permission.
   25 
   26 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   27 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   28 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   29 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   30 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   31 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   32 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   33 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   34 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   35 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   36 POSSIBILITY OF SUCH DAMAGE.
   37 -----------------------------------------------------------------------------
   38 */
   39 
   40 
   41 /* This module contains some convenience functions for extracting substrings
   42 from the subject string after a regex match has succeeded. The original idea
   43 for these functions came from Scott Wimer. */
   44 
   45 
   46 #ifdef HAVE_CONFIG_H
   47 #include "config.h"
   48 #endif
   49 
   50 #include "pcre_internal.h"
   51 
   52 
   53 /*************************************************
   54 *           Find number for named string         *
   55 *************************************************/
   56 
   57 /* This function is used by the get_first_set() function below, as well
   58 as being generally available. It assumes that names are unique.
   59 
   60 Arguments:
   61   code        the compiled regex
   62   stringname  the name whose number is required
   63 
   64 Returns:      the number of the named parentheses, or a negative number
   65                 (PCRE_ERROR_NOSUBSTRING) if not found
   66 */
   67 
   68 #ifdef COMPILE_PCRE8
   69 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
   70 pcre_get_stringnumber(const pcre *code, const char *stringname)
   71 #else
   72 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
   73 pcre16_get_stringnumber(const pcre16 *code, PCRE_SPTR16 stringname)
   74 #endif
   75 {
   76 int rc;
   77 int entrysize;
   78 int top, bot;
   79 pcre_uchar *nametable;
   80 
   81 #ifdef COMPILE_PCRE8
   82 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
   83   return rc;
   84 if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
   85 
   86 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
   87   return rc;
   88 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
   89   return rc;
   90 #endif
   91 #ifdef COMPILE_PCRE16
   92 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
   93   return rc;
   94 if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
   95 
   96 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
   97   return rc;
   98 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
   99   return rc;
  100 #endif
  101 
  102 bot = 0;
  103 while (top > bot)
  104   {
  105   int mid = (top + bot) / 2;
  106   pcre_uchar *entry = nametable + entrysize*mid;
  107   int c = STRCMP_UC_UC((pcre_uchar *)stringname,
  108     (pcre_uchar *)(entry + IMM2_SIZE));
  109   if (c == 0) return GET2(entry, 0);
  110   if (c > 0) bot = mid + 1; else top = mid;
  111   }
  112 
  113 return PCRE_ERROR_NOSUBSTRING;
  114 }
  115 
  116 
  117 
  118 /*************************************************
  119 *     Find (multiple) entries for named string   *
  120 *************************************************/
  121 
  122 /* This is used by the get_first_set() function below, as well as being
  123 generally available. It is used when duplicated names are permitted.
  124 
  125 Arguments:
  126   code        the compiled regex
  127   stringname  the name whose entries required
  128   firstptr    where to put the pointer to the first entry
  129   lastptr     where to put the pointer to the last entry
  130 
  131 Returns:      the length of each entry, or a negative number
  132                 (PCRE_ERROR_NOSUBSTRING) if not found
  133 */
  134 
  135 #ifdef COMPILE_PCRE8
  136 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  137 pcre_get_stringtable_entries(const pcre *code, const char *stringname,
  138   char **firstptr, char **lastptr)
  139 #else
  140 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  141 pcre16_get_stringtable_entries(const pcre16 *code, PCRE_SPTR16 stringname,
  142   PCRE_UCHAR16 **firstptr, PCRE_UCHAR16 **lastptr)
  143 #endif
  144 {
  145 int rc;
  146 int entrysize;
  147 int top, bot;
  148 pcre_uchar *nametable, *lastentry;
  149 
  150 #ifdef COMPILE_PCRE8
  151 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
  152   return rc;
  153 if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
  154 
  155 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
  156   return rc;
  157 if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
  158   return rc;
  159 #endif
  160 #ifdef COMPILE_PCRE16
  161 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
  162   return rc;
  163 if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
  164 
  165 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
  166   return rc;
  167 if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
  168   return rc;
  169 #endif
  170 
  171 lastentry = nametable + entrysize * (top - 1);
  172 bot = 0;
  173 while (top > bot)
  174   {
  175   int mid = (top + bot) / 2;
  176   pcre_uchar *entry = nametable + entrysize*mid;
  177   int c = STRCMP_UC_UC((pcre_uchar *)stringname,
  178     (pcre_uchar *)(entry + IMM2_SIZE));
  179   if (c == 0)
  180     {
  181     pcre_uchar *first = entry;
  182     pcre_uchar *last = entry;
  183     while (first > nametable)
  184       {
  185       if (STRCMP_UC_UC((pcre_uchar *)stringname,
  186         (pcre_uchar *)(first - entrysize + IMM2_SIZE)) != 0) break;
  187       first -= entrysize;
  188       }
  189     while (last < lastentry)
  190       {
  191       if (STRCMP_UC_UC((pcre_uchar *)stringname,
  192         (pcre_uchar *)(last + entrysize + IMM2_SIZE)) != 0) break;
  193       last += entrysize;
  194       }
  195 #ifdef COMPILE_PCRE8
  196     *firstptr = (char *)first;
  197     *lastptr = (char *)last;
  198 #else
  199     *firstptr = (PCRE_UCHAR16 *)first;
  200     *lastptr = (PCRE_UCHAR16 *)last;
  201 #endif
  202     return entrysize;
  203     }
  204   if (c > 0) bot = mid + 1; else top = mid;
  205   }
  206 
  207 return PCRE_ERROR_NOSUBSTRING;
  208 }
  209 
  210 
  211 
  212 /*************************************************
  213 *    Find first set of multiple named strings    *
  214 *************************************************/
  215 
  216 /* This function allows for duplicate names in the table of named substrings.
  217 It returns the number of the first one that was set in a pattern match.
  218 
  219 Arguments:
  220   code         the compiled regex
  221   stringname   the name of the capturing substring
  222   ovector      the vector of matched substrings
  223 
  224 Returns:       the number of the first that is set,
  225                or the number of the last one if none are set,
  226                or a negative number on error
  227 */
  228 
  229 #ifdef COMPILE_PCRE8
  230 static int
  231 get_first_set(const pcre *code, const char *stringname, int *ovector)
  232 #else
  233 static int
  234 get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
  235 #endif
  236 {
  237 const REAL_PCRE *re = (const REAL_PCRE *)code;
  238 int entrysize;
  239 pcre_uchar *entry;
  240 #ifdef COMPILE_PCRE8
  241 char *first, *last;
  242 #else
  243 PCRE_UCHAR16 *first, *last;
  244 #endif
  245 
  246 #ifdef COMPILE_PCRE8
  247 if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
  248   return pcre_get_stringnumber(code, stringname);
  249 entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
  250 #else
  251 if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
  252   return pcre16_get_stringnumber(code, stringname);
  253 entrysize = pcre16_get_stringtable_entries(code, stringname, &first, &last);
  254 #endif
  255 if (entrysize <= 0) return entrysize;
  256 for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
  257   {
  258   int n = GET2(entry, 0);
  259   if (ovector[n*2] >= 0) return n;
  260   }
  261 return GET2(entry, 0);
  262 }
  263 
  264 
  265 /* Exported function for AutoHotkey use: */
  266 #ifdef COMPILE_PCRE8
  267 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  268 pcre_get_first_set(const pcre *code, const char *stringname, int *ovector)
  269 #else
  270 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  271 pcre16_get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
  272 #endif
  273 {
  274 return get_first_set(code, stringname, ovector);
  275 }
  276 
  277 
  278 
  279 /*************************************************
  280 *      Copy captured string to given buffer      *
  281 *************************************************/
  282 
  283 /* This function copies a single captured substring into a given buffer.
  284 Note that we use memcpy() rather than strncpy() in case there are binary zeros
  285 in the string.
  286 
  287 Arguments:
  288   subject        the subject string that was matched
  289   ovector        pointer to the offsets table
  290   stringcount    the number of substrings that were captured
  291                    (i.e. the yield of the pcre_exec call, unless
  292                    that was zero, in which case it should be 1/3
  293                    of the offset table size)
  294   stringnumber   the number of the required substring
  295   buffer         where to put the substring
  296   size           the size of the buffer
  297 
  298 Returns:         if successful:
  299                    the length of the copied string, not including the zero
  300                    that is put on the end; can be zero
  301                  if not successful:
  302                    PCRE_ERROR_NOMEMORY (-6) buffer too small
  303                    PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
  304 */
  305 
  306 #ifdef COMPILE_PCRE8
  307 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  308 pcre_copy_substring(const char *subject, int *ovector, int stringcount,
  309   int stringnumber, char *buffer, int size)
  310 #else
  311 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  312 pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
  313   int stringnumber, PCRE_UCHAR16 *buffer, int size)
  314 #endif
  315 {
  316 int yield;
  317 if (stringnumber < 0 || stringnumber >= stringcount)
  318   return PCRE_ERROR_NOSUBSTRING;
  319 stringnumber *= 2;
  320 yield = ovector[stringnumber+1] - ovector[stringnumber];
  321 if (size < yield + 1) return PCRE_ERROR_NOMEMORY;
  322 memcpy(buffer, subject + ovector[stringnumber], IN_UCHARS(yield));
  323 buffer[yield] = 0;
  324 return yield;
  325 }
  326 
  327 
  328 
  329 /*************************************************
  330 *   Copy named captured string to given buffer   *
  331 *************************************************/
  332 
  333 /* This function copies a single captured substring into a given buffer,
  334 identifying it by name. If the regex permits duplicate names, the first
  335 substring that is set is chosen.
  336 
  337 Arguments:
  338   code           the compiled regex
  339   subject        the subject string that was matched
  340   ovector        pointer to the offsets table
  341   stringcount    the number of substrings that were captured
  342                    (i.e. the yield of the pcre_exec call, unless
  343                    that was zero, in which case it should be 1/3
  344                    of the offset table size)
  345   stringname     the name of the required substring
  346   buffer         where to put the substring
  347   size           the size of the buffer
  348 
  349 Returns:         if successful:
  350                    the length of the copied string, not including the zero
  351                    that is put on the end; can be zero
  352                  if not successful:
  353                    PCRE_ERROR_NOMEMORY (-6) buffer too small
  354                    PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
  355 */
  356 
  357 #ifdef COMPILE_PCRE8
  358 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  359 pcre_copy_named_substring(const pcre *code, const char *subject,
  360   int *ovector, int stringcount, const char *stringname,
  361   char *buffer, int size)
  362 #else
  363 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  364 pcre16_copy_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
  365   int *ovector, int stringcount, PCRE_SPTR16 stringname,
  366   PCRE_UCHAR16 *buffer, int size)
  367 #endif
  368 {
  369 int n = get_first_set(code, stringname, ovector);
  370 if (n <= 0) return n;
  371 #ifdef COMPILE_PCRE8
  372 return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
  373 #else
  374 return pcre16_copy_substring(subject, ovector, stringcount, n, buffer, size);
  375 #endif
  376 }
  377 
  378 
  379 
  380 /*************************************************
  381 *      Copy all captured strings to new store    *
  382 *************************************************/
  383 
  384 /* This function gets one chunk of store and builds a list of pointers and all
  385 of the captured substrings in it. A NULL pointer is put on the end of the list.
  386 
  387 Arguments:
  388   subject        the subject string that was matched
  389   ovector        pointer to the offsets table
  390   stringcount    the number of substrings that were captured
  391                    (i.e. the yield of the pcre_exec call, unless
  392                    that was zero, in which case it should be 1/3
  393                    of the offset table size)
  394   listptr        set to point to the list of pointers
  395 
  396 Returns:         if successful: 0
  397                  if not successful:
  398                    PCRE_ERROR_NOMEMORY (-6) failed to get store
  399 */
  400 
  401 #ifdef COMPILE_PCRE8
  402 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  403 pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
  404   const char ***listptr)
  405 #else
  406 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  407 pcre16_get_substring_list(PCRE_SPTR16 subject, int *ovector, int stringcount,
  408   PCRE_SPTR16 **listptr)
  409 #endif
  410 {
  411 int i;
  412 int size = sizeof(pcre_uchar *);
  413 int double_count = stringcount * 2;
  414 pcre_uchar **stringlist;
  415 pcre_uchar *p;
  416 
  417 for (i = 0; i < double_count; i += 2)
  418   size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
  419 
  420 stringlist = (pcre_uchar **)(PUBL(malloc))(size);
  421 if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
  422 
  423 #ifdef COMPILE_PCRE8
  424 *listptr = (const char **)stringlist;
  425 #else
  426 *listptr = (PCRE_SPTR16 *)stringlist;
  427 #endif
  428 p = (pcre_uchar *)(stringlist + stringcount + 1);
  429 
  430 for (i = 0; i < double_count; i += 2)
  431   {
  432   int len = ovector[i+1] - ovector[i];
  433   memcpy(p, subject + ovector[i], IN_UCHARS(len));
  434   *stringlist++ = p;
  435   p += len;
  436   *p++ = 0;
  437   }
  438 
  439 *stringlist = NULL;
  440 return 0;
  441 }
  442 
  443 
  444 
  445 /*************************************************
  446 *   Free store obtained by get_substring_list    *
  447 *************************************************/
  448 
  449 /* This function exists for the benefit of people calling PCRE from non-C
  450 programs that can call its functions, but not free() or (PUBL(free))()
  451 directly.
  452 
  453 Argument:   the result of a previous pcre_get_substring_list()
  454 Returns:    nothing
  455 */
  456 
  457 #ifdef COMPILE_PCRE8
  458 PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
  459 pcre_free_substring_list(const char **pointer)
  460 #else
  461 PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
  462 pcre16_free_substring_list(PCRE_SPTR16 *pointer)
  463 #endif
  464 {
  465 (PUBL(free))((void *)pointer);
  466 }
  467 
  468 
  469 
  470 /*************************************************
  471 *      Copy captured string to new store         *
  472 *************************************************/
  473 
  474 /* This function copies a single captured substring into a piece of new
  475 store
  476 
  477 Arguments:
  478   subject        the subject string that was matched
  479   ovector        pointer to the offsets table
  480   stringcount    the number of substrings that were captured
  481                    (i.e. the yield of the pcre_exec call, unless
  482                    that was zero, in which case it should be 1/3
  483                    of the offset table size)
  484   stringnumber   the number of the required substring
  485   stringptr      where to put a pointer to the substring
  486 
  487 Returns:         if successful:
  488                    the length of the string, not including the zero that
  489                    is put on the end; can be zero
  490                  if not successful:
  491                    PCRE_ERROR_NOMEMORY (-6) failed to get store
  492                    PCRE_ERROR_NOSUBSTRING (-7) substring not present
  493 */
  494 
  495 #ifdef COMPILE_PCRE8
  496 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  497 pcre_get_substring(const char *subject, int *ovector, int stringcount,
  498   int stringnumber, const char **stringptr)
  499 #else
  500 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  501 pcre16_get_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
  502   int stringnumber, PCRE_SPTR16 *stringptr)
  503 #endif
  504 {
  505 int yield;
  506 pcre_uchar *substring;
  507 if (stringnumber < 0 || stringnumber >= stringcount)
  508   return PCRE_ERROR_NOSUBSTRING;
  509 stringnumber *= 2;
  510 yield = ovector[stringnumber+1] - ovector[stringnumber];
  511 substring = (pcre_uchar *)(PUBL(malloc))(IN_UCHARS(yield + 1));
  512 if (substring == NULL) return PCRE_ERROR_NOMEMORY;
  513 memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield));
  514 substring[yield] = 0;
  515 #ifdef COMPILE_PCRE8
  516 *stringptr = (const char *)substring;
  517 #else
  518 *stringptr = (PCRE_SPTR16)substring;
  519 #endif
  520 return yield;
  521 }
  522 
  523 
  524 
  525 /*************************************************
  526 *   Copy named captured string to new store      *
  527 *************************************************/
  528 
  529 /* This function copies a single captured substring, identified by name, into
  530 new store. If the regex permits duplicate names, the first substring that is
  531 set is chosen.
  532 
  533 Arguments:
  534   code           the compiled regex
  535   subject        the subject string that was matched
  536   ovector        pointer to the offsets table
  537   stringcount    the number of substrings that were captured
  538                    (i.e. the yield of the pcre_exec call, unless
  539                    that was zero, in which case it should be 1/3
  540                    of the offset table size)
  541   stringname     the name of the required substring
  542   stringptr      where to put the pointer
  543 
  544 Returns:         if successful:
  545                    the length of the copied string, not including the zero
  546                    that is put on the end; can be zero
  547                  if not successful:
  548                    PCRE_ERROR_NOMEMORY (-6) couldn't get memory
  549                    PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
  550 */
  551 
  552 #ifdef COMPILE_PCRE8
  553 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  554 pcre_get_named_substring(const pcre *code, const char *subject,
  555   int *ovector, int stringcount, const char *stringname,
  556   const char **stringptr)
  557 #else
  558 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
  559 pcre16_get_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
  560   int *ovector, int stringcount, PCRE_SPTR16 stringname,
  561   PCRE_SPTR16 *stringptr)
  562 #endif
  563 {
  564 int n = get_first_set(code, stringname, ovector);
  565 if (n <= 0) return n;
  566 #ifdef COMPILE_PCRE8
  567 return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
  568 #else
  569 return pcre16_get_substring(subject, ovector, stringcount, n, stringptr);
  570 #endif
  571 }
  572 
  573 
  574 
  575 
  576 /*************************************************
  577 *       Free store obtained by get_substring     *
  578 *************************************************/
  579 
  580 /* This function exists for the benefit of people calling PCRE from non-C
  581 programs that can call its functions, but not free() or (PUBL(free))()
  582 directly.
  583 
  584 Argument:   the result of a previous pcre_get_substring()
  585 Returns:    nothing
  586 */
  587 
  588 #ifdef COMPILE_PCRE8
  589 PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
  590 pcre_free_substring(const char *pointer)
  591 #else
  592 PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
  593 pcre16_free_substring(PCRE_SPTR16 pointer)
  594 #endif
  595 {
  596 (PUBL(free))((void *)pointer);
  597 }
  598 
  599 /* End of pcre_get.c */