bool readCharset = false;\r
vector<string> vLine;\r
\r
- if ( ReadLinesFromFile("charset.txt", vLine) )\r
- readCharset = true;\r
- else if ( ReadLinesFromFile(GetApplicationPath() + "charset.txt", vLine) )\r
- readCharset = true;\r
-\r
- if (readCharset)\r
+ #ifdef BOINC\r
+ if ( boinc_ReadLinesFromFile( "charset.txt", vLine ) )\r
+ readCharset = true;\r
+ #else\r
+ if ( ReadLinesFromFile("charset.txt", vLine) )\r
+ readCharset = true;\r
+ else if ( ReadLinesFromFile(GetApplicationPath() + "charset.txt", vLine) )\r
+ readCharset = true;\r
+ #endif\r
+\r
+ if ( readCharset )\r
{\r
- UINT4 i;\r
+ uint32 i;\r
for (i = 0; i < vLine.size(); i++)\r
{\r
// Filter comment\r
\r
// sCharsetName charset check\r
bool fCharsetNameCheckPass = true;\r
- UINT4 j;\r
+ uint32 j;\r
for (j = 0; j < sCharsetName.size(); j++)\r
{\r
if ( !isalpha(sCharsetName[j])\r
}\r
else\r
printf("can't open charset configuration file\n");\r
+\r
return false;\r
}\r
\r
m_nPlainLenMaxTotal = 0;\r
m_nPlainLenMinTotal = 0;\r
uint64 nTemp = 1;\r
- UINT4 j, k = 1;\r
+ uint32 j, k = 1;\r
for(j = 0; j < m_vCharset.size(); j++)\r
{\r
int i;\r
for (i = m_nPlainLen - 1; i >= 0; i--)\r
{\r
int nCharsetLen = 0;\r
- for(UINT4 j = 0; j < m_vCharset.size(); j++)\r
+ for(uint32 j = 0; j < m_vCharset.size(); j++)\r
{\r
nCharsetLen += m_vCharset[j].m_nPlainLenMax;\r
if(i < nCharsetLen) // We found the correct charset\r
#endif\r
\r
int nCharsetLen = 0;\r
- for(UINT4 j = 0; j < m_vCharset.size(); j++)\r
+ for(uint32 j = 0; j < m_vCharset.size(); j++)\r
{\r
nCharsetLen += m_vCharset[j].m_nPlainLenMax;\r
if(i < nCharsetLen) // We found the correct charset\r
}\r
}\r
\r
- UINT4 nIndexOfX32 = (UINT4)nIndexOfX;\r
+ uint32 nIndexOfX32 = (uint32)nIndexOfX;\r
for (; i >= 0; i--)\r
{\r
int nCharsetLen = 0;\r
- for(UINT4 j = 0; j < m_vCharset.size(); j++)\r
+ for(uint32 j = 0; j < m_vCharset.size(); j++)\r
{\r
nCharsetLen += m_vCharset[j].m_nPlainLenMax;\r
if(i < nCharsetLen) // We found the correct charset\r
// m_Plain[i] = m_vCharset[j].m_PlainCharset[nIndexOfX32 % m_vCharset[j].m_nPlainCharsetLen];\r
// nIndexOfX32 /= m_vCharset[j].m_nPlainCharsetLen;\r
\r
-\r
// moving nPlainCharsetLen into the asm body and avoiding the extra temp\r
// variable results in a performance gain\r
// unsigned int nPlainCharsetLen = m_vCharset[j].m_nPlainCharsetLen;\r
unsigned int nTemp;\r
\r
#if defined(_WIN32) && !defined(__GNUC__)\r
-\r
// VC++ still needs this\r
unsigned int nPlainCharsetLen = m_vCharset[j].m_nPlainCharsetLen;\r
\r