Browse Source

Plan 9 from Bell Labs 2013-03-30

David du Colombier 11 years ago
parent
commit
87f0845224
7 changed files with 21 additions and 25 deletions
  1. 9 9
      rc/bin/ipso
  2. 1 1
      sys/man/3/mouse
  3. 1 0
      sys/src/9/pc/pci.c
  4. 2 13
      sys/src/9/port/devmouse.c
  5. 4 0
      sys/src/cmd/html2ms.c
  6. 2 0
      sys/src/cmd/ms2html.c
  7. 2 2
      sys/src/cmd/usb/kb/kb.c

+ 9 - 9
rc/bin/ipso

@@ -131,13 +131,15 @@ sleep 2; date > _timestamp	# so we can find which files have been edited.
 
 # edit the files
 if(~ $edit yes) $editor `{for(i in $files) basename $i}
-if(~ $flush yes ){
-	echo flushing old keys
-	echo delkey > /mnt/factotum/ctl
-}
-if(~ $load yes){
-	echo loading factotum keys
-	if (~ factotum $files) read -m < factotum > /mnt/factotum/ctl
+if(~ factotum $files){
+	if(~ $flush yes){
+		echo flushing old keys
+		echo delkey > /mnt/factotum/ctl
+	}
+	if(~ $load yes){
+		echo loading factotum keys
+		read -m < factotum > /mnt/factotum/ctl
+	}
 }
 
 # copy the files back
@@ -151,8 +153,6 @@ for(i in `{editedfiles}){
 			exit password
 		}
 		echo ''''$i'''' copied to $name
-		if(~ $i factotum)
-			read -m < $i > /mnt/factotum/ctl
 	case [xXqQ]*
 		exit
 	case [nN]* *

+ 1 - 1
sys/man/3/mouse

@@ -62,7 +62,7 @@ the
 file.
 The
 .B mousein
-file, which is exclusive-use and may be opened
+file, which may be opened
 only by the host owner, is intended for controlling devices, such as USB mice,
 that are managed by user-level software.
 Each event should consist of

+ 1 - 0
sys/src/9/pc/pci.c

@@ -667,6 +667,7 @@ static Bridge southbridges[] = {
 	{ 0x8086, 0x3a42, pIIxget, pIIxset },	/* Intel 82801JI */
 	{ 0x8086, 0x3a48, pIIxget, pIIxset },	/* Intel 82801JI */
 	{ 0x8086, 0x2916, pIIxget, pIIxset },	/* Intel 82801? */
+	{ 0x8086, 0x1c02, pIIxget, pIIxset },	/* Intel 6 Series/C200 */
 	{ 0x1106, 0x0586, viaget, viaset },	/* Viatech 82C586 */
 	{ 0x1106, 0x0596, viaget, viaset },	/* Viatech 82C596 */
 	{ 0x1106, 0x0686, viaget, viaset },	/* Viatech 82C686 */

+ 2 - 13
sys/src/9/port/devmouse.c

@@ -44,7 +44,6 @@ struct Mouseinfo
 	Ref;
 	QLock;
 	int	open;
-	int	inopen;
 	int	acceleration;
 	int	maxacc;
 	Mousestate	queue[16];	/* circular buffer of click events */
@@ -202,13 +201,6 @@ mouseopen(Chan *c, int omode)
 	case Qmousein:
 		if(!iseve())
 			error(Eperm);
-		lock(&mouse);
-		if(mouse.inopen){
-			unlock(&mouse);
-			error(Einuse);
-		}
-		mouse.inopen = 1;
-		unlock(&mouse);
 		break;
 	default:
 		incref(&mouse);
@@ -231,14 +223,11 @@ static void
 mouseclose(Chan *c)
 {
 	if((c->qid.type&QTDIR)==0 && (c->flag&COPEN)){
+		if(c->qid.path == Qmousein)
+			return;
 		lock(&mouse);
 		if(c->qid.path == Qmouse)
 			mouse.open = 0;
-		else if(c->qid.path == Qmousein){
-			mouse.inopen = 0;
-			unlock(&mouse);
-			return;
-		}
 		if(--mouse.ref == 0){
 			cursoroff(1);
 			curs = arrow;

+ 4 - 0
sys/src/cmd/html2ms.c

@@ -82,6 +82,7 @@ Goobie gtab[] =
 	"dd",		g_ignore,	g_unexpected,
 	"dfn",		g_ignore,	g_ignore,
 	"dir",		g_list,		g_listend,
+	"div",		g_ignore,		g_br,
 	"dl",		g_indent,	g_exdent,
 	"dt",		g_dt,		g_unexpected,
 	"em",		g_ignore,	g_ignore,
@@ -114,7 +115,9 @@ Goobie gtab[] =
 	"plaintext",	g_ignore,	g_unexpected,
 	"pre",		g_pre,		g_displayend,
 	"samp",		g_ignore,	g_ignore,
+	"script",	g_ignore,	g_ignore,
 	"select",	g_ignore,	g_ignore,
+	"span",		g_ignore,	g_ignore,
 	"strong",	g_ignore,	g_ignore,
 	"table",	g_table,	g_tableend,
 	"textarea",	g_ignore,	g_ignore,
@@ -147,6 +150,7 @@ Entity pl_entity[]=
 "aring",  L'å', "atilde", L'ã', "auml",   L'ä', "ccedil", L'ç', "eacute", L'é',
 "ecirc",  L'ê', "egrave", L'è', "eth",    L'ð', "euml",   L'ë', "gt",     L'>',
 "iacute", L'í', "icirc",  L'î', "igrave", L'ì', "iuml",   L'ï', "lt",     L'<',
+"nbsp", L' ',
 "ntilde", L'ñ', "oacute", L'ó', "ocirc",  L'ô', "ograve", L'ò', "oslash", L'ø',
 "otilde", L'õ', "ouml",   L'ö', "szlig",  L'ß', "thorn",  L'þ', "uacute", L'ú',
 "ucirc",  L'û', "ugrave", L'ù', "uuml",   L'ü', "yacute", L'ý', "yuml",   L'ÿ',

+ 2 - 0
sys/src/cmd/ms2html.c

@@ -1461,6 +1461,7 @@ closel(void)
 void
 g_IP(int argc, char **argv)
 {
+	dohanginghead();
 	switch(list){
 	default:
 		closel();
@@ -1603,6 +1604,7 @@ g_NH(int argc, char **argv)
 	closel();
 	closefont();
 
+	dohanginghead();
 	dohangingcenter();
 	if(argc == 1)
 		level = 0;

+ 2 - 2
sys/src/cmd/usb/kb/kb.c

@@ -299,9 +299,9 @@ ptrrepvals(KDev *kd, Chain *ch, int *px, int *py, int *pb)
 	for(i = 0; i<sizeof buts; i++)
 		b |= (hidifcval(&kd->templ, KindButtons, i) & 1) << buts[i];
 	if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) > 0)	/* up */
-		b |= 0x10;
-	if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) < 0)	/* down */
 		b |= 0x08;
+	if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) < 0)	/* down */
+		b |= 0x10;
 
 	*px = x;
 	*py = y;