From 76e10d8d10a9743444942fd0ba5d0f58a122f370 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 19 Feb 2009 22:46:37 +0000 Subject: Hey, this code isn't being used by anyone anymore, ever, anywhere, but I made it compile to get some old tests, and I figured I may as well not throw all that away. --- src/confpair.h | 1 + src/exceptionbase.cpp | 1 + src/formula.cpp | 1 + src/httpget.cpp | 2 ++ src/paramproc.cpp | 2 ++ src/tests/fstring.cpp | 2 +- src/tests/md5test.cpp | 19 ++++++++++++++++--- 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/confpair.h b/src/confpair.h index 56eb06e..9d1fe8d 100644 --- a/src/confpair.h +++ b/src/confpair.h @@ -3,6 +3,7 @@ #include #include +#include #include #include "confpairbase.h" diff --git a/src/exceptionbase.cpp b/src/exceptionbase.cpp index f3d22da..5791cfb 100644 --- a/src/exceptionbase.cpp +++ b/src/exceptionbase.cpp @@ -1,5 +1,6 @@ #include "exceptionbase.h" #include +#include ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : nErrorCode( 0 ), diff --git a/src/formula.cpp b/src/formula.cpp index cf63cf3..a7673b3 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -1,4 +1,5 @@ #include "formula.h" +#include subExceptionDef( ParseException ); diff --git a/src/httpget.cpp b/src/httpget.cpp index ee1f29c..fdd7fbd 100644 --- a/src/httpget.cpp +++ b/src/httpget.cpp @@ -2,6 +2,8 @@ #include "exceptions.h" #include "connection.h" #include +#include +#include char HttpGet::hexcode[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; diff --git a/src/paramproc.cpp b/src/paramproc.cpp index a352e66..68fae79 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp @@ -1,5 +1,7 @@ #include "paramproc.h" #include +#include +#include #define ptrtype( iitype, iiname ) \ ParamProc::ParamPtr::ParamPtr( iitype *iiname ) : \ diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp index 271738c..92f8cc4 100644 --- a/src/tests/fstring.cpp +++ b/src/tests/fstring.cpp @@ -18,7 +18,7 @@ void thing( FString str ) } #define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.c_str(), str.c_str(), (unsigned int)str2.c_str(), str2.c_str() ); -int main( int argc, char *argv ) +int main( int argc, char **argv ) { FString str("th"); diff --git a/src/tests/md5test.cpp b/src/tests/md5test.cpp index 6f832df..2cc8868 100644 --- a/src/tests/md5test.cpp +++ b/src/tests/md5test.cpp @@ -2,18 +2,31 @@ #include #include "md5.h" -int main() + #include + #include + #include + + +int main( int argc, char *argv[] ) { md5 mproc; md5sum sum; char hexstr[33]; + struct stat s; + stat( argv[1], &s ); + char *buf = new char[s.st_size]; + FILE *fh = fopen( argv[1], "rb" ); + fread( buf, 1, s.st_size, fh ); + fclose( fh ); + memset( hexstr, 0, 33 ); - mproc.sumString( &sum, "qwertyuiopasdfgh" ); + mproc.sumData( &sum, buf, s.st_size ); mproc.sumToHex( &sum, hexstr ); printf("sum: %s\n", hexstr ); - printf("chk: 1ebfc043d8880b758b13ddc8aa1638ef\n"); + + delete[] buf; return 0; } -- cgit v1.2.3