Small tweaks
Lots of new code imported.
This commit is contained in:
parent
a770daa795
commit
2277c5d7bb
86 changed files with 12444 additions and 91 deletions
|
|
@ -157,10 +157,15 @@ hreadbuf(Hio *h, void *vsave)
|
|||
memmove(h->start + cpy, hh->pos, in);
|
||||
hh->pos += in;
|
||||
}
|
||||
}else if(in && (in = read(h->fd, h->start + cpy, in)) < 0){
|
||||
h->state = Herr;
|
||||
h->pos = h->stop;
|
||||
return nil;
|
||||
}else if(in){
|
||||
fprint(2, "read %d from %d\n", in, h->fd);
|
||||
if((in = read(h->fd, h->start + cpy, in)) < 0){
|
||||
fprint(2, "got error: %r\n");
|
||||
h->state = Herr;
|
||||
h->pos = h->stop;
|
||||
return nil;
|
||||
}
|
||||
fprint(2, "got %d\n", in);
|
||||
}
|
||||
if(in == 0)
|
||||
h->state = Hend;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue