aboutsummaryrefslogtreecommitdiff
path: root/src/stable/stdstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/stdstream.cpp')
-rw-r--r--src/stable/stdstream.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/stable/stdstream.cpp b/src/stable/stdstream.cpp
index 9bc22f2..25ad8d4 100644
--- a/src/stable/stdstream.cpp
+++ b/src/stable/stdstream.cpp
@@ -8,7 +8,8 @@
8#include <stdio.h> 8#include <stdio.h>
9#include "bu/stdstream.h" 9#include "bu/stdstream.h"
10 10
11Bu::StdStream::StdStream() 11Bu::StdStream::StdStream( OutMode eOut ) :
12 eOut( eOut )
12{ 13{
13} 14}
14 15
@@ -27,7 +28,7 @@ Bu::size Bu::StdStream::read( void *pBuf, Bu::size nBytes )
27 28
28Bu::size Bu::StdStream::write( const void *pBuf, Bu::size nBytes ) 29Bu::size Bu::StdStream::write( const void *pBuf, Bu::size nBytes )
29{ 30{
30 return fwrite( pBuf, 1, nBytes, stdout ); 31 return fwrite( pBuf, 1, nBytes, eOut==StdOut?stdout:stderr );
31} 32}
32 33
33Bu::size Bu::StdStream::tell() 34Bu::size Bu::StdStream::tell()
@@ -59,7 +60,7 @@ bool Bu::StdStream::isOpen()
59 60
60void Bu::StdStream::flush() 61void Bu::StdStream::flush()
61{ 62{
62 fflush( stdout ); 63 fflush( eOut==StdOut?stdout:stderr );
63} 64}
64 65
65bool Bu::StdStream::canRead() 66bool Bu::StdStream::canRead()