Merge branch 'beta' into mergemaster

# Conflicts:
#	src/main.cpp
This commit is contained in:
jl777
2018-04-16 10:16:01 +03:00
parent 9226f69ef1
commit e73b2055c6
910 changed files with 112009 additions and 11364 deletions

View File

@@ -10,6 +10,7 @@
#include <cstdlib>
#include <cstring>
#include <errno.h>
#include <iomanip>
#include <limits>
using namespace std;
@@ -46,6 +47,20 @@ string SanitizeFilename(const string& str)
return strResult;
}
std::string HexInt(uint32_t val)
{
std::stringstream ss;
ss << std::setfill('0') << std::setw(sizeof(uint32_t) * 2) << std::hex << val;
return ss.str();
}
uint32_t ParseHexToUInt32(const std::string& str) {
std::istringstream converter(str);
uint32_t value;
converter >> std::hex >> value;
return value;
}
const signed char p_util_hexdigit[256] =
{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,