![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
#include "util.h"
#include "chainparams.h"
#include "netbase.h"
#include "sync.h"
#include "ui_interface.h"
#include "uint256.h"
#include "version.h"
#include <stdarg.h>
#include <algorithm>
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>
#include <openssl/crypto.h>
#include <openssl/rand.h>
Go to the source code of this file.
Classes | |
class | CInit |
Functions | |
void | locking_callback (int mode, int i, const char *file, int line) |
void | RandAddSeed () |
void | RandAddSeedPerfmon () |
uint64_t | GetRand (uint64_t nMax) |
int | GetRandInt (int nMax) |
uint256 | GetRandHash () |
bool | LogAcceptCategory (const char *category) |
int | LogPrintStr (const std::string &str) |
string | FormatMoney (int64_t n, bool fPlus) |
bool | ParseMoney (const string &str, int64_t &nRet) |
bool | ParseMoney (const char *pszIn, int64_t &nRet) |
string | SanitizeString (const string &str) |
bool | IsHex (const string &str) |
vector< unsigned char > | ParseHex (const char *psz) |
vector< unsigned char > | ParseHex (const string &str) |
void | ParseParameters (int argc, const char *const argv[]) |
std::string | GetArg (const std::string &strArg, const std::string &strDefault) |
Return string argument or default value. More... | |
int64_t | GetArg (const std::string &strArg, int64_t nDefault) |
Return integer argument or default value. More... | |
bool | GetBoolArg (const std::string &strArg, bool fDefault) |
Return boolean argument or default value. More... | |
bool | SoftSetArg (const std::string &strArg, const std::string &strValue) |
Set an argument if it doesn't already have a value. More... | |
bool | SoftSetBoolArg (const std::string &strArg, bool fValue) |
Set a boolean argument if it doesn't already have a value. More... | |
string | EncodeBase64 (const unsigned char *pch, size_t len) |
string | EncodeBase64 (const string &str) |
vector< unsigned char > | DecodeBase64 (const char *p, bool *pfInvalid) |
string | DecodeBase64 (const string &str) |
string | EncodeBase32 (const unsigned char *pch, size_t len) |
string | EncodeBase32 (const string &str) |
vector< unsigned char > | DecodeBase32 (const char *p, bool *pfInvalid) |
string | DecodeBase32 (const string &str) |
bool | WildcardMatch (const char *psz, const char *mask) |
bool | WildcardMatch (const string &str, const string &mask) |
void | LogException (std::exception *pex, const char *pszThread) |
void | PrintExceptionContinue (std::exception *pex, const char *pszThread) |
boost::filesystem::path | GetDefaultDataDir () |
const boost::filesystem::path & | GetDataDir (bool fNetSpecific) |
void | ClearDatadirCache () |
boost::filesystem::path | GetConfigFile () |
boost::filesystem::path | GetQtStyleFile () |
void | ReadConfigFile (map< string, string > &mapSettingsRet, map< string, vector< string > > &mapMultiSettingsRet) |
boost::filesystem::path | GetPidFile () |
void | CreatePidFile (const boost::filesystem::path &path, pid_t pid) |
bool | RenameOver (boost::filesystem::path src, boost::filesystem::path dest) |
bool | TryCreateDirectory (const boost::filesystem::path &p) |
void | FileCommit (FILE *fileout) |
bool | TruncateFile (FILE *file, unsigned int length) |
int | RaiseFileDescriptorLimit (int nMinFD) |
void | AllocateFileRange (FILE *file, unsigned int offset, unsigned int length) |
void | ShrinkDebugFile () |
int64_t | GetTime () |
void | SetMockTime (int64_t nMockTimeIn) |
int64_t | GetTimeOffset () |
int64_t | GetAdjustedTime () |
void | AddTimeData (const CNetAddr &ip, int64_t nTime) |
void | seed_insecure_rand (bool fDeterministic) |
Seed insecure_rand using the random pool. More... | |
boost::filesystem::path | GetTempPath () |
void | runCommand (std::string strCommand) |
void | RenameThread (const char *name) |
void | SetupEnvironment () |
std::string | DateTimeStrFormat (const char *pszFormat, int64_t nTime) |
Variables | |
map< string, string > | mapArgs |
map< string, vector< string > > | mapMultiArgs |
bool | fDebug = false |
bool | fPrintToConsole = false |
bool | fPrintToDebugLog = true |
bool | fDaemon = false |
bool | fServer = false |
string | strMiscWarning |
bool | fNoListen = false |
bool | fLogTimestamps = false |
volatile bool | fReopenDebugLog = false |
CClientUIInterface | uiInterface |
class CInit | instance_of_cinit |
const signed char | p_util_hexdigit [256] |
uint32_t | insecure_rand_Rz = 11 |
MWC RNG of George Marsaglia This is intended to be fast. More... | |
uint32_t | insecure_rand_Rw = 11 |
void AddTimeData | ( | const CNetAddr & | ip, |
int64_t | nTime | ||
) |
void AllocateFileRange | ( | FILE * | file, |
unsigned int | offset, | ||
unsigned int | length | ||
) |
void ClearDatadirCache | ( | ) |
void CreatePidFile | ( | const boost::filesystem::path & | path, |
pid_t | pid | ||
) |
std::string DateTimeStrFormat | ( | const char * | pszFormat, |
int64_t | nTime | ||
) |
vector<unsigned char> DecodeBase32 | ( | const char * | p, |
bool * | pfInvalid | ||
) |
string DecodeBase32 | ( | const string & | str | ) |
vector<unsigned char> DecodeBase64 | ( | const char * | p, |
bool * | pfInvalid | ||
) |
string DecodeBase64 | ( | const string & | str | ) |
string EncodeBase32 | ( | const unsigned char * | pch, |
size_t | len | ||
) |
string EncodeBase32 | ( | const string & | str | ) |
string EncodeBase64 | ( | const unsigned char * | pch, |
size_t | len | ||
) |
string EncodeBase64 | ( | const string & | str | ) |
void FileCommit | ( | FILE * | fileout | ) |
string FormatMoney | ( | int64_t | n, |
bool | fPlus | ||
) |
int64_t GetAdjustedTime | ( | ) |
std::string GetArg | ( | const std::string & | strArg, |
const std::string & | strDefault | ||
) |
int64_t GetArg | ( | const std::string & | strArg, |
int64_t | nDefault | ||
) |
bool GetBoolArg | ( | const std::string & | strArg, |
bool | fDefault | ||
) |
boost::filesystem::path GetConfigFile | ( | ) |
const boost::filesystem::path& GetDataDir | ( | bool | fNetSpecific | ) |
boost::filesystem::path GetDefaultDataDir | ( | ) |
boost::filesystem::path GetPidFile | ( | ) |
boost::filesystem::path GetQtStyleFile | ( | ) |
uint64_t GetRand | ( | uint64_t | nMax | ) |
uint256 GetRandHash | ( | ) |
int GetRandInt | ( | int | nMax | ) |
int64_t GetTime | ( | ) |
int64_t GetTimeOffset | ( | ) |
bool IsHex | ( | const string & | str | ) |
void locking_callback | ( | int | mode, |
int | i, | ||
const char * | file, | ||
int | line | ||
) |
void LogException | ( | std::exception * | pex, |
const char * | pszThread | ||
) |
int LogPrintStr | ( | const std::string & | str | ) |
vector<unsigned char> ParseHex | ( | const char * | psz | ) |
vector<unsigned char> ParseHex | ( | const string & | str | ) |
bool ParseMoney | ( | const string & | str, |
int64_t & | nRet | ||
) |
bool ParseMoney | ( | const char * | pszIn, |
int64_t & | nRet | ||
) |
void ParseParameters | ( | int | argc, |
const char *const | argv[] | ||
) |
void PrintExceptionContinue | ( | std::exception * | pex, |
const char * | pszThread | ||
) |
int RaiseFileDescriptorLimit | ( | int | nMinFD | ) |
void RandAddSeed | ( | ) |
void RandAddSeedPerfmon | ( | ) |
void ReadConfigFile | ( | map< string, string > & | mapSettingsRet, |
map< string, vector< string > > & | mapMultiSettingsRet | ||
) |
bool RenameOver | ( | boost::filesystem::path | src, |
boost::filesystem::path | dest | ||
) |
void RenameThread | ( | const char * | name | ) |
void runCommand | ( | std::string | strCommand | ) |
string SanitizeString | ( | const string & | str | ) |
void seed_insecure_rand | ( | bool | fDeterministic = false | ) |
void SetupEnvironment | ( | ) |
void ShrinkDebugFile | ( | ) |
bool SoftSetArg | ( | const std::string & | strArg, |
const std::string & | strValue | ||
) |
bool SoftSetBoolArg | ( | const std::string & | strArg, |
bool | fValue | ||
) |
Set a boolean argument if it doesn't already have a value.
strArg | Argument to set (e.g. "-foo") |
fValue | Value (e.g. false) |
Definition at line 539 of file util.cpp.
bool TryCreateDirectory | ( | const boost::filesystem::path & | p | ) |
bool WildcardMatch | ( | const char * | psz, |
const char * | mask | ||
) |
bool WildcardMatch | ( | const string & | str, |
const string & | mask | ||
) |
uint32_t insecure_rand_Rz = 11 |
class CInit instance_of_cinit |
const signed char p_util_hexdigit[256] |
CClientUIInterface uiInterface |