#endif
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
#include <ast/error.h>
#endif
static int grpmatch(Match_t *, int, char *, char *, char *, int);
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
#define RETURN(v) {error_info.indent--;return (v);}
#else
#define RETURN(v) {return (v);}
char *olds;
char *oldp;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error_info.indent++;
error(-1, "onematch g=%d s=%-.*s p=%s r=%p flags=%o", g, e - s, s, p,
r, flags);
mp->current.beg[n] = olds;
if (s > mp->current.end[n])
mp->current.end[n] = s;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-4,
"subgroup#%d n=%d beg=%p end=%p len=%d",
__LINE__, n, mp->current.beg[n],
mp->current.beg[n] = olds;
if (s > mp->current.end[n])
mp->current.end[n] = s;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-4,
"subgroup#%d n=%d beg=%p end=%p len=%d",
__LINE__, n, mp->current.beg[n],
&& mp->current.next_s <
mp->best.next_s))) {
mp->best = mp->current;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-3, "best#%d groups=%d next=\"%s\"",
__LINE__, mp->best.groups, mp->best.next_s);
#endif
RETURN(0);
if (pc >= '0' && pc <= '9') {
n = pc - '0';
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-2,
"backref#%d n=%d g=%d beg=%p end=%p len=%d",
__LINE__, n, g, mp->current.beg[n],
mp->best = mp->current;
mp->best.next_s = olds;
mp->best.groups = g;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-3, "best#%d groups=%d next=\"%s\"", __LINE__,
mp->best.groups, mp->best.next_s);
#endif
RETURN(0);
if (pc >= '0' && pc <= '9') {
n = pc - '0';
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-2, "backref#%d n=%d g=%d beg=%p end=%p len=%d",
__LINE__, n, g, mp->current.beg[n],
mp->current.end[n],
{
char *a;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error_info.indent++;
error(-1, "grpmatch g=%d s=%-.*s p=%s flags=%o", g, e - s, s, p,
flags);
match.current = match.best;
match.current.groups++;
match.current.end[0] = match.current.next_s;
-#if _DEBUG_MATCH
+#ifdef _DEBUG_MATCH
error(-1,
"match i=%d s=\"%s\" p=\"%s\" flags=%o groups=%d next=\"%s\"",
i, s, p, flags, match.current.groups,