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.
|
|
|
#include "byte.h"
|
|
|
|
#include "buffer.h"
|
|
|
|
|
|
|
|
int buffer_getc(buffer* b,char* x) {
|
|
|
|
if (b->p==b->n) {
|
|
|
|
register int blen;
|
|
|
|
if ((blen=buffer_feed(b))<=0) return blen;
|
|
|
|
}
|
|
|
|
*x=b->x[b->p];
|
|
|
|
++b->p;
|
|
|
|
return 1;
|
|
|
|
}
|