~kris/9p

9hist

76b14f19d7aff6b2b711462fbdd62e4d89a8f06a — David du Colombier 27 years ago 3f85b65
Plan 9 from Bell Labs 1999-01-19
M carrera/kbd.c => carrera/kbd.c +1 -0
@@ 8,6 8,7 @@

#define	Image	IMAGE
#include	<draw.h>
#include	<cursor.h>
#include	"screen.h"

enum

M carrera/screen.c => carrera/screen.c +1 -0
@@ 10,6 10,7 @@
#define	Image	IMAGE
#include	<draw.h>
#include	<memdraw.h>
#include	<cursor.h>
#include	"screen.h"

#define	MINX	8

M carrera/screen.h => carrera/screen.h +1 -0
@@ 1,3 1,4 @@
typedef struct Cursor Cursor;
typedef struct Cursorinfo	Cursorinfo;

struct Cursorinfo

M pc/devvga.c => pc/devvga.c +1 -0
@@ 10,6 10,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

enum {

M pc/mouse.c => pc/mouse.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/screen.c => pc/screen.c +1 -0
@@ 10,6 10,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static ulong onesbits = ~0;

M pc/screen.h => pc/screen.h +1 -0
@@ 1,3 1,4 @@
typedef struct Cursor Cursor;
typedef struct Cursorinfo Cursorinfo;
struct Cursorinfo {
	Cursor;

M pc/scsi.c => pc/scsi.c +22 -16
@@ 17,6 17,7 @@ enum {
	CMDwrite6	= 0x0A,
	CMDinquire	= 0x12,
	CMDstart	= 0x1B,
	CMDcapacity	= 0x25,
	CMDread10	= 0x28,
	CMDwrite10	= 0x2A,
};


@@ 97,11 98,12 @@ scsiexec(Target *t, int rw, uchar *cmd, int cbytes, void *data, int *dbytes)

	default:
		/*
		 * It's more complicated than this. There are conditions which
		 * are 'ok' but for which the returned status code is not 'STok'.
		 * Also, not all conditions require a reqsense, there may be a
		 * need to do a reqsense here when necessary and making it
		 * available to the caller somehow.
		 * It's more complicated than this. There are conditions
		 * which are 'ok' but for which the returned status code
		 * is not 'STok'.
		 * Also, not all conditions require a reqsense, might
		 * need to do a reqsense here and make it available to the
		 * caller somehow.
		 *
		 * Later.
		 */


@@ 145,7 147,8 @@ scsiprobe(Ctlr *ctlr)
		nbytes = Nscratch;
		s = scsireqsense(t, 0, t->scratch, &nbytes, 0);
		if(s != STok){
			print("scsi#%d: unit %d unavailable, status %d\n", t->ctlrno, i, s);
			print("scsi#%d: unit %d unavailable, status %d\n",
				t->ctlrno, i, s);
			continue;
		}



@@ 157,10 160,12 @@ scsiprobe(Ctlr *ctlr)
		nbytes = Ninq;
		s = scsiinquiry(t, 0, t->inq, &nbytes);
		if(s != STok) {
			print("scsi#%d: unit %d inquire failed, status %d\n", t->ctlrno, i, s);
			print("scsi#%d: unit %d inquire failed, status %d\n",
				t->ctlrno, i, s);
			continue;
		}
		print("scsi#%d: unit %d: %s\n", t->ctlrno, i, (char*)(t->inq+8));
		print("scsi#%d: unit %d: %s\n",
			t->ctlrno, i, (char*)(t->inq+8));
		t->ok = 1;
	}
}


@@ 209,7 214,8 @@ scsiinv(int devno, int *type, Target **rt, uchar **inq, char *id)
				*rt = t;
				*inq = t->inq;
				if(id)
					sprint(id, "scsi%d: unit %d", ctlr, unit);
					sprint(id, "scsi%d: unit %d",
						ctlr, unit);
				return devno;
			}
		}


@@ 259,7 265,7 @@ scsicap(Target *t, char lun, ulong *size, ulong *bsize)
	uchar cmd[10], *d;

	memset(cmd, 0, sizeof(cmd));
	cmd[0] = 0x25;
	cmd[0] = CMDcapacity;
	cmd[1] = lun<<5;

	nbytes = 8;


@@ 354,17 360,17 @@ scsireqsense(Target *t, char lun, void *data, int *nbytes, int quiet)

		switch(sense[2] & 0x0F){

		case 6:						/* unit attention */
			if(sense[12] != 0x29)			/* power on, reset */
		case 6:					/* unit attention */
			if(sense[12] != 0x29)		/* power on, reset */
				goto buggery;
			/*FALLTHROUGH*/
		case 0:						/* no sense */
		case 1:						/* recovered error */
		case 0:					/* no sense */
		case 1:					/* recovered error */
			free(sense);
			return STok;

		case 2:						/* not ready */
			if(sense[12] == 0x3A)			/* medium not present */
		case 2:					/* not ready */
			if(sense[12] == 0x3A)		/* medium not present */
				goto buggery;
			/*FALLTHROUGH*/


M pc/vga.c => pc/vga.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static ulong backbits = (Backgnd<<24)|(Backgnd<<16)|(Backgnd<<8)|Backgnd;

M pc/vgaark2000pv.c => pc/vgaark2000pv.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static int

M pc/vgabt485.c => pc/vgabt485.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgaclgd542x.c => pc/vgaclgd542x.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static int

M pc/vgact65545.c => pc/vgact65545.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static void

M pc/vgacyber938x.c => pc/vgacyber938x.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

enum {

M pc/vgamach64xx.c => pc/vgamach64xx.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgamga2164w.c => pc/vgamga2164w.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgargb524.c => pc/vgargb524.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgas3.c => pc/vgas3.c +1 -0
@@ 9,6 9,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static int

M pc/vgatvp3020.c => pc/vgatvp3020.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgatvp3026.c => pc/vgatvp3026.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

/*

M pc/vgax.c => pc/vgax.c +1 -0
@@ 8,6 8,7 @@
#define	Image	IMAGE
#include <draw.h>
#include <memdraw.h>
#include <cursor.h>
#include "screen.h"

static Lock vgaxlock;			/* access to index registers */

M port/devmouse.c => port/devmouse.c +3 -3
@@ 6,10 6,9 @@
#include	"../port/error.h"

#define	Image	IMAGE
#define	mouse	moose
#include	<draw.h>
#undef	mouse
#include	<memdraw.h>
#include	<cursor.h>
#include	"screen.h"

typedef struct Mouseinfo	Mouseinfo;


@@ 19,7 18,8 @@ struct Mouseinfo
	int	dx;
	int	dy;
	int	track;		/* dx & dy updated */
	Mouse;
	Point	xy;			/* mouse.xy */
	int	buttons;		/* mouse.buttons */
	int	redraw;		/* update cursor on screen */
	ulong	counter;	/* increments every update */
	ulong	lastcounter;	/* value when /dev/mouse read */