*pwd = ToNewUnicode(nsDependentCString(p));
*pwd = NS_StringCloneData(NS_ConvertUTF8toUTF16(p));
TestAuthPrompt::PromptUsernameAndPassword(const PRUnichar *dialogTitle,                                          const PRUnichar *dialogText,                                          const PRUnichar *passwordRealm,                                          PRUint32 savePassword,                                          PRUnichar **user,                                          PRUnichar **pwd,                                          PRBool *_retval){    NS_ConvertUTF16toUTF8 text(passwordRealm);    printf("* --------------------------------------------------------------------------- *\n");    printf("* Authentication Required [%s]\n", text.get());    printf("* --------------------------------------------------------------------------- *\n");    char buf[256];    int n;    printf("Enter username: ");    fgets(buf, sizeof(buf), stdin);    n = strlen(buf);    buf[n-1] = '\0'; // trim trailing newline    *user = ToNewUnicode(nsDependentCString(buf));    const char *p;#ifdef XP_UNIX    p = getpass("Enter password: ");#else    printf("Enter password: ");    fgets(buf, sizeof(buf), stdin);    n = strlen(buf);    buf[n-1] = '\0'; // trim trailing newline    p = buf;#endif    *pwd = ToNewUnicode(nsDependentCString(p));    // zap buf     memset(buf, 0, sizeof(buf));    *_retval = PR_TRUE;    return NS_OK;}