| 367 | } |
| 368 | |
| 369 | int istream_real::get() { |
| 370 | if (mPos >= mBufferLen && fl::available() > 0) { |
| 371 | if (!readLine()) { |
| 372 | return -1; |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | if (mPos < mBufferLen) { |
| 377 | return static_cast<int>(static_cast<unsigned char>(mBuffer[mPos++])); |
| 378 | } |
| 379 | |
| 380 | // Try to read directly from input if buffer is empty |
| 381 | return fl::read(); |
| 382 | } |
| 383 | |
| 384 | istream_real& istream_real::putback(char c) { |
| 385 | if (mPos > 0) { |
no test coverage detected