Lines Matching refs:hp
204 register struct hent *hp; in account() local
222 hp = lookup(cp); in account()
223 if (hp == NULL) { in account()
226 hp = enter(cp); in account()
228 hp->h_feetpages += t; in account()
230 hp->h_count += ic; in account()
232 hp->h_count++; in account()
244 register struct hent *hp, **ap; in dumpit() local
249 hp = hashtab[0]; in dumpit()
251 base = (struct hent **) calloc(sizeof hp, hcount); in dumpit()
253 while (hp == NULL) in dumpit()
254 hp = hashtab[hno++]; in dumpit()
255 *ap = hp; in dumpit()
256 hp = hp->h_link; in dumpit()
258 qsort(base, hcount, sizeof hp, qucmp); in dumpit()
263 hp = *ap; in dumpit()
264 runs += hp->h_count; in dumpit()
265 feet += hp->h_feetpages; in dumpit()
266 printf("%-24s %7.2f %4d $%6.2f\n", hp->h_name, in dumpit()
267 hp->h_feetpages, hp->h_count, hp->h_feetpages * price); in dumpit()
282 register struct hent *hp; in rewrite() local
292 hp = hashtab[i]; in rewrite()
293 while (hp != NULL) { in rewrite()
294 fprintf(acctf, "%7.2f\t%s\t%d\n", hp->h_feetpages, in rewrite()
295 hp->h_name, hp->h_count); in rewrite()
296 hp = hp->h_link; in rewrite()
322 register struct hent *hp; in enter() local
325 if ((hp = lookup(name)) != NULL) in enter()
326 return(hp); in enter()
329 hp = (struct hent *) calloc(sizeof *hp, (size_t)1); in enter()
330 hp->h_name = (char *) calloc(sizeof(char), strlen(name)+1); in enter()
331 strcpy(hp->h_name, name); in enter()
332 hp->h_feetpages = 0.0; in enter()
333 hp->h_count = 0; in enter()
334 hp->h_link = hashtab[h]; in enter()
335 hashtab[h] = hp; in enter()
336 return(hp); in enter()
348 register struct hent *hp; in lookup() local
351 for (hp = hashtab[h]; hp != NULL; hp = hp->h_link) in lookup()
352 if (strcmp(hp->h_name, name) == 0) in lookup()
353 return(hp); in lookup()