yo/concrete/streambuf/fdstreambuf/fdinextracttocout.cc
raw| 1 | #include "inok/buf.1.h" |
| 2 | #include <string> |
| 3 | #include <iostream> |
| 4 | #include <istream> |
| 5 | |
| 6 | using namespace std; |
| 7 | |
| 8 | // Calls uflow() repeatedly |
| 9 | |
| 10 | int main(int argc) |
| 11 | { |
| 12 | fdstreambuf |
| 13 | fds(0, ios::in); |
| 14 | istream |
| 15 | is(&fds); |
| 16 | |
| 17 | cerr << "START\n"; |
| 18 | |
| 19 | char |
| 20 | c; |
| 21 | |
| 22 | while (is >> c) |
| 23 | cerr << "\t\tGOT " << c << '\n'; |
| 24 | |
| 25 | cerr << "Using fds(0)\n"; |
| 26 | } |