code: drawterm

Download patch

ref: 3c84c725ef4bd925be08518cce59161edf905ca6
parent: 176f1fa82e08aacc6b0acb24f5e36b7e4c257c4e
author: Russ Cox <rsc@swtch.com>
date: Thu Dec 29 18:07:19 EST 2005

warnings

--- a/README
+++ b/README
@@ -23,6 +23,7 @@
 ------
 Use CVS: cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co drawterm
 On the web at http://cvs.pdos.csail.mit.edu/cvs/drawterm
+In the Plan 9 distribution: /sys/src/cmd/unix/drawterm
 
 TO DO:
 ------
--- a/cpu.c
+++ b/cpu.c
@@ -99,7 +99,7 @@
 void
 cpumain(int argc, char **argv)
 {
-	char dat[MaxStr], buf[MaxStr], cmd[MaxStr], *err, *secstoreserver, *s;
+	char dat[MaxStr], buf[MaxStr], cmd[MaxStr], *err, *secstoreserver, *p, *s;
 	int fd, ms, data;
 
 	/* see if we should use a larger message size */
@@ -125,28 +125,26 @@
 	case 'a':
 		authserver = EARGF(usage());
 		break;
+	case 'c':
+		system = EARGF(usage());
+		break;
+	case 'd':
+		dbg++;
+		break;
 	case 'e':
 		ealgs = EARGF(usage());
 		if(*ealgs == 0 || strcmp(ealgs, "clear") == 0)
 			ealgs = nil;
 		break;
-	case 'd':
-		dbg++;
-		break;
-	case 'c':
-		system = EARGF(usage());
-		break;
-/*
-	case 'c':
+	case 'C':
 		cflag++;
 		cmd[0] = '!';
 		cmd[1] = '\0';
-		while(p = ARGF()) {
+		while((p = ARGF()) != nil) {
 			strcat(cmd, " ");
 			strcat(cmd, p);
 		}
 		break;
-*/
 	case 'k':
 		keyspec = EARGF(usage());
 		break;