diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-04-28 23:01:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-04-28 23:01:03 +0000 |
commit | 2a49987a29270e14b5a9396b0ab3b7b4588770c3 (patch) | |
tree | edb5cb767632323ef288451f38d669e0b2feba4e | |
parent | d416848a9c212bf0503ec5b9de4cd23449ecd73c (diff) | |
download | libbu++-2a49987a29270e14b5a9396b0ab3b7b4588770c3.tar.gz libbu++-2a49987a29270e14b5a9396b0ab3b7b4588770c3.tar.bz2 libbu++-2a49987a29270e14b5a9396b0ab3b7b4588770c3.tar.xz libbu++-2a49987a29270e14b5a9396b0ab3b7b4588770c3.zip |
Apparently there were a number of things that weren't strict ISO C++, the new
version of gcc complained about them, none of these changes will break backward
compatibility, so I fixed them.
I added more docs too, it seems.
-rw-r--r-- | src/doxy/main.dox | 4 | ||||
-rw-r--r-- | src/doxy/params.dox | 15 | ||||
-rw-r--r-- | src/doxy/plugins.dox | 17 | ||||
-rw-r--r-- | src/doxy/taf.dox | 16 | ||||
-rw-r--r-- | src/doxy/unittest.dox | 15 | ||||
-rw-r--r-- | src/exceptionbase.cpp | 1 | ||||
-rw-r--r-- | src/file.h | 2 | ||||
-rw-r--r-- | src/formula.h | 1 | ||||
-rw-r--r-- | src/hash.h | 4 | ||||
-rw-r--r-- | src/itoserver.h | 1 | ||||
-rw-r--r-- | src/list.h | 4 | ||||
-rw-r--r-- | src/logger.cpp | 1 | ||||
-rw-r--r-- | src/paramproc.cpp | 1 | ||||
-rw-r--r-- | src/protocolhttp.cpp | 1 | ||||
-rw-r--r-- | src/server.h | 1 | ||||
-rw-r--r-- | src/serversocket.h | 1 | ||||
-rw-r--r-- | src/set.h | 4 | ||||
-rw-r--r-- | src/tafreader.cpp | 2 | ||||
-rw-r--r-- | src/tests/fstring.cpp | 2 | ||||
-rw-r--r-- | src/tests/itoqueue1.cpp | 1 |
20 files changed, 87 insertions, 7 deletions
diff --git a/src/doxy/main.dox b/src/doxy/main.dox index a13438f..6030f0c 100644 --- a/src/doxy/main.dox +++ b/src/doxy/main.dox | |||
@@ -21,6 +21,10 @@ | |||
21 | * - @ref howto_archives | 21 | * - @ref howto_archives |
22 | * - @ref howto_threading | 22 | * - @ref howto_threading |
23 | * - @ref howto_servers | 23 | * - @ref howto_servers |
24 | * - @ref howto_taf | ||
25 | * - @ref howto_plugins | ||
26 | * - @ref howto_unittest | ||
27 | * - @ref howto_params | ||
24 | */ | 28 | */ |
25 | 29 | ||
26 | /** | 30 | /** |
diff --git a/src/doxy/params.dox b/src/doxy/params.dox new file mode 100644 index 0000000..1657f7b --- /dev/null +++ b/src/doxy/params.dox | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2008 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | *@page howto_params Handling Command Line Parameters | ||
10 | * | ||
11 | * Libbu++ provides everything you need to cope with command line parameters | ||
12 | * like a pro. | ||
13 | * | ||
14 | *@todo Finish this page. | ||
15 | */ | ||
diff --git a/src/doxy/plugins.dox b/src/doxy/plugins.dox new file mode 100644 index 0000000..36bcc5a --- /dev/null +++ b/src/doxy/plugins.dox | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2008 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | *@page howto_plugins Creating Plugins and Plugin Frameworks | ||
10 | * | ||
11 | * Libbu++ offers a simple yet safe mechanism for dealing with plugins, it | ||
12 | * allows a program to have "builtin" plugins or DLL/SO based dynamically loaded | ||
13 | * plugnis. Plugins are then referred to by name, are checked for type-safety, | ||
14 | * and are managed to avoid memory leaks. | ||
15 | * | ||
16 | *@todo Finish this page. | ||
17 | */ | ||
diff --git a/src/doxy/taf.dox b/src/doxy/taf.dox new file mode 100644 index 0000000..c5befb6 --- /dev/null +++ b/src/doxy/taf.dox | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2008 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | *@page howto_taf Using the Textual Archive Format | ||
10 | * | ||
11 | * Libbu++ provides support for TAF, the Textual Archive Format, a very simple | ||
12 | * grouped key/value pair format with the ability to support trees of data. | ||
13 | * It's like XML-Light. | ||
14 | * | ||
15 | *@todo Finish this page. | ||
16 | */ | ||
diff --git a/src/doxy/unittest.dox b/src/doxy/unittest.dox new file mode 100644 index 0000000..41b13f8 --- /dev/null +++ b/src/doxy/unittest.dox | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2008 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | *@page howto_unittest Writing Unit Tests For Your Programs | ||
10 | * | ||
11 | * Libbu++ uses it's own simple and flexible unit testing framework, and you can | ||
12 | * too! | ||
13 | * | ||
14 | *@todo Finish this page. | ||
15 | */ | ||
diff --git a/src/exceptionbase.cpp b/src/exceptionbase.cpp index 6d019af..cea779d 100644 --- a/src/exceptionbase.cpp +++ b/src/exceptionbase.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include "exceptionbase.h" | 8 | #include "exceptionbase.h" |
9 | #include <stdarg.h> | 9 | #include <stdarg.h> |
10 | #include <string.h> | ||
10 | 11 | ||
11 | Bu::ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : | 12 | Bu::ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : |
12 | nErrorCode( 0 ), | 13 | nErrorCode( 0 ), |
@@ -9,6 +9,8 @@ | |||
9 | #define BU_FILE_H | 9 | #define BU_FILE_H |
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include <sys/types.h> | ||
13 | #include <stdlib.h> | ||
12 | 14 | ||
13 | #include "bu/stream.h" | 15 | #include "bu/stream.h" |
14 | #include "bu/fstring.h" | 16 | #include "bu/fstring.h" |
diff --git a/src/formula.h b/src/formula.h index ed543bd..c57c4bb 100644 --- a/src/formula.h +++ b/src/formula.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define FORMULA_H | 9 | #define FORMULA_H |
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include <stdlib.h> | ||
12 | 13 | ||
13 | #include <math.h> | 14 | #include <math.h> |
14 | //#include "sbuffer.h" | 15 | //#include "sbuffer.h" |
@@ -612,7 +612,7 @@ namespace Bu | |||
612 | { | 612 | { |
613 | return hsh.getValueAtPos( nPos ); | 613 | return hsh.getValueAtPos( nPos ); |
614 | } | 614 | } |
615 | }; | 615 | } iterator; |
616 | 616 | ||
617 | /** | 617 | /** |
618 | * Iteration structure for iterating through the hash (const). | 618 | * Iteration structure for iterating through the hash (const). |
@@ -728,7 +728,7 @@ namespace Bu | |||
728 | { | 728 | { |
729 | return hsh.getValueAtPos( nPos ); | 729 | return hsh.getValueAtPos( nPos ); |
730 | } | 730 | } |
731 | }; | 731 | } const_iterator; |
732 | 732 | ||
733 | /** | 733 | /** |
734 | * Get an iterator pointing to the first item in the hash table. | 734 | * Get an iterator pointing to the first item in the hash table. |
diff --git a/src/itoserver.h b/src/itoserver.h index cb7ffbf..0256f87 100644 --- a/src/itoserver.h +++ b/src/itoserver.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define BU_ITO_SERVER_H | 9 | #define BU_ITO_SERVER_H |
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include <sys/select.h> | ||
12 | 13 | ||
13 | #include "bu/fstring.h" | 14 | #include "bu/fstring.h" |
14 | #include "bu/list.h" | 15 | #include "bu/list.h" |
@@ -353,7 +353,7 @@ namespace Bu | |||
353 | pLink = oth.pLink; | 353 | pLink = oth.pLink; |
354 | return *this; | 354 | return *this; |
355 | } | 355 | } |
356 | }; | 356 | } iterator; |
357 | 357 | ||
358 | /** | 358 | /** |
359 | *@see iterator | 359 | *@see iterator |
@@ -465,7 +465,7 @@ namespace Bu | |||
465 | pLink = oth.pLink; | 465 | pLink = oth.pLink; |
466 | return *this; | 466 | return *this; |
467 | } | 467 | } |
468 | }; | 468 | } const_iterator; |
469 | 469 | ||
470 | /** | 470 | /** |
471 | * Get an iterator pointing to the first item in the list. | 471 | * Get an iterator pointing to the first item in the list. |
diff --git a/src/logger.cpp b/src/logger.cpp index 3ba3285..9bd2fa5 100644 --- a/src/logger.cpp +++ b/src/logger.cpp | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <stdarg.h> | 9 | #include <stdarg.h> |
10 | #include <time.h> | 10 | #include <time.h> |
11 | #include <stdio.h> | 11 | #include <stdio.h> |
12 | #include <stdlib.h> | ||
12 | 13 | ||
13 | Bu::Logger::Logger() | 14 | Bu::Logger::Logger() |
14 | { | 15 | { |
diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 95f97c6..c8e6afd 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include "paramproc.h" | 8 | #include "paramproc.h" |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
10 | #include <stdlib.h> | ||
10 | 11 | ||
11 | #define ptrtype( iitype, iiname ) \ | 12 | #define ptrtype( iitype, iiname ) \ |
12 | Bu::ParamProc::ParamPtr::ParamPtr( iitype *iiname ) : \ | 13 | Bu::ParamProc::ParamPtr::ParamPtr( iitype *iiname ) : \ |
diff --git a/src/protocolhttp.cpp b/src/protocolhttp.cpp index 80f32e1..f512eda 100644 --- a/src/protocolhttp.cpp +++ b/src/protocolhttp.cpp | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <dirent.h> | 8 | #include <dirent.h> |
9 | #include <sys/wait.h> | 9 | #include <sys/wait.h> |
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <stdlib.h> | ||
11 | #include "bu/protocolhttp.h" | 12 | #include "bu/protocolhttp.h" |
12 | #include "bu/logger.h" | 13 | #include "bu/logger.h" |
13 | 14 | ||
diff --git a/src/server.h b/src/server.h index 49fc72a..c4ad4b9 100644 --- a/src/server.h +++ b/src/server.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define BU_SERVER_H | 9 | #define BU_SERVER_H |
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include <sys/select.h> | ||
12 | 13 | ||
13 | #include "bu/fstring.h" | 14 | #include "bu/fstring.h" |
14 | #include "bu/list.h" | 15 | #include "bu/list.h" |
diff --git a/src/serversocket.h b/src/serversocket.h index ca03026..8267cea 100644 --- a/src/serversocket.h +++ b/src/serversocket.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | #include "bu/fstring.h" | 12 | #include "bu/fstring.h" |
13 | #include <sys/select.h> | ||
13 | 14 | ||
14 | namespace Bu | 15 | namespace Bu |
15 | { | 16 | { |
@@ -368,7 +368,7 @@ namespace Bu | |||
368 | { | 368 | { |
369 | return hsh.getKeyAtPos( nPos ); | 369 | return hsh.getKeyAtPos( nPos ); |
370 | } | 370 | } |
371 | }; | 371 | } iterator; |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * Iteration structure for iterating through the hash (const). | 374 | * Iteration structure for iterating through the hash (const). |
@@ -466,7 +466,7 @@ namespace Bu | |||
466 | { | 466 | { |
467 | return hsh.getKeyAtPos( nPos ); | 467 | return hsh.getKeyAtPos( nPos ); |
468 | } | 468 | } |
469 | }; | 469 | } const_iterator; |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * Get an iterator pointing to the first item in the hash table. | 472 | * Get an iterator pointing to the first item in the hash table. |
diff --git a/src/tafreader.cpp b/src/tafreader.cpp index db2e9f5..282f037 100644 --- a/src/tafreader.cpp +++ b/src/tafreader.cpp | |||
@@ -9,6 +9,8 @@ | |||
9 | #include "bu/exceptions.h" | 9 | #include "bu/exceptions.h" |
10 | #include "bu/fstring.h" | 10 | #include "bu/fstring.h" |
11 | 11 | ||
12 | #include <stdlib.h> | ||
13 | |||
12 | using namespace Bu; | 14 | using namespace Bu; |
13 | 15 | ||
14 | Bu::TafReader::TafReader( Bu::Stream &sIn ) : | 16 | Bu::TafReader::TafReader( Bu::Stream &sIn ) : |
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp index f4dfc52..43de18f 100644 --- a/src/tests/fstring.cpp +++ b/src/tests/fstring.cpp | |||
@@ -116,7 +116,7 @@ void doTimings() | |||
116 | } | 116 | } |
117 | 117 | ||
118 | #define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.getStr(), str.getStr(), (unsigned int)str2.getStr(), str2.getStr() ); | 118 | #define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.getStr(), str.getStr(), (unsigned int)str2.getStr(), str2.getStr() ); |
119 | int main( int argc, char *argv ) | 119 | int main( int argc, char *argv[] ) |
120 | { | 120 | { |
121 | Bu::FString fs1; | 121 | Bu::FString fs1; |
122 | for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); | 122 | for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); |
diff --git a/src/tests/itoqueue1.cpp b/src/tests/itoqueue1.cpp index 58c1602..41a0276 100644 --- a/src/tests/itoqueue1.cpp +++ b/src/tests/itoqueue1.cpp | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <string> | 8 | #include <string> |
9 | #include "bu/ito.h" | 9 | #include "bu/ito.h" |
10 | #include "bu/itoqueue.h" | 10 | #include "bu/itoqueue.h" |
11 | #include <stdlib.h> | ||
11 | 12 | ||
12 | class Reader : public Bu::Ito | 13 | class Reader : public Bu::Ito |
13 | { | 14 | { |