diff options
Diffstat (limited to '')
-rw-r--r-- | build.conf | 17 | ||||
-rw-r--r-- | src/exceptions.cpp | 2 | ||||
-rw-r--r-- | src/exceptions.h | 1 | ||||
-rw-r--r-- | src/paramproc.cpp | 9 | ||||
-rw-r--r-- | src/serializerbinary.cpp | 5 | ||||
-rw-r--r-- | src/test/xmlreadtest/xmlreadtest.cpp | 6 |
6 files changed, 32 insertions, 8 deletions
@@ -1,18 +1,29 @@ | |||
1 | # This is a build file for build | 1 | # This is a build file for libbu++ |
2 | 2 | ||
3 | default action: check libbu++.a | 3 | default action: check libbu++.a |
4 | "clean" action: clean libbu++.a | 4 | "tests" action: check /tests\/.*/ |
5 | "clean" action: clean /.*/ | ||
6 | "all" action: check /.*/ | ||
5 | 7 | ||
6 | create file libbu++.a from files in src using rule lib | 8 | create file libbu++.a from files in src using rule lib |
7 | 9 | ||
8 | set CXXFLAGS += "-ggdb" | 10 | for directories matching /src\/test\/(.*)/ in src/test ... |
11 | create file "tests/{re:1}" from files in "{match}" using rule exe | ||
9 | 12 | ||
13 | set CXXFLAGS += "-ggdb" | ||
10 | set CXXFLAGS += "-Isrc -fPIC" | 14 | set CXXFLAGS += "-Isrc -fPIC" |
11 | 15 | ||
16 | for targets matching /tests\/.*/ set LDFLAGS += "-L. -lbu++" | ||
17 | for testes/plugin set LDFLAGS += "-ldl" | ||
18 | |||
12 | /(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" | 19 | /(.*)\.o$/ requires from command "g++ {CXXFLAGS} -M {re:1}.c*" |
20 | /tests\/.*/ requires libbu++.a | ||
13 | 21 | ||
14 | rule lib matches all /(.*)\.o$/ perform command ... | 22 | rule lib matches all /(.*)\.o$/ perform command ... |
15 | "ar cr {target} {match}" | 23 | "ar cr {target} {match}" |
16 | 24 | ||
17 | rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... | 25 | rule cpp matches one /(.*)\.c(pp)?$/ produces "{re:1}.o" perform command ... |
18 | "g++ {CXXFLAGS} -c -o {target} {match}" | 26 | "g++ {CXXFLAGS} -c -o {target} {match}" |
27 | |||
28 | rule exe matches all /(.*)\.o$/ perform command ... | ||
29 | "g++ -o {target} {match} {LDFLAGS}" | ||
diff --git a/src/exceptions.cpp b/src/exceptions.cpp index 441075d..8d30296 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp | |||
@@ -2,4 +2,4 @@ | |||
2 | #include <stdarg.h> | 2 | #include <stdarg.h> |
3 | 3 | ||
4 | subExceptionDef( XmlException ) | 4 | subExceptionDef( XmlException ) |
5 | 5 | subExceptionDef( FileException ) | |
diff --git a/src/exceptions.h b/src/exceptions.h index 1cc891d..3bf2e0b 100644 --- a/src/exceptions.h +++ b/src/exceptions.h | |||
@@ -5,5 +5,6 @@ | |||
5 | #include <stdarg.h> | 5 | #include <stdarg.h> |
6 | 6 | ||
7 | subExceptionDecl( XmlException ) | 7 | subExceptionDecl( XmlException ) |
8 | subExceptionDecl( FileException ) | ||
8 | 9 | ||
9 | #endif | 10 | #endif |
diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 90fa9ac..5cb815c 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp | |||
@@ -463,7 +463,14 @@ int ParamProc::help( int argc, char *argv[] ) | |||
463 | printf(" "); | 463 | printf(" "); |
464 | if( (*i)->cChar ) | 464 | if( (*i)->cChar ) |
465 | { | 465 | { |
466 | printf("-%c, ", (*i)->cChar ); | 466 | if( (*i)->sWord.getString() ) |
467 | { | ||
468 | printf("-%c, ", (*i)->cChar ); | ||
469 | } | ||
470 | else | ||
471 | { | ||
472 | printf("-%c ", (*i)->cChar ); | ||
473 | } | ||
467 | } | 474 | } |
468 | else | 475 | else |
469 | { | 476 | { |
diff --git a/src/serializerbinary.cpp b/src/serializerbinary.cpp index d7143ab..23fb2b1 100644 --- a/src/serializerbinary.cpp +++ b/src/serializerbinary.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "serializerbinary.h" | 1 | #include "serializerbinary.h" |
2 | #include "serializable.h" | 2 | #include "serializable.h" |
3 | #include "exceptions.h" | ||
3 | 4 | ||
4 | SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading): | 5 | SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading): |
5 | Serializer(bLoading), | 6 | Serializer(bLoading), |
@@ -15,10 +16,14 @@ SerializerBinary::SerializerBinary(const char *sFileName, bool bLoading): | |||
15 | if (bLoading) | 16 | if (bLoading) |
16 | { | 17 | { |
17 | fhFile = fopen(sFileName, "rb"); | 18 | fhFile = fopen(sFileName, "rb"); |
19 | if( fhFile == NULL ) | ||
20 | throw FileException("Unable to open file: %s", sFileName ); | ||
18 | } | 21 | } |
19 | else | 22 | else |
20 | { | 23 | { |
21 | fhFile = fopen(sFileName, "wb"); | 24 | fhFile = fopen(sFileName, "wb"); |
25 | if( fhFile == NULL ) | ||
26 | throw FileException("Unable to open file: %s", sFileName ); | ||
22 | } | 27 | } |
23 | } | 28 | } |
24 | 29 | ||
diff --git a/src/test/xmlreadtest/xmlreadtest.cpp b/src/test/xmlreadtest/xmlreadtest.cpp index e2d2a0a..98d8a9e 100644 --- a/src/test/xmlreadtest/xmlreadtest.cpp +++ b/src/test/xmlreadtest/xmlreadtest.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "../xmlfilereader.h" | 1 | #include "xmlfilereader.h" |
2 | #include "../xmlstringreader.h" | 2 | #include "xmlstringreader.h" |
3 | #include "../xmlfilewriter.h" | 3 | #include "xmlfilewriter.h" |
4 | 4 | ||
5 | int main( int argc, char *argv[] ) | 5 | int main( int argc, char *argv[] ) |
6 | { | 6 | { |