Annotation of researchv9/jerq/src/sam/term/frinit.c, revision 1.1.1.1

1.1       root        1: #include "frame.h"
                      2: 
                      3: frinit(f, r, ft, b)
                      4:        register Frame *f;
                      5:        Rectangle r;
                      6:        register Font *ft;
                      7:        Bitmap *b;
                      8: {
                      9:        register i, max;
                     10:        f->font=ft;
                     11:        f->maxtab=8*ft->info['1'].width;
                     12:        max=0;
                     13:        for(i=0; i<ft->n; i++)
                     14:                if(ft->info[i].width>max)
                     15:                        max=ft->info[i].width;
                     16:        f->maxcharwid=max;
                     17:        f->nbox=f->nalloc=0;
                     18:        f->nchars=f->nlines=0;
                     19:        f->p0=f->p1=0;
                     20:        f->box=0;
                     21:        f->lastlinefull=1;
                     22:        frsetrects(f, r, b);
                     23: }
                     24: frsetrects(f, r, b)
                     25:        register Frame *f;
                     26:        Rectangle r;
                     27:        Bitmap *b;
                     28: {
                     29:        f->b=b;
                     30:        f->entire=f->r=r;
                     31:        f->r.corner.y-=(r.corner.y-r.origin.y)%f->font->height;
                     32:        f->left=r.origin.x+1;
                     33:        f->maxlines=(r.corner.y-r.origin.y)/f->font->height;
                     34: }
                     35: frclear(f)
                     36:        register Frame *f;
                     37: {
                     38:        if(f->nbox)
                     39:                delbox(f, 0, f->nbox-1);
                     40:        gcfree(f->box);
                     41:        f->box=0;
                     42: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.