Use gcc -ansi -pedantic in 9c.  Fix many non-C89-isms.
diff --git a/src/cmd/9660/cdrdwr.c b/src/cmd/9660/cdrdwr.c
index 492e028..757bfcd 100644
--- a/src/cmd/9660/cdrdwr.c
+++ b/src/cmd/9660/cdrdwr.c
@@ -251,7 +251,7 @@
 		d->mode = little(p, 4);
 	}
 
-	// BUG: rock ridge extensions
+	/* BUG: rock ridge extensions */
 	return 0;
 }
 
@@ -604,7 +604,7 @@
 	if((c = Bgetc(&cd->brd)) == Beof) {
 		fprint(2, "getc at %lud\n", Croffset(cd));
 		assert(0);
-		//sysfatal("Bgetc: %r");
+		/*sysfatal("Bgetc: %r"); */
 	}
 	return c;
 }
diff --git a/src/cmd/9660/dump9660.c b/src/cmd/9660/dump9660.c
index f82ff30..4e66bd7 100644
--- a/src/cmd/9660/dump9660.c
+++ b/src/cmd/9660/dump9660.c
@@ -203,16 +203,16 @@
 	} else
 		convertnames(&iroot, (char* (*)(char*, char*))strcpy);
 
-//	isoabstract = findconform(&iroot, abstract);
-//	isobiblio = findconform(&iroot, biblio);
-//	isonotice = findconform(&iroot, notice);
+/*	isoabstract = findconform(&iroot, abstract); */
+/*	isobiblio = findconform(&iroot, biblio); */
+/*	isonotice = findconform(&iroot, notice); */
 
 	dsort(&iroot, isocmp);
 
 	if(cd->flags & CDjoliet) {
-	//	jabstract = findconform(&jroot, abstract);
-	//	jbiblio = findconform(&jroot, biblio);
-	//	jnotice = findconform(&jroot, notice);
+	/*	jabstract = findconform(&jroot, abstract); */
+	/*	jbiblio = findconform(&jroot, biblio); */
+	/*	jnotice = findconform(&jroot, notice); */
 
 		checknames(&jroot, isbadjoliet);
 		convertnames(&jroot, (char* (*)(char*, char*))strcpy);
@@ -393,7 +393,7 @@
 	if((direc = adddirec((Direc*)a, new, &xd))) {
 		direc->srcfile = atom(old);
 
-		// BUG: abstract, biblio, notice
+		/* BUG: abstract, biblio, notice */
 	}
 	if(name)
 		free(name);
diff --git a/src/cmd/9660/iso9660.h b/src/cmd/9660/iso9660.h
index 5eefae8..b5131a2 100644
--- a/src/cmd/9660/iso9660.h
+++ b/src/cmd/9660/iso9660.h
@@ -65,7 +65,7 @@
 	int nchild;
 };
 enum {  /* Direc flags */
-	Dbadname = 1<<0,  /* Non-conformant name     */
+	Dbadname = 1<<0  /* Non-conformant name     */
 };
 
 /*
@@ -132,7 +132,7 @@
 	CDrockridge = 1<<3,
 	CDnew = 1<<4,
 	CDdump = 1<<5,
-	CDbootable = 1<<6,
+	CDbootable = 1<<6
 };
 
 typedef struct Tx Tx;
@@ -159,7 +159,7 @@
 };
 
 enum {
-	Blocklen = 2048,
+	Blocklen = 2048
 };
 
 /*
@@ -265,7 +265,7 @@
 	RR_CL = 1<<4,
 	RR_PL = 1<<5,
 	RR_RE = 1<<6,
-	RR_TF = 1<<7,
+	RR_TF = 1<<7
 };
 
 enum { /* CputrripTF type argument */
@@ -276,7 +276,7 @@
 	TFbackup = 1<<4,
 	TFexpiration = 1<<5,
 	TFeffective = 1<<6,
-	TFlongform = 1<<7,
+	TFlongform = 1<<7
 };
 
 enum { /* CputrripNM flag types */
@@ -285,7 +285,7 @@
 	NMparent = 1<<2,
 	NMroot = 1<<3,
 	NMvolroot = 1<<4,
-	NMhost = 1<<5,
+	NMhost = 1<<5
 };
 
 /* boot.c */
@@ -414,7 +414,7 @@
 	DTdotdot,
 	DTiden,
 	DTroot,
-	DTrootdot,
+	DTrootdot
 };
 
 extern ulong now;
diff --git a/src/cmd/9660/sysuse.c b/src/cmd/9660/sysuse.c
index dc326c6..7871652 100644
--- a/src/cmd/9660/sysuse.c
+++ b/src/cmd/9660/sysuse.c
@@ -19,7 +19,7 @@
 static int CputsuspER(Cdimg*, int);
 static int CputsuspRR(Cdimg*, int, int);
 static int CputsuspSP(Cdimg*, int);
-//static int CputsuspST(Cdimg*, int);
+/*static int CputsuspST(Cdimg*, int); */
 static int Cputrripname(Cdimg*, char*, int, char*, int);
 static int CputrripSL(Cdimg*, int, int, char*, int);
 static int CputrripPX(Cdimg*, Direc*, int, int);
@@ -524,12 +524,12 @@
 		if (type & TFattributes)
 			Cputdate(cd, d?d->ctime:0);
 	
-	//	if (type & TFbackup)
-	//		Cputdate(cd, 0);
-	//	if (type & TFexpiration)
-	//		Cputdate(cd, 0);
-	//	if (type & TFeffective)
-	//		Cputdate(cd, 0);
+	/*	if (type & TFbackup) */
+	/*		Cputdate(cd, 0); */
+	/*	if (type & TFexpiration) */
+	/*		Cputdate(cd, 0); */
+	/*	if (type & TFeffective) */
+	/*		Cputdate(cd, 0); */
 	}
 	return 5+7*length;
 }
diff --git a/src/cmd/9660/unix.c b/src/cmd/9660/unix.c
index f060c10..07e4057 100644
--- a/src/cmd/9660/unix.c
+++ b/src/cmd/9660/unix.c
@@ -23,7 +23,7 @@
 void
 dirtoxdir(XDir *xd, Dir *d)
 {
-	//	char buf[NAMELEN+1];
+	/*	char buf[NAMELEN+1]; */
 	memset(xd, 0, sizeof *xd);
 
 	xd->name = atom(d->name);
@@ -38,8 +38,8 @@
 	xd->length = d->length;
 	if(xd->mode & CHLINK) {
 		xd->mode |= 0777;
-		//xd->symlink = atom(d->symlink);
-		xd->symlink = atom("symlink");		// XXX: rsc
+		/*xd->symlink = atom(d->symlink); */
+		xd->symlink = atom("symlink");		/* XXX: rsc */
 	}
 }
 
diff --git a/src/cmd/9pserve.c b/src/cmd/9pserve.c
index 06c95f5..07ed8e0 100644
--- a/src/cmd/9pserve.c
+++ b/src/cmd/9pserve.c
@@ -8,7 +8,7 @@
 {
 	STACK = 32768,
 	NHASH = 31,
-	MAXMSG = 64,	/* per connection */
+	MAXMSG = 64	/* per connection */
 };
 
 typedef struct Hash Hash;
@@ -240,8 +240,8 @@
 	threadcreate(inputthread, nil, STACK);
 	threadcreate(outputthread, nil, STACK);
 
-//	if(rootfid)
-//		dorootstat();
+/*	if(rootfid) */
+/*		dorootstat(); */
 	
 	threadcreate(listenthread, nil, STACK);
 	threadexits(0);
@@ -618,14 +618,14 @@
 			sendomsg(m);
 			recvp(c->internal);
 			if(m->rx.type == Rerror){
-			//	fprint(2, "%T read error: %s\n", m->rx.ename);
+			/*	fprint(2, "%T read error: %s\n", m->rx.ename); */
 				break;
 			}
 			if(m->rx.count == 0)
 				break;
 			tot += m->rx.count;
 			if(iowrite(io, c->fd, m->rx.data, m->rx.count) != m->rx.count){
-				// fprint(2, "%T pipe write error: %r\n");
+				/* fprint(2, "%T pipe write error: %r\n"); */
 				break;
 			}
 			msgput(m);
@@ -658,7 +658,7 @@
 			sendomsg(m);
 			recvp(c->internal);
 			if(m->rx.type == Rerror){
-			//	fprint(2, "%T write error: %s\n", m->rx.ename);
+			/*	fprint(2, "%T write error: %s\n", m->rx.ename); */
 			}
 			tot += n;
 			msgput(m);
@@ -907,7 +907,7 @@
 			msgput(m);
 	}
 	closeioproc(io);
-	//fprint(2, "%T input eof\n");
+	/*fprint(2, "%T input eof\n"); */
 	threadexitsall(0);
 }
 
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
index 24a0a11..ec54ca3 100644
--- a/src/cmd/9term/9term.c
+++ b/src/cmd/9term/9term.c
@@ -248,7 +248,7 @@
 		error("new: channel alloc failed");
 	mc = emalloc(sizeof(Mousectl));
 	*mc = *mousectl;
-//	mc->image = i;
+/*	mc->image = i; */
 	mc->c = cm;
 	w = wmk(i, mc, ck, cctl, scrollit);
 	free(mc);	/* wmk copies *mc */
@@ -282,7 +282,7 @@
 	Plumb,
 	Send,
 	Scroll,
-	Cook,
+	Cook
 };
 
 char		*menu2str[] = {
diff --git a/src/cmd/9term/dat.h b/src/cmd/9term/dat.h
index 982eea1..bc6d1fc 100644
--- a/src/cmd/9term/dat.h
+++ b/src/cmd/9term/dat.h
@@ -24,13 +24,13 @@
 	Scrollgap 		= 4,		/* gap right of scroll bar */
 	BIG			= 3,		/* factor by which window dimension can exceed screen */
 	TRUE		= 1,
-	FALSE		= 0,
+	FALSE		= 0
 };
 
 enum
 {
 	Kscrolloneup = KF|0x20,
-	Kscrollonedown = KF|0x21,
+	Kscrollonedown = KF|0x21
 };
 
 enum	/* control messages */
@@ -45,7 +45,7 @@
 	Holdon,
 	Holdoff,
 	Deleted,
-	Exited,
+	Exited
 };
 
 struct Wctlmesg
diff --git a/src/cmd/9term/data.c b/src/cmd/9term/data.c
index 86e589b..e0f18e8 100644
--- a/src/cmd/9term/data.c
+++ b/src/cmd/9term/data.c
@@ -169,7 +169,7 @@
 Cursor *corners[9] = {
 	&tl,	&t,	&tr,
 	&l,	nil,	&r,
-	&bl,	&b,	&br,
+	&bl,	&b,	&br
 };
 
 void
diff --git a/src/cmd/9term/win.c b/src/cmd/9term/win.c
index 00b5600..cef83d0 100644
--- a/src/cmd/9term/win.c
+++ b/src/cmd/9term/win.c
@@ -31,7 +31,7 @@
 	'X',
 	0, 0, 0, 1, 1,
 	{ ' ', 0 },
-	{ ' ', 0 },
+	{ ' ', 0 }
 };
 
 struct Q
@@ -47,7 +47,7 @@
 CFid *addrfd;
 CFid *datafd;
 CFid *ctlfd;
-// int bodyfd;
+/* int bodyfd; */
 
 char	*typing;
 int	ntypeb;
diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c
index 6669330..577fe27 100644
--- a/src/cmd/9term/wind.c
+++ b/src/cmd/9term/wind.c
@@ -19,7 +19,7 @@
 {
 	HiWater	= 640000,	/* max size of history */
 	LoWater	= 400000,	/* min size of history after max'ed */
-	MinWater	= 20000,	/* room to leave available when reallocating */
+	MinWater	= 20000	/* room to leave available when reallocating */
 };
 
 static	int		topped;
@@ -121,8 +121,8 @@
 		freeimage(w->i);
 		w->i = i;
 	}
-//	wsetname(w);
-//XXX	w->mc.image = i;
+/*	wsetname(w); */
+/*XXX	w->mc.image = i; */
 	r = insetrect(i->r, Selborder+1);
 	w->scrollr = r;
 	w->scrollr.max.x = r.min.x+Scrollwid;
@@ -276,9 +276,9 @@
 		case WKey:
 			for(i=0; kbdr[i]!=L'\0'; i++)
 				wkeyctl(w, kbdr[i]);
-//			wkeyctl(w, r);
-//			while(nbrecv(w->ck, &r))
-//				wkeyctl(w, r);
+/*			wkeyctl(w, r); */
+/*			while(nbrecv(w->ck, &r)) */
+/*				wkeyctl(w, r); */
 			break;
 		case WMouse:
 			if(w->mouseopen) {
@@ -307,9 +307,10 @@
 				m = w->mouse.queue[w->mouse.ri];
 				if(++w->mouse.ri == nelem(w->mouse.queue))
 					w->mouse.ri = 0;
-			} else
-				m = (Mousestate){w->mc.m, w->mouse.counter};
-
+			} else {
+				m.m = w->mc.m;
+				m.counter = w->mouse.counter;
+			}
 			w->mouse.lastcounter = m.counter;
 			send(mrm.cm, &m.m);
 			continue;
@@ -393,13 +394,13 @@
 				c = t[i];	/* knows break characters fit in a byte */
 				i += wid;
 				if(!w->rawing && (c == '\n' || c=='\004')){
-				//	if(c == '\004')
-				//		i--;
+				/*	if(c == '\004') */
+				/*		i--; */
 					break;
 				}
 			}
-		//	if(i==nb && w->qh<w->nr && w->r[w->qh]=='\004')
-		//		w->qh++;
+		/*	if(i==nb && w->qh<w->nr && w->r[w->qh]=='\004') */
+		/*		w->qh++; */
 			if(i > nb){
 				npart = i-nb;
 				memmove(part, t+nb, npart);
diff --git a/src/cmd/acid/acid.h b/src/cmd/acid/acid.h
index 266175e..e58e9b1 100644
--- a/src/cmd/acid/acid.h
+++ b/src/cmd/acid/acid.h
@@ -10,7 +10,7 @@
 	NFD		= 100,
 	Maxproc		= 50,
 	Maxval		= 10,
-	Mempergc	= 1024*1024,
+	Mempergc	= 1024*1024
 };
 
 /* #pragma varargck type "L"	void */
@@ -81,7 +81,7 @@
 	TCODE,
 	TREG,
 	TCON,
-	NUMT,
+	NUMT
 };
 
 struct Type
@@ -327,5 +327,5 @@
 	OEVAL,
 	OWHAT,
 	OUPLUS,
-	NUMO,
+	NUMO
 };
diff --git a/src/cmd/acid/print.c b/src/cmd/acid/print.c
index 58acdfc..c4b870e 100644
--- a/src/cmd/acid/print.c
+++ b/src/cmd/acid/print.c
@@ -38,7 +38,7 @@
 	"float",
 	"string",
 	"list",
-	"code",
+	"code"
 };
 
 void
diff --git a/src/cmd/acid/proc.c b/src/cmd/acid/proc.c
index 034af99..e6efc95 100644
--- a/src/cmd/acid/proc.c
+++ b/src/cmd/acid/proc.c
@@ -202,7 +202,7 @@
 	for(i = 0; i < Maxproc; i++) {
 		if(ptab[i].pid == pid) {
 			detachproc(pid);
-			// close(ptab[i].ctl);
+			/* close(ptab[i].ctl); */
 			ptab[i].pid = 0;
 			s = look("proclist");
 			d = &s->v->store.u.l;
diff --git a/src/cmd/acidtypes/dat.h b/src/cmd/acidtypes/dat.h
index 1c26e6b..8a04378 100644
--- a/src/cmd/acidtypes/dat.h
+++ b/src/cmd/acidtypes/dat.h
@@ -14,7 +14,7 @@
 	Array,
 	Range,
 	Defer,
-	Typedef,
+	Typedef
 };
 
 struct Type
diff --git a/src/cmd/acidtypes/main.c b/src/cmd/acidtypes/main.c
index 066e8ba..f272f67 100644
--- a/src/cmd/acidtypes/main.c
+++ b/src/cmd/acidtypes/main.c
@@ -67,7 +67,7 @@
 		
 		if(!have){
 			Bprint(&b, "// no debugging symbols in %s\n\n", argv[i]);
-		//	fprint(2, "no debugging symbols in %s\n", argv[i]);
+		/*	fprint(2, "no debugging symbols in %s\n", argv[i]); */
 		}
 		uncrackhdr(fp);
 	}
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 01ecc3e..00897e3 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -235,7 +235,7 @@
 	"XER",		"$XER",
 	"CTR",		"$CTR",
 	"VRSAVE",		"$VRSAVE",
-	"FPSCR",		"$FPSCR",
+	"FPSCR",		"$FPSCR"
 };
 
 char*
@@ -469,7 +469,7 @@
 }
 
 static char
-basecharof(Type *t)	//XXX
+basecharof(Type *t)	/*XXX */
 {
 	switch(t->xsizeof){
 	default:
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c
index f95c3a1..395033b 100644
--- a/src/cmd/acme/acme.c
+++ b/src/cmd/acme/acme.c
@@ -37,7 +37,7 @@
 char		*fontnames[2] =
 {
 	"/lib/font/bit/lucsans/euro.8.font",
-	"/lib/font/bit/lucm/unicode.9.font",
+	"/lib/font/bit/lucm/unicode.9.font"
 };
 
 Command *command;
@@ -160,7 +160,7 @@
 
 	d = display;
 	font = d->defaultfont;
-//assert(font);
+/*assert(font); */
 
 	reffont.f = font;
 	reffonts[0] = &reffont;
@@ -355,8 +355,8 @@
 	Command *c;
 
 	fsysclose();
-//	if(display)
-//		flushimage(display, 1);
+/*	if(display) */
+/*		flushimage(display, 1); */
 
 	for(c=command; c; c=c->next)
 		postnote(PNGROUP, c->pid, "hangup");
diff --git a/src/cmd/acme/addr.c b/src/cmd/acme/addr.c
index 7af5f6b..3869e39 100644
--- a/src/cmd/acme/addr.c
+++ b/src/cmd/acme/addr.c
@@ -15,13 +15,13 @@
 {
 	None = 0,
 	Fore = '+',
-	Back = '-',
+	Back = '-'
 };
 
 enum
 {
 	Char,
-	Line,
+	Line
 };
 
 int
diff --git a/src/cmd/acme/buff.c b/src/cmd/acme/buff.c
index 39982f1..875bb0b 100644
--- a/src/cmd/acme/buff.c
+++ b/src/cmd/acme/buff.c
@@ -13,7 +13,7 @@
 
 enum
 {
-	Slop = 100,	/* room to grow with reallocation */
+	Slop = 100	/* room to grow with reallocation */
 };
 
 static
diff --git a/src/cmd/acme/dat.h b/src/cmd/acme/dat.h
index d443888..0bf8238 100644
--- a/src/cmd/acme/dat.h
+++ b/src/cmd/acme/dat.h
@@ -21,7 +21,7 @@
 	QWwrsel,
 	QWtag,
 	QWxdata,
-	QMAX,
+	QMAX
 };
 
 enum
@@ -29,7 +29,7 @@
 	Blockincr =	256,
 	Maxblock = 	8*1024,
 	NRange =		10,
-	Infinity = 		0x7FFFFFFF,	/* huge value for regexp address */
+	Infinity = 		0x7FFFFFFF	/* huge value for regexp address */
 };
 
 #define Buffer AcmeBuffer
@@ -166,7 +166,7 @@
 	Columntag,
 	Rowtag,
 	Tag,
-	Body,
+	Body
 };
 
 struct Text
@@ -463,7 +463,7 @@
 	Scrollwid = 12,	/* width of scroll bar */
 	Scrollgap = 4,	/* gap right of scroll bar */
 	Margin = 4,	/* margin around text */
-	Border = 2,	/* line between rows, cols, windows */
+	Border = 2	/* line between rows, cols, windows */
 };
 
 #define	QID(w,q)	((w<<8)|(q))
@@ -477,7 +477,7 @@
 {
 	FALSE,
 	TRUE,
-	XXX,
+	XXX
 };
 
 enum
@@ -487,14 +487,14 @@
 	Delete	= 'd',
 	Insert	= 'i',
 	Replace	= 'r',
-	Filename	= 'f',
+	Filename	= 'f'
 };
 
 enum	/* editing */
 {
 	Inactive	= 0,
 	Inserting,
-	Collecting,
+	Collecting
 };
 
 uint		globalincref;
@@ -545,7 +545,7 @@
 enum
 {
 	Kscrolloneup		= KF|0x20,
-	Kscrollonedown	= KF|0x21,
+	Kscrollonedown	= KF|0x21
 };
 
 Channel	*cplumb;		/* chan(Plumbmsg*) */
diff --git a/src/cmd/acme/ecmd.c b/src/cmd/acme/ecmd.c
index 6fef069..ac57823 100644
--- a/src/cmd/acme/ecmd.c
+++ b/src/cmd/acme/ecmd.c
@@ -898,14 +898,14 @@
 
 	lp = v;
 	cp = lp->cp;
-//	if(w->isscratch || w->isdir)
-//		return;
+/*	if(w->isscratch || w->isdir) */
+/*		return; */
 	t = &w->body;
 	/* only use this window if it's the current window for the file */
 	if(t->file->curtext != t)
 		return;
-//	if(w->nopen[QWevent] > 0)
-//		return;
+/*	if(w->nopen[QWevent] > 0) */
+/*		return; */
 	/* no auto-execute on files without names */
 	if(cp->re==nil && t->file->nname==0)
 		return;
@@ -1012,7 +1012,7 @@
 
 		case '\'':
 editerror("can't handle '");
-//			a.r = f->mark;
+/*			a.r = f->mark; */
 			break;
 
 		case '?':
@@ -1093,8 +1093,8 @@
 	/* only use this window if it's the current window for the file */
 	if(t->file->curtext != t)
 		return;
-//	if(w->nopen[QWevent] > 0)
-//		return;
+/*	if(w->nopen[QWevent] > 0) */
+/*		return; */
 	if(runeeq(tp->r->r, tp->r->n, t->file->name, t->file->nname))
 		tp->f = t->file;
 }
@@ -1127,8 +1127,8 @@
 	/* only use this window if it's the current window for the file */
 	if(t->file->curtext != t)
 		return;
-//	if(w->nopen[QWevent] > 0)
-//		return;
+/*	if(w->nopen[QWevent] > 0) */
+/*		return; */
 	if(filematch(w->body.file, tp->r)){
 		if(tp->f != nil)
 			editerror("too many files match \"%S\"", tp->r->r);
diff --git a/src/cmd/acme/edit.c b/src/cmd/acme/edit.c
index 7bccd3a..a6375f6 100644
--- a/src/cmd/acme/edit.c
+++ b/src/cmd/acme/edit.c
@@ -49,7 +49,7 @@
 	'q',	0,	0,	0,	0,	aNo,	0,	0,	q_cmd,
 	'!',	0,	0,	0,	0,	aNo,	0,	linex,	plan9_cmd,
  */
-	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0
 };
 
 Cmd	*parsecmd(int);
@@ -82,8 +82,8 @@
 	USED(v);
 	threadsetname("editthread");
 	while((cmdp=parsecmd(0)) != 0){
-//		ocurfile = curfile;
-//		loaded = curfile && !curfile->unread;
+/*		ocurfile = curfile; */
+/*		loaded = curfile && !curfile->unread; */
 		if(cmdexec(curtext, cmdp) == 0)
 			break;
 		freecmd();
diff --git a/src/cmd/acme/edit.h b/src/cmd/acme/edit.h
index efa0b02..211d58a 100644
--- a/src/cmd/acme/edit.h
+++ b/src/cmd/acme/edit.h
@@ -76,7 +76,7 @@
 enum Defaddr{	/* default addresses */
 	aNo,
 	aDot,
-	aAll,
+	aAll
 };
 
 int	nl_cmd(Text*, Cmd*), a_cmd(Text*, Cmd*), b_cmd(Text*, Cmd*);
diff --git a/src/cmd/acme/elog.c b/src/cmd/acme/elog.c
index 022d928..0fd45dd 100644
--- a/src/cmd/acme/elog.c
+++ b/src/cmd/acme/elog.c
@@ -36,7 +36,7 @@
 
 enum
 {
-	Buflogsize = sizeof(Buflog)/sizeof(Rune),
+	Buflogsize = sizeof(Buflog)/sizeof(Rune)
 };
 
 /*
@@ -46,7 +46,7 @@
 enum
 {
 	Minstring = 16,		/* distance beneath which we merge changes */
-	Maxstring = RBUFSIZE,	/* maximum length of change we will merge into one */
+	Maxstring = RBUFSIZE	/* maximum length of change we will merge into one */
 };
 
 void
diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index bd867c7..1a4e097 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -108,7 +108,7 @@
 	{ LTab,		tab,		FALSE,	XXX,		XXX		},
 	{ LUndo,		undo,	FALSE,	TRUE,	XXX		},
 	{ LZerox,		zeroxx,	FALSE,	XXX,		XXX		},
-	{ nil, 			0,		0,		0,		0		},
+	{ nil, 			0,		0,		0,		0		}
 };
 
 Exectab*
@@ -1198,7 +1198,7 @@
 	IGlobal = -2,
 	IError = -1,
 	Ion = 0,
-	Ioff = 1,
+	Ioff = 1
 };
 
 static int
@@ -1318,7 +1318,7 @@
 	char buf[512];
 	int olddir;
 	int ret;
-	//static void *parg[2];
+	/*static void *parg[2]; */
 	char *rcarg[4];
 	void **argv;
 	CFsys *fs;
diff --git a/src/cmd/acme/file.c b/src/cmd/acme/file.c
index cca91b2..00d5d54 100644
--- a/src/cmd/acme/file.c
+++ b/src/cmd/acme/file.c
@@ -33,7 +33,7 @@
 
 enum
 {
-	Undosize = sizeof(Undo)/sizeof(Rune),
+	Undosize = sizeof(Undo)/sizeof(Rune)
 };
 
 File*
diff --git a/src/cmd/acme/fsys.c b/src/cmd/acme/fsys.c
index 033ce20..9a7dbd1 100644
--- a/src/cmd/acme/fsys.c
+++ b/src/cmd/acme/fsys.c
@@ -467,8 +467,10 @@
 			goto Accept;
 	
     Regular:
-//			if(FILE(f->qid) == Qacme)	/* empty directory */
-//				break;
+/*
+			if(FILE(f->qid) == Qacme)	// empty directory
+				break;
+*/
 			if(strcmp(x->fcall.wname[i], "new") == 0){
 				if(w)
 					error("w set in walk to new");
diff --git a/src/cmd/acme/mail/dat.h b/src/cmd/acme/mail/dat.h
index 01d685b..a832164 100644
--- a/src/cmd/acme/mail/dat.h
+++ b/src/cmd/acme/mail/dat.h
@@ -7,7 +7,7 @@
 {
 	STACK		= 8192,
 	EVENTSIZE	= 256,
-	NEVENT		= 5,
+	NEVENT		= 5
 };
 
 struct Event
diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c
index 0d894d9..1ba19c2 100644
--- a/src/cmd/acme/mail/mesg.c
+++ b/src/cmd/acme/mail/mesg.c
@@ -42,7 +42,7 @@
 	"text/richtext",
 	"text/tab-separated-values",
 	"application/octet-stream",
-	nil,
+	nil
 };
 
 char *okheaders[] =
@@ -60,7 +60,7 @@
 	"Resent-From:",
 	"Resent-To:",
 	"Sort:",
-	nil,
+	nil
 };
 
 char*
@@ -100,10 +100,10 @@
 	for(i=0; i+1<nf; i+=2){
 		if(i > 0)
 			fmtprint(&fmt, ", ");
-	//	if(f[i][0] == 0 || strcmp(f[i], f[i+1]) == 0)
+	/*	if(f[i][0] == 0 || strcmp(f[i], f[i+1]) == 0) */
 			fmtprint(&fmt, "%s", f[i+1]);
-	//	else
-	//		fmtprint(&fmt, "%s <%s>", f[i], f[i+1]);
+	/*	else */
+	/*		fmtprint(&fmt, "%s <%s>", f[i], f[i+1]); */
 	}
 	free(f);
 	return fmtstrflush(&fmt);
@@ -752,10 +752,10 @@
 			mesgmenumarkundel(wbox, &mbox, m);
 		goto Return;
 	}
-//	if(strcmp(args[0], "Headers") == 0){
-//		m->showheaders();
-//		return True;
-//	}
+/*	if(strcmp(args[0], "Headers") == 0){ */
+/*		m->showheaders(); */
+/*		return True; */
+/*	} */
 
 	ret = 0;
 
@@ -1149,8 +1149,8 @@
 	if(max <= 0)
 		return 0;
 		
-//	if(strchr(str, ',') || strchr(str, '"') || strchr(str, '<') || strchr(str, '('))
-//		splitc = ",";
+/*	if(strchr(str, ',') || strchr(str, '"') || strchr(str, '<') || strchr(str, '(')) */
+/*		splitc = ","; */
 	for(na=0; *str != '\0';str++){
 		if(strchr(splitc, *str) == nil){
 			if(intok)
@@ -1331,7 +1331,7 @@
 		winopenbody(m->w, OWRITE);
 		mesgload(m, dir, m->name, m->w);
 		winclosebody(m->w);
-		// sleep(100);
+		/* sleep(100); */
 		winclean(m->w);
 		m->opened = 1;
 		if(ndirelem == 1){
@@ -1405,7 +1405,7 @@
 	k = strlen(name);
 	n = strlen(mbox->name);
 	if(k==0 || strncmp(name, mbox->name, n) != 0){
-//		fprint(2, "Mail: message %s not in this mailbox\n", name);
+/*		fprint(2, "Mail: message %s not in this mailbox\n", name); */
 		return nil;
 	}
 	return mesglookup(mbox, name+n, digest);
diff --git a/src/cmd/acme/mail/reply.c b/src/cmd/acme/mail/reply.c
index 9d6fd35..5dda0ed 100644
--- a/src/cmd/acme/mail/reply.c
+++ b/src/cmd/acme/mail/reply.c
@@ -240,7 +240,7 @@
 	CC,
 	FROM,
 	INCLUDE,
-	TO,
+	TO
 };
 
 char *headers[] = {
@@ -250,7 +250,7 @@
 	"from:",
 	"include:",
 	"to:",
-	nil,
+	nil
 };
 
 int
@@ -516,7 +516,7 @@
 	e->sync = sync;
 	proccreate(execproc, e, EXECSTACK);
 	recvul(sync);
-	// close(p[0]);
+	/* close(p[0]); */
 
 	/* using marshal -8, so generate rfc822 headers */
 	if(nto > 0){
diff --git a/src/cmd/acme/scrl.c b/src/cmd/acme/scrl.c
index 02340cc..baf7ec7 100644
--- a/src/cmd/acme/scrl.c
+++ b/src/cmd/acme/scrl.c
@@ -74,7 +74,7 @@
 		r2.min.x = r2.max.x-1;
 		draw(b, r2, t->fr.cols[BORD], nil, ZP);
 		draw(t->fr.b, r, b, nil, Pt(0, r1.min.y));
-/*flushimage(display, 1);*//*BUG?*/
+/*flushimage(display, 1); // BUG? */
 	}
 }
 
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c
index 44cb654..9cfdb52 100644
--- a/src/cmd/acme/text.c
+++ b/src/cmd/acme/text.c
@@ -1174,7 +1174,7 @@
  */
 enum {
 	DELAY = 2,
-	MINMOVE = 4,
+	MINMOVE = 4
 };
 
 uint
diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
index 2f0328c..510b409 100644
--- a/src/cmd/acme/wind.c
+++ b/src/cmd/acme/wind.c
@@ -53,7 +53,7 @@
 		filereset(w->tag.file);
 		textsetselect(&w->tag, nc, nc);
 	}
-//assert(w->body.w == w);
+/*assert(w->body.w == w); */
 	r1 = r;
 	r1.min.y += w->taglines*font->height + 1;
 	if(r1.max.y < r1.min.y)
@@ -66,7 +66,7 @@
 		rf = rfget(FALSE, FALSE, FALSE, clone->body.reffont->f->name);
 	}else
 		rf = rfget(FALSE, FALSE, FALSE, nil);
-//assert(w->body.w == w);
+/*assert(w->body.w == w); */
 	f = fileaddtext(f, &w->body);
 	w->body.what = Body;
 	textinit(&w->body, f, r1, rf, textcols);
@@ -82,7 +82,7 @@
 	w->filemenu = TRUE;
 	w->maxlines = w->body.fr.maxlines;
 	w->autoindent = globalautoindent;
-//assert(w->body.w == w);
+/*assert(w->body.w == w); */
 	if(clone){
 		w->dirty = clone->dirty;
 		w->autoindent = clone->autoindent;
diff --git a/src/cmd/astro/astro.h b/src/cmd/astro/astro.h
index 1c74a16..5275403 100644
--- a/src/cmd/astro/astro.h
+++ b/src/cmd/astro/astro.h
@@ -1,8 +1,10 @@
 #include	<u.h>
 #include	<libc.h>
 
-//#pragma	varargck	type	"R"	double
-//#pragma	varargck	type	"D"	double
+#ifdef VARARGCK
+#pragma	varargck	type	"R"	double
+#pragma	varargck	type	"D"	double
+#endif
 
 typedef	struct	Obj1	Obj1;
 typedef	struct	Obj2	Obj2;
@@ -20,7 +22,7 @@
 	DARK	= 1<<0,
 	SIGNIF	= 1<<1,
 	PTIME	= 1<<2,
-	LIGHT	= 1<<3,
+	LIGHT	= 1<<3
 };
 
 struct	Obj1
@@ -150,7 +152,7 @@
 extern	double	dist(Obj1*, Obj1*);
 extern	double	dsrc(double, Tim*, int);
 extern	void	dtsetup(double, Tim*);
-//extern	int	evcomp(void*, void*);
+/*extern	int	evcomp(void*, void*);*/
 extern	void	event(char*, char*, char*, double, int);
 extern	void	evflush(void);
 extern	double	fmod(double, double);
diff --git a/src/cmd/astro/init.c b/src/cmd/astro/init.c
index f376f66..9375a3a 100644
--- a/src/cmd/astro/init.c
+++ b/src/cmd/astro/init.c
@@ -14,7 +14,7 @@
 	&onept,
 	&oplut,
 	&ocomet,
-	0,
+	0
 };
 
 struct	idata
@@ -35,7 +35,7 @@
 	"Uranus",	"uranus",	uran,
 	"Neptune",	"neptune",	nept,
 	"Pluto",	"pluto",	plut,
-	"Comet",	"comet",	comet,
+	"Comet",	"comet",	comet
 };
 
 void
diff --git a/src/cmd/astro/main.c b/src/cmd/astro/main.c
index a6441aa..43ce4cc 100644
--- a/src/cmd/astro/main.c
+++ b/src/cmd/astro/main.c
@@ -52,12 +52,12 @@
 			d = dist(&eobj1->point[i], &eobj2->point[i]);
 			print("dist %s to %s = %.4f\n", eobj1->name, eobj2->name, d);
 		}
-//		if(flags['p']) {
-//			pdate(d);
-//			print(" ");
-//			ptime(d);
-//			print("\n");
-//		}
+/*		if(flags['p']) { */
+/*			pdate(d); */
+/*			print(" "); */
+/*			ptime(d); */
+/*			print("\n"); */
+/*		} */
 		if(flags['p'] || flags['e'])
 			break;
 		d += deld;
@@ -151,8 +151,8 @@
 	if(flags['j'])
 		print("jday = %.4f\n", day);
 	deltat = day * .001704;
-	if(deltat > 32.184)		// assume date is utc1
-		deltat = 32.184;	// correct by leap sec
+	if(deltat > 32.184)		/* assume date is utc1 */
+		deltat = 32.184;	/* correct by leap sec */
 	if(flags['t'])
 		deltat = readdt();
 
diff --git a/src/cmd/astro/merct.c b/src/cmd/astro/merct.c
index ebe1f0e..6ada968 100644
--- a/src/cmd/astro/merct.c
+++ b/src/cmd/astro/merct.c
@@ -168,7 +168,7 @@
 	0.160e-6,	2.1241,
 	0.134e-6,	5.1260,
 	0.347e-6,	5.1620,
-	0,
+	0
 };
 
 char	merccp[] =
@@ -332,5 +332,5 @@
 	 0,	2,
 	-1,	2,
 	 2,	3,
-	 1,	3,
+	 1,	3
 };
diff --git a/src/cmd/astro/moont.c b/src/cmd/astro/moont.c
index 1509492..3658035 100644
--- a/src/cmd/astro/moont.c
+++ b/src/cmd/astro/moont.c
@@ -286,5 +286,5 @@
 	    -.0130,	4,0,0,-2,
 	    0.0115,	3,-1,0,0,
 	    -.0141,	2,0,-2,-2,
-	         0,	0,0,0,0,
+	         0,	0,0,0,0
 };
diff --git a/src/cmd/astro/nept.c b/src/cmd/astro/nept.c
index 2d05d59..ff0c9fc 100644
--- a/src/cmd/astro/nept.c
+++ b/src/cmd/astro/nept.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	30.06896348,		// [1] semi major axis (au)
-	0.00858587,		// [2] eccentricity
- 	1.76917,		// [3] inclination (deg)
-	131.72169,		// [4] longitude of the ascending node (deg)
-	44.97135,		// [5] longitude of perihelion (deg)
-	304.88003,		// [6] mean longitude (deg)
+	30.06896348,		/* [1] semi major axis (au) */
+	0.00858587,		/* [2] eccentricity */
+ 	1.76917,		/* [3] inclination (deg) */
+	131.72169,		/* [4] longitude of the ascending node (deg) */
+	44.97135,		/* [5] longitude of perihelion (deg) */
+	304.88003,		/* [6] mean longitude (deg) */
 
-	-0.00125196,		// [1+6] (au/julian century)
-	0.0000251,		// [2+6] (e/julian century)
-  	-3.64,			// [3+6] (arcsec/julian century)
-	-151.25,		// [4+6] (arcsec/julian century)
-	-844.43,		// [5+6] (arcsec/julian century)
-	786449.21,		// [6+6] (arcsec/julian century)
+	-0.00125196,		/* [1+6] (au/julian century) */
+	0.0000251,		/* [2+6] (e/julian century) */
+  	-3.64,			/* [3+6] (arcsec/julian century) */
+	-151.25,		/* [4+6] (arcsec/julian century) */
+	-844.43,		/* [5+6] (arcsec/julian century) */
+	786449.21,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/nutt.c b/src/cmd/astro/nutt.c
index 8ddf2b9..b4bfdef 100644
--- a/src/cmd/astro/nutt.c
+++ b/src/cmd/astro/nutt.c
@@ -34,7 +34,7 @@
 	  .0183,	0,
 	  .0113,	0,
 	 -.0050,	0,
-	      0,
+	      0
 };
 
 char	nutcp[] =
@@ -67,5 +67,5 @@
 	2,2,0,
 	1,2,0,
 	2,2,1,
-	2,2,-1,
+	2,2,-1
 };
diff --git a/src/cmd/astro/pdate.c b/src/cmd/astro/pdate.c
index e88d700..4d60fde 100644
--- a/src/cmd/astro/pdate.c
+++ b/src/cmd/astro/pdate.c
@@ -14,7 +14,7 @@
 	"September",
 	"October",
 	"November",
-	"December",
+	"December"
 };
 
 double
@@ -163,13 +163,13 @@
 	lambda = 0;
 	beta = 0;
 
-// uses lambda, beta, rad, motion
-// sets alpha, delta, rp
+/* uses lambda, beta, rad, motion */
+/* sets alpha, delta, rp */
 
 	helio();
 
-// uses alpha, delta, rp
-// sets ra, decl, lha, decl2, az, el
+/* uses alpha, delta, rp */
+/* sets ra, decl, lha, decl2, az, el */
 
 	geo();
 
diff --git a/src/cmd/astro/plut.c b/src/cmd/astro/plut.c
index 36702a8..6c31ed5 100644
--- a/src/cmd/astro/plut.c
+++ b/src/cmd/astro/plut.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	39.48168677,		// [1] semi major axis (au)
-	0.24880766,		// [2] eccentricity
- 	17.14175,		// [3] inclination (deg)
-	110.30347,		// [4] longitude of the ascending node (deg)
-	224.06676,		// [5] longitude of perihelion (deg)
-	238.92881,		// [6] mean longitude (deg)
+	39.48168677,		/* [1] semi major axis (au) */
+	0.24880766,		/* [2] eccentricity */
+ 	17.14175,		/* [3] inclination (deg) */
+	110.30347,		/* [4] longitude of the ascending node (deg) */
+	224.06676,		/* [5] longitude of perihelion (deg) */
+	238.92881,		/* [6] mean longitude (deg) */
 
-	-0.00076912,		// [1+6] (au/julian century)
-	0.00006465,		// [2+6] (e/julian century)
-  	11.07,			// [3+6] (arcsec/julian century)
-	-37.33,			// [4+6] (arcsec/julian century)
-	-132.25,		// [5+6] (arcsec/julian century)
-	522747.90,		// [6+6] (arcsec/julian century)
+	-0.00076912,		/* [1+6] (au/julian century) */
+	0.00006465,		/* [2+6] (e/julian century) */
+  	11.07,			/* [3+6] (arcsec/julian century) */
+	-37.33,			/* [4+6] (arcsec/julian century) */
+	-132.25,		/* [5+6] (arcsec/julian century) */
+	522747.90,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/satel.c b/src/cmd/astro/satel.c
index 38206e5..e610afa 100644
--- a/src/cmd/astro/satel.c
+++ b/src/cmd/astro/satel.c
@@ -2,7 +2,7 @@
 
 char*	satlst[] =
 {
-	0,
+	0
 };
 
 struct
diff --git a/src/cmd/astro/search.c b/src/cmd/astro/search.c
index e4ed4ed..71424ee 100644
--- a/src/cmd/astro/search.c
+++ b/src/cmd/astro/search.c
@@ -5,7 +5,7 @@
 	"Fall equinox",
 	"Winter solstice",
 	"Spring equinox",
-	"Summer solstice",
+	"Summer solstice"
 };
 
 struct
diff --git a/src/cmd/astro/sunt.c b/src/cmd/astro/sunt.c
index 7f452bc..0265632 100644
--- a/src/cmd/astro/sunt.c
+++ b/src/cmd/astro/sunt.c
@@ -122,7 +122,7 @@
 	-1.33e-6, 0,
 	 0.37e-6, 0,
 	 0.36e-6, 0,
-	0,
+	0
 };
 char	suncp[]	=
 {
@@ -238,5 +238,5 @@
 	1,0,0,
 	1,-1,0,
 	1,1,0,
-	1,0,-1,
+	1,0,-1
 };
diff --git a/src/cmd/astro/uran.c b/src/cmd/astro/uran.c
index b40fabe..33e6f1b 100644
--- a/src/cmd/astro/uran.c
+++ b/src/cmd/astro/uran.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	19.19126393,		// [1] semi major axis (au)
-	0.04716771,		// [2] eccentricity
- 	0.76986,		// [3] inclination (deg)
-	74.22988,		// [4] longitude of the ascending node (deg)
-	170.96424,		// [5] longitude of perihelion (deg)
-	313.23218,		// [6] mean longitude (deg)
+	19.19126393,		/* [1] semi major axis (au) */
+	0.04716771,		/* [2] eccentricity */
+ 	0.76986,		/* [3] inclination (deg) */
+	74.22988,		/* [4] longitude of the ascending node (deg) */
+	170.96424,		/* [5] longitude of perihelion (deg) */
+	313.23218,		/* [6] mean longitude (deg) */
 
-	0.00152025,		// [1+6] (au/julian century)
-	-0.00019150,		// [2+6] (e/julian century)
-  	-2.09,			// [3+6] (arcsec/julian century)
-	-1681.40,		// [4+6] (arcsec/julian century)
-	1312.56,		// [5+6] (arcsec/julian century)
-	1542547.79,		// [6+6] (arcsec/julian century)
+	0.00152025,		/* [1+6] (au/julian century) */
+	-0.00019150,		/* [2+6] (e/julian century) */
+  	-2.09,			/* [3+6] (arcsec/julian century) */
+	-1681.40,		/* [4+6] (arcsec/julian century) */
+	1312.56,		/* [5+6] (arcsec/julian century) */
+	1542547.79,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/venust.c b/src/cmd/astro/venust.c
index a4521af..e34643a 100644
--- a/src/cmd/astro/venust.c
+++ b/src/cmd/astro/venust.c
@@ -27,7 +27,7 @@
 	0.717e-6,	2.2969,
 	2.991e-6,	2.0611,
 	1.335e-6,	0.9628,
-	0.,
+	0.
 };
 
 char	vencp[]	=
@@ -56,5 +56,5 @@
 	4,-5,0,0,
 	2,0,-3,0,
 	1,0,0,-1,
-	2,0,0,-2,
+	2,0,0,-2
 };
diff --git a/src/cmd/auth/factotum/apop.c b/src/cmd/auth/factotum/apop.c
index 5703571..992cc0a 100644
--- a/src/cmd/auth/factotum/apop.c
+++ b/src/cmd/auth/factotum/apop.c
@@ -148,7 +148,7 @@
 
 enum
 {
-	APOPCHALLEN = 128,
+	APOPCHALLEN = 128
 };
 
 static int apopchal(ServerState*, int, char[APOPCHALLEN]);
diff --git a/src/cmd/auth/factotum/attr.c b/src/cmd/auth/factotum/attr.c
index 2f2511b..1c037a5 100644
--- a/src/cmd/auth/factotum/attr.c
+++ b/src/cmd/auth/factotum/attr.c
@@ -143,7 +143,7 @@
 
 char *ignored[] = {
 	"role",
-	"disabled",
+	"disabled"
 };
 
 static int
diff --git a/src/cmd/auth/factotum/chap.c b/src/cmd/auth/factotum/chap.c
index 2b25890..b27f64a 100644
--- a/src/cmd/auth/factotum/chap.c
+++ b/src/cmd/auth/factotum/chap.c
@@ -33,7 +33,7 @@
 
 	MShashlen = 16,
 	MSchallen = 8,
-	MSresplen = 24,
+	MSresplen = 24
 };
 
 static int
@@ -315,7 +315,7 @@
 	keyclose(s.k);
 	free(user);
 	free(resp);
-//	xioclose(s.asfd);
+/*	xioclose(s.asfd); */
 	return ret;
 }
 
@@ -411,16 +411,17 @@
 };
 
 Proto chap = {
-.name=		"chap",
-.roles=		chaproles,
-.checkkey=	chapcheck,
-.keyprompt=	"user? !password?",
+	"chap",
+	chaproles,
+	"user? !password?",
+	chapcheck
 };
 
 Proto mschap = {
-.name=		"mschap",
-.roles=		chaproles,
-.checkkey=	chapcheck,
-.keyprompt=	"user? !password?",
+	"mschap",
+	chaproles,
+	"user? !password?",
+	chapcheck
 };
 
+
diff --git a/src/cmd/auth/factotum/cpu.c b/src/cmd/auth/factotum/cpu.c
index da8280a..4639904 100644
--- a/src/cmd/auth/factotum/cpu.c
+++ b/src/cmd/auth/factotum/cpu.c
@@ -56,7 +56,7 @@
 {
 	{ "p9",		p9auth,		srvp9auth,},
 	{ "netkey",	netkeyauth,	netkeysrvauth,},
-//	{ "none",	noauth,		srvnoauth,},
+/*	{ "none",	noauth,		srvnoauth,}, */
 	{ nil,	nil}
 };
 AuthMethod *am = authmethod;	/* default is p9 */
@@ -687,7 +687,7 @@
 	Qdir,
 	Qcpunote,
 
-	Nfid = 32,
+	Nfid = 32
 };
 
 struct {
@@ -697,7 +697,7 @@
 } fstab[] =
 {
 	[Qdir]		{ ".",		{Qdir, 0, QTDIR},	DMDIR|0555	},
-	[Qcpunote]	{ "cpunote",	{Qcpunote, 0},		0444		},
+	[Qcpunote]	{ "cpunote",	{Qcpunote, 0},		0444		}
 };
 
 typedef struct Note Note;
diff --git a/src/cmd/auth/factotum/ctl.c b/src/cmd/auth/factotum/ctl.c
index d426f86..6195bb8 100644
--- a/src/cmd/auth/factotum/ctl.c
+++ b/src/cmd/auth/factotum/ctl.c
@@ -17,7 +17,7 @@
 static char *msg[] = {
 	"key",
 	"delkey",
-	"debug",
+	"debug"
 };
 
 static int
diff --git a/src/cmd/auth/factotum/dat.h b/src/cmd/auth/factotum/dat.h
index eaf94ca..49377f4 100644
--- a/src/cmd/auth/factotum/dat.h
+++ b/src/cmd/auth/factotum/dat.h
@@ -13,7 +13,7 @@
 	RpcWriteHex,
 
 	/* thread stack size - big buffers for printing */
-	STACK = 65536,
+	STACK = 65536
 };
 
 typedef struct Conv Conv;
diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c
index 68e8628..08894ae 100644
--- a/src/cmd/auth/factotum/fs.c
+++ b/src/cmd/auth/factotum/fs.c
@@ -12,7 +12,7 @@
 	Qlog,
 	Qctl,
 	Qneedkey,
-	Qconv,
+	Qconv
 };
 
 static int qtop;
@@ -41,7 +41,7 @@
 	"rpc",		Qrpc,		0666,
 	"proto",		Qprotolist,	0444,
 	"log",		Qlog,		0600|DMEXCL,
-	"conv",		Qconv,		0400,
+	"conv",		Qconv,		0400
 };
 
 static void
diff --git a/src/cmd/auth/factotum/main.c b/src/cmd/auth/factotum/main.c
index b18cbf3..010b5d5 100644
--- a/src/cmd/auth/factotum/main.c
+++ b/src/cmd/auth/factotum/main.c
@@ -26,7 +26,7 @@
 	char *mtpt;
 	char err[ERRMAX];
 
-//	mtpt = "/mnt";
+/*	mtpt = "/mnt"; */
 	mtpt = nil;
 	owner = getuser();
 	quotefmtinstall();
diff --git a/src/cmd/auth/factotum/p9any.c b/src/cmd/auth/factotum/p9any.c
index 789d4d7..0267a61 100644
--- a/src/cmd/auth/factotum/p9any.c
+++ b/src/cmd/auth/factotum/p9any.c
@@ -15,7 +15,7 @@
 static Proto* okproto[] =
 {
 	&p9sk1,
-	nil,
+	nil
 };
 
 static int
@@ -267,6 +267,6 @@
 
 Proto p9any = {
 	"p9any",
-	p9anyroles,
+	p9anyroles
 };
 
diff --git a/src/cmd/auth/factotum/p9cr.c b/src/cmd/auth/factotum/p9cr.c
index abbad4c..32cccb8 100644
--- a/src/cmd/auth/factotum/p9cr.c
+++ b/src/cmd/auth/factotum/p9cr.c
@@ -197,7 +197,7 @@
 
 enum
 {
-	MAXCHAL = 64,
+	MAXCHAL = 64
 };
 
 typedef struct State State;
@@ -222,7 +222,7 @@
 	SHaveChal,
 	SNeedResp,
 
-	Maxphase,
+	Maxphase
 };
 
 static char *phasenames[Maxphase] =
@@ -231,7 +231,7 @@
 [CHaveResp]	"CHaveResp",
 
 [SHaveChal]	"SHaveChal",
-[SNeedResp]	"SNeedResp",
+[SNeedResp]	"SNeedResp"
 };
 
 static void
@@ -525,7 +525,7 @@
 .write=		p9crwrite,
 .read=		p9crread,
 .close=		p9crclose,
-.keyprompt=	"user? !password?",
+.keyprompt=	"user? !password?"
 };
 
 Proto vnc =
@@ -536,5 +536,5 @@
 .read=		p9crread,
 .close=		p9crclose,
 .keyprompt=	"!password?",
-.addkey=	vncaddkey,
+.addkey=	vncaddkey
 };
diff --git a/src/cmd/auth/factotum/p9sk1.c b/src/cmd/auth/factotum/p9sk1.c
index 04981e5..4615693 100644
--- a/src/cmd/auth/factotum/p9sk1.c
+++ b/src/cmd/auth/factotum/p9sk1.c
@@ -343,11 +343,11 @@
 	p9sk1roles,
 	"user? dom? !password?",
 	p9sk1check,
-	p9sk1close,
+	p9sk1close
 };
 
 Proto p9sk2 = {
 	"p9sk2",
-	p9sk2roles,
+	p9sk2roles
 };
 
diff --git a/src/cmd/auth/factotum/proto.c b/src/cmd/auth/factotum/proto.c
index 97da15e..daf90cd 100644
--- a/src/cmd/auth/factotum/proto.c
+++ b/src/cmd/auth/factotum/proto.c
@@ -23,7 +23,7 @@
 	&p9sk2,
 	&pass,
 	&rsa,
-	nil,
+	nil
 };
 
 Proto*
diff --git a/src/cmd/auth/factotum/rpc.c b/src/cmd/auth/factotum/rpc.c
index 350a079..ad89433 100644
--- a/src/cmd/auth/factotum/rpc.c
+++ b/src/cmd/auth/factotum/rpc.c
@@ -41,7 +41,7 @@
 	"start",
 	"write",
 	"readhex",
-	"writehex",
+	"writehex"
 };
 
 static int
diff --git a/src/cmd/auth/factotum/secstore.c b/src/cmd/auth/factotum/secstore.c
index 0156e17..315de0e 100644
--- a/src/cmd/auth/factotum/secstore.c
+++ b/src/cmd/auth/factotum/secstore.c
@@ -10,9 +10,9 @@
 enum{ CHK = 16};
 enum{ MAXFILESIZE = 10*1024*1024 };
 
-enum{// PW status bits
+enum{/* PW status bits */
 	Enabled 	= (1<<0),
-	STA 		= (1<<1),	// extra SecurID step
+	STA 		= (1<<1)	/* extra SecurID step */
 };
 
 static char testmess[] = "__secstore\tPAK\nC=%s\nm=0\n";
@@ -75,28 +75,28 @@
 	return strcmp((char*)buf, "!account exists") == 0;
 }
 
-// delimited, authenticated, encrypted connection
-enum{ Maxmsg=4096 };	// messages > Maxmsg bytes are truncated
+/* delimited, authenticated, encrypted connection */
+enum{ Maxmsg=4096 };	/* messages > Maxmsg bytes are truncated */
 typedef struct SConn SConn;
 
-extern SConn* newSConn(int);	// arg is open file descriptor
+extern SConn* newSConn(int);	/* arg is open file descriptor */
 struct SConn{
 	void *chan;
 	int secretlen;
-	int (*secret)(SConn*, uchar*, int);// 
-	int (*read)(SConn*, uchar*, int); // <0 if error;  errmess in buffer
+	int (*secret)(SConn*, uchar*, int);/*  */
+	int (*read)(SConn*, uchar*, int); /* <0 if error;  errmess in buffer */
 	int (*write)(SConn*, uchar*, int);
-	void (*free)(SConn*);		// also closes file descriptor
+	void (*free)(SConn*);		/* also closes file descriptor */
 };
-// secret(s,b,dir) sets secret for digest, encrypt, using the secretlen
-//		bytes in b to form keys 	for the two directions;
-//	  set dir=0 in client, dir=1 in server
+/* secret(s,b,dir) sets secret for digest, encrypt, using the secretlen */
+/*		bytes in b to form keys 	for the two directions; */
+/*	  set dir=0 in client, dir=1 in server */
 
-// error convention: write !message in-band
+/* error convention: write !message in-band */
 #define readstr secstore_readstr
 static void writerr(SConn*, char*);
-static int readstr(SConn*, char*);  // call with buf of size Maxmsg+1
-	// returns -1 upon error, with error message in buf
+static int readstr(SConn*, char*);  /* call with buf of size Maxmsg+1 */
+	/* returns -1 upon error, with error message in buf */
 
 typedef struct ConnState {
 	uchar secret[SHA1dlen];
@@ -105,8 +105,8 @@
 } ConnState;
 
 typedef struct SS{
-	int fd;		// file descriptor for read/write of encrypted data
-	int alg;	// if nonzero, "alg sha rc4_128"
+	int fd;		/* file descriptor for read/write of encrypted data */
+	int alg;	/* if nonzero, "alg sha rc4_128" */
 	ConnState in, out;
 } SS;
 
@@ -123,7 +123,7 @@
 		hmac_sha1(sigma, nsigma, (uchar*)"two", 3, ss->out.secret, nil);
 		hmac_sha1(sigma, nsigma, (uchar*)"one", 3, ss->in.secret, nil);
 	}
-	setupRC4state(&ss->in.rc4, ss->in.secret, 16); // restrict to 128 bits
+	setupRC4state(&ss->in.rc4, ss->in.secret, 16); /* restrict to 128 bits */
 	setupRC4state(&ss->out.rc4, ss->out.secret, 16);
 	ss->alg = 1;
 	return 0;
@@ -174,7 +174,7 @@
 		werrstr("!SC_read invalid count");
 		return -1;
 	}
-	len = (count[0]&0x7f)<<8 | count[1];	// SSL-style count; no pad
+	len = (count[0]&0x7f)<<8 | count[1];	/* SSL-style count; no pad */
 	if(ss->alg){
 		len -= SHA1dlen;
 		if(len <= 0 || readn(ss->fd, digest, SHA1dlen) != SHA1dlen){
@@ -328,7 +328,7 @@
 	if((len = atoi(s)) < 0){
 		werrstr("secstore: remote file %s does not exist", gf);
 		return -1;
-	}else if(len > MAXFILESIZE){//assert
+	}else if(len > MAXFILESIZE){/*assert */
 		werrstr("secstore: implausible file size %d for %s", len, gf);
 		return -1;
 	}
@@ -400,7 +400,7 @@
 
 static PAKparams *pak;
 
-// This group was generated by the seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E.
+/* This group was generated by the seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E. */
 static void
 initPAKparams(void)
 {
@@ -422,8 +422,8 @@
 		"2A6E0BAE08B14258F8C03CC1B30E0DDADFCF7CEDF0727684D3D255F1", nil, 16, nil);
 }
 
-// H = (sha(ver,C,sha(passphrase)))^r mod p,
-// a hash function expensive to attack by brute force.
+/* H = (sha(ver,C,sha(passphrase)))^r mod p, */
+/* a hash function expensive to attack by brute force. */
 static void
 longhash(char *ver, char *C, uchar *passwd, mpint *H)
 {
@@ -449,7 +449,7 @@
 	mpexp(H, pak->r, pak->p, H);
 }
 
-// Hi = H^-1 mod p
+/* Hi = H^-1 mod p */
 static char *
 PAK_Hi(char *C, char *passphrase, mpint *H, mpint *Hi)
 {
@@ -462,8 +462,8 @@
 	return mptoa(Hi, 64, nil, 0);
 }
 
-// another, faster, hash function for each party to
-// confirm that the other has the right secrets.
+/* another, faster, hash function for each party to */
+/* confirm that the other has the right secrets. */
 static void
 shorthash(char *mess, char *C, char *S, char *m, char *mu, char *sigma, char *Hi, uchar *digest)
 {
@@ -485,12 +485,12 @@
 	sha1((uchar*)Hi, strlen(Hi), digest, state);
 }
 
-// On input, conn provides an open channel to the server;
-//	C is the name this client calls itself;
-//	pass is the user's passphrase
-// On output, session secret has been set in conn
-//	(unless return code is negative, which means failure).
-//    If pS is not nil, it is set to the (alloc'd) name the server calls itself.
+/* On input, conn provides an open channel to the server; */
+/*	C is the name this client calls itself; */
+/*	pass is the user's passphrase */
+/* On output, session secret has been set in conn */
+/*	(unless return code is negative, which means failure). */
+/*    If pS is not nil, it is set to the (alloc'd) name the server calls itself. */
 static int
 PAKclient(SConn *conn, char *C, char *pass, char **pS)
 {
@@ -503,7 +503,7 @@
 
 	hexHi = PAK_Hi(C, pass, H, Hi);
 
-	// random 1<=x<=q-1; send C, m=g**x H
+	/* random 1<=x<=q-1; send C, m=g**x H */
 	x = mprand(164, genrandom, nil);
 	mpmod(x, pak->q, x);
 	if(mpcmp(x, mpzero) == 0)
@@ -517,7 +517,7 @@
 	snprint(mess, Maxmsg, "%s\tPAK\nC=%s\nm=%s\n", VERSION, C, hexm);
 	conn->write(conn, (uchar*)mess, strlen(mess));
 
-	// recv g**y, S, check hash1(g**xy)
+	/* recv g**y, S, check hash1(g**xy) */
 	if(readstr(conn, mess) < 0){
 		fprint(2, "error: %s\n", mess);
 		writerr(conn, "couldn't read g**y");
@@ -556,18 +556,18 @@
 		goto done;
 	}
 
-	// send hash2(g**xy)
+	/* send hash2(g**xy) */
 	shorthash("client", C, S, hexm, hexmu, hexsigma, hexHi, digest);
 	enc64(kc, sizeof kc, digest, SHA1dlen);
 	snprint(mess2, Maxmsg, "k'=%s\n", kc);
 	conn->write(conn, (uchar*)mess2, strlen(mess2));
 
-	// set session key
+	/* set session key */
 	shorthash("session", C, S, hexm, hexmu, hexsigma, hexHi, digest);
 	memset(hexsigma, 0, strlen(hexsigma));
 	n = conn->secret(conn, digest, 0);
 	memset(digest, 0, SHA1dlen);
-	if(n < 0){//assert
+	if(n < 0){/*assert */
 		writerr(conn, "can't set secret");
 		goto done;
 	}
diff --git a/src/cmd/auth/factotum/test.c b/src/cmd/auth/factotum/test.c
index b410489..c9403c0 100644
--- a/src/cmd/auth/factotum/test.c
+++ b/src/cmd/auth/factotum/test.c
@@ -41,7 +41,7 @@
 	"cram",		proxyserver,		proxyclient,
 	"p9sk1",		proxyserver,		proxyclient,
 	"p9sk2",		proxyserver,		proxyclient,
-	"p9any",		proxyserver,		proxyclient,
+	"p9any",		proxyserver,		proxyclient
 };
 
 void
diff --git a/src/cmd/auth/secstore/SConn.c b/src/cmd/auth/secstore/SConn.c
index 7a8654a..9ad9a7c 100644
--- a/src/cmd/auth/secstore/SConn.c
+++ b/src/cmd/auth/secstore/SConn.c
@@ -13,8 +13,8 @@
 } ConnState;
 
 typedef struct SS{
-	int fd;		// file descriptor for read/write of encrypted data
-	int alg;	// if nonzero, "alg sha rc4_128"
+	int fd;		/* file descriptor for read/write of encrypted data */
+	int alg;	/* if nonzero, "alg sha rc4_128" */
 	ConnState in, out;
 } SS;
 
@@ -31,7 +31,7 @@
 		hmac_sha1(sigma, nsigma, (uchar*)"two", 3, ss->out.secret, nil);
 		hmac_sha1(sigma, nsigma, (uchar*)"one", 3, ss->in.secret, nil);
 	}
-	setupRC4state(&ss->in.rc4, ss->in.secret, 16); // restrict to 128 bits
+	setupRC4state(&ss->in.rc4, ss->in.secret, 16); /* restrict to 128 bits */
 	setupRC4state(&ss->out.rc4, ss->out.secret, 16);
 	ss->alg = 1;
 	return 0;
@@ -82,7 +82,7 @@
 		snprint((char*)buf,n,"!SC_read invalid count");
 		return -1;
 	}
-	len = (count[0]&0x7f)<<8 | count[1];	// SSL-style count; no pad
+	len = (count[0]&0x7f)<<8 | count[1];	/* SSL-style count; no pad */
 	if(ss->alg){
 		len -= SHA1dlen;
 		if(len <= 0 || readn(ss->fd, digest, SHA1dlen) != SHA1dlen){
diff --git a/src/cmd/auth/secstore/SConn.h b/src/cmd/auth/secstore/SConn.h
index 9a428d8..31765f3 100644
--- a/src/cmd/auth/secstore/SConn.h
+++ b/src/cmd/auth/secstore/SConn.h
@@ -1,24 +1,24 @@
-// delimited, authenticated, encrypted connection
-enum{ Maxmsg=4096 };	// messages > Maxmsg bytes are truncated
+/* delimited, authenticated, encrypted connection */
+enum{ Maxmsg=4096 };	/* messages > Maxmsg bytes are truncated */
 typedef struct SConn SConn;
 
-extern SConn* newSConn(int);	// arg is open file descriptor
+extern SConn* newSConn(int);	/* arg is open file descriptor */
 struct SConn{
 	void *chan;
 	int secretlen;
-	int (*secret)(SConn*, uchar*, int);// 
-	int (*read)(SConn*, uchar*, int); // <0 if error;  errmess in buffer
+	int (*secret)(SConn*, uchar*, int);/*  */
+	int (*read)(SConn*, uchar*, int); /* <0 if error;  errmess in buffer */
 	int (*write)(SConn*, uchar*, int);
-	void (*free)(SConn*);		// also closes file descriptor
+	void (*free)(SConn*);		/* also closes file descriptor */
 };
-// secret(s,b,dir) sets secret for digest, encrypt, using the secretlen
-//		bytes in b to form keys 	for the two directions;
-//	  set dir=0 in client, dir=1 in server
+/* secret(s,b,dir) sets secret for digest, encrypt, using the secretlen */
+/*		bytes in b to form keys 	for the two directions; */
+/*	  set dir=0 in client, dir=1 in server */
 
-// error convention: write !message in-band
+/* error convention: write !message in-band */
 extern void writerr(SConn*, char*);
-extern int readstr(SConn*, char*);  // call with buf of size Maxmsg+1
-	// returns -1 upon error, with error message in buf
+extern int readstr(SConn*, char*);  /* call with buf of size Maxmsg+1 */
+	/* returns -1 upon error, with error message in buf */
 
 extern void *emalloc(ulong); /* dies on failure; clears memory */
 extern void *erealloc(void *, ulong);
diff --git a/src/cmd/auth/secstore/aescbc.c b/src/cmd/auth/secstore/aescbc.c
index 56aeb00..86cb1bf 100644
--- a/src/cmd/auth/secstore/aescbc.c
+++ b/src/cmd/auth/secstore/aescbc.c
@@ -100,7 +100,7 @@
 		aesCBCencrypt(buf+AESbsize, AESbsize, &aes);  /* use second AESbsize bytes as initial plaintext */
 		safewrite(buf, 2*AESbsize);
 		dstate = hmac_sha1(buf+AESbsize, AESbsize, key2, MD5dlen, 0, 0);
-		while(1){
+		for(;;){
 			n = Bread(&bin, buf, BUF);
 			if(n < 0){
 				fprint(2,"read error\n");
@@ -134,9 +134,9 @@
 				exits("decrypted file failed to authenticate");
 			}
 		}else{ /* compatibility with past mistake */
-			// if file was encrypted with bad aescbc use this:
-			//         memset(key, 0, AESmaxkey);
-			//    else assume we're decrypting secstore files
+			/* if file was encrypted with bad aescbc use this: */
+			/*         memset(key, 0, AESmaxkey); */
+			/*    else assume we're decrypting secstore files */
 			setupAESstate(&aes, key, AESbsize, buf);
 			saferead(buf, CHK);
 			aesCBCdecrypt(buf, CHK, &aes);
diff --git a/src/cmd/auth/secstore/dirls.c b/src/cmd/auth/secstore/dirls.c
index b447941..eaae8cd 100644
--- a/src/cmd/auth/secstore/dirls.c
+++ b/src/cmd/auth/secstore/dirls.c
@@ -74,7 +74,7 @@
 	}
 	for(list=nil, len=0, i=0; i<ndir; i++){
 		date = ctime(dirbuf[i].mtime);
-		date[28] = 0;  // trim newline
+		date[28] = 0;  /* trim newline */
 		n = snprint(buf, sizeof buf, "%*ulld %s", lenwid, dirbuf[i].length, date+4);
 		n += enc64(dig, sizeof dig, sha1file(path, dirbuf[i].name), SHA1dlen);
 		n += nmwid+3+strlen(dirbuf[i].name);
diff --git a/src/cmd/auth/secstore/pak.c b/src/cmd/auth/secstore/pak.c
index fb008e0..effc01d 100644
--- a/src/cmd/auth/secstore/pak.c
+++ b/src/cmd/auth/secstore/pak.c
@@ -1,6 +1,6 @@
-// PAK is an encrypted key exchange protocol designed by Philip MacKenzie et al.
-// It is patented and use outside Plan 9 requires you get a license.
-// (All other EKE protocols are patented as well, by Lucent or others.)
+/* PAK is an encrypted key exchange protocol designed by Philip MacKenzie et al. */
+/* It is patented and use outside Plan 9 requires you get a license. */
+/* (All other EKE protocols are patented as well, by Lucent or others.) */
 #include <u.h>
 #include <libc.h>
 #include <mp.h>
@@ -19,7 +19,7 @@
 
 static PAKparams *pak;
 
-// from seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E
+/* from seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E */
 static void
 initPAKparams(void)
 {
@@ -43,8 +43,8 @@
 		nil, 16, nil);
 }
 
-// H = (sha(ver,C,sha(passphrase)))^r mod p,
-// a hash function expensive to attack by brute force.
+/* H = (sha(ver,C,sha(passphrase)))^r mod p, */
+/* a hash function expensive to attack by brute force. */
 static void
 longhash(char *ver, char *C, uchar *passwd, mpint *H)
 {
@@ -70,7 +70,7 @@
 	mpexp(H, pak->r, pak->p, H);
 }
 
-// Hi = H^-1 mod p
+/* Hi = H^-1 mod p */
 char *
 PAK_Hi(char *C, char *passphrase, mpint *H, mpint *Hi)
 {
@@ -83,8 +83,8 @@
 	return mptoa(Hi, 64, nil, 0);
 }
 
-// another, faster, hash function for each party to
-// confirm that the other has the right secrets.
+/* another, faster, hash function for each party to */
+/* confirm that the other has the right secrets. */
 static void
 shorthash(char *mess, char *C, char *S, char *m, char *mu, char *sigma, char *Hi, uchar *digest)
 {
@@ -106,12 +106,12 @@
 	sha1((uchar*)Hi, strlen(Hi), digest, state);
 }
 
-// On input, conn provides an open channel to the server;
-//	C is the name this client calls itself;
-//	pass is the user's passphrase
-// On output, session secret has been set in conn
-//	(unless return code is negative, which means failure).
-//    If pS is not nil, it is set to the (alloc'd) name the server calls itself.
+/* On input, conn provides an open channel to the server; */
+/*	C is the name this client calls itself; */
+/*	pass is the user's passphrase */
+/* On output, session secret has been set in conn */
+/*	(unless return code is negative, which means failure). */
+/*    If pS is not nil, it is set to the (alloc'd) name the server calls itself. */
 int
 PAKclient(SConn *conn, char *C, char *pass, char **pS)
 {
@@ -124,9 +124,9 @@
 
 	hexHi = PAK_Hi(C, pass, H, Hi);
 	if(verbose)
-		fprint(2,"%s\n", feedback[H->p[0]&0x7]);  // provide a clue to catch typos
+		fprint(2,"%s\n", feedback[H->p[0]&0x7]);  /* provide a clue to catch typos */
 
-	// random 1<=x<=q-1; send C, m=g**x H
+	/* random 1<=x<=q-1; send C, m=g**x H */
 	x = mprand(240, genrandom, nil);
 	mpmod(x, pak->q, x);
 	if(mpcmp(x, mpzero) == 0)
@@ -140,7 +140,7 @@
 	snprint(mess, Maxmsg, "%s\tPAK\nC=%s\nm=%s\n", VERSION, C, hexm);
 	conn->write(conn, (uchar*)mess, strlen(mess));
 
-	// recv g**y, S, check hash1(g**xy)
+	/* recv g**y, S, check hash1(g**xy) */
 	if(readstr(conn, mess) < 0){
 		fprint(2, "error: %s\n", mess);
 		writerr(conn, "couldn't read g**y");
@@ -179,13 +179,13 @@
 		goto done;
 	}
 
-	// send hash2(g**xy)
+	/* send hash2(g**xy) */
 	shorthash("client", C, S, hexm, hexmu, hexsigma, hexHi, digest);
 	enc64(kc, sizeof kc, digest, SHA1dlen);
 	snprint(mess2, Maxmsg, "k'=%s\n", kc);
 	conn->write(conn, (uchar*)mess2, strlen(mess2));
 
-	// set session key
+	/* set session key */
 	shorthash("session", C, S, hexm, hexmu, hexsigma, hexHi, digest);
 	memset(hexsigma, 0, strlen(hexsigma));
 	n = conn->secret(conn, digest, 0);
@@ -210,12 +210,12 @@
 	return rc;
 }
 
-// On input,
-//	mess contains first message;
-//	name is name this server should call itself.
-// On output, session secret has been set in conn;
-//	if pw!=nil, then *pw points to PW struct for authenticated user.
-//	returns -1 if error
+/* On input, */
+/*	mess contains first message; */
+/*	name is name this server should call itself. */
+/* On output, session secret has been set in conn; */
+/*	if pw!=nil, then *pw points to PW struct for authenticated user. */
+/*	returns -1 if error */
 int
 PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 {
@@ -227,7 +227,7 @@
 	mpint *y = nil, *m = mpnew(0), *mu = mpnew(0), *sigma = mpnew(0);
 	PW *pw = nil;
 
-	// secstore version and algorithm
+	/* secstore version and algorithm */
 	snprint(mess2,Maxmsg,"%s\tPAK\n", VERSION);
 	n = strlen(mess2);
 	if(strncmp(mess,mess2,n) != 0){
@@ -237,7 +237,7 @@
 	mess += n;
 	initPAKparams();
 
-	// parse first message into C, m
+	/* parse first message into C, m */
 	eol = strchr(mess, '\n');
 	if(strncmp("C=", mess, 2) != 0 || !eol){
 		fprint(2,"mess[1]=%s\n", mess);
@@ -256,7 +256,7 @@
 	strtomp(hexm, nil, 64, m);
 	mpmod(m, pak->p, m);
 
-	// lookup client
+	/* lookup client */
 	if((pw = getPW(C,0)) == nil) {
 		snprint(mess2, sizeof mess2, "%r");
 		writerr(conn, mess2);
@@ -270,7 +270,7 @@
 	}
 	hexHi = mptoa(pw->Hi, 64, nil, 0);
 
-	// random y, mu=g**y, sigma=g**xy
+	/* random y, mu=g**y, sigma=g**xy */
 	y = mprand(240, genrandom, nil);
 	mpmod(y, pak->q, y);
 	if(mpcmp(y, mpzero) == 0){
@@ -281,7 +281,7 @@
 	mpmod(m, pak->p, m);
 	mpexp(m, y, pak->p, sigma);
 
-	// send g**y, hash1(g**xy)
+	/* send g**y, hash1(g**xy) */
 	hexmu = mptoa(mu, 64, nil, 0);
 	hexsigma = mptoa(sigma, 64, nil, 0);
 	shorthash("server", C, S, hexm, hexmu, hexsigma, hexHi, digest);
@@ -289,7 +289,7 @@
 	snprint(mess2, sizeof mess2, "mu=%s\nk=%s\nS=%s\n", hexmu, ks, S);
 	conn->write(conn, (uchar*)mess2, strlen(mess2));
 
-	// recv hash2(g**xy)
+	/* recv hash2(g**xy) */
 	if(readstr(conn, mess2) < 0){
 		writerr(conn, "couldn't read verifier");
 		goto done;
@@ -308,7 +308,7 @@
 		goto done;
 	}
 
-	// set session key
+	/* set session key */
 	shorthash("session", C, S, hexm, hexmu, hexsigma, hexHi, digest);
 	n = conn->secret(conn, digest, 1);
 	if(n < 0){
diff --git a/src/cmd/auth/secstore/password.c b/src/cmd/auth/secstore/password.c
index aacadd9..b2a00e7 100644
--- a/src/cmd/auth/secstore/password.c
+++ b/src/cmd/auth/secstore/password.c
@@ -42,7 +42,7 @@
 	uint now = time(0);
 	Biobuf *bin;
 	PW *pw;
-	char *f1, *f2; // fields 1, 2 = attribute, value
+	char *f1, *f2; /* fields 1, 2 = attribute, value */
 
 	if((bin = openPW(id, OREAD)) == 0){
 		id = "FICTITIOUS";
@@ -75,7 +75,7 @@
 	}
 	Bterm(bin);
 	if(dead_or_alive)
-		return pw;  // return PW entry for editing, whether currently valid or not
+		return pw;  /* return PW entry for editing, whether currently valid or not */
 	if(pw->expire <= now){
 		werrstr("account expired");
 		freePW(pw);
@@ -87,14 +87,14 @@
 		return nil;
 	}
 	if(pw->failed < 10)
-		return pw;  // success
+		return pw;  /* success */
 	if(now < mtimePW(id)+300){
 		werrstr("too many failures; try again in five minutes");
 		freePW(pw);
 		return nil;
 	}
 	pw->failed = 0;
-	putPW(pw);  // reset failed-login-counter after five minutes
+	putPW(pw);  /* reset failed-login-counter after five minutes */
 	return pw;
 }
 
diff --git a/src/cmd/auth/secstore/secstore.c b/src/cmd/auth/secstore/secstore.c
index cb6e585..571c6fa 100644
--- a/src/cmd/auth/secstore/secstore.c
+++ b/src/cmd/auth/secstore/secstore.c
@@ -142,8 +142,8 @@
 	return 0;
 }
 
-// This sends a file to the secstore disk that can, in an emergency, be
-// decrypted by the program aescbc.c.
+/* This sends a file to the secstore disk that can, in an emergency, be */
+/* decrypted by the program aescbc.c. */
 static int
 putfile(SConn *conn, char *pf, uchar *buf, ulong len, uchar *key, int nkey)
 {
@@ -206,7 +206,7 @@
 		ivo = 0;
 		if(n < Maxmsg){ /* EOF on input; append XX... */
 			memset(b+n, 'X', CHK);
-			n += CHK; // might push n>Maxmsg
+			n += CHK; /* might push n>Maxmsg */
 			done = 1;
 		}
 		aesCBCencrypt(b, n, &aes);
@@ -255,7 +255,7 @@
 		if(getfile(c->conn, *gf, *Gflag ? &memfile : nil, &len, (uchar*)c->pass, c->passlen) < 0)
 			goto Out;
 		if(*Gflag){
-			// write one line at a time, as required by /mnt/factotum/ctl
+			/* write one line at a time, as required by /mnt/factotum/ctl */
 			memcur = memfile;
 			while(len>0){
 				memnext = (uchar*)strchr((char*)memcur, '\n');
@@ -309,7 +309,7 @@
 
 	H = mpnew(0);
 	Hi = mpnew(0);
-	// changing our password is vulnerable to connection failure
+	/* changing our password is vulnerable to connection failure */
 	for(;;){
 		snprint(prompt, sizeof(prompt), "new password for %s: ", id);
 		newpass = readcons(prompt, nil, 1);
@@ -392,7 +392,7 @@
 		strecpy(c->pass, c->pass+sizeof c->pass, nvr.config);
 	}
 	if(pass_stdin){
-		n = readn(0, s, Maxmsg-2);  // so len(PINSTA)<Maxmsg-3
+		n = readn(0, s, Maxmsg-2);  /* so len(PINSTA)<Maxmsg-3 */
 		if(n < 1)
 			exits("no password on standard input");
 		s[n] = 0;
@@ -442,7 +442,7 @@
 			exits("invalid password on standard input");
 		if(pass_nvram)
 			exits("invalid password in nvram");
-		// and let user try retyping the password
+		/* and let user try retyping the password */
 		if(ntry==3)
 			fprint(2, "Enter an empty password to quit.\n");
 	}
diff --git a/src/cmd/auth/secstore/secstore.h b/src/cmd/auth/secstore/secstore.h
index dbd2ec9..d9cb807 100644
--- a/src/cmd/auth/secstore/secstore.h
+++ b/src/cmd/auth/secstore/secstore.h
@@ -1,26 +1,26 @@
 enum{ MAXFILESIZE = 10*1024*1024 };
 
-enum{// PW status bits
+enum{/* PW status bits */
 	Enabled 	= (1<<0),
-	STA 		= (1<<1),	// extra SecurID step
+	STA 		= (1<<1)	/* extra SecurID step */
 };
 
 typedef struct PW {
-	char *id;		// user id
-	ulong expire;	// expiration time (epoch seconds)
-	ushort status;	// Enabled, STA, ...
-	ushort failed;	// number of failed login attempts
-	char *other;	// other information, e.g. sponsor
-	mpint *Hi;  	// H(passphrase)^-1 mod p
+	char *id;		/* user id */
+	ulong expire;	/* expiration time (epoch seconds) */
+	ushort status;	/* Enabled, STA, ... */
+	ushort failed;	/* number of failed login attempts */
+	char *other;	/* other information, e.g. sponsor */
+	mpint *Hi;  	/* H(passphrase)^-1 mod p */
 } PW;
 
 PW *getPW(char *, int);
 int putPW(PW *);
 void freePW(PW *);
 
-// *client: SConn, client name, passphrase
-// *server: SConn, (partial) 1st msg, PW entry
-// *setpass: Username, hashed passphrase, PW entry
+/* *client: SConn, client name, passphrase */
+/* *server: SConn, (partial) 1st msg, PW entry */
+/* *setpass: Username, hashed passphrase, PW entry */
 int PAKclient(SConn *, char *, char *, char **);
 int PAKserver(SConn *, char *, char *, PW **);
 char *PAK_Hi(char *, char *, mpint *, mpint *);
diff --git a/src/cmd/auth/secstore/secstored.c b/src/cmd/auth/secstore/secstored.c
index ecf59e2..9a3c4b6 100644
--- a/src/cmd/auth/secstore/secstored.c
+++ b/src/cmd/auth/secstore/secstored.c
@@ -8,7 +8,7 @@
 #include "secstore.h"
 
 char *SECSTORE_DIR;
-char* secureidcheck(char *, char *);   // from /sys/src/cmd/auth/
+char* secureidcheck(char *, char *);   /* from /sys/src/cmd/auth/ */
 extern char* dirls(char *path);
 
 int verbose;
@@ -247,7 +247,7 @@
 	pw = nil;
 	rv = -1;
 
-	// collect the first message
+	/* collect the first message */
 	if((conn = newSConn(fd)) == nil)
 		return -1;
 	if(readstr(conn, msg) < 0){
@@ -256,7 +256,7 @@
 		goto Out;
 	}
 
-	// authenticate
+	/* authenticate */
 	if(PAKserver(conn, S, msg, &pw) < 0){
 		if(pw != nil)
 			syslog(0, LOG, "secstore denied for %s", pw->id);
@@ -277,7 +277,7 @@
 	conn->write(conn, (uchar*)"OK", 2);
 	syslog(0, LOG, "AUTH %s", pw->id);
 
-	// perform operations as asked
+	/* perform operations as asked */
 	while((n = readstr(conn, msg)) > 0){
 		syslog(0, LOG, "[%s] %s", pw->id, msg);
 
@@ -346,7 +346,7 @@
 
 	S = sysname();
 	SECSTORE_DIR = unsharp("#9/secstore");
-//	setnetmtpt(net, sizeof(net), nil);
+/*	setnetmtpt(net, sizeof(net), nil); */
 	ARGBEGIN{
 	case 'R':
 		forceSTA = 1;
@@ -362,7 +362,7 @@
 		if(p == nil)
 			usage();
 		USED(p);
-	//	setnetmtpt(net, sizeof(net), p);
+	/*	setnetmtpt(net, sizeof(net), p); */
 		break;
 	case 'v':
 		verbose++;
@@ -395,7 +395,7 @@
 			close(lcfd);
 			break;
 		case 0:
-			// "/lib/ndb/common.radius does not exist" if db set before fork
+			/* "/lib/ndb/common.radius does not exist" if db set before fork */
 			db = ndbopen(dbpath=unsharp("#9/ndb/auth"));
 			if(db == 0)
 				syslog(0, LOG, "no ndb/auth");
@@ -405,7 +405,7 @@
 			db = ndbcat(db, db2);
 			if((dfd = accept(lcfd, ldir)) < 0)
 				exits("can't accept");
-			alarm(30*60*1000); 	// 30 min
+			alarm(30*60*1000); 	/* 30 min */
 			remote = remoteIP(ldir);
 			syslog(0, LOG, "secstore from %s", remote);
 			free(remote);
diff --git a/src/cmd/auth/secstore/secureidcheck.c b/src/cmd/auth/secstore/secureidcheck.c
index 95adb38..8ef6f6a 100644
--- a/src/cmd/auth/secstore/secureidcheck.c
+++ b/src/cmd/auth/secstore/secureidcheck.c
@@ -29,7 +29,7 @@
 typedef struct Attribute{
 	struct Attribute *next;
 	uchar type;
-	uchar len;	// number of bytes in value
+	uchar len;	/* number of bytes in value */
 	uchar val[256];
 } Attribute;
 
@@ -39,7 +39,7 @@
 	Attribute first;
 } Packet;
 
-// assumes pass is at most 16 chars
+/* assumes pass is at most 16 chars */
 void
 hide(Secret *shared, uchar *auth, Secret *pass, uchar *x)
 {
@@ -60,9 +60,9 @@
 	DigestState *M;
 	uchar x[16];
 
-	M = md5(buf, 4, nil, nil); // Code+ID+Length
-	M = md5(auth, 16, nil, M); // RequestAuth
-	M = md5(buf+20, m-20, nil, M); // Attributes
+	M = md5(buf, 4, nil, nil); /* Code+ID+Length */
+	M = md5(auth, 16, nil, M); /* RequestAuth */
+	M = md5(buf+20, m-20, nil, M); /* Attributes */
 	md5(shared->s, shared->len, x, M);
 	return memcmp(x, buf+4, 16);
 }
@@ -118,7 +118,7 @@
 	Attribute *a;
 	int m, n, fd, try;
 
-	// marshal request
+	/* marshal request */
 	e = buf + sizeof buf;
 	buf[0] = req->code;
 	buf[1] = req->ID;
@@ -136,7 +136,7 @@
 	buf[2] = n>>8;
 	buf[3] = n;
 
-	// send request, wait for reply
+	/* send request, wait for reply */
 	fd = dial(dest, 0, 0, 0);
 	if(fd < 0){
 		syslog(0, AUTHLOG, "%s: rpc can't get udp channel", dest);
@@ -156,9 +156,9 @@
 		alarm(0);
 		if(m < 0){
 			syslog(0, AUTHLOG, "%s rpc read err %d: %r", dest, m);
-			break; // failure
+			break; /* failure */
 		}
-		if(m == 0 || buf2[1] != buf[1]){  // need matching ID
+		if(m == 0 || buf2[1] != buf[1]){  /* need matching ID */
 			syslog(0, AUTHLOG, "%s unmatched reply %d", dest, m);
 			continue;
 		}
@@ -170,7 +170,7 @@
 	if(m <= 0)
 		return nil;
 
-	// unmarshal reply
+	/* unmarshal reply */
 	b = buf2;
 	e = buf2+m;
 	resp = (Packet*)malloc(sizeof(*resp));
@@ -192,18 +192,18 @@
 	while(1){
 		if(b >= e){
 			a->next = nil;
-			break;			// exit loop
+			break;			/* exit loop */
 		}
 		a->type = *b++;
 		a->len = (*b++) - 2;
-		if(b + a->len > e){ // corrupt packet
+		if(b + a->len > e){ /* corrupt packet */
 			a->next = nil;
 			freePacket(resp);
 			return nil;
 		}
 		memmove(a->val, b, a->len);
 		b += a->len;
-		if(b < e){  // any more attributes?
+		if(b < e){  /* any more attributes? */
 			a->next = (Attribute*)malloc(sizeof(*a));
 			if(a->next == nil){
 				free(req);
@@ -230,7 +230,7 @@
 	}
 	a->type = type;
 	a->len = n;
-	if(a->len > 253 )  // RFC2138, section 5
+	if(a->len > 253 )  /* RFC2138, section 5 */
 		a->len = 253;
 	memmove(a->val, s, a->len);
 	return 0;
@@ -435,7 +435,7 @@
 			syslog(0, AUTHLOG, "%s code=%d ruser=%s %s", dest, resp->code, ruser, replymsg(resp));
 			break;
 		}
-		break; // we have a proper reply, no need to ask again
+		break; /* we have a proper reply, no need to ask again */
 	}
 	ndbfree(t);
 	free(radiussecret);
diff --git a/src/cmd/auth/ssh-agent.c b/src/cmd/auth/ssh-agent.c
index 00e24af..eee9867 100644
--- a/src/cmd/auth/ssh-agent.c
+++ b/src/cmd/auth/ssh-agent.c
@@ -49,7 +49,7 @@
 	SSH2_AGENT_FAILURE = 30,
 	
 	SSH_COM_AGENT2_FAILURE = 102,
-	SSH_AGENT_OLD_SIGNATURE = 0x01,
+	SSH_AGENT_OLD_SIGNATURE = 0x01
 };
 
 typedef struct Aconn Aconn;
diff --git a/src/cmd/auxclog.c b/src/cmd/auxclog.c
index 83d27d4..fd14a41 100644
--- a/src/cmd/auxclog.c
+++ b/src/cmd/auxclog.c
@@ -56,7 +56,7 @@
 				fd = openlog(argv[2]);
 				fprint(fd, "%s: %s\n", t, p);
 			}
-		} else if(Blinelen(&in) == 0)	// true eof
+		} else if(Blinelen(&in) == 0)	/* true eof */
 			break;
 		else {
 			Bread(&in, buf, sizeof buf);
diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c
index 168d866..07f3596 100644
--- a/src/cmd/auxstats/Darwin.c
+++ b/src/cmd/auxstats/Darwin.c
@@ -88,7 +88,7 @@
 	if(host_page_size(stat_port, &sample.pgsize) != KERN_SUCCESS)
 		sample.pgsize = 4096;
 
-	// populate clock tick info for timestamps
+	/* populate clock tick info for timestamps */
 	mach_timebase_info(&info);
         sample.divisor = 1000.0 * (double)info.denom/info.numer;
 	sample.time = mach_absolute_time();
@@ -361,10 +361,10 @@
 		isys("vm.stats.vm.v_rforks")
 		+isys("vm.stats.vm.v_vforks"));
 
-//    Bprint(&bout, "hits %lud of %lud lookups (%d%% hit rate)\n",
-//               (asamp.vm_stat.hits),
-//               (asamp.vm_stat.lookups),
-//               (natural_t)(((double)asamp.vm_stat.hits*100)/ (double)asamp.vm_stat.lookups));
+/*    Bprint(&bout, "hits %lud of %lud lookups (%d%% hit rate)\n", */
+/*               (asamp.vm_stat.hits), */
+/*               (asamp.vm_stat.lookups), */
+/*               (natural_t)(((double)asamp.vm_stat.hits*100)/ (double)asamp.vm_stat.lookups)); */
 }
 
 void
diff --git a/src/cmd/auxstats/FreeBSD.c b/src/cmd/auxstats/FreeBSD.c
index 4e8e75b..19ae96b 100644
--- a/src/cmd/auxstats/FreeBSD.c
+++ b/src/cmd/auxstats/FreeBSD.c
@@ -47,7 +47,7 @@
 static struct nlist nl[] = {
 	{ "_ifnet" },
 	{ "_cp_time" },
-	{ "" },
+	{ "" }
 };
 
 void
diff --git a/src/cmd/auxstats/OpenBSD.c b/src/cmd/auxstats/OpenBSD.c
index 32a473f..ee84dea 100644
--- a/src/cmd/auxstats/OpenBSD.c
+++ b/src/cmd/auxstats/OpenBSD.c
@@ -41,7 +41,7 @@
 static struct nlist nl[] = {
 	{ "_ifnet" },
 	{ "_cp_time" },
-	{ "" },
+	{ "" }
 };
 
 void
@@ -220,4 +220,4 @@
 
 	Bprint(&bout, "fork %ud 1000\n", vm.forks);
 	Bprint(&bout, "swap =%lud %lud\n", vm.swpginuse*pgsize, vm.swpages*pgsize);
-}
\ No newline at end of file
+}
diff --git a/src/cmd/bzip2/lib/bzcompress.c b/src/cmd/bzip2/lib/bzcompress.c
index c9369e6..d27e675 100644
--- a/src/cmd/bzip2/lib/bzcompress.c
+++ b/src/cmd/bzip2/lib/bzcompress.c
@@ -423,7 +423,7 @@
          if (s->avail_in_expect != s->strm->avail_in) 
             return BZ_SEQUENCE_ERROR;
          progress = handle_compress ( strm );
-         if (!progress) return BZ_SEQUENCE_ERROR;	//rsc added
+         if (!progress) return BZ_SEQUENCE_ERROR;	/*rsc added */
          if (s->avail_in_expect > 0 || !isempty_RL(s) ||
              s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
          s->mode = BZ_M_RUNNING;
diff --git a/src/cmd/bzip2/lib/compress.c b/src/cmd/bzip2/lib/compress.c
index 0625122..96c5591 100644
--- a/src/cmd/bzip2/lib/compress.c
+++ b/src/cmd/bzip2/lib/compress.c
@@ -268,7 +268,7 @@
          if (zPend < 2) break;
          zPend = (zPend - 2) / 2;
       };
-//rsc: not used      zPend = 0;
+/*rsc: not used      zPend = 0; */
    }
 
    mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
diff --git a/src/cmd/db/fns.h b/src/cmd/db/fns.h
index 32bd94f..9ea30f8 100644
--- a/src/cmd/db/fns.h
+++ b/src/cmd/db/fns.h
@@ -69,9 +69,9 @@
 void		readfname(char *);
 void		reread(void);
 char*		regname(int);
-//vlong		rget(Map*, char*);
+/*vlong		rget(Map*, char*); */
 Regdesc*	rname(char*);
-//void		rput(Map*, char*, vlong);
+/*void		rput(Map*, char*, vlong); */
 int		runpcs(int, int);
 void		runrun(int);
 void		runstep(ulong, int);
diff --git a/src/cmd/db/setup.c b/src/cmd/db/setup.c
index 7fec643..eaeb61f 100644
--- a/src/cmd/db/setup.c
+++ b/src/cmd/db/setup.c
@@ -96,8 +96,8 @@
 		error("Invalid map name");
 
 	if (expr(0)) {
-	//	if (strcmp(name, "text") == 0)
-	//		textseg(expv, &fhdr);
+	/*	if (strcmp(name, "text") == 0) */
+	/*		textseg(expv, &fhdr); */
 		map->seg[i].base = expv;
 	} else
 		error("Invalid base address"); 
diff --git a/src/cmd/dc.c b/src/cmd/dc.c
index daff401..bdcfade 100644
--- a/src/cmd/dc.c
+++ b/src/cmd/dc.c
@@ -2149,7 +2149,7 @@
 		lbytes += nn - hptr->last;
 		if(n > longest)
 			longest = n;
-/*		free(hptr->beg); *//**/
+/*		free(hptr->beg); */
 		p = realloc(hptr->beg, n);
 		if(p == 0) {
 /*			hptr->beg = realloc(hptr->beg, hptr->last-hptr->beg);
@@ -2194,7 +2194,7 @@
 		longest = size;
 	lbytes += size/2;
 	lmore++;
-/*	free(hptr->beg);*//**/
+/*	free(hptr->beg);*/
 	p = realloc(hptr->beg, size);
 
 	if(p == 0) {
diff --git a/src/cmd/dict/dict.c b/src/cmd/dict/dict.c
index 0a2cf4f..9e196b1 100644
--- a/src/cmd/dict/dict.c
+++ b/src/cmd/dict/dict.c
@@ -52,7 +52,7 @@
 enum {
 	Plen=300,	/* max length of a search pattern */
 	Fieldlen=200,	/* max length of an index field */
-	Aslots=10,	/* initial number of slots in an address */
+	Aslots=10	/* initial number of slots in an address */
 };
 
 void
diff --git a/src/cmd/dict/dict.h b/src/cmd/dict/dict.h
index 9b843d8..bf7a80c 100644
--- a/src/cmd/dict/dict.h
+++ b/src/cmd/dict/dict.h
@@ -62,7 +62,7 @@
 	MWLN,		/* ʼω */
 	MOE,		/* oe */
 	MES,		/* em space */
-	MULTIE,		/* End of multi-rune codes */
+	MULTIE		/* End of multi-rune codes */
 };
 #define Nligs (LIGE-LIGS)
 #define Nmulti (MULTIE-MULTI)
diff --git a/src/cmd/dict/gb2312.c b/src/cmd/dict/gb2312.c
index d667aaf..162bbda 100644
--- a/src/cmd/dict/gb2312.c
+++ b/src/cmd/dict/gb2312.c
@@ -1104,5 +1104,5 @@
 0x9e82,0x9e87,0x9e88,0x9e8b,0x9e92,0x93d6,0x9e9d,0x9e9f,
 0x9edb,0x9edc,0x9edd,0x9ee0,0x9edf,0x9ee2,0x9ee9,0x9ee7,
 0x9ee5,0x9eea,0x9eef,0x9f22,0x9f2c,0x9f2f,0x9f39,0x9f37,
-0x9f3d,0x9f3e,0x9f44,
+0x9f3d,0x9f3e,0x9f44
 };
diff --git a/src/cmd/dict/jis208.c b/src/cmd/dict/jis208.c
index d2086e6..4fb835e 100644
--- a/src/cmd/dict/jis208.c
+++ b/src/cmd/dict/jis208.c
@@ -1055,5 +1055,5 @@
 0x9f2c,0x9f3e,0x9f4a,0x9f52,0x9f54,0x9f63,0x9f5f,0x9f60,
 0x9f61,0x9f66,0x9f67,0x9f6c,0x9f6a,0x9f77,0x9f72,0x9f76,
 0x9f95,0x9f9c,0x9fa0,  NONE,  NONE,  NONE,  NONE,  NONE,
-  NONE,0x582f,0x69c7,0x9059,0x7464,0x51dc,0x7199,
+  NONE,0x582f,0x69c7,0x9059,0x7464,0x51dc,0x7199
 };
diff --git a/src/cmd/dict/oed.c b/src/cmd/dict/oed.c
index d924a89..81efe82 100644
--- a/src/cmd/dict/oed.c
+++ b/src/cmd/dict/oed.c
@@ -5,7 +5,7 @@
 
 enum {
 	Buflen=1000,
-	Maxaux=5,
+	Maxaux=5
 };
 
 /* Possible tags */
@@ -185,7 +185,7 @@
 	{"xi",		Xi},
 	{"xid",		Xid},
 	{"xr",		Xr},
-	{"xs",		Xs},
+	{"xs",		Xs}
 };
 
 /* Possible tag auxilliary info */
@@ -800,7 +800,7 @@
 	{"zced",	0x7a},		/* +cedilla */
 	{"zeta",	0x3b6},
 	{"zh",		0x292},
-	{"zhacek",	0x17e},
+	{"zhacek",	0x17e}
 };
 /*
    The following special characters don't have close enough
@@ -816,7 +816,7 @@
 	bbc1		single chem bond below
 	bbc2		double chem bond below
 	bbl1		chem bond like /
-	bbl2		chem bond like //
+	bbl2		chem bond like // 
 	bbr1		chem bond like \
 	bbr2		chem bond \\
 	bcop1		copper symbol. Cf copper
@@ -907,7 +907,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune phtab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -926,7 +926,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune grtab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -945,7 +945,7 @@
 /*60*/	0x60,	0x3b1,	0x3b2,	0x3be,	0x3b4,	0x3b5,	0x3c6,	0x3b3,
 	0x3b7,	0x3b9,	0x3c2,	0x3ba,	0x3bb,	0x3bc,	0x3bd,	0x3bf,
 /*70*/	0x3c0,	0x3b8,	0x3c1,	0x3c3,	0x3c4,	0x3c5,	0x76,	0x3c9,
-	0x3c7,	0x3c8,	0x3b6,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x3c7,	0x3c8,	0x3b6,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune subtab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -964,7 +964,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune suptab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -983,7 +983,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 
 static int	tagstarts;
@@ -1233,7 +1233,7 @@
 	return (Boffset(bdict)-n);
 }
 
-static char *prkey =
+static char *prkey1 =
 "KEY TO THE PRONUNCIATION\n"
 "\n"
 "I. CONSONANTS\n"
@@ -1252,6 +1252,8 @@
 "ʃ  ...  shop (ʃɒp), dish (dɪʃ)\n"
 "tʃ ...  chop (tʃɒp), ditch (dɪtʃ)\n"
 "ʒ  ...  vision (ˈvɪʒən), déjeuner (deʒøne)\n"
+;
+static char *prkey2 = 
 "dʒ ...  judge (dʒʌdʒ)\n"
 "ŋ  ...  singing (ˈsɪŋɪŋ), think (θiŋk)\n"
 "ŋg ...  finger (ˈfiŋgə(r))\n"
@@ -1265,6 +1267,8 @@
 "c  ...  Afrikaans baardmannetjie (ˈbaːrtmanəci)\n"
 "ɥ  ...  Fr. cuisine (kɥizin)\n"
 "\n"
+;
+static char *prkey3 = 
 "II. VOWELS AND DIPTHONGS\n"
 "\n"
 "Short\n"
@@ -1283,6 +1287,8 @@
 "ɔ  ...  Fr. homme (ɔm)\n"
 "o  ...  Fr. eau (o)\n"
 "ø  ...  Fr. peu (pø)\n"
+;
+static char *prkey4 =
 "œ  ...  Fr. boeuf (bœf), coeur (kœr)\n"
 "u  ...  Fr. douce (dus)\n"
 "ʏ  ...  Ger. Müller (ˈmʏlər)\n"
@@ -1301,6 +1307,8 @@
 "øː ...  Ger. Goethe (gøːtə)\n"
 "yː ...  Ger. grün (gryːn)\n"
 "\n"
+;
+static char *prkey5 = 
 "Nasal\n"
 "ɛ˜, æ˜ as in Fr. fin (fɛ˜, fæ˜)\n"
 "ã  ...  Fr. franc (frã)\n"
@@ -1318,6 +1326,8 @@
 "ʊə ...  tour (tʊə(r))\n"
 "ɔə ...  boar (bɔə(r))\n"
 "\n"
+;
+static char *prkey6 = 
 "III. STRESS\n"
 "\n"
 "Main stress: ˈ preceding stressed syllable\n"
@@ -1329,7 +1339,8 @@
 void
 oedprintkey(void)
 {
-	Bprint(bout, "%s", prkey);
+	Bprint(bout, "%s%s%s%s%s%s",
+		prkey1, prkey2, prkey3, prkey4, prkey5, prkey6);
 }
 
 /*
diff --git a/src/cmd/dict/pcollins.c b/src/cmd/dict/pcollins.c
index 0abe649..e4d4497 100644
--- a/src/cmd/dict/pcollins.c
+++ b/src/cmd/dict/pcollins.c
@@ -8,7 +8,7 @@
  * format (with tags surrounded by >....<)
  */
 enum {
-	Buflen=1000,
+	Buflen=1000
 };
 
 /* More special runes */
@@ -19,7 +19,7 @@
 	Ps,		/* pronunciation start */
 	Pe,		/* pronunciation end */
 	R,		/* roman */
-	X,		/* headword end */
+	X		/* headword end */
 };
 
 /* Assoc tables must be sorted on first field */
@@ -53,7 +53,7 @@
 	{"um",		LUML},
 	{"{",		Ps},
 	{"~",		0x7e},
-	{"~~",		MTT},
+	{"~~",		MTT}
 };
 
 static Rune normtab[128] = {
@@ -73,7 +73,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 
 static char *gettag(char *, char *);
diff --git a/src/cmd/dict/pcollinsg.c b/src/cmd/dict/pcollinsg.c
index bca5c40..cbdff9e 100644
--- a/src/cmd/dict/pcollinsg.c
+++ b/src/cmd/dict/pcollinsg.c
@@ -33,7 +33,7 @@
 
 enum {
 	IBASE=0x69,	/* dotless i */
-	Taglen=32,
+	Taglen=32
 };
 
 static Rune intab[256] = {
@@ -69,7 +69,7 @@
 /*E0*/	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,
 	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,
 /*F0*/	0x20,	0x20,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,
-	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,
+	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE,	NONE
 };
 
 static Nassoc numtab[] = {
@@ -103,7 +103,7 @@
 	{0x3a,	LUML},
 	{'\\',	LGRV},
 	{0x5e,	LFRN},
-	{0x7e,	LTIL},
+	{0x7e,	LTIL}
 };
 
 static uchar *reach(uchar*, int);
diff --git a/src/cmd/dict/pgw.c b/src/cmd/dict/pgw.c
index e3cb937..8cdaec3 100644
--- a/src/cmd/dict/pgw.c
+++ b/src/cmd/dict/pgw.c
@@ -6,7 +6,7 @@
 
 enum {
 	Buflen=1000,
-	Maxaux=5,
+	Maxaux=5
 };
 
 /* Possible tags */
@@ -42,7 +42,7 @@
 	{"pos",		Pos},
 	{"sn",		Sn},
 	{"u",			U},
-	{"wf",		Wf},
+	{"wf",		Wf}
 };
 
 /* Possible tag auxilliary info */
@@ -659,7 +659,7 @@
 	{"zced",	0x7a},		/* +cedilla */
 	{"zeta",	0x3b6},
 	{"zh",		0x292},
-	{"zhacek",	0x17e},
+	{"zhacek",	0x17e}
 };
 /*
    The following special characters don't have close enough
@@ -766,7 +766,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 #if 0
 static Rune phtab[128] = {
@@ -786,7 +786,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune grtab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -805,7 +805,7 @@
 /*60*/	0x60,	0x3b1,	0x3b2,	0x3be,	0x3b4,	0x3b5,	0x3c6,	0x3b3,
 	0x3b7,	0x3b9,	0x3c2,	0x3ba,	0x3bb,	0x3bc,	0x3bd,	0x3bf,
 /*70*/	0x3c0,	0x3b8,	0x3c1,	0x3c3,	0x3c4,	0x3c5,	0x76,	0x3c9,
-	0x3c7,	0x3c8,	0x3b6,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x3c7,	0x3c8,	0x3b6,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune subtab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -824,7 +824,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 static Rune suptab[128] = {
 	/*0*/	/*1*/	/*2*/	/*3*/	/*4*/	/*5*/	/*6*/	/*7*/
@@ -843,7 +843,7 @@
 /*60*/	0x60,	0x61,	0x62,	0x63,	0x64,	0x65,	0x66,	0x67,
 	0x68,	0x69,	0x6a,	0x6b,	0x6c,	0x6d,	0x6e,	0x6f,
 /*70*/	0x70,	0x71,	0x72,	0x73,	0x74,	0x75,	0x76,	0x77,
-	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE,
+	0x78,	0x79,	0x7a,	0x7b,	0x7c,	0x7d,	0x7e,	NONE
 };
 #endif
 
@@ -1005,7 +1005,7 @@
 	return (Boffset(bdict)-n);
 }
 
-static char *prkey =
+static char *prkey1 =
 "KEY TO THE PRONUNCIATION\n"
 "\n"
 "I. CONSONANTS\n"
@@ -1024,6 +1024,8 @@
 "ʃ  ...  shop (ʃɒp), dish (dɪʃ)\n"
 "tʃ ...  chop (tʃɒp), ditch (dɪtʃ)\n"
 "ʒ  ...  vision (ˈvɪʒən), déjeuner (deʒøne)\n"
+;
+static char *prkey2 = 
 "dʒ ...  judge (dʒʌdʒ)\n"
 "ŋ  ...  singing (ˈsɪŋɪŋ), think (θiŋk)\n"
 "ŋg ...  finger (ˈfiŋgə(r))\n"
@@ -1037,6 +1039,8 @@
 "c  ...  Afrikaans baardmannetjie (ˈbaːrtmanəci)\n"
 "ɥ  ...  Fr. cuisine (kɥizin)\n"
 "\n"
+;
+static char *prkey3 = 
 "II. VOWELS AND DIPTHONGS\n"
 "\n"
 "Short\n"
@@ -1055,6 +1059,8 @@
 "ɔ  ...  Fr. homme (ɔm)\n"
 "o  ...  Fr. eau (o)\n"
 "ø  ...  Fr. peu (pø)\n"
+;
+static char *prkey4 =
 "œ  ...  Fr. boeuf (bœf), coeur (kœr)\n"
 "u  ...  Fr. douce (dus)\n"
 "ʏ  ...  Ger. Müller (ˈmʏlər)\n"
@@ -1073,6 +1079,8 @@
 "øː ...  Ger. Goethe (gøːtə)\n"
 "yː ...  Ger. grün (gryːn)\n"
 "\n"
+;
+static char *prkey5 = 
 "Nasal\n"
 "ɛ˜, æ˜ as in Fr. fin (fɛ˜, fæ˜)\n"
 "ã  ...  Fr. franc (frã)\n"
@@ -1090,6 +1098,8 @@
 "ʊə ...  tour (tʊə(r))\n"
 "ɔə ...  boar (bɔə(r))\n"
 "\n"
+;
+static char *prkey6 = 
 "III. STRESS\n"
 "\n"
 "Main stress: ˈ preceding stressed syllable\n"
@@ -1101,7 +1111,8 @@
 void
 pgwprintkey(void)
 {
-	Bprint(bout, "%s", prkey);
+	Bprint(bout, "%s%s%s%s%s%s",
+		prkey1, prkey2, prkey3, prkey4, prkey5, prkey6);
 }
 
 /*
diff --git a/src/cmd/dict/robert.c b/src/cmd/dict/robert.c
index eee4002..877c3b1 100644
--- a/src/cmd/dict/robert.c
+++ b/src/cmd/dict/robert.c
@@ -55,7 +55,7 @@
 /*e0*/	0x3b1,	0xdf,	0x3b3,	0x3c0,	0x3a3,	0x3c3,	0xb5,	0x3c4,
 	0x3a6,	0x398,	0x3a9,	0x3b4,	0x221e,	0xd8,	0x3b5,	0x2229,
 /*f0*/	0x2261,	0xb1,	0x2265,	0x2264,	0x2320,	0x2321,	0xf7,	0x2248,
-	0xb0,	0x2219,	0xb7,	0x221a,	0x207f,	0xb2,	0x220e,	0xa0,
+	0xb0,	0x2219,	0xb7,	0x221a,	0x207f,	0xb2,	0x220e,	0xa0
 };
 
 static Rune suptab[256];
diff --git a/src/cmd/dict/slang.c b/src/cmd/dict/slang.c
index bd32b97..400019b 100644
--- a/src/cmd/dict/slang.c
+++ b/src/cmd/dict/slang.c
@@ -15,7 +15,7 @@
 	PR,		/* pronunciation */
 	PS,		/* grammar part */
 	XR,		/* cross reference */
-	XX,		/* cross reference (whole entry) */
+	XX		/* cross reference (whole entry) */
 };
 
 /* Assoc tables must be sorted on first field */
@@ -31,7 +31,7 @@
 	{"pr",	PR},
 	{"ps",	PS},
 	{"xr",	XR},
-	{"xx",	XX},
+	{"xx",	XX}
 };
 static long	sget(char *, char *, char **, char **);
 static void	soutpiece(char *, char *);
diff --git a/src/cmd/dict/utils.c b/src/cmd/dict/utils.c
index ef03f66..d7033d3 100644
--- a/src/cmd/dict/utils.c
+++ b/src/cmd/dict/utils.c
@@ -228,7 +228,7 @@
 	{0x2bd, 0x3c9, 0},
 	{0x2bc, 0x3c9, 0},
 	{0x6f, 0x65, 0},
-	{0x20, 0x20, 0},
+	{0x20, 0x20, 0}
 };
 
 #define	risupper(r)	(0x41 <= (r) && (r) <= 0x5a)
@@ -256,7 +256,7 @@
 	'a', 'a', 'a', 'a', 'a', 'a', 'a', 'c',
 	'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
 	'd', 'n', 'o', 'o', 'o', 'o', 'o',  0 ,
-	'o', 'u', 'u', 'u', 'u', 'y',  0 , 'y',
+	'o', 'u', 'u', 'u', 'u', 'y',  0 , 'y'
 };
 
 static Rune 	*ttabstack[20];
diff --git a/src/cmd/dict/world.c b/src/cmd/dict/world.c
index 7ee79a4..6ead3ed 100644
--- a/src/cmd/dict/world.c
+++ b/src/cmd/dict/world.c
@@ -56,10 +56,10 @@
 /*e0*/	0x3b1,	0x3b2,	0x3b3,	0x3c0,	0x3a3,	0x3c3,	0xb5,	0x3c4,
 	0x3a6,	0x398,	0x3a9,	0x3b4,	0x221e,	0xd8,	0x3b5,	0x2229,
 /*f0*/	0x2261,	0xb1,	0x2265,	0x2264,	0x2320,	0x2321,	0xf7,	0x2248,
-	0xb0,	0x2219,	0xb7,	NONE,	NONE,	NONE,	NONE,	NONE,
+	0xb0,	0x2219,	0xb7,	NONE,	NONE,	NONE,	NONE,	NONE
 };
 
-enum{ Utf, Kanahi, Kanalo=Kanahi+1, GBhi, GBlo=GBhi+1, };
+enum{ Utf, Kanahi, Kanalo=Kanahi+1, GBhi, GBlo=GBhi+1 };
 
 void
 worldprintentry(Entry e, int cmd)
diff --git a/src/cmd/diff/diffio.c b/src/cmd/diff/diffio.c
index f522ec7..93de4e3 100644
--- a/src/cmd/diff/diffio.c
+++ b/src/cmd/diff/diffio.c
@@ -325,7 +325,7 @@
 
 enum
 {
-	Lines = 3,	/* number of lines of context shown */
+	Lines = 3		/* number of lines of context shown */
 };
 
 int
diff --git a/src/cmd/diff/diffreg.c b/src/cmd/diff/diffreg.c
index 9a29cf6..bb3fd11 100644
--- a/src/cmd/diff/diffreg.c
+++ b/src/cmd/diff/diffreg.c
@@ -379,7 +379,7 @@
 		return;
 	}
 	if (binary){
-		// could use b0 and b1 but this is simpler.
+		/* could use b0 and b1 but this is simpler. */
 		if (cmp(b0, b1))
 			print("binary files %s %s differ\n", f, t);
 		Bterm(b0);
diff --git a/src/cmd/draw/crop.c b/src/cmd/draw/crop.c
index e397a31..e0710d6 100644
--- a/src/cmd/draw/crop.c
+++ b/src/cmd/draw/crop.c
@@ -9,7 +9,7 @@
 	Inset,	/* move border in or out uniformly */
 	Insetxy,	/* move border in or out; different parameters for x and y */
 	Set,		/* set rectangle to absolute values */
-	Blank,	/* cut off blank region according to color value */
+	Blank	/* cut off blank region according to color value */
 			/* Blank is not actually set as a mode; it can be combined with others */
 };
 
diff --git a/src/cmd/draw/gview.c b/src/cmd/draw/gview.c
index d935910..68b6ad4 100644
--- a/src/cmd/draw/gview.c
+++ b/src/cmd/draw/gview.c
@@ -13,7 +13,7 @@
 enum {
 	But1	= Button_bit(1),/* mouse buttons for events */
 	But2	= Button_bit(2),
-	But3	= Button_bit(3),
+	But3	= Button_bit(3)
 };
 int cantmv = 1;			/* disallow rotate and move? 0..1 */
 int top_border, bot_border, lft_border, rt_border;
@@ -911,7 +911,7 @@
 #define Len_thous  30			/* bound on strlen(thous_nam[i]) */
 char* thous_nam[Nthous] = {
 	"one", "thousand", "million", "billion",
-	"trillion", "quadrillion", "quintillion",
+	"trillion", "quadrillion", "quintillion"
 };
 
 
@@ -1966,6 +1966,8 @@
 "Read a polygonal line graph in an ASCII format (one x y pair per line, delimited\n"
 "by spaces with a label after each polyline), and view it interactively.  Use\n"
 "standard input if no infile is specified.\n"
+	);
+	fprintf(stderr,
 "Option -l specifies a file in which to log the coordinates of each point selected.\n"
 "(Clicking a point with button one selects it and displays its coordinates and\n"
 "the label of its polylone.)  Option -m allows polylines to be moved and rotated.\n"
diff --git a/src/cmd/draw/stats.c b/src/cmd/draw/stats.c
index a04a1c5..75069e2 100644
--- a/src/cmd/draw/stats.c
+++ b/src/cmd/draw/stats.c
@@ -23,7 +23,7 @@
 	Lx		= 4,	/* label tick length */
 
 	STACK	= 8192,
-	XSTACK	= 32768,
+	XSTACK	= 32768
 };
 
 enum
@@ -45,7 +45,7 @@
 	Vsys,
 	Vsyscall,
 	Vuser,
-	Nvalue,
+	Nvalue
 };
 
 char*
@@ -67,7 +67,7 @@
 	"swap",
 	"sys",
 	"syscall",
-	"user",
+	"user"
 };	
 
 struct Graph
@@ -527,7 +527,7 @@
 	for(x=startx, i=0; i<nmach; i++,x+=dx){
 		draw(screen, Rect(x-1, starty-1, x, screen->r.max.y), display->black, nil, ZP);
 		j = dx/stringwidth(mediumfont, "0");
-	//	n = mach[i].nproc;
+	/*	n = mach[i].nproc; */
 		n = 1;
 		if(n>1 && j>=1+3+(n>10)+(n>100)){	/* first char of name + (n) */
 			j -= 3+(n>10)+(n>100);
diff --git a/src/cmd/draw/tcolors.c b/src/cmd/draw/tcolors.c
index 8ce9002..150dbeb 100644
--- a/src/cmd/draw/tcolors.c
+++ b/src/cmd/draw/tcolors.c
@@ -7,7 +7,7 @@
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 int nbit, npix;
diff --git a/src/cmd/draw/tweak.c b/src/cmd/draw/tweak.c
index 6f20a4f..1ee5d14 100644
--- a/src/cmd/draw/tweak.c
+++ b/src/cmd/draw/tweak.c
@@ -30,7 +30,7 @@
 	Up		= 1,
 	Down	= 0,
 	Mag		= 4,
-	Maxmag	= 10,
+	Maxmag	= 10
 };
 
 enum
@@ -49,12 +49,12 @@
 	Mchar,
 	Mpixels,
 	Mclose,
-	Mexit,
+	Mexit
 };
 
 enum
 {
-	Blue	= 54,
+	Blue	= 54
 };
 
 char	*menu3str[] = {
@@ -66,7 +66,7 @@
 	"pixels",
 	"close",
 	"exit",
-	0,
+	0
 };
 
 Menu	menu3 = {
diff --git a/src/cmd/ed.c b/src/cmd/ed.c
index 60ba83c..f8ae9f0 100644
--- a/src/cmd/ed.c
+++ b/src/cmd/ed.c
@@ -18,7 +18,7 @@
 	GBSIZE	= 256,		/* max size of global command */
 	MAXSUB	= 9,		/* max number of sub reg exp */
 	ESCFLG	= 0xFFFF,	/* escape Rune - user defined code */
-	EOF	= -1,
+	EOF	= -1
 };
 
 void	(*oldhup)(int);
diff --git a/src/cmd/faces/facedb.c b/src/cmd/faces/facedb.c
index 3fa133a..a24a391 100644
--- a/src/cmd/faces/facedb.c
+++ b/src/cmd/faces/facedb.c
@@ -9,7 +9,7 @@
 
 enum	/* number of deleted faces to cache */
 {
-	Nsave	= 20,
+	Nsave	= 20
 };
 
 static Facefile	*facefiles;
diff --git a/src/cmd/faces/faces.h b/src/cmd/faces/faces.h
index 0a4661c..f6348f9 100644
--- a/src/cmd/faces/faces.h
+++ b/src/cmd/faces/faces.h
@@ -9,7 +9,7 @@
 
 enum
 {
-	Facesize = 48,
+	Facesize = 48
 };
 
 typedef struct Face		Face;
diff --git a/src/cmd/faces/main.c b/src/cmd/faces/main.c
index 18eb70b..bb36ed7 100644
--- a/src/cmd/faces/main.c
+++ b/src/cmd/faces/main.c
@@ -36,7 +36,7 @@
 	"main",
 	"time",
 	"mouse",
-	"resize",
+	"resize"
 };
 
 Rectangle leftright = {0, 0, 20, 15};
diff --git a/src/cmd/file.c b/src/cmd/file.c
index 4dbf66b..f325871 100644
--- a/src/cmd/file.c
+++ b/src/cmd/file.c
@@ -541,7 +541,7 @@
 int
 long0(void)
 {
-//	Fhdr *f;
+/*	Fhdr *f; */
 	long x;
 
 	seek(fd, 0, 0);		/* reposition to start of file */
diff --git a/src/cmd/freq.c b/src/cmd/freq.c
index dfc1e8c..19b3fa9 100644
--- a/src/cmd/freq.c
+++ b/src/cmd/freq.c
@@ -13,7 +13,7 @@
 	Fhex	= 1<<1,
 	Foct	= 1<<2,
 	Fchar	= 1<<3,
-	Frune	= 1<<4,
+	Frune	= 1<<4
 };
 
 void
diff --git a/src/cmd/grap/grap.y b/src/cmd/grap/grap.y
index 6d96b2f..cb75a72 100644
--- a/src/cmd/grap/grap.y
+++ b/src/cmd/grap/grap.y
@@ -5,7 +5,7 @@
 #include <string.h>
 #include "grap.h"
 
-//#define	RAND_MAX 32767	/* if your rand() returns bigger, change this too */
+/*#define	RAND_MAX 32767	/* if your rand() returns bigger, change this too */
 
 extern int yylex(void);
 extern int yyparse(void);
diff --git a/src/cmd/grap/main.c b/src/cmd/grap/main.c
index 07f4eca..db2098f 100644
--- a/src/cmd/grap/main.c
+++ b/src/cmd/grap/main.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE 1	/* strdup, mkstemp */
 #include <stdio.h>
 #include <signal.h>
 #include <math.h>
diff --git a/src/cmd/grep/comp.c b/src/cmd/grep/comp.c
index 030e7e3..c3e1549 100644
--- a/src/cmd/grep/comp.c
+++ b/src/cmd/grep/comp.c
@@ -128,12 +128,12 @@
 Rune	tab1[] =
 {
 	0x007f,
-	0x07ff,
+	0x07ff
 };
 Rune	tab2[] =
 {
 	0x003f,
-	0x0fff,
+	0x0fff
 };
 
 Re2
@@ -144,7 +144,7 @@
 	Re2 x;
 
 	if(p0 > p1)
-		return re2char(0xff, 0xff);	// no match
+		return re2char(0xff, 0xff);	/* no match */
 
 	/*
 	 * bust range into same length
diff --git a/src/cmd/grep/main.c b/src/cmd/grep/main.c
index e32f89a..f5ab7ff 100644
--- a/src/cmd/grep/main.c
+++ b/src/cmd/grep/main.c
@@ -170,11 +170,11 @@
 		increment(s, c);
 		goto loop;
 	}
-//	if(flags['2'])
-//		if(s->match)
-//			print("%d: %.2x**\n", s, c);
-//		else
-//			print("%d: %.2x\n", s, c);
+/*	if(flags['2']) */
+/*		if(s->match) */
+/*			print("%d: %.2x**\n", s, c); */
+/*		else */
+/*			print("%d: %.2x\n", s, c); */
 	lp++;
 	s = ns;
 	if(c == '\n') {
diff --git a/src/cmd/grep/sub.c b/src/cmd/grep/sub.c
index f504b6d..5ea07c0 100644
--- a/src/cmd/grep/sub.c
+++ b/src/cmd/grep/sub.c
@@ -30,7 +30,7 @@
 	State *s;
 
 	s = mal(sizeof(*s));
-//	s->next = mal(256*sizeof(*s->next));
+/*	s->next = mal(256*sizeof(*s->next)); */
 	s->count = n;
 	s->re = mal(n*sizeof(*state0->re));
 	return s;
diff --git a/src/cmd/gzip/gzip.h b/src/cmd/gzip/gzip.h
index 1713a26..146de48 100644
--- a/src/cmd/gzip/gzip.h
+++ b/src/cmd/gzip/gzip.h
@@ -37,5 +37,5 @@
 #define GZCRCPOLY 0xedb88320
 /* 	GZCRCPOLY	= 0xedb88320UL, */
 
-	GZOSINFERNO	= GZOSUNIX,
+	GZOSINFERNO	= GZOSUNIX
 };
diff --git a/src/cmd/gzip/zip.c b/src/cmd/gzip/zip.c
index 63903ec..bd87d2e 100644
--- a/src/cmd/gzip/zip.c
+++ b/src/cmd/gzip/zip.c
@@ -6,7 +6,7 @@
 
 enum
 {
-	HeadAlloc	= 64,
+	HeadAlloc	= 64
 };
 
 static	void	zip(Biobuf *bout, char *file, int stdout);
diff --git a/src/cmd/gzip/zip.h b/src/cmd/gzip/zip.h
index d005469..3444980 100644
--- a/src/cmd/gzip/zip.h
+++ b/src/cmd/gzip/zip.h
@@ -58,7 +58,7 @@
 	ZHeadCrc	= 4 + 2 + 2 + 2 + 2 + 2,
 	ZTrailSize	= 4 + 4 + 4,
 	ZCHeadSize	= 4 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 4 + 2 + 2 + 2 + 2 + 2 + 4 + 4,
-	ZECHeadSize	= 4 + 2 + 2 + 2 + 2 + 4 + 4 + 2,
+	ZECHeadSize	= 4 + 2 + 2 + 2 + 2 + 4 + 4 + 2
 };
 
 /*
diff --git a/src/cmd/hget.c b/src/cmd/hget.c
index 66fb60d..d78bb52 100644
--- a/src/cmd/hget.c
+++ b/src/cmd/hget.c
@@ -51,7 +51,7 @@
 	Eof = 0,
 	Error = -1,
 	Server = -2,
-	Changed = -3,
+	Changed = -3
 };
 
 int debug;
@@ -106,7 +106,7 @@
 	ulong mtime;
 	Dir *d;
 	char postbody[4096], *p, *e, *t, *hpx;
-	URL px; // Proxy
+	URL px; /* Proxy */
 	Out out;
 
 	ofile = nil;
@@ -835,7 +835,7 @@
 	PermFail=	5,
 
 	Nnetdir=	64,	/* max length of network directory paths */
-	Ndialstr=	64,		/* max length of dial strings */
+	Ndialstr=	64		/* max length of dial strings */
 };
 
 int ftpcmd(int, char*, ...);
diff --git a/src/cmd/hoc/init.c b/src/cmd/hoc/init.c
index e074532..2727067 100644
--- a/src/cmd/hoc/init.c
+++ b/src/cmd/hoc/init.c
@@ -16,7 +16,7 @@
 	"for",		FOR,
 	"print",	PRINT,
 	"read",		READ,
-	0,		0,
+	0,		0
 };
 
 static struct {		/* Constants */
diff --git a/src/cmd/htmlfmt/dat.h b/src/cmd/htmlfmt/dat.h
index 53db700..eb9d6fa 100644
--- a/src/cmd/htmlfmt/dat.h
+++ b/src/cmd/htmlfmt/dat.h
@@ -4,7 +4,7 @@
 enum
 {
 	STACK		= 8192,
-	EVENTSIZE	= 256,
+	EVENTSIZE	= 256
 };
 
 struct Bytes
diff --git a/src/cmd/htmlfmt/html.c b/src/cmd/htmlfmt/html.c
index 7589e3e..9fb0081 100644
--- a/src/cmd/htmlfmt/html.c
+++ b/src/cmd/htmlfmt/html.c
@@ -314,7 +314,7 @@
 
 	rurl = toStr((uchar*)u->url, strlen(u->url), ISO_8859_1);
 	u->items = parsehtml(b->b, b->n, rurl, u->type, charset((char*)b->b), &u->docinfo);
-//	free(rurl);
+/*	free(rurl); */
 
 	rerender(u);
 }
diff --git a/src/cmd/htmlroff/a.h b/src/cmd/htmlroff/a.h
index c17da85..173fdc9 100644
--- a/src/cmd/htmlroff/a.h
+++ b/src/cmd/htmlroff/a.h
@@ -30,7 +30,7 @@
 	ArgMode = 1<<3,
 	HtmlMode = 1<<4,
 	
-	MaxLine = 1024,
+	MaxLine = 1024
 };
 
 Rune*	L(char*);
diff --git a/src/cmd/htmlroff/char.c b/src/cmd/htmlroff/char.c
index 1c7d123..e679751 100644
--- a/src/cmd/htmlroff/char.c
+++ b/src/cmd/htmlroff/char.c
@@ -70,7 +70,7 @@
 	"em",	0x2014,
 	"en",	0x2013,
 	"mi",	Umi,
-	"fm",	0x2032,
+	"fm",	0x2032
 };
 
 Rune
diff --git a/src/cmd/htmlroff/roff.c b/src/cmd/htmlroff/roff.c
index 6a7cd09..bdc51a3 100644
--- a/src/cmd/htmlroff/roff.c
+++ b/src/cmd/htmlroff/roff.c
@@ -7,7 +7,7 @@
 	MAXESC = 60,
 	MAXLINE = 1024,
 	MAXIF = 20,
-	MAXARG = 10,
+	MAXARG = 10
 };
 
 typedef struct Esc Esc;
diff --git a/src/cmd/htmlroff/t17.c b/src/cmd/htmlroff/t17.c
index 2800ec7..bbd095d 100644
--- a/src/cmd/htmlroff/t17.c
+++ b/src/cmd/htmlroff/t17.c
@@ -47,7 +47,7 @@
 	12,
 	0,
 	0,
-	0,
+	0
 };
 
 Env env[3];
diff --git a/src/cmd/htmlroff/t4.c b/src/cmd/htmlroff/t4.c
index eadc76e..157169d 100644
--- a/src/cmd/htmlroff/t4.c
+++ b/src/cmd/htmlroff/t4.c
@@ -49,7 +49,7 @@
 	USED(argc);
 	USED(argv);
 	nr(L(".fi"), 1);
-// warn(".fi");
+/* warn(".fi"); */
 }
 
 /* no-fill mode */
diff --git a/src/cmd/htmlroff/t7.c b/src/cmd/htmlroff/t7.c
index 19b77ec..9936a44 100644
--- a/src/cmd/htmlroff/t7.c
+++ b/src/cmd/htmlroff/t7.c
@@ -375,7 +375,7 @@
 	if(argc == 1){
 		/* end diversion */
 		if(ndi <= 0){
-			// warn("unmatched %C%S", dot, argv[0]);
+			/* warn("unmatched %C%S", dot, argv[0]); */
 			return;
 		}
 		flushdi();
diff --git a/src/cmd/import.c b/src/cmd/import.c
index 428cf90..88ee7c1 100644
--- a/src/cmd/import.c
+++ b/src/cmd/import.c
@@ -26,7 +26,7 @@
 
 enum
 {
-	Stack= 32*1024,
+	Stack= 32*1024
 };
 
 void
@@ -68,13 +68,13 @@
 	case 'f':
 		dofork = 0;
 		break;
-	case 'n':	// name of remote namespace
+	case 'n':	/* name of remote namespace */
 		ns = EARGF(usage());
 		break;
 	case 'p':
 		prog = EARGF(usage());
 		break;
-	case 's':	// name of service
+	case 's':	/* name of service */
 		srv = EARGF(usage());
 		break;
 	case 'R':
@@ -94,7 +94,7 @@
 		fmtinstall('F', fcallfmt);
 	}
 
-	// is this the remote side?
+	/* is this the remote side? */
 	if(rem){
 		if(srv == nil)
 			fatal("-R requires -s");
@@ -118,11 +118,11 @@
 {
 	USED(arg);
 
-	// start a loal service and connect to remote service
+	/* start a loal service and connect to remote service */
 	srvfd = post(srv);
 	netfd = call(addr, ns, srv);
 
-	// threads to shuffle messages each way
+	/* threads to shuffle messages each way */
 	srv_to_net[0] = srvfd;
 	srv_to_net[1] = netfd;
 	proccreate(shuffle, srv_to_net, Stack);
@@ -196,8 +196,8 @@
 	}
 	close(p[1]);
 
-	// ignore crap that might come out of the .profile
-	// keep reading till we have an "OK"
+	/* ignore crap that might come out of the .profile */
+	/* keep reading till we have an "OK" */
 	if(read(p[0], &buf[0], 1) != 1)
 		fatal("EOF");
 	for(;;){
@@ -242,7 +242,7 @@
 				t = emalloc(sizeof(Fcall));
 			if(tbuf == nil)
 				tbuf = emalloc(BLEN+1);
-			memmove(tbuf, buf, n);	// because convM2S is destructive
+			memmove(tbuf, buf, n);	/* because convM2S is destructive */
 			if(convM2S((uchar*)tbuf, n, t) != n)
 				fprint(dfd, "%d->%d convert error in convM2S", fd[0], fd[1]);
 			else
diff --git a/src/cmd/ip/dhcp.h b/src/cmd/ip/dhcp.h
index 8b51795..0ca5084 100755
--- a/src/cmd/ip/dhcp.h
+++ b/src/cmd/ip/dhcp.h
@@ -126,7 +126,7 @@
 	Srequesting,
 	Sbound,
 	Srenewing,
-	Srebinding,
+	Srebinding
 };	
 
 typedef struct Bootp	Bootp;
diff --git a/src/cmd/ip/dhcpd/dat.h b/src/cmd/ip/dhcpd/dat.h
index 28604c1..aa64dee 100755
--- a/src/cmd/ip/dhcpd/dat.h
+++ b/src/cmd/ip/dhcpd/dat.h
@@ -2,7 +2,7 @@
 
 enum
 {
-	Maxstr=	256,
+	Maxstr=	256
 };
 
 typedef struct Binding Binding;
diff --git a/src/cmd/ip/dhcpd/dhcpd.c b/src/cmd/ip/dhcpd/dhcpd.c
index 3b0873c..ae4bd22 100755
--- a/src/cmd/ip/dhcpd/dhcpd.c
+++ b/src/cmd/ip/dhcpd/dhcpd.c
@@ -12,9 +12,9 @@
 int bwfd;
 int wfd;
 
-//
-//	ala rfc2131
-//
+/* */
+/*	ala rfc2131 */
+/* */
 
 typedef struct Req Req;
 struct Req
@@ -63,7 +63,7 @@
 char	net[256];
 uchar xmyipaddr[IPaddrlen];
 
-int	pptponly;	// only answer request that came from the pptp server
+int	pptponly;	/* only answer request that came from the pptp server */
 int	mute;
 int	minlease = MinLease;
 
@@ -160,7 +160,7 @@
 [ODvendorclass]		"vendorclass",
 [ODclientid]		"cid",
 [ODtftpserver]		"tftpserver",
-[ODbootfile]		"bf",
+[ODbootfile]		"bf"
 };
 
 void	addropt(Req*, int, uchar*);
@@ -1131,8 +1131,8 @@
 		addropt(rp, OBrouter, rp->giaddr);
 	}
 
-	// OBhostname for the HP4000M switches
-	// (this causes NT to log infinite errors - tough shit )
+	/* OBhostname for the HP4000M switches */
+	/* (this causes NT to log infinite errors - tough shit ) */
 	if(*rp->ii.domain){
 		remrequested(rp, OBhostname);
 		stringopt(rp, OBhostname, rp->ii.domain);
@@ -1236,10 +1236,10 @@
 			break;
 		}
 
-	// add plan9 specific options
+	/* add plan9 specific options */
 	if(strncmp((char*)rp->vendorclass, "plan9_", 6) == 0
 	|| strncmp((char*)rp->vendorclass, "p9-", 3) == 0){
-		// point to temporary area
+		/* point to temporary area */
 		op = rp->p;
 		omax = rp->max;
 		rp->p = vopts;
@@ -1250,7 +1250,7 @@
 		j = lookupserver("auth", addrs, t);
 		addrsopt(rp, OP9auth, addrs, j);
 
-		// point back
+		/* point back */
 		j = rp->p - vopts;
 		rp->p = op;
 		rp->max = omax;
@@ -1544,7 +1544,7 @@
 	[Ack]		"Ack",
 	[Nak]		"Nak",
 	[Release]	"Release",
-	[Inform]	"Inform",
+	[Inform]	"Inform"
 };
 
 void
diff --git a/src/cmd/ip/dhcpd/ping.c b/src/cmd/ip/dhcpd/ping.c
index 7fa7a42..666bcc4 100755
--- a/src/cmd/ip/dhcpd/ping.c
+++ b/src/cmd/ip/dhcpd/ping.c
@@ -37,7 +37,7 @@
 	InfoReply	= 16,
 
 	ICMP_IPSIZE	= 20,
-	ICMP_HDRSIZE	= 8,
+	ICMP_HDRSIZE	= 8
 };
 
 static void
diff --git a/src/cmd/ip/snoopy/arp.c b/src/cmd/ip/snoopy/arp.c
index 061a6d9..d317c1b 100755
--- a/src/cmd/ip/snoopy/arp.c
+++ b/src/cmd/ip/snoopy/arp.c
@@ -20,7 +20,7 @@
 
 enum
 {
-	ARPLEN=	28,
+	ARPLEN=	28
 };
 
 enum
@@ -31,7 +31,7 @@
 	Osha,
 	Otha,
 	Ostha,
-	Opa,
+	Opa
 };
 
 static Field p_fields[] = 
@@ -114,7 +114,7 @@
 	nil,
 	nil,
 	p_fields,
-	defaultframer,
+	defaultframer
 };
 
 Proto rarp =
@@ -126,5 +126,5 @@
 	nil,
 	nil,
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/bootp.c b/src/cmd/ip/snoopy/bootp.c
index 31b2b0e..e7ead86 100755
--- a/src/cmd/ip/snoopy/bootp.c
+++ b/src/cmd/ip/snoopy/bootp.c
@@ -24,7 +24,7 @@
 	Bootreply= 	2,
 
 	/* bootp flags */
-	Fbroadcast=	1<<15,
+	Fbroadcast=	1<<15
 };
 
 typedef struct Hdr	Hdr;
@@ -52,7 +52,7 @@
 {
 	Oca,
 	Osa,
-	Ot,
+	Ot
 };
 
 static Field p_fields[] = 
@@ -173,5 +173,5 @@
 	p_mux,
 	"%#.8lux",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/dhcp.c b/src/cmd/ip/snoopy/dhcp.c
index 2d041f8..cd976ec 100755
--- a/src/cmd/ip/snoopy/dhcp.c
+++ b/src/cmd/ip/snoopy/dhcp.c
@@ -99,8 +99,8 @@
 	ODbootfile=		67,
 
 	/* plan9 vendor info options */
-	OP9fs=			128,	// plan9 file servers
-	OP9auth=		129,	// plan9 auth servers
+	OP9fs=			128,	/* plan9 file servers */
+	OP9auth=		129,	/* plan9 auth servers */
 };
 
 static void
@@ -188,7 +188,7 @@
 [Ack]		"Ack",
 [Nak]		"Nak",
 [Release]	"Release",
-[Inform]	"Inform",
+[Inform]	"Inform"
 };
 
 
@@ -471,6 +471,6 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
diff --git a/src/cmd/ip/snoopy/dump.c b/src/cmd/ip/snoopy/dump.c
index 227ac64..ec2a3ce 100755
--- a/src/cmd/ip/snoopy/dump.c
+++ b/src/cmd/ip/snoopy/dump.c
@@ -75,5 +75,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/ether.c b/src/cmd/ip/snoopy/ether.c
index 7e1f0a7..9e16579 100755
--- a/src/cmd/ip/snoopy/ether.c
+++ b/src/cmd/ip/snoopy/ether.c
@@ -29,10 +29,10 @@
 
 enum
 {
-	Os,	// source
-	Od,	// destination
-	Oa,	// source or destination
-	Ot,	// type
+	Os,	/* source */
+	Od,	/* destination */
+	Oa,	/* source or destination */
+	Ot,	/* type */
 };
 
 static Field p_fields[] = 
diff --git a/src/cmd/ip/snoopy/gre.c b/src/cmd/ip/snoopy/gre.c
index 908d155..6808293 100755
--- a/src/cmd/ip/snoopy/gre.c
+++ b/src/cmd/ip/snoopy/gre.c
@@ -8,7 +8,7 @@
 	GRE_srcrt	= (1<<11),
 	GRE_recur	= (7<<8),
 	GRE_ack		= (1<<7),
-	GRE_ver		= 0x7,
+	GRE_ver		= 0x7
 };
 
 /* GRE protocols */
@@ -25,7 +25,7 @@
 	GRE_vinesecho	= 0x0bae,
 	GRE_vinesloop	= 0x0baf,
 	GRE_decnetIV	= 0x6003,
-	GRE_ppp		= 0x880b,
+	GRE_ppp		= 0x880b
 };
 
 int
diff --git a/src/cmd/ip/snoopy/hdlc.c b/src/cmd/ip/snoopy/hdlc.c
index fdf2aaa..e7bf373 100755
--- a/src/cmd/ip/snoopy/hdlc.c
+++ b/src/cmd/ip/snoopy/hdlc.c
@@ -12,7 +12,7 @@
 	PPP_addr=	0xff,
 	PPP_ctl=	0x3,
 	PPP_initfcs=	0xffff,
-	PPP_goodfcs=	0xf0b8,
+	PPP_goodfcs=	0xf0b8
 };
 
 /*
@@ -171,5 +171,5 @@
 	p_mux,
 	"%#.4lux",
 	nil,
-	p_framer,
+	p_framer
 };
diff --git a/src/cmd/ip/snoopy/icmp.c b/src/cmd/ip/snoopy/icmp.c
index 274c955..bf09f8d 100755
--- a/src/cmd/ip/snoopy/icmp.c
+++ b/src/cmd/ip/snoopy/icmp.c
@@ -14,7 +14,7 @@
 
 enum
 {
-	ICMPLEN=	4,
+	ICMPLEN=	4
 };
 
 enum
@@ -41,7 +41,7 @@
 	TSreq=		13,
 	TSrep=		14,
 	InfoReq=	15,
-	InfoRep=	16,
+	InfoRep=	16
 };
 
 static Mux p_mux[] =
@@ -51,7 +51,7 @@
 	{"ip",	Redirect, },
 	{"ip",	TimeExceed, },
 	{"ip",	ParamProb, },
-	{0},
+	{0}
 };
 
 char *icmpmsg[236] =
@@ -66,7 +66,7 @@
 [TSreq]		"TSreq",
 [TSrep]		"TSrep",
 [InfoReq]	"InfoReq",
-[InfoRep]	"InfoRep",
+[InfoRep]	"InfoRep"
 };
 
 static void
@@ -193,5 +193,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/icmp6.c b/src/cmd/ip/snoopy/icmp6.c
index ad33610..9ba7493 100755
--- a/src/cmd/ip/snoopy/icmp6.c
+++ b/src/cmd/ip/snoopy/icmp6.c
@@ -14,7 +14,7 @@
 
 enum
 {
-	ICMP6LEN=	4,
+	ICMP6LEN=	4
 };
 
 enum
@@ -30,7 +30,7 @@
 
 enum
 {	
-	// ICMPv6 types
+	/* ICMPv6 types */
 	EchoReply	= 0,
 	UnreachableV6	= 1,
 	PacketTooBigV6	= 2,
@@ -54,7 +54,7 @@
 	NbrAdvert	= 136,
 	RedirectV6	= 137,
 
-	Maxtype6	= 137,
+	Maxtype6	= 137
 };
 
 static Mux p_mux[] =
@@ -62,7 +62,7 @@
 	{"ip6",	UnreachableV6, },
 	{"ip6",	RedirectV6, },
 	{"ip6",	TimeExceedV6, },
-	{0},
+	{0}
 };
 
 char *icmpmsg6[256] =
@@ -87,7 +87,7 @@
 [RouterAdvert]		"RouterAdvert",
 [NbrSolicit]		"NbrSolicit",
 [NbrAdvert]		"NbrAdvert",
-[RedirectV6]		"RedirectV6",
+[RedirectV6]		"RedirectV6"
 };
 
 static char *unreachcode[] =
@@ -97,14 +97,14 @@
 [2]	"icmp unreachable: unassigned error code (2)",
 [3]	"address unreachable",
 [4]	"port unreachable",
-[5]	"icmp unreachable: unknown code",
+[5]	"icmp unreachable: unknown code"
 };
 
 static char *timexcode[] =
 {
 [0]	"hop limit exc",
 [1]	"reassmbl time exc",
-[2]	"icmp time exc: unknown code",
+[2]	"icmp time exc: unknown code"
 };
 
 static char *parpcode[] =
@@ -112,7 +112,7 @@
 [0]	"erroneous header field encountered",
 [1]	"unrecognized Next Header type encountered",
 [2]	"unrecognized IPv6 option encountered",
-[3]	"icmp par prob: unknown code",
+[3]	"icmp par prob: unknown code"
 };
 enum 
 {
@@ -120,7 +120,7 @@
 	tll	= 2,
 	pref	= 3,
 	redir	= 4,
-	mtu	= 5,
+	mtu	= 5
 };
 
 static char *icmp6opts[256] = 
@@ -130,7 +130,7 @@
 [2]	"tll_addr",
 [3]	"pref_opt",
 [4]	"redirect",
-[5]	"mtu_opt",
+[5]	"mtu_opt"
 };
 
 static void
@@ -278,7 +278,7 @@
 	char *e = m->e;
 	int i;
 	uchar *a;
-//	ushort cksum2, cksum;
+/*	ushort cksum2, cksum; */
 
 	h = (Hdr*)m->ps;
 	m->ps += ICMP6LEN;
@@ -425,5 +425,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/il.c b/src/cmd/ip/snoopy/il.c
index 46bd281..a4ff60e 100755
--- a/src/cmd/ip/snoopy/il.c
+++ b/src/cmd/ip/snoopy/il.c
@@ -19,14 +19,14 @@
 
 enum
 {
-	ILLEN= 18,
+	ILLEN= 18
 };
 
 enum
 {
 	Os,
 	Od,
-	Osd,
+	Osd
 };
 
 static Field p_fields[] = 
@@ -45,7 +45,7 @@
 	{"ninep",	17005, },	/* ocpu */
 	{"ninep",	17010, },	/* ncpu */
 	{"ninep",	17013, },	/* cpu */
-	{0},
+	{0}
 };
 
 static void
@@ -143,5 +143,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/ip.c b/src/cmd/ip/snoopy/ip.c
index fe836eb..234ca85 100755
--- a/src/cmd/ip/snoopy/ip.c
+++ b/src/cmd/ip/snoopy/ip.c
@@ -129,10 +129,10 @@
 
 enum
 {
-	Os,	// source
-	Od,	// destination
-	Osd,	// source or destination
-	Ot,	// type
+	Os,	/* source */
+	Od,	/* destination */
+	Osd,	/* source or destination */
+	Ot,	/* type */
 };
 
 static Field p_fields[] = 
@@ -233,5 +233,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/ip6.c b/src/cmd/ip/snoopy/ip6.c
index eea4ba0..7187cda 100755
--- a/src/cmd/ip/snoopy/ip6.c
+++ b/src/cmd/ip/snoopy/ip6.c
@@ -23,7 +23,7 @@
 	ROUT_HDR	= 43,
 	FRAG_HDR	= 44,
 	FRAG_HSZ	= 8, 		/* in bytes */
-	DEST_HDR	= 60,
+	DEST_HDR	= 60
 };
 
 static Mux p_mux[] =
@@ -126,10 +126,10 @@
 
 enum
 {
-	Os,	// source
-	Od,	// destination
-	Osd,	// source or destination
-	Ot,	// type
+	Os,	/* source */
+	Od,	/* destination */
+	Osd,	/* source or destination */
+	Ot,	/* type */
 };
 
 static Field p_fields[] = 
@@ -306,5 +306,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/main.c b/src/cmd/ip/snoopy/main.c
index cf43e5c..f7bf0b1 100755
--- a/src/cmd/ip/snoopy/main.c
+++ b/src/cmd/ip/snoopy/main.c
@@ -20,7 +20,7 @@
 enum
 {
 	Pktlen=	64*1024,
-	Blen=	16*1024,
+	Blen=	16*1024
 };
 
 Filter *filter;
diff --git a/src/cmd/ip/snoopy/ninep.c b/src/cmd/ip/snoopy/ninep.c
index a3e40d3..eb3eab3 100755
--- a/src/cmd/ip/snoopy/ninep.c
+++ b/src/cmd/ip/snoopy/ninep.c
@@ -38,5 +38,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/ospf.c b/src/cmd/ip/snoopy/ospf.c
index 10da17c..bb4cd89 100755
--- a/src/cmd/ip/snoopy/ospf.c
+++ b/src/cmd/ip/snoopy/ospf.c
@@ -30,7 +30,7 @@
 	OSPFdd=		2,
 	OSPFlsrequest=	3,
 	OSPFlsupdate=	4,
-	OSPFlsack=	5,
+	OSPFlsack=	5
 };
 
 
@@ -39,7 +39,7 @@
 	[OSPFdd]	"data definition",
 	[OSPFlsrequest]	"link state request",
 	[OSPFlsupdate]	"link state update",
-	[OSPFlsack]	"link state ack",
+	[OSPFlsack]	"link state ack"
 };
 
 char*
@@ -115,7 +115,7 @@
 	[LSANetwork]	"Network LSA",
 	[LSASummN]	"Summary LSA (Network)",
 	[LSASummR]	"Summary LSA (Router)",
-	[LSAASext]	"LSA AS external",
+	[LSAASext]	"LSA AS external"
 };
 
 char*
@@ -386,5 +386,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/ppp.c b/src/cmd/ip/snoopy/ppp.c
index 3c36e43..9319cda 100755
--- a/src/cmd/ip/snoopy/ppp.c
+++ b/src/cmd/ip/snoopy/ppp.c
@@ -90,7 +90,7 @@
 	Oipdns=		129,
 	Oipwins=	130,
 	Oipdns2=	131,
-	Oipwins2=	132,
+	Oipwins2=	132
 };
 
 char *
@@ -110,7 +110,7 @@
 	"id",
 	"timeremain",
 	"resetreq",
-	"resetack",
+	"resetack"
 };
 
 static Mux p_mux[] =
@@ -126,12 +126,12 @@
 	{"ppp_lcp",	PPP_lcp, },
 	{"ppp_lqm",	PPP_lqm, },
 	{"ppp_chap",	PPP_chap, },
-	{0},
+	{0}
 };
 
 enum
 {
-	OOproto,
+	OOproto
 };
 
 static void
@@ -571,7 +571,7 @@
 	p_mux,
 	"%#.4lux",
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_ipcp =
@@ -583,7 +583,7 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_lcp =
@@ -595,7 +595,7 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_ccp =
@@ -607,7 +607,7 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_chap =
@@ -619,7 +619,7 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_comp =
@@ -631,5 +631,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/pppoe_disc.c b/src/cmd/ip/snoopy/pppoe_disc.c
index c8a5aeb..058f059 100755
--- a/src/cmd/ip/snoopy/pppoe_disc.c
+++ b/src/cmd/ip/snoopy/pppoe_disc.c
@@ -27,7 +27,7 @@
 	Overs,
 	Otype,
 	Ocode,
-	Osess,
+	Osess
 };
 
 static Field p_fields[] = 
@@ -42,7 +42,7 @@
 static void
 p_compilesess(Filter *f)
 {
-//	Mux *m;
+/*	Mux *m; */
 
 	if(f->op == '='){
 		compile_cmp(pppoe_sess.name, f, p_fields);
@@ -62,7 +62,7 @@
 static void
 p_compiledisc(Filter *f)
 {
-//	Mux *m;
+/*	Mux *m; */
 
 	if(f->op == '='){
 		compile_cmp(pppoe_disc.name, f, p_fields);
diff --git a/src/cmd/ip/snoopy/protos.c b/src/cmd/ip/snoopy/protos.c
index 4cf78e2..4503f7f 100644
--- a/src/cmd/ip/snoopy/protos.c
+++ b/src/cmd/ip/snoopy/protos.c
@@ -29,5 +29,5 @@
 	&ppp_ipcp,
 	&pppoe_sess,
 	&pppoe_disc,
-	0,
+	0
 };
diff --git a/src/cmd/ip/snoopy/rtcp.c b/src/cmd/ip/snoopy/rtcp.c
index 939f78d..29745d6 100755
--- a/src/cmd/ip/snoopy/rtcp.c
+++ b/src/cmd/ip/snoopy/rtcp.c
@@ -6,29 +6,29 @@
 
 typedef struct Hdr Hdr;
 struct Hdr {
-	uchar	hdr;			// RTCP header
-	uchar	pt;			// Packet type
-	uchar	len[2];		// Report length
-	uchar	ssrc[4];		// Synchronization source identifier
-	uchar	ntp[8];		// NTP time stamp
-	uchar	rtp[4];		// RTP time stamp
-	uchar	pktc[4];		// Sender's packet count
-	uchar	octc[4];		// Sender's octect count
+	uchar	hdr;			/* RTCP header */
+	uchar	pt;			/* Packet type */
+	uchar	len[2];		/* Report length */
+	uchar	ssrc[4];		/* Synchronization source identifier */
+	uchar	ntp[8];		/* NTP time stamp */
+	uchar	rtp[4];		/* RTP time stamp */
+	uchar	pktc[4];		/* Sender's packet count */
+	uchar	octc[4];		/* Sender's octect count */
 };
 
 typedef struct Report Report;
 struct Report {
-	uchar	ssrc[4];		// SSRC identifier
-	uchar	lost[4];		// Fraction + cumu lost
-	uchar	seqhi[4];		// Highest seq number received
-	uchar	jitter[4];		// Interarrival jitter
-	uchar	lsr[4];		// Last SR
-	uchar	dlsr[4];		// Delay since last SR
+	uchar	ssrc[4];		/* SSRC identifier */
+	uchar	lost[4];		/* Fraction + cumu lost */
+	uchar	seqhi[4];		/* Highest seq number received */
+	uchar	jitter[4];		/* Interarrival jitter */
+	uchar	lsr[4];		/* Last SR */
+	uchar	dlsr[4];		/* Delay since last SR */
 };
 
 enum{
-	RTCPLEN = 28,		// Minimum size of an RTCP header
-	REPORTLEN = 24,
+	RTCPLEN = 28,		/* Minimum size of an RTCP header */
+	REPORTLEN = 24
 };
 
 static int
@@ -79,5 +79,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/rtp.c b/src/cmd/ip/snoopy/rtp.c
index e916071..1aef15f 100755
--- a/src/cmd/ip/snoopy/rtp.c
+++ b/src/cmd/ip/snoopy/rtp.c
@@ -6,15 +6,15 @@
 
 typedef struct Hdr Hdr;
 struct Hdr {
-	uchar	hdr;		// RTP header
-	uchar	marker;	// Payload and marker
-	uchar	seq[2];	// Sequence number
-	uchar	ts[4];		// Time stamp
-	uchar	ssrc[4];	// Synchronization source identifier
+	uchar	hdr;		/* RTP header */
+	uchar	marker;	/* Payload and marker */
+	uchar	seq[2];	/* Sequence number */
+	uchar	ts[4];		/* Time stamp */
+	uchar	ssrc[4];	/* Synchronization source identifier */
 };
 
 enum{
-	RTPLEN = 12,		// Minimum size of an RTP header
+	RTPLEN = 12,		/* Minimum size of an RTP header */
 };
 
 static int
@@ -58,5 +58,5 @@
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/tcp.c b/src/cmd/ip/snoopy/tcp.c
index 1e7f079..b8ea7e4 100755
--- a/src/cmd/ip/snoopy/tcp.c
+++ b/src/cmd/ip/snoopy/tcp.c
@@ -29,14 +29,14 @@
 
 enum
 {
-	TCPLEN= 20,
+	TCPLEN= 20
 };
 
 enum
 {
 	Os,
 	Od,
-	Osd,
+	Osd
 };
 
 static Field p_fields[] = 
@@ -55,7 +55,7 @@
 	{"ninep",	17005, },	/* ocpu */
 	{"ninep",	17010, },	/* ncpu */
 	{"ninep",	17013, },	/* cpu */
-	{0},
+	{0}
 };
 
 enum
@@ -204,7 +204,7 @@
 	}
 
 	if(Cflag){
-		// editing in progress by ehg
+		/* editing in progress by ehg */
 	}
 	return 0;
 }
@@ -218,5 +218,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/ip/snoopy/udp.c b/src/cmd/ip/snoopy/udp.c
index a83c6f1..fc68d6f 100755
--- a/src/cmd/ip/snoopy/udp.c
+++ b/src/cmd/ip/snoopy/udp.c
@@ -15,7 +15,7 @@
 
 enum
 {
-	UDPLEN=	8,
+	UDPLEN=	8
 };
 
 enum
@@ -23,7 +23,7 @@
 	Os,
 	Od,
 	Osd,
-	Osetport,
+	Osetport
 };
 
 static Field p_fields[] = 
@@ -43,7 +43,7 @@
 	{"ninep",	6346, },	/* tvs */
 	{"rtp",		ANYPORT, },
 	{"rtcp",	ANYPORT, },
-	{0},
+	{0}
 };
 
 /* default next protocol, can be changed by p_filter, reset by p_compile */
@@ -128,5 +128,5 @@
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
diff --git a/src/cmd/jpg/close.c b/src/cmd/jpg/close.c
index 7a260c1..2b83351 100644
--- a/src/cmd/jpg/close.c
+++ b/src/cmd/jpg/close.c
@@ -22,7 +22,7 @@
 	g = Y-c2*Cb-c3*Cr;
 	b = Y+c4*Cb;
 
-//print("YCbCr: %d %d %d, RGB: %g %g %g\n", Y, Cb, Cr, r, g, b);
+/*print("YCbCr: %d %d %d, RGB: %g %g %g\n", Y, Cb, Cr, r, g, b); */
 
 	min = 1000000.;
 	v = 1000;
@@ -32,23 +32,23 @@
 		G = (rgb >> 8) & 0xFF;
 		B = (rgb >> 0) & 0xFF;
 		diff = (R-r)*(R-r) + (G-g)*(G-g) + (B-b)*(B-b);
-//		y1 = 0.5870*G + 0.114*B + 0.299*R;
-//		cb1 = (B-y1)/1.772;
-//		cr1 = (R-y1)/1.402;
+/*		y1 = 0.5870*G + 0.114*B + 0.299*R; */
+/*		cb1 = (B-y1)/1.772; */
+/*		cr1 = (R-y1)/1.402; */
 		if(diff < min){
-//			if(Y==0 && y1!=0)
-//				continue;
-//			if(Y==256-16 && y1<256-16)
-//				continue;
-//			if(Cb==0 && cb1!=0)
-//				continue;
-//			if(Cb==256-16 && cb1<256-16)
-//				continue;
-//			if(Cr==0 && cr1!=0)
-//				continue;
-//			if(Cr==256-16 && cr1<256-16)
-//				continue;
-//print("%d %d %d\n", R, G, B);
+/*			if(Y==0 && y1!=0) */
+/*				continue; */
+/*			if(Y==256-16 && y1<256-16) */
+/*				continue; */
+/*			if(Cb==0 && cb1!=0) */
+/*				continue; */
+/*			if(Cb==256-16 && cb1<256-16) */
+/*				continue; */
+/*			if(Cr==0 && cr1!=0) */
+/*				continue; */
+/*			if(Cr==256-16 && cr1<256-16) */
+/*				continue; */
+/*print("%d %d %d\n", R, G, B); */
 			min = diff;
 			v = i;
 		}
diff --git a/src/cmd/jpg/ico.c b/src/cmd/jpg/ico.c
index aad715f..bc7bee0 100644
--- a/src/cmd/jpg/ico.c
+++ b/src/cmd/jpg/ico.c
@@ -269,14 +269,14 @@
 	Mexit,
 
 	Up= 1,
-	Down= 0,
+	Down= 0
 };
 
 char	*menu3str[] = {
 	"write image",
 	"write mask",
 	"exit",
-	0,
+	0
 };
 
 Menu	menu3 = {
@@ -409,7 +409,7 @@
 
 enum
 {
-	BORDER= 1,
+	BORDER= 1
 };
 
 void
diff --git a/src/cmd/jpg/imagefile.h b/src/cmd/jpg/imagefile.h
index 592c5a2..5f5a487 100644
--- a/src/cmd/jpg/imagefile.h
+++ b/src/cmd/jpg/imagefile.h
@@ -39,7 +39,7 @@
 
 enum{	/* PNG flags */
 	II_GAMMA =	1 << 0,
-	II_COMMENT =	1 << 1,
+	II_COMMENT =	1 << 1
 };
 
 typedef struct ImageInfo {
diff --git a/src/cmd/jpg/jpegdump.c b/src/cmd/jpg/jpegdump.c
index 0b132cb..ee94d07 100644
--- a/src/cmd/jpg/jpegdump.c
+++ b/src/cmd/jpg/jpegdump.c
@@ -113,7 +113,7 @@
 	"c is otherwise used",
 	"Sequential DCT - differential arithmetic coding",
 	"Progressive DCT - differential arithmetic coding",
-	"Lossless - differential arithmetic coding",
+	"Lossless - differential arithmetic coding"
 };
 
 void get_sof (int kind) {
@@ -272,10 +272,10 @@
 	if (infile == NULL)
 		quit ("can't open %s\n", fname);
     Start:
-//	if (get1() != 0xff || get1() != 0xd8)
-//		quit ("not JFIF");
-//	printf ("SOI\n");
-//	get_app (0xe0);
+/*	if (get1() != 0xff || get1() != 0xd8) */
+/*		quit ("not JFIF"); */
+/*	printf ("SOI\n"); */
+/*	get_app (0xe0); */
 	for (;;) {
 		c = get1();
 		if (c != 0xff)
diff --git a/src/cmd/jpg/readjpg.c b/src/cmd/jpg/readjpg.c
index b154e75..f3ad802 100644
--- a/src/cmd/jpg/readjpg.c
+++ b/src/cmd/jpg/readjpg.c
@@ -1192,7 +1192,7 @@
 	c1 = 2871,	/* 1.402 * 2048 */
 	c2 = 705,		/* 0.34414 * 2048 */
 	c3 = 1463,	/* 0.71414 * 2048 */
-	c4 = 3629,	/* 1.772 * 2048 */
+	c4 = 3629	/* 1.772 * 2048 */
 };
 
 static
diff --git a/src/cmd/jpg/readpng.c b/src/cmd/jpg/readpng.c
index f6e8e9d..2985c5f 100644
--- a/src/cmd/jpg/readpng.c
+++ b/src/cmd/jpg/readpng.c
@@ -16,31 +16,31 @@
 	FilterAvg	=	3,	/* new[x][y] = buf[x][y] + (new[x-1][y]+new[x][y-1])/2 */ 
 	FilterPaeth=	4,	/* new[x][y] = buf[x][y] + paeth(new[x-1][y],new[x][y-1],new[x-1][y-1]) */
 	FilterLast	=	5,
-	PropertyBit =	1<<5,
+	PropertyBit =	1<<5
 };
 
 
 typedef struct ZlibW{
-	uchar *chan[4]; // Rawimage channels
-	uchar *scan;	// new scanline
-	uchar *pscan;	// previous scanline
-	int scanl;		// scan len
-	int scanp;		// scan pos
-	int nchan;		// number of input chans
-	int npix;		// pixels read so far
-	int	chanl;		// number of bytes allocated to chan[x]
+	uchar *chan[4]; /* Rawimage channels */
+	uchar *scan;	/* new scanline */
+	uchar *pscan;	/* previous scanline */
+	int scanl;		/* scan len */
+	int scanp;		/* scan pos */
+	int nchan;		/* number of input chans */
+	int npix;		/* pixels read so far */
+	int	chanl;		/* number of bytes allocated to chan[x] */
 	int scanpix;
-	int bpp;		// bits per sample
+	int bpp;		/* bits per sample */
 	int palsize;
-	int row;		// current scanline number
+	int row;		/* current scanline number */
 	uchar palette[3*256];
 } ZlibW;
 
 typedef struct ZlibR{
 	Biobuf *bi;
 	uchar *buf;
-	uchar *b;	// next byte to decompress
-	uchar *e;	// past end of buf
+	uchar *b;	/* next byte to decompress */
+	uchar *e;	/* past end of buf */
 	ZlibW *w;
 } ZlibR;
 
diff --git a/src/cmd/jpg/readppm.c b/src/cmd/jpg/readppm.c
index 569025f..073f443 100644
--- a/src/cmd/jpg/readppm.c
+++ b/src/cmd/jpg/readppm.c
@@ -155,7 +155,7 @@
 	{ '5', 0, Bgetc, 1, CY, 0, 0 },	/* raw portable greymap */
 	{ '3', 0, Bgetint, 3, CRGB, 0, 0 },	/* portable pixmap */
 	{ '6', 0, Bgetc, 3, CRGB, 0, 0 },	/* raw portable pixmap */
-	{ 0 },
+	{ 0 }
 };
 
 Rawimage*
diff --git a/src/cmd/jpg/readyuv.c b/src/cmd/jpg/readyuv.c
index eae2764..f90bc23 100644
--- a/src/cmd/jpg/readyuv.c
+++ b/src/cmd/jpg/readyuv.c
@@ -76,19 +76,19 @@
 	}
 
 	switch (sz) {
-	case 720 * PAL * 2:				// 625 x 8bit
+	case 720 * PAL * 2:				/* 625 x 8bit */
 		bits = 8;
 		lines = PAL;
 		break;
-	case 720 * NTSC * 2:				// 525 x 8bit
+	case 720 * NTSC * 2:				/* 525 x 8bit */
 		bits = 8;
 		lines = NTSC;
 		break;
-	case 720 * PAL * 2 + (720 * PAL / 2) :		// 625 x 10bit
+	case 720 * PAL * 2 + (720 * PAL / 2) :		/* 625 x 10bit */
 			bits = 10;
 		lines = PAL;
 		break;
-	case 720 * NTSC * 2 + (720 * NTSC / 2) :	// 525 x 10bit
+	case 720 * NTSC * 2 + (720 * NTSC / 2) :	/* 525 x 10bit */
 			bits = 10;
 		lines = NTSC;
 		break;
@@ -97,8 +97,8 @@
 		goto Error;
 	}
 
-	//	print("bits=%d pixels=%d lines=%d\n", bits, 720, lines);
-	//
+	/*	print("bits=%d pixels=%d lines=%d\n", bits, 720, lines); */
+	/* */
 	a->nchans = 3;
 	a->chandesc = CRGB;
 	a->chanlen = 720 * lines;
diff --git a/src/cmd/jpg/rgbycc.c b/src/cmd/jpg/rgbycc.c
index 3654a2d..d20cc78 100644
--- a/src/cmd/jpg/rgbycc.c
+++ b/src/cmd/jpg/rgbycc.c
@@ -21,7 +21,7 @@
 	g = Y-c2*Cb-c3*Cr;
 	b = Y+c4*Cb;
 
-//print("YCbCr: %d %d %d, RGB: %g %g %g\n", Y, Cb, Cr, r, g, b);
+/*print("YCbCr: %d %d %d, RGB: %g %g %g\n", Y, Cb, Cr, r, g, b); */
 
 	min = 1000000.;
 	v = 1000;
@@ -35,19 +35,19 @@
 		cb1 = (B-y1)/1.772;
 		cr1 = (R-y1)/1.402;
 		if(diff < min){
-//			if(Y==0 && y1!=0)
-//				continue;
+/*			if(Y==0 && y1!=0) */
+/*				continue; */
 			if(Y==256-16 && y1<256-16)
 				continue;
-//			if(Cb==0 && cb1!=0)
-//				continue;
+/*			if(Cb==0 && cb1!=0) */
+/*				continue; */
 			if(Cb==256-16 && cb1<256-16)
 				continue;
-//			if(Cr==0 && cr1!=0)
-//				continue;
+/*			if(Cr==0 && cr1!=0) */
+/*				continue; */
 			if(Cr==256-16 && cr1<256-16)
 				continue;
-//print("%d %d %d\n", R, G, B);
+/*print("%d %d %d\n", R, G, B); */
 			min = diff;
 			v = i;
 		}
@@ -66,8 +66,8 @@
 	int y, cb, cr;
 	uchar close[16*16*16];
 
-//print("%d\n", closest(atoi(argv[1]), atoi(argv[2]), atoi(argv[3])));
-//exits("X");
+/*print("%d\n", closest(atoi(argv[1]), atoi(argv[2]), atoi(argv[3]))); */
+/*exits("X"); */
 
 	/* ycbcrmap */
 	print("uint ycbcrmap[256] = {\n");
diff --git a/src/cmd/jpg/toico.c b/src/cmd/jpg/toico.c
index 536b64f..5133262 100644
--- a/src/cmd/jpg/toico.c
+++ b/src/cmd/jpg/toico.c
@@ -7,7 +7,7 @@
 {
 	FileHdrLen=	6,
 	IconDescrLen=	16,
-	IconHdrLen=	40,
+	IconHdrLen=	40
 };
 
 typedef struct Icon Icon;
diff --git a/src/cmd/jpg/totruecolor.c b/src/cmd/jpg/totruecolor.c
index 0da5d9a..d30a684 100644
--- a/src/cmd/jpg/totruecolor.c
+++ b/src/cmd/jpg/totruecolor.c
@@ -8,7 +8,7 @@
 	c1 = 2871,	/* 1.402 * 2048 */
 	c2 = 705,		/* 0.34414 * 2048 */
 	c3 = 1463,	/* 0.71414 * 2048 */
-	c4 = 3629,	/* 1.772 * 2048 */
+	c4 = 3629	/* 1.772 * 2048 */
 };
 
 Rawimage*
diff --git a/src/cmd/jpg/writegif.c b/src/cmd/jpg/writegif.c
index 4bb018b..08fc480 100644
--- a/src/cmd/jpg/writegif.c
+++ b/src/cmd/jpg/writegif.c
@@ -8,7 +8,7 @@
 enum
 {
 	Nhash	= 4001,
-	Nbuf		= 300,
+	Nbuf		= 300
 };
 
 typedef struct Entry Entry;
diff --git a/src/cmd/jpg/writepng.c b/src/cmd/jpg/writepng.c
index e280a9c..3b63bb7 100644
--- a/src/cmd/jpg/writepng.c
+++ b/src/cmd/jpg/writepng.c
@@ -1,7 +1,7 @@
-// based on PNG 1.2 specification, July 1999  (see also rfc2083)
-// Alpha is not supported yet because of lack of industry acceptance and
-// because Plan9 Image uses premultiplied alpha, so png can't be lossless.
-// Only 24bit color supported, because 8bit may as well use GIF.
+/* based on PNG 1.2 specification, July 1999  (see also rfc2083) */
+/* Alpha is not supported yet because of lack of industry acceptance and */
+/* because Plan9 Image uses premultiplied alpha, so png can't be lossless. */
+/* Only 24bit color supported, because 8bit may as well use GIF. */
 
 #include <u.h>
 #include <libc.h>
@@ -13,22 +13,22 @@
 #include "imagefile.h"
 
 enum{	IDATSIZE = 	20000,
-	FilterNone =	0,
+	FilterNone =	0
 };
 
 typedef struct ZlibR{
 	uchar *data;
 	int width;
 	int nrow, ncol;
-	int row, col;	// next pixel to send
+	int row, col;	/* next pixel to send */
 	int pixwid;
 } ZlibR;
 
 typedef struct ZlibW{
 	Biobuf *bo;
 	uchar *buf;
-	uchar *b;	// next place to write
-	uchar *e;	// past end of buf
+	uchar *b;	/* next place to write */
+	uchar *e;	/* past end of buf */
 } ZlibW;
 
 static ulong *crctab;
@@ -68,11 +68,11 @@
 	int nrow = z->nrow;
 	int ncol = z->ncol;
 	uchar *b = buf, *e = b+n, *img;
-	int pixels;  // number of pixels in row that can be sent now
+	int pixels;  /* number of pixels in row that can be sent now */
 	int i, a, pixwid;
 	
 	pixwid = z->pixwid;
-	while(b+pixwid <= e){ // loop over image rows
+	while(b+pixwid <= e){ /* loop over image rows */
 		if(z->row >= nrow)
 			break;
 		if(z->col==0)
@@ -129,7 +129,7 @@
 	uchar *b = buf, *e = b+n;
 	int m;
 
-	while(b < e){ // loop over IDAT chunks
+	while(b < e){ /* loop over IDAT chunks */
 		m = z->e - z->b;
 		if(m > e - b)
 			m = e - b;
@@ -190,15 +190,15 @@
 	deflateinit();
 
 	Bwrite(bo, PNGmagic, sizeof PNGmagic);
-	// IHDR chunk
+	/* IHDR chunk */
 	h = buf;
 	put4(h, ncol); h += 4;
 	put4(h, nrow); h += 4;
-	*h++ = 8; // bit depth = 24 bit per pixel
-	*h++ = rgb->chan==BGR24 ? 2 : 6; // color type = rgb
-	*h++ = 0; // compression method = deflate
-	*h++ = 0; // filter method
-	*h++ = 0; // interlace method = no interlace
+	*h++ = 8; /* bit depth = 24 bit per pixel */
+	*h++ = rgb->chan==BGR24 ? 2 : 6; /* color type = rgb */
+	*h++ = 0; /* compression method = deflate */
+	*h++ = 0; /* filter method */
+	*h++ = 0; /* interlace method = no interlace */
 	chunk(bo, "IHDR", buf, h-buf);
 
 	tm = gmtime(time(0));
@@ -220,12 +220,12 @@
 
 	if(II->fields_set & II_COMMENT){
 		strncpy((char*)buf, "Comment", sizeof buf);
-		n = strlen((char*)buf)+1; // leave null between Comment and text
+		n = strlen((char*)buf)+1; /* leave null between Comment and text */
 		strncpy((char*)(buf+n), II->comment, sizeof buf - n);
 		chunk(bo, "tEXt", buf, n+strlen((char*)buf+n));
 	}
 
-	// image chunks
+	/* image chunks */
 	zr.nrow = nrow;
 	zr.ncol = ncol;
 	zr.width = rgb->width * sizeof(ulong);
diff --git a/src/cmd/lex/header.c b/src/cmd/lex/header.c
index 8b1ba5f..8264f4c 100644
--- a/src/cmd/lex/header.c
+++ b/src/cmd/lex/header.c
@@ -31,7 +31,7 @@
 	Bprint(&fout,"int yymorfg;\n");
 	Bprint(&fout,"extern Uchar *yysptr, yysbuf[];\n");
 	Bprint(&fout,"int yytchar;\n");
-//	Bprint(&fout,"FILE *yyin = stdin, *yyout = stdout;\n");
+/*	Bprint(&fout,"FILE *yyin = stdin, *yyout = stdout;\n"); */
 	Bprint(&fout,"FILE *yyin, *yyout;\n");
 	Bprint(&fout,"extern int yylineno;\n");
 	Bprint(&fout,"struct yysvf { \n");
diff --git a/src/cmd/listen1.c b/src/cmd/listen1.c
index a9e1a0a..903bc7a 100644
--- a/src/cmd/listen1.c
+++ b/src/cmd/listen1.c
@@ -87,9 +87,9 @@
 			print("incoming call for %s from %s in %s\n", argv[0], remoteaddr(ndir), ndir);
 			close(ctl);
 			close(nctl);
-			//putenv("net", ndir);
-			//sprint(data, "%s/data", ndir);
-			//bind(data, "/dev/cons", MREPL);
+			/*putenv("net", ndir); */
+			/*sprint(data, "%s/data", ndir); */
+			/*bind(data, "/dev/cons", MREPL); */
 			dup(fd, 0);
 			dup(fd, 1);
 			dup(fd, 2);
diff --git a/src/cmd/mk/env.c b/src/cmd/mk/env.c
index c040db5..ffb2762 100644
--- a/src/cmd/mk/env.c
+++ b/src/cmd/mk/env.c
@@ -27,7 +27,7 @@
 	"stem7",
 	"stem8",
 	"stem9",
-	0,
+	0
 };
 
 void
diff --git a/src/cmd/mk/graph.c b/src/cmd/mk/graph.c
index 8072123..da346c0 100644
--- a/src/cmd/mk/graph.c
+++ b/src/cmd/mk/graph.c
@@ -37,7 +37,7 @@
 	char stem[NAMEBLOCK], buf[NAMEBLOCK];
 	Resub rmatch[NREGEXP];
 
-/*	print("applyrules(%lux='%s')\n", target, target);*//**/
+/*	print("applyrules(%lux='%s')\n", target, target); */
 	sym = symlook(target, S_NODE, 0);
 	if(sym)
 		return (Node *)(sym->value);
diff --git a/src/cmd/mk/mk.c b/src/cmd/mk/mk.c
index 9f8bbf4..5ae4fc2 100644
--- a/src/cmd/mk/mk.c
+++ b/src/cmd/mk/mk.c
@@ -76,7 +76,7 @@
 	int ready;
 	int did = 0;
 
-	/*print("work(%s) flags=0x%x time=%ld\n", node->name, node->flags, node->time);*//**/
+	/*print("work(%s) flags=0x%x time=%ld\n", node->name, node->flags, node->time); */
 	if(node->flags&BEINGMADE)
 		return(did);
 	if((node->flags&MADE) && (node->flags&PRETENDING) && p && outofdate(p, parc, 0)){
@@ -188,7 +188,7 @@
 			if(a->n && outofdate(node, a, 1))
 				node->time = a->n->time;
 	}
-/*	print("----node %s time=%ld flags=0x%x\n", node->name, node->time, node->flags);*//**/
+/*	print("----node %s time=%ld flags=0x%x\n", node->name, node->time, node->flags);*/
 }
 
 static int
diff --git a/src/cmd/mk/rc.c b/src/cmd/mk/rc.c
index 53f5d5a..2407662 100644
--- a/src/cmd/mk/rc.c
+++ b/src/cmd/mk/rc.c
@@ -190,5 +190,5 @@
 	rcexpandquote,
 	rcescapetoken,
 	rccopyq,
-	rcmatchname,
+	rcmatchname
 };
diff --git a/src/cmd/mk/recipe.c b/src/cmd/mk/recipe.c
index 144a490..bf7f8ab 100644
--- a/src/cmd/mk/recipe.c
+++ b/src/cmd/mk/recipe.c
@@ -99,7 +99,7 @@
 		}
 		MADESET(n, BEINGMADE);
 	}
-	/*print("lt=%s ln=%s lp=%s\n",wtos(head.next, ' '),wtos(ln.next, ' '),wtos(lp.next, ' '));*//**/
+	/*print("lt=%s ln=%s lp=%s\n",wtos(head.next, ' '),wtos(ln.next, ' '),wtos(lp.next, ' '));*/
 	run(newjob(r, node, aa->stem, aa->match, lp.next, ln.next, head.next, ahead.next));
 	return(1);
 }
diff --git a/src/cmd/mk/sh.c b/src/cmd/mk/sh.c
index ba80162..e256651 100644
--- a/src/cmd/mk/sh.c
+++ b/src/cmd/mk/sh.c
@@ -201,6 +201,6 @@
 	shexpandquote,
 	shescapetoken,
 	shcopyq,
-	shmatchname,
+	shmatchname
 };
 
diff --git a/src/cmd/mk/shell.c b/src/cmd/mk/shell.c
index cee2f6c..8c15ec2 100644
--- a/src/cmd/mk/shell.c
+++ b/src/cmd/mk/shell.c
@@ -2,7 +2,7 @@
 
 static Shell *shells[] = {
 	&rcshell,
-	&shshell,
+	&shshell
 };
 
 Shell *shelldefault = &shshell;
diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c
index 28951f5..7ecce69 100644
--- a/src/cmd/mk/unix.c
+++ b/src/cmd/mk/unix.c
@@ -259,7 +259,7 @@
 	SIGFPE,		"sys: fp: fptrap",
 	SIGPIPE,	"sys: write on closed pipe",
 	SIGILL,		"sys: trap: illegal instruction",
-//	SIGSEGV,	"sys: segmentation violation",
+/*	SIGSEGV,	"sys: segmentation violation", */
 	0,		0
 };
 
diff --git a/src/cmd/ndb/dn.c b/src/cmd/ndb/dn.c
index 8052d58..c9356b5 100755
--- a/src/cmd/ndb/dn.c
+++ b/src/cmd/ndb/dn.c
@@ -112,7 +112,7 @@
 	"server failure",
 	"bad name",
 	"unimplemented",
-	"we don't like you",
+	"we don't like you"
 };
 
 Lock	dnlock;
diff --git a/src/cmd/ndb/ndbmkhosts.c b/src/cmd/ndb/ndbmkhosts.c
index 2fc3d7f..fcdffcf 100644
--- a/src/cmd/ndb/ndbmkhosts.c
+++ b/src/cmd/ndb/ndbmkhosts.c
@@ -187,18 +187,16 @@
 		parse(unsharp("#9/ndb/friends"));
 	}
 
-/*	
-//	sprint(fn, "/lib/ndb/hosts.%-.21s", domname);
-//	fd = create(fn, OWRITE, 0664);
-//	if(fd < 0){
-//		fprint(2, "can't create %s: %r\n", fn);
-//		exits("boom");
-//	}
-//	for(i = 0; i < nx; i++)
-//		printentry(fd, &x[i]);
-//	close(fd);
-//
-*/
+/*	sprint(fn, "/lib/ndb/hosts.%-.21s", domname); */
+/*	fd = create(fn, OWRITE, 0664); */
+/*	if(fd < 0){ */
+/*		fprint(2, "can't create %s: %r\n", fn); */
+/*		exits("boom"); */
+/*	} */
+/*	for(i = 0; i < nx; i++) */
+/*		printentry(fd, &x[i]); */
+/*	close(fd); */
+
 
 	sprint(fn, "/lib/ndb/db.%-.24s", domname);
 	fd = create(fn, OWRITE, 0664);
diff --git a/src/cmd/netfiles/main.c b/src/cmd/netfiles/main.c
index 9bd9672..45e1941 100644
--- a/src/cmd/netfiles/main.c
+++ b/src/cmd/netfiles/main.c
@@ -41,7 +41,7 @@
 int do3(Win *w, char *arg);
 
 enum {
-	STACK = 128*1024,
+	STACK = 128*1024
 };
 
 enum {
@@ -65,7 +65,7 @@
 char *debugstr[] = {
 	"off",
 	"minimal",
-	"chatty",
+	"chatty"
 };
 
 typedef struct Arg Arg;
@@ -218,7 +218,7 @@
 	winaddr(w, "%s", addr);
 	winctl(w, "dot=addr");
 	winctl(w, "show");
-//	windecref(w);
+/*	windecref(w); */
 	plumbfree(m);
 }
 
diff --git a/src/cmd/page/gfx.c b/src/cmd/page/gfx.c
index 6a94703..9ce6f74 100644
--- a/src/cmd/page/gfx.c
+++ b/src/cmd/page/gfx.c
@@ -44,7 +44,7 @@
 	Ippm,
 	Ipng,
 	Iyuv,
-	Ibmp,
+	Ibmp
 };
 
 /*
@@ -65,7 +65,7 @@
 [Iccittg4]	{ "ccitt-g4",	"cat %a|rx nslocum /usr/lib/ocr/bin/bcp -M|fb/pcp -tcompressed -l0" },
 [Ipng]		{ "png",	"png -9 %a", "png -t9 %a" },
 [Iyuv]		{ "yuv",	"yuv -9 %a", "yuv -t9 %a"  },
-[Ibmp]		{ "bmp",	"bmp -9 %a", "bmp -t9 %a"  },
+[Ibmp]		{ "bmp",	"bmp -9 %a", "bmp -t9 %a"  }
 };
 
 static Image*	convert(Graphic*);
@@ -325,7 +325,7 @@
 		else
 			dup(open("/dev/null", OREAD), 0);
 		dup(pfd[0], 1);
-		//dup(pfd[0], 2);
+		/*dup(pfd[0], 2); */
 		execl("/bin/rc", "rc", "-c", cmd, nil);
 		wexits("exec");
 	}
diff --git a/src/cmd/page/gs.c b/src/cmd/page/gs.c
index 2093af5..fd7337e 100644
--- a/src/cmd/page/gs.c
+++ b/src/cmd/page/gs.c
@@ -305,10 +305,10 @@
 	uchar buf[1024];
 	int n;
 
-//	gscmd(gs, "(\\n**bstack\\n) print flush\n");
-//	gscmd(gs, "stack flush\n");
-//	gscmd(gs, "(**estack\\n) print flush\n");
-	gscmd(gs, "(\\n//GO.SYSIN DD\\n) PAGE==\n");
+/*	gscmd(gs, "(\\n**bstack\\n) print flush\n"); */
+/*	gscmd(gs, "stack flush\n"); */
+/*	gscmd(gs, "(**estack\\n) print flush\n"); */
+	gscmd(gs, "(\\n/*GO.SYSIN DD\\n) PAGE==\n"); */
 
 	alarm(300*1000);
 	for(;;) {
diff --git a/src/cmd/page/nrotate.c b/src/cmd/page/nrotate.c
index 65fe33a..9f6816e 100644
--- a/src/cmd/page/nrotate.c
+++ b/src/cmd/page/nrotate.c
@@ -23,7 +23,7 @@
 
 enum {
 	Xaxis,
-	Yaxis,
+	Yaxis
 };
 
 static void reverse(Image*, Image*, int);
@@ -229,7 +229,7 @@
 	/*
 	 * r0 is the lower rectangle, while r1 is the upper one.
 	 */
-	draw(tmp, tmp->r, img, nil, 
+	draw(tmp, tmp->r, img, nil
 }
 
 void
diff --git a/src/cmd/page/rotate.c b/src/cmd/page/rotate.c
index 9e1c20d..fc13059 100644
--- a/src/cmd/page/rotate.c
+++ b/src/cmd/page/rotate.c
@@ -22,7 +22,7 @@
 int ndraw = 0;
 enum {
 	Xaxis = 0,
-	Yaxis = 1,
+	Yaxis = 1
 };
 
 Image *mtmp;
@@ -137,7 +137,7 @@
 	delta = axis==Xaxis ? Pt(maskdim,0) : Pt(0,maskdim);
 	drawop(mtmp, mtmp->r, mask, nil, mask->r.min, S);
 	gendrawop(mask, mask->r, mtmp, delta, mtmp, divpt(delta,-2), S);
-//	writefile("mask", mask, maskdim/2);
+/*	writefile("mask", mask, maskdim/2); */
 	return maskdim/2;
 }
 
@@ -153,13 +153,13 @@
 	nn = n - left;
 
 	interlace(im, tmp, axis, nn, mask, gran);
-//	writefile("interlace", im, gran);
+/*	writefile("interlace", im, gran); */
 	
 	gran = nextmask(mask, axis, gran);
 	shuffle(im, tmp, axis, n, mask, gran, nn);
-//	writefile("shuffle", im, gran);
+/*	writefile("shuffle", im, gran); */
 	moveup(im, tmp, lastnn, nn, n, axis);
-//	writefile("move", im, gran);
+/*	writefile("move", im, gran); */
 }
 
 void
@@ -198,7 +198,7 @@
 	}
 	rmask.max.x = gran;
 	drawop(mask, rmask, display->opaque, nil, ZP, S);
-//	writefile("mask", mask, gran);
+/*	writefile("mask", mask, gran); */
 	shuffle(im, tmp, Xaxis, Dx(im->r), mask, gran, 0);
 	freeimage(mask);
 	freeimage(mtmp);
diff --git a/src/cmd/page/view.c b/src/cmd/page/view.c
index 4321f82..1cdb254 100644
--- a/src/cmd/page/view.c
+++ b/src/cmd/page/view.c
@@ -56,7 +56,7 @@
 	Middle = 2,
 	Right = 4,
 
-	RMenu = 3,
+	RMenu = 3
 };
 
 void
@@ -265,7 +265,7 @@
 	Del,
 	Write,
 	Empty3,
-	Exit,
+	Exit
 };
  
 void
@@ -866,7 +866,7 @@
 		}
 	}
 	border(screen, r, -4000, gray, ZP);
-//	flushimage(display, 0);	
+/*	flushimage(display, 0);	 */
 }
 
 void
@@ -1047,7 +1047,7 @@
 	dup(cons, 1);
 	dup(cons, 2);
 	close(cons);
-//	wctlfd = open("/dev/wctl", OWRITE);
+/*	wctlfd = open("/dev/wctl", OWRITE); */
 }
 
 Rectangle
diff --git a/src/cmd/pic/misc.c b/src/cmd/pic/misc.c
index 1ada1c1..e888faf 100644
--- a/src/cmd/pic/misc.c
+++ b/src/cmd/pic/misc.c
@@ -212,7 +212,7 @@
 
 	x1 = y1 = 0.0; /* Botch? (gcc) */
 
-	dprintf("whatpos %p %d %d\n", p, p->o_type, corner);
+	dprintf("whatpos %p %d %d\n", (void*)p, p->o_type, corner);
 	x = p->o_x;
 	y = p->o_y;
 	if (p->o_type != PLACE && p->o_type != MOVE) {
diff --git a/src/cmd/plot/plot.c b/src/cmd/plot/plot.c
index 2fe216a..8b62387 100644
--- a/src/cmd/plot/plot.c
+++ b/src/cmd/plot/plot.c
@@ -92,7 +92,7 @@
 	/*SPLINE*/ 	"sp", 	2,
 	/*TEXT*/ 		"t", 	1,
 	/*VEC*/ 		"v", 	1,
-	/*LAST*/	 	0, 	0,
+	/*LAST*/	 	0, 	0
 };
 
 struct pcall *pplots;		/* last command read */
diff --git a/src/cmd/plumb/fsys.c b/src/cmd/plumb/fsys.c
index e9be1eb..4ae99af 100644
--- a/src/cmd/plumb/fsys.c
+++ b/src/cmd/plumb/fsys.c
@@ -92,7 +92,7 @@
 {
 	{ ".",			QTDIR,	Qdir,			0500|DMDIR },
 	{ "rules",		QTFILE,	Qrules,		0600 },
-	{ "send",		QTFILE,	Qsend,		0200 },
+	{ "send",		QTFILE,	Qsend,		0200 }
 };
 static int	ndir = NQID;
 
diff --git a/src/cmd/plumb/plumber.h b/src/cmd/plumb/plumber.h
index 4b9267a..c8f3081 100644
--- a/src/cmd/plumb/plumber.h
+++ b/src/cmd/plumb/plumber.h
@@ -14,7 +14,7 @@
 	OPlumb,
 	OSrc,
 	OType,
-	OWdir,
+	OWdir
 };
 
 /*
@@ -31,7 +31,7 @@
 	VMatches,
 	VSet,
 	VStart,
-	VTo,
+	VTo
 };
 
 struct Rule
diff --git a/src/cmd/postscript/common/rune.c b/src/cmd/postscript/common/rune.c
index 01ee6ba..ee5a79d 100644
--- a/src/cmd/postscript/common/rune.c
+++ b/src/cmd/postscript/common/rune.c
@@ -21,7 +21,7 @@
 	Maskx	= (1<<Bitx)-1,			/* 0011 1111 */
 	Testx	= Maskx ^ 0xFF,			/* 1100 0000 */
 
-	Bad	= Runeerror,
+	Bad	= Runeerror
 };
 
 int
diff --git a/src/cmd/postscript/common/rune.h b/src/cmd/postscript/common/rune.h
index 2df5f76..0e7d0cb 100644
--- a/src/cmd/postscript/common/rune.h
+++ b/src/cmd/postscript/common/rune.h
@@ -14,6 +14,6 @@
 	UTFmax		= 3,		/* maximum bytes per rune */
 	Runesync	= 0x80,		/* cannot represent part of a utf sequence (<) */
 	Runeself	= 0x80,		/* rune and utf sequences are the same (<) */
-	Runeerror	= 0x80,		/* decoding error in utf */
+	Runeerror	= 0xFFFD		/* decoding error in utf */
 };
 #endif
diff --git a/src/cmd/postscript/misc/laserbar.c b/src/cmd/postscript/misc/laserbar.c
index 2f61c27..7b45e66 100644
--- a/src/cmd/postscript/misc/laserbar.c
+++ b/src/cmd/postscript/misc/laserbar.c
@@ -43,7 +43,7 @@
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
 static void barprt();
diff --git a/src/cmd/ramfs.c b/src/cmd/ramfs.c
index 4cf5004..6330f04 100644
--- a/src/cmd/ramfs.c
+++ b/src/cmd/ramfs.c
@@ -14,7 +14,7 @@
 	OPERM	= 0x3,		/* mask of all permission types in open mode */
 	Nram	= 2048,
 	Maxsize	= 512*1024*1024,
-	Maxfdata	= 8192,
+	Maxfdata	= 8192
 };
 
 typedef struct Fid Fid;
@@ -55,7 +55,7 @@
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 ulong	path;		/* incremented for each new file */
@@ -703,7 +703,7 @@
 	 */
 	if(dir.gid[0]!='\0' && strcmp(r->group, dir.gid)!=0){
 		if(strcmp(f->user, r->user) == 0)
-	//	if(strcmp(f->user, dir.gid) == 0)
+	/*	if(strcmp(f->user, dir.gid) == 0) */
 			goto ok;
 		if(strcmp(f->user, r->group) == 0)
 		if(strcmp(f->user, dir.gid) == 0)
diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c
index aeb9344..f5e4e6a 100644
--- a/src/cmd/rc/plan9ish.c
+++ b/src/cmd/rc/plan9ish.c
@@ -127,7 +127,7 @@
 		for(s=*env;*s && *s!='(' && *s!='=';s++);
 		switch(*s){
 		case '\0':
-		//	pfmt(err, "rc: odd environment %q?\n", *env);
+		/*	pfmt(err, "rc: odd environment %q?\n", *env); */
 			break;
 		case '=':
 			*s='\0';
diff --git a/src/cmd/rc/subr.c b/src/cmd/rc/subr.c
index 2b24224..06a22b2 100644
--- a/src/cmd/rc/subr.c
+++ b/src/cmd/rc/subr.c
@@ -5,12 +5,12 @@
 char *emalloc(long n){
 	char *p=(char *)Malloc(n);
 	if(p==0) panic("Can't malloc %d bytes", n);
-/*	if(err){ pfmt(err, "malloc %d->%p\n", n, p); flush(err); } *//**/
+/*	if(err){ pfmt(err, "malloc %d->%p\n", n, p); flush(err); } */
 	return p;
 }
 void efree(char *p)
 {
-/*	pfmt(err, "free %p\n", p); flush(err); *//**/
+/*	pfmt(err, "free %p\n", p); flush(err); */
 	if(p) free(p);
 	else pfmt(err, "free 0\n");
 }
diff --git a/src/cmd/resample.c b/src/cmd/resample.c
index e2bc6fc..d320841 100755
--- a/src/cmd/resample.c
+++ b/src/cmd/resample.c
@@ -208,7 +208,7 @@
 
 	for(i=-K2; i<=K2; i++){
 		K[K2+i] = kaiser(i/10., K2/10., 4.);
-//		print("%g %g\n", i/10., K[K2+i]);
+/*		print("%g %g\n", i/10., K[K2+i]); */
 	}
 
 	/* normalize */
diff --git a/src/cmd/rio/client.c b/src/cmd/rio/client.c
index df8225f..58b0697 100644
--- a/src/cmd/rio/client.c
+++ b/src/cmd/rio/client.c
@@ -15,7 +15,7 @@
 void
 setactive(Client *c, int on)
 {
-//	dbg("setactive client %x %d", c->window, c->on);
+/*	dbg("setactive client %x %d", c->window, c->on); */
 
 	if(c->parent == c->screen->root)
 		return;
@@ -52,7 +52,7 @@
 			pixel = c->screen->inactiveborder;
 	}
 
-	if(debug) fprintf(stderr, "draw_border %p pixel %ld active %d hold %d\n", c, pixel, active, c->hold);
+	if(debug) fprintf(stderr, "draw_border %p pixel %ld active %d hold %d\n", (void*)c, pixel, active, c->hold);
 	XSetWindowBackground(dpy, c->parent, pixel);
 	XClearWindow(dpy, c->parent);
 }
@@ -132,7 +132,7 @@
 		}
 		l = &cc->next;
 	}
-	fprintf(stderr, "rio: %p not on client list in top()\n", c);
+	fprintf(stderr, "rio: %p not on client list in top()\n", (void*)c);
 }
 
 Client *
@@ -229,7 +229,7 @@
 
 	i = 0;
 	for(c = current; c; c = c->revert){
-		fprintf(stderr, "%s(%x:%d)", c->label ? c->label : "?", (uint)c->window, c->state);
+		fprintf(stderr, "%s(%x:%d)", c->label ? c->label : "?", (int)c->window, c->state);
 		if(i++ > 100)
 			break;
 		if(c->revert)
@@ -246,7 +246,7 @@
 	Client *c;
 
 	for(c = clients; c; c = c->next)
-		fprintf(stderr, "w 0x%x parent 0x%x @ (%d, %d)\n", (uint)c->window, (uint)c->parent, c->x, c->y);
+		fprintf(stderr, "w 0x%x parent 0x%x @ (%d, %d)\n", (int)c->window, (int)c->parent, c->x, c->y);
 }
 #endif
 
@@ -258,8 +258,8 @@
 	if(clients == 0 || clients->next == 0)
 		return;
 	if(up){
-		//for(c=clients; c->next; c=c->next)
-		//	;
+		/*for(c=clients; c->next; c=c->next) */
+		/*	; */
 		for(l=&clients; (*l)->next; l=&(*l)->next)
 			;
 		c = *l;
@@ -278,8 +278,8 @@
 		c->next = 0;
 		XLowerWindow(dpy, c->window);
 	}
-//	XMapRaised(dpy, clients->parent);
-//	top(clients);	
-//	active(clients);
+/*	XMapRaised(dpy, clients->parent); */
+/*	top(clients);	 */
+/*	active(clients); */
 }
 
diff --git a/src/cmd/rio/cursor.c b/src/cmd/rio/cursor.c
index 9acab51..33f6352 100644
--- a/src/cmd/rio/cursor.c
+++ b/src/cmd/rio/cursor.c
@@ -25,7 +25,7 @@
 	  0xFE, 0x07, 0xFE, 0x07, 0xFE, 0x0F, 0xFE, 0x1F, 
 	  0xFE, 0x3F, 0xFE, 0x7F, 0xFE, 0x3F, 0xCE, 0x1F, 
 	  0x86, 0x0F, 0x06, 0x07, 0x02, 0x02, 0x00, 0x00, 
-	},
+	}
 };
 
 Cursordata sweep0data = {
@@ -151,7 +151,7 @@
 #define grey_width 4
 #define grey_height 2
 static char grey_bits[] = {
-	0x01, 0x04,
+	0x01, 0x04
 };
 
 static XColor	bl, wh;
@@ -375,7 +375,7 @@
 Cursor *corners[9] = {
 	&tl,	&t,	&tr,
 	&l,	nil,	&r,
-	&bl,	&b,	&br,
+	&bl,	&b,	&br
 };
 
 */
diff --git a/src/cmd/rio/dat.h b/src/cmd/rio/dat.h
index aa08fcf..e56429e 100644
--- a/src/cmd/rio/dat.h
+++ b/src/cmd/rio/dat.h
@@ -22,7 +22,6 @@
 typedef struct Client Client;
 typedef struct Menu Menu;
 typedef struct ScreenInfo ScreenInfo;
-typedef enum BorderOrient BorderOrient;
 
 struct Client {
 	Window		window;
@@ -91,8 +90,9 @@
 	BorderW,
 	BorderWNW,
 	BorderNNW,
-	NBorder,
+	NBorder
 };
+typedef enum BorderOrient BorderOrient;
 
 struct ScreenInfo {
 	int			num;
diff --git a/src/cmd/rio/error.c b/src/cmd/rio/error.c
index 5215f32..358a36a 100644
--- a/src/cmd/rio/error.c
+++ b/src/cmd/rio/error.c
@@ -87,9 +87,9 @@
 {
 	if(debug == 0)
 		return;
-	fprintf(stderr, "rio: %s: c=%p", s, c);
+	fprintf(stderr, "rio: %s: c=%p", s, (void*)c);
 	if(c)
-		fprintf(stderr, " x %d y %d dx %d dy %d w 0x%x parent 0x%x", c->x, c->y, c->dx, c->dy, (uint)c->window, (uint)c->parent);
+		fprintf(stderr, " x %d y %d dx %d dy %d w 0x%x parent 0x%x", c->x, c->y, c->dx, c->dy, (int)c->window, (int)c->parent);
 #ifdef	DEBUG_EV
 	if(e){
 		fprintf(stderr, "\n\t");
diff --git a/src/cmd/rio/event.c b/src/cmd/rio/event.c
index 457153d..1fa00ff 100644
--- a/src/cmd/rio/event.c
+++ b/src/cmd/rio/event.c
@@ -191,7 +191,7 @@
 	if(c == 0 || c->window != e->window){
 		/* workaround for stupid NCDware */
 		fprintf(stderr, "rio: bad mapreq c %p w %x, rescanning\n",
-			c, (int)e->window);
+			(void*)c, (int)e->window);
 		for(i = 0; i < num_screens; i++)
 			scanwins(&screens[i]);
 		c = getclient(e->window, 0);
diff --git a/src/cmd/rio/key.c b/src/cmd/rio/key.c
index bff0d14..95333ec 100644
--- a/src/cmd/rio/key.c
+++ b/src/cmd/rio/key.c
@@ -14,13 +14,13 @@
 enum
 {
 	GrabAltTab,
-	GrabAltAny,
+	GrabAltAny
 };
 
 static int tabcode = 0x17;
-//static int altcode = 0x40;
-//static int pgupcode = 0x63;
-//static int pgdowncode = 0x69;
+/*static int altcode = 0x40; */
+/*static int pgupcode = 0x63; */
+/*static int pgdowncode = 0x69; */
 
 static void alttab(int shift);
 
@@ -32,9 +32,9 @@
 	for(i=0; i<num_screens; i++){
 		XGrabKey(dpy, tabcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync);
 		XGrabKey(dpy, tabcode, Mod1Mask|ShiftMask, screens[i].root, 0, GrabModeSync, GrabModeAsync);
-	//	XGrabKey(dpy, pgupcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync);
-	//	XGrabKey(dpy, pgdowncode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync);
-	//	XGrabKey(dpy, altcode, 0, screens[i].root, 0, GrabModeSync, GrabModeAsync);
+	/*	XGrabKey(dpy, pgupcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); */
+	/*	XGrabKey(dpy, pgdowncode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); */
+	/*	XGrabKey(dpy, altcode, 0, screens[i].root, 0, GrabModeSync, GrabModeAsync); */
 	}
 }
 
@@ -60,6 +60,6 @@
 alttab(int shift)
 {
 	shuffle(shift);
-//	fprintf(stderr, "%sTab\n", shift ? "Back" : "");
+/*	fprintf(stderr, "%sTab\n", shift ? "Back" : ""); */
 }
 
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c
index d20c3a0..afb2bb8 100644
--- a/src/cmd/rio/main.c
+++ b/src/cmd/rio/main.c
@@ -18,7 +18,7 @@
 
 char	*version[] =
 {
-	"rio version 1.0, Copyright (c) 1994-1996 David Hogan, (c) 2004 Russ Cox", 0,
+	"rio version 1.0, Copyright (c) 1994-1996 David Hogan, (c) 2004 Russ Cox", 0
 };
 
 Display 		*dpy;
@@ -62,7 +62,7 @@
 	"9x15bold",
 	"fixed",
 	"*",
-	0,
+	0
 };
 
 void
diff --git a/src/cmd/rio/menu.c b/src/cmd/rio/menu.c
index eb92b74..379291c 100644
--- a/src/cmd/rio/menu.c
+++ b/src/cmd/rio/menu.c
@@ -3,6 +3,7 @@
  */
 
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
+#define _SVID_SOURCE 1	/* putenv in glibc */
 #include <stdio.h>
 #include <signal.h>
 #include <unistd.h>
@@ -24,7 +25,7 @@
 
 Client * currents[NUMVIRTUALS] =
 {
-	NULL, NULL, NULL, NULL, 
+	NULL, NULL, NULL, NULL
 };
 
 char	*b2items[NUMVIRTUALS+1] =
@@ -41,12 +42,12 @@
 	"Ten",
 	"Eleven",
 	"Twelve",
-	0,
+	0
 };
 
 Menu b2menu = 
 {
-	b2items,
+	b2items
 };
 
 char	*b3items[B3FIXED+MAXHIDDEN+1] =
@@ -56,7 +57,7 @@
 	"Move",
 	"Delete",
 	"Hide",
-	0,
+	0
 };
 
 enum
@@ -70,12 +71,12 @@
 
 Menu	b3menu =
 {
-	b3items,
+	b3items
 };
 
 Menu	egg =
 {
-	version,
+	version
 };
 
 void
diff --git a/src/cmd/sam/buff.c b/src/cmd/sam/buff.c
index 9a525b6..c32c2ef 100644
--- a/src/cmd/sam/buff.c
+++ b/src/cmd/sam/buff.c
@@ -2,7 +2,7 @@
 
 enum
 {
-	Slop = 100,	/* room to grow with reallocation */
+	Slop = 100	/* room to grow with reallocation */
 };
 
 static
diff --git a/src/cmd/sam/cmd.c b/src/cmd/sam/cmd.c
index aa35695..a5b636a 100644
--- a/src/cmd/sam/cmd.c
+++ b/src/cmd/sam/cmd.c
@@ -37,7 +37,7 @@
 	'|',	0,	0,	0,	0,	aDot,	0,	linex,	plan9_cmd,
 	'=',	0,	0,	0,	0,	aDot,	0,	linex,	eq_cmd,
 	'c'|0x100,0,	0,	0,	0,	aNo,	0,	wordx,	cd_cmd,
-	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0
 };
 Cmd	*parsecmd(int);
 Addr	*compoundaddr(void);
diff --git a/src/cmd/sam/error.c b/src/cmd/sam/error.c
index d19b962..eb4e48f 100644
--- a/src/cmd/sam/error.c
+++ b/src/cmd/sam/error.c
@@ -50,7 +50,7 @@
 	"temporary file too large",
 	"file is append-only",
 	"no destination for plumb message",
-	"internal read error in buffer load",
+	"internal read error in buffer load"
 };
 static char *wmsg[]={
 	/* warn_s */
@@ -63,7 +63,7 @@
 	"null characters elided",
 	"can't run pwd",
 	"last char not newline",
-	"exit status not 0",
+	"exit status not 0"
 };
 
 void
diff --git a/src/cmd/sam/errors.h b/src/cmd/sam/errors.h
index 7bf46ea..5e88f49 100644
--- a/src/cmd/sam/errors.h
+++ b/src/cmd/sam/errors.h
@@ -48,7 +48,7 @@
 	Etmpovfl,
 	Eappend,
 	Ecantplumb,
-	Ebufload,
+	Ebufload
 }Err;
 typedef enum Warn{
 	/* warn_s */
@@ -61,5 +61,5 @@
 	Wnulls,
 	Wpwd,
 	Wnotnewline,
-	Wbadstatus,
+	Wbadstatus
 }Warn;
diff --git a/src/cmd/sam/file.c b/src/cmd/sam/file.c
index bc3c0f4..875a26c 100644
--- a/src/cmd/sam/file.c
+++ b/src/cmd/sam/file.c
@@ -35,7 +35,7 @@
 enum
 {
 	Maxmerge = 50,
-	Undosize = sizeof(Undo)/sizeof(Rune),
+	Undosize = sizeof(Undo)/sizeof(Rune)
 };
 
 static Merge	merge;
diff --git a/src/cmd/sam/io.c b/src/cmd/sam/io.c
index 95c2e0c..8740c7c 100644
--- a/src/cmd/sam/io.c
+++ b/src/cmd/sam/io.c
@@ -223,7 +223,7 @@
 	char **av;
 	int ac;
 
-	// count args
+	/* count args */
 	for(av = argv; *av; av++)
 		;
 	av = malloc(sizeof(char*)*((av-argv) + 5));
diff --git a/src/cmd/sam/mesg.c b/src/cmd/sam/mesg.c
index 8edd4b2..01016ce 100644
--- a/src/cmd/sam/mesg.c
+++ b/src/cmd/sam/mesg.c
@@ -46,7 +46,7 @@
 	[Hsnarflen]	"Hsnarflen",
 	[Hack]		"Hack",
 	[Hexit]		"Hexit",
-	[Hplumb]		"Hplumb",
+	[Hplumb]		"Hplumb"
 };
 
 char *tname[] = {
@@ -72,7 +72,7 @@
 	[Tsetsnarf]	"Tsetsnarf",
 	[Tack]		"Tack",
 	[Texit]		"Texit",
-	[Tplumb]		"Tplumb",
+	[Tplumb]		"Tplumb"
 };
 
 void
diff --git a/src/cmd/sam/mesg.h b/src/cmd/sam/mesg.h
index 6e34f66..2344149 100644
--- a/src/cmd/sam/mesg.h
+++ b/src/cmd/sam/mesg.h
@@ -34,7 +34,7 @@
 	Tack,		/* acknowledge Hack */
 	Texit,		/* exit */
 	Tplumb,		/* send plumb message */
-	TMAX,
+	TMAX
 }Tmesg;
 /*
  * Messages originating at the host
@@ -67,7 +67,7 @@
 	Hack,		/* request acknowledgement */
 	Hexit,
 	Hplumb,		/* return plumb message to terminal - version 1 */
-	HMAX,
+	HMAX
 }Hmesg;
 typedef struct Header{
 	uchar	type;		/* one of the above */
diff --git a/src/cmd/sam/parse.h b/src/cmd/sam/parse.h
index 12f293f..d5fabf1 100644
--- a/src/cmd/sam/parse.h
+++ b/src/cmd/sam/parse.h
@@ -48,7 +48,7 @@
 enum Defaddr{	/* default addresses */
 	aNo,
 	aDot,
-	aAll,
+	aAll
 };
 
 int	nl_cmd(File*, Cmd*), a_cmd(File*, Cmd*), b_cmd(File*, Cmd*);
diff --git a/src/cmd/sam/sam.h b/src/cmd/sam/sam.h
index eefb4b3..fa86efd 100644
--- a/src/cmd/sam/sam.h
+++ b/src/cmd/sam/sam.h
@@ -42,7 +42,7 @@
 {
 	Clean =		' ',
 	Dirty =		'\'',
-	Unread =	'-',
+	Unread =	'-'
 };
 
 struct Range
@@ -97,7 +97,7 @@
 	Maxblock = 	8*1024,
 
 	BUFSIZE = Maxblock,	/* size from fbufalloc() */
-	RBUFSIZE = BUFSIZE/sizeof(Rune),
+	RBUFSIZE = BUFSIZE/sizeof(Rune)
 };
 
 
@@ -108,7 +108,7 @@
 	Insert		= 'i',
 	Filename	= 'f',
 	Dot		= 'D',
-	Mark		= 'm',
+	Mark		= 'm'
 };
 
 struct Block
@@ -168,10 +168,12 @@
 	int		mod;		/* file appears modified in menu */
 	char		rescuing;	/* sam exiting; this file unusable */
 
+#if 0
 //	Text		*curtext;	/* most recently used associated text */
 //	Text		**text;		/* list of associated texts */
 //	int		ntext;
 //	int		dumpid;		/* used in dumping zeroxed windows */
+#endif
 
 	Posn		hiposn;		/* highest address touched this Mod */
 	Address		dot;		/* current position */
@@ -187,10 +189,10 @@
 	long		prevseq;
 	int		prevmod;
 };
-//File*		fileaddtext(File*, Text*);
+/*File*		fileaddtext(File*, Text*); */
 void		fileclose(File*);
 void		filedelete(File*, uint, uint);
-//void		filedeltext(File*, Text*);
+/*void		filedeltext(File*, Text*); */
 void		fileinsert(File*, uint, Rune*, uint);
 uint		fileload(File*, uint, int, int*);
 void		filemark(File*);
diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c
index 2505f85..a745a5b 100644
--- a/src/cmd/sam/unix.c
+++ b/src/cmd/sam/unix.c
@@ -128,7 +128,7 @@
 void
 hup(int sig)
 {
-        panicking = 1; // ???
+        panicking = 1; /* ??? */
         rescue();
         exit(1);
 }
@@ -137,7 +137,7 @@
 notify(void(*f)(void *, char *))
 {
         signal(SIGINT, SIG_IGN);
-        signal(SIGPIPE, SIG_IGN);  // XXX - bpipeok?
+        signal(SIGPIPE, SIG_IGN);  /* XXX - bpipeok? */
         signal(SIGHUP, hup);
         return 1;
 }
diff --git a/src/cmd/samterm/flayer.h b/src/cmd/samterm/flayer.h
index 41306f7..62c9807 100644
--- a/src/cmd/samterm/flayer.h
+++ b/src/cmd/samterm/flayer.h
@@ -1,11 +1,11 @@
 typedef enum Vis{
 	None=0,
 	Some,
-	All,
+	All
 }Vis;
 
 enum{
-	Clicktime=1000,		/* one second */
+	Clicktime=1000		/* one second */
 };
 
 typedef struct Flayer Flayer;
diff --git a/src/cmd/samterm/menu.c b/src/cmd/samterm/menu.c
index 18070a8..7dcf5af 100644
--- a/src/cmd/samterm/menu.c
+++ b/src/cmd/samterm/menu.c
@@ -59,7 +59,7 @@
 	"zerox",
 	"resize",
 	"close",
-	"write",
+	"write"
 };
 
 Menu	menu2 =	{0, genmenu2};
diff --git a/src/cmd/samterm/samterm.h b/src/cmd/samterm/samterm.h
index e4803d5..04de4b9 100644
--- a/src/cmd/samterm/samterm.h
+++ b/src/cmd/samterm/samterm.h
@@ -53,7 +53,7 @@
 	RMouse,
 	RPlumb,
 	RResize,
-	NRes,
+	NRes
 };
 
 extern int	protodebug;
diff --git a/src/cmd/scat/bitinput.c b/src/cmd/scat/bitinput.c
index b4bd286..ec37e0d 100644
--- a/src/cmd/scat/bitinput.c
+++ b/src/cmd/scat/bitinput.c
@@ -11,7 +11,7 @@
 	 3,  3,  3,  3,  5,  5,  5,  5,
 	10, 10, 10, 10, 12, 12, 12, 12,
 	15, 15, 15, 15,  6,  6,  7,  7,
-	 9,  9, 11, 11, 13, 13,  0, 14,
+	 9,  9, 11, 11, 13, 13,  0, 14
 };
 
 static int huflens[] = {
@@ -22,7 +22,7 @@
 	4, 4, 4, 4, 4, 4, 4, 4,
 	4, 4, 4, 4, 4, 4, 4, 4,
 	4, 4, 4, 4, 5, 5, 5, 5,
-	5, 5, 5, 5, 5, 5, 6, 6,
+	5, 5, 5, 5, 5, 5, 6, 6
 };
 
 static	int	buffer;
diff --git a/src/cmd/scat/desc.c b/src/cmd/scat/desc.c
index 968229c..0cbf1de 100644
--- a/src/cmd/scat/desc.c
+++ b/src/cmd/scat/desc.c
@@ -313,7 +313,7 @@
 	"vs",	"very suddenly",
 	"vv",	"very very",
 	"zeta",	"ζ",
-	0,	0,
+	0,	0
 };
 
 /*&
diff --git a/src/cmd/scat/display.c b/src/cmd/scat/display.c
index 11642e5..739fca8 100644
--- a/src/cmd/scat/display.c
+++ b/src/cmd/scat/display.c
@@ -25,7 +25,7 @@
 		close(p[1]);
 		dup(p[0], 0);
 		close(p[0]);
-	//	execl("/bin/page", "page", "-w", 0);
+	/*	execl("/bin/page", "page", "-w", 0); */
 		execlp("img", "img", 0);
 		fprint(2, "exec failed: %r\n");
 		exits("exec");
@@ -43,8 +43,8 @@
 				i = n;
 			if(write(p[1], a, i)!=i)
 				fprint(2, "write error: %r\n");
-		//	if(i == 8192)	/* page aligned */
-		//		segfree(a, i);
+		/*	if(i == 8192)	/* page aligned */ */
+		/*		segfree(a, i); */
 			n -= i;
 			a += i;
 		}
@@ -74,7 +74,7 @@
 		dup(p[0], 0);
 		close(p[0]);
 		execlp("img", "img", 0);
-	//	execl("/bin/page", "page", "-w", 0);
+	/*	execl("/bin/page", "page", "-w", 0); */
 		fprint(2, "exec failed: %r\n");
 		exits("exec");
 
diff --git a/src/cmd/scat/plate.h b/src/cmd/scat/plate.h
index 4d10bb5..f2786f6 100644
--- a/src/cmd/scat/plate.h
+++ b/src/cmd/scat/plate.h
@@ -67,7 +67,7 @@
 	Ppltdecd,
 	Ppltdecm,
 	Ppltdecs,
-	Pnparam,
+	Pnparam
 };
 
 typedef	struct	Plate	Plate;
diff --git a/src/cmd/scat/scat.c b/src/cmd/scat/scat.c
index 24ff4e2..f8c1ee6 100644
--- a/src/cmd/scat/scat.c
+++ b/src/cmd/scat/scat.c
@@ -73,7 +73,7 @@
 	if(display != nil){
 		closedisplay(display);
 		/* automatic refresh of rio window is triggered by mouse */
-	//	close(open("/dev/mouse", OREAD));
+	/*	close(open("/dev/mouse", OREAD)); */
 	}
 	return;
 }
@@ -1338,7 +1338,7 @@
 [Uncertain]	"?",
 [Nonexistent]	"-",
 [Unknown]	" ",
-[PlateDefect]	"PD",
+[PlateDefect]	"PD"
 };
 
 char*
diff --git a/src/cmd/scat/sky.h b/src/cmd/scat/sky.h
index cd2b6e8..5304585 100644
--- a/src/cmd/scat/sky.h
+++ b/src/cmd/scat/sky.h
@@ -63,7 +63,7 @@
 	/* internal */
 	NGCN,
 	PatchC,
-	NONGC,
+	NONGC
 }Type;
 
 enum
@@ -128,7 +128,7 @@
 	Ppltdecd,
 	Ppltdecm,
 	Ppltdecs,
-	Pnparam,
+	Pnparam
 };
 
 #define	UNKNOWNMAG	32767
diff --git a/src/cmd/scat/strings.c b/src/cmd/scat/strings.c
index e60246c..fa078f8 100644
--- a/src/cmd/scat/strings.c
+++ b/src/cmd/scat/strings.c
@@ -1,13 +1,13 @@
 char *greek[]={ 0,	/* 1-indexed */
 	"alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta",
 	"iota", "kappa", "lambda", "mu", "nu", "xsi", "omicron", "pi", "rho",
-	"sigma", "tau", "upsilon", "phi", "chi", "psi", "omega",
+	"sigma", "tau", "upsilon", "phi", "chi", "psi", "omega"
 };
 
 Rune greeklet[]={ 0,
 	0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7, 0x3b8, 0x3b9, 0x3ba, 0x3bb,
 	0x3bc, 0x3bd, 0x3be, 0x3bf, 0x3c0, 0x3c1, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7,
-	0x3c8, 0x3c9,
+	0x3c8, 0x3c9
 };
 
 char *constel[]={ 0,	/* 1-indexed */
@@ -19,7 +19,7 @@
 	"lyn", "lyr", "men", "mic", "mon", "mus", "nor", "oct", "oph", "ori",
 	"pav", "peg", "per", "phe", "pic", "psa", "psc", "pup", "pyx", "ret",
 	"scl", "sco", "sct", "ser", "sex", "sge", "sgr", "tau", "tel", "tra",
-	"tri", "tuc", "uma", "umi", "vel", "vir", "vol", "vul",
+	"tri", "tuc", "uma", "umi", "vel", "vir", "vol", "vul"
 };
 Name names[]={
 	"gx",	Galaxy,
@@ -48,5 +48,5 @@
 	"nonexistent",	Nonexistent,
 	"unknown",	Unknown,
 	"platedefect",	PlateDefect,
-	0,		0,
+	0,		0
 };
diff --git a/src/cmd/sed.c b/src/cmd/sed.c
index 182163e..ddbcbf8 100644
--- a/src/cmd/sed.c
+++ b/src/cmd/sed.c
@@ -16,7 +16,7 @@
 	LBSIZE		= 8192,		/* input line size */
 	LABSIZE		= 50,		/* max label name size */
 	MAXSUB		= 10,		/* max number of sub reg exp */
-	MAXFILES	= 120,		/* max output files */
+	MAXFILES	= 120		/* max output files */
 };
 	/* An address is a line #, a R.E., "$", a reference to the last
 	 * R.E., or nothing.
@@ -27,7 +27,7 @@
 		A_DOL,
 		A_LINE,
 		A_RE,
-		A_LAST,
+		A_LAST
 	}type;
 	union {
 		long line;		/* Line # */
diff --git a/src/cmd/sftpcache.c b/src/cmd/sftpcache.c
index 0579484..3f8ea16 100644
--- a/src/cmd/sftpcache.c
+++ b/src/cmd/sftpcache.c
@@ -179,9 +179,9 @@
 		if(fd < 0)
 			continue;
 		for(;;){
-		//	alarm(1000);
+		/*	alarm(1000); */
 			n = readstr(fd, cmd, sizeof cmd);
-		//	alarm(0);
+		/*	alarm(0); */
 			if(n <= 0)
 				break;
 			dprint("CMD %s\n", cmd);
diff --git a/src/cmd/snarfer/snarfer.c b/src/cmd/snarfer/snarfer.c
index ab36910..6a51d72 100644
--- a/src/cmd/snarfer/snarfer.c
+++ b/src/cmd/snarfer/snarfer.c
@@ -54,7 +54,7 @@
 AUTOLIB(draw)	/* to cause link of X11 */
 
 enum {
-	SnarfSize = 65536,
+	SnarfSize = 65536
 };
 char snarf[3*SnarfSize+1];
 Rune rsnarf[SnarfSize+1];
diff --git a/src/cmd/sort.c b/src/cmd/sort.c
index e15672d..9606f90 100644
--- a/src/cmd/sort.c
+++ b/src/cmd/sort.c
@@ -34,7 +34,7 @@
 	NSzerofract,
 	NSexp,
 	NSexpsign,
-	NSexpdigit,
+	NSexpdigit
 };
 
 typedef	struct	Line	Line;
@@ -1583,7 +1583,7 @@
 
 enum
 {
-	Threshold	= 14,
+	Threshold	= 14
 };
 
 void	rsort4(Key***, ulong, int);
diff --git a/src/cmd/spell/sprog.c b/src/cmd/spell/sprog.c
index 0fe6794..6eaa026 100644
--- a/src/cmd/spell/sprog.c
+++ b/src/cmd/spell/sprog.c
@@ -229,7 +229,7 @@
 	stabz,
 	stabz,
 	staby,
-	stabz,
+	stabz
 };
 
 Ptab	ptaba[] =
@@ -417,7 +417,7 @@
 	ptabw,
 	ptabx,
 	ptaby,
-	ptabz,
+	ptabz
 };
 
 typedef struct {
@@ -1338,7 +1338,7 @@
 		close(f);
 		while(sp < 128*128)
 			spacep[++sp] = s;
-		*s = 0x80;		/* fence */
+		*s = (char)0x80;		/* fence */
 		return;
 	}
 	p = (c>>3) & 0xf;
diff --git a/src/cmd/tapefs/fs.c b/src/cmd/tapefs/fs.c
index 2d596a3..bc83648 100644
--- a/src/cmd/tapefs/fs.c
+++ b/src/cmd/tapefs/fs.c
@@ -31,21 +31,24 @@
 	*rread(Fid*), *rwrite(Fid*), *rclunk(Fid*),
 	*rremove(Fid*), *rstat(Fid*), *rwstat(Fid*);
 
-char 	*(*fcalls[])(Fid*) = {
-	[Tflush]	rflush,
-	[Tversion]		rversion,
-	[Tauth]	rauth,
-	[Tattach]	rattach,
-	[Twalk]		rwalk,
-	[Topen]		ropen,
-	[Tcreate]	rcreate,
-	[Tread]		rread,
-	[Twrite]	rwrite,
-	[Tclunk]	rclunk,
-	[Tremove]	rremove,
-	[Tstat]		rstat,
-	[Twstat]	rwstat,
-};
+char 	*(*fcalls[Tmax])(Fid*);
+void
+initfcalls(void)
+{
+	fcalls[Tflush]=	rflush;
+	fcalls[Tversion]=	rversion;
+	fcalls[Tauth]=	rauth;
+	fcalls[Tattach]=	rattach;
+	fcalls[Twalk]=	rwalk;
+	fcalls[Topen]=	ropen;
+	fcalls[Tcreate]=	rcreate;
+	fcalls[Tread]=	rread;
+	fcalls[Twrite]=	rwrite;
+	fcalls[Tclunk]=	rclunk;
+	fcalls[Tremove]=	rremove;
+	fcalls[Tstat]=	rstat;
+	fcalls[Twstat]=	rwstat;
+}
 
 char	Eperm[] =	"permission denied";
 char	Enotdir[] =	"not a directory";
@@ -76,6 +79,7 @@
 	char buf[TICKREQLEN];
 
 	fmtinstall('F', fcallfmt);
+	initfcalls();
 
 	defmnt = "tapefs";
 	ARGBEGIN{
diff --git a/src/cmd/tapefs/tapefs.h b/src/cmd/tapefs/tapefs.h
index bfe7593..a76cf38 100644
--- a/src/cmd/tapefs/tapefs.h
+++ b/src/cmd/tapefs/tapefs.h
@@ -9,7 +9,7 @@
 {
 	OPERM	= 0x3,		/* mask of all permission types in open mode */
 	Nram	= 512,
-	Maxbuf	= 8192,		/* max buffer size */
+	Maxbuf	= 8192		/* max buffer size */
 };
 
 typedef struct Fid Fid;
@@ -53,7 +53,7 @@
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 typedef struct idmap {
diff --git a/src/cmd/tapefs/zip.h b/src/cmd/tapefs/zip.h
index 9b703de..3444980 100644
--- a/src/cmd/tapefs/zip.h
+++ b/src/cmd/tapefs/zip.h
@@ -16,7 +16,8 @@
 	ZTrailInfo	= 1 << 3,	/* uncsize, csize, and crc are in trailer */
 	ZCompPatch	= 1 << 5,	/* compression patched data */
 
-	ZCrcPoly	= 0xedb88320,
+/*	ZCrcPoly	= 0xedb88320, */
+#define	ZCrcPoly	0xedb88320
 
 	/*
 	 * compression method
@@ -57,7 +58,7 @@
 	ZHeadCrc	= 4 + 2 + 2 + 2 + 2 + 2,
 	ZTrailSize	= 4 + 4 + 4,
 	ZCHeadSize	= 4 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 4 + 2 + 2 + 2 + 2 + 2 + 4 + 4,
-	ZECHeadSize	= 4 + 2 + 2 + 2 + 2 + 4 + 4 + 2,
+	ZECHeadSize	= 4 + 2 + 2 + 2 + 2 + 4 + 4 + 2
 };
 
 /*
diff --git a/src/cmd/tapefs/zipfs.c b/src/cmd/tapefs/zipfs.c
index 26bd4dc..5d3c433 100644
--- a/src/cmd/tapefs/zipfs.c
+++ b/src/cmd/tapefs/zipfs.c
@@ -19,7 +19,7 @@
 enum {
 	IS_MSDOS = 0,	/* creator OS (interpretation of external flags) */
 	IS_RDONLY = 1,	/* file was readonly (external flags) */
-	IS_TEXT = 1,	/* file was text  (internal flags) */
+	IS_TEXT = 1	/* file was text  (internal flags) */
 };
 
 typedef struct Block Block;
diff --git a/src/cmd/tar.c b/src/cmd/tar.c
index 1306ed4..c863aff 100644
--- a/src/cmd/tar.c
+++ b/src/cmd/tar.c
@@ -56,7 +56,7 @@
 
 	Nblock = 40,		/* maximum blocksize */
 	Dblock = 20,		/* default blocksize */
-	DEBUG = 0,
+	DEBUG = 0
 };
 
 /* POSIX link flags */
@@ -70,7 +70,7 @@
 	LF_BLK =	'4',
 	LF_DIR =	'5',
 	LF_FIFO =	'6',
-	LF_CONTIG =	'7',
+	LF_CONTIG =	'7'
 	/* 'A' - 'Z' are reserved for custom implementations */
 };
 
@@ -625,7 +625,7 @@
 			printed = 1;
 			fprint(2, "%s: storing large sizes in \"base 256\"\n", argv0);
 		}
-		hp->size[0] = Binsize;
+		hp->size[0] = (char)Binsize;
 		/* emit so-called `base 256' representation of size */
 		putbe((uchar *)hp->size+1, dir->length, sizeof hp->size - 2);
 		hp->size[sizeof hp->size - 1] = ' ';
diff --git a/src/cmd/tcs/8859.h b/src/cmd/tcs/8859.h
index 573dc44..32d7168 100644
--- a/src/cmd/tcs/8859.h
+++ b/src/cmd/tcs/8859.h
@@ -15,7 +15,7 @@
 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
 0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
-0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,
+0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
 };
 
 long tab8859_2[256] =
@@ -41,7 +41,7 @@
 0x0155,0x00e1,0x00e2,0x0103,0x00e4,0x013a,0x0107,0x00e7,
 0x010d,0x00e9,0x0119,0x00eb,0x011b,0x00ed,0x00ee,0x010f,
 0x0111,0x0144,0x0148,0x00f3,0x00f4,0x0151,0x00f6,0x00f7,
-0x0159,0x016f,0x00fa,0x0171,0x00fc,0x00fd,0x0163,0x02d9,
+0x0159,0x016f,0x00fa,0x0171,0x00fc,0x00fd,0x0163,0x02d9
 };
 
 long tab8859_3[256] =
@@ -67,7 +67,7 @@
 0x00e0,0x00e1,0x00e2,    -1,0x00e4,0x010b,0x0109,0x00e7,
 0x00e8,0x00e9,0x00ea,0x00eb,0x00ec,0x00ed,0x00ee,0x00ef,
     -1,0x00f1,0x00f2,0x00f3,0x00f4,0x0121,0x00f6,0x00f7,
-0x011d,0x00f9,0x00fa,0x00fb,0x00fc,0x016d,0x015d,0x02d9,
+0x011d,0x00f9,0x00fa,0x00fb,0x00fc,0x016d,0x015d,0x02d9
 };
 
 long tab8859_4[256] =
@@ -93,7 +93,7 @@
 0x0101,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x012f,
 0x010d,0x00e9,0x0119,0x00eb,0x0117,0x00ed,0x00ee,0x012b,
 0x0111,0x0146,0x014d,0x0137,0x00f4,0x00f5,0x00f6,0x00f7,
-0x00f8,0x0173,0x00fa,0x00fb,0x00fc,0x0169,0x016b,0x02d9,
+0x00f8,0x0173,0x00fa,0x00fb,0x00fc,0x0169,0x016b,0x02d9
 };
 
 long tab8859_5[256] =
@@ -119,7 +119,7 @@
 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
 0x0448,0x0449,0x044a,0x044b,0x044c,0x044d,0x044e,0x044f,
 0x2116,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,
-0x0458,0x0459,0x045a,0x045b,0x045c,0x00a7,0x045e,0x045f,
+0x0458,0x0459,0x045a,0x045b,0x045c,0x00a7,0x045e,0x045f
 };
 
 long tab8859_6[256] =
@@ -145,7 +145,7 @@
 0x0640,0x0641,0x0642,0x0643,0x0644,0x0645,0x0646,0x0647,
 0x0648,0x0649,0x064a,0x064b,0x064c,0x064d,0x064e,0x064f,
 0x0650,0x0651,0x0652,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1
 };
 
 long tab8859_7[256] =
@@ -171,7 +171,7 @@
 0x03b0,0x03b1,0x03b2,0x03b3,0x03b4,0x03b5,0x03b6,0x03b7,
 0x03b8,0x03b9,0x03ba,0x03bb,0x03bc,0x03bd,0x03be,0x03bf,
 0x03c0,0x03c1,0x03c2,0x03c3,0x03c4,0x03c5,0x03c6,0x03c7,
-0x03c8,0x03c9,0x03ca,0x03cb,0x03cc,0x03cd,0x03ce,    -1,
+0x03c8,0x03c9,0x03ca,0x03cb,0x03cc,0x03cd,0x03ce,    -1
 };
 
 long tab8859_8[256] =
@@ -197,7 +197,7 @@
 0x05d0,0x05d1,0x05d2,0x05d3,0x05d4,0x05d5,0x05d6,0x05d7,
 0x05d8,0x05d9,0x05da,0x05db,0x05dc,0x05dd,0x05de,0x05df,
 0x05e0,0x05e1,0x05e2,0x05e3,0x05e4,0x05e5,0x05e6,0x05e7,
-0x05e8,0x05e9,0x05ea,    -1,    -1,    -1,    -1,    -1,
+0x05e8,0x05e9,0x05ea,    -1,    -1,    -1,    -1,    -1
 };
 
 long tab8859_9[256] =
@@ -223,7 +223,7 @@
 0x00e0,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x00e7,
 0x00e8,0x00e9,0x00ea,0x00eb,0x00ec,0x00ed,0x00ee,0x00ef,
 0x011f,0x00f1,0x00f2,0x00f3,0x00f4,0x00f5,0x00f6,0x00f7,
-0x00f8,0x00f9,0x00fa,0x00fb,0x00fc,0x0131,0x015f,0x00ff,
+0x00f8,0x00f9,0x00fa,0x00fb,0x00fc,0x0131,0x015f,0x00ff
 };
 
 long tab8859_10[256] =	/* from dkuug.dk:i18n/charmaps/ISO_8859-10:1993 */
@@ -249,7 +249,7 @@
 0x0101,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x012f,
 0x010d,0x00e9,0x0119,0x00eb,0x0117,0x00ed,0x00ee,0x00ef,
 0x00f0,0x0146,0x014d,0x00f3,0x00f4,0x00f5,0x00f6,0x0169,
-0x00f8,0x0173,0x00fa,0x00fb,0x00fc,0x00fd,0x00fe,0x0138,
+0x00f8,0x0173,0x00fa,0x00fb,0x00fc,0x00fd,0x00fe,0x0138
 };
 
 
diff --git a/src/cmd/tcs/big5.c b/src/cmd/tcs/big5.c
index dda738f..051f1b0 100644
--- a/src/cmd/tcs/big5.c
+++ b/src/cmd/tcs/big5.c
@@ -1747,5 +1747,5 @@
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1
 };
diff --git a/src/cmd/tcs/conv_big5.c b/src/cmd/tcs/conv_big5.c
index d81c871..111bf5c 100644
--- a/src/cmd/tcs/conv_big5.c
+++ b/src/cmd/tcs/conv_big5.c
@@ -139,7 +139,7 @@
 			if(tab[r] != -1){
 				r = tab[r];
 				if(r >= BIG5MAX){
-					*p++ = 0xA1;
+					*p++ = (char)0xA1;
 					*p++ = r-BIG5MAX;
 					continue;
 				} else {
diff --git a/src/cmd/tcs/cyrillic.h b/src/cmd/tcs/cyrillic.h
index 569b490..b4460eb 100644
--- a/src/cmd/tcs/cyrillic.h
+++ b/src/cmd/tcs/cyrillic.h
@@ -23,7 +23,7 @@
 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
 0x0448,0x0449,0x044a,0x044b,0x044c,0x044d,0x044e,0x044f,
     -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1
 };
 long tabkoi8[256] =
 {
@@ -50,7 +50,7 @@
 0x042e,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
 0x0425,0x0418,0x0419,0x041a,0x041b,0x041c,0x041d,0x041e,
 0x041f,0x042f,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
-0x042c,0x042b,0x0417,0x0428,0x042d,0x0429,0x0427,0x042a,
+0x042c,0x042b,0x0417,0x0428,0x042d,0x0429,0x0427,0x042a
 };
 long tab866[256] =
 {
@@ -77,7 +77,7 @@
 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
 0x0448,0x0449,0x044a,0x044b,0x044c,0x044d,0x044e,0x044f,
 0x0401,0x0451,    -1,    -1,    -1,    -1,    -1,    -1,
-    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1
 };
 long tabav[256] =
 {
@@ -104,7 +104,7 @@
 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
 0x0448,0x0449,0x044a,0x044b,0x044c,0x044d,0x044e,0x044f,
 0x0401,0x0451,0x0301,0x0300,0x0301,0x0300,0x2192,0x2190,
-0x2193,0x2191,0x00f7,0x00b1,0x2116,0x00a4,    -1,    -1,
+0x2193,0x2191,0x00f7,0x00b1,0x2116,0x00a4,    -1,    -1
 };
 long tabov[256] =
 {
@@ -131,5 +131,5 @@
 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
 0x0448,0x0449,0x044a,0x044b,0x044c,0x044d,0x044e,0x044f,
 0x0401,0x0451,0x0301,0x0300,0x0301,0x0300,0x2192,0x2190,
-0x2193,0x2191,0x00f7,0x00b1,0x2116,0x00a4,    -1,    -1,
+0x2193,0x2191,0x00f7,0x00b1,0x2116,0x00a4,    -1,    -1
 };
diff --git a/src/cmd/tcs/font/bbits.c b/src/cmd/tcs/font/bbits.c
index 71c9b00..e488033 100644
--- a/src/cmd/tcs/font/bbits.c
+++ b/src/cmd/tcs/font/bbits.c
@@ -7,7 +7,7 @@
 enum {
 	Charsperfont	= 157,
 	Void1b		= (0xC6-0xA2)*Charsperfont+0x3f,
-	Void1e		= (0xC9-0xA2)*Charsperfont - 1 ,
+	Void1e		= (0xC9-0xA2)*Charsperfont - 1 
 };
 
 Bitmap *
diff --git a/src/cmd/tcs/font/main.c b/src/cmd/tcs/font/main.c
index acc3ea3..db25152 100644
--- a/src/cmd/tcs/font/main.c
+++ b/src/cmd/tcs/font/main.c
@@ -19,7 +19,7 @@
 	[Jis] { "../han/jis.bits", "../han/jis16.bits", kmap, kreadbits },
 	[Big5] { "no 24 bit file", "../han/big5.16.bits", bmap, breadbits },
 	[Gb_bdf] { "no 24 bit file", "../han/cclib16fs.bdf", gmap, greadbits },
-	[Gb_qw] { "no 24 bit file", "no 16bit file", gmap, qreadbits },
+	[Gb_qw] { "no 24 bit file", "no 16bit file", gmap, qreadbits }
 };
 
 void
diff --git a/src/cmd/tcs/gb.c b/src/cmd/tcs/gb.c
index b149b8f..c4cd017 100644
--- a/src/cmd/tcs/gb.c
+++ b/src/cmd/tcs/gb.c
@@ -1100,5 +1100,5 @@
 0x9e82,0x9e87,0x9e88,0x9e8b,0x9e92,0x93d6,0x9e9d,0x9e9f,
 0x9edb,0x9edc,0x9edd,0x9ee0,0x9edf,0x9ee2,0x9ee9,0x9ee7,
 0x9ee5,0x9eea,0x9eef,0x9f22,0x9f2c,0x9f2f,0x9f39,0x9f37,
-0x9f3d,0x9f3e,0x9f44,
+0x9f3d,0x9f3e,0x9f44
 };
diff --git a/src/cmd/tcs/kuten208.c b/src/cmd/tcs/kuten208.c
index 4f55152..d1366e8 100644
--- a/src/cmd/tcs/kuten208.c
+++ b/src/cmd/tcs/kuten208.c
@@ -1051,5 +1051,5 @@
 0x9f2c,0x9f3e,0x9f4a,0x9f52,0x9f54,0x9f63,0x9f5f,0x9f60,
 0x9f61,0x9f66,0x9f67,0x9f6c,0x9f6a,0x9f77,0x9f72,0x9f76,
 0x9f95,0x9f9c,0x9fa0,    -1,    -1,    -1,    -1,    -1,
-    -1,0x582f,0x69c7,0x9059,0x7464,0x51dc,0x7199,
+    -1,0x582f,0x69c7,0x9059,0x7464,0x51dc,0x7199
 };
diff --git a/src/cmd/tcs/kuten212.c b/src/cmd/tcs/kuten212.c
index c1ad93b..d00750f 100644
--- a/src/cmd/tcs/kuten212.c
+++ b/src/cmd/tcs/kuten212.c
@@ -971,5 +971,5 @@
 0x9f47,0x9f53,0x9f55,0x9f56,0x9f57,0x9f58,0x9f5a,0x9f5d,
 0x9f5e,0x9f68,0x9f69,0x9f6d,0x9f6e,0x9f6f,0x9f70,0x9f71,
 0x9f73,0x9f75,0x9f7a,0x9f7d,0x9f8f,0x9f90,0x9f91,0x9f92,
-0x9f94,0x9f96,0x9f97,0x9f9e,0x9fa1,0x9fa2,0x9fa3,0x9fa5,
+0x9f94,0x9f96,0x9f97,0x9f9e,0x9fa1,0x9fa2,0x9fa3,0x9fa5
 };
diff --git a/src/cmd/tcs/misc.h b/src/cmd/tcs/misc.h
index 84aa444..7e427c8 100644
--- a/src/cmd/tcs/misc.h
+++ b/src/cmd/tcs/misc.h
@@ -26,7 +26,7 @@
 0x03a6, 0x03b8, 0x2126, 0x03b4, 
                                 0x222e, 0x03c6, 0x2208, 0x220f, /* math */
 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
-0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af,
+0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af
 };
 long tabebcdic[256] =	/* from jhelling@cs.ruu.nl (Jeroen Hellingman) */
 {
@@ -61,7 +61,7 @@
 0x5c, -1,   0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
 0x59, 0x5a, -1,   -1,   -1,   -1,   -1,   -1,
 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-0x38, 0x39, -1,   -1,   -1,   -1,   -1,   -1,
+0x38, 0x39, -1,   -1,   -1,   -1,   -1,   -1
 };
 long tabmacroman[256] =	/* (modified via world.std.com!choupt) from mduerst@ifi.unizh.ch (Martin J. Du"rst) */
 {
@@ -88,7 +88,7 @@
 0x2021,0x00b7,0x201a,0x201e,0x2030,0x00c2,0x00ca,0x00c1,
 0x00cb,0x00c8,0x00cd,0x00ce,0x00cf,0x00cc,0x00d3,0x00d4,
 0xf7ff,0x00d2,0x00da,0x00db,0x00d9,0x0131,0x02c6,0x02dc,
-0x00af,0x02d8,0x02d9,0x02da,0x00b8,0x02dd,0x02db,0x02c7,
+0x00af,0x02d8,0x02d9,0x02da,0x00b8,0x02dd,0x02db,0x02c7
 };
 long tabnextstep[256] = 	/* From mduerst@ifi.unizh.ch (Martin J. Du"rst) */
 /* From NEXTSTEP Encoding Vector / Character Code Palette */
@@ -146,7 +146,7 @@
 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x00fe,
 0x00de, 0x00da, 0x00db, 0x00d9, 0x00fd, 0x00dd, 0x00af, 0x00b4,
 0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8,
-0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x220e, 0x00a0,
+0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x220e, 0x00a0
 };
 long tabsf1[256] =	/* From Kari.Hurtta@Helsinki.FI (Kari E. Hurtta) */
 {
@@ -165,7 +165,7 @@
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1
 };
 long tabsf2[256] =	/* from wirzeniu@cc.helsinki.fi (Lars Wirzenius) */
 {
@@ -184,7 +184,7 @@
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1
 };
 long tabtis620[256] =	/* from jhelling@cs.ruu.nl (Jeroen Hellingman) */
 {
@@ -209,7 +209,7 @@
 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
-0x0e58, 0x0e59, 0x0e5a, 0x0e5b, -1,     -1,     -1,     -1,
+0x0e58, 0x0e59, 0x0e5a, 0x0e5b, -1,     -1,     -1,     -1
 };
 long tabviet1[256] =	/* From jdo@sjc.mentorg.com (James Do) */
 {
diff --git a/src/cmd/tcs/ms.h b/src/cmd/tcs/ms.h
index 884557e..617dd19 100644
--- a/src/cmd/tcs/ms.h
+++ b/src/cmd/tcs/ms.h
@@ -53,7 +53,7 @@
 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
-0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp720[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -87,7 +87,7 @@
 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0641, 0x00B5, 0x0642,
 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A,
 0x2261, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, 0x0650, 0x2248,
-0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp737[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -121,7 +121,7 @@
 0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD,
 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
 0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248,
-0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp775[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -155,7 +155,7 @@
 0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144,
 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019,
 0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E,
-0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp850[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -189,7 +189,7 @@
 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
-0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp852[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -223,7 +223,7 @@
 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8,
-0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0,
+0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0
 };
 long tabcp855[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -257,7 +257,7 @@
 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443,
 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116,
 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D,
-0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0,
+0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0
 };
 long tabcp857[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -291,7 +291,7 @@
 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5,     -1,
 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
 0x00AD, 0x00B1,     -1, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
-0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp858[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -325,7 +325,7 @@
 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE,
 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8,
-0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp862[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -359,7 +359,7 @@
 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4,
 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
-0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
 };
 long tabcp866[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -393,7 +393,7 @@
 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E,
-0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0,
+0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
 };
 long tabcp874[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -427,7 +427,7 @@
 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
-0x0E58, 0x0E59, 0x0E5A, 0x0E5B,     -1,     -1,     -1,     -1,
+0x0E58, 0x0E59, 0x0E5A, 0x0E5B,     -1,     -1,     -1,     -1
 };
 long tabcp1250[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -461,7 +461,7 @@
 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
-0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
+0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
 };
 long tabcp1251[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -495,7 +495,7 @@
 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F
 };
 long tabcp1252[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -529,7 +529,7 @@
 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
+0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
 };
 long tabcp1253[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -563,7 +563,7 @@
 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
-0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE,     -1,
+0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE,     -1
 };
 long tabcp1254[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -597,7 +597,7 @@
 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
-0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF,
+0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF
 };
 long tabcp1255[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -631,7 +631,7 @@
 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
-0x05E8, 0x05E9, 0x05EA,     -1,     -1, 0x200E, 0x200F,     -1,
+0x05E8, 0x05E9, 0x05EA,     -1,     -1, 0x200E, 0x200F,     -1
 };
 long tabcp1256[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -665,7 +665,7 @@
 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
-0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2,
+0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2
 };
 long tabcp1257[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -699,7 +699,7 @@
 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
-0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9,
+0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9
 };
 long tabcp1258[256] = {
 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -733,5 +733,5 @@
 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
-0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF,
+0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
 };
diff --git a/src/cmd/tcs/tcs.c b/src/cmd/tcs/tcs.c
index 3775376..bb2f61f 100644
--- a/src/cmd/tcs/tcs.c
+++ b/src/cmd/tcs/tcs.c
@@ -326,7 +326,7 @@
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1
 };
 
 long tabmsdos[256] =	/* from jhelling@cs.ruu.nl (Jeroen Hellingman) */
@@ -354,7 +354,7 @@
 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, /* greek */
 0x03a6, 0x0398, 0x2126, 0x03b4, 0x221e, 0x2205, 0x2208, 0x2229,
 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, /* math */
-0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x220e, 0x00a0,
+0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x220e, 0x00a0
 };
 long tabmsdos2[256] =	/* from jhelling@cs.ruu.nl (Jeroen Hellingman) */
 {
@@ -383,7 +383,7 @@
 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, /* greek */
 0x03a6, 0x0398, 0x2126, 0x03b4, 0x221e, 0x2205, 0x2208, 0x2229,
 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, /* math */
-0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x220e, 0x00a0,
+0x00b0, 0x2022, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x220e, 0x00a0
 };
 struct convert convert[] =
 {	/* if two entries have the same name, put the from one first */
@@ -462,5 +462,5 @@
 	{ "viet1", "Vietnamese VSCII-1 (1993)", Table, (void *)tabviet1 },
 	{ "viet2", "Vietnamese VSCII-2 (1993)", Table, (void *)tabviet2 },
 	{ "viscii", "Vietnamese VISCII 1.1 (1992)", Table, (void *)tabviscii },
-	{ 0 },
+	{ 0 }
 };
diff --git a/src/cmd/troff/hytab.c b/src/cmd/troff/hytab.c
index 623637f..c2b0662 100644
--- a/src/cmd/troff/hytab.c
+++ b/src/cmd/troff/hytab.c
@@ -35,7 +35,7 @@
 	0140,0000,0020,0001,0020,0000,0000,0100,0001,0000,0300,0000,0000,
 	0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
 	0106,0041,0040,0147,0040,0000,0063,0041,0001,0102,0160,0002,0002,
-	0300,0000,0040,0017,0140,0017,0000,0240,0000,0000,0140,0000,0120,
+	0300,0000,0040,0017,0140,0017,0000,0240,0000,0000,0140,0000,0120
 };
 
 Uchar	bxxh[26][13] = {
@@ -64,7 +64,7 @@
 	0020,0000,0000,0000,0020,0000,0000,0000,0000,0000,0000,0000,0060,
 	0140,0000,0160,0000,0200,0000,0000,0140,0000,0000,0000,0000,0240,
 	0065,0042,0060,0200,0000,0210,0222,0146,0006,0204,0220,0012,0003,
-	0240,0000,0020,0000,0120,0000,0000,0200,0000,0000,0200,0000,0240,
+	0240,0000,0020,0000,0120,0000,0000,0200,0000,0000,0200,0000,0240
 };
 
 Uchar	xhx[26][13] = {
@@ -93,7 +93,7 @@
 	0037,0232,0157,0361,0040,0003,0125,0010,0001,0256,0000,0000,0340,
 	0377,0377,0377,0377,0377,0377,0377,0377,0377,0377,0377,0017,0277,
 	0253,0315,0257,0216,0377,0206,0146,0306,0371,0126,0232,0000,0004,
-	0057,0012,0100,0360,0160,0360,0000,0040,0000,0017,0157,0000,0176,
+	0057,0012,0100,0360,0160,0360,0000,0040,0000,0017,0157,0000,0176
 };
 
 Uchar	xxh[26][13] = {
@@ -122,5 +122,5 @@
 	0040,0005,0020,0000,0040,0313,0231,0030,0000,0140,0000,0017,0056,
 	0140,0000,0160,0000,0200,0000,0000,0140,0000,0000,0000,0017,0240,
 	0065,0042,0060,0040,0000,0206,0231,0146,0006,0224,0220,0017,0004,
-	0240,0000,0020,0000,0140,0000,0000,0220,0000,0000,0200,0017,0141,
+	0240,0000,0020,0000,0140,0000,0000,0220,0000,0000,0200,0017,0141
 };
diff --git a/src/cmd/troff/mkfile b/src/cmd/troff/mkfile
index 17eb14a..f465e76 100644
--- a/src/cmd/troff/mkfile
+++ b/src/cmd/troff/mkfile
@@ -27,7 +27,7 @@
 
 
 <$PLAN9/src/mkone
-CFLAGS=-c -DUNICODE
+CFLAGS=-DUNICODE
 
 TMACDIR='"tmac/tmac."'
 FONTDIR='"troff/font"'
diff --git a/src/cmd/troff/n1.c b/src/cmd/troff/n1.c
index 4c2bec4..c65898c 100644
--- a/src/cmd/troff/n1.c
+++ b/src/cmd/troff/n1.c
@@ -395,7 +395,7 @@
 	000,000,000,000,000,000,001,000, /* f */
 	000,000,000,000,000,000,000,000,
 	000,000,000,000,000,000,000,000,
-	000,000,000,000,000,000,000,000,
+	000,000,000,000,000,000,000,000
 };
 
 int realcbits(Tchar c)	/* return character bits, or MOTCH if motion */
@@ -717,7 +717,7 @@
 			if (ip)
 				goto again;
 		}
-//g2:
+/*g2: */
 		if (i >= 040)			/* zapped: && i < 0177 */
 			goto g4;
 		i = ifilt[i];
diff --git a/src/cmd/troff/n2.c b/src/cmd/troff/n2.c
index 22fd101..6495d33 100644
--- a/src/cmd/troff/n2.c
+++ b/src/cmd/troff/n2.c
@@ -4,6 +4,7 @@
  * output, cleanup
  */
 
+#define _BSD_SOURCE 1	/* popen */
 #include "tdef.h"
 #include "fns.h"
 #include "ext.h"
diff --git a/src/cmd/troff/n7.c b/src/cmd/troff/n7.c
index bcea354..17ab2bd 100644
--- a/src/cmd/troff/n7.c
+++ b/src/cmd/troff/n7.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE 1	/* isascii */
 #include "tdef.h"
 #include "fns.h"
 #include "ext.h"
diff --git a/src/cmd/troff/ni.c b/src/cmd/troff/ni.c
index a80cec6..ee09ed4 100644
--- a/src/cmd/troff/ni.c
+++ b/src/cmd/troff/ni.c
@@ -22,7 +22,7 @@
 	{ PAIR('s', 't') },
 	{ PAIR('s', 'b') },
 	{ PAIR('c', '.') },
-	{ PAIR('$', '$') },
+	{ PAIR('$', '$') }
 };
 
 
@@ -150,7 +150,7 @@
 	C(PAIR('s', 'y'), casesy),
 	C(PAIR('l', 'f'), caself),
 	C(PAIR('p', 't'), casept),
-	C(PAIR('g', 'd'), casegd),
+	C(PAIR('g', 'd'), casegd)
 };
 
 
@@ -228,7 +228,7 @@
 /* int	pendnf	 */	0,
 /* int	spread	 */	0,
 /* int	it	 */	0,	/* input trap count */
-/* int	itmac	 */	0,
+/* int	itmac	 */	0
 } };
 
 Env	*envp	= env;	/* start off in env 0 */
diff --git a/src/cmd/troff/suftab.c b/src/cmd/troff/suftab.c
index 1aa8a00..858a641 100644
--- a/src/cmd/troff/suftab.c
+++ b/src/cmd/troff/suftab.c
@@ -608,5 +608,5 @@
 	0,
 	0,
 	sufy,
-	0,
+	0
 };
diff --git a/src/cmd/troff2html/chars.h b/src/cmd/troff2html/chars.h
index 7db2f85..669ddb4 100644
--- a/src/cmd/troff2html/chars.h
+++ b/src/cmd/troff2html/chars.h
@@ -191,5 +191,5 @@
 	{ "ul", "_", },
 	{ "rn", " ", },
 	{ "**", "*", },
-	{ nil, nil, },
+	{ nil, nil, }
 };
diff --git a/src/cmd/troff2html/troff2html.c b/src/cmd/troff2html/troff2html.c
index bce4974..c0956c7 100644
--- a/src/cmd/troff2html/troff2html.c
+++ b/src/cmd/troff2html/troff2html.c
@@ -5,7 +5,7 @@
 
 enum{
 	Nfont = 11,
-	Wid = 20,	/* tmac.anhtml sets page width to 20" so we can recognize .nf text */
+	Wid = 20	/* tmac.anhtml sets page width to 20" so we can recognize .nf text */
 };
 
 typedef ulong Char;
@@ -24,13 +24,13 @@
 	Indent2,
 	Indent3,
 	Heading =	25,
-	Anchor =	26,	/* must be last */
+	Anchor =	26	/* must be last */
 };
 
 enum	/* magic emissions */
 {
 	Estring = 0,
-	Epp = 1<<16,
+	Epp = 1<<16
 };
 
 int attrorder[] = { Indent1, Indent2, Indent3, Heading, Anchor, Italic, Bold, CW };
@@ -73,7 +73,7 @@
 	"LuxiSans-Oblique",	"i",	Italic,
 	"CW",		"tt",		CW,
 	"LuxiMono",	"tt",		CW,
-	nil,	nil,
+	nil,	nil
 };
 
 #define TABLE "<table border=0 cellpadding=0 cellspacing=0>"
@@ -468,7 +468,7 @@
 
 	t = localtime(time(nil));
 	Bprint(&bout, TABLE "<tr height=20><td></table>\n");
-	Bprint(&bout, "<font size=-1><a href=\"http://www.lucent.com/copyright.html\">\n");
+	Bprint(&bout, "<font size=-1><a href=\"http:/*www.lucent.com/copyright.html\">\n"); */
 	Bprint(&bout, "Portions Copyright</A> &#169; %d Lucent Technologies.  All rights reserved.</font>\n", t->year+1900);
     }
 #endif
@@ -784,7 +784,7 @@
 			break;
 		case 'n':
 			setnum(b, "n1", -10000, 10000);
-			//Bprint(&bout, " N1=%d", v);
+			/*Bprint(&bout, " N1=%d", v); */
 			getc(b);	/* space separates */
 			setnum(b, "n2", -10000, 10000);
 			atnewline = 1;
@@ -815,7 +815,7 @@
 			break;
 		case 'H':
 			hp = setnum(b, "hpos", 0, 20000);
-			//Bprint(&bout, " H=%d ", hp);
+			/*Bprint(&bout, " H=%d ", hp); */
 			break;
 		case 'V':
 			vp = setnum(b, "vpos", 0, 10000);
diff --git a/src/cmd/units.y b/src/cmd/units.y
index 372295f..2127179 100644
--- a/src/cmd/units.y
+++ b/src/cmd/units.y
@@ -8,7 +8,7 @@
 	Ndim	= 15,		/* number of dimensions */
 	Nsym	= 40,		/* size of a name */
 	Nvar	= 203,		/* hash table size */
-	Maxe	= 695,		/* log of largest number */
+	Maxe	= 695		/* log of largest number */
 };
 
 typedef	struct	Var	Var;
diff --git a/src/cmd/upas/bayes/bayes.c b/src/cmd/upas/bayes/bayes.c
index a040429..91a8b4e 100644
--- a/src/cmd/upas/bayes/bayes.c
+++ b/src/cmd/upas/bayes/bayes.c
@@ -7,7 +7,7 @@
 enum
 {
 	MAXTAB = 256,
-	MAXBEST = 32,
+	MAXBEST = 32
 };
 
 typedef struct Table Table;
diff --git a/src/cmd/upas/bayes/dfa.c b/src/cmd/upas/bayes/dfa.c
index 80142de..ce4dc58 100644
--- a/src/cmd/upas/bayes/dfa.c
+++ b/src/cmd/upas/bayes/dfa.c
@@ -667,8 +667,8 @@
 		if(p == 0){
 			print("=== %s: bad regexp\n", argv[i]);
 		}
-	//	print("=== %s\n", argv[i]);
-	//	rdump(p);
+	/*	print("=== %s\n", argv[i]); */
+	/*	rdump(p); */
 		dp = dregcvt(p);
 		print("=== dfa\n");
 		dump(dp);
diff --git a/src/cmd/upas/bayes/dump.c b/src/cmd/upas/bayes/dump.c
index 9c7babd..404538c 100644
--- a/src/cmd/upas/bayes/dump.c
+++ b/src/cmd/upas/bayes/dump.c
@@ -55,8 +55,8 @@
 		if(p == 0){
 			print("=== %s: bad regexp\n", argv[i]);
 		}
-	//	print("=== %s\n", argv[i]);
-	//	rdump(p);
+	/*	print("=== %s\n", argv[i]); */
+	/*	rdump(p); */
 		dp = dregcvt(p);
 		print("=== dfa\n");
 		dump(dp);
diff --git a/src/cmd/upas/bayes/msgclass.c b/src/cmd/upas/bayes/msgclass.c
index bd3c571..999ba50 100644
--- a/src/cmd/upas/bayes/msgclass.c
+++ b/src/cmd/upas/bayes/msgclass.c
@@ -15,7 +15,7 @@
 {
 	MAXBEST = 32,
 	MAXLEN = 64,
-	MAXTAB = 256,
+	MAXTAB = 256
 };
 
 typedef struct Ndb Ndb;
@@ -163,7 +163,7 @@
 			w.p[i] = p;
 			totp += p;
 		}
-//fprint(2, "%s tot %d totp %g\n", s, tot, totp);
+/*fprint(2, "%s tot %d totp %g\n", s, tot, totp); */
 		if(tot < 2)
 			continue;
 		w.mp = 0.0;
diff --git a/src/cmd/upas/bayes/regen.c b/src/cmd/upas/bayes/regen.c
index 4f55009..cddf034 100644
--- a/src/cmd/upas/bayes/regen.c
+++ b/src/cmd/upas/bayes/regen.c
@@ -52,12 +52,12 @@
 
 	/* little things */
 	".",
-	"\n",
+	"\n"
 };
 
 char *keywords[] =
 {
-	"([a-zA-Z'`$!¡-￿]|[0-9]([.,][0-9])*)+",
+	"([a-zA-Z'`$!¡-￿]|[0-9]([.,][0-9])*)+"
 };
 
 int debug;
diff --git a/src/cmd/upas/common/appendfiletombox.c b/src/cmd/upas/common/appendfiletombox.c
index 98f5157..a718a83 100644
--- a/src/cmd/upas/common/appendfiletombox.c
+++ b/src/cmd/upas/common/appendfiletombox.c
@@ -1,7 +1,7 @@
 #include "common.h"
 
 enum {
-	Buffersize = 64*1024,
+	Buffersize = 64*1024
 };
 
 typedef struct Inbuf Inbuf;
diff --git a/src/cmd/upas/common/common.h b/src/cmd/upas/common/common.h
index 2a6925d..7a26dea 100644
--- a/src/cmd/upas/common/common.h
+++ b/src/cmd/upas/common/common.h
@@ -19,7 +19,7 @@
 	Errlen=	128,
 	Pathlen= 256,
 	
-	RetryCode = 2,
+	RetryCode = 2
 };
 
 /*
diff --git a/src/cmd/upas/common/libsys.c b/src/cmd/upas/common/libsys.c
index a1c2951..ced0003 100644
--- a/src/cmd/upas/common/libsys.c
+++ b/src/cmd/upas/common/libsys.c
@@ -805,9 +805,9 @@
 	return raddr;
 }
 
-//  create a file and 
-//	1) ensure the modes we asked for
-//	2) make gid == uid
+/*  create a file and  */
+/*	1) ensure the modes we asked for */
+/*	2) make gid == uid */
 static int
 docreate(char *file, int perm)
 {
@@ -815,7 +815,7 @@
 	Dir ndir;
 	Dir *d;
 
-	//  create the mbox
+	/*  create the mbox */
 	fd = create(file, OREAD, perm);
 	if(fd < 0){
 		fprint(2, "couldn't create %s\n", file);
@@ -835,7 +835,7 @@
 	return 0;
 }
 
-//  create a mailbox
+/*  create a mailbox */
 int
 creatembox(char *user, char *folder)
 {
@@ -852,14 +852,14 @@
 		mboxpath(buf, user, mailfile, 0);
 	}
 
-	// don't destroy existing mailbox
+	/* don't destroy existing mailbox */
 	if(access(s_to_c(mailfile), 0) == 0){
 		fprint(2, "mailbox already exists\n");
 		return -1;
 	}
 	fprint(2, "creating new mbox: %s\n", s_to_c(mailfile));
 
-	//  make sure preceding levels exist
+	/*  make sure preceding levels exist */
 	for(p = s_to_c(mailfile); p; p++) {
 		if(*p == '/')	/* skip leading or consecutive slashes */
 			continue;
@@ -874,7 +874,7 @@
 		*p = '/';
 	}
 
-	//  create the mbox
+	/*  create the mbox */
 	if(docreate(s_to_c(mailfile), 0622|DMAPPEND|DMEXCL) < 0)
 		return -1;
 
diff --git a/src/cmd/upas/fs/dat.h b/src/cmd/upas/fs/dat.h
index ffcbf5b..14208ed 100644
--- a/src/cmd/upas/fs/dat.h
+++ b/src/cmd/upas/fs/dat.h
@@ -79,7 +79,7 @@
 	Dfile,
 	Dignore,
 
-	PAD64=	'=',
+	PAD64=	'='
 };
 
 typedef struct Mailbox Mailbox;
@@ -194,7 +194,7 @@
 	Qmbox,
 	Qdir,
 	Qctl,
-	Qmboxctl,
+	Qmboxctl
 };
 
 #define PATH(id, f)	((((id)&0xfffff)<<10) | (f))
diff --git a/src/cmd/upas/fs/fs.c b/src/cmd/upas/fs/fs.c
index b68b8d2..728a95a 100644
--- a/src/cmd/upas/fs/fs.c
+++ b/src/cmd/upas/fs/fs.c
@@ -8,7 +8,7 @@
 
 enum
 {
-	OPERM	= 0x3,		// mask of all permission types in open mode
+	OPERM	= 0x3,		/* mask of all permission types in open mode */
 };
 
 typedef struct Fid Fid;
@@ -22,15 +22,15 @@
 	Fid	*next;
 	Mailbox	*mb;
 	Message	*m;
-	Message *mtop;		// top level message
+	Message *mtop;		/* top level message */
 
-	//finger pointers to speed up reads of large directories
-	long	foff;	// offset/DIRLEN of finger
-	Message	*fptr;	// pointer to message at off
-	int	fvers;	// mailbox version when finger was saved
+	/*finger pointers to speed up reads of large directories */
+	long	foff;	/* offset/DIRLEN of finger */
+	Message	*fptr;	/* pointer to message at off */
+	int	fvers;	/* mailbox version when finger was saved */
 };
 
-ulong	path;		// incremented for each new file
+ulong	path;		/* incremented for each new file */
 Fid	*fids;
 int	mfd[2];
 char	user[Elemlen];
@@ -81,7 +81,7 @@
 	[Tclunk]	rclunk,
 	[Tremove]	rremove,
 	[Tstat]		rstat,
-	[Twstat]	rwstat,
+	[Twstat]	rwstat
 };
 
 char	Eperm[] =	"permission denied";
@@ -125,12 +125,12 @@
 [Qunixdate]	"unixdate",
 [Qunixheader]	"unixheader",
 [Qctl]		"ctl",
-[Qmboxctl]	"ctl",
+[Qmboxctl]	"ctl"
 };
 
 enum
 {
-	Hsize=	1277,
+	Hsize=	1277
 };
 
 Hash	*htab[Hsize];
@@ -455,7 +455,7 @@
 	Qsender,
 	Qmessageid,
 	Qlines,
-	-1,
+	-1
 };
 
 static int
@@ -654,7 +654,7 @@
 	else
 		qlock(&mbllock);
 
-	// this must catch everything except . and ..
+	/* this must catch everything except . and .. */
 retry:
 	h = hlook(f->qid.path, name);
 	if(h != nil){
@@ -788,7 +788,7 @@
 		if(file != Qctl && file != Qmboxctl)
 			return Eperm;
 
-	// make sure we've decoded
+	/* make sure we've decoded */
 	if(file == Qbody){
 		if(f->m->decoded == 0)
 			decode(f->m);
@@ -865,7 +865,7 @@
 			off -= m;
 	}
 
-	// to avoid n**2 reads of the directory, use a saved finger pointer
+	/* to avoid n**2 reads of the directory, use a saved finger pointer */
 	if(f->mb->vers == f->fvers && off >= f->foff && f->fptr != nil){
 		msg = f->fptr;
 		pos = f->foff;
@@ -875,7 +875,7 @@
 	} 
 
 	for(; cnt > 0 && msg != nil; msg = msg->next){
-		// act like deleted files aren't there
+		/* act like deleted files aren't there */
 		if(msg->deleted)
 			continue;
 
@@ -890,7 +890,7 @@
 		pos += m;
 	}
 
-	// save a finger pointer for next read of the mbox directory
+	/* save a finger pointer for next read of the mbox directory */
 	f->foff = pos;
 	f->fptr = msg;
 	f->fvers = f->mb->vers;
@@ -1370,7 +1370,7 @@
 	return ep - p;
 }
 
-// rfc2047 non-ascii
+/* rfc2047 non-ascii */
 typedef struct Charset Charset;
 struct Charset {
 	char *name;
@@ -1386,7 +1386,7 @@
 	{ "big5",		4,	2, "big5", },
 	{ "iso-2022-jp",	11, 2, "jis", },
 	{ "windows-1251",	12,	2, "cp1251"},
-	{ "koi8-r",		6,	2, "koi8"},
+	{ "koi8-r",		6,	2, "koi8"}
 };
 
 int
@@ -1403,7 +1403,7 @@
 	e = token+len-2;
 	token += 2;
 
-	// bail if we don't understand the character set
+	/* bail if we don't understand the character set */
 	for(i = 0; i < nelem(charsets); i++)
 		if(cistrncmp(charsets[i].name, token, charsets[i].len) == 0)
 		if(token[charsets[i].len] == '?'){
@@ -1413,11 +1413,11 @@
 	if(i >= nelem(charsets))
 		return -1;
 
-	// bail if it doesn't fit 
+	/* bail if it doesn't fit  */
 	if(e-token > sizeof(decoded)-1)
 		return -1;
 
-	// bail if we don't understand the encoding
+	/* bail if we don't understand the encoding */
 	if(cistrncmp(token, "b?", 2) == 0){
 		token += 2;
 		len = dec64((uchar*)decoded, sizeof(decoded), token, e-token);
@@ -1483,7 +1483,7 @@
 	return nil;
 }
 
-// convert a header line
+/* convert a header line */
 String*
 stringconvert(String *s, char *uneaten, int len)
 {
@@ -1521,7 +1521,7 @@
 	e = m->hend;
 	s = nil;
 
-	// copy in good headers
+	/* copy in good headers */
 	while(cnt > 0 && p < e){
 		n = hdrlen(p, e);
 		if(ignore(p)){
@@ -1529,7 +1529,7 @@
 			continue;
 		}
 
-		// rfc2047 processing
+		/* rfc2047 processing */
 		s = stringconvert(s, p, n);
 		ns = s_len(s);
 		if(off > 0){
diff --git a/src/cmd/upas/fs/imap4.c b/src/cmd/upas/fs/imap4.c
index dd67f64..48119fa 100644
--- a/src/cmd/upas/fs/imap4.c
+++ b/src/cmd/upas/fs/imap4.c
@@ -15,7 +15,7 @@
 
 typedef struct Imap Imap;
 struct Imap {
-	char *freep;	// free this to free the strings below
+	char *freep;	/* free this to free the strings below */
 
 	char *host;
 	char *user;
@@ -38,7 +38,7 @@
 
 	Thumbprint *thumb;
 
-	// open network connection
+	/* open network connection */
 	Biobuf bin;
 	Biobuf bout;
 	int fd;
@@ -56,9 +56,9 @@
 	return s;
 }
 
-//
-// send imap4 command
-//
+/* */
+/* send imap4 command */
+/* */
 static void
 imap4cmd(Imap *imap, char *fmt, ...)
 {
@@ -89,7 +89,7 @@
 	EXISTS,
 	STATUS,
 	FETCH,
-	UNKNOWN,
+	UNKNOWN
 };
 
 static char *verblist[] = {
@@ -99,7 +99,7 @@
 [BYE]	"BYE",
 [EXISTS]	"EXISTS",
 [STATUS]	"STATUS",
-[FETCH]	"FETCH",
+[FETCH]	"FETCH"
 };
 
 static int
@@ -141,7 +141,7 @@
 		imap->size = n+1;
 	}
 	if(n >= imap->size){
-		// friggin microsoft - reallocate
+		/* friggin microsoft - reallocate */
 		i = imap->data - imap->base;
 		imap->base = erealloc(imap->base, i+n+1);
 		imap->data = imap->base + i;
@@ -150,10 +150,10 @@
 }
 
 
-//
-// get imap4 response line.  there might be various 
-// data or other informational lines mixed in.
-//
+/* */
+/* get imap4 response line.  there might be various  */
+/* data or other informational lines mixed in. */
+/* */
 static char*
 imap4resp(Imap *imap)
 {
@@ -176,7 +176,7 @@
 				fprint(2, "unexpected: %s\n", p);
 			break;
 
-		// ``unsolicited'' information; everything happens here.
+		/* ``unsolicited'' information; everything happens here. */
 		case '*':
 			if(p[1]!=' ')
 				continue;
@@ -196,19 +196,19 @@
 			case OK:
 			case NO:
 			case BAD:
-				// human readable text at p;
+				/* human readable text at p; */
 				break;
 			case BYE:
-				// early disconnect
-				// human readable text at p;
+				/* early disconnect */
+				/* human readable text at p; */
 				break;
 
-			// * 32 EXISTS
+			/* * 32 EXISTS */
 			case EXISTS:
 				imap->nmsg = n;
 				break;
 
-			// * STATUS Inbox (MESSAGES 2 UIDVALIDITY 960164964)
+			/* * STATUS Inbox (MESSAGES 2 UIDVALIDITY 960164964) */
 			case STATUS:
 				if(q = strstr(p, "MESSAGES"))
 					imap->nmsg = atoi(q+8);
@@ -217,9 +217,9 @@
 				break;
 
 			case FETCH:
-				// * 1 FETCH (uid 8889 RFC822.SIZE 3031 body[] {3031}
-				// <3031 bytes of data>
- 				// )
+				/* * 1 FETCH (uid 8889 RFC822.SIZE 3031 body[] {3031} */
+				/* <3031 bytes of data> */
+ 				/* ) */
 				if(strstr(p, "RFC822.SIZE") && strstr(p, "BODY[]")){
 					if((q = strchr(p, '{')) 
 					&& (n=strtol(q+1, &en, 0), *en=='}')){
@@ -257,16 +257,16 @@
 					break;
 				}
 
-				// * 1 FETCH (UID 1 RFC822.SIZE 511)
+				/* * 1 FETCH (UID 1 RFC822.SIZE 511) */
 				if(q=strstr(p, "RFC822.SIZE")){
 					imap->size = atoi(q+11);
 					break;
 				}
 
-				// * 1 FETCH (UID 1 RFC822.HEADER {496}
-				// <496 bytes of data>
- 				// )
-				// * 1 FETCH (UID 1 RFC822.HEADER "data")
+				/* * 1 FETCH (UID 1 RFC822.HEADER {496} */
+				/* <496 bytes of data> */
+ 				/* ) */
+				/* * 1 FETCH (UID 1 RFC822.HEADER "data") */
 				if(strstr(p, "RFC822.HEADER") || strstr(p, "RFC822.TEXT")){
 					if((q = strchr(p, '{')) 
 					&& (n=strtol(q+1, &en, 0), *en=='}')){
@@ -304,8 +304,8 @@
 					break;
 				}
 
-				// * 1 FETCH (UID 1)
-				// * 2 FETCH (UID 6)
+				/* * 1 FETCH (UID 1) */
+				/* * 2 FETCH (UID 6) */
 				if(q = strstr(p, "UID")){
 					if(imap->nuid < imap->muid)
 						imap->uid[imap->nuid++] = ((vlong)imap->validity<<32)|strtoul(q+3, nil, 10);
@@ -317,7 +317,7 @@
 				return line;
 			break;
 
-		case '9':		// response to our message
+		case '9':		/* response to our message */
 			op = p;
 			if(p[1]=='X' && strtoul(p+2, &p, 10)==imap->tag){
 				while(*p==' ')
@@ -343,9 +343,9 @@
 	return strncmp(resp, "OK", 2)==0;
 }
 
-//
-// log in to IMAP4 server, select mailbox, no SSL at the moment
-//
+/* */
+/* log in to IMAP4 server, select mailbox, no SSL at the moment */
+/* */
 static char*
 imap4login(Imap *imap)
 {
@@ -377,9 +377,9 @@
 	return nil;
 }
 
-//
-// push tls onto a connection
-//
+/* */
+/* push tls onto a connection */
+/* */
 int
 mypushtls(int fd)
 {
@@ -409,9 +409,9 @@
 	return p[1];
 }
 
-//
-// dial and handshake with the imap server
-//
+/* */
+/* dial and handshake with the imap server */
+/* */
 static char*
 imap4dial(Imap *imap)
 {
@@ -476,9 +476,9 @@
 	return nil;
 }
 
-//
-// close connection
-//
+/* */
+/* close connection */
+/* */
 #if 0  /* jpc */
 static void
 imap4hangup(Imap *imap)
@@ -489,9 +489,9 @@
 }
 #endif
 
-//
-// download a single message
-//
+/* */
+/* download a single message */
+/* */
 static char*
 imap4fetch(Mailbox *mb, Message *m)
 {
@@ -522,7 +522,7 @@
 
 	parse(m, 0, mb, 1);
 
-	// digest headers
+	/* digest headers */
 	sha1((uchar*)m->start, m->end - m->start, m->digest, nil);
 	for(i = 0; i < SHA1dlen; i++)
 		sprint(sdigest+2*i, "%2.2ux", m->digest[i]);
@@ -531,10 +531,10 @@
 	return nil;
 }
 
-//
-// check for new messages on imap4 server
-// download new messages, mark deleted messages
-//
+/* */
+/* check for new messages on imap4 server */
+/* download new messages, mark deleted messages */
+/* */
 static char*
 imap4read(Imap *imap, Mailbox *mb, int doplumb)
 {
@@ -565,7 +565,7 @@
 				l = &(*l)->next;
 				break;
 			}else{
-				// old mail, we don't have it anymore
+				/* old mail, we don't have it anymore */
 				if(doplumb)
 					mailplumb(mb, *l, 1);
 				(*l)->inmbox = 0;
@@ -576,18 +576,18 @@
 		if(ignore)
 			continue;
 
-		// new message
+		/* new message */
 		m = newmessage(mb->root);
 		m->mallocd = 1;
 		m->inmbox = 1;
 		m->imapuid = imap->uid[i];
 
-		// add to chain, will download soon
+		/* add to chain, will download soon */
 		*l = m;
 		l = &m->next;
 	}
 
-	// whatever is left at the end of the chain is gone
+	/* whatever is left at the end of the chain is gone */
 	while(*l != nil){
 		if(doplumb)
 			mailplumb(mb, *l, 1);
@@ -596,7 +596,7 @@
 		l = &(*l)->next;
 	}
 
-	// download new messages
+	/* download new messages */
 	t = imap->tag;
 	if(pipeline)
 	switch(rfork(RFPROC|RFMEM)){
@@ -631,7 +631,7 @@
 		}
 
 		if(s = imap4fetch(mb, m)){
-			// message disappeared?  unchain
+			/* message disappeared?  unchain */
 			fprint(2, "download %lud: %s\n", (ulong)m->imapuid, s);
 			delmessage(mb, m);
 			mb->root->subname--;
@@ -652,9 +652,9 @@
 	return nil;
 }
 
-//
-// sync mailbox
-//
+/* */
+/* sync mailbox */
+/* */
 static void
 imap4purge(Imap *imap, Mailbox *mb)
 {
@@ -682,9 +682,9 @@
 	}
 }
 
-//
-// connect to imap4 server, sync mailbox
-//
+/* */
+/* connect to imap4 server, sync mailbox */
+/* */
 static char*
 imap4sync(Mailbox *mb, int doplumb)
 {
@@ -705,7 +705,7 @@
 	/*
 	 * don't hang up; leave connection open for next time.
 	 */
-	// imap4hangup(imap);
+	/* imap4hangup(imap); */
 	mb->waketime = time(0) + imap->refreshtime;
 	return err;
 }
@@ -754,9 +754,9 @@
 	return Eimap4ctl;
 }
 
-//
-// free extra memory associated with mb
-//
+/* */
+/* free extra memory associated with mb */
+/* */
 static void
 imap4close(Mailbox *mb)
 {
@@ -771,9 +771,9 @@
 	free(imap);
 }
 
-//
-// open mailboxes of the form /imap/host/user
-//
+/* */
+/* open mailboxes of the form /imap/host/user */
+/* */
 char*
 imap4mbox(Mailbox *mb, char *path)
 {
@@ -818,20 +818,20 @@
 	mb->close = imap4close;
 	mb->ctl = imap4ctl;
 	mb->d = emalloc(sizeof(*mb->d));
-	//mb->fetch = imap4fetch;
+	/*mb->fetch = imap4fetch; */
 
 	return nil;
 }
 
-//
-// Formatter for %"
-// Use double quotes to protect white space, frogs, \ and "
-//
+/* */
+/* Formatter for %" */
+/* Use double quotes to protect white space, frogs, \ and " */
+/* */
 enum
 {
 	Qok = 0,
 	Qquote,
-	Qbackslash,
+	Qbackslash
 };
 
 static int
diff --git a/src/cmd/upas/fs/mbox.c b/src/cmd/upas/fs/mbox.c
index c539df8..2f48374 100644
--- a/src/cmd/upas/fs/mbox.c
+++ b/src/cmd/upas/fs/mbox.c
@@ -53,7 +53,7 @@
 [Mhead]	{ "content-type:", ctype, },
 	{ "content-transfer-encoding:", cencoding, },
 	{ "content-disposition:", cdisposition, },
-	{ 0, },
+	{ 0, }
 };
 
 /* static	void	fatal(char *fmt, ...); jpc */
@@ -76,13 +76,13 @@
 
 enum
 {
-	Chunksize = 1024,
+	Chunksize = 1024
 };
 
 Mailboxinit *boxinit[] = {
 	imap4mbox,
 	pop3mbox,
-	plan9mbox,
+	plan9mbox
 };
 
 char*
@@ -119,7 +119,7 @@
 	}
 
 	rv = nil;
-	// check for a mailbox type
+	/* check for a mailbox type */
 	for(i=0; i<nelem(boxinit); i++)
 		if((rv = (*boxinit[i])(mb, path)) != Enotme)
 			break;
@@ -128,13 +128,13 @@
 		return "bad path";
 	}
 
-	// on error, give up
+	/* on error, give up */
 	if(rv){
 		free(mb);
 		return rv;
 	}
 
-	// make sure name isn't taken
+	/* make sure name isn't taken */
 	qlock(&mbllock);
 	for(l = &mbl; *l != nil; l = &(*l)->next){
 		if(strcmp((*l)->name, mb->name) == 0){
@@ -150,7 +150,7 @@
 		}
 	}
 
-	// always try locking
+	/* always try locking */
 	mb->dolock = 1;
 
 	mb->refs = 1;
@@ -172,7 +172,7 @@
 	return rv;
 }
 
-// close the named mailbox
+/* close the named mailbox */
 void
 freembox(char *name)
 {
@@ -248,7 +248,7 @@
 		henter(PATH(m->id, Qdir), dirtab[i],
 			(Qid){PATH(m->id, i), 0, QTFILE}, m, mb);
 
-	// parse mime headers
+	/* parse mime headers */
 	p = m->header;
 	hl = s_new();
 	while(headerline(&p, hl)){
@@ -266,7 +266,7 @@
 	}
 	s_free(hl);
 
-	// the blank line isn't really part of the body or header
+	/* the blank line isn't really part of the body or header */
 	if(justmime){
 		m->mhend = p;
 		m->hend = m->header;
@@ -277,27 +277,27 @@
 		p++;
 	m->rbody = m->body = p;
 
-	// if type is text, get any nulls out of the body.  This is
-	// for the two seans and imap clients that get confused.
+	/* if type is text, get any nulls out of the body.  This is */
+	/* for the two seans and imap clients that get confused. */
 	if(strncmp(s_to_c(m->type), "text/", 5) == 0)
 		nullsqueeze(m);
 
-	//
-	// cobble together Unix-style from line
-	// for local mailbox messages, we end up recreating the
-	// original header.
-	// for pop3 messages, the best we can do is 
-	// use the From: information and the RFC822 date.
-	//
+	/* */
+	/* cobble together Unix-style from line */
+	/* for local mailbox messages, we end up recreating the */
+	/* original header. */
+	/* for pop3 messages, the best we can do is  */
+	/* use the From: information and the RFC822 date. */
+	/* */
 	if(m->unixdate == nil || strcmp(s_to_c(m->unixdate), "???") == 0
 	|| strcmp(s_to_c(m->unixdate), "Thu Jan 1 00:00:00 GMT 1970") == 0){
 		if(m->unixdate){
 			s_free(m->unixdate);
 			m->unixdate = nil;
 		}
-		// look for the date in the first Received: line.
-		// it's likely to be the right time zone (it's
-	 	// the local system) and in a convenient format.
+		/* look for the date in the first Received: line. */
+		/* it's likely to be the right time zone (it's */
+	 	/* the local system) and in a convenient format. */
 		if(cistrncmp(m->header, "received:", 9)==0){
 			if((q = strchr(m->header, ';')) != nil){
 				p = q;
@@ -314,7 +314,7 @@
 			}
 		}
 
-		// fall back on the rfc822 date	
+		/* fall back on the rfc822 date	 */
 		if(m->unixdate==nil && m->date822)
 			m->unixdate = date822tounix(s_to_c(m->date822));
 	}
@@ -322,10 +322,10 @@
 	if(m->unixheader != nil)
 		s_free(m->unixheader);
 
-	// only fake header for top-level messages for pop3 and imap4
-	// clients (those protocols don't include the unix header).
-	// adding the unix header all the time screws up mime-attached
-	// rfc822 messages.
+	/* only fake header for top-level messages for pop3 and imap4 */
+	/* clients (those protocols don't include the unix header). */
+	/* adding the unix header all the time screws up mime-attached */
+	/* rfc822 messages. */
 	if(!addfrom && !m->unixfrom){
 		m->unixheader = nil;
 		return;
@@ -365,7 +365,7 @@
 {
 	Message *nm;
 
-	// recurse
+	/* recurse */
 	if(strncmp(s_to_c(m->type), "multipart/", 10) == 0){
 		parseattachments(m, mb);
 	} else if(strcmp(s_to_c(m->type), "message/rfc822") == 0){
@@ -373,7 +373,7 @@
 		parseattachments(m, mb);
 		nm = m->part;
 
-		// promote headers
+		/* promote headers */
 		if(m->replyto822 == nil && m->from822 == nil && m->sender822 == nil){
 			m->from822 = promote(&nm->from822);
 			m->to822 = promote(&nm->to822);
@@ -399,7 +399,7 @@
 	Message *nm, **l;
 	char *p, *x;
 
-	// if there's a boundary, recurse...
+	/* if there's a boundary, recurse... */
 	if(m->boundary != nil){
 		p = m->body;
 		nm = nil;
@@ -442,7 +442,7 @@
 		return;
 	}
 
-	// if we've got an rfc822 message, recurse...
+	/* if we've got an rfc822 message, recurse... */
 	if(strcmp(s_to_c(m->type), "message/rfc822") == 0){
 		nm = newmessage(m);
 		m->part = nm;
@@ -496,11 +496,11 @@
 	for(; *p; p++){
 		c = *p;
 
-		// whitespace is ignored
+		/* whitespace is ignored */
 		if(!quoted && isspace(c) || c == '\r')
 			continue;
 
-		// strings are always treated as atoms
+		/* strings are always treated as atoms */
 		if(!quoted && c == '"'){
 			if(!addrdone && !incomment)
 				s_putc(s, c);
@@ -520,7 +520,7 @@
 			continue;
 		}
 
-		// ignore everything in an expicit comment
+		/* ignore everything in an expicit comment */
 		if(!quoted && c == '('){
 			incomment = 1;
 			continue;
@@ -532,7 +532,7 @@
 			continue;
 		}
 
-		// anticomments makes everything outside of them comments
+		/* anticomments makes everything outside of them comments */
 		if(!quoted && c == '<' && !inanticomment){
 			inanticomment = 1;
 			s = s_reset(s);
@@ -544,7 +544,7 @@
 			continue;
 		}
 
-		// commas separate addresses
+		/* commas separate addresses */
 		if(!quoted && c == ',' && !inanticomment){
 			s_terminate(s);
 			addrdone = 0;
@@ -555,10 +555,10 @@
 			continue;
 		}
 
-		// what's left is part of the address
+		/* what's left is part of the address */
 		s_putc(s, c);
 
-		// quoted characters are recognized only as characters
+		/* quoted characters are recognized only as characters */
 		if(c == '\\')
 			quoted = 1;
 		else
@@ -801,7 +801,7 @@
 	return m;
 }
 
-// delete a message from a mailbox
+/* delete a message from a mailbox */
 void
 delmessage(Mailbox *mb, Message *m)
 {
@@ -812,13 +812,13 @@
 	msgfreed++;
 
 	if(m->whole != m){
-		// unchain from parent
+		/* unchain from parent */
 		for(l = &m->whole->part; *l && *l != m; l = &(*l)->next)
 			;
 		if(*l != nil)
 			*l = m->next;
 
-		// clear out of name lookup hash table
+		/* clear out of name lookup hash table */
 		if(m->whole->whole == m->whole)
 			hfree(PATH(mb->id, Qmbox), m->name);
 		else
@@ -862,7 +862,7 @@
 	free(m);
 }
 
-// mark messages (identified by path) for deletion
+/* mark messages (identified by path) for deletion */
 void
 delmessages(int ac, char **av)
 {
@@ -1019,9 +1019,9 @@
 			*p = '_';
 }
 
-//
-// undecode message body
-//
+/* */
+/* undecode message body */
+/* */
 void
 decode(Message *m)
 {
@@ -1033,7 +1033,7 @@
 	switch(m->encoding){
 	case Ebase64:
 		len = m->bend - m->body;
-		i = (len*3)/4+1;	// room for max chars + null
+		i = (len*3)/4+1;	/* room for max chars + null */
 		x = emalloc(i);
 		len = dec64((uchar*)x, i, m->body, len);
 		if(m->ballocd)
@@ -1044,7 +1044,7 @@
 		break;
 	case Equoted:
 		len = m->bend - m->body;
-		x = emalloc(len+2);	// room for null and possible extra nl
+		x = emalloc(len+2);	/* room for null and possible extra nl */
 		len = decquoted(x, m->body, m->bend);
 		if(m->ballocd)
 			free(m->body);
@@ -1058,14 +1058,14 @@
 	m->decoded = 1;
 }
 
-// convert latin1 to utf
+/* convert latin1 to utf */
 void
 convert(Message *m)
 {
 	int len;
 	char *x;
 
-	// don't convert if we're not a leaf, not text, or already converted
+	/* don't convert if we're not a leaf, not text, or already converted */
 	if(m->converted)
 		return;
 	if(m->part != nil)
@@ -1161,7 +1161,7 @@
 enum
 {
 	Self=	1,
-	Hex=	2,
+	Hex=	2
 };
 uchar	tableqp[256];
 
@@ -1243,7 +1243,7 @@
 	if(in < e)
 		p = decquotedline(p, in, e-1);
 
-	// make sure we end with a new line
+	/* make sure we end with a new line */
 	if(*(p-1) != '\n'){
 		*p++ = '\n';
 		*p = 0;
@@ -1281,7 +1281,7 @@
 	return count;
 }
 
-// translate latin1 directly since it fits neatly in utf
+/* translate latin1 directly since it fits neatly in utf */
 int
 latin1toutf(char *out, char *in, char *e)
 {
@@ -1297,7 +1297,7 @@
 	return p - out;
 }
 
-// translate any thing else using the tcs program
+/* translate any thing else using the tcs program */
 int
 xtoutf(char *charset, char **out, char *in, char *e)
 {
@@ -1334,7 +1334,7 @@
 		dup(totcs[0], 0);
 		close(fromtcs[1]); close(totcs[0]);
 		dup(open("/dev/null", OWRITE), 2);
-		//jpc exec("/bin/tcs", av);
+		/*jpc exec("/bin/tcs", av); */
 		exec(unsharp("#9/bin/tcs"), av);
 		/* _exits(0); */
 		threadexits(nil);
@@ -1380,7 +1380,7 @@
 
 enum {
 	Winstart= 0x7f,
-	Winend= 0x9f,
+	Winend= 0x9f
 };
 
 Rune winchars[] = {
@@ -1388,7 +1388,7 @@
 	L'•', L'•', L'‚', L'ƒ', L'„', L'…', L'†', L'‡',
 	L'ˆ', L'‰', L'Š', L'‹', L'Œ', L'•', L'•', L'•',
 	L'•', L'‘', L'’', L'“', L'”', L'•', L'–', L'—',
-	L'˜', L'™', L'š', L'›', L'œ', L'•', L'•', L'Ÿ',
+	L'˜', L'™', L'š', L'›', L'œ', L'•', L'•', L'Ÿ'
 };
 
 int
@@ -1518,9 +1518,9 @@
 	plumbsend(fd, &p);
 }
 
-//
-// count the number of lines in the body (for imap4)
-//
+/* */
+/* count the number of lines in the body (for imap4) */
+/* */
 void
 countlines(Message *m)
 {
@@ -1573,15 +1573,15 @@
 }
 
 
-//
-// convert an RFC822 date into a Unix style date
-// for when the Unix From line isn't there (e.g. POP3).
-// enough client programs depend on having a Unix date
-// that it's easiest to write this conversion code once, right here.
-//
-// people don't follow RFC822 particularly closely,
-// so we use strtotm, which is a bunch of heuristics.
-//
+/* */
+/* convert an RFC822 date into a Unix style date */
+/* for when the Unix From line isn't there (e.g. POP3). */
+/* enough client programs depend on having a Unix date */
+/* that it's easiest to write this conversion code once, right here. */
+/* */
+/* people don't follow RFC822 particularly closely, */
+/* so we use strtotm, which is a bunch of heuristics. */
+/* */
 
 extern int strtotm(char*, Tm*);
 String*
diff --git a/src/cmd/upas/fs/plan9.c b/src/cmd/upas/fs/plan9.c
index 89ee292..3a5b448 100644
--- a/src/cmd/upas/fs/plan9.c
+++ b/src/cmd/upas/fs/plan9.c
@@ -5,7 +5,7 @@
 #include "dat.h"
 
 enum {
-	Buffersize = 64*1024,
+	Buffersize = 64*1024
 };
 
 typedef struct Inbuf Inbuf;
@@ -23,7 +23,7 @@
 {
 	int i, len;
 
-	// add to message (+ 1 in malloc is for a trailing null)
+	/* add to message (+ 1 in malloc is for a trailing null) */
 	if(m->lim - m->end < n){
 		if(m->start != nil){
 			i = m->end-m->start;
@@ -48,9 +48,9 @@
 	m->end += n;
 }
 
-//
-//  read in a single message
-//
+/* */
+/*  read in a single message */
+/* */
 static int
 readmessage(Message *m, Inbuf *inb)
 {
@@ -83,9 +83,9 @@
 			inb->wptr += i;
 		}
 
-		// look for end of message
+		/* look for end of message */
 		for(p = inb->rptr; p < inb->wptr; p = np+1){
-			// first part of search for '\nFrom '
+			/* first part of search for '\nFrom ' */
 			np = memchr(p, '\n', inb->wptr - p);
 			if(np == nil){
 				p = inb->wptr;
@@ -109,24 +109,24 @@
 			}
 		}
 
-		// add to message (+ 1 in malloc is for a trailing null)
+		/* add to message (+ 1 in malloc is for a trailing null) */
 		n = p - inb->rptr;
 		addtomessage(m, inb->rptr, n, done);
 		inb->rptr += n;
 	}
 
-	// if it doesn't start with a 'From ', this ain't a mailbox
+	/* if it doesn't start with a 'From ', this ain't a mailbox */
 	if(strncmp(m->start, "From ", 5) != 0)
 		return -1;
 
-	// dump trailing newline, make sure there's a trailing null
-	// (helps in body searches)
+	/* dump trailing newline, make sure there's a trailing null */
+	/* (helps in body searches) */
 	if(*(m->end-1) == '\n')
 		m->end--;
 	*m->end = 0;
 	m->bend = m->rbend = m->end;
 
-	// digest message
+	/* digest message */
 	sha1((uchar*)m->start, m->end - m->start, m->digest, nil);
 	for(i = 0; i < SHA1dlen; i++)
 		sprint(sdigest+2*i, "%2.2ux", m->digest[i]);
@@ -136,14 +136,14 @@
 }
 
 
-// throw out deleted messages.  return number of freshly deleted messages
+/* throw out deleted messages.  return number of freshly deleted messages */
 int
 purgedeleted(Mailbox *mb)
 {
 	Message *m, *next;
 	int newdels;
 
-	// forget about what's no longer in the mailbox
+	/* forget about what's no longer in the mailbox */
 	newdels = 0;
 	for(m = mb->root->part; m != nil; m = next){
 		next = m->next;
@@ -156,9 +156,9 @@
 	return newdels;
 }
 
-//
-//  read in the mailbox and parse into messages.
-//
+/* */
+/*  read in the mailbox and parse into messages. */
+/* */
 static char*
 _readmbox(Mailbox *mb, int doplumb, Mlock *lk)
 {
@@ -223,7 +223,7 @@
 	inb->rptr = inb->wptr = inb->data;
 	inb->fd = fd;
 
-	//  read new messages
+	/*  read new messages */
 	snprint(err, sizeof err, "reading '%s'", mb->path);
 	logmsg(err, nil);
 	for(;;){
@@ -238,10 +238,10 @@
 			break;
 		}
 
-		// merge mailbox versions
+		/* merge mailbox versions */
 		while(*l != nil){
 			if(memcmp((*l)->digest, m->digest, SHA1dlen) == 0){
-				// matches mail we already read, discard
+				/* matches mail we already read, discard */
 				logmsg("duplicate", *l);
 				delmessage(mb, m);
 				mb->root->subname--;
@@ -249,7 +249,7 @@
 				l = &(*l)->next;
 				break;
 			} else {
-				// old mail no longer in box, mark deleted
+				/* old mail no longer in box, mark deleted */
 				logmsg("disappeared", *l);
 				if(doplumb)
 					mailplumb(mb, *l, 1);
@@ -280,7 +280,7 @@
 	}
 	logmsg("mbox read", nil);
 
-	// whatever is left has been removed from the mbox, mark deleted
+	/* whatever is left has been removed from the mbox, mark deleted */
 	while(*l != nil){
 		if(doplumb)
 			mailplumb(mb, *l, 1);
@@ -380,9 +380,9 @@
 	return rv;
 }
 
-//
-//  look to see if we can open this mail box
-//
+/* */
+/*  look to see if we can open this mail box */
+/* */
 char*
 plan9mbox(Mailbox *mb, char *path)
 {
diff --git a/src/cmd/upas/fs/pop3.c b/src/cmd/upas/fs/pop3.c
index ebffcdd..da8021d 100644
--- a/src/cmd/upas/fs/pop3.c
+++ b/src/cmd/upas/fs/pop3.c
@@ -11,7 +11,7 @@
 
 typedef struct Pop Pop;
 struct Pop {
-	char *freep;	// free this to free the strings below
+	char *freep;	/* free this to free the strings below */
 
 	char *host;
 	char *user;
@@ -26,11 +26,11 @@
 	int notls;
 	int needssl;
 
-	// open network connection
+	/* open network connection */
 	Biobuf bin;
 	Biobuf bout;
 	int fd;
-	char *lastline;	// from Brdstr
+	char *lastline;	/* from Brdstr */
 
 	Thumbprint *thumb;
 };
@@ -45,11 +45,11 @@
 	return err;
 }
 
-//
-// get pop3 response line , without worrying
-// about multiline responses; the clients
-// will deal with that.
-//
+/* */
+/* get pop3 response line , without worrying */
+/* about multiline responses; the clients */
+/* will deal with that. */
+/* */
 static int
 isokay(char *s)
 {
@@ -124,7 +124,7 @@
 	TLSconn conn;
 
 	memset(&conn, 0, sizeof conn);
-	// conn.trace = pop3log;
+	/* conn.trace = pop3log; */
 	fd = tlsClient(pop->fd, &conn);
 	if(fd < 0)
 		return "tls error";
@@ -149,9 +149,9 @@
 	return nil;
 }
 
-//
-// get capability list, possibly start tls
-//
+/* */
+/* get capability list, possibly start tls */
+/* */
 static char*
 pop3capa(Pop *pop)
 {
@@ -183,9 +183,9 @@
 	return nil;
 }
 
-//
-// log in using APOP if possible, password if allowed by user
-//
+/* */
+/* log in using APOP if possible, password if allowed by user */
+/* */
 static char*
 pop3login(Pop *pop)
 {
@@ -204,7 +204,7 @@
 	else
 		ubuf[0] = '\0';
 
-	// look for apop banner
+	/* look for apop banner */
 	if(pop->ppop==0 && (p = strchr(s, '<')) && (q = strchr(p+1, '>'))) {
 		*++q = '\0';
 		if((n=auth_respond(p, q-p, user, sizeof user, buf, sizeof buf, auth_getkey, "proto=apop role=client server=%q%s",
@@ -250,9 +250,9 @@
 	}
 }
 
-//
-// dial and handshake with pop server
-//
+/* */
+/* dial and handshake with pop server */
+/* */
 static char*
 pop3dial(Pop *pop)
 {
@@ -277,9 +277,9 @@
 	return nil;
 }
 
-//
-// close connection
-//
+/* */
+/* close connection */
+/* */
 static void
 pop3hangup(Pop *pop)
 {
@@ -288,9 +288,9 @@
 	close(pop->fd);
 }
 
-//
-// download a single message
-//
+/* */
+/* download a single message */
+/* */
 static char*
 pop3download(Pop *pop, Message *m)
 {
@@ -361,13 +361,13 @@
 
 	m->end = wp;
 
-	// make sure there's a trailing null
-	// (helps in body searches)
+	/* make sure there's a trailing null */
+	/* (helps in body searches) */
 	*m->end = 0;
 	m->bend = m->rbend = m->end;
 	m->header = m->start;
 
-	// digest message
+	/* digest message */
 	sha1((uchar*)m->start, m->end - m->start, m->digest, nil);
 	for(i = 0; i < SHA1dlen; i++)
 		sprint(sdigest+2*i, "%2.2ux", m->digest[i]);
@@ -376,12 +376,12 @@
 	return nil;
 }
 
-//
-// check for new messages on pop server
-// UIDL is not required by RFC 1939, but 
-// netscape requires it, so almost every server supports it.
-// we'll use it to make our lives easier.
-//
+/* */
+/* check for new messages on pop server */
+/* UIDL is not required by RFC 1939, but  */
+/* netscape requires it, so almost every server supports it. */
+/* we'll use it to make our lives easier. */
+/* */
 static char*
 pop3read(Pop *pop, Mailbox *mb, int doplumb)
 {
@@ -389,12 +389,12 @@
 	int mesgno, ignore, nnew;
 	Message *m, *next, **l;
 
-	// Some POP servers disallow UIDL if the maildrop is empty.
+	/* Some POP servers disallow UIDL if the maildrop is empty. */
 	pop3cmd(pop, "STAT");
 	if(!isokay(s = pop3resp(pop)))
 		return s;
 
-	// fetch message listing; note messages to grab
+	/* fetch message listing; note messages to grab */
 	l = &mb->root->part;
 	if(strncmp(s, "+OK 0 ", 6) != 0) {
 		pop3cmd(pop, "UIDL");
@@ -411,19 +411,19 @@
 
 			mesgno = atoi(f[0]);
 			uidl = f[1];
-			if(strlen(uidl) > 75)	// RFC 1939 says 70 characters max
+			if(strlen(uidl) > 75)	/* RFC 1939 says 70 characters max */
 				continue;
 
 			ignore = 0;
 			while(*l != nil) {
 				if(strcmp((*l)->uidl, uidl) == 0) {
-					// matches mail we already have, note mesgno for deletion
+					/* matches mail we already have, note mesgno for deletion */
 					(*l)->mesgno = mesgno;
 					ignore = 1;
 					l = &(*l)->next;
 					break;
 				} else {
-					// old mail no longer in box mark deleted
+					/* old mail no longer in box mark deleted */
 					if(doplumb)
 						mailplumb(mb, *l, 1);
 					(*l)->inmbox = 0;
@@ -440,13 +440,13 @@
 			m->mesgno = mesgno;
 			strcpy(m->uidl, uidl);
 
-			// chain in; will fill in message later
+			/* chain in; will fill in message later */
 			*l = m;
 			l = &m->next;
 		}
 	}
 
-	// whatever is left has been removed from the mbox, mark as deleted
+	/* whatever is left has been removed from the mbox, mark as deleted */
 	while(*l != nil) {
 		if(doplumb)
 			mailplumb(mb, *l, 1);
@@ -455,7 +455,7 @@
 		l = &(*l)->next;
 	}
 
-	// download new messages
+	/* download new messages */
 	nnew = 0;
 	if(pop->pipeline){
 		switch(rfork(RFPROC|RFMEM)){
@@ -485,7 +485,7 @@
 			continue;
 
 		if(s = pop3download(pop, m)) {
-			// message disappeared? unchain
+			/* message disappeared? unchain */
 			fprint(2, "download %d: %s\n", m->mesgno, s);
 			delmessage(mb, m);
 			mb->root->subname--;
@@ -509,9 +509,9 @@
 	return nil;	
 }
 
-//
-// delete marked messages
-//
+/* */
+/* delete marked messages */
+/* */
 static void
 pop3purge(Pop *pop, Mailbox *mb)
 {
@@ -554,7 +554,7 @@
 }
 
 
-// connect to pop3 server, sync mailbox
+/* connect to pop3 server, sync mailbox */
 static char*
 pop3sync(Mailbox *mb, int doplumb)
 {
@@ -625,7 +625,7 @@
 	return Epop3ctl;
 }
 
-// free extra memory associated with mb
+/* free extra memory associated with mb */
 static void
 pop3close(Mailbox *mb)
 {
@@ -636,9 +636,9 @@
 	free(pop);
 }
 
-//
-// open mailboxes of the form /pop/host/user or /apop/host/user
-//
+/* */
+/* open mailboxes of the form /pop/host/user or /apop/host/user */
+/* */
 char*
 pop3mbox(Mailbox *mb, char *path)
 {
diff --git a/src/cmd/upas/marshal/marshal.c b/src/cmd/upas/marshal/marshal.c
index da54c76..fb94fa6 100644
--- a/src/cmd/upas/marshal/marshal.c
+++ b/src/cmd/upas/marshal/marshal.c
@@ -53,12 +53,12 @@
 	Hcontent,
 	Hx,
 	Hprecedence,
-	Nhdr,
+	Nhdr
 };
 
 enum {
 	PGPsign = 1,
-	PGPencrypt = 2,
+	PGPencrypt = 2
 };
 
 char *hdrs[Nhdr] = {
@@ -76,7 +76,7 @@
 [Hmime]		"mime-",
 [Hcontent]	"content-",
 [Hx]		"x-",
-[Hprecedence]	"precedence",
+[Hprecedence]	"precedence"
 };
 
 struct Ctype {
@@ -92,7 +92,7 @@
 	{ "text/tab-separated-values",	"tsv",	1,	},
 	{ "text/richtext",		"rtx",	1,	},
 	{ "message/rfc822",		"txt",	1,	},
-	{ "", 				0,	0,	},
+	{ "", 				0,	0,	}
 };
 
 Ctype *mimetypes;
@@ -153,7 +153,7 @@
 	Ok = 0,
 	Nomessage = 1,
 	Nobody = 2,
-	Error = -1,
+	Error = -1
 };
 
 #pragma varargck	type	"Z"	char*
@@ -244,27 +244,27 @@
 		subject = EARGF(usage());
 		break;
 	case 'F':
-		Fflag = 1;		// file message
+		Fflag = 1;		/* file message */
 		break;
 	case 'r':
-		rflag = 1;		// for sendmail
+		rflag = 1;		/* for sendmail */
 		break;
 	case 'd':
-		dflag = 1;		// for sendmail
+		dflag = 1;		/* for sendmail */
 		break;
 	case '#':
-		lbflag = 1;		// for sendmail
+		lbflag = 1;		/* for sendmail */
 		break;
 	case 'x':
-		xflag = 1;		// for sendmail
+		xflag = 1;		/* for sendmail */
 		break;
-	case 'n':			// no standard input
+	case 'n':			/* no standard input */
 		nflag = 1;
 		break;
-	case '8':			// read recipients from rfc822 header
+	case '8':			/* read recipients from rfc822 header */
 		eightflag = 1;
 		break;
-	case 'p':			// pgp flag: encrypt, sign, or both
+	case 'p':			/* pgp flag: encrypt, sign, or both */
 		if(pgpopts(EARGF(usage())) < 0)
 			sysfatal("bad pgp options");
 		break;
@@ -302,8 +302,8 @@
 	flags = 0;
 	headersrv = Nomessage;
 	if(!nflag && !xflag && !lbflag &&!dflag) {
-		// pass through headers, keeping track of which we've seen,
-		// perhaps building to list.
+		/* pass through headers, keeping track of which we've seen, */
+		/* perhaps building to list. */
 		holding = holdon();
 		headersrv = readheaders(&in, &flags, &hdrstring, eightflag ? &to : nil, 1);
 		if(rfc822syntaxerror){
@@ -316,10 +316,10 @@
 		}
 
 		switch(headersrv){
-		case Error:		// error
+		case Error:		/* error */
 			fatal("reading");
 			break;
-		case Nomessage:		// no message, just exit mimicking old behavior
+		case Nomessage:		/* no message, just exit mimicking old behavior */
 			noinput = 1;
 			if(first == nil)
 				threadexitsall(0);
@@ -344,13 +344,13 @@
 		s_free(hdrstring);
 		hdrstring = nil;
 
-		// read user's standard headers
+		/* read user's standard headers */
 		file = s_new();
 		mboxpath("headers", user, file, 0);
 		b = Bopen(s_to_c(file), OREAD);
 		if(b != nil){
 			switch(readheaders(b, &flags, &hdrstring, nil, 0)){
-			case Error:	// error
+			case Error:	/* error */
 				fatal("reading");
 			}
 			Bterm(b);
@@ -361,7 +361,7 @@
 		}
 	}
 
-	// add any headers we need
+	/* add any headers we need */
 	if((flags & (1<<Hdate)) == 0)
 		if(printdate(&out) < 0)
 			fatal("writing");
@@ -381,7 +381,7 @@
 		printinreplyto(&out, replymsg);	/* ignore errors */
 	Bprint(&out, "MIME-Version: 1.0\n");
 
-	if(pgpflag){	// interpose pgp process between us and sendmail to handle body
+	if(pgpflag){	/* interpose pgp process between us and sendmail to handle body */
 		Bflush(&out);
 		Bterm(&out);
 		fd = pgpfilter(&pgppid, fd, pgpflag);
@@ -389,7 +389,7 @@
 			fatal("can't Binit 1: %r");
 	}
 
-	// if attachments, stick in multipart headers
+	/* if attachments, stick in multipart headers */
 	boundary = nil;
 	if(first != nil){
 		boundary = mkboundary();
@@ -427,7 +427,7 @@
 	threadexitsall(waitforsubprocs());
 }
 
-// evaluate pgp option string
+/* evaluate pgp option string */
 int
 pgpopts(char *s)
 {
@@ -448,9 +448,9 @@
 	return 0;
 }
 
-// read headers from stdin into a String, expanding local aliases,
-// keep track of which headers are there, which addresses we have
-// remove Bcc: line.
+/* read headers from stdin into a String, expanding local aliases, */
+/* keep track of which headers are there, which addresses we have */
+/* remove Bcc: line. */
 int
 readheaders(Biobuf *in, int *fp, String **sp, Addr **top, int strict)
 {
@@ -469,7 +469,7 @@
 			seen = 1;
 			p[Blinelen(in)-1] = 0;
 
-			// coalesce multiline headers
+			/* coalesce multiline headers */
 			if((*p == ' ' || *p == '\t') && sline){
 				s_append(sline, "\n");
 				s_append(sline, p);
@@ -478,7 +478,7 @@
 			}
 		}
 
-		// process the current header, it's all been read
+		/* process the current header, it's all been read */
 		if(sline) {
 			assert(hdrtype != -1);
 			if(top){
@@ -504,7 +504,7 @@
 		if(p == nil)
 			break;
 
-		// if no :, it's not a header, seek back and break
+		/* if no :, it's not a header, seek back and break */
 		if(strchr(p, ':') == nil){
 			p[Blinelen(in)-1] = '\n';
 			Bseek(in, -Blinelen(in), 1);
@@ -513,12 +513,12 @@
 
 		sline = s_copy(p);
 
-		// classify the header.  If we don't recognize it, break.  This is
-		// to take care of user's that start messages with lines that contain
-		// ':'s but that aren't headers.  This is a bit hokey.  Since I decided
-		// to let users type headers, I need some way to distinguish.  Therefore,
-		// marshal tries to know all likely headers and will indeed screw up if
-		// the user types an unlikely one. -- presotto
+		/* classify the header.  If we don't recognize it, break.  This is */
+		/* to take care of user's that start messages with lines that contain */
+		/* ':'s but that aren't headers.  This is a bit hokey.  Since I decided */
+		/* to let users type headers, I need some way to distinguish.  Therefore, */
+		/* marshal tries to know all likely headers and will indeed screw up if */
+		/* the user types an unlikely one. -- presotto */
 		hdrtype = -1;
 		for(i = 0; i < nelem(hdrs); i++){
 			if(cistrncmp(hdrs[i], p, strlen(hdrs[i])) == 0){
@@ -553,7 +553,7 @@
 	return Ok;
 }
 
-// pass the body to sendmail, make sure body starts and ends with a newline
+/* pass the body to sendmail, make sure body starts and ends with a newline */
 void
 body(Biobuf *in, Biobuf *out, int docontenttype)
 {
@@ -564,7 +564,7 @@
 	len = 16*1024;
 	buf = emalloc(len);
 
-	// first char must be newline
+	/* first char must be newline */
 	i = Bgetc(in);
 	if(i > 0){
 		if(i != '\n')
@@ -574,7 +574,7 @@
 		buf[n++] = '\n';
 	}
 
-	// read into memory
+	/* read into memory */
 	if(docontenttype){
 		while(docontenttype){
 			if(n == len){
@@ -604,7 +604,7 @@
 		}
 	}
 
-	// write what we already read
+	/* write what we already read */
 	if(Bwrite(out, buf, n) < 0)
 		fatal("output error");
 	if(n > 0)
@@ -613,7 +613,7 @@
 		lastchar = '\n';
 
 
-	// pass the rest
+	/* pass the rest */
 	for(;;){
 		n = Bread(in, buf, len);
 		if(n < 0)
@@ -626,15 +626,15 @@
 	}
 }
 
-// pass the body to sendmail encoding with base64
-//
-//  the size of buf is very important to enc64.  Anything other than
-//  a multiple of 3 will cause enc64 to output a termination sequence.
-//  To ensure that a full buf corresponds to a multiple of complete lines,
-//  we make buf a multiple of 3*18 since that's how many enc64 sticks on
-//  a single line.  This avoids short lines in the output which is pleasing
-//  but not necessary.
-//
+/* pass the body to sendmail encoding with base64 */
+/* */
+/*  the size of buf is very important to enc64.  Anything other than */
+/*  a multiple of 3 will cause enc64 to output a termination sequence. */
+/*  To ensure that a full buf corresponds to a multiple of complete lines, */
+/*  we make buf a multiple of 3*18 since that's how many enc64 sticks on */
+/*  a single line.  This avoids short lines in the output which is pleasing */
+/*  but not necessary. */
+/* */
 void
 body64(Biobuf *in, Biobuf *out)
 {
@@ -656,7 +656,7 @@
 	lastchar = '\n';
 }
 
-// pass message to sendmail, make sure body starts with a newline
+/* pass message to sendmail, make sure body starts with a newline */
 void
 copy(Biobuf *in, Biobuf *out)
 {
@@ -682,7 +682,7 @@
 
 	f = emalloc(sizeof *f);
 	Binit(f, a->fd, OREAD);
-	// if it's already mime encoded, just copy
+	/* if it's already mime encoded, just copy */
 	if(strcmp(a->type, "mime") == 0){
 		copy(f, out);
 		Bterm(f);
@@ -690,7 +690,7 @@
 		return;
 	}
 	
-	// if it's not already mime encoded ...
+	/* if it's not already mime encoded ... */
 	if(strcmp(a->type, "text/plain") != 0)
 		Bprint(out, "Content-Type: %s\n", a->type);
 
@@ -859,12 +859,12 @@
 		return a;
 	}
 
-	// pick a type depending on extension
+	/* pick a type depending on extension */
 	p = strchr(file, '.');
 	if(p != nil)
 		p++;
 
-	// check the builtin extensions
+	/* check the builtin extensions */
 	if(p != nil){
 		for(c = ctype; c->ext != nil; c++)
 			if(strcmp(p, c->ext) == 0){
@@ -874,7 +874,7 @@
 			}
 	}
 
-	// try the mime types file
+	/* try the mime types file */
 	if(p != nil){
 		if(mimetypes == nil)
 			readmimetypes();
@@ -886,8 +886,8 @@
 			}
 	}
 
-	// run file to figure out the type
-	a->type = "application/octet-stream";		// safest default
+	/* run file to figure out the type */
+	a->type = "application/octet-stream";		/* safest default */
 	if(pipe(pfd) < 0)
 		return a;
 	
@@ -934,7 +934,7 @@
 	return estrdup(buf);
 }
 
-// copy types to two fd's
+/* copy types to two fd's */
 static void
 tee(int in, int out1, int out2)
 {
@@ -962,7 +962,7 @@
 	write(a[2], "\n", 1);
 }
 
-// print the unix from line
+/* print the unix from line */
 int
 printunixfrom(int fd)
 {
@@ -987,7 +987,7 @@
 	"names"
 };
 
-// return 1 if this is a special file
+/* return 1 if this is a special file */
 static int
 special(String *s)
 {
@@ -1005,7 +1005,7 @@
 	return 0;
 }
 
-// open the folder using the recipients account name
+/* open the folder using the recipients account name */
 static int
 openfolder(char *rcvr)
 {
@@ -1019,7 +1019,7 @@
 	file = s_new();
 	mboxpath("f", user, file, 0);
 
-	// if $mail/f exists, store there, otherwise in $mail
+	/* if $mail/f exists, store there, otherwise in $mail */
 	d = dirstat(s_to_c(file));
 	if(d == nil || d->qid.type != QTDIR){
 		scarey = 1;
@@ -1056,7 +1056,7 @@
 	return fd;
 }
 
-// start up sendmail and return an fd to talk to it with
+/* start up sendmail and return an fd to talk to it with */
 int
 sendmail(Addr *to, Addr *cc, int *pid, char *rcvr)
 {
@@ -1127,8 +1127,8 @@
 	return sfd;
 }
 
-// start up pgp process and return an fd to talk to it with.
-// its standard output will be the original fd, which goes to sendmail.
+/* start up pgp process and return an fd to talk to it with. */
+/* its standard output will be the original fd, which goes to sendmail. */
 int
 pgpfilter(int *pid, int fd, int pgpflag)
 {
@@ -1172,7 +1172,7 @@
 	return pfd[1];
 }
 
-// wait for sendmail and pgp to exit; exit here if either failed
+/* wait for sendmail and pgp to exit; exit here if either failed */
 char*
 waitforsubprocs(void)
 {
@@ -1312,9 +1312,9 @@
 	}
 }
 
-//
-//  read alias file
-//
+/* */
+/*  read alias file */
+/* */
 Alias*
 readaliases(void)
 {
@@ -1328,7 +1328,7 @@
 	line = s_new();
 	token = s_new();
 
-	// open and get length
+	/* open and get length */
 	mboxpath("names", login, file, 0);
 	sp = s_allocinstack(s_to_c(file));
 	if(sp == nil)
@@ -1336,7 +1336,7 @@
 
 	l = &first;
 
-	// read a line at a time.
+	/* read a line at a time. */
 	while(s_rdinstack(sp, s_restart(line))!=nil) {
 		s_restart(line);
 		a = emalloc(sizeof(Alias));
@@ -1380,10 +1380,10 @@
 	return a;
 }
 
-//
-//  expand personal aliases since the names are meaningless in
-//  other contexts
-//
+/* */
+/*  expand personal aliases since the names are meaningless in */
+/*  other contexts */
+/* */
 Addr*
 _expand(Addr *old, int *changedp)
 {
@@ -1458,7 +1458,7 @@
 
 	first = nil;
 
-	// make a list of the starting addresses
+	/* make a list of the starting addresses */
 	l = &first;
 	for(i = 0; i < ac; i++){
 		*l = newaddr(av[i]);
@@ -1467,7 +1467,7 @@
 		l = &(*l)->next;
 	}
 
-	// recurse till we don't change any more
+	/* recurse till we don't change any more */
 	return unique(rexpand(first));
 }
 
@@ -1510,21 +1510,21 @@
 	return s_nappend(s_reset(nil), s, n);
 }
 
-// fetch the next token from an RFC822 address string
-// we assume the header is RFC822-conformant in that
-// we recognize escaping anywhere even though it is only
-// supposed to be in quoted-strings, domain-literals, and comments.
-//
-// i'd use yylex or yyparse here, but we need to preserve 
-// things like comments, which i think it tosses away.
-//
-// we're not strictly RFC822 compliant.  we misparse such nonsense as
-//
-//	To: gre @ (Grace) plan9 . (Emlin) bell-labs.com
-//
-// make sure there's no whitespace in your addresses and 
-// you'll be fine.
-//
+/* fetch the next token from an RFC822 address string */
+/* we assume the header is RFC822-conformant in that */
+/* we recognize escaping anywhere even though it is only */
+/* supposed to be in quoted-strings, domain-literals, and comments. */
+/* */
+/* i'd use yylex or yyparse here, but we need to preserve  */
+/* things like comments, which i think it tosses away. */
+/* */
+/* we're not strictly RFC822 compliant.  we misparse such nonsense as */
+/* */
+/*	To: gre @ (Grace) plan9 . (Emlin) bell-labs.com */
+/* */
+/* make sure there's no whitespace in your addresses and  */
+/* you'll be fine. */
+/* */
 enum {
 	Twhite,
 	Tcomment,
@@ -1533,9 +1533,9 @@
 	Tleftangle,
 	Trightangle,
 	Terror,
-	Tend,
+	Tend
 };
-//char *ty82[] = {"white", "comment", "words", "comma", "<", ">", "err", "end"};
+/*char *ty82[] = {"white", "comment", "words", "comma", "<", ">", "err", "end"}; */
 #define ISWHITE(p) ((p)==' ' || (p)=='\t' || (p)=='\n' || (p)=='\r')
 int
 get822token(String **tok, char *p, char **pp)
@@ -1551,7 +1551,7 @@
 		*pp = nil;
 		return Tend;
 
-	case ' ':	// get whitespace
+	case ' ':	/* get whitespace */
 	case '\t':
 	case '\n':
 	case '\r':
@@ -1560,7 +1560,7 @@
 			p++;
 		break;
 
-	case '(':	// get comment
+	case '(':	/* get comment */
 		type = Tcomment;
 		for(p++; *p && *p != ')'; p++)
 			if(*p == '\\') {
@@ -1589,7 +1589,7 @@
 		type = Trightangle;
 		p++;
 		break;
-	default:	// bunch of letters, perhaps quoted strings tossed in
+	default:	/* bunch of letters, perhaps quoted strings tossed in */
 		type = Twords;
 		quoting = 0;
 		for(; *p && (quoting || (!ISWHITE(*p) && *p != '>' && *p != '<' && *p != ',')); p++) {
@@ -1612,8 +1612,8 @@
 	return type;
 }	
 
-// expand local aliases in an RFC822 mail line
-// add list of expanded addresses to to.
+/* expand local aliases in an RFC822 mail line */
+/* add list of expanded addresses to to. */
 Addr*
 expandline(String **s, Addr *to)
 {
@@ -1630,14 +1630,14 @@
 	ns = s_copyn(s_to_c(*s), p-s_to_c(*s));
 	stok = nil;
 	nto = nil;
-	//
-	// the only valid mailbox namings are word
-	// and word* < addr >
-	// without comments this would be simple.
-	// we keep the following:
-	//	lastword - current guess at the address
-	//	sinceword - whitespace and comment seen since lastword
-	//
+	/* */
+	/* the only valid mailbox namings are word */
+	/* and word* < addr > */
+	/* without comments this would be simple. */
+	/* we keep the following: */
+	/*	lastword - current guess at the address */
+	/*	sinceword - whitespace and comment seen since lastword */
+	/* */
 	lastword = s_new();
 	sinceword = s_new();
 	inangle = 0;
@@ -1710,7 +1710,7 @@
 			if(!inangle)
 				nword++;
 			break;
-		case Terror:	// give up, use old string, addrs
+		case Terror:	/* give up, use old string, addrs */
 		Error:
 			ns = os;
 			os = nil;
@@ -1775,7 +1775,7 @@
 		mimetypes[inuse].display = !strcmp(type, "text/plain");
 		inuse++;
 
-		// always make sure there's a terminator
+		/* always make sure there's a terminator */
 		mimetypes[inuse].ext = 0;
 	}
 	Bterm(b);
@@ -1810,15 +1810,15 @@
 	return x;
 }
 
-//
-// Formatter for %"
-// Use double quotes to protect white space, frogs, \ and "
-//
+/* */
+/* Formatter for %" */
+/* Use double quotes to protect white space, frogs, \ and " */
+/* */
 enum
 {
 	Qok = 0,
 	Qquote,
-	Qbackslash,
+	Qbackslash
 };
 
 static int
diff --git a/src/cmd/upas/ned/nedmail.c b/src/cmd/upas/ned/nedmail.c
index c6ca2f2..193d8f2 100644
--- a/src/cmd/upas/ned/nedmail.c
+++ b/src/cmd/upas/ned/nedmail.c
@@ -31,7 +31,7 @@
 	String	*path;
 	int	id;
 	int	len;
-	int	fileno;	// number of directory
+	int	fileno;	/* number of directory */
 	String	*info;
 	char	*from;
 	char	*to;
@@ -136,12 +136,12 @@
 	{ "|",	1,	pipecmd, "|cmd     pipe message body to a command" },
 	{ "||",	1,	rpipecmd, "||cmd     pipe raw message to a command" },
 	{ "!",	1,	bangcmd, "!cmd     run a command" },
-	{ nil,	0,	nil, 	nil },
+	{ nil,	0,	nil, 	nil }
 };
 
 enum
 {
-	NARG=	32,
+	NARG=	32
 };
 
 struct Cmd {
@@ -305,8 +305,8 @@
 			s_append(prompt, ": ");
 		}
 
-		// leave space at the end of cmd line in case parsecmd needs to
-		// add a space after a '|' or '!'
+		/* leave space at the end of cmd line in case parsecmd needs to */
+		/* add a space after a '|' or '!' */
 		if(readline(s_to_c(prompt), cmdline, sizeof(cmdline)-1) == nil)
 			break;
 		err = parsecmd(cmdline, &cmd, top.child, cur);
@@ -328,10 +328,10 @@
 			if(cmd.delete){
 				dcmd(&cmd, x);
 
-				// dp acts differently than all other commands
-				// since its an old lesk idiom that people love.
-				// it deletes the current message, moves the current
-				// pointer ahead one and prints.
+				/* dp acts differently than all other commands */
+				/* since its an old lesk idiom that people love. */
+				/* it deletes the current message, moves the current */
+				/* pointer ahead one and prints. */
 				if(cmd.f == pcmd){
 					if(x->next == nil){
 						Bprint(&out, "!address\n");
@@ -378,18 +378,18 @@
 	for(i=0; i+1<nf; i+=2){
 		if(i > 0)
 			fmtprint(&fmt, " ");
-	//	if(f[i][0] == 0 || strcmp(f[i], f[i+1]) == 0)
+	/*	if(f[i][0] == 0 || strcmp(f[i], f[i+1]) == 0) */
 			fmtprint(&fmt, "%s", f[i+1]);
-	//	else
-	//		fmtprint(&fmt, "%s <%s>", f[i], f[i+1]);
+	/*	else */
+	/*		fmtprint(&fmt, "%s <%s>", f[i], f[i+1]); */
 	}
 	free(f);
 	return fmtstrflush(&fmt);
 }
 
-//
-// read the message info
-//
+/* */
+/* read the message info */
+/* */
 Message*
 file2message(Message *parent, char *name)
 {
@@ -462,9 +462,9 @@
 	free(m);
 }
 
-//
-//  read a directory into a list of messages
-//
+/* */
+/*  read a directory into a list of messages */
+/* */
 int
 dir2message(Message *parent, int reverse)
 {
@@ -478,7 +478,7 @@
 	if(fd == nil)
 		return -1;
 
-	// count current entries
+	/* count current entries */
 	first = parent->child;
 	highest = newmsgs = 0;
 	for(last = parent->child; last != nil && last->next != nil; last = last->next)
@@ -495,7 +495,7 @@
 		if(atoi(d[i].name) <= highest)
 			continue;
 		m = file2message(parent, d[i].name);
-		// fprint(2,"returned from file2message\n");
+		/* fprint(2,"returned from file2message\n"); */
 		if(m == nil)
 			break;
 		newmsgs++;
@@ -517,7 +517,7 @@
 	fsclose(fd);
 	parent->child = first;
 
-	// renumber and file longest from
+	/* renumber and file longest from */
 	i = 1;
 	longestfrom = 12;
 	for(m = first; m != nil; m = m->next){
@@ -530,16 +530,16 @@
 	return newmsgs;
 }
 
-//
-//  point directly to a message
-//
+/* */
+/*  point directly to a message */
+/* */
 Message*
 dosingleton(Message *parent, char *path)
 {
 	char *p, *np;
 	Message *m;
 
-	// walk down to message and read it
+	/* walk down to message and read it */
 	if(strlen(path) < rootlen)
 		return nil;
 	if(path[rootlen] != '/')
@@ -554,7 +554,7 @@
 	parent->child = m;
 	m->id = 1;
 
-	// walk down to requested component
+	/* walk down to requested component */
 	while(np != nil){
 		*np = '/';
 		np = strchr(np+1, '/');
@@ -569,9 +569,9 @@
 	return m;
 }
 
-//
-//  read a file into a string
-//
+/* */
+/*  read a file into a string */
+/* */
 String*
 file2string(String *dir, char *file)
 {
@@ -605,9 +605,9 @@
 	return s;
 }
 
-//
-//  get the length of a file
-//
+/* */
+/*  get the length of a file */
+/* */
 int
 filelen(String *dir, char *file)
 {
@@ -627,9 +627,9 @@
 	return rv;
 }
 
-//
-//  walk the path name an element
-//
+/* */
+/*  walk the path name an element */
+/* */
 String*
 extendpath(String *dir, char *name)
 {
@@ -720,21 +720,21 @@
 	in[sizeof(in)-1] = 0;
 	n = getfields(in, f, 6, 1, " \t\r\n");
 	if(n != 6){
-		// unknown style
+		/* unknown style */
 		snprint(out, 16, "%10.10s", d);
 		return;
 	}
 	now = time(0);
 	memset(&tm, 0, sizeof tm);
 	if(strchr(f[0], ',') != nil && strchr(f[4], ':') != nil){
-		// 822 style
+		/* 822 style */
 		tm.year = atoi(f[3])-1900;
 		tm.mon = month(f[2]);
 		tm.mday = atoi(f[1]);
 		dtime = nosecs(f[4]);
 		then = tm2sec(&tm);
 	} else if(strchr(f[3], ':') != nil){
-		// unix style
+		/* unix style */
 		tm.year = atoi(f[5])-1900;
 		tm.mon = month(f[1]);
 		tm.mday = atoi(f[2]);
@@ -826,12 +826,12 @@
 	String *id;
 	char *p, *q;;
 
-	// create id
+	/* create id */
 	id = s_new();
 	mkid(id, m);
 
 	if(*m->from == 0){
-		// no from
+		/* no from */
 		snprint(buf, len, "%-3s    %s %6d  %s",
 			s_to_c(id),
 			m->type,
@@ -877,7 +877,7 @@
 	char typeid[64];
 	char *p, *e;
 
-	// create id
+	/* create id */
 	id = s_new();
 	mkid(id, m);
 
@@ -900,17 +900,17 @@
 
 char sstring[256];
 
-//	cmd := range cmd ' ' arg-list ; 
-//	range := address
-//		| address ',' address
-//		| 'g' search ;
-//	address := msgno
-//		| search ;
-//	msgno := number
-//		| number '/' msgno ;
-//	search := '/' string '/'
-//		| '%' string '%' ;
-//
+/*	cmd := range cmd ' ' arg-list ;  */
+/*	range := address */
+/*		| address ',' address */
+/*		| 'g' search ; */
+/*	address := msgno */
+/*		| search ; */
+/*	msgno := number */
+/*		| number '/' msgno ; */
+/*	search := '/' string '/' */
+/*		| '%' string '%' ; */
+/* */
 Reprog*
 parsesearch(char **pp)
 {
@@ -1067,9 +1067,9 @@
 	return nil;
 }
 
-//
-//  search a message for a regular expression match
-//
+/* */
+/*  search a message for a regular expression match */
+/* */
 int
 rawsearch(Message *m, Reprog *prog)
 {
@@ -1083,8 +1083,8 @@
 	if(fd == nil)
 		return 0;
 
-	// march through raw message 4096 bytes at a time
-	// with a 128 byte overlap to chain the re search.
+	/* march through raw message 4096 bytes at a time */
+	/* with a 128 byte overlap to chain the re search. */
 	rv = 0;
 	for(;;){
 		i = fsread(fd, buf, sizeof(buf)-1);
@@ -1122,17 +1122,17 @@
 	l = &cmd->msgs;
 	*l = nil;
 
-	// eat white space
+	/* eat white space */
 	while(*p == ' ')
 		p++;
 
-	// null command is a special case (advance and print)
+	/* null command is a special case (advance and print) */
 	if(*p == 0){
 		if(cur == &top){
-			// special case
+			/* special case */
 			m = first;
 		} else {
-			// walk to the next message even if we have to go up
+			/* walk to the next message even if we have to go up */
 			m = cur->next;
 			while(m == nil && cur->parent != nil){
 				cur = cur->parent;
@@ -1148,11 +1148,11 @@
 		return nil;
 	}
 
-	// global search ?
+	/* global search ? */
 	if(*p == 'g'){
 		p++;
 
-		// no search string means all messages
+		/* no search string means all messages */
 		if(*p != '/' && *p != '%'){
 			for(m = first; m != nil; m = m->next){
 				*l = m;
@@ -1160,7 +1160,7 @@
 				*l = nil;
 			}
 		} else {
-			// mark all messages matching this search string
+			/* mark all messages matching this search string */
 			c = *p;
 			prog = parsesearch(&p);
 			if(prog == nil)
@@ -1187,13 +1187,13 @@
 		}
 	} else {
 	
-		// parse an address
+		/* parse an address */
 		s = e = nil;
 		err = parseaddr(&p, first, cur, cur, &s);
 		if(err != nil)
 			return err;
 		if(*p == ','){
-			// this is an address range
+			/* this is an address range */
 			if(s == &top)
 				s = first;
 			p++;
@@ -1203,7 +1203,7 @@
 			if(err != nil)
 				return err;
 	
-			// select all messages in the range
+			/* select all messages in the range */
 			for(; s != nil; s = s->next){
 				*l = s;
 				l = &s->cmd;
@@ -1214,7 +1214,7 @@
 			if(s == nil)
 				return "null address range";
 		} else {
-			// single address
+			/* single address */
 			if(s != &top){
 				*l = s;
 				s->cmd = nil;
@@ -1222,7 +1222,7 @@
 		}
 	}
 
-	// insert a space after '!'s and '|'s
+	/* insert a space after '!'s and '|'s */
 	for(q = p; *q; q++)
 		if(*q != '!' && *q != '|')
 			break;
@@ -1235,13 +1235,13 @@
 	if(cmd->an == 0 || *cmd->av[0] == 0)
 		cmd->f = pcmd;
 	else {
-		// hack to allow all messages to start with 'd'
+		/* hack to allow all messages to start with 'd' */
 		if(*(cmd->av[0]) == 'd' && *(cmd->av[0]+1) != 0){
 			cmd->delete = 1;
 			cmd->av[0]++;
 		}
 
-		// search command table
+		/* search command table */
 		for(i = 0; cmdtab[i].cmd != nil; i++)
 			if(strcmp(cmd->av[0], cmdtab[i].cmd) == 0)
 				break;
@@ -1256,7 +1256,7 @@
 	return nil; 
 }
 
-// inefficient read from standard input
+/* inefficient read from standard input */
 char*
 readline(char *prompt, char *line, int len)
 {
@@ -1471,7 +1471,7 @@
 	} else if(strncmp(m->type, "multipart/", 10) == 0){
 		nm = m->child;
 		if(nm != nil){
-			// always print first part
+			/* always print first part */
 			pcmd(nil, nm);
 
 			for(nm = nm->next; nm != nil; nm = nm->next){
@@ -1582,7 +1582,7 @@
 	return m;
 }
 
-// really delete messages
+/* really delete messages */
 Message*
 flushdeleted(Message *cur)
 {
@@ -1611,7 +1611,7 @@
 			continue;
 		}
 
-		// don't return a pointer to a deleted message
+		/* don't return a pointer to a deleted message */
 		if(m == cur)
 			cur = m->next;
 
@@ -1629,7 +1629,7 @@
 		p = seprint(p, e, " %s", msg);
 		n++;
 
-		// unchain and free
+		/* unchain and free */
 		*l = m->next;
 		if(m->next)
 			m->next->prev = m->prev;
@@ -1643,13 +1643,13 @@
 	if(deld)
 		Bprint(&out, "!%d message%s deleted\n", deld, plural(deld));
 
-	// renumber
+	/* renumber */
 	i = 1;
 	for(m = top.child; m != nil; m = m->next)
 		m->id = natural ? m->fileno : i++;
 
-	// if we're out of messages, go back to first
-	// if no first, return the fake first
+	/* if we're out of messages, go back to first */
+	/* if no first, return the fake first */
 	if(cur == nil){
 		if(top.child)
 			return top.child;
@@ -1672,7 +1672,7 @@
 	Bflush(&out);
 
 	exitfs(0);
-	return nil;	// not reached
+	return nil;	/* not reached */
 }
 
 Message*
@@ -1692,7 +1692,7 @@
 	USED(m);
 
 	exitfs(0);
-	return nil;	// not reached
+	return nil;	/* not reached */
 }
 
 Message*
@@ -1776,7 +1776,7 @@
 	if(marshal == nil)
 		marshal = unsharp("#9/bin/upas/marshal");
 
-	// start the mailer and get out of the way
+	/* start the mailer and get out of the way */
 	switch(pid = fork()){
 	case -1:
 		fprint(2, "can't fork: %r\n");
@@ -1816,9 +1816,9 @@
 	return 0;
 }
 
-//
-// like tokenize but obey "" quoting
-//
+/* */
+/* like tokenize but obey "" quoting */
+/* */
 int
 tokenize822(char *str, char **args, int max)
 {
@@ -2077,7 +2077,7 @@
 	if(mbox)
 		seek(out, 0, 2);
 
-	// put on a 'From ' line
+	/* put on a 'From ' line */
 	if(mbox){
 		while(m->parent != &top)
 			m = m->parent;
@@ -2086,7 +2086,7 @@
 		s_free(h);
 	}
 
-	// copy the message escaping what we have to ad adding newlines if we have to
+	/* copy the message escaping what we have to ad adding newlines if we have to */
 	if(mbox)
 		rv = appendfiletombox(in, out);
 	else
@@ -2192,7 +2192,7 @@
 	"names"
 };
 
-// return 1 if this is a special file
+/* return 1 if this is a special file */
 static int
 special(String *s)
 {
@@ -2210,7 +2210,7 @@
 	return 0;
 }
 
-// open the folder using the recipients account name
+/* open the folder using the recipients account name */
 static String*
 foldername(char *rcvr)
 {
@@ -2224,7 +2224,7 @@
 	mboxpath("f", user, file, 0);
 	d = dirstat(s_to_c(file));
 
-	// if $mail/f exists, store there, otherwise in $mail
+	/* if $mail/f exists, store there, otherwise in $mail */
 	s_restart(file);
 	if(d && d->qid.type == QTDIR){
 		scarey = 0;
@@ -2363,7 +2363,7 @@
 	fd = fsopenfd(mailfs, s_to_c(path), OREAD);
 	s_free(path);
 
-	if(fd < 0){	// compatibility with older upas/fs
+	if(fd < 0){	/* compatibility with older upas/fs */
 		path = extendpath(m->path, "raw");
 		fd = fsopenfd(mailfs, s_to_c(path), OREAD);
 		s_free(path);
@@ -2408,7 +2408,7 @@
 	if(fd == nil)
 		sysfatal("can't open ctl: %r");
 
-	// close current mailbox
+	/* close current mailbox */
 	if(*mbname && strcmp(mbname, "mbox") != 0)
 		fsprint(fd, "close %s", mbname);
 
@@ -2423,16 +2423,16 @@
 	String *path;
 	char buf[256];
 
-	// if the user didn't say anything and there
-	// is an mbox mounted already, use that one
-	// so that the upas/fs -fdefault default is honored.
+	/* if the user didn't say anything and there */
+	/* is an mbox mounted already, use that one */
+	/* so that the upas/fs -fdefault default is honored. */
 	if(0 && (file || (singleton && fsaccess(mailfs, singleton, 0) < 0))){
 	/* XXX all wrong */
 		fprint(2, "file=%s singleton=%s\n", file, singleton);
 		if(file == nil)
 			file = "mbox";
 
-		// close current mailbox
+		/* close current mailbox */
 		closemb();
 		didopen = 1;
 
@@ -2442,10 +2442,10 @@
 	
 		path = s_new();
 	
-		// get an absolute path to the mail box
+		/* get an absolute path to the mail box */
 		if(strncmp(file, "./", 2) == 0){
-			// resolve path here since upas/fs doesn't know
-			// our working directory
+			/* resolve path here since upas/fs doesn't know */
+			/* our working directory */
 			if(getwd(buf, sizeof(buf)-strlen(file)) == nil){
 				fprint(2, "!can't get working directory: %s\n", buf);
 				return -1;
@@ -2456,14 +2456,14 @@
 			mboxpath(file, user, path, 0);
 		}
 	
-		// make up a handle to use when talking to fs
+		/* make up a handle to use when talking to fs */
 		p = strrchr(file, '/');
 		if(p == nil){
-			// if its in the mailbox directory, just use the name
+			/* if its in the mailbox directory, just use the name */
 			strncpy(mbname, file, sizeof(mbname));
 			mbname[sizeof(mbname)-1] = 0;
 		} else {
-			// make up a mailbox name
+			/* make up a mailbox name */
 			p = strrchr(s_to_c(path), '/');
 			p++;
 			if(*p == 0){
@@ -2513,7 +2513,7 @@
 	return 0;
 }
 
-// like tokenize but for into lines
+/* like tokenize but for into lines */
 int
 lineize(char *s, char **f, int n)
 {
diff --git a/src/cmd/upas/nfs/a.h b/src/cmd/upas/nfs/a.h
index 7e5e812..f30e51c 100644
--- a/src/cmd/upas/nfs/a.h
+++ b/src/cmd/upas/nfs/a.h
@@ -27,7 +27,7 @@
 	NoEncoding,
 	QuotedPrintable,
 	QuotedPrintableU,
-	Base64,
+	Base64
 };
 
 char*	decode(int, char*, int*);
diff --git a/src/cmd/upas/nfs/box.c b/src/cmd/upas/nfs/box.c
index 044edf2..f7a52bc 100644
--- a/src/cmd/upas/nfs/box.c
+++ b/src/cmd/upas/nfs/box.c
@@ -6,7 +6,7 @@
 	BoxChunk = 64,
 	MsgChunk = 256,
 	PartChunk = 4,
-	PartSubChunk = 4,
+	PartSubChunk = 4
 };
 
 Box **boxes;
diff --git a/src/cmd/upas/nfs/box.h b/src/cmd/upas/nfs/box.h
index 9513df7..da2b0ab 100644
--- a/src/cmd/upas/nfs/box.h
+++ b/src/cmd/upas/nfs/box.h
@@ -11,7 +11,7 @@
 	FlagMarked = 1<<8,
 	FlagNoSelect = 1<<9,
 	FlagUnMarked = 1<<10,
-	FlagRecent = 1<<11,
+	FlagRecent = 1<<11
 };
 
 typedef struct Box Box;
diff --git a/src/cmd/upas/nfs/decode.c b/src/cmd/upas/nfs/decode.c
index 572ae7b..2d7185b 100644
--- a/src/cmd/upas/nfs/decode.c
+++ b/src/cmd/upas/nfs/decode.c
@@ -105,7 +105,7 @@
 	"big5",			"big5",
 	"iso-2022-jp",	"jis-kanji",
 	"windows-1251",	"cp1251",
-	"koi8-r",			"koi8",
+	"koi8-r",			"koi8"
 };
 
 char*
diff --git a/src/cmd/upas/nfs/fs.c b/src/cmd/upas/nfs/fs.c
index 2b94e97..d170c83 100644
--- a/src/cmd/upas/nfs/fs.c
+++ b/src/cmd/upas/nfs/fs.c
@@ -77,7 +77,7 @@
 	Qunixheader,
 	
 	Qfile0 = Qbody,
-	Qnfile = Qunixheader+1-Qfile0,
+	Qnfile = Qunixheader+1-Qfile0
 };
 
 static char Egreg[] = "gone postal";
@@ -189,7 +189,7 @@
 	Qidstr,			"idstr",
 	Qdesc,			"desc",
 	Qencoding,		"encoding",
-	Qcharset,		"charset",
+	Qcharset,		"charset"
 };
 
 char*
@@ -334,9 +334,9 @@
 	FlagNonJunk,		"notjunk",
 	FlagReplied,	"replied",
 	FlagFlagged,		"flagged",
-//	FlagDeleted,		"deleted",
+/*	FlagDeleted,		"deleted", */
 	FlagDraft,		"draft",
-	FlagSeen,			"seen",
+	FlagSeen,			"seen"
 };
 
 static void
@@ -604,9 +604,9 @@
 			fmtprint(&fmt, "type %s\n", part->type);
 		if(part->lines)
 			fmtprint(&fmt, "lines %d\n", part->lines);
-	//	fmtprint(&fmt, "disposition %s\n", "" /* disposition */);
-	//	fmtprint(&fmt, "filename %s\n", "" /* filename */);
-	//	fmtprint(&fmt, "digest %s\n", "" /* digest */);
+	/*	fmtprint(&fmt, "disposition %s\n", "" /* disposition */); */
+	/*	fmtprint(&fmt, "filename %s\n", "" /* filename */); */
+	/*	fmtprint(&fmt, "digest %s\n", "" /* digest */); */
 		s = fmtstrflush(&fmt);
 		if(s == nil)
 			s = estrdup("");
@@ -794,13 +794,13 @@
 	Qbody, Qbcc, Qcc, Qdate, Qfrom, Qheader, Qinfo, 
 	Qinreplyto, Qlines, Qmimeheader, Qmessageid, 
 	Qraw, Qrawunix, Qrawbody, Qrawheader,
-	Qreplyto, Qsender, Qsubject, Qto,
+	Qreplyto, Qsender, Qsubject, Qto
 };
 static int mimedir[] = {
 	Qtype,
 	Qbody,
 	Qmimeheader,
-	Qraw,
+	Qraw
 };
 	
 int
@@ -833,11 +833,11 @@
 
 enum
 {
-	CMhangup,
+	CMhangup
 };
 static Cmdtab ctltab[] =
 {
-	CMhangup, "hangup", 2,
+	CMhangup, "hangup", 2
 };
 
 enum
@@ -848,7 +848,7 @@
 	CMread,
 	CMsave,
 	CMjunk,
-	CMnonjunk,
+	CMnonjunk
 };
 static Cmdtab boxctltab[] =
 {
@@ -858,7 +858,7 @@
 	CMread,		"read", 0,
 	CMsave,		"save", 0,
 	CMjunk,		"junk", 0,
-	CMnonjunk,	"nonjunk", 0,
+	CMnonjunk,	"nonjunk", 0
 };
 
 static void
@@ -996,7 +996,7 @@
 			}
 			nm = mkmsglist(box, cb->f+2, cb->nf-2, &m);
 			if(nm != cb->nf-2){
-			//	free(m);
+			/*	free(m); */
 				respond(r, Enomsg);
 				break;
 			}
diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c
index 546193b..b79acf5 100644
--- a/src/cmd/upas/nfs/imap.c
+++ b/src/cmd/upas/nfs/imap.c
@@ -50,7 +50,7 @@
 	"\\NoInferiors",	FlagNoInferiors,
 	"\\NoSelect",	FlagNoSelect,
 	"\\Marked",	FlagMarked,
-	"\\UnMarked",	FlagUnMarked,
+	"\\UnMarked",	FlagUnMarked
 };
 
 int			chattyimap;
@@ -775,7 +775,7 @@
 {
 	Qok = 0,
 	Qquote,
-	Qbackslash,
+	Qbackslash
 };
 
 static int
@@ -1172,7 +1172,7 @@
 	1,	"EXISTS",		"ANA",		xexists,
 	1,	"EXPUNGE",	"ANA",		xexpunge,
 	1,	"FETCH",		"ANAL",		xfetch,
-	1,	"RECENT",	"ANA",		xrecent,
+	1,	"RECENT",	"ANA",		xrecent
 };
 
 static void
@@ -1333,7 +1333,7 @@
 	"RFC822.SIZE", xmsgrfc822size,
 	"ENVELOPE", xmsgenvelope,
 	"BODY", xmsgbody,
-	"BODY[", xmsgbodydata,
+	"BODY[", xmsgbodydata
 };
 
 static void
@@ -1460,7 +1460,7 @@
 	char *name;
 	int offset;
 } paramtab[] = {
-	"charset",	offsetof(Part, charset),
+	"charset",	offsetof(Part, charset)
 };
 
 static void
@@ -1641,7 +1641,7 @@
 	"PERMANENTFLAGS", 'L',	xokpermflags,
 	"UNSEEN", 'N',	xokunseen,
 	"READ-WRITE", 0,	xokreadwrite,
-	"READ-ONLY",	0, xokreadonly,
+	"READ-ONLY",	0, xokreadonly
 };
 
 static void
@@ -1695,24 +1695,24 @@
 static void
 xokpermflags(Imap *z, Sx *sx)
 {
-//	z->permflags = parseflags(sx);
+/*	z->permflags = parseflags(sx); */
 }
 
 static void
 xokunseen(Imap *z, Sx *sx)
 {
-//	z->unseen = sx->number;
+/*	z->unseen = sx->number; */
 }
 
 static void
 xokreadwrite(Imap *z, Sx *sx)
 {
-//	z->boxmode = ORDWR;
+/*	z->boxmode = ORDWR; */
 }
 
 static void
 xokreadonly(Imap *z, Sx *sx)
 {
-//	z->boxmode = OREAD;
+/*	z->boxmode = OREAD; */
 }
 
diff --git a/src/cmd/upas/nfs/sx.h b/src/cmd/upas/nfs/sx.h
index 910f002..38a801d 100644
--- a/src/cmd/upas/nfs/sx.h
+++ b/src/cmd/upas/nfs/sx.h
@@ -8,7 +8,7 @@
 	SxAtom,
 	SxString,
 	SxNumber,
-	SxList,
+	SxList
 };
 
 typedef struct Sx Sx;
diff --git a/src/cmd/upas/pop3/pop3.c b/src/cmd/upas/pop3/pop3.c
index 84e92b1..af67436 100644
--- a/src/cmd/upas/pop3/pop3.c
+++ b/src/cmd/upas/pop3/pop3.c
@@ -54,7 +54,7 @@
 	"top", 1, topcmd,
 	"uidl", 1, uidlcmd,
 	"user", 0, usercmd,
-	0, 0, 0,
+	0, 0, 0
 };
 
 static Biobuf in;
@@ -729,7 +729,7 @@
 	fd = create(buf, OREAD, 0666);
 	if(fd >= 0){
 		close(fd);
-//		syslog(0, "pop3", "ratified %s", peeraddr);
+/*		syslog(0, "pop3", "ratified %s", peeraddr); */
 	}
 }
 
@@ -784,7 +784,7 @@
 	if((chs = auth_challenge("proto=apop role=server")) == nil)
 		return senderr("couldn't get apop challenge");
 
-	// hash challenge with secret and convert to ascii
+	/* hash challenge with secret and convert to ascii */
 	s = md5((uchar*)chs->chal, chs->nchal, 0, 0);
 	md5((uchar*)arg, strlen(arg), digest, s);
 	snprint(response, sizeof response, "%.*H", MD5dlen, digest);
diff --git a/src/cmd/upas/scanmail/common.c b/src/cmd/upas/scanmail/common.c
index eab9e2f..2e36850 100644
--- a/src/cmd/upas/scanmail/common.c
+++ b/src/cmd/upas/scanmail/common.c
@@ -7,7 +7,7 @@
 enum {
 	Quanta	= 8192,
 	Minbody = 6000,
-	HdrMax	= 15,
+	HdrMax	= 15
 };
 
 typedef struct keyword Keyword;
@@ -65,7 +65,7 @@
 	"hold",		Hold,
 	"dump",		Dump,
 	"loff",		Lineoff,
-	0,		Nactions,
+	0,		Nactions
 };
 
 Patterns patterns[] = {
@@ -74,7 +74,7 @@
 [Hold]		{ "HOLD:", 0, 0 },
 [SaveLine]	{ "LINE:", 0, 0 },
 [Lineoff]	{ "LINEOFF:", 0, 0 },
-[Nactions]	{ 0, 0, 0 },
+[Nactions]	{ 0, 0, 0 }
 };
 
 static char*	endofhdr(char*, char*);
@@ -306,7 +306,7 @@
 	char *cp;
 
 	len = end - msg;
-	i = (len*3)/4+1;	// room for max chars + null
+	i = (len*3)/4+1;	/* room for max chars + null */
 	cp = Malloc(i);
 	len = dec64((uchar*)cp, i, msg, len);
 	convert(cp, cp+len, buf, bufsize, 1);
@@ -663,5 +663,5 @@
 /*E0*/	INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL,
 	INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL,
 /*F0*/	INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL,
-	INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL,
+	INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL, INVAL
 };
diff --git a/src/cmd/upas/scanmail/spam.h b/src/cmd/upas/scanmail/spam.h
index f1d24b2..109329f 100644
--- a/src/cmd/upas/scanmail/spam.h
+++ b/src/cmd/upas/scanmail/spam.h
@@ -15,7 +15,7 @@
 	MaxHtml		= 256,
 	Hdrsize		= 4096,
 	Bodysize	= 8192,
-	Maxread		= 64*1024,
+	Maxread		= 64*1024
 };
 
 typedef struct spat 	Spat;
diff --git a/src/cmd/upas/send/message.c b/src/cmd/upas/send/message.c
index 34393a9..3ec8d70 100644
--- a/src/cmd/upas/send/message.c
+++ b/src/cmd/upas/send/message.c
@@ -171,7 +171,7 @@
 [MESSAGEID-WORD]	"MESSAGEID",
 [RECEIVED-WORD]	"RECEIVED",
 [MAILER-WORD]	"MAILER",
-[BADTOKEN-WORD]	"BADTOKEN",
+[BADTOKEN-WORD]	"BADTOKEN"
 };
 #endif
 
diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c
index 47ff9ec..d68a5d1 100644
--- a/src/cmd/upas/smtp/mxdial.c
+++ b/src/cmd/upas/smtp/mxdial.c
@@ -6,7 +6,7 @@
 enum
 {
 	Nmx=	16,
-	Maxstring=	256,
+	Maxstring=	256
 };
 
 typedef struct Mx	Mx;
diff --git a/src/cmd/upas/smtp/rfc822.tab.c b/src/cmd/upas/smtp/rfc822.tab.c
index 1f12e48..cacf867 100644
--- a/src/cmd/upas/smtp/rfc822.tab.c
+++ b/src/cmd/upas/smtp/rfc822.tab.c
@@ -603,7 +603,7 @@
 	31, 72,
 	32, 72,
 	35, 72,
-	-2, 74,
+	-2, 74
 };
 #define	YYNPROD	122
 #define	YYPRIVATE 57344
diff --git a/src/cmd/upas/smtp/smtp.c b/src/cmd/upas/smtp/smtp.c
index d3297df..fd867cd 100644
--- a/src/cmd/upas/smtp/smtp.c
+++ b/src/cmd/upas/smtp/smtp.c
@@ -179,7 +179,7 @@
 	if(*argv == 0)
 		usage();
 	addr = *argv++; argc--;
-	// expand $smtp if necessary
+	/* expand $smtp if necessary */
 	addr = expand_addr(addr);
 	farend = addr;
 
@@ -359,7 +359,7 @@
 		h = malloc(2*sizeof hash + 1);
 		if (h != nil) {
 			enc16(h, 2*sizeof hash + 1, hash, sizeof hash);
-			// print("x509 sha1=%s", h);
+			/* print("x509 sha1=%s", h); */
 			syslog(0, "smtp",
 		"remote cert. has bad thumbprint: x509 sha1=%s server=%q",
 				h, ddomain);
diff --git a/src/cmd/upas/smtp/smtpd.h b/src/cmd/upas/smtp/smtpd.h
index 3a8e60e..bb982a2 100644
--- a/src/cmd/upas/smtp/smtpd.h
+++ b/src/cmd/upas/smtp/smtpd.h
@@ -8,7 +8,7 @@
 	TRUSTED,
 	NONE,
 
-	MAXREJECTS = 100,
+	MAXREJECTS = 100
 };
 
 	
diff --git a/src/cmd/upas/smtp/spam.c b/src/cmd/upas/smtp/spam.c
index a4d4948..723e341 100644
--- a/src/cmd/upas/smtp/spam.c
+++ b/src/cmd/upas/smtp/spam.c
@@ -11,7 +11,7 @@
 	OURDOMS,
 
 	IP = 0,
-	STRING,
+	STRING
 };
 
 
@@ -29,7 +29,7 @@
 	"defaultdomain",	DOMNAME,	
 	"ournets",		OURNETS,
 	"ourdomains",		OURDOMS,
-	0,			NONE,
+	0,			NONE
 };
 
 static Keyword actions[] = {
@@ -38,7 +38,7 @@
 	"deny",			DENIED,
 	"dial",			DIALUP,
 	"delay",		DELAY,
-	0,			NONE,
+	0,			NONE
 };
 
 static	int	hisaction;
diff --git a/src/cmd/upas/vf/vf.c b/src/cmd/upas/vf/vf.c
index bc8a796..4a8846b 100644
--- a/src/cmd/upas/vf/vf.c
+++ b/src/cmd/upas/vf/vf.c
@@ -41,18 +41,18 @@
 
 enum
 {
-	// encodings
+	/* encodings */
 	Enone=	0,
 	Ebase64,
 	Equoted,
 
-	// disposition possibilities
+	/* disposition possibilities */
 	Dnone=	0,
 	Dinline,
 	Dfile,
 	Dignore,
 
-	PAD64=	'=',
+	PAD64=	'='
 };
 
 /*
@@ -98,7 +98,7 @@
 	{ "content-type:", ctype, },
 	{ "content-transfer-encoding:", cencoding, },
 	{ "content-disposition:", cdisposition, },
-	{ 0, },
+	{ 0, }
 };
 
 /*
@@ -926,7 +926,7 @@
 {
 	{ "us-ascii",		8,	1, },
 	{ "utf-8",		5,	0, },
-	{ "iso-8859-1",		10,	1, },
+	{ "iso-8859-1",		10,	1, }
 };
 
 /*
@@ -951,7 +951,7 @@
 	e = token+len-2;
 	token += 2;
 
-	// bail if we don't understand the character set
+	/* bail if we don't understand the character set */
 	for(i = 0; i < nelem(charsets); i++)
 		if(cistrncmp(charsets[i].name, token, charsets[i].len) == 0)
 		if(token[charsets[i].len] == '?'){
@@ -961,11 +961,11 @@
 	if(i >= nelem(charsets))
 		goto err;
 
-	// bail if it doesn't fit 
+	/* bail if it doesn't fit  */
 	if(strlen(token) > sizeof(decoded)-1)
 		goto err;
 
-	// bail if we don't understand the encoding
+	/* bail if we don't understand the encoding */
 	if(cistrncmp(token, "b?", 2) == 0){
 		token += 2;
 		len = dec64((uchar*)decoded, sizeof(decoded), token, e-token);
@@ -1002,7 +1002,7 @@
 enum
 {
 	Self=	1,
-	Hex=	2,
+	Hex=	2
 };
 uchar	tableqp[256];
 
@@ -1084,7 +1084,7 @@
 	if(in < e)
 		p = decquotedline(p, in, e-1);
 
-	// make sure we end with a new line
+	/* make sure we end with a new line */
 	if(*(p-1) != '\n'){
 		*p++ = '\n';
 		*p = 0;
diff --git a/src/cmd/vac/dat.h b/src/cmd/vac/dat.h
index 869ea7a..1967c43 100644
--- a/src/cmd/vac/dat.h
+++ b/src/cmd/vac/dat.h
@@ -7,7 +7,7 @@
 	BytesPerEntry = 100,	/* estimate of bytes per dir entries - determines number of index entries in the block */
 	FullPercentage = 80,	/* don't allocate in block if more than this percentage full */
 	FlushSize = 200,	/* number of blocks to flush */
-	DirtyPercentage = 50,	/* maximum percentage of dirty blocks */
+	DirtyPercentage = 50	/* maximum percentage of dirty blocks */
 };
 
 
diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c
index e5629ae..893d6a8 100644
--- a/src/cmd/vac/file.c
+++ b/src/cmd/vac/file.c
@@ -917,12 +917,12 @@
 	f->dir.mtime = dir->mtime;
 	f->dir.atime = dir->atime;
 
-//fprint(2, "mode %x %x ", f->dir.mode, dir->mode);
+/*fprint(2, "mode %x %x ", f->dir.mode, dir->mode); */
 	mask = ~(ModeDir|ModeSnapshot);
 	f->dir.mode &= ~mask;
 	f->dir.mode |= mask & dir->mode;
 	f->dirty = 1;
-//fprint(2, "->%x\n", f->dir.mode);
+/*fprint(2, "->%x\n", f->dir.mode); */
 
 	filemetaflush2(f, oelem);
 	vtfree(oelem);
@@ -1138,7 +1138,7 @@
 	bb = vtfileblock(fp->msource, f->boff, VtORDWR);
 	mbdelete(&mb, i, &me);
 	mbpack(&mb);
-//	blockDependency(b, bb, -1, nil, nil);
+/*	blockDependency(b, bb, -1, nil, nil); */
 	vtblockput(bb);
 	/* vtblockdirty(b); */
 	vtblockput(b);
@@ -1641,7 +1641,7 @@
 static int
 filerlock(VacFile *f)
 {
-//	assert(!canwlock(&f->fs->elk));
+/*	assert(!canwlock(&f->fs->elk)); */
 	rlock(&f->lk);
 	if(chksource(f) < 0){
 		runlock(&f->lk);
@@ -1659,7 +1659,7 @@
 static int
 filelock(VacFile *f)
 {
-//	assert(!canwlock(&f->fs->elk));
+/*	assert(!canwlock(&f->fs->elk)); */
 	wlock(&f->lk);
 	if(chksource(f) < 0){
 		wunlock(&f->lk);
@@ -1683,7 +1683,7 @@
 filemetalock(VacFile *f)
 {
 	assert(f->up != nil);
-//	assert(!canwlock(&f->fs->elk));
+/*	assert(!canwlock(&f->fs->elk)); */
 	wlock(&f->up->lk);
 }
 
diff --git a/src/cmd/vac/rtest.c b/src/cmd/vac/rtest.c
index d45cd0f..8114333 100644
--- a/src/cmd/vac/rtest.c
+++ b/src/cmd/vac/rtest.c
@@ -2,7 +2,7 @@
 
 enum {
 	Nblock = 300000,
-	BlockSize = 8*1024,
+	BlockSize = 8*1024
 };
 
 uchar data[Nblock*VtScoreSize];
diff --git a/src/cmd/vac/srcload.c b/src/cmd/vac/srcload.c
index 5dec719..8f3b2a0 100644
--- a/src/cmd/vac/srcload.c
+++ b/src/cmd/vac/srcload.c
@@ -89,12 +89,12 @@
 	}
 
 	fprint(2, "count = %d top = %lud\n", count(r, 0), sourceGetDirSize(r));
-//	cacheCheck(c);
+/*	cacheCheck(c); */
 fprint(2, "deleting\n");
 	for(i=0; i<num; i++)
 		delete(r);
 
-//	dump(r, 0, 0);
+/*	dump(r, 0, 0); */
 	
 	lumpDecRef(r->lump, 0);
 	sourceRemove(r);
diff --git a/src/cmd/vac/vac-orig.c b/src/cmd/vac/vac-orig.c
index c38365b..637c49c 100644
--- a/src/cmd/vac/vac-orig.c
+++ b/src/cmd/vac/vac-orig.c
@@ -73,7 +73,7 @@
 enum {
 	Version = 8,
 	BlockSize = 8*1024,
-	MaxExclude = 1000,
+	MaxExclude = 1000
 };
 
 struct {
@@ -190,7 +190,7 @@
 	if(statsFlag)
 		fprint(2, "files %ld:%ld data %ld:%ld:%ld meta %ld\n", stats.file, stats.sfile,
 			stats.data, stats.skip, stats.sdata, stats.meta);
-//packetStats();
+/*packetStats(); */
 	vtClose(z);
 	vtDetach();
 
diff --git a/src/cmd/vac/vac.c b/src/cmd/vac/vac.c
index 9ff3d12..4848d7c 100644
--- a/src/cmd/vac/vac.c
+++ b/src/cmd/vac/vac.c
@@ -77,7 +77,7 @@
 enum {
 	Version = 8,
 	BlockSize = 8*1024,
-	MaxExclude = 1000,
+	MaxExclude = 1000
 };
 
 struct {
@@ -202,7 +202,7 @@
 	if(statsflag)
 		fprint(2, "files %ld:%ld data %ld:%ld:%ld meta %ld\n", stats.file, stats.sfile,
 			stats.data, stats.skip, stats.sdata, stats.meta);
-//packetStats();
+/*packetStats(); */
 	vthangup(z);
 
 	threadexitsall(0);
diff --git a/src/cmd/vac/vac.h b/src/cmd/vac/vac.h
index 9d0cf52..6d5a820 100644
--- a/src/cmd/vac/vac.h
+++ b/src/cmd/vac/vac.h
@@ -30,7 +30,7 @@
 	ModeTemporary = (1<<19),	/* MS-DOS */
 	ModeSnapshot = (1<<20),		/* read only snapshot */
 	ModeDevice = (1<<21),		/* Unix device */
-	ModeNamedPipe = (1<<22),	/* Unix named pipe */
+	ModeNamedPipe = (1<<22)	/* Unix named pipe */
 };
 
 enum
@@ -39,7 +39,7 @@
 	MetaHeaderSize = 12,
 	MetaIndexSize = 4,
 	IndexEntrySize = 8,
-	DirMagic = 0x1c4d9072,
+	DirMagic = 0x1c4d9072
 };
 
 enum
@@ -47,7 +47,7 @@
 	DirPlan9Entry = 1,	/* not valid in version >= 9 */
 	DirNTEntry,		/* not valid in version >= 9 */
 	DirQidSpaceEntry,
-	DirGenEntry,		/* not valid in version >= 9 */
+	DirGenEntry		/* not valid in version >= 9 */
 };
 
 struct VacDir
diff --git a/src/cmd/vac/vacfs.c b/src/cmd/vac/vacfs.c
index 17d0903..2475845 100644
--- a/src/cmd/vac/vacfs.c
+++ b/src/cmd/vac/vacfs.c
@@ -9,12 +9,12 @@
 
 enum
 {
-	OPERM	= 0x3,		/* mask of all permission types in open mode */
+	OPERM	= 0x3		/* mask of all permission types in open mode */
 };
 
 enum
 {
-	DirBufSize = 20,
+	DirBufSize = 20
 };
 
 struct Fid
@@ -46,7 +46,7 @@
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 Fid	*fids;
@@ -59,7 +59,7 @@
 Fcall	thdr;
 VacFs	*fs;
 VtConn  *conn;
-// VtSession *session;
+/* VtSession *session; */
 int	noperm;
 int	dotu;
 
diff --git a/src/cmd/vac/wtest.c b/src/cmd/vac/wtest.c
index 3cc15e9..35dc823 100644
--- a/src/cmd/vac/wtest.c
+++ b/src/cmd/vac/wtest.c
@@ -2,7 +2,7 @@
 
 enum {
 	Nblock = 10000,
-	BlockSize = 8*1024,
+	BlockSize = 8*1024
 };
 
 uchar data[Nblock*BlockSize];
diff --git a/src/cmd/vbackup/config.c b/src/cmd/vbackup/config.c
index 0efeeee..7d5e2d8 100644
--- a/src/cmd/vbackup/config.c
+++ b/src/cmd/vbackup/config.c
@@ -117,22 +117,22 @@
 		nf = tokenize(p, f, nelem(f));
 		if(nf != 3){
 			fprint(2, "%s:%d: syntax error\n", name, line);
-			// ok = 0;
+			/* ok = 0; */
 			continue;
 		}
 		if(vtparsescore(f[1], &pref, score) < 0){
 			fprint(2, "%s:%d: bad score '%s'\n", name, line, f[1]);
-			// ok = 0;
+			/* ok = 0; */
 			continue;
 		}
 		if(f[0][0] != '/'){
 			fprint(2, "%s:%d: unrooted path '%s'\n", name, line, f[0]);
-			// ok = 0;
+			/* ok = 0; */
 			continue;
 		}
 		if(addpath(c, f[0], score, strtoul(f[2], 0, 0)) < 0){
 			fprint(2, "%s:%d: %s: %r\n", name, line, f[0]);
-			// ok = 0;
+			/* ok = 0; */
 			continue;
 		}
 	}
diff --git a/src/cmd/vbackup/nfs3srv.h b/src/cmd/vbackup/nfs3srv.h
index 329db78..79d4464 100644
--- a/src/cmd/vbackup/nfs3srv.h
+++ b/src/cmd/vbackup/nfs3srv.h
@@ -11,6 +11,6 @@
 
 enum
 {
-	MaxDataSize = 8192,
+	MaxDataSize = 8192
 };
 
diff --git a/src/cmd/vbackup/queue.h b/src/cmd/vbackup/queue.h
index 053346a..6b2317c 100644
--- a/src/cmd/vbackup/queue.h
+++ b/src/cmd/vbackup/queue.h
@@ -1,6 +1,6 @@
 enum
 {
-	MAXQ = 256,
+	MAXQ = 256
 };
 
 typedef struct Queue Queue;
diff --git a/src/cmd/vbackup/vbackup.c b/src/cmd/vbackup/vbackup.c
index b5d8251..9e4c3b0 100644
--- a/src/cmd/vbackup/vbackup.c
+++ b/src/cmd/vbackup/vbackup.c
@@ -43,7 +43,7 @@
 
 enum
 {
-	STACK = 32768,
+	STACK = 32768
 };
 
 typedef struct WriteReq WriteReq;
diff --git a/src/cmd/vbackup/vftp.c b/src/cmd/vbackup/vftp.c
index a5f1874..d692afd 100644
--- a/src/cmd/vbackup/vftp.c
+++ b/src/cmd/vbackup/vftp.c
@@ -42,7 +42,7 @@
 	"pwd", cmdpwd, "pwd - print working directory",
 	"help", cmdhelp, "help - print usage summaries",
 	"block", cmdblock, "block path offset - print disk offset of path's byte offset",
-	"disk", cmddisk, "disk offset count - dump disk contents",
+	"disk", cmddisk, "disk offset count - dump disk contents"
 };
 
 char*
diff --git a/src/cmd/vbackup/vmount0.c b/src/cmd/vbackup/vmount0.c
index 8d65058..93340c1 100644
--- a/src/cmd/vbackup/vmount0.c
+++ b/src/cmd/vbackup/vmount0.c
@@ -15,7 +15,7 @@
 uchar handle[64] = {
 	/* SHA1("/") */
 	0x42, 0x09, 0x9B, 0x4A, 0xF0, 0x21, 0xE5, 0x3F, 0xD8, 0xFD,
-	0x4E, 0x05, 0x6C, 0x25, 0x68, 0xD7, 0xC2, 0xE3, 0xFF, 0xA8,
+	0x4E, 0x05, 0x6C, 0x25, 0x68, 0xD7, 0xC2, 0xE3, 0xFF, 0xA8
 };
 
 void
diff --git a/src/cmd/vbackup/vnfs.c b/src/cmd/vbackup/vnfs.c
index 7ec7d52..1de100c 100644
--- a/src/cmd/vbackup/vnfs.c
+++ b/src/cmd/vbackup/vnfs.c
@@ -233,7 +233,7 @@
 	RandSize = 16,
 	SessidSize = 8,
 	HeaderSize = RandSize+SessidSize,
-	MaxHandleSize = Nfs3MaxHandleSize - HeaderSize,
+	MaxHandleSize = Nfs3MaxHandleSize - HeaderSize
 };
 
 AESstate		aesstate;
@@ -342,7 +342,7 @@
 {
 	/* sizes used in handles; see nfs server below */
 	CnodeHandleSize = 8,
-	FsysHandleOffset = CnodeHandleSize,
+	FsysHandleOffset = CnodeHandleSize
 };
 
 /*
@@ -588,7 +588,7 @@
 		if(*p != '/')
 			*--p = '/';
 	}
-//fprint(2, "parseipandmask %s => %I %I\n", s, ip, mask);
+/*fprint(2, "parseipandmask %s => %I %I\n", s, ip, mask); */
 	return 0;
 }
 
@@ -863,7 +863,7 @@
 {
 	for(;;){
 		recvp(timerchan);
-	//	refreshconfig();
+	/*	refreshconfig(); */
 	}
 }
 
diff --git a/src/cmd/venti/devnull.c b/src/cmd/venti/devnull.c
index 29cf9ec..c48a93a 100644
--- a/src/cmd/venti/devnull.c
+++ b/src/cmd/venti/devnull.c
@@ -14,7 +14,7 @@
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 void
diff --git a/src/cmd/venti/readlist.c b/src/cmd/venti/readlist.c
index bb1d9b6..6d92808 100644
--- a/src/cmd/venti/readlist.c
+++ b/src/cmd/venti/readlist.c
@@ -105,7 +105,7 @@
 		n = vtread(z, score, type, buf, VtMaxLumpSize);
 		if(n < 0)
 			sysfatal("could not read %s %s: %r", f[0], f[1]);
-		// write(1, buf, n);
+		/* write(1, buf, n); */
 		if(++nn%1000 == 0)
 			print("%d...", nn);
 	}
diff --git a/src/cmd/venti/ro.c b/src/cmd/venti/ro.c
index 541dae4..ee954a3 100644
--- a/src/cmd/venti/ro.c
+++ b/src/cmd/venti/ro.c
@@ -15,7 +15,7 @@
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 void
diff --git a/src/cmd/venti/srv/arena.c b/src/cmd/venti/srv/arena.c
index f1ccce3..8cfe3e5 100644
--- a/src/cmd/venti/srv/arena.c
+++ b/src/cmd/venti/srv/arena.c
@@ -257,7 +257,7 @@
 		if(m > n - nn)
 			m = n - nn;
 		memmove(&b->data[off], &clbuf[nn], m);
-		// ok = writepart(arena->part, a, b->data, blocksize);
+		/* ok = writepart(arena->part, a, b->data, blocksize); */
 		ok = 0;
 		putdblock(b);
 		if(ok < 0){
@@ -329,7 +329,7 @@
 		if(m > n - nn)
 			m = n - nn;
 		memmove(&b->data[off], &clbuf[nn], m);
-	//	ok = writepart(arena->part, a, b->data, blocksize);
+	/*	ok = writepart(arena->part, a, b->data, blocksize); */
 		ok = 0;
 		putdblock(b);
 		if(ok < 0){
@@ -595,7 +595,7 @@
 	b = alloczblock(arena->blocksize, 1, arena->part->blocksize);
 	if(b == nil){
 		logerr(EAdmin, "can't write arena header: %r");
-///ZZZ add error message?
+/*/ZZZ add error message? */
 		return -1;
 	}
 	/*
diff --git a/src/cmd/venti/srv/arenas.c b/src/cmd/venti/srv/arenas.c
index 2ad1bb0..0bffd3c 100644
--- a/src/cmd/venti/srv/arenas.c
+++ b/src/cmd/venti/srv/arenas.c
@@ -214,7 +214,7 @@
 		return -1;
 	b = alloczblock(HeadSize, 1, 0);
 	if(b == nil)
-//ZZZ set error message?
+/*ZZZ set error message? */
 		return -1;
 
 	if(packarenapart(ap, b->data) < 0){
diff --git a/src/cmd/venti/srv/buildbuck.c b/src/cmd/venti/srv/buildbuck.c
index 240e77d..225bdc4 100644
--- a/src/cmd/venti/srv/buildbuck.c
+++ b/src/cmd/venti/srv/buildbuck.c
@@ -21,7 +21,7 @@
 {
 	IEStream *ies;
 
-//ZZZ out of memory?
+/*ZZZ out of memory? */
 	ies = MKZ(IEStream);
 	ies->buf = MKN(u8int, size);
 	ies->epos = ies->buf;
@@ -61,7 +61,7 @@
 		nn -= n;
 		if(nn == 0)
 			return nil;
-//fprint(2, "peek %d from %llud into %p\n", nn, ies->off, ies->epos);
+/*fprint(2, "peek %d from %llud into %p\n", nn, ies->off, ies->epos); */
 		if(readpart(ies->part, ies->off, ies->epos, nn) < 0){
 			seterr(EOk, "can't read sorted index entries: %r");
 			return nil;
@@ -101,7 +101,7 @@
 		b = peekientry(ies);
 		if(b == nil)
 			return TWID32;
-//fprint(2, "b=%p ies->n=%lld ib.n=%d buck=%d score=%V\n", b, ies->n, ib->n, iebuck(ix, b, ib, ies), b);
+/*fprint(2, "b=%p ies->n=%lld ib.n=%d buck=%d score=%V\n", b, ies->n, ib->n, iebuck(ix, b, ib, ies), b); */
 		if(ib->n == 0)
 			buck = iebuck(ix, b, ib, ies);
 		else{
diff --git a/src/cmd/venti/srv/buildindex.c b/src/cmd/venti/srv/buildindex.c
index 640b190..e70a830 100644
--- a/src/cmd/venti/srv/buildindex.c
+++ b/src/cmd/venti/srv/buildindex.c
@@ -43,7 +43,7 @@
 	uint nbuck;
 	u64int found = 0;
 
-//ZZZ make buffer size configurable
+/*ZZZ make buffer size configurable */
 	b = alloczblock(ix->blocksize, 0, ix->blocksize);
 	z = alloczblock(ix->blocksize, 1, ix->blocksize);
 	ies = initiestream(part, off, clumps, 64*1024);
diff --git a/src/cmd/venti/srv/checkindex.c b/src/cmd/venti/srv/checkindex.c
index f7040d1..9397d78 100644
--- a/src/cmd/venti/srv/checkindex.c
+++ b/src/cmd/venti/srv/checkindex.c
@@ -109,7 +109,7 @@
 	int ok, bok;
 u64int found = 0;
 
-//ZZZ make buffer size configurable
+/*ZZZ make buffer size configurable */
 	b = alloczblock(ix->blocksize, 0, ix->blocksize);
 	z = alloczblock(ix->blocksize, 1, ix->blocksize);
 	ies = initiestream(part, off, clumps, 64*1024);
diff --git a/src/cmd/venti/srv/conv.c b/src/cmd/venti/srv/conv.c
index 13afc7d..83f51df 100644
--- a/src/cmd/venti/srv/conv.c
+++ b/src/cmd/venti/srv/conv.c
@@ -23,7 +23,7 @@
 	ArenaHeadMagic, "ArenaHeadMagic",
 	ArenaMagic, "ArenaMagic",
 	ISectMagic, "ISectMagic",
-	BloomMagic, "BloomMagic",
+	BloomMagic, "BloomMagic"
 };
 
 static char*
diff --git a/src/cmd/venti/srv/dat.h b/src/cmd/venti/srv/dat.h
index 37c3a05..5101ff8 100644
--- a/src/cmd/venti/srv/dat.h
+++ b/src/cmd/venti/srv/dat.h
@@ -75,17 +75,23 @@
 	/*
 	 * magic numbers on disk
 	 */
-	_ClumpMagic		= 0xd15cb10cU,	/* clump header, deprecated */
+/*	_ClumpMagic		= 0xd15cb10cU,	/ * clump header, deprecated */
+#define	_ClumpMagic	0xd15cb10cU
 	ClumpFreeMagic		= 0,		/* free clump; terminates active clump log */
 
-	ArenaPartMagic		= 0xa9e4a5e7U,	/* arena partition header */
-	ArenaMagic		= 0xf2a14eadU,	/* arena trailer */
-	ArenaHeadMagic		= 0xd15c4eadU,	/* arena header */
-	
-	BloomMagic		= 0xb1004eadU,	/* bloom filter header */
+/*	ArenaPartMagic		= 0xa9e4a5e7U,	/ * arena partition header */
+/*	ArenaMagic		= 0xf2a14eadU,	/ * arena trailer */
+/*	ArenaHeadMagic		= 0xd15c4eadU,	/ * arena header */
+#define	ArenaPartMagic		0xa9e4a5e7U
+#define	ArenaMagic		0xf2a14eadU
+#define	ArenaHeadMagic		0xd15c4eadU
+
+/*	BloomMagic		= 0xb1004eadU,	/ * bloom filter header */
+#define	BloomMagic		0xb1004eadU
 	BloomMaxHash	= 32,
 
-	ISectMagic		= 0xd15c5ec7U,	/* index header */
+/*	ISectMagic		= 0xd15c5ec7U,	/ * index header */
+#define	ISectMagic		0xd15c5ec7U
 
 	ArenaPartVersion	= 3,
 	ArenaVersion4		= 4,
@@ -436,7 +442,7 @@
 	u32int		buckets;		/* last bucket used in disk hash table */
 	u32int		blocksize;
 	u32int		tabsize;		/* max. bytes in index config */
-	u32int		bitblocks;	//XXX remove these fields
+	u32int		bitblocks;	/* XXX remove these fields */
 	u32int		maxdepth;
 	u32int		bitkeylog;
 	u32int		bitkeymask;
diff --git a/src/cmd/venti/srv/dcache.c b/src/cmd/venti/srv/dcache.c
index 72aaafa..f5cc8e6 100644
--- a/src/cmd/venti/srv/dcache.c
+++ b/src/cmd/venti/srv/dcache.c
@@ -34,7 +34,7 @@
 {
 	HashLog		= 9,
 	HashSize	= 1<<HashLog,
-	HashMask	= HashSize - 1,
+	HashMask	= HashSize - 1
 };
 
 struct DCache
@@ -213,7 +213,7 @@
 		lastmiss.addr = addr;
 	}
 
-//	fprint(2, "%s %llx %s\n", part->name, addr, miss ? "miss" : "hit");
+/*	fprint(2, "%s %llx %s\n", part->name, addr, miss ? "miss" : "hit"); */
 }
 
 int
@@ -297,7 +297,7 @@
 	/*
 	 * look for the block in the cache
 	 */
-//checkdcache();
+/*checkdcache(); */
 	qlock(&dcache.lock);
 again:
 	for(b = dcache.heads[h]; b != nil; b = b->next){
@@ -367,7 +367,7 @@
 		fixheap(b->heap, b);
 
 	qunlock(&dcache.lock);
-//checkdcache();
+/*checkdcache(); */
 
 	trace(TraceBlock, "getdblock lock");
 	addstat(StatDblockStall, 1);
@@ -427,7 +427,7 @@
 	else
 		wunlock(&b->lock);
 
-//checkdcache();
+/*checkdcache(); */
 	qlock(&dcache.lock);
 	if(--b->ref == 0 && !b->dirty){
 		if(b->heap == TWID32)
@@ -435,7 +435,7 @@
 		rwakeupall(&dcache.full);
 	}
 	qunlock(&dcache.lock);
-//checkdcache();
+/*checkdcache(); */
 }
 
 void
diff --git a/src/cmd/venti/srv/findscore.c b/src/cmd/venti/srv/findscore.c
index 226d97a..6681503 100644
--- a/src/cmd/venti/srv/findscore.c
+++ b/src/cmd/venti/srv/findscore.c
@@ -27,7 +27,7 @@
 	u32int clump;
 	int i, n, found;
 
-//ZZZ remove fprint?
+/*ZZZ remove fprint? */
 	if(arena->memstats.clumps)
 		fprint(2, "reading directory for arena=%s with %d entries\n", arena->name, arena->memstats.clumps);
 
diff --git a/src/cmd/venti/srv/httpd.c b/src/cmd/venti/srv/httpd.c
index 2269c97..ad7222d 100644
--- a/src/cmd/venti/srv/httpd.c
+++ b/src/cmd/venti/srv/httpd.c
@@ -105,7 +105,7 @@
 	char *address, ndir[NETPATHLEN], dir[NETPATHLEN];
 	int ctl, nctl, data;
 
-//sleep(1000);	/* let strace find us */
+/*sleep(1000);	// let strace find us */
 
 	address = vaddress;
 	ctl = announce(address, dir);
@@ -148,7 +148,7 @@
 	HConnect *c;
 	int ok, i, n;
 
-//sleep(1000);	/* let strace find us */
+/*sleep(1000);	// let strace find us */
 	c = v;
 
 	for(;;){
@@ -722,7 +722,7 @@
 	"isectwritebyte",
 
 	"sumread",
-	"sumreadbyte",
+	"sumreadbyte"
 };
 
 static int
diff --git a/src/cmd/venti/srv/icachewrite.c b/src/cmd/venti/srv/icachewrite.c
index 900af87..9c36ba2 100644
--- a/src/cmd/venti/srv/icachewrite.c
+++ b/src/cmd/venti/srv/icachewrite.c
@@ -102,7 +102,7 @@
 
 		trace(TraceProc, "icachewritesect readpart 0x%llux+0x%ux", addr, nbuf);
 		if(readpart(is->part, addr, buf, nbuf) < 0){
-			// XXX
+			/* XXX */
 			fprint(2, "icachewriteproc readpart: %r\n");
 			err  = -1;
 			continue;
@@ -154,7 +154,7 @@
 
 		trace(TraceProc, "icachewritesect writepart", addr, nbuf);
 		if(writepart(is->part, addr, buf, nbuf) < 0){
-			// XXX
+			/* XXX */
 			fprint(2, "icachewriteproc writepart: %r\n");
 			err = -1;
 			continue;
diff --git a/src/cmd/venti/srv/index.c b/src/cmd/venti/srv/index.c
index 46bf91e..8cff418 100644
--- a/src/cmd/venti/srv/index.c
+++ b/src/cmd/venti/srv/index.c
@@ -23,16 +23,16 @@
 #include "dat.h"
 #include "fns.h"
 
-//static int	bucklook(u8int *score, int type, u8int *data, int n);
-//static int	writebucket(ISect *is, u32int buck, IBucket *ib, DBlock *b);
-//static int	okibucket(IBucket *ib, ISect *is);
+/*static int	bucklook(u8int *score, int type, u8int *data, int n); */
+/*static int	writebucket(ISect *is, u32int buck, IBucket *ib, DBlock *b); */
+/*static int	okibucket(IBucket *ib, ISect *is); */
 static int	initindex1(Index*);
 static ISect	*initisect1(ISect *is);
-//static int	splitiblock(Index *ix, DBlock *b, ISect *is, u32int buck, IBucket *ib);
+/*static int	splitiblock(Index *ix, DBlock *b, ISect *is, u32int buck, IBucket *ib); */
 
 #define KEY(k,d)	((d) ? (k)>>(32-(d)) : 0)
 
-//static QLock	indexlock;	//ZZZ
+/*static QLock	indexlock;	//ZZZ */
 
 static char IndexMagic[] = "venti index configuration";
 
@@ -457,9 +457,9 @@
 	v = is->part->size & ~(u64int)(is->blocksize - 1);
 	if(is->blockbase + (u64int)is->blocks * is->blocksize != v){
 		seterr(ECorrupt, "invalid blocks in index section %s", is->name);
-//ZZZZZZZZZ
-//		freeisect(is);
-//		return nil;
+/*ZZZZZZZZZ */
+/*		freeisect(is); */
+/*		return nil; */
 	}
 
 	if(is->stop - is->start > is->blocks){
@@ -483,7 +483,7 @@
 
 	b = alloczblock(HeadSize, 1, 0);
 	if(b == nil)
-//ZZZ set error?
+/*ZZZ set error? */
 		return -1;
 
 	if(packisect(is, b->data) < 0){
diff --git a/src/cmd/venti/srv/lump.c b/src/cmd/venti/srv/lump.c
index d1e58a6..1fe3cf5 100644
--- a/src/cmd/venti/srv/lump.c
+++ b/src/cmd/venti/srv/lump.c
@@ -45,7 +45,7 @@
 		*cached = 0;
 
 	if(lookupscore(score, type, &ia, &rac) < 0){
-		//ZZZ place to check for someone trying to guess scores
+		/*ZZZ place to check for someone trying to guess scores */
 		seterr(EOk, "no block with score %V/%d exists", score, type);
 
 		putlump(u);
diff --git a/src/cmd/venti/srv/lumpcache.c b/src/cmd/venti/srv/lumpcache.c
index 8a1e2d9..f183e12 100644
--- a/src/cmd/venti/srv/lumpcache.c
+++ b/src/cmd/venti/srv/lumpcache.c
@@ -11,7 +11,7 @@
 {
 	HashLog		= 9,
 	HashSize	= 1<<HashLog,
-	HashMask	= HashSize - 1,
+	HashMask	= HashSize - 1
 };
 
 struct LumpCache
@@ -175,7 +175,7 @@
 	 * remove it from the heap, and fix up the heap.
 	 */
 	size = packetasize(p);
-//ZZZ
+/*ZZZ */
 	while(lumpcache.avail < size){
 		trace(TraceLump, "insertlump bump");
 		CHECK(checklumpcache());
diff --git a/src/cmd/venti/srv/printarenas.c b/src/cmd/venti/srv/printarenas.c
index 111db01..90c74cc 100644
--- a/src/cmd/venti/srv/printarenas.c
+++ b/src/cmd/venti/srv/printarenas.c
@@ -36,7 +36,7 @@
 
 enum
 {
-	ClumpChunks = 32*1024,
+	ClumpChunks = 32*1024
 };
 
 void
diff --git a/src/cmd/venti/srv/sortientry.c b/src/cmd/venti/srv/sortientry.c
index 28d469f..7ed9ba3 100644
--- a/src/cmd/venti/srv/sortientry.c
+++ b/src/cmd/venti/srv/sortientry.c
@@ -61,7 +61,7 @@
 	u32int n;
 	int i, ok;
 
-//ZZZ should allow configuration of bits, bucket size
+/*ZZZ should allow configuration of bits, bucket size */
 	ib = initiebucks(tmp, 8, 64*1024);
 	if(ib == nil){
 		seterr(EOk, "can't create sorting buckets: %r");
@@ -116,10 +116,10 @@
 	ClumpInfo *ci, *cis;
 	u32int clump;
 	int i, n, ok, nskip;
-//	static Biobuf bout;
+/*	static Biobuf bout; */
 
-//ZZZ remove fprint?
-//fprint(2, "ra %s %d %d\n", arena->name, arena->memstats.clumps, arena->diskstats.clumps);
+/*ZZZ remove fprint? */
+/*fprint(2, "ra %s %d %d\n", arena->name, arena->memstats.clumps, arena->diskstats.clumps); */
 	if(arena->memstats.clumps)
 		fprint(2, "\tarena %s: %d entries\n", arena->name, arena->memstats.clumps);
 	else
@@ -129,7 +129,7 @@
 	ok = 0;
 	nskip = 0;
 	memset(&ie, 0, sizeof(IEntry));
-//	Binit(&bout, 1, OWRITE);
+/*	Binit(&bout, 1, OWRITE); */
 	for(clump = 0; clump < arena->memstats.clumps; clump += n){
 		n = ClumpChunks;
 		if(n > arena->memstats.clumps - clump)
@@ -148,18 +148,18 @@
 			a += ci->size + ClumpSize;
 			ie.ia.blocks = (ci->size + ClumpSize + (1 << ABlockLog) - 1) >> ABlockLog;
 			scorecp(ie.score, ci->score);
-		//	Bprint(&bout, "%22lld %V %3d %5d\n",
-		//		ie.ia.addr, ie.score, ie.ia.type, ie.ia.size);
+		/*	Bprint(&bout, "%22lld %V %3d %5d\n", */
+		/*		ie.ia.addr, ie.score, ie.ia.type, ie.ia.size); */
 			if(ci->type == VtCorruptType){
-			//	print("! %V %22lld %3d %5d %3d\n",
-			//		ie.score, ie.ia.addr, ie.ia.type, ie.ia.size, ie.ia.blocks);
+			/*	print("! %V %22lld %3d %5d %3d\n", */
+			/*		ie.score, ie.ia.addr, ie.ia.type, ie.ia.size, ie.ia.blocks); */
 				nskip++;
 			}else
 				sprayientry(ib, &ie);
 			markbloomfilter(b, ie.score);
 		}
 	}
-//	Bterm(&bout);
+/*	Bterm(&bout); */
 	free(cis);
 	if(ok < 0)
 		return TWID32;
@@ -358,8 +358,8 @@
 	m = ib->bucks[b].used;
 	if(m == 0)
 		m = ib->usable;
-//	if(ib->bucks[b].total)
-//		fprint(2, "\tbucket %d: %d entries\n", b, ib->bucks[b].total/IEntrySize);
+/*	if(ib->bucks[b].total) */
+/*		fprint(2, "\tbucket %d: %d entries\n", b, ib->bucks[b].total/IEntrySize); */
 	while(head != TWID32){
 		if(readpart(ib->part, (u64int)head * ib->size, &ib->buf[n], m+U32Size) < 0){
 			seterr(EOk, "can't read index sort bucket: %r");
diff --git a/src/cmd/venti/srv/stats.c b/src/cmd/venti/srv/stats.c
index 874f7d2..f578860 100644
--- a/src/cmd/venti/srv/stats.c
+++ b/src/cmd/venti/srv/stats.c
@@ -80,7 +80,7 @@
 	{ "isect block write bytes", },
 
 	{ "sum reads", },
-	{ "sum read bytes", },
+	{ "sum read bytes", }
 };
 
 QLock statslock;
diff --git a/src/cmd/venti/srv/syncarena.c b/src/cmd/venti/srv/syncarena.c
index d11ca4f..7a5d6f9 100644
--- a/src/cmd/venti/srv/syncarena.c
+++ b/src/cmd/venti/srv/syncarena.c
@@ -30,7 +30,7 @@
 	ZBlock *lump;
 	Clump cl;
 	ClumpInfo ci;
-	static ClumpInfo zci = { .type = -1 };
+	static ClumpInfo zci = { -1 };
 	u8int score[VtScoreSize];
 	u64int uncsize, used, aa;
 	u32int clump, clumps, cclumps, magic;
diff --git a/src/cmd/venti/srv/unwhack.c b/src/cmd/venti/srv/unwhack.c
index 5530bd0..587046c 100644
--- a/src/cmd/venti/srv/unwhack.c
+++ b/src/cmd/venti/srv/unwhack.c
@@ -23,7 +23,7 @@
 static uchar lenbits[] =
 {
 	0, 0, 0,
-	2, 3, 5, 5,
+	2, 3, 5, 5
 };
 
 static uchar offbits[16] =
diff --git a/src/cmd/venti/srv/venti.c b/src/cmd/venti/srv/venti.c
index 84abddd..1e924ae 100644
--- a/src/cmd/venti/srv/venti.c
+++ b/src/cmd/venti/srv/venti.c
@@ -210,8 +210,8 @@
 		trace(TraceRpc, "<- %F", &r->tx);
 		r->rx.msgtype = r->tx.msgtype+1;
 		addstat(StatRpcTotal, 1);
-	//	print("req (arenas[0]=%p sects[0]=%p) %F\n",
-	//		mainindex->arenas[0], mainindex->sects[0], &r->tx);
+	/*	print("req (arenas[0]=%p sects[0]=%p) %F\n", */
+	/*		mainindex->arenas[0], mainindex->sects[0], &r->tx); */
 		switch(r->tx.msgtype){
 		default:
 			vtrerror(r, "unknown request");
diff --git a/src/cmd/venti/srv/wrarena.c b/src/cmd/venti/srv/wrarena.c
index 7563fae..8a2e929 100644
--- a/src/cmd/venti/srv/wrarena.c
+++ b/src/cmd/venti/srv/wrarena.c
@@ -83,8 +83,8 @@
 		if(magic == ClumpFreeMagic)
 			break;
 		if(magic != arena->clumpmagic) {
-		//	fprint(2, "illegal clump magic number %#8.8ux offset %llud\n",
-		//		magic, aa);
+		/*	fprint(2, "illegal clump magic number %#8.8ux offset %llud\n", */
+		/*		magic, aa); */
 			break;
 		}
 		lump = loadclump(arena, aa, 0, &cl, score, 0);
diff --git a/src/cmd/venti/srv/zeropart.c b/src/cmd/venti/srv/zeropart.c
index fe75c81..70c25b7 100644
--- a/src/cmd/venti/srv/zeropart.c
+++ b/src/cmd/venti/srv/zeropart.c
@@ -10,10 +10,10 @@
 	int w;
 
 	fprint(2, "clearing the partition\n");
-//fprint(2, "NOT!\n");
-//return;
-//b=alloczblock(MaxIoSize, 1, blocksize);
-//freezblock(b);
+/*fprint(2, "NOT!\n"); */
+/*return; */
+/*b=alloczblock(MaxIoSize, 1, blocksize); */
+/*freezblock(b); */
 	b = alloczblock(MaxIoSize, 1, blocksize);
 
 	w = 0;
diff --git a/src/cmd/wc.c b/src/cmd/wc.c
index 8394088..64a791d 100644
--- a/src/cmd/wc.c
+++ b/src/cmd/wc.c
@@ -120,7 +120,7 @@
 	AWDR,		/* enter statewd, don't count a rune */
 	AWDW,		/* enter statewd, count a word */
 	AWDWX,		/* enter statewd, count a word, count a bad rune */
-	AWDX,		/* enter statewd, count a bad rune */
+	AWDX		/* enter statewd, count a bad rune */
 };
 uchar statesp[256]={	/* looking for the start of a word */
 AWDW, AWDW, AWDW, AWDW, AWDW, AWDW, AWDW, AWDW,	/* 00-07 */
@@ -154,7 +154,7 @@
 AC3W, AC3W, AC3W, AC3W, AC3W, AC3W, AC3W, AC3W,	/* e0-e7 */
 AC3W, AC3W, AC3W, AC3W, AC3W, AC3W, AC3W, AC3W,	/* e8-ef */
 AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,/* f0-f7 */
-AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,/* f8-ff */
+AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX,AWDWX/* f8-ff */
 };
 uchar statewd[256]={	/* looking for the next character in a word */
 AWD,  AWD,  AWD,  AWD,  AWD,  AWD,  AWD,  AWD,	/* 00-07 */
@@ -188,7 +188,7 @@
 AC3,  AC3,  AC3,  AC3,  AC3,  AC3,  AC3,  AC3,	/* e0-e7 */
 AC3,  AC3,  AC3,  AC3,  AC3,  AC3,  AC3,  AC3,	/* e8-ef */
 AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f0-f7 */
-AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f8-ff */
+AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX	/* f8-ff */
 };
 uchar statec2[256]={	/* looking for 10xxxxxx to complete a rune */
 AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* 00-07 */
@@ -222,7 +222,7 @@
 AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X,	/* e0-e7 */
 AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X,	/* e8-ef */
 AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f0-f7 */
-AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f8-ff */
+AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX	/* f8-ff */
 };
 uchar statec3[256]={	/* looking for 10xxxxxx,10xxxxxx to complete a rune */
 AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* 00-07 */
@@ -256,7 +256,7 @@
 AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X,	/* e0-e7 */
 AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X, AC3X,	/* e8-ef */
 AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f0-f7 */
-AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX,	/* f8-ff */
+AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX, AWDX	/* f8-ff */
 };
 void
 count(int f, char *name)
diff --git a/src/cmd/yacc.c b/src/cmd/yacc.c
index be31686..c15db2e 100644
--- a/src/cmd/yacc.c
+++ b/src/cmd/yacc.c
@@ -98,7 +98,7 @@
 	EMPTY		= 1,
 	WHOKNOWS	= 0,
 	OK		= 1,
-	NOMORE		= -1000,
+	NOMORE		= -1000
 };
 
 	/* macros for getting associativity and precedence levels */