Lines Matching refs:hptr

1492 print(struct blk *hptr)  in print()  argument
1498 rewind(hptr); in print()
1499 while (sfeof(hptr) == 0) { in print()
1500 if (sgetc(hptr) > 99) { in print()
1501 rewind(hptr); in print()
1502 while (sfeof(hptr) == 0) { in print()
1503 printf("%c", sgetc(hptr)); in print()
1509 fsfile(hptr); in print()
1510 sc = sbackc(hptr); /* read scale off end of blk */ in print()
1511 if (sfbeg(hptr) != 0) { in print()
1516 p = copy(hptr, length(hptr)); in print()
2161 copy(struct blk *hptr, int size) in copy() argument
2176 sz = length(hptr); in copy()
2177 ptr = nalloc(hptr->beg, (unsigned)size); in copy()
2180 if ((ptr = nalloc(hptr->beg, (unsigned)size)) == NULL) { in copy()
2198 sdump(char *s1, struct blk *hptr) in sdump() argument
2202 if (hptr) { in sdump()
2203 printf("%s %o rd %o wt %o beg %o last %o\n", s1, hptr, in sdump()
2204 hptr->rd, hptr->wt, hptr->beg, hptr->last); in sdump()
2205 p = hptr->beg; in sdump()
2206 while (p < hptr->wt) in sdump()
2210 printf("%s %o\n", s1, hptr); in sdump()
2214 seekc(struct blk *hptr, int n) in seekc() argument
2218 nn = hptr->beg + n; in seekc()
2219 if (nn > hptr->last) { in seekc()
2220 nbytes += nn - hptr->last; in seekc()
2223 lbytes += nn - hptr->last; in seekc()
2226 p = realloc(hptr->beg, (unsigned)n); in seekc()
2228 hptr->beg = realloc(hptr->beg, in seekc()
2229 (unsigned)(hptr->last - hptr->beg)); in seekc()
2231 if ((p = realloc(hptr->beg, (unsigned)n)) == 0) in seekc()
2234 hptr->beg = p; in seekc()
2235 hptr->wt = hptr->last = hptr->rd = p + n; in seekc()
2238 hptr->rd = nn; in seekc()
2239 if (nn > hptr->wt) in seekc()
2240 hptr->wt = nn; in seekc()
2244 salterwd(struct wblk *hptr, struct blk *n) in salterwd() argument
2246 if (hptr->rdw == hptr->lastw) in salterwd()
2247 more((struct blk *)hptr); in salterwd()
2248 *hptr->rdw++ = n; in salterwd()
2249 if (hptr->rdw > hptr->wtw) in salterwd()
2250 hptr->wtw = hptr->rdw; in salterwd()
2254 more(struct blk *hptr) in more() argument
2259 if ((size = (hptr->last - hptr->beg) * 2) == 0) in more()
2268 p = realloc(hptr->beg, (unsigned)size); in more()
2270 hptr->beg = realloc(hptr->beg, in more()
2271 (unsigned)(hptr->last - hptr->beg)); in more()
2273 if ((p = realloc(hptr->beg, size)) == 0) in more()
2276 hptr->rd = hptr->rd - hptr->beg + p; in more()
2277 hptr->wt = hptr->wt - hptr->beg + p; in more()
2278 hptr->beg = p; in more()
2279 hptr->last = p + size; in more()