buffer stuff from Olaf and ip[46]_fmt stuff from me.

This commit is contained in:
leitner
2001-02-05 21:55:25 +00:00
parent 6838f0f0bb
commit fc4193e1ce
8 changed files with 158 additions and 4 deletions

View File

@@ -6,9 +6,10 @@ int buffer_get_token(buffer* b,char* x,unsigned int len,const char* charset,unsi
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;
register int r;
if ((r=buffer_getc(b,x))<0) return r;
if (r==0) break;
if (byte_chr(charset,setlen,*x)<setlen) break;
++x;
}
return blen;