CC = g++
OPTIMIZATION = -O3
INCLUDES = -I../../Common/rt\ api -I../../Server\ Applications/rsearchi
-# XXX todo currently only 32-bit targets work
-CFLAGS = -Wall -m32 -std=c++98 $(INCLUDES) $(OPTIMIZATION) -c
-LFLAGS = -Wall -m32 -std=c++98 $(INCLUDES) $(OPTIMIZATION)
+CFLAGS = -Wall -ansi $(INCLUDES) $(OPTIMIZATION) -c $(DEBUG)
+LFLAGS = -Wall -ansi $(INCLUDES) $(OPTIMIZATION) $(DEBUG)
LIBS =
OBJS = MemoryPool.o Public.o RTI2Reader.o RTIReader.o
COMMON_API_PATH = ../../Common/rt\ api
clean:
rm -f *.o rti2rto
+debug: DEBUG += -DDEBUG -g
+debug: all
+
rebuild: clean all
MemoryPool.o: $(COMMON_API_PATH)/MemoryPool.h $(COMMON_API_PATH)/MemoryPool.cpp $(COMMON_API_PATH)/Public.h
static CMemoryPool mp;
unsigned int nAllocatedSize;
BaseRTReader *reader = NULL;
+
if(sType == "RTI2")
reader = (BaseRTReader*)new RTI2Reader(sFileName);
else if(sType == "RTI")
printf("Invalid table type '%s'", sType.c_str());
return ;
}
+
RainbowChainCP* pChain = (RainbowChainCP*)mp.Allocate(reader->GetChainsLeft() * sizeof(RainbowChainCP), nAllocatedSize);
if (pChain != NULL)
{
while(reader->GetChainsLeft() > 0)
{
reader->ReadChains(nChains, pChain);
- for(int i = 0; i < nChains; i++)
+ for(UINT4 i = 0; i < nChains; i++)
{
fwrite(&pChain[i], 1, 16, fResult);
}
printf("no rainbow table found\n");
return 0;
}
- for (int i = 0; i < vPathName.size(); i++)
+ for (UINT4 i = 0; i < vPathName.size(); i++)
{
string sResultFile, sType;
printf("\n");
}
return 0;
-}
\ No newline at end of file
+}