Lines Matching refs:pgrow
128 void grow_if_needed (struct growable *pgrow);
650 int append_to_growable(struct growable *pgrow, char *pstr) in append_to_growable() argument
655 grow_if_needed(pgrow); in append_to_growable()
656 pgrow->parray[pgrow->ncur++] = pstr; in append_to_growable()
657 return pgrow->ncur; in append_to_growable()
661 grow_if_needed(struct growable *pgrow) in grow_if_needed() argument
665 if ( pgrow->ncur >= pgrow->nmax ) { in grow_if_needed()
666 pgrow->parray = xrealloc(pgrow->parray, in grow_if_needed()
667 (NGROW*pgrow->nmax)*sizeof(char*)); in grow_if_needed()
668 pgrow->nmax *= NGROW; in grow_if_needed()
679 struct growable *pgrow; in allocate_growable() local
681 pgrow = xmalloc(sizeof(struct growable)); in allocate_growable()
682 pgrow->parray = xmalloc(NGROW_INIT*sizeof(char *)); in allocate_growable()
683 pgrow->nmax = NGROW_INIT; in allocate_growable()
684 pgrow->ncur = 0; in allocate_growable()
685 return pgrow; in allocate_growable()
689 free_growable(struct growable *pgrow) in free_growable() argument
692 for( i = 0; i < pgrow->ncur; i++ ) in free_growable()
693 free(pgrow->parray[i]); in free_growable()
694 free(pgrow->parray); in free_growable()
695 free(pgrow); in free_growable()