Browse code

fixed iostream.cpp

uly55e5 authored on 19/01/2022 00:30:42
Showing1 changed files

... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 namespace boost {
24 24
 namespace nowide {
25
-namespace details {
25
+namespace detail {
26 26
     class console_output_buffer : public std::streambuf {
27 27
     public:
28 28
         console_output_buffer(HANDLE h) :
... ...
@@ -61,7 +61,7 @@ namespace details {
61 61
         
62 62
         int write(char const *p,int n)
63 63
         {
64
-            namespace uf = boost::locale::utf;
64
+            namespace uf = boost::nowide::utf;
65 65
             char const *b = p;
66 66
             char const *e = p+n;
67 67
             if(!isatty_) {
... ...
@@ -159,7 +159,7 @@ namespace details {
159 159
         
160 160
         size_t read()
161 161
         {
162
-            namespace uf = boost::locale::utf;
162
+            namespace uf = boost::nowide::utf;
163 163
             if(!isatty_) {
164 164
                 DWORD read_bytes = 0;
165 165
                 if(!ReadFile(handle_,buffer_,buffer_size,&read_bytes,0))
... ...
@@ -203,7 +203,7 @@ namespace details {
203 203
         std::vector<char> pback_buffer_;
204 204
     };
205 205
 
206
-    winconsole_ostream::winconsole_ostream(int fd) : std::ostream(0)
206
+    winconsole_ostream::winconsole_ostream(int fd, winconsole_ostream* tieStream=0) : std::ostream(0)
207 207
     {
208 208
         HANDLE h = 0;
209 209
         switch(fd) {
... ...
@@ -222,7 +222,7 @@ namespace details {
222 222
     {
223 223
     }
224 224
 
225
-    winconsole_istream::winconsole_istream() : std::istream(0)
225
+    winconsole_istream::winconsole_istream(winconsole_ostream* tieStream=0) : std::istream(0)
226 226
     {
227 227
         HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
228 228
         d.reset(new console_input_buffer(h));
... ...
@@ -233,12 +233,12 @@ namespace details {
233 233
     {
234 234
     }
235 235
     
236
-} // details
236
+} // detail
237 237
     
238
-BOOST_NOWIDE_DECL details::winconsole_istream cin;
239
-BOOST_NOWIDE_DECL details::winconsole_ostream cout(1);
240
-BOOST_NOWIDE_DECL details::winconsole_ostream cerr(2);
241
-BOOST_NOWIDE_DECL details::winconsole_ostream clog(2);
238
+BOOST_NOWIDE_DECL detail::winconsole_istream cin;
239
+BOOST_NOWIDE_DECL detail::winconsole_ostream cout(1);
240
+BOOST_NOWIDE_DECL detail::winconsole_ostream cerr(2);
241
+BOOST_NOWIDE_DECL detail::winconsole_ostream clog(2);
242 242
     
243 243
 namespace {
244 244
     struct initialize {