mirror of
https://github.com/cesanta/slre.git
synced 2025-03-13 01:05:29 +00:00
Merge 8aa351d1a7
into 9cc3fe9731
This commit is contained in:
commit
0e1d9aeed0
12
slre.c
12
slre.c
@ -290,7 +290,11 @@ static int bar(const char *re, int re_len, const char *s, int s_len,
|
|||||||
|
|
||||||
/* Process branch points */
|
/* Process branch points */
|
||||||
static int doh(const char *s, int s_len, struct regex_info *info, int bi) {
|
static int doh(const char *s, int s_len, struct regex_info *info, int bi) {
|
||||||
const struct bracket_pair *b = &info->brackets[bi];
|
const struct
|
||||||
|
# ifdef __cplusplus
|
||||||
|
regex_info::
|
||||||
|
# endif
|
||||||
|
bracket_pair *b = &info->brackets[bi];
|
||||||
int i = 0, len, result;
|
int i = 0, len, result;
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
@ -309,7 +313,11 @@ static int doh(const char *s, int s_len, struct regex_info *info, int bi) {
|
|||||||
|
|
||||||
static void setup_branch_points(struct regex_info *info) {
|
static void setup_branch_points(struct regex_info *info) {
|
||||||
int i, j;
|
int i, j;
|
||||||
struct branch tmp;
|
struct
|
||||||
|
# ifdef __cplusplus
|
||||||
|
regex_info::
|
||||||
|
# endif
|
||||||
|
branch tmp;
|
||||||
|
|
||||||
/* First, sort branches. Must be stable, no qsort. Use bubble algo. */
|
/* First, sort branches. Must be stable, no qsort. Use bubble algo. */
|
||||||
for (i = 0; i < info->num_branches; i++) {
|
for (i = 0; i < info->num_branches; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user