File:  [Research Unix] / researchv9 / jerq / src / lib / layer / lpoint.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

#include <jerq.h>
#include "layer.h"

lpoint(l, pt, f)
	register Layer *l;
	Point pt;
	Code f;
{
	register bit;
	register Word *p;
	register Obscured *o;
	register Bitmap *b;
	b=(Bitmap *)l;
	if(ptinrect(pt, l->rect)){
		if (l->someobs == l->nonevis)
			b = (l->nonevis?l->obs:(Bitmap *)l);
		else
			for(o=lfront; o; o=o->back)
				if(ptinrect(pt, o->rect)){
					b=((o!=l)?l->obs:(Bitmap *)l);
					break;
				}
		p=addr(b, pt);
		bit=1<<(WORDSIZE-1)-(pt.x&WORDMASK);
		if (f == F_XOR)
			*p ^= bit;
		else
			if (f == F_CLR)
				*p &= ~bit;
			else
				*p |= bit;
	}
}

unix.superglobalmegacorp.com

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