| 9 | #include "common.h" |
| 10 | |
| 11 | size_t bgets(struct buffer *input, void *output, size_t len) |
| 12 | { |
| 13 | len = input->size < len ? input->size : len; |
| 14 | memmove(output, input->data, len); |
| 15 | input->data += len; |
| 16 | input->size -= len; |
| 17 | return len; |
| 18 | } |
| 19 | |
| 20 | size_t bputs(struct buffer *b, const void *data, size_t len) |
| 21 | { |
no test coverage detected