| 57 | } |
| 58 | |
| 59 | ofhbuf::int_type ofhbuf::overflow (ofhbuf::int_type c) |
| 60 | { |
| 61 | const char* p = pbase(); |
| 62 | std::streamsize bytes_to_write = pptr() - p; |
| 63 | |
| 64 | if (!is_eof(c)) { |
| 65 | *pptr() = c; |
| 66 | ++bytes_to_write; |
| 67 | } |
| 68 | |
| 69 | while (bytes_to_write > 0) { |
| 70 | const size_t bytes_written = write_fun(handle, p, bytes_to_write); |
| 71 | bytes_to_write -= bytes_written; |
| 72 | p += bytes_written; |
| 73 | } |
| 74 | |
| 75 | reset_buffer(); |
| 76 | |
| 77 | return traits_type::to_int_type(0); |
| 78 | } |
| 79 | |
| 80 | int ofhbuf::sync () |
| 81 | { |
nothing calls this directly
no outgoing calls
no test coverage detected