fix for bug 78639 - pics must not print to console in opt builds, r=dougt, sr=darin

This commit is contained in:
neeti%netscape.com 2001-05-15 12:47:02 +00:00
parent 7360e10f74
commit 500f6fced3
2 changed files with 8 additions and 1 deletions

View File

@ -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
}

View File

@ -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]) {