venti: import changes from plan 9

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5325044
diff --git a/src/cmd/vac/stdinc.h b/src/cmd/vac/stdinc.h
index aa3b5f7..070c56b 100644
--- a/src/cmd/vac/stdinc.h
+++ b/src/cmd/vac/stdinc.h
@@ -1,6 +1,7 @@
 #include <u.h>
 #include <libc.h>
 #include <bio.h>
+#include <ctype.h>
 #include <thread.h>
 #include <venti.h>
 #include <libsec.h>
diff --git a/src/cmd/venti/mkfile b/src/cmd/venti/mkfile
index b5cfff7..d49a5d3 100644
--- a/src/cmd/venti/mkfile
+++ b/src/cmd/venti/mkfile
@@ -5,6 +5,7 @@
 TARG=\
 	copy\
 	read\
+	ro\
 	sync\
 	write\
 	dump\
diff --git a/src/cmd/venti/srv/icache.c b/src/cmd/venti/srv/icache.c
index db2e799..af76819 100644
--- a/src/cmd/venti/srv/icache.c
+++ b/src/cmd/venti/srv/icache.c
@@ -425,7 +425,8 @@
 		assert(state == IEDirty);
 		toload = nil;
 		if(as == nil)
-			fprint(2, "%T insertscore IEDirty without as; called from %lux\n", getcallerpc(&score));
+			fprint(2, "%T insertscore IEDirty without as; called from %#p\n",
+				getcallerpc(&score));
 		else{
 			if(icache.as.aa > as->aa)
 				fprint(2, "%T insertscore: aa moving backward: %#llux -> %#llux\n", icache.as.aa, as->aa);
diff --git a/src/cmd/venti/srv/mkfile b/src/cmd/venti/srv/mkfile
index 0c7ad8e..b11a461 100644
--- a/src/cmd/venti/srv/mkfile
+++ b/src/cmd/venti/srv/mkfile
@@ -46,6 +46,8 @@
 HFILES=	dat.h\
 	fns.h\
 	stdinc.h\
+	$PLAN9/include/venti.h\
+	$PLAN9/include/httpd.h\
 
 TARG=\
 	venti\
@@ -61,6 +63,7 @@
 	fmtisect\
 	mirrorarenas\
 	printarena\
+	printarenapart\
 	rdarena\
 	syncindex\
 	verifyarena\
diff --git a/src/cmd/venti/srv/venti.c b/src/cmd/venti/srv/venti.c
index 4d386ec..2a3cc66 100644
--- a/src/cmd/venti/srv/venti.c
+++ b/src/cmd/venti/srv/venti.c
@@ -22,6 +22,7 @@
 "[-C lumpcachesize] [-h httpaddress] [-I indexcachesize] [-W webroot]\n");
 	threadexitsall("usage");
 }
+
 void
 threadmain(int argc, char *argv[])
 {
@@ -137,7 +138,6 @@
 		if(httpdinit(haddr, webroot) < 0)
 			fprint(2, "warning: can't start http server: %r");
 	}
-
 	fprint(2, "init...");
 
 	if(mem == 0xffffffffUL)
@@ -163,7 +163,6 @@
 		(mainindex->narenas + mainindex->nsects*4 + 16);
 	if(bcmem < minbcmem)
 		bcmem = minbcmem;
-
 	if(0) fprint(2, "initialize %d bytes of disk block cache\n", bcmem);
 	initdcache(bcmem);