Index: Makefile
===================================================================
--- Makefile	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ Makefile	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -39,5 +39,6 @@
 	ns \
 	fb \
-	console
+	console \
+	tetris
 
 ifeq ($(ARCH), amd64)
Index: console/console.c
===================================================================
--- console/console.c	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ console/console.c	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -285,4 +285,5 @@
 		case CONSOLE_PUTCHAR:
 			write_char(consnum, IPC_GET_ARG1(call));
+			gcons_notify_char(consnum);
 			break;
 		case CONSOLE_CLEAR:
@@ -297,11 +298,11 @@
 		case CONSOLE_GOTO:
 			
-			screenbuffer_goto(&(connections[consnum].screenbuffer), IPC_GET_ARG1(call), IPC_GET_ARG2(call));
+			screenbuffer_goto(&(connections[consnum].screenbuffer), IPC_GET_ARG2(call), IPC_GET_ARG1(call));
 			
 			break;
 
 		case CONSOLE_GETSIZE:
-			arg1 = fb_info.cols;
-			arg2 = fb_info.rows;
+			arg1 = fb_info.rows;
+			arg2 = fb_info.cols;
 			break;
 		case CONSOLE_FLUSH:
Index: console/gcons.c
===================================================================
--- console/gcons.c	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ console/gcons.c	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -49,4 +49,5 @@
 static int console_vp;
 static int cstatus_vp[CONSOLE_COUNT];
+static int console_has_input[CONSOLE_COUNT];
 static int cstat_row, cstat_col; /* Size of cstatus buttons */
 
@@ -56,5 +57,6 @@
 	CONS_ACTIVE = 0,
 	CONS_IDLE,
-	CONS_HAS_INPUT
+	CONS_HAS_INPUT,
+	CONS_DISCONNECTED
 };
 
@@ -65,5 +67,6 @@
 	{0xd0d0d0, 0x808080},
 	{0xd0d0d0, 0x0},
-	{0xd0d0d0, 0xa04040}
+	{0xd0d0d0, 0xa04040},
+	{0xd0d0d0, 0x0}
 };
 
@@ -109,7 +112,9 @@
 	set_style(stat_colors[state].fgcolor, stat_colors[state].bgcolor);
 	clear();
-	snprintf(data, 5, "%d", consnum+1);
-	for (i=0;data[i];i++)
-		putch(data[i], 0, i);
+	if (state != CONS_DISCONNECTED) {
+		snprintf(data, 5, "%d", consnum+1);
+		for (i=0;data[i];i++)
+			putch(data[i], 0, i);
+	}
 }
 
@@ -122,4 +127,6 @@
 	active_console = consnum;
 	draw_stat(consnum, CONS_ACTIVE);
+	console_has_input[consnum] = 0;
+
 	vp_switch(console_vp);
 }
@@ -130,4 +137,10 @@
 		return;
 
+	if (consnum == active_console || console_has_input[consnum])
+		return;
+
+	console_has_input[consnum] = 1;
+	draw_stat(consnum, CONS_HAS_INPUT);
+	
 	vp_switch(console_vp);
 }
@@ -145,5 +158,5 @@
 
 	for (i=0;i < CONSOLE_COUNT; i++) 
-		draw_stat(i, i == active_console ? CONS_ACTIVE : CONS_IDLE);
+		draw_stat(i, i == active_console ? CONS_ACTIVE : CONS_DISCONNECTED);
 	vp_switch(console_vp);
 }
Index: console/gcons.h
===================================================================
--- console/gcons.h	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ console/gcons.h	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -32,4 +32,5 @@
 void gcons_init(int phone);
 void gcons_change_console(int consnum);
+void gcons_notify_char(int consnum);
 
 #endif
Index: libc/include/err.h
===================================================================
--- libc/include/err.h	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ libc/include/err.h	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -30,6 +30,5 @@
 #define _libc__ERR_H_
 
-extern void errx (int __status, __const char *__format, ...)
-        __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
+#define errx(status,fmt,...) { printf((fmt),##__VA_ARGS__);_exit(status);}
 
 #endif
Index: libc/include/io/stream.h
===================================================================
--- libc/include/io/stream.h	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ libc/include/io/stream.h	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -27,4 +27,7 @@
  */
 
+#ifndef __libc_STREAM_H_
+#define __libc_STREAM_H_
+
 #include <libarch/types.h>
 
@@ -39,2 +42,4 @@
 fd_t open(const char *fname, int flags);
 int get_fd_phone(int fd);
+
+#endif
Index: tetris/screen.c
===================================================================
--- tetris/screen.c	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ tetris/screen.c	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -98,4 +98,5 @@
 {
 
+	resume_normal();
 	send_call(con_phone, CONSOLE_CLEAR, 0);
 	curscore = -1;
@@ -187,10 +188,4 @@
 
 
-#if vax && !__GNUC__
-typedef int regcell;	/* pcc is bad at `register char', etc */
-#else
-typedef cell regcell;
-#endif
-
 /*
  * Update the screen.
@@ -200,5 +195,5 @@
 {
 	cell *bp, *sp;
-	regcell so, cur_so = 0;
+	cell so, cur_so = 0;
 	int i, ccol, j;
 	static const struct shape *lastshape;
@@ -300,16 +295,11 @@
 {
 	
-	if (set || CEstr == NULL) {
-		int l = strlen(s);
-
-		moveto(Rows - 2, ((Cols - l) >> 1) - 1);
-		if (set)
-			putstr(s);
-		else
-			while (--l >= 0)
-				(void) putchar(' ');
-	} else {
-		moveto(Rows - 2, 0);
-		putpad(CEstr);
-	}
-}
+	int l = strlen(s);
+	
+	moveto(Rows - 2, ((Cols - l) >> 1) - 1);
+	if (set)
+		putstr(s);
+	else
+		while (--l >= 0)
+			(void) putchar(' ');
+}
Index: tetris/tetris.c
===================================================================
--- tetris/tetris.c	(revision e87e18f46ea7910e13824ecde9c1f871c8d8f31a)
+++ tetris/tetris.c	(revision d6cc45306126319261e570e4aeb0e313f284638f)
@@ -46,10 +46,8 @@
  */
 
-//#include <sys/param.h>
 #include <sys/time.h>
 #include <sys/types.h>
 
 #include <err.h>
-//#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
