| 108 | // ---------------------------------------------------------------------------------------- |
| 109 | |
| 110 | sockstreambuf_unbuffered::int_type sockstreambuf_unbuffered:: |
| 111 | pbackfail( |
| 112 | int_type c |
| 113 | ) |
| 114 | { |
| 115 | // if they are trying to push back a character that they didn't read last |
| 116 | // that is an error |
| 117 | if (c != EOF && c != lastread) |
| 118 | return EOF; |
| 119 | |
| 120 | // if they are trying to push back a second character then thats an error |
| 121 | if (lastread_next) |
| 122 | return EOF; |
| 123 | |
| 124 | lastread_next = true; |
| 125 | return 1; |
| 126 | } |
| 127 | |
| 128 | // ---------------------------------------------------------------------------------------- |
| 129 |
nothing calls this directly
no outgoing calls
no test coverage detected