Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.264 kB
#include "buffer.h"
int buffer_copy(buffer *bout,buffer *bin)
{
int n;
char *x;
for (;;) {
n = buffer_feed(bin);
if (n < 0) return -2;
if (!n) return 0;
x = buffer_PEEK(bin);
if (buffer_put(bout,x,n) == -1) return -3;
buffer_SEEK(bin,n);
}
}
Jump to Line
Something went wrong with that request. Please try again.