add -W to specify window size.

various other little fixes.
diff --git a/src/libthread/create.c b/src/libthread/create.c
index a8647f9..b63fee4 100644
--- a/src/libthread/create.c
+++ b/src/libthread/create.c
@@ -155,6 +155,7 @@
 	else
 		*_threadpq.tail = p;
 	_threadpq.tail = &p->next;
+
 	if(_threadprocs == 1)
 		_threadmultiproc();
 	_threadprocs++;
diff --git a/src/libthread/id.c b/src/libthread/id.c
index 727798d..e920b87 100644
--- a/src/libthread/id.c
+++ b/src/libthread/id.c
@@ -52,20 +52,20 @@
 }
 
 void
-threadsetname(char *name)
+threadsetname(char *fmt, ...)
 {
-/*
-	int fd, n;
-	char buf[128], *s;
-*/
 	Proc *p;
 	Thread *t;
+	va_list arg;
 
 	p = _threadgetproc();
 	t = p->thread;
 	if (t->cmdname)
 		free(t->cmdname);
-	t->cmdname = strdup(name);
+	va_start(arg, fmt);
+	t->cmdname = vsmprint(fmt, arg);
+	va_end(fmt);
+
 /* Plan 9 only 
 	if(p->nthreads == 1){
 		snprint(buf, sizeof buf, "#p/%d/args", getpid());
diff --git a/src/libthread/tprimes.c b/src/libthread/tprimes.c
index e028f98..89d30c0 100644
--- a/src/libthread/tprimes.c
+++ b/src/libthread/tprimes.c
@@ -52,7 +52,7 @@
 		buffer = atoi(ARGF());
 		break;
 	case 'p':
-		fn=proccreate;
+		fn = proccreate;
 		break;
 	}ARGEND