@@ -2558,47 +2558,6 @@ const char * Convert_PCRE_Runtime_Error (const int iError)
2558
2558
}
2559
2559
} // end of Convert_PCRE_Runtime_Error
2560
2560
2561
-
2562
- /* ************************************************
2563
- * Find first set of multiple named strings *
2564
- *************************************************/
2565
-
2566
- // taken from pcre_get.c - with minor modifications
2567
-
2568
- /* This function allows for duplicate names in the table of named substrings.
2569
- It returns the number of the first one that was set in a pattern match.
2570
-
2571
- Arguments:
2572
- code the compiled regex
2573
- stringname the name of the capturing substring
2574
- ovector the vector of matched substrings
2575
-
2576
- Returns: the number of the first that is set,
2577
- or the number of the last one if none are set,
2578
- or a negative number on error
2579
- */
2580
-
2581
- typedef unsigned char uschar;
2582
-
2583
- int
2584
- njg_get_first_set (const pcre *code, const char *stringname, const int *ovector)
2585
- {
2586
- const real_pcre *re = (const real_pcre *)code;
2587
- int entrysize;
2588
- char *first, *last;
2589
- uschar *entry;
2590
- if ((re->options & (PCRE_DUPNAMES | PCRE_JCHANGED)) == 0 )
2591
- return pcre_get_stringnumber (code, stringname);
2592
- entrysize = pcre_get_stringtable_entries (code, stringname, &first, &last);
2593
- if (entrysize <= 0 ) return entrysize;
2594
- for (entry = (uschar *)first; entry <= (uschar *)last; entry += entrysize)
2595
- {
2596
- int n = (entry[0 ] << 8 ) + entry[1 ];
2597
- if (ovector[n*2 ] >= 0 ) return n;
2598
- }
2599
- return (first[0 ] << 8 ) + first[1 ];
2600
- }
2601
-
2602
2561
// i18n (Internationalization) stuff
2603
2562
2604
2563
// translate message (eg. "File cannot be opened") into locale-specific language
0 commit comments