| * read in some header lines, either one or all of them. |
| * copy results into header log buffer. |
| hgethead(HConnect *c, int many) |
| fprint(2, "hgethead top %p - %p\n", hin->pos, hin->stop); |
| fprint(2, "hgethead %p - %p\n", pp, hin->stop); |
| while(p = memchr(pp, '\n', (char*)hin->stop - pp)){ |
| fprint(2, "hgethead %p - %p newline at %p %d\n", pp, hin->stop, p, *pp); |
| if(!many || p == pp || (p == pp + 1 && *pp == '\r')){ |
| if(c->hstop + n > &c->header[HBufSize]) |
| if(hreadbuf(hin, hin->pos) == nil || hin->state == Hend) |