| 2144 | */ |
| 2145 | template <typename C, typename T> |
| 2146 | inline std::streamsize |
| 2147 | basic_pstreambuf<C,T>::write(const char_type* s, std::streamsize n) |
| 2148 | { |
| 2149 | std::streamsize nwritten = 0; |
| 2150 | if (wpipe() >= 0) |
| 2151 | { |
| 2152 | nwritten = ::write(wpipe(), s, n * sizeof(char_type)); |
| 2153 | if (nwritten == -1) |
| 2154 | error_ = errno; |
| 2155 | else |
| 2156 | nwritten /= sizeof(char_type); |
| 2157 | } |
| 2158 | return nwritten; |
| 2159 | } |
| 2160 | |
| 2161 | /** |
| 2162 | * Reads up to @a n characters from the pipe to the buffer @a s. |
no outgoing calls
no test coverage detected