4 int getln2(buffer
*ss
,stralloc
*sa
,char **cont
,unsigned int *clen
,int sep
)
7 register unsigned int i
;
10 if (!stralloc_ready(sa
,0)) return -1;
16 if (n
== 0) { *clen
= 0; return 0; }
18 i
= byte_chr(x
,n
,sep
);
19 if (i
< n
) { buffer_SEEK(ss
,*clen
= i
+ 1); *cont
= x
; return 0; }
20 if (!stralloc_readyplus(sa
,n
)) return -1;
22 sa
->len
= i
+ buffer_get(ss
,sa
->s
+ i
,n
);