Lines Matching refs:pgrow
131 void grow_if_needed (struct growable *pgrow);
662 int append_to_growable(struct growable *pgrow, char *pstr) in append_to_growable() argument
667 grow_if_needed(pgrow); in append_to_growable()
668 pgrow->parray[pgrow->ncur++] = pstr; in append_to_growable()
669 return pgrow->ncur; in append_to_growable()
673 grow_if_needed(struct growable *pgrow) in grow_if_needed() argument
677 if ( pgrow->ncur >= pgrow->nmax ) { in grow_if_needed()
678 pgrow->parray = xrealloc(pgrow->parray, in grow_if_needed()
679 (NGROW*pgrow->nmax)*sizeof(char*)); in grow_if_needed()
680 pgrow->nmax *= NGROW; in grow_if_needed()
691 struct growable *pgrow; in allocate_growable() local
693 pgrow = xmalloc(sizeof(struct growable)); in allocate_growable()
694 pgrow->parray = xmalloc(NGROW_INIT*sizeof(char *)); in allocate_growable()
695 pgrow->nmax = NGROW_INIT; in allocate_growable()
696 pgrow->ncur = 0; in allocate_growable()
697 return pgrow; in allocate_growable()
701 free_growable(struct growable *pgrow) in free_growable() argument
704 for( i = 0; i < pgrow->ncur; i++ ) in free_growable()
705 free(pgrow->parray[i]); in free_growable()
706 free(pgrow->parray); in free_growable()
707 free(pgrow); in free_growable()