#include <string>
#include <vector>
#ifdef _WIN32
-#include <io.h>
+ #include <io.h>
+ #include <conio.h>
#else
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <math.h>
#include <vector>
-#include <conio.h>
#include <sstream>
#include "Public.h"
#include "MemoryPool.h"
return 30;
if(highvalue < 0x80000000)
return 31;
-#ifdef WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
if(highvalue < 0x0000000100000000I64)
return 32;
if(highvalue < 0x0000000200000000I64)
}
unsigned int distribution[64] = {0};
unsigned int numProcessedChains = 0;
- FILE* fileR;
+ FILE* fileR = NULL;
BaseRTReader *reader = NULL;
if(sPathName.substr(sPathName.length() - 2, sPathName.length()) == "rt")
reader = (BaseRTReader*)new RTReader(sPathName);
static CMemoryPool mp;
unsigned int nAllocatedSize;
RainbowChain* pChain = (RainbowChain*)mp.Allocate(size, nAllocatedSize);
- unsigned int chainrowsize = ceil((float)(rti_startptlength + rti_endptlength + rti_cplength) / 8) * 8 ; // The size in bits (in whole bytes)
+ uint32 chainrowsize = (uint32)ceil((float)(rti_startptlength + rti_endptlength + rti_cplength) / 8) * 8 ; // The size in bits (in whole bytes)
unsigned int chainrowsizebytes = chainrowsize / 8;
if (pChain != NULL) {
/* if (ftell(file) == nFileLen)
break;*/
printf("%u chains left to read\n", chainsLeft);
- int nReadThisRound;
+ //int nReadThisRound;
clock_t t1 = clock();
printf("reading...\n");
#ifdef _MEMORYDEBUG
printf("reading time: %.2f s\n", fTime);
printf("converting %i chains...\n", nChains);
t1 = clock();
- for(int i = 0; i < nChains; i++) {
+ for(unsigned int i = 0; i < nChains; i++) {
if(showDistribution == 1) {
distribution[GetMaxBits(pChain[i].nIndexS)-1]++;
}
// unsigned int m_rti_index_prefixlength = GetMaxBits(high.prefix);
unsigned int m_rti_index_numchainslength = GetMaxBits(high.numchains);
// unsigned int m_rti_index_indexlength = GetMaxBits(high.prefixstart);
- unsigned int m_indexrowsize = ceil((float)(/*m_rti_index_indexlength + */m_rti_index_numchainslength) / 8) * 8; // The size in bits (in whole bytes)
+ uint32 m_indexrowsize = (uint32)ceil((float)(/*m_rti_index_indexlength + */m_rti_index_numchainslength) / 8) * 8; // The size in bits (in whole bytes)
unsigned int m_indexrowsizebytes = m_indexrowsize / 8;
FILE *pFileIndex = fopen(sResultFileName.append(".index").c_str(), "wb");
fwrite("RTI2", 1, 4, pFileIndex);
if(i == 0) {
lastPrefix = indexes[0].prefix;
}
- unsigned int indexrow = 0;
+ //unsigned int indexrow = 0;
// Checks how big a distance there is between the current and the next prefix. eg cur is 3 and next is 10 = 7.
unsigned int diffSize = indexes[i].prefix - lastPrefix;
if(i > 0 && diffSize > 1) {
}
}
vector<string> vPathName;
-#ifdef WIN32
+#ifdef _WIN32
string sWildCharPathName = argv[1];
GetTableList(sWildCharPathName, vPathName);
#else
printf("\n");
}
return 0;
-}
\ No newline at end of file
+}