void frinit(Frame *f, Rectangle r, Font *ft, Bitmap *b) { f->font = ft; f->maxtab = 8*charwidth(ft, '0'); f->nbox = 0; f->nalloc = 0; f->nchars = 0; f->nlines = 0; f->p0 = 0; f->p1 = 0; f->box = 0; f->lastlinefull = 0; frsetrects(f, r, b); }
void frinit(Frame *f, Rectangle r, Font *ft, Image *b, Image *cols[NCOL]) { f->font = ft; f->display = b->display; f->maxtab = 8*stringwidth(ft, "0"); f->nbox = 0; f->nalloc = 0; f->nchars = 0; f->nlines = 0; f->p0 = 0; f->p1 = 0; f->box = 0; f->lastlinefull = 0; if(cols != 0) memmove(f->cols, cols, sizeof f->cols); frsetrects(f, r, b); if(f->tick==nil && f->cols[BACK]!=0) frinittick(f); }