plan 9 kernel history: overview | file list | diff list

1990/0721/port/devbit.c (diff list | history)

1990/0709/sys/src/9/port/devbit.c:471,4771990/0721/sys/src/9/port/devbit.c:471,477 (short | long | prev | next)
1990/0329    
	uchar *p, *q; 
	long m, v, miny, maxy, t, x, y; 
1990/0327    
	ulong l, nw, ws; 
1990/0623    
	int off, i; 
1990/0721    
	int off, isoff, i; 
1990/06111    
	Point pt, pt1, pt2; 
1990/0324    
	Rectangle rect; 
1990/05313    
	Cursor curs; 
1990/0709/sys/src/9/port/devbit.c:485,4901990/0721/sys/src/9/port/devbit.c:485,496
1990/0327    
	if(c->qid != Qbitblt) 
		error(0, Egreg); 
 
1990/0721    
	isoff = 0; 
	if(waserror()){ 
		if(isoff) 
			cursoron(1); 
		nexterror(); 
	} 
1990/0324    
	p = va; 
	m = n; 
1990/0327    
	while(m > 0) 
1990/0709/sys/src/9/port/devbit.c:580,5901990/0721/sys/src/9/port/devbit.c:586,596
1990/0327    
			rect.max.x = GLONG(p+21); 
			rect.max.y = GLONG(p+25); 
			v = GSHORT(p+29); 
1990/0504    
			if(off) 
1990/0721    
			if(off && !isoff){ 
1990/0504    
				cursoroff(1); 
1990/0721    
				isoff = 1; 
			} 
1990/0327    
			bitblt(dst, pt, src, rect, v); 
1990/0504    
			if(off) 
				cursoron(1); 
1990/0327    
			m -= 31; 
			p += 31; 
			break; 
1990/0709/sys/src/9/port/devbit.c:599,6071990/0721/sys/src/9/port/devbit.c:605,615
1990/05313    
			 *	set		32 
			 */ 
			if(m == 1){ 
				cursoroff(1); 
1990/0721    
				if(!isoff){ 
					cursoroff(1); 
					isoff = 1; 
				} 
1990/05313    
				Cursortocursor(&arrow); 
				cursoron(1); 
				m -= 1; 
				p += 1; 
				break; 
1990/0709/sys/src/9/port/devbit.c:612,6201990/0721/sys/src/9/port/devbit.c:620,630
1990/05313    
			curs.offset.y = GLONG(p+5); 
			memcpy(curs.clr, p+9, 2*16); 
			memcpy(curs.set, p+41, 2*16); 
			cursoroff(1); 
1990/0721    
			if(!isoff){ 
				cursoroff(1); 
				isoff = 1; 
			} 
1990/05313    
			Cursortocursor(&curs); 
			cursoron(1); 
			m -= 73; 
			p += 73; 
			break; 
1990/0709/sys/src/9/port/devbit.c:736,7461990/0721/sys/src/9/port/devbit.c:746,756
1990/06111    
			pt2.y = GLONG(p+15); 
			t = p[19]; 
			v = GSHORT(p+20); 
			if(off) 
1990/0721    
			if(off && !isoff){ 
1990/06111    
				cursoroff(1); 
1990/0721    
				isoff = 1; 
			} 
1990/06111    
			segment(dst, pt1, pt2, t, v); 
			if(off) 
				cursoron(1); 
			m -= 22; 
			p += 22; 
1990/0613    
			break; 
1990/0709/sys/src/9/port/devbit.c:801,8111990/0721/sys/src/9/port/devbit.c:811,821
1990/0329    
			q = memchr(p, 0, m); 
			if(q == 0) 
				error(0, Ebadblt); 
1990/0504    
			if(off) 
1990/0721    
			if(off && !isoff){ 
1990/0504    
				cursoroff(1); 
1990/0721    
				isoff = 1; 
			} 
1990/0623    
			string(dst, pt, f, (char*)p, v); 
1990/0504    
			if(off) 
				cursoron(1); 
1990/0329    
			q++; 
			m -= q-p; 
			p = q; 
1990/0709/sys/src/9/port/devbit.c:846,8561990/0721/sys/src/9/port/devbit.c:856,866
1990/0329    
 
				for(i=0; i<16; i++) 
					t.bits[i] = src->base[i]>>16; 
1990/0504    
				if(off) 
1990/0721    
				if(off && !isoff){ 
1990/0504    
					cursoroff(1); 
1990/0721    
					isoff = 1; 
				} 
1990/0329    
				texture(dst, rect, &t, v); 
1990/0504    
				if(off) 
					cursoron(1); 
1990/0329    
			} 
			m -= 23; 
			p += 23; 
1990/0709/sys/src/9/port/devbit.c:891,8981990/0721/sys/src/9/port/devbit.c:901,910
1990/0329    
			m -= 11; 
			if(m < l*(maxy-miny)) 
				error(0, Ebadblt); 
1990/0504    
			if(off) 
1990/0721    
			if(off && !isoff){ 
1990/0504    
				cursoroff(1); 
1990/0721    
				isoff = 1; 
			} 
1990/0329    
			for(y=miny; y<maxy; y++){ 
				q = (uchar*)addr(dst, Pt(dst->r.min.x, y)); 
				q += (dst->r.min.x&((sizeof(ulong))*ws-1))/8; 
1990/0709/sys/src/9/port/devbit.c:900,9101990/0721/sys/src/9/port/devbit.c:912,922
1990/0329    
					*q++ = U2K(*p++); 
				m -= l; 
			} 
1990/0504    
			if(off) 
				cursoron(1); 
1990/0329    
			break; 
1990/0327    
		} 
 
1990/0721    
	if(isoff) 
		cursoron(1); 
1990/0324    
	return n; 
} 
 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)