aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-06 19:43:57 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-06 19:43:57 +0000
commitb7a415ec0e358967fc39c046fb72f29e227e7104 (patch)
tree3197c3b4f57f02d10649b09ef821982cb00a1bb6 /src
parent7ef611a2b62c760065705fa8b66b5ff1edbb8eee (diff)
downloadlibbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.gz
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.bz2
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.tar.xz
libbu++-b7a415ec0e358967fc39c046fb72f29e227e7104.zip
It builds with build again, and even the tests now. woo!
Diffstat (limited to 'src')
-rw-r--r--src/exceptions.cpp2
-rw-r--r--src/exceptions.h1
-rw-r--r--src/paramproc.cpp9
-rw-r--r--src/serializerbinary.cpp5
-rw-r--r--src/test/xmlreadtest/xmlreadtest.cpp6
5 files changed, 18 insertions, 5 deletions
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
4subExceptionDef( XmlException ) 4subExceptionDef( XmlException )
5 5subExceptionDef( 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
7subExceptionDecl( XmlException ) 7subExceptionDecl( XmlException )
8subExceptionDecl( 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
4SerializerBinary::SerializerBinary(FILE *fhFile, bool bLoading): 5SerializerBinary::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
5int main( int argc, char *argv[] ) 5int main( int argc, char *argv[] )
6{ 6{