#include "pcre_internal.h"
-/* When DEBUG is defined, we need the pcre_printint() function, which is also
-used by pcretest. DEBUG is not defined when building a production library. */
+/* When PCRE_DEBUG is defined, we need the pcre_printint() function, which is also
+used by pcretest. PCRE_DEBUG is not defined when building a production library. */
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
#include "pcre_printint.src"
#endif
*code++ = OP_END;
-#ifndef DEBUG
+#ifndef PCRE_DEBUG
if (code - codestart > length) errorcode = ERR23;
#endif
/* Print out the compiled data if debugging is enabled. This is never the
case when building a production library. */
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("Length = %d top_bracket = %d top_backref = %d\n",
length, re->top_bracket, re->top_backref);
#define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int))
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
/*************************************************
* Print character string *
*************************************************/
workspace[0] ^= 1; /* Remember for the restarting feature */
workspace[1] = active_count;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP);
pchars((uschar *)ptr, strlen((char *)ptr), stdout);
printf("\"\n");
int count, codevalue;
int chartype, script;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset);
if (c < 0) printf("-1\n");
else if (c > 32 && c < 127) printf("'%c'\n", c);
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
/*************************************************
* Debugging function to print chars *
*************************************************/
{
USPTR p = md->start_subject + md->offset_vector[offset];
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
if (eptr >= md->end_subject)
printf("matching subject <null>");
else
#ifndef NO_RECURSE
#define REGISTER register
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg) \
{ \
printf("match() called in line %d\n", __LINE__); \
/* OK, now we can get on with the real code of the function. Recursive calls
are specified by the macro RMATCH and RRETURN is used to return. When
NO_RECURSE is *not* defined, these just turn into a recursive call to match()
-and a "return", respectively (possibly with some debugging if DEBUG is
+and a "return", respectively (possibly with some debugging if PCRE_DEBUG is
defined). However, RMATCH isn't like a function call because it's quite a
complicated macro. It has to be used in one particular way. This shouldn't,
however, impact performance when true recursion is being used. */
number = GET2(ecode, 2+LINK_SIZE);
offset = number << 1;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("start bracket %d subject=", number);
pchars(eptr, 16, TRUE, md);
printf("\n");
if (number > EXTRACT_BASIC_MAX) number = GET2(prev, 2+LINK_SIZE);
offset = number << 1;
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
printf("end bracket %d", number);
printf("\n");
#endif
end_subject = save_end_subject;
-#ifdef DEBUG /* Sigh. Some compilers never learn. */
+#ifdef PCRE_DEBUG /* Sigh. Some compilers never learn. */
printf(">>>> Match against: ");
pchars(start_match, end_subject - start_match, TRUE, md);
printf("\n");
#ifndef PCRE_INTERNAL_H
#define PCRE_INTERNAL_H
-/* Define DEBUG to get debugging output on stdout. */
+/* Define PCRE_DEBUG to get debugging output on stdout. */
#if 0
-#define DEBUG
+#define PCRE_DEBUG
#endif
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
pre-processor statements, or at least there were when I first wrote this. After
all, it had only been about 10 years then... */
-#ifdef DEBUG
+#ifdef PCRE_DEBUG
#define DPRINTF(p) printf p
#else
#define DPRINTF(p) /*nothing*/