summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/archive.cpp2
-rw-r--r--src/cache.h6
-rw-r--r--src/cachestorenids.h2
-rw-r--r--src/filter.cpp10
-rw-r--r--src/formatter.cpp14
-rw-r--r--src/formatter.h8
6 files changed, 21 insertions, 21 deletions
diff --git a/src/archive.cpp b/src/archive.cpp
index c1c89cc..0efa145 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -459,14 +459,12 @@ Bu::Archive &Bu::operator>>(Bu::Archive &s, Bu::Archival &p)
459 459
460Bu::Archive &Bu::operator<<(Bu::Archive &ar, class Bu::Archival *p ) 460Bu::Archive &Bu::operator<<(Bu::Archive &ar, class Bu::Archival *p )
461{ 461{
462 printf("Writing a pointer to an archive...\n");
463 ar << *p; 462 ar << *p;
464 return ar; 463 return ar;
465} 464}
466 465
467Bu::Archive &Bu::operator>>(Bu::Archive &ar, class Bu::Archival *p ) 466Bu::Archive &Bu::operator>>(Bu::Archive &ar, class Bu::Archival *p )
468{ 467{
469 printf("Reading a pointer to an archive...\n");
470 ar >> *p; 468 ar >> *p;
471 return ar; 469 return ar;
472} 470}
diff --git a/src/cache.h b/src/cache.h
index 4ae1aa8..f36c29b 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -165,9 +165,9 @@ namespace Bu
165 { 165 {
166 if( i.getValue().iRefs > 0 ) 166 if( i.getValue().iRefs > 0 )
167 { 167 {
168 printf("Error? iRefs=%d for key ", i.getValue().iRefs ); 168 // TODO: Throw an error in this case? iRefs != 0 for an
169 __tracer_format( i.getKey() ); 169 // object when the Cache is destroyed.
170 printf("!\n"); 170 throw Bu::ExceptionBase("iRefs not zero.");
171 } 171 }
172 pCalc->onUnload( 172 pCalc->onUnload(
173 i.getValue().pData, 173 i.getValue().pData,
diff --git a/src/cachestorenids.h b/src/cachestorenids.h
index c6a00ce..0f7c72c 100644
--- a/src/cachestorenids.h
+++ b/src/cachestorenids.h
@@ -57,7 +57,7 @@ namespace Bu
57 nStore.initialize( iBlockSize, iPreAllocate ); 57 nStore.initialize( iBlockSize, iPreAllocate );
58 int iStream = nStore.createStream(); 58 int iStream = nStore.createStream();
59 if( iStream != 0 ) 59 if( iStream != 0 )
60 printf("That's...horrible...id = %d.\n\n", iStream ); 60 throw Bu::ExceptionBase("That's...horrible...id = %d.\n\n", iStream );
61 NidsStream ns = nStore.openStream( 0 ); 61 NidsStream ns = nStore.openStream( 0 );
62 Bu::Archive ar( ns, Bu::Archive::save ); 62 Bu::Archive ar( ns, Bu::Archive::save );
63 ar << hId; 63 ar << hId;
diff --git a/src/filter.cpp b/src/filter.cpp
index 9f10026..771cf0d 100644
--- a/src/filter.cpp
+++ b/src/filter.cpp
@@ -14,17 +14,7 @@ Bu::Filter::Filter( Bu::Stream &rNext ) :
14 14
15Bu::Filter::~Filter() 15Bu::Filter::~Filter()
16{ 16{
17 //printf("-> Bu::Filter::~Filter()\n");
18} 17}
19/*
20void Bu::Filter::start()
21{
22 printf("-> Bu::Filter::start()\n");
23}
24
25void Bu::Filter::stop()
26{
27}*/
28 18
29void Bu::Filter::close() 19void Bu::Filter::close()
30{ 20{
diff --git a/src/formatter.cpp b/src/formatter.cpp
index 2fadd96..8c06bde 100644
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -176,10 +176,16 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &rOut, Bu::Formatter::Special s )
176 switch( s ) 176 switch( s )
177 { 177 {
178 case Formatter::nl: 178 case Formatter::nl:
179 rOut.write("\n", 1 ); 179 {
180 char ci = rOut.getIndentChar(); 180 rOut.write("\n", 1 );
181 for( int j = 0; j < rOut.getIndent(); j++ ) 181 char ci = rOut.getIndentChar();
182 rOut.write( &ci, 1 ); 182 for( int j = 0; j < rOut.getIndent(); j++ )
183 rOut.write( &ci, 1 );
184 }
185 break;
186
187 case Formatter::flush:
188 rOut.doFlush();
183 break; 189 break;
184 } 190 }
185 return rOut; 191 return rOut;
diff --git a/src/formatter.h b/src/formatter.h
index 5dd7622..30ecf42 100644
--- a/src/formatter.h
+++ b/src/formatter.h
@@ -179,9 +179,15 @@ namespace Bu
179 179
180 enum Special 180 enum Special
181 { 181 {
182 nl 182 nl,
183 flush
183 }; 184 };
184 185
186 void doFlush()
187 {
188 rOut.flush();
189 }
190
185 private: 191 private:
186 Stream &rOut; 192 Stream &rOut;
187 Fmt fLast; 193 Fmt fLast;