From 500f6fced3712abc76678868f437f1cfa9e8c6a4 Mon Sep 17 00:00:00 2001 From: "neeti%netscape.com" Date: Tue, 15 May 2001 12:47:02 +0000 Subject: [PATCH] fix for bug 78639 - pics must not print to console in opt builds, r=dougt, sr=darin --- extensions/pics/src/nsPICS.cpp | 7 ++++++- extensions/pics/src/nsPICSElementObserver.cpp | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/pics/src/nsPICS.cpp b/extensions/pics/src/nsPICS.cpp index fad145f08d03..5956e29e0a62 100644 --- a/extensions/pics/src/nsPICS.cpp +++ b/extensions/pics/src/nsPICS.cpp @@ -389,14 +389,18 @@ nsPICS::ProcessPICSLabel(char *label) rs = ParsePICSLabel(label); status = CompareToUserSettings(rs, "http://www.w3.org/"); if(status == PICS_NO_RATINGS) { +#ifdef DEBUG printf("PICS_PassFailReturnVal %d", status); +#endif if(mPICSPagesMustBeRatedPref) status = PICS_RATINGS_FAILED; else status = PICS_RATINGS_PASSED; } } +#ifdef DEBUG printf("\nPICS_PassFailReturnVal %d\n", status); +#endif FreeRatingsStruct(rs); return status; } @@ -655,10 +659,11 @@ nsPICS::ParsePICSLabel(char * label) while((rating_value = (PICS_RatingValue *)HTList_nextObject(list_ptr)) != NULL) { +#ifdef DEBUG if (rating_value->name) printf(" rating_value->name: %s\n", rating_value->name); printf(" rating_value->value: %f\n\n", rating_value->value); - +#endif } diff --git a/extensions/pics/src/nsPICSElementObserver.cpp b/extensions/pics/src/nsPICSElementObserver.cpp index ef2f4cbb508b..b31ea179e2e3 100644 --- a/extensions/pics/src/nsPICSElementObserver.cpp +++ b/extensions/pics/src/nsPICSElementObserver.cpp @@ -146,7 +146,9 @@ NS_IMETHODIMP nsPICSElementObserver::Notify(PRUint32 aDocumentID, const nsString& theValue1=valueArray[0]; char *val1 = theValue1.ToNewCString(); if(theValue1.EqualsIgnoreCase("\"PICS-LABEL\"")) { +#ifdef DEBUG printf("\nReceived notification for a PICS-LABEl\n"); +#endif const nsString& theValue2=valueArray[1]; char *label = theValue2.ToNewCString(); if (valueArray[numOfAttributes]) {