diff options
Diffstat (limited to '')
| -rw-r--r-- | src/confpair.h | 1 | ||||
| -rw-r--r-- | src/exceptionbase.cpp | 1 | ||||
| -rw-r--r-- | src/formula.cpp | 1 | ||||
| -rw-r--r-- | src/httpget.cpp | 2 | ||||
| -rw-r--r-- | src/paramproc.cpp | 2 | ||||
| -rw-r--r-- | src/tests/fstring.cpp | 2 | ||||
| -rw-r--r-- | 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 @@ | |||
| 3 | 3 | ||
| 4 | #include <stdint.h> | 4 | #include <stdint.h> |
| 5 | #include <string> | 5 | #include <string> |
| 6 | #include <string.h> | ||
| 6 | #include <sstream> | 7 | #include <sstream> |
| 7 | #include "confpairbase.h" | 8 | #include "confpairbase.h" |
| 8 | 9 | ||
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 @@ | |||
| 1 | #include "exceptionbase.h" | 1 | #include "exceptionbase.h" |
| 2 | #include <stdarg.h> | 2 | #include <stdarg.h> |
| 3 | #include <string.h> | ||
| 3 | 4 | ||
| 4 | ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : | 5 | ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : |
| 5 | nErrorCode( 0 ), | 6 | 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 @@ | |||
| 1 | #include "formula.h" | 1 | #include "formula.h" |
| 2 | #include <stdlib.h> | ||
| 2 | 3 | ||
| 3 | subExceptionDef( ParseException ); | 4 | subExceptionDef( ParseException ); |
| 4 | 5 | ||
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 @@ | |||
| 2 | #include "exceptions.h" | 2 | #include "exceptions.h" |
| 3 | #include "connection.h" | 3 | #include "connection.h" |
| 4 | #include <stdio.h> | 4 | #include <stdio.h> |
| 5 | #include <string.h> | ||
| 6 | #include <stdlib.h> | ||
| 5 | 7 | ||
| 6 | char HttpGet::hexcode[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; | 8 | char HttpGet::hexcode[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; |
| 7 | 9 | ||
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 @@ | |||
| 1 | #include "paramproc.h" | 1 | #include "paramproc.h" |
| 2 | #include <stdio.h> | 2 | #include <stdio.h> |
| 3 | #include <string.h> | ||
| 4 | #include <stdlib.h> | ||
| 3 | 5 | ||
| 4 | #define ptrtype( iitype, iiname ) \ | 6 | #define ptrtype( iitype, iiname ) \ |
| 5 | ParamProc::ParamPtr::ParamPtr( iitype *iiname ) : \ | 7 | 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 ) | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | #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() ); | 20 | #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() ); |
| 21 | int main( int argc, char *argv ) | 21 | int main( int argc, char **argv ) |
| 22 | { | 22 | { |
| 23 | FString str("th"); | 23 | FString str("th"); |
| 24 | 24 | ||
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 @@ | |||
| 2 | #include <string.h> | 2 | #include <string.h> |
| 3 | #include "md5.h" | 3 | #include "md5.h" |
| 4 | 4 | ||
| 5 | int main() | 5 | #include <sys/types.h> |
| 6 | #include <sys/stat.h> | ||
| 7 | #include <unistd.h> | ||
| 8 | |||
| 9 | |||
| 10 | int main( int argc, char *argv[] ) | ||
| 6 | { | 11 | { |
| 7 | md5 mproc; | 12 | md5 mproc; |
| 8 | md5sum sum; | 13 | md5sum sum; |
| 9 | char hexstr[33]; | 14 | char hexstr[33]; |
| 10 | 15 | ||
| 16 | struct stat s; | ||
| 17 | stat( argv[1], &s ); | ||
| 18 | char *buf = new char[s.st_size]; | ||
| 19 | FILE *fh = fopen( argv[1], "rb" ); | ||
| 20 | fread( buf, 1, s.st_size, fh ); | ||
| 21 | fclose( fh ); | ||
| 22 | |||
| 11 | memset( hexstr, 0, 33 ); | 23 | memset( hexstr, 0, 33 ); |
| 12 | 24 | ||
| 13 | mproc.sumString( &sum, "qwertyuiopasdfgh" ); | 25 | mproc.sumData( &sum, buf, s.st_size ); |
| 14 | mproc.sumToHex( &sum, hexstr ); | 26 | mproc.sumToHex( &sum, hexstr ); |
| 15 | printf("sum: %s\n", hexstr ); | 27 | printf("sum: %s\n", hexstr ); |
| 16 | printf("chk: 1ebfc043d8880b758b13ddc8aa1638ef\n"); | 28 | |
| 29 | delete[] buf; | ||
| 17 | 30 | ||
| 18 | return 0; | 31 | return 0; |
| 19 | } | 32 | } |
