62 |
#include "string.h" |
#include "string.h" |
63 |
#include "regexp.h" |
#include "regexp.h" |
64 |
|
|
65 |
|
static int |
66 |
|
min_initial_branch_length(regexp *, unsigned char *, int); |
67 |
|
|
68 |
|
|
69 |
/* |
/* |
70 |
* The "internal use only" fields in regexp.h are present to pass info from |
* The "internal use only" fields in regexp.h are present to pass info from |
71 |
* compile to execute that permits the execute phase to run lots faster on |
* compile to execute that permits the execute phase to run lots faster on |
229 |
* Beware that the optimization-preparation code in here knows about some |
* Beware that the optimization-preparation code in here knows about some |
230 |
* of the structure of the compiled regexp. |
* of the structure of the compiled regexp. |
231 |
*/ |
*/ |
232 |
regexp * |
static regexp * |
233 |
regcomp(char *exp) |
regcomp(char *exp) |
234 |
{ |
{ |
235 |
register regexp *r; |
register regexp *r; |
769 |
If it is not 0 and is large, then a fast checking will be enabled. |
If it is not 0 and is large, then a fast checking will be enabled. |
770 |
|
|
771 |
*/ |
*/ |
772 |
int |
static int |
773 |
regexec(register regexp *prog, register char *string, char *start, int length) |
regexec(register regexp *prog, register char *string, char *start, int length) |
774 |
{ |
{ |
775 |
register char *s; |
register char *s; |
1470 |
*/ |
*/ |
1471 |
|
|
1472 |
#define MINIMIZE(loc,val) if (val < loc) loc=val |
#define MINIMIZE(loc,val) if (val < loc) loc=val |
1473 |
int |
static int |
1474 |
min_initial_branch_length(regexp *x, unsigned char *buf, int advance) |
min_initial_branch_length(regexp *x, unsigned char *buf, int advance) |
1475 |
{ char *s = x->program+1; |
{ char *s = x->program+1; |
1476 |
int overall = 10000; |
int overall = 10000; |