~kris/9p

9hist

788c43963bdb98f2daa31144b45434ed4f748346 — David du Colombier 33 years ago 46130bf
Plan 9 from Bell Labs 1992-12-07
5 files changed, 55 insertions(+), 0 deletions(-)

M gnot/u.h
M pc/u.h
M port/devbit.c
M power/u.h
M ss/u.h
M gnot/u.h => gnot/u.h +1 -0
@@ 1,5 1,6 @@
typedef	unsigned short	ushort;
typedef	unsigned char	uchar;
typedef	signed char	schar;
typedef unsigned long	ulong;
typedef	long		vlong;
typedef union Length	Length;

M pc/u.h => pc/u.h +1 -0
@@ 1,5 1,6 @@
typedef	unsigned short	ushort;
typedef	unsigned char	uchar;
typedef	signed char	schar;
typedef unsigned long	ulong;
typedef	long		vlong;
typedef union Length	Length;

M port/devbit.c => port/devbit.c +51 -0
@@ 980,6 980,57 @@ bitwrite(Chan *c, void *va, long n, ulong offset)
			p += 73;
			break;

		case 'e':
			/*
			 * polysegment
			 *
			 *	'e'		1
			 *	id		2
			 *	pt		8
			 *	value		1
			 *	code		2
			 *	n		2
			 *	pts		2*n
			 */
			if(m < 16)
				error(Ebadblt);
			l = BGSHORT(p+14);
			if(m < 16+2*l)
				error(Ebadblt);
			v = BGSHORT(p+1);
			if(v<0 || v>=bit.nmap || (dst=bit.map[v])==0)
				error(Ebadbitmap);
			off = 0;
			fc = BGSHORT(p+12) & 0xF;
			if(v == 0){
				if(flipping)
					fc = flipD[fc];
				off = 1;
			}
			pt1.x = BGLONG(p+3);
			pt1.y = BGLONG(p+7);
			t = p[11];
			if(off && !isoff){
				cursoroff(1);
				isoff = 1;
			}
			p += 16;
			m -= 16;
			while(l > 0){
				pt2.x = pt1.x + (schar)p[0];
				pt2.y = pt1.y + (schar)p[1];
				gsegment(dst, pt1, pt2, t, fc);
				if(dst->base < endscreen){
					mbbpt(pt1);
					mbbpt(pt2);
				}
				pt1 = pt2;
				p += 2;
				m -= 2;
				l--;
			}
			break;

		case 'f':
			/*
			 * free

M power/u.h => power/u.h +1 -0
@@ 1,5 1,6 @@
typedef	unsigned short	ushort;
typedef	unsigned char	uchar;
typedef	signed char	schar;
typedef unsigned long	ulong;
typedef	long		vlong;
typedef union Length	Length;

M ss/u.h => ss/u.h +1 -0
@@ 1,6 1,7 @@
typedef	unsigned int	uint;
typedef	unsigned short	ushort;
typedef	unsigned char	uchar;
typedef	signed char	schar;
typedef unsigned long	ulong;
typedef	long		vlong;
typedef union Length	Length;