test
This commit is contained in:
parent
bb7870034f
commit
3259605baa
@ -7,6 +7,6 @@ static int b0read(int fd,const char* buf, unsigned int len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char buffer_0_space[BUFFER_INSIZE];
|
char buffer_0_space[BUFFER_INSIZE];
|
||||||
static buffer it = BUFFER_INIT(b0read,0,buffer_0_space,0);
|
static buffer it = BUFFER_INIT(b0read,0,buffer_0_space,sizeof buffer_0_space);
|
||||||
buffer *buffer_0 = ⁢
|
buffer *buffer_0 = ⁢
|
||||||
|
|
||||||
|
@ -7,6 +7,6 @@ static int b0read(int fd,const char* buf, unsigned int len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char buffer_0_space[128];
|
char buffer_0_space[128];
|
||||||
static buffer it = BUFFER_INIT(b0read,0,buffer_0_space,0);
|
static buffer it = BUFFER_INIT_READ(b0read,0,buffer_0_space,sizeof buffer_0_space);
|
||||||
buffer *buffer_0small = ⁢
|
buffer *buffer_0small = ⁢
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ extern int buffer_stubborn_read(int (*op)(),int fd,const char* buf, unsigned int
|
|||||||
int buffer_feed(buffer* b) {
|
int buffer_feed(buffer* b) {
|
||||||
if (b->p==b->n) {
|
if (b->p==b->n) {
|
||||||
int w;
|
int w;
|
||||||
if ((w=buffer_stubborn_read(b->op,b->fd,b->x,b->n))<0)
|
if ((w=buffer_stubborn_read(b->op,b->fd,b->x,b->a))<0)
|
||||||
return -1;
|
return -1;
|
||||||
b->n=w;
|
b->n=w;
|
||||||
b->p=0;
|
b->p=0;
|
||||||
|
@ -6,6 +6,7 @@ int buffer_stubborn_read(int (*op)(),int fd,const char* buf, unsigned int len) {
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
if ((w=op(fd,buf,len))<0)
|
if ((w=op(fd,buf,len))<0)
|
||||||
if (errno == EINTR) continue;
|
if (errno == EINTR) continue;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user