printf(" rating_value->name: %s\n", rating_value->name); printf(" rating_value->value: %f\n\n", rating_value->value);
PRINTF(" rating_value->name: %s\n", rating_value->name); PRINTF(" rating_value->value: %f\n\n", rating_value->value);
nsPICS::ParsePICSLabel(char * label){	CSParse_t *CSParse_handle;  ClosureData *cd;	PICS_RatingsStruct *rs;	PICS_RatingsStruct *new_rs;  CSDoMore_t status;	HTList *list_ptr;  PICS_RatingValue *rating_value;	if(!label)		return NULL;	cd = PR_NEWZAP(ClosureData);	if(!cd)		return NULL;	rs = PR_NEWZAP(PICS_RatingsStruct);	if(!rs) {		PR_Free(cd);		return NULL;	}  rs->ratings = HTList_new();	cd->rs = rs;	/* parse pics label using w3c api */	CSParse_handle = CSParse_newLabel(&TargetCallback, &ParseErrorHandlerCallback);	if(!CSParse_handle)		return NULL;	do {		status = CSParse_parseChunk(CSParse_handle, label, PL_strlen(label), cd);	} while(status == CSDoMore_more);	if(cd->rs_invalid) {		FreeRatingsStruct(rs);		rs = NULL;  } else {		new_rs = CopyRatingsStruct(rs);		FreeRatingsStruct(rs);		rs = NULL;	}	list_ptr = new_rs->ratings;	while((rating_value = (PICS_RatingValue *)HTList_nextObject(list_ptr)) != NULL) {		if (rating_value->name) 			printf(" rating_value->name: %s\n", rating_value->name);		printf(" rating_value->value: %f\n\n", rating_value->value);	}	PR_Free(cd);  CSParse_deleteLabel(CSParse_handle);	return(new_rs);}