rv = prefs->Startup("prefs50.js"); if (NS_FAILED(rv)) printf("Couldn't read prefs\n");
int main() {  nsresult rv;  NS_SetupRegistry();  printf("Kicking off prefs\n");  static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);  nsIPref *prefs;  // start up prefs  rv = nsServiceManager::GetService(kPrefServiceCID,                                    nsIPref::GetIID(),                                    (nsISupports**)&prefs);  if (NS_FAILED(rv)) {    printf("Couldn't start prefs\n");    exit(1);  }  rv = prefs->Startup("prefs50.js");  if (NS_FAILED(rv)) printf("Couldn't read prefs\n");  nsIMsgAccountManager *accountManager;  rv = nsComponentManager::CreateInstance(kMsgAccountManagerCID,                                          nsnull,                                          nsIMsgAccountManager::GetIID(),                                          (void **)&accountManager);  if (NS_FAILED(rv)) {    printf("Couldn't create the account manager. Check that autoregistration is working\n");    return 1;  }  rv = accountManager->LoadAccounts();  if (NS_FAILED(rv)) {    printf("Error loading accounts\n");    return 1;  }    nsIMsgAccount *account;  rv = accountManager->GetDefaultAccount(&account);  if (NS_FAILED(rv)) {    printf("Error getting default account\n");    return 1;  }  rv = printAccount(account);    if (NS_FAILED(rv)) {    printf("Error %8.8X printing account\n", rv);    return 1;  }}