dont print pcre intensive debug messages, even in our debug builds (you can still enable it by defining PCRE_DEBUG on the project.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6161 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-11-04 11:41:31 +00:00
parent 8cd58e4ee4
commit d17d7b2993
4 changed files with 18 additions and 18 deletions

View File

@ -46,10 +46,10 @@ supporting internal functions that are not used by other modules. */
#include "pcre_internal.h" #include "pcre_internal.h"
/* When DEBUG is defined, we need the pcre_printint() function, which is also /* When PCRE_DEBUG is defined, we need the pcre_printint() function, which is also
used by pcretest. DEBUG is not defined when building a production library. */ used by pcretest. PCRE_DEBUG is not defined when building a production library. */
#ifdef DEBUG #ifdef PCRE_DEBUG
#include "pcre_printint.src" #include "pcre_printint.src"
#endif #endif
@ -5154,7 +5154,7 @@ if debugging, leave the test till after things are printed out. */
*code++ = OP_END; *code++ = OP_END;
#ifndef DEBUG #ifndef PCRE_DEBUG
if (code - codestart > length) errorcode = ERR23; if (code - codestart > length) errorcode = ERR23;
#endif #endif
@ -5223,7 +5223,7 @@ if (reqbyte >= 0 &&
/* Print out the compiled data if debugging is enabled. This is never the /* Print out the compiled data if debugging is enabled. This is never the
case when building a production library. */ case when building a production library. */
#ifdef DEBUG #ifdef PCRE_DEBUG
printf("Length = %d top_bracket = %d top_backref = %d\n", printf("Length = %d top_bracket = %d top_backref = %d\n",
length, re->top_bracket, re->top_backref); length, re->top_bracket, re->top_backref);

View File

@ -150,7 +150,7 @@ typedef struct stateblock {
#define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int)) #define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int))
#ifdef DEBUG #ifdef PCRE_DEBUG
/************************************************* /*************************************************
* Print character string * * Print character string *
*************************************************/ *************************************************/
@ -439,7 +439,7 @@ for (;;)
workspace[0] ^= 1; /* Remember for the restarting feature */ workspace[0] ^= 1; /* Remember for the restarting feature */
workspace[1] = active_count; workspace[1] = active_count;
#ifdef DEBUG #ifdef PCRE_DEBUG
printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP); printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP);
pchars((uschar *)ptr, strlen((char *)ptr), stdout); pchars((uschar *)ptr, strlen((char *)ptr), stdout);
printf("\"\n"); printf("\"\n");
@ -486,7 +486,7 @@ for (;;)
int count, codevalue; int count, codevalue;
int chartype, script; int chartype, script;
#ifdef DEBUG #ifdef PCRE_DEBUG
printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset);
if (c < 0) printf("-1\n"); if (c < 0) printf("-1\n");
else if (c > 32 && c < 127) printf("'%c'\n", c); else if (c > 32 && c < 127) printf("'%c'\n", c);

View File

@ -81,7 +81,7 @@ static const char rep_max[] = { 0, 0, 0, 0, 1, 1 };
#ifdef DEBUG #ifdef PCRE_DEBUG
/************************************************* /*************************************************
* Debugging function to print chars * * Debugging function to print chars *
*************************************************/ *************************************************/
@ -133,7 +133,7 @@ match_ref(int offset, register USPTR eptr, int length, match_data *md,
{ {
USPTR p = md->start_subject + md->offset_vector[offset]; USPTR p = md->start_subject + md->offset_vector[offset];
#ifdef DEBUG #ifdef PCRE_DEBUG
if (eptr >= md->end_subject) if (eptr >= md->end_subject)
printf("matching subject <null>"); printf("matching subject <null>");
else else
@ -195,7 +195,7 @@ versions and production versions. */
#ifndef NO_RECURSE #ifndef NO_RECURSE
#define REGISTER register #define REGISTER register
#ifdef DEBUG #ifdef PCRE_DEBUG
#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg) \ #define RMATCH(rx,ra,rb,rc,rd,re,rf,rg) \
{ \ { \
printf("match() called in line %d\n", __LINE__); \ printf("match() called in line %d\n", __LINE__); \
@ -537,7 +537,7 @@ TAIL_RECURSE:
/* OK, now we can get on with the real code of the function. Recursive calls /* 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 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() 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 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, complicated macro. It has to be used in one particular way. This shouldn't,
however, impact performance when true recursion is being used. */ however, impact performance when true recursion is being used. */
@ -608,7 +608,7 @@ for (;;)
number = GET2(ecode, 2+LINK_SIZE); number = GET2(ecode, 2+LINK_SIZE);
offset = number << 1; offset = number << 1;
#ifdef DEBUG #ifdef PCRE_DEBUG
printf("start bracket %d subject=", number); printf("start bracket %d subject=", number);
pchars(eptr, 16, TRUE, md); pchars(eptr, 16, TRUE, md);
printf("\n"); printf("\n");
@ -1116,7 +1116,7 @@ for (;;)
if (number > EXTRACT_BASIC_MAX) number = GET2(prev, 2+LINK_SIZE); if (number > EXTRACT_BASIC_MAX) number = GET2(prev, 2+LINK_SIZE);
offset = number << 1; offset = number << 1;
#ifdef DEBUG #ifdef PCRE_DEBUG
printf("end bracket %d", number); printf("end bracket %d", number);
printf("\n"); printf("\n");
#endif #endif
@ -3777,7 +3777,7 @@ do
end_subject = save_end_subject; end_subject = save_end_subject;
#ifdef DEBUG /* Sigh. Some compilers never learn. */ #ifdef PCRE_DEBUG /* Sigh. Some compilers never learn. */
printf(">>>> Match against: "); printf(">>>> Match against: ");
pchars(start_match, end_subject - start_match, TRUE, md); pchars(start_match, end_subject - start_match, TRUE, md);
printf("\n"); printf("\n");

View File

@ -45,10 +45,10 @@ functions whose names all begin with "_pcre_". */
#ifndef PCRE_INTERNAL_H #ifndef PCRE_INTERNAL_H
#define 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 #if 0
#define DEBUG #define PCRE_DEBUG
#endif #endif
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef /* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
@ -56,7 +56,7 @@ inline, and there are *still* stupid compilers about that don't like indented
pre-processor statements, or at least there were when I first wrote this. After pre-processor statements, or at least there were when I first wrote this. After
all, it had only been about 10 years then... */ all, it had only been about 10 years then... */
#ifdef DEBUG #ifdef PCRE_DEBUG
#define DPRINTF(p) printf p #define DPRINTF(p) printf p
#else #else
#define DPRINTF(p) /*nothing*/ #define DPRINTF(p) /*nothing*/