OK, turing.

<- leave blank

Sun Jan 29 15:56:01 EST 2023

diff bbd168f542014bce6706515654e5a80bc4101566 uncommitted
--- a/g_game.c
+++ b/g_game.c
@@ -778,8 +778,8 @@
		mousebuttons[0] = ev->data1 & 1;
		mousebuttons[1] = ev->data1 & 2;
		mousebuttons[2] = ev->data1 & 4;
- mousex = ev->data2 * (mouseSensitivity + 5) / 2;
- mousey = ev->data3 * (mouseSensitivity + 5) / 2;
+ mousex += ev->data2 * (mouseSensitivity + 5) / 2;
+ mousey += ev->data3 * (mouseSensitivity + 5) / 2;
		return true; // eat events

	case ev_joystick:


Sat Jan 28 17:44:16 EST 2023
diff be1c9f1769b212958367500b2ceae8ffda844ad2 uncommitted
--- a//sys/src/cmd/aux/kbdfs/kbdfs.c
+++ b//sys/src/cmd/aux/kbdfs/kbdfs.c
@@ -527,8 +527,8 @@
				break;
			}
		}
- /* button unknown to kbtab, use rune if no modifier keys are active */
- if(k.b == 0 && !a->shift && !a->altgr && !a->ctl)
+ /* button unknown to kbtab, use rune */
+ if(k.b == 0)
			k.b = k.r;
		if(k.r == Kshift)
			a->shift = k.down;


Sat Jan 28 03:43:56 EST 2023
diff f9096fcdfd46f5bf566e87107675bfd439771a44 uncommitted
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -392,6 +392,7 @@
	char *e;
	char *watched;
	Window *w, *cur;
+ static char keys[64];

	threadsetname("keyboardtap");
	enum { Awin, Actl, Afrom, Adev, Ato, Ainp, Awatch, NALT };
@@ -408,6 +409,7 @@

	cur = nil;
	watched = nil;
+ keys[0] = 0;
	for(;;)
		switch(alt(alts)){
		case Awin:
@@ -414,16 +416,21 @@
			cur = w;
			if(cur != nil){
				alts[Ainp].c = cur->ck;
- if(tapseats[OREAD] == Tapoff)
- goto Reset;
- if(alts[Awatch].op == CHANSND)
- free(watched);
- watched = smprint("%c%d", Tapfocus, cur->id);
- alts[Awatch].op = CHANSND;
+ if(tapseats[OREAD] != Tapoff){
+ if(alts[Awatch].op == CHANSND)
+ free(watched);
+ watched = smprint("%c%d", Tapfocus, cur->id);
+ alts[Awatch].op = CHANSND;
+ }
			}
			if(alts[Ainp].op != CHANNOP || alts[Ato].op != CHANNOP)
				free(s);
- goto Reset;
+ if(cur == nil)
+ goto Reset;
+ s = smprint("K%s", keys);
+ alts[Ainp].op = CHANSND;
+ alts[Ato].op = CHANNOP;
+ break;
		case Actl:
			e = tapctlmsg(ctl);
			sendp(resptap, e);
@@ -444,6 +451,8 @@
			alts[Ainp].op = CHANSND;
			break;
		case Adev:
+ if(s[0] == 'k' || s[0] == 'K')
+ strcpy(keys, s+1);
			if(tapseats[OWRITE] == Tapoff && cur == nil){
				free(s);
				break;


Sat Jan 28 03:12:36 EST 2023
diff f9096fcdfd46f5bf566e87107675bfd439771a44 uncommitted
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -415,15 +415,13 @@
			if(cur != nil){
				alts[Ainp].c = cur->ck;
				if(tapseats[OREAD] == Tapoff)
- goto Reset;
+ break;
				if(alts[Awatch].op == CHANSND)
					free(watched);
				watched = smprint("%c%d", Tapfocus, cur->id);
				alts[Awatch].op = CHANSND;
			}
- if(alts[Ainp].op != CHANNOP || alts[Ato].op != CHANNOP)
- free(s);
- goto Reset;
+ break;
		case Actl:
			e = tapctlmsg(ctl);
			sendp(resptap, e);


Fri Jan 27 18:12:02 EST 2023
ifs = '' </dev/kbdtap tr \x0 \xa | {
	while(msg = `{read}){
		echo $"msg | {
			first = `{read -c 1};
			rest = `{read}
		}
		if(~ $first c){
			if(~ $"rest '
')
				echo c☺
			if not
				echo -n $first^`{echo -n $"rest | tr a-zA-Z
				A-Za-z}
		}
	}
} | tr ☺\xa \xa\x0 >/dev/kbdtap


Fri Jan 27 13:17:15 EST 2023
term% git/diff
diff bbd168f542014bce6706515654e5a80bc4101566 uncommitted
--- a/h2def.h
+++ b/h2def.h
@@ -13,6 +13,9 @@

 #pragma pack on

+/* Build with support for Assassin */
+#define ASSASSIN 1
+
 /* if rangecheck is undefined, most parameter
  * validation debugging code will not be compiled
  */
term%

Fri Jan 27 09:53:41 EST 2023
term% acid 2937
/proc/2937/text:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
acid: lstk()
fwrite(f=0x0,p=0x7fffffffd42c,nrec=0x1,recl=0x4)+0x2c
/sys/src/libstdio/fwrite.c:15
	s=0x7fffffffd42c
	n=0xffffd42c00000004
	d=0x4ffffd470
StreamOutLong()+0x31 /usr/mstoney/src/hexen/sv_save.c:2476
	tmp=0x2480b300000066
SV_SaveMap()+0x57 /usr/mstoney/src/hexen/sv_save.c:373
	fileName=0x74736d2f7273752f
SV_MapTeleport(map=0x26f00000002,position=0x0)+0x55
/usr/mstoney/src/hexen/sv_save.c:546
	oldKeys=0x0
	oldPieces=0x0
	rClass=0x0
	playerBackup=0x0
	inventoryPtr=0x0
	currentInvPos=0x0
	fileName=0x20b74e
	i=0x20ae0900000000
	targetPlayerMobj=0x0
	oldWeaponowned=0x0
	playerWasReborn=0x0
	mobj=0x0
G_DoTeleportNewMap()+0x1b /usr/mstoney/src/hexen/g_game.c:1359
G_Ticker()+0x495 /usr/mstoney/src/hexen/g_game.c:824
	cmd=0x0
	i=0x20842400000000
	buf=0x200063
TryRunTics()+0x249 /usr/mstoney/src/hexen/d_net.c:905
	realtics=0xc3411db100000001
	entertic=0x2249c3411db1
	lowtic=0x2249
	counts=0x14200000000
	i=0x20c0fc00000000
H2_GameLoop()+0x10a /usr/mstoney/src/hexen/h2_main.c:585
	filename=0x2
H2_Main()+0x28e /usr/mstoney/src/hexen/h2_main.c:318
main(argv=0x7fffffffef90)+0x27 /usr/mstoney/src/hexen/i_main.c:13
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid:

Fri Jan 27 09:17:49 EST 2023
term% git/diff
diff 8bd16fed5b196ae0d0c05e2d8412b2e7b08901ba uncommitted
--- a/sb_bar.c
+++ b/sb_bar.c
@@ -102,7 +102,7 @@

 // EXTERNAL DATA DECLARATIONS ----------------------------------------------

-extern byte *screen;
+extern byte *screens;
 extern int ArmorIncrement[NUMCLASSES][NUMARMOR];
 extern int AutoArmorSave[NUMCLASSES];

@@ -1432,9 +1432,9 @@
 #ifndef RENDER3D
		for (i = 165; i < 187 - (22*CPlayer->mana[0]) / MAX_MANA;
		i++)
		{
- screen[i*SCREENWIDTH+95] = 0;
- screen[i*SCREENWIDTH+96] = 0;
- screen[i*SCREENWIDTH+97] = 0;
+ screens[i*SCREENWIDTH+95] = 0;
+ screens[i*SCREENWIDTH+96] = 0;
+ screens[i*SCREENWIDTH+97] = 0;
		}
 #endif
		V_DrawPatch(102, 164, manaVialPatch2);
@@ -1441,9 +1441,9 @@
 #ifndef RENDER3D
		for (i = 165; i < 187-(22*CPlayer->mana[1])/MAX_MANA; i++)
		{
- screen[i*SCREENWIDTH+103] = 0;
- screen[i*SCREENWIDTH+104] = 0;
- screen[i*SCREENWIDTH+105] = 0;
+ screens[i*SCREENWIDTH+103] = 0;
+ screens[i*SCREENWIDTH+104] = 0;
+ screens[i*SCREENWIDTH+105] = 0;
		}
		oldweapon = CPlayer->readyweapon;
		UpdateState |= I_STATBAR;
term%

Fri Jan 27 05:38:05 EST 2023
How do I close vim?

Thu Jan 26 23:29:26 EST 2023
term% git/diff
diff 8bd16fed5b196ae0d0c05e2d8412b2e7b08901ba uncommitted
--- a/sb_bar.c
+++ b/sb_bar.c
@@ -1430,21 +1430,24 @@
		V_DrawPatch(110, 164, manaPatch2);
		V_DrawPatch(94, 164, manaVialPatch1);
 #ifndef RENDER3D
- for (i = 165; i < 187 - (22*CPlayer->mana[0]) / MAX_MANA; i++)
- {
- screen[i*SCREENWIDTH+95] = 0;
- screen[i*SCREENWIDTH+96] = 0;
- screen[i*SCREENWIDTH+97] = 0;
- }
-#endif
+/* for (i = 165; i < 187 - (22*CPlayer->mana[0]) / MAX_MANA; i++)
+* {
+* screen[i*SCREENWIDTH+95] = 0;
+* screen[i*SCREENWIDTH+96] = 0;
+* screen[i*SCREENWIDTH+97] = 0;
+* }
+*/
+#endif
+
		V_DrawPatch(102, 164, manaVialPatch2);
 #ifndef RENDER3D
- for (i = 165; i < 187-(22*CPlayer->mana[1])/MAX_MANA; i++)
- {
- screen[i*SCREENWIDTH+103] = 0;
- screen[i*SCREENWIDTH+104] = 0;
- screen[i*SCREENWIDTH+105] = 0;
- }
+/* for (i = 165; i < 187-(22*CPlayer->mana[1])/MAX_MANA; i++)
+* {
+* screen[i*SCREENWIDTH+103] = 0;
+* screen[i*SCREENWIDTH+104] = 0;
+* screen[i*SCREENWIDTH+105] = 0;
+* }
+*/
		oldweapon = CPlayer->readyweapon;
		UpdateState |= I_STATBAR;
	}
term%

Thu Jan 26 22:26:16 EST 2023
diff 7f8246fd97a12477f9dd21c68a3d81b4c4b46852 uncommitted
--- a/sys/src/cmd/6c/cgen.c
+++ b/sys/src/cmd/6c/cgen.c
@@ -1400,7 +1400,7 @@
	Prog *p1;
	Node nod0, nod1, nod2, nod3, nod4, *l, *r;
	Type *t;
- int v, c, mt, mo;
+ int v, c, mt, mo, re;
	vlong o0, o1;

	if(n == Z || n->type == T)
@@ -1683,6 +1683,7 @@
		}
		o0 = n->xoffset;
		o1 = nn->xoffset;
+ re = w % ewidth[mt];
		w /= ewidth[mt];
		while(--w >= 0) {
			gins(mo, n, &nod0);
@@ -1689,6 +1690,12 @@
			gins(mo, &nod0, nn);
			n->xoffset += ewidth[mt];
			nn->xoffset += ewidth[mt];
+ }
+ while(--re >= 0) {
+ gins(AMOVB, n, &nod0);
+ gins(AMOVB, &nod0, nn);
+ n->xoffset += 1;
+ nn->xoffset += 1;
		}
		n->xoffset = o0;
		nn->xoffset = o1;


next