Annotation of researchv9/jerq/src/lib/layer/newlayer.c, revision 1.1

1.1     ! root        1: #include <jerq.h>
        !             2: #include "layer.h"
        !             3: 
        !             4: Layer *
        !             5: newlayer(r)
        !             6:        Rectangle r;
        !             7: {
        !             8:        register Layer *newl;
        !             9:        newl=(Layer *)alloc(sizeof (Layer));
        !            10:        if(newl==0)
        !            11:                return 0;
        !            12:        newl->obs=balloc(r);
        !            13:        if (newl->obs==0) {
        !            14:                free((char *)newl);
        !            15:                return 0;
        !            16:        }
        !            17:        newl->rect=r;
        !            18:        newl->someobs = 1;
        !            19:        newl->nonevis = 0;
        !            20:        newl->front=lback;
        !            21:        newl->back=0;
        !            22:        if(lback)
        !            23:                lback->back=newl;
        !            24:        if(lfront==0)
        !            25:                lfront=newl;
        !            26:        lback=newl;
        !            27:        /*
        !            28:         * Make it look like a Bitmap
        !            29:         */
        !            30:        newl->base=addr(&display, r.origin);
        !            31:        newl->width=display.width;
        !            32:        /*
        !            33:         * Pull it to the front and clear it!
        !            34:         */
        !            35:        upfront(newl);
        !            36:        Lbox(newl);
        !            37:        return(newl);
        !            38: }

unix.superglobalmegacorp.com

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