Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
355 B

#include "byte.h"
#include "buffer.h"
#include "scan.h"
int buffer_get_token(buffer* b,char* x,unsigned int len,const char* charset,unsigned int setlen) {
int blen;
for (blen=0;blen<len;++blen) {
if ((r=buffer_getc(b,*x))<0) return r;
if (r==0) return blen;
if (byte_chr(charset,clen,*x)<clen) return blen;
return blen;