delete[] buf;
}
+void Buffered::set_block(bool)
+{
+ throw logic_error("Buffered::set_block");
+}
+
+void Buffered::set_inherit(bool)
+{
+ throw logic_error("Buffered::set_block");
+}
+
void Buffered::flush()
{
if(cur_op==M_WRITE)
}
}
else if(cur_op==M_READ)
- begin=end = buf;
+ begin = end = buf;
}
unsigned Buffered::do_write(const char *data, unsigned size)
// Give out whatever is in the buffer already
memcpy(data, begin, end-begin);
unsigned ret = end-begin;
- begin=end = buf;
+ begin = end = buf;
data += ret;
size -= ret;
return static_cast<unsigned char>(c);
}
+const Handle &Buffered::get_handle(Mode)
+{
+ throw logic_error("Buffered::get_handle");
+}
+
void Buffered::set_op(Mode op)
{
if(op!=cur_op)