Lines Matching refs:hptr

1494 print(struct blk *hptr)  in print()  argument
1500 rewind(hptr); in print()
1501 while (sfeof(hptr) == 0) { in print()
1502 if (sgetc(hptr) > 99) { in print()
1503 rewind(hptr); in print()
1504 while (sfeof(hptr) == 0) { in print()
1505 printf("%c", sgetc(hptr)); in print()
1511 fsfile(hptr); in print()
1512 sc = sbackc(hptr); /* read scale off end of blk */ in print()
1513 if (sfbeg(hptr) != 0) { in print()
1518 p = copy(hptr, length(hptr)); in print()
2163 copy(struct blk *hptr, int size) in copy() argument
2178 sz = length(hptr); in copy()
2179 ptr = nalloc(hptr->beg, (unsigned)size); in copy()
2182 if ((ptr = nalloc(hptr->beg, (unsigned)size)) == NULL) { in copy()
2200 sdump(char *s1, struct blk *hptr) in sdump() argument
2204 if (hptr) { in sdump()
2205 printf("%s %o rd %o wt %o beg %o last %o\n", s1, hptr, in sdump()
2206 hptr->rd, hptr->wt, hptr->beg, hptr->last); in sdump()
2207 p = hptr->beg; in sdump()
2208 while (p < hptr->wt) in sdump()
2212 printf("%s %o\n", s1, hptr); in sdump()
2216 seekc(struct blk *hptr, int n) in seekc() argument
2220 nn = hptr->beg + n; in seekc()
2221 if (nn > hptr->last) { in seekc()
2222 nbytes += nn - hptr->last; in seekc()
2225 lbytes += nn - hptr->last; in seekc()
2228 p = realloc(hptr->beg, (unsigned)n); in seekc()
2230 hptr->beg = realloc(hptr->beg, in seekc()
2231 (unsigned)(hptr->last - hptr->beg)); in seekc()
2233 if ((p = realloc(hptr->beg, (unsigned)n)) == 0) in seekc()
2236 hptr->beg = p; in seekc()
2237 hptr->wt = hptr->last = hptr->rd = p + n; in seekc()
2240 hptr->rd = nn; in seekc()
2241 if (nn > hptr->wt) in seekc()
2242 hptr->wt = nn; in seekc()
2246 salterwd(struct wblk *hptr, struct blk *n) in salterwd() argument
2248 if (hptr->rdw == hptr->lastw) in salterwd()
2249 more((struct blk *)hptr); in salterwd()
2250 *hptr->rdw++ = n; in salterwd()
2251 if (hptr->rdw > hptr->wtw) in salterwd()
2252 hptr->wtw = hptr->rdw; in salterwd()
2256 more(struct blk *hptr) in more() argument
2261 if ((size = (hptr->last - hptr->beg) * 2) == 0) in more()
2270 p = realloc(hptr->beg, (unsigned)size); in more()
2272 hptr->beg = realloc(hptr->beg, in more()
2273 (unsigned)(hptr->last - hptr->beg)); in more()
2275 if ((p = realloc(hptr->beg, size)) == 0) in more()
2278 hptr->rd = hptr->rd - hptr->beg + p; in more()
2279 hptr->wt = hptr->wt - hptr->beg + p; in more()
2280 hptr->beg = p; in more()
2281 hptr->last = p + size; in more()