if (*tempBuffer) { if (tempBuffer[0]) { PRUint32 length = PL_strlen(tempBuffer); if (length > 0 && tempBuffer[length-1] == '\r') tempBuffer[length-1] = '\0';    m_userData[0] = '\0'; PL_strcpy(m_userData, tempBuffer); }  }
strip_nonprintable(tempBuffer); PL_strcpy(m_userData, tempBuffer);
nsresult nsNntpTestDriver::PromptForUserDataAndBuildUrl(const char * userPrompt){	char tempBuffer[500];	tempBuffer[0] = '\0'; 	if (userPrompt)		printf(userPrompt);	else		printf("Enter data for command: ");    fgets(tempBuffer, sizeof(tempBuffer), stdin);	if (*tempBuffer)	{		if (tempBuffer[0])  // kill off any CR or LFs...		{			PRUint32 length = PL_strlen(tempBuffer);			if (length > 0 && tempBuffer[length-1] == '\r')				tempBuffer[length-1] = '\0';			// okay, user gave us a valid line so copy it into the user data field..o.t. leave user			// data field untouched. This allows us to use default values for things...			m_userData[0] = '\0';			PL_strcpy(m_userData, tempBuffer);		}			}	return NS_OK;}