You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
237 B
C
14 lines
237 B
C
24 years ago
|
#include "byte.h"
|
||
|
#include "buffer.h"
|
||
|
|
||
|
int buffer_getn(buffer* b,char* x,unsigned int len) {
|
||
|
int blen;
|
||
|
|
||
|
for(blen=0;blen<len;++blen) {
|
||
|
if ((r=buffer_getc(b,x))<0) return r;
|
||
|
if (r==0) return blen;
|
||
|
++x;
|
||
|
}
|
||
|
return blen;
|
||
|
}
|