shithub: drawterm

Download patch

ref: 9f66cd80b33731d08e59233dabfd4771507dd149
parent: 3f22e19560bfcac978bbbcdd20a55464755e10cf
author: Russ Cox <rsc@swtch.com>
date: Fri Nov 4 12:06:57 EST 2005

updates

--- a/Make.unix
+++ b/Make.unix
@@ -1,7 +1,7 @@
 # Unix
 AR=ar
 AS=as
-CC=gcc
+CC=gcc -Wall
 RANLIB=ranlib
 CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -ggdb -D_THREAD_SAFE -pthread # not ready for this yet: -Wall
 O=o
--- a/README
+++ b/README
@@ -23,9 +23,13 @@
 TO DO:
 ------
 
-- Drawterm seems to have ssl synchronization problems.
-Specifically, fcp bigfile /mnt/term/tmp reliably wedges it.
-
 - Should clean up the code so that gcc -Wall doesn't print
 any warnings.
+
+- Should import latest /dev/draw to allow resize of window
+
+- Should copy 9term code and make console window a real
+	9term window instead.
+
+- Should implement /dev/label.
 
--- a/cpu.c
+++ b/cpu.c
@@ -82,6 +82,25 @@
 }
 int fdd;
 
+int
+mountfactotum(void)
+{
+	int fd;
+	
+	if((fd = dialfactotum()) < 0)
+		return;
+	if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0){
+		fprint(2, "mount factotum: %r\n");
+		return;
+	}
+	if((fd = open("/mnt/factotum/ctl", OREAD)) < 0){
+		fprint(2, "open /mnt/factotum/ctl: %r\n");
+		return;
+	}
+	close(fd);
+	return 0;
+}
+
 void
 cpumain(int argc, char **argv)
 {
@@ -140,27 +159,18 @@
 		usage();
 	}ARGEND;
 
-	if((fd = dialfactotum()) < 0)
-		fprint(2, "dial factotum: %r\n");
-	else if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0)
-		fprint(2, "mount factotum: %r\n");
-	else if((fd = open("/mnt/factotum/ctl", OREAD)) < 0)
-		fprint(2, "open /mnt/factotum/ctl: %r\n");
-	else
-		close(fd);
-
-	if(secstoreserver == nil)
-		secstoreserver = authserver;
-
-        if(secstoreserver && havesecstore(secstoreserver, user)){
-                s = secstorefetch(secstoreserver, user, nil);
-                if(s){
-                        if(strlen(s) >= sizeof secstorebuf)
-                                panic("secstore data too big");
-                        strcpy(secstorebuf, s);
-                }
-        }
-
+	if(mountfactotum() < 0){
+		if(secstoreserver == nil)
+			secstoreserver = authserver;
+	        if(havesecstore(secstoreserver, user)){
+	                s = secstorefetch(secstoreserver, user, nil);
+	                if(s){
+	                        if(strlen(s) >= sizeof secstorebuf)
+	                                panic("secstore data too big");
+	                        strcpy(secstorebuf, s);
+	                }
+	        }
+	}
 
 	if(argc != 0)
 		usage();