Annotation of researchv9/jerq/src/lib/j/rectclip.c, revision 1.1.1.1

1.1       root        1: #include <jerq.h>
                      2: rectclip(rp, b)                /* first by reference, second by value */
                      3:        register Rectangle *rp;
                      4:        Rectangle b;
                      5: {
                      6:        register Rectangle *bp= &b;
                      7:        /*
                      8:         * Expand rectXrect() in line for speed
                      9:         */
                     10: #define c corner
                     11: #define o origin
                     12:        if((rp->o.x<bp->c.x && bp->o.x<rp->c.x &&
                     13:            rp->o.y<bp->c.y && bp->o.y<rp->c.y)==0)
                     14:                return 0;
                     15:        /* They must overlap */
                     16:        if(rp->origin.x<bp->origin.x)
                     17:                rp->origin.x=bp->origin.x;
                     18:        if(rp->origin.y<bp->origin.y)
                     19:                rp->origin.y=bp->origin.y;
                     20:        if(rp->corner.x>bp->corner.x)
                     21:                rp->corner.x=bp->corner.x;
                     22:        if(rp->corner.y>bp->corner.y)
                     23:                rp->corner.y=bp->corner.y;
                     24:        return 1;
                     25: }

unix.superglobalmegacorp.com

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