diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-16 17:13:45 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-16 17:13:45 -0500 |
commit | 6e39e7c9b3ff97c16d9b2253629589e6f40ddfa4 (patch) | |
tree | bc480cfc70006bea4a46ab00cceb209b0a3e72fb /src/init.cpp | |
parent | ab6c45372c61d2092ca888108bdc9067a1115b8e (diff) |
Move more newlines out of strings, and fix translations.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/init.cpp b/src/init.cpp index 471757a73f..76317557bc 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -329,36 +329,36 @@ bool AppInit2(int argc, char* argv[]) } // Bind to the port early so we can tell if another instance is already running. - string strErrors; if (!fNoListen) { - if (!BindListenPort(strErrors)) + std::string strError; + if (!BindListenPort(strError)) { - wxMessageBox(strErrors, "Bitcoin"); + wxMessageBox(strError, "Bitcoin"); return false; } } + std::ostringstream strErrors; // // Load data files // if (fDaemon) fprintf(stdout, "bitcoin server starting\n"); - strErrors = ""; int64 nStart; InitMessage(_("Loading addresses...")); printf("Loading addresses...\n"); nStart = GetTimeMillis(); if (!LoadAddresses()) - strErrors += _("Error loading addr.dat \n"); + strErrors << _("Error loading addr.dat") << "\n"; printf(" addresses %15"PRI64d"ms\n", GetTimeMillis() - nStart); InitMessage(_("Loading block index...")); printf("Loading block index...\n"); nStart = GetTimeMillis(); if (!LoadBlockIndex()) - strErrors += _("Error loading blkindex.dat \n"); + strErrors << _("Error loading blkindex.dat") << "\n"; printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart); InitMessage(_("Loading wallet...")); @@ -370,17 +370,17 @@ bool AppInit2(int argc, char* argv[]) if (nLoadWalletRet != DB_LOAD_OK) { if (nLoadWalletRet == DB_CORRUPT) - strErrors += _("Error loading wallet.dat: Wallet corrupted \n"); + strErrors << _("Error loading wallet.dat: Wallet corrupted") << "\n"; else if (nLoadWalletRet == DB_TOO_NEW) - strErrors += _("Error loading wallet.dat: Wallet requires newer version of Bitcoin \n"); + strErrors << _("Error loading wallet.dat: Wallet requires newer version of Bitcoin") << "\n"; else if (nLoadWalletRet == DB_NEED_REWRITE) { - strErrors += _("Wallet needed to be rewritten: restart Bitcoin to complete \n"); - wxMessageBox(strErrors, "Bitcoin", wxOK | wxICON_ERROR); + strErrors << _("Wallet needed to be rewritten: restart Bitcoin to complete") << "\n"; + wxMessageBox(strErrors.str(), "Bitcoin", wxOK | wxICON_ERROR); return false; } else - strErrors += _("Error loading wallet.dat \n"); + strErrors << _("Error loading wallet.dat") << "\n"; } printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); @@ -408,16 +408,16 @@ bool AppInit2(int argc, char* argv[]) InitMessage(_("Done loading")); printf("Done loading\n"); - //// debug print - printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size()); - printf("nBestHeight = %d\n", nBestHeight); - printf("setKeyPool.size() = %d\n", pwalletMain->setKeyPool.size()); - printf("mapWallet.size() = %d\n", pwalletMain->mapWallet.size()); - printf("mapAddressBook.size() = %d\n", pwalletMain->mapAddressBook.size()); + //// debug print + printf("mapBlockIndex.size() = %d\n", mapBlockIndex.size()); + printf("nBestHeight = %d\n", nBestHeight); + printf("setKeyPool.size() = %d\n", pwalletMain->setKeyPool.size()); + printf("mapWallet.size() = %d\n", pwalletMain->mapWallet.size()); + printf("mapAddressBook.size() = %d\n", pwalletMain->mapAddressBook.size()); - if (!strErrors.empty()) + if (!strErrors.str().empty()) { - wxMessageBox(strErrors, "Bitcoin", wxOK | wxICON_ERROR); + wxMessageBox(strErrors.str(), "Bitcoin", wxOK | wxICON_ERROR); return false; } |