Commit Diff


commit - 226d80b8213821af0cbf092d1507c52b504fd368
commit + cbeb0b26e4c7caa8d1b47de791a7418dc20a4567
blob - a19c7378cabdb4d6246ccf0daef210d9c285aa70
blob + d538ecfc6f34f4492a40099df3d8c1cb36ab49e5
--- bin/9c
+++ bin/9c
@@ -8,6 +8,8 @@ usegcc()
 		-O2 \
 		-c \
 		-Wall \
+		-ansi \
+		-pedantic \
 		-Wno-parentheses \
 		-Wno-missing-braces \
 		-Wno-switch \
@@ -67,7 +69,7 @@ xtmp=/tmp/9c.$$.$USER.out
 $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp
 status=$?
 grep -v '__p9l_autolib_' $xtmp |
-egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:' |
+egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|In file included from|        from|use of C99 long long|ISO C forbids conversion' |
 sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' |
 uniq 1>&2
 rm -f $xtmp $xtmp.status
blob - d03d2607b8ae4adecb230e09bc34095e960d079f
blob + 77f40d6610b372b73b582e908851a6e64e04e3ac
--- include/auth.h
+++ include/auth.h
@@ -40,7 +40,7 @@ enum
 	ARrpcfailure,
 	ARphase,
 
-	AuthRpcMax = 4096,
+	AuthRpcMax = 4096
 };
 
 struct AuthRpc
@@ -108,7 +108,7 @@ typedef struct Attr Attr;
 enum {
 	AttrNameval,		/* name=val -- when matching, must have name=val */
 	AttrQuery,		/* name? -- when matching, must be present */
-	AttrDefault,		/* name:=val -- when matching, if present must match INTERNAL */
+	AttrDefault		/* name:=val -- when matching, if present must match INTERNAL */
 };
 struct Attr
 {
blob - 5f2fc0417c0a6e2cf0da2808cf57b92038c6a386
blob + c349605cca76a60ad3d6b71a502441444b09d251
--- include/authsrv.h
+++ include/authsrv.h
@@ -34,7 +34,7 @@ enum
 	KEYDBOFF=	8,		/* length of random data at the start of key file */
 	OKEYDBLEN=	ANAMELEN+DESKEYLEN+4+2,	/* length of an entry in old key file */
 	KEYDBLEN=	OKEYDBLEN+SECRETLEN,	/* length of an entry in key file */
-	OMD5LEN=	16,
+	OMD5LEN=	16
 };
 
 /* encryption numberings (anti-replay) */
@@ -60,7 +60,7 @@ enum
 	AuthAs,		/* server generated authenticator */
 	AuthAc,		/* client generated authenticator */
 	AuthTp,		/* ticket encrypted with client's key for password change */
-	AuthHr,		/* http reply */
+	AuthHr		/* http reply */
 };
 
 struct Ticketreq
@@ -140,7 +140,7 @@ extern	int	passtokey(char*, char*);
  */
 enum {
 	NVwrite = 1<<0,		/* always prompt and rewrite nvram */
-	NVwriteonerr = 1<<1,	/* prompt and rewrite nvram when corrupt */
+	NVwriteonerr = 1<<1	/* prompt and rewrite nvram when corrupt */
 };
 
 struct Nvrsafe
blob - f3a19052afe2bca6fc81b274815528d9156bddb3
blob + c9e07af7446d399a5140d829ffd8e1371fa4f7ca
--- include/disk.h
+++ include/disk.h
@@ -64,7 +64,7 @@ enum {
 
 	Gpart = 0,	/* partition info source */
 	Gdisk,
-	Gguess,
+	Gguess
 };
 
 /* proto file parsing */
blob - de5e0c26060ff25645f249a8229a5d1f8f6d3c5b
blob + 152394f5662e59e41c4aa8d296ef1c33a6287a86
--- include/draw.h
+++ include/draw.h
@@ -60,7 +60,7 @@ enum
 {
 	Displaybufsize	= 8000,
 	ICOSSCALE	= 1024,
-	Borderwidth =	4,
+	Borderwidth =	4
 };
 
 enum
@@ -103,7 +103,7 @@ typedef enum
 	DatopS	= DinS|SoutD,
 	DxorS	= DoutS|SoutD,	/* == SxorD */
 
-	Ncomp = 12,
+	Ncomp = 12
 } Drawop;
 
 /*
@@ -117,7 +117,7 @@ enum {
 	CAlpha,
 	CMap,
 	CIgnore,
-	NChan,
+	NChan
 };
 
 #define __DC(type, nbits)	((((type)&15)<<4)|((nbits)&15))
@@ -143,7 +143,7 @@ enum {
 	ARGB32	= CHAN4(CAlpha, 8, CRed, 8, CGreen, 8, CBlue, 8),	/* stupid VGAs */
 	ABGR32	= CHAN4(CAlpha, 8, CBlue, 8, CGreen, 8, CRed, 8),
 	XRGB32  = CHAN4(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8),
-	XBGR32  = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8),
+	XBGR32  = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8)
 };
 
 extern	char*	chantostr(char*, u32int);
@@ -526,7 +526,7 @@ extern	void		drawsetdebug(int);
  */
 enum
 {
-	SnarfSize = 64*1024,
+	SnarfSize = 64*1024
 };
 char *getsnarf(void);
 void putsnarf(char*);
blob - 56c1b1c3009a1fa48fa9e3bbcd60b3014867cf52
blob + 09cb5c78c01438250ccaf83d984d785809006368
--- include/event.h
+++ include/event.h
@@ -10,13 +10,13 @@ typedef struct	Menu Menu;
 enum
 {
 	Emouse		= 1,
-	Ekeyboard	= 2,
+	Ekeyboard	= 2
 };
 
 enum
 {
 	MAXSLAVE = 32,
-	EMAXMSG = 128+8192,	/* size of 9p header+data */
+	EMAXMSG = 128+8192	/* size of 9p header+data */
 };
 
 struct	Mouse
blob - 58323b6ba1cdef0f07cada6e20d9062136512d63
blob + aebb451500381ab68b2e45fc749130136848561e
--- include/fcall.h
+++ include/fcall.h
@@ -108,7 +108,7 @@ enum
 	Tmax,
 
 	Topenfd = 	98,
-	Ropenfd,
+	Ropenfd
 };
 
 uint	convM2S(uchar*, uint, Fcall*);
blob - 8fcc173c577a858d92ae649c7b5da56e0fa281a5
blob + e908ec25252d0d8bc074f32edc87b8ea247c6290
--- include/flate.h
+++ include/flate.h
@@ -22,7 +22,7 @@ enum
 	FlateInputFail		= -2,
 	FlateOutputFail		= -3,
 	FlateCorrupted		= -4,
-	FlateInternal		= -5,
+	FlateInternal		= -5
 };
 
 int	deflateinit(void);
blob - 23b9c5917794a964e39e0148d8de0f7af90d5abe
blob + 5d4b501214bf26fa09034865a99912c56879a8cf
--- include/html.h
+++ include/html.h
@@ -10,13 +10,13 @@ AUTOLIB(html)
  #pragma src "/sys/src/libhtml"
 */
 
-// UTILS
+/* UTILS */
 extern uchar*	fromStr(Rune* buf, int n, int chset);
 extern Rune*	toStr(uchar* buf, int n, int chset);
 
-// Common LEX and BUILD enums
+/* Common LEX and BUILD enums */
 
-// Media types
+/* Media types */
 enum
 {
 	ApplMsword,
@@ -58,14 +58,14 @@ enum
 	NMEDIATYPES
 };
 
-// HTTP methods
+/* HTTP methods */
 enum
 {
 	HGet,
 	HPost
 };
 
-// Charsets
+/* Charsets */
 enum
 {
 	UnknownCharset,
@@ -76,7 +76,7 @@ enum
 	NCHARSETS
 };
 
-// Frame Target IDs
+/* Frame Target IDs */
 enum {
 	FTtop,
 	FTself,
@@ -84,11 +84,11 @@ enum {
 	FTblank
 };
 
-// LEX
+/* LEX */
 typedef struct Token Token;
 typedef struct Attr Attr;
 
-// BUILD
+/* BUILD */
 
 typedef struct Item Item;
 typedef struct Itext Itext;
@@ -119,9 +119,9 @@ typedef struct Docinfo Docinfo;
 typedef struct Stack Stack;
 typedef struct Pstate Pstate;
 typedef struct ItemSource ItemSource;
-typedef struct Lay Lay;	// defined in Layout module
+typedef struct Lay Lay;	/* defined in Layout module */
 
-// Alignment types
+/* Alignment types */
 enum {
 	ALnone = 0, ALleft, ALcenter, ALright, ALjustify,
 	ALchar, ALtop, ALmiddle, ALbottom, ALbaseline
@@ -129,16 +129,16 @@ enum {
 
 struct Align
 {
-	uchar	halign;	// one of ALnone, ALleft, etc.
-	uchar	valign;	// one of ALnone, ALtop, etc.
+	uchar	halign;	/* one of ALnone, ALleft, etc. */
+	uchar	valign;	/* one of ALnone, ALtop, etc. */
 };
 
-// A Dimen holds a dimension specification, especially for those
-// cases when a number can be followed by a % or a * to indicate
-// percentage of total or relative weight.
-// Dnone means no dimension was specified
+/* A Dimen holds a dimension specification, especially for those */
+/* cases when a number can be followed by a % or a * to indicate */
+/* percentage of total or relative weight. */
+/* Dnone means no dimension was specified */
 
-// To fit in a word, use top bits to identify kind, rest for value
+/* To fit in a word, use top bits to identify kind, rest for value */
 enum {
 	Dnone =		0,
 	Dpixels =		(1<<29),
@@ -150,36 +150,36 @@ enum {
 
 struct Dimen
 {
-	int	kindspec;		// kind | spec
+	int	kindspec;		/* kind | spec */
 };
 
-// Background is either an image or a color.
-// If both are set, the image has precedence.
+/* Background is either an image or a color. */
+/* If both are set, the image has precedence. */
 struct Background
 {
-	Rune*	image;	// url
+	Rune*	image;	/* url */
 	int		color;
 };
 
 
-// There are about a half dozen Item variants.
-// The all look like this at the start (using Plan 9 C's
-// anonymous structure member mechanism),
-// and then the tag field dictates what extra fields there are.
+/* There are about a half dozen Item variants. */
+/* The all look like this at the start (using Plan 9 C's */
+/* anonymous structure member mechanism), */
+/* and then the tag field dictates what extra fields there are. */
 struct Item
 {
-	Item*	next;		// successor in list of items
-	int		width;	// width in pixels (0 for floating items)
-	int		height;	// height in pixels
+	Item*	next;		/* successor in list of items */
+	int		width;	/* width in pixels (0 for floating items) */
+	int		height;	/* height in pixels */
 	Rectangle	r;
-	int		ascent;	// ascent (from top to baseline) in pixels
-	int		anchorid;	// if nonzero, which anchor we're in
-	int		state;	// flags and values (see below)
-	Genattr*	genattr;	// generic attributes and events
-	int		tag;		// variant discriminator: Itexttag, etc.
+	int		ascent;	/* ascent (from top to baseline) in pixels */
+	int		anchorid;	/* if nonzero, which anchor we're in */
+	int		state;	/* flags and values (see below) */
+	Genattr*	genattr;	/* generic attributes and events */
+	int		tag;		/* variant discriminator: Itexttag, etc. */
 };
 
-// Item variant tags
+/* Item variant tags */
 enum {
 	Itexttag,
 	Iruletag,
@@ -192,45 +192,45 @@ enum {
 
 struct Itext
 {
-	Item item;				// (with tag ==Itexttag)
-	Rune*	s;			// the characters
-	int		fnt;			// style*NumSize+size (see font stuff, below)
-	int		fg;			// Pixel (color) for text
-	uchar	voff;			// Voffbias+vertical offset from baseline, in pixels (+ve == down)
-	uchar	ul;			// ULnone, ULunder, or ULmid
+	Item item;				/* (with tag ==Itexttag) */
+	Rune*	s;			/* the characters */
+	int		fnt;			/* style*NumSize+size (see font stuff, below) */
+	int		fg;			/* Pixel (color) for text */
+	uchar	voff;			/* Voffbias+vertical offset from baseline, in pixels (+ve == down) */
+	uchar	ul;			/* ULnone, ULunder, or ULmid */
 };
 
 struct Irule
 {
-	Item item;				// (with tag ==Iruletag)
-	uchar	align;		// alignment spec
-	uchar	noshade;		// if true, don't shade
-	int		size;			// size attr (rule height)
-	Dimen	wspec;		// width spec
+	Item item;				/* (with tag ==Iruletag) */
+	uchar	align;		/* alignment spec */
+	uchar	noshade;		/* if true, don't shade */
+	int		size;			/* size attr (rule height) */
+	Dimen	wspec;		/* width spec */
 };
 
 
 struct Iimage
 {
-	Item item;				// (with tag ==Iimagetag)
-	Rune*	imsrc;		// image src url
-	int		imwidth;		// spec width (actual, if no spec)
-	int		imheight;		// spec height (actual, if no spec)
-	Rune*	altrep;		// alternate representation, in absence of image
-	Map*	map;			// if non-nil, client side map
-	int		ctlid;			// if animated
-	uchar	align;		// vertical alignment
-	uchar	hspace;		// in pixels; buffer space on each side
-	uchar	vspace;		// in pixels; buffer space on top and bottom
-	uchar	border;		// in pixels: border width to draw around image
-	Iimage*	nextimage;	// next in list of document's images
+	Item item;				/* (with tag ==Iimagetag) */
+	Rune*	imsrc;		/* image src url */
+	int		imwidth;		/* spec width (actual, if no spec) */
+	int		imheight;		/* spec height (actual, if no spec) */
+	Rune*	altrep;		/* alternate representation, in absence of image */
+	Map*	map;			/* if non-nil, client side map */
+	int		ctlid;			/* if animated */
+	uchar	align;		/* vertical alignment */
+	uchar	hspace;		/* in pixels; buffer space on each side */
+	uchar	vspace;		/* in pixels; buffer space on top and bottom */
+	uchar	border;		/* in pixels: border width to draw around image */
+	Iimage*	nextimage;	/* next in list of document's images */
 	void *aux;
 };
 
 
 struct Iformfield
 {
-	Item item;				// (with tag ==Iformfieldtag)
+	Item item;				/* (with tag ==Iformfieldtag) */
 	Formfield*	formfield;
 	void *aux;
 };
@@ -238,59 +238,59 @@ struct Iformfield
 
 struct Itable
 {
-	Item item;				// (with tag ==Itabletag)
+	Item item;				/* (with tag ==Itabletag) */
 	Table*	table;
 };
 
 
 struct Ifloat
 {
-	Item _item;				// (with tag ==Ifloattag)
-	Item*	item;			// table or image item that floats
-	int		x;			// x coord of top (from right, if ALright)
-	int		y;			// y coord of top
-	uchar	side;			// margin it floats to: ALleft or ALright
-	uchar	infloats;		// true if this has been added to a lay.floats
-	Ifloat*	nextfloat;		// in list of floats
+	Item _item;				/* (with tag ==Ifloattag) */
+	Item*	item;			/* table or image item that floats */
+	int		x;			/* x coord of top (from right, if ALright) */
+	int		y;			/* y coord of top */
+	uchar	side;			/* margin it floats to: ALleft or ALright */
+	uchar	infloats;		/* true if this has been added to a lay.floats */
+	Ifloat*	nextfloat;		/* in list of floats */
 };
 
 
 struct Ispacer
 {
-	Item item;				// (with tag ==Ispacertag)
-	int		spkind;		// ISPnull, etc.
+	Item item;				/* (with tag ==Ispacertag) */
+	int		spkind;		/* ISPnull, etc. */
 };
 
-// Item state flags and value fields
+/* Item state flags and value fields */
 enum {
-//	IFbrk =			0x80000000,	// forced break before this item
+/*	IFbrk =			0x80000000,	// forced break before this item */
 #define	IFbrk		0x80000000 /* too big for sun */
-	IFbrksp =			0x40000000,	// add 1 line space to break (IFbrk set too)
-	IFnobrk =			0x20000000,	// break not allowed before this item
-	IFcleft =			0x10000000,	// clear left floats (IFbrk set too)
-	IFcright =			0x08000000,	// clear right floats (IFbrk set too)
-	IFwrap =			0x04000000,	// in a wrapping (non-pre) line
-	IFhang =			0x02000000,	// in a hanging (into left indent) item
-	IFrjust =			0x01000000,	// right justify current line
-	IFcjust =			0x00800000,	// center justify current line
-	IFsmap =			0x00400000,	// image is server-side map
+	IFbrksp =			0x40000000,	/* add 1 line space to break (IFbrk set too) */
+	IFnobrk =			0x20000000,	/* break not allowed before this item */
+	IFcleft =			0x10000000,	/* clear left floats (IFbrk set too) */
+	IFcright =			0x08000000,	/* clear right floats (IFbrk set too) */
+	IFwrap =			0x04000000,	/* in a wrapping (non-pre) line */
+	IFhang =			0x02000000,	/* in a hanging (into left indent) item */
+	IFrjust =			0x01000000,	/* right justify current line */
+	IFcjust =			0x00800000,	/* center justify current line */
+	IFsmap =			0x00400000,	/* image is server-side map */
 	IFindentshift =		8,
-	IFindentmask =		(255<<IFindentshift),	// current indent, in tab stops
-	IFhangmask =		255			// current hang into left indent, in 1/10th tabstops
+	IFindentmask =		(255<<IFindentshift),	/* current indent, in tab stops */
+	IFhangmask =		255			/* current hang into left indent, in 1/10th tabstops */
 };
 
-// Bias added to Itext's voff field
+/* Bias added to Itext's voff field */
 enum { Voffbias = 128 };
 
-// Spacer kinds
+/* Spacer kinds */
 enum {
-	ISPnull,			// 0 height and width
-	ISPvline,			// height and ascent of current font
-	ISPhspace,		// width of space in current font
-	ISPgeneral		// other purposes (e.g., between markers and list)
+	ISPnull,			/* 0 height and width */
+	ISPvline,			/* height and ascent of current font */
+	ISPhspace,		/* width of space in current font */
+	ISPgeneral		/* other purposes (e.g., between markers and list) */
 };
 
-// Generic attributes and events (not many elements will have any of these set)
+/* Generic attributes and events (not many elements will have any of these set) */
 struct Genattr
 {
 	Rune*	id;
@@ -302,8 +302,8 @@ struct Genattr
 
 struct SEvent
 {
-	SEvent*	next;		// in list of events
-	int		type;		// SEonblur, etc.
+	SEvent*	next;		/* in list of events */
+	int		type;		/* SEonblur, etc. */
 	Rune*	script;
 };
 
@@ -316,7 +316,7 @@ enum {
 	Numscriptev
 };
 
-// Form field types
+/* Form field types */
 enum {
 	Ftext,
 	Fpassword,
@@ -332,24 +332,24 @@ enum {
 	Ftextarea
 };
 
-// Information about a field in a form
+/* Information about a field in a form */
 struct Formfield
 {
-	Formfield*	next;		// in list of fields for a form
-	int			ftype;	// Ftext, Fpassword, etc.
-	int			fieldid;	// serial no. of field within its form
-	Form*		form;	// containing form
-	Rune*		name;	// name attr
-	Rune*		value;	// value attr
-	int			size;		// size attr
-	int			maxlength;	// maxlength attr
-	int			rows;	// rows attr
-	int			cols;		// cols attr
-	uchar		flags;	// FFchecked, etc.
-	Option*		options;	// for Fselect fields
-	Item*		image;	// image item, for Fimage fields
-	int			ctlid;		// identifies control for this field in layout
-	SEvent*		events;	// same as genattr->events of containing item
+	Formfield*	next;		/* in list of fields for a form */
+	int			ftype;	/* Ftext, Fpassword, etc. */
+	int			fieldid;	/* serial no. of field within its form */
+	Form*		form;	/* containing form */
+	Rune*		name;	/* name attr */
+	Rune*		value;	/* value attr */
+	int			size;		/* size attr */
+	int			maxlength;	/* maxlength attr */
+	int			rows;	/* rows attr */
+	int			cols;		/* cols attr */
+	uchar		flags;	/* FFchecked, etc. */
+	Option*		options;	/* for Fselect fields */
+	Item*		image;	/* image item, for Fimage fields */
+	int			ctlid;		/* identifies control for this field in layout */
+	SEvent*		events;	/* same as genattr->events of containing item */
 };
 
 enum {
@@ -357,29 +357,29 @@ enum {
 	FFmultiple =	(1<<6)
 };
 
-// Option holds info about an option in a "select" form field
+/* Option holds info about an option in a "select" form field */
 struct Option
 {
-	Option*	next;			// next in list of options for a field
-	int		selected;		// true if selected initially
-	Rune*	value;		// value attr
-	Rune*	display;		// display string
+	Option*	next;			/* next in list of options for a field */
+	int		selected;		/* true if selected initially */
+	Rune*	value;		/* value attr */
+	Rune*	display;		/* display string */
 };
 
-// Form holds info about a form
+/* Form holds info about a form */
 struct Form
 {
-	Form*		next;		// in list of forms for document
-	int			formid;	// serial no. of form within its doc
-	Rune*		name;	// name or id attr (netscape uses name, HTML 4.0 uses id)
-	Rune*		action;	// action attr
-	int			target;	// target attr as targetid
-	int			method;	// HGet or HPost
-	int			nfields;	// number of fields
-	Formfield*	fields;	// field's forms, in input order
+	Form*		next;		/* in list of forms for document */
+	int			formid;	/* serial no. of form within its doc */
+	Rune*		name;	/* name or id attr (netscape uses name, HTML 4.0 uses id) */
+	Rune*		action;	/* action attr */
+	int			target;	/* target attr as targetid */
+	int			method;	/* HGet or HPost */
+	int			nfields;	/* number of fields */
+	Formfield*	fields;	/* field's forms, in input order */
 };
 
-// Flags used in various table structures
+/* Flags used in various table structures */
 enum {
 	TFparsing =	(1<<7),
 	TFnowrap =	(1<<6),
@@ -387,33 +387,33 @@ enum {
 };
 
 
-// Information about a table
+/* Information about a table */
 struct Table
 {
-	Table*		next;			// next in list of document's tables
-	int			tableid;		// serial no. of table within its doc
-	Tablerow*	rows;		// array of row specs (list during parsing)
-	int			nrow;		// total number of rows
-	Tablecol*		cols;			// array of column specs
-	int			ncol;			// total number of columns
-	Tablecell*		cells;			// list of unique cells
-	int			ncell;		// total number of cells
-	Tablecell***	grid;			// 2-D array of cells
-	Align		align;		// alignment spec for whole table
-	Dimen		width;		// width spec for whole table
-	int			border;		// border attr
-	int			cellspacing;	// cellspacing attr
-	int			cellpadding;	// cellpadding attr
-	Background	background;	// table background
-	Item*		caption;		// linked list of Items, giving caption
-	uchar		caption_place;	// ALtop or ALbottom
-	Lay*			caption_lay;	// layout of caption
-	int			totw;			// total width
-	int			toth;			// total height
-	int			caph;		// caption height
-	int			availw;		// used for previous 3 sizes
-	Token*		tabletok;		// token that started the table
-	uchar		flags;		// Lchanged, perhaps
+	Table*		next;			/* next in list of document's tables */
+	int			tableid;		/* serial no. of table within its doc */
+	Tablerow*	rows;		/* array of row specs (list during parsing) */
+	int			nrow;		/* total number of rows */
+	Tablecol*		cols;			/* array of column specs */
+	int			ncol;			/* total number of columns */
+	Tablecell*		cells;			/* list of unique cells */
+	int			ncell;		/* total number of cells */
+	Tablecell***	grid;			/* 2-D array of cells */
+	Align		align;		/* alignment spec for whole table */
+	Dimen		width;		/* width spec for whole table */
+	int			border;		/* border attr */
+	int			cellspacing;	/* cellspacing attr */
+	int			cellpadding;	/* cellpadding attr */
+	Background	background;	/* table background */
+	Item*		caption;		/* linked list of Items, giving caption */
+	uchar		caption_place;	/* ALtop or ALbottom */
+	Lay*			caption_lay;	/* layout of caption */
+	int			totw;			/* total width */
+	int			toth;			/* total height */
+	int			caph;		/* caption height */
+	int			availw;		/* used for previous 3 sizes */
+	Token*		tabletok;		/* token that started the table */
+	uchar		flags;		/* Lchanged, perhaps */
 };
 
 
@@ -427,101 +427,101 @@ struct Tablecol
 
 struct Tablerow
 {
-	Tablerow*	next;			// Next in list of rows, during parsing
-	Tablecell*		cells;			// Cells in row, linked through nextinrow
+	Tablerow*	next;			/* Next in list of rows, during parsing */
+	Tablecell*		cells;			/* Cells in row, linked through nextinrow */
 	int			height;
 	int			ascent;
 	Align		align;
 	Background	background;
 	Point			pos;
-	uchar		flags;		// 0 or TFparsing
+	uchar		flags;		/* 0 or TFparsing */
 };
 
 
-// A Tablecell is one cell of a table.
-// It may span multiple rows and multiple columns.
-// Cells are linked on two lists: the list for all the cells of
-// a document (the next pointers), and the list of all the
-// cells that start in a given row (the nextinrow pointers)
+/* A Tablecell is one cell of a table. */
+/* It may span multiple rows and multiple columns. */
+/* Cells are linked on two lists: the list for all the cells of */
+/* a document (the next pointers), and the list of all the */
+/* cells that start in a given row (the nextinrow pointers) */
 struct Tablecell
 {
-	Tablecell*		next;			// next in list of table's cells
-	Tablecell*		nextinrow;	// next in list of row's cells
-	int			cellid;		// serial no. of cell within table
-	Item*		content;		// contents before layout
-	Lay*			lay;			// layout of cell
-	int			rowspan;		// number of rows spanned by this cell
-	int			colspan;		// number of cols spanned by this cell
-	Align		align;		// alignment spec
-	uchar		flags;		// TFparsing, TFnowrap, TFisth
-	Dimen		wspec;		// suggested width
-	int			hspec;		// suggested height
-	Background	background;	// cell background
-	int			minw;		// minimum possible width
-	int			maxw;		// maximum width
-	int			ascent;		// cell's ascent
-	int			row;			// row of upper left corner
-	int			col;			// col of upper left corner
-	Point			pos;			// nw corner of cell contents, in cell
+	Tablecell*		next;			/* next in list of table's cells */
+	Tablecell*		nextinrow;	/* next in list of row's cells */
+	int			cellid;		/* serial no. of cell within table */
+	Item*		content;		/* contents before layout */
+	Lay*			lay;			/* layout of cell */
+	int			rowspan;		/* number of rows spanned by this cell */
+	int			colspan;		/* number of cols spanned by this cell */
+	Align		align;		/* alignment spec */
+	uchar		flags;		/* TFparsing, TFnowrap, TFisth */
+	Dimen		wspec;		/* suggested width */
+	int			hspec;		/* suggested height */
+	Background	background;	/* cell background */
+	int			minw;		/* minimum possible width */
+	int			maxw;		/* maximum width */
+	int			ascent;		/* cell's ascent */
+	int			row;			/* row of upper left corner */
+	int			col;			/* col of upper left corner */
+	Point			pos;			/* nw corner of cell contents, in cell */
 };
 
-// Anchor is for info about hyperlinks that go somewhere
+/* Anchor is for info about hyperlinks that go somewhere */
 struct Anchor
 {
-	Anchor*		next;		// next in list of document's anchors
-	int			index;	// serial no. of anchor within its doc
-	Rune*		name;	// name attr
-	Rune*		href;		// href attr
-	int			target;	// target attr as targetid
+	Anchor*		next;		/* next in list of document's anchors */
+	int			index;	/* serial no. of anchor within its doc */
+	Rune*		name;	/* name attr */
+	Rune*		href;		/* href attr */
+	int			target;	/* target attr as targetid */
 };
 
 
-// DestAnchor is for info about hyperlinks that are destinations
+/* DestAnchor is for info about hyperlinks that are destinations */
 struct DestAnchor
 {
-	DestAnchor*	next;		// next in list of document's destanchors
-	int			index;	// serial no. of anchor within its doc
-	Rune*		name;	// name attr
-	Item*		item;		// the destination
+	DestAnchor*	next;		/* next in list of document's destanchors */
+	int			index;	/* serial no. of anchor within its doc */
+	Rune*		name;	/* name attr */
+	Item*		item;		/* the destination */
 };
 
 
-// Maps (client side)
+/* Maps (client side) */
 struct Map
 {
-	Map*	next;			// next in list of document's maps
-	Rune*	name;		// map name
-	Area*	areas;		// list of map areas
+	Map*	next;			/* next in list of document's maps */
+	Rune*	name;		/* map name */
+	Area*	areas;		/* list of map areas */
 };
 
 
 struct Area
 {
-	Area*		next;		// next in list of a map's areas
-	int			shape;	// SHrect, etc.
-	Rune*		href;		// associated hypertext link
-	int			target;	// associated target frame
-	Dimen*		coords;	// array of coords for shape
-	int			ncoords;	// size of coords array
+	Area*		next;		/* next in list of a map's areas */
+	int			shape;	/* SHrect, etc. */
+	Rune*		href;		/* associated hypertext link */
+	int			target;	/* associated target frame */
+	Dimen*		coords;	/* array of coords for shape */
+	int			ncoords;	/* size of coords array */
 };
 
-// Area shapes
+/* Area shapes */
 enum {
 	SHrect, SHcircle, SHpoly
 };
 
-// Fonts are represented by integers: style*NumSize + size
+/* Fonts are represented by integers: style*NumSize + size */
 
-// Font styles
+/* Font styles */
 enum {
-	FntR,			// roman
-	FntI,			// italic
-	FntB,			// bold
-	FntT,			// typewriter
+	FntR,			/* roman */
+	FntI,			/* italic */
+	FntB,			/* bold */
+	FntT,			/* typewriter */
 	NumStyle
 };
 
-// Font sizes
+/* Font sizes */
 enum {
 	Tiny,
 	Small,
@@ -536,12 +536,12 @@ enum {
 	DefFnt = (FntR*NumSize+Normal)
 };
 
-// Lines are needed through some text items, for underlining or strikethrough
+/* Lines are needed through some text items, for underlining or strikethrough */
 enum {
 	ULnone, ULunder, ULmid
 };
 
-// Kidinfo flags
+/* Kidinfo flags */
 enum {
 	FRnoresize =	(1<<0),
 	FRnoscroll =	(1<<1),
@@ -551,59 +551,59 @@ enum {
 	FRvscrollauto =	(1<<5)
 };
 
-// Information about child frame or frameset
+/* Information about child frame or frameset */
 struct Kidinfo
 {
-	Kidinfo*		next;		// in list of kidinfos for a frameset
+	Kidinfo*		next;		/* in list of kidinfos for a frameset */
 	int			isframeset;
 
-	// fields for "frame"
-	Rune*		src;		// only nil if a "dummy" frame or this is frameset
-	Rune*		name;	// always non-empty if this isn't frameset
+	/* fields for "frame" */
+	Rune*		src;		/* only nil if a "dummy" frame or this is frameset */
+	Rune*		name;	/* always non-empty if this isn't frameset */
 	int			marginw;
 	int			marginh;
 	int			framebd;
 	int			flags;
 
-	// fields for "frameset"
-	Dimen*		rows;	// array of row dimensions
-	int			nrows;	// length of rows
-	Dimen*		cols;		// array of col dimensions
-	int			ncols;	// length of cols
+	/* fields for "frameset" */
+	Dimen*		rows;	/* array of row dimensions */
+	int			nrows;	/* length of rows */
+	Dimen*		cols;		/* array of col dimensions */
+	int			ncols;	/* length of cols */
 	Kidinfo*		kidinfos;
-	Kidinfo*		nextframeset;	// parsing stack
+	Kidinfo*		nextframeset;	/* parsing stack */
 };
 
 
-// Document info (global information about HTML page)
+/* Document info (global information about HTML page) */
 struct Docinfo
 {
-	// stuff from HTTP headers, doc head, and body tag
-	Rune*		src;				// original source of doc
-	Rune*		base;			// base URL of doc
-	Rune*		doctitle;			// from <title> element
-	Background	background;		// background specification
-	Iimage*		backgrounditem;	// Image Item for doc background image, or nil
-	int			text;				// doc foreground (text) color
-	int			link;				// unvisited hyperlink color
-	int			vlink;			// visited hyperlink color
-	int			alink;			// highlighting hyperlink color
-	int			target;			// target frame default
-	int			chset;			// ISO_8859, etc.
-	int			mediatype;		// TextHtml, etc.
-	int			scripttype;		// TextJavascript, etc.
-	int			hasscripts;		// true if scripts used
-	Rune*		refresh;			// content of <http-equiv=Refresh ...>
-	Kidinfo*		kidinfo;			// if a frameset
-	int			frameid;			// id of document frame
+	/* stuff from HTTP headers, doc head, and body tag */
+	Rune*		src;				/* original source of doc */
+	Rune*		base;			/* base URL of doc */
+	Rune*		doctitle;			/* from <title> element */
+	Background	background;		/* background specification */
+	Iimage*		backgrounditem;	/* Image Item for doc background image, or nil */
+	int			text;				/* doc foreground (text) color */
+	int			link;				/* unvisited hyperlink color */
+	int			vlink;			/* visited hyperlink color */
+	int			alink;			/* highlighting hyperlink color */
+	int			target;			/* target frame default */
+	int			chset;			/* ISO_8859, etc. */
+	int			mediatype;		/* TextHtml, etc. */
+	int			scripttype;		/* TextJavascript, etc. */
+	int			hasscripts;		/* true if scripts used */
+	Rune*		refresh;			/* content of <http-equiv=Refresh ...> */
+	Kidinfo*		kidinfo;			/* if a frameset */
+	int			frameid;			/* id of document frame */
 
-	// info needed to respond to user actions
-	Anchor*		anchors;			// list of href anchors
-	DestAnchor*	dests;			// list of destination anchors
-	Form*		forms;			// list of forms
-	Table*		tables;			// list of tables
-	Map*		maps;			// list of maps
-	Iimage*		images;			// list of image items (through nextimage links)
+	/* info needed to respond to user actions */
+	Anchor*		anchors;			/* list of href anchors */
+	DestAnchor*	dests;			/* list of destination anchors */
+	Form*		forms;			/* list of forms */
+	Table*		tables;			/* list of tables */
+	Map*		maps;			/* list of maps */
+	Iimage*		images;			/* list of image items (through nextimage links) */
 };
 
 extern int			dimenkind(Dimen d);
@@ -618,14 +618,14 @@ extern int			validitems(Item* i);
 
 /* #pragma varargck	type "I"	Item* */
 
-// Control print output
+/* Control print output */
 extern int			warn;
 extern int			dbglex;
 extern int			dbgbuild;
 
-// To be provided by caller
-// emalloc and erealloc should not return if can't get memory.
-// emalloc should zero its memory.
+/* To be provided by caller */
+/* emalloc and erealloc should not return if can't get memory. */
+/* emalloc should zero its memory. */
 extern void*	emalloc(ulong);
 extern void*	erealloc(void* p, ulong size);
 #ifdef __cpluspplus
blob - e968d5e251f274b72b16076696b0fc157cf67ab8
blob + 8ffe51e825302782af4c0b69a288b04ddadcf996
--- include/httpd.h
+++ include/httpd.h
@@ -48,7 +48,7 @@ enum
 	HExpectFail,
 	HUnkVers,
 	HBadCont,
-	HOK,
+	HOK
 };
 
 /*
blob - 7a4df5f1406f0b2314d7262fde1caf5ce8aeebc4
blob + 658c01f91a5e694728ee8e291b0102907145d908
--- include/ip.h
+++ include/ip.h
@@ -18,7 +18,7 @@ enum 
 	IPaddrlen=	16,
 	IPv4addrlen=	4,
 	IPv4off=	12,
-	IPllen=		4,
+	IPllen=		4
 };
 
 /*
@@ -80,7 +80,7 @@ struct Ipifc
  */
 enum 
 {
-	Udphdrsize=	52,	/* size of a Udphdr */
+	Udphdrsize=	52	/* size of a Udphdr */
 };
 
 typedef struct Udphdr Udphdr;
blob - 588600a7736e1fce001aab37ab7f7dcb7a7185e8
blob + 3d681a6577cc488212f8c87596be9ab3817534b3
--- include/keyboard.h
+++ include/keyboard.h
@@ -37,7 +37,7 @@ enum {
 
 	Kalt=		KF|0x15,
 	Kshift=	KF|0x16,
-	Kctl=		KF|0x17,
+	Kctl=		KF|0x17
 };
 
 #if defined(__cplusplus)
blob - 980a8d27c152da1ff5012dc156004ee7dd8e6802
blob + 13d1c9472ac2b4205a71bc2f5c48cacf1d35b5a6
--- include/libc.h
+++ include/libc.h
@@ -349,7 +349,7 @@ extern	vlong	p9nsec(void);
 enum
 {
 	PNPROC		= 1,
-	PNGROUP		= 2,
+	PNGROUP		= 2
 };
 
 /* extern	int	abs(int); <stdlib.h> */
@@ -671,7 +671,7 @@ enum
 	RFNOWAIT	= (1<<6),
 	RFCNAMEG	= (1<<10), 
 	RFCENVG		= (1<<11), 
-	RFCFDG		= (1<<12),
+	RFCFDG		= (1<<12)
 /*	RFREND		= (1<<13), */
 /*	RFNOMNT		= (1<<14) */
 };
blob - c0c964fc46825b108107606bb9afc8d604aa6554
blob + 73d22c75dfb7fdf8156339c300d8315462aa2f71
--- include/libsec.h
+++ include/libsec.h
@@ -14,9 +14,9 @@ AUTOLIB(sec)
 typedef struct mpint mpint;
 #endif
 
-/////////////////////////////////////////////////////////
-// AES definitions
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* AES definitions */
+/*******************************************************/
 
 enum
 {
@@ -41,9 +41,9 @@ void	setupAESstate(AESstate *s, uchar key[], int keyby
 void	aesCBCencrypt(uchar *p, int len, AESstate *s);
 void	aesCBCdecrypt(uchar *p, int len, AESstate *s);
 
-/////////////////////////////////////////////////////////
-// Blowfish Definitions
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* Blowfish Definitions */
+/*******************************************************/
 
 enum
 {
@@ -51,7 +51,7 @@ enum
 	BFrounds	= 16
 };
 
-// 16-round Blowfish
+/* 16-round Blowfish */
 typedef struct BFstate BFstate;
 struct BFstate
 {
@@ -70,16 +70,16 @@ void	bfCBCdecrypt(uchar*, int, BFstate*);
 void	bfECBencrypt(uchar*, int, BFstate*);
 void	bfECBdecrypt(uchar*, int, BFstate*);
 
-/////////////////////////////////////////////////////////
-// DES definitions
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* DES definitions */
+/*******************************************************/
 
 enum
 {
 	DESbsize=	8
 };
 
-// single des
+/* single des */
 typedef struct DESstate DESstate;
 struct DESstate
 {
@@ -97,12 +97,12 @@ void	desCBCdecrypt(uchar*, int, DESstate*);
 void	desECBencrypt(uchar*, int, DESstate*);
 void	desECBdecrypt(uchar*, int, DESstate*);
 
-// for backward compatibility with 7 byte DES key format
+/* for backward compatibility with 7 byte DES key format */
 void	des56to64(uchar *k56, uchar *k64);
 void	des64to56(uchar *k64, uchar *k56);
 void	key_setup(uchar[7], ulong[32]);
 
-// triple des encrypt/decrypt orderings
+/* triple des encrypt/decrypt orderings */
 enum {
 	DES3E=		0,
 	DES3D=		1,
@@ -128,9 +128,9 @@ void	des3CBCdecrypt(uchar*, int, DES3state*);
 void	des3ECBencrypt(uchar*, int, DES3state*);
 void	des3ECBdecrypt(uchar*, int, DES3state*);
 
-/////////////////////////////////////////////////////////
-// digests
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* digests */
+/*******************************************************/
 
 enum
 {
@@ -162,27 +162,27 @@ DigestState* hmac_sha1(uchar*, ulong, uchar*, ulong, u
 char* sha1pickle(SHA1state*);
 SHA1state* sha1unpickle(char*);
 
-/////////////////////////////////////////////////////////
-// random number generation
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* random number generation */
+/*******************************************************/
 void	genrandom(uchar *buf, int nbytes);
 void	prng(uchar *buf, int nbytes);
 ulong	fastrand(void);
 ulong	nfastrand(ulong);
 
-/////////////////////////////////////////////////////////
-// primes
-/////////////////////////////////////////////////////////
-void	genprime(mpint *p, int n, int accuracy); // generate an n bit probable prime
-void	gensafeprime(mpint *p, mpint *alpha, int n, int accuracy);	// prime and generator
-void	genstrongprime(mpint *p, int n, int accuracy);	// generate an n bit strong prime
+/*******************************************************/
+/* primes */
+/*******************************************************/
+void	genprime(mpint *p, int n, int accuracy); /* generate an n bit probable prime */
+void	gensafeprime(mpint *p, mpint *alpha, int n, int accuracy);	/* prime and generator */
+void	genstrongprime(mpint *p, int n, int accuracy);	/* generate an n bit strong prime */
 void	DSAprimes(mpint *q, mpint *p, uchar seed[SHA1dlen]);
-int	probably_prime(mpint *n, int nrep);	// miller-rabin test
-int	smallprimetest(mpint *p);		// returns -1 if not prime, 0 otherwise
+int	probably_prime(mpint *n, int nrep);	/* miller-rabin test */
+int	smallprimetest(mpint *p);		/* returns -1 if not prime, 0 otherwise */
 
-/////////////////////////////////////////////////////////
-// rc4
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* rc4 */
+/*******************************************************/
 typedef struct RC4state RC4state;
 struct RC4state
 {
@@ -196,33 +196,33 @@ void	rc4(RC4state*, uchar*, int);
 void	rc4skip(RC4state*, int);
 void	rc4back(RC4state*, int);
 
-/////////////////////////////////////////////////////////
-// rsa
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* rsa */
+/*******************************************************/
 typedef struct RSApub RSApub;
 typedef struct RSApriv RSApriv;
 typedef struct PEMChain PEMChain;
 
-// public/encryption key
+/* public/encryption key */
 struct RSApub
 {
-	mpint	*n;	// modulus
-	mpint	*ek;	// exp (encryption key)
+	mpint	*n;	/* modulus */
+	mpint	*ek;	/* exp (encryption key) */
 };
 
-// private/decryption key
+/* private/decryption key */
 struct RSApriv
 {
 	RSApub	pub;
 
-	mpint	*dk;	// exp (decryption key)
+	mpint	*dk;	/* exp (decryption key) */
 
-	// precomputed values to help with chinese remainder theorem calc
+	/* precomputed values to help with chinese remainder theorem calc */
 	mpint	*p;
 	mpint	*q;
-	mpint	*kp;	// dk mod p-1
-	mpint	*kq;	// dk mod q-1
-	mpint	*c2;	// (inv p) mod q
+	mpint	*kp;	/* dk mod p-1 */
+	mpint	*kq;	/* dk mod q-1 */
+	mpint	*c2;	/* (inv p) mod q */
 };
 
 struct PEMChain
@@ -248,29 +248,29 @@ uchar*		X509gen(RSApriv *priv, char *subj, ulong valid
 RSApriv*	rsafill(mpint *n, mpint *ek, mpint *dk, mpint *p, mpint *q);
 uchar*	X509req(RSApriv *priv, char *subj, int *certlen);
 
-/////////////////////////////////////////////////////////
-// elgamal
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* elgamal */
+/*******************************************************/
 typedef struct EGpub EGpub;
 typedef struct EGpriv EGpriv;
 typedef struct EGsig EGsig;
 
-// public/encryption key
+/* public/encryption key */
 struct EGpub
 {
-	mpint	*p;	// modulus
-	mpint	*alpha;	// generator
-	mpint	*key;	// (encryption key) alpha**secret mod p
+	mpint	*p;	/* modulus */
+	mpint	*alpha;	/* generator */
+	mpint	*key;	/* (encryption key) alpha**secret mod p */
 };
 
-// private/decryption key
+/* private/decryption key */
 struct EGpriv
 {
 	EGpub	pub;
-	mpint	*secret; // (decryption key)
+	mpint	*secret; /* (decryption key) */
 };
 
-// signature
+/* signature */
 struct EGsig
 {
 	mpint	*r, *s;
@@ -289,30 +289,30 @@ EGsig*		egsigalloc(void);
 void		egsigfree(EGsig*);
 EGpub*		egprivtopub(EGpriv*);
 
-/////////////////////////////////////////////////////////
-// dsa
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* dsa */
+/*******************************************************/
 typedef struct DSApub DSApub;
 typedef struct DSApriv DSApriv;
 typedef struct DSAsig DSAsig;
 
-// public/encryption key
+/* public/encryption key */
 struct DSApub
 {
-	mpint	*p;	// modulus
-	mpint	*q;	// group order, q divides p-1
-	mpint	*alpha;	// group generator
-	mpint	*key;	// (encryption key) alpha**secret mod p
+	mpint	*p;	/* modulus */
+	mpint	*q;	/* group order, q divides p-1 */
+	mpint	*alpha;	/* group generator */
+	mpint	*key;	/* (encryption key) alpha**secret mod p */
 };
 
-// private/decryption key
+/* private/decryption key */
 struct DSApriv
 {
 	DSApub	pub;
-	mpint	*secret; // (decryption key)
+	mpint	*secret; /* (decryption key) */
 };
 
-// signature
+/* signature */
 struct DSAsig
 {
 	mpint	*r, *s;
@@ -330,33 +330,33 @@ void		dsasigfree(DSAsig*);
 DSApub*		dsaprivtopub(DSApriv*);
 DSApriv*	asn1toDSApriv(uchar*, int);
 
-/////////////////////////////////////////////////////////
-// TLS
-/////////////////////////////////////////////////////////
+/*******************************************************/
+/* TLS */
+/*******************************************************/
 typedef struct Thumbprint{
 	struct Thumbprint *next;
 	uchar sha1[SHA1dlen];
 } Thumbprint;
 
 typedef struct TLSconn{
-	char dir[40];  // connection directory
-	uchar *cert;   // certificate (local on input, remote on output)
+	char dir[40];  /* connection directory */
+	uchar *cert;   /* certificate (local on input, remote on output) */
 	uchar *sessionID;
 	int certlen, sessionIDlen;
 	int (*trace)(char*fmt, ...);
 	PEMChain *chain;
 } TLSconn;
 
-// tlshand.c
+/* tlshand.c */
 extern int tlsClient(int fd, TLSconn *c);
 extern int tlsServer(int fd, TLSconn *c);
 
-// thumb.c
+/* thumb.c */
 extern Thumbprint* initThumbprints(char *ok, char *crl);
 extern void freeThumbprints(Thumbprint *ok);
 extern int okThumbprint(uchar *sha1, Thumbprint *ok);
 
-// readcert.c
+/* readcert.c */
 extern uchar *readcert(char *filename, int *pcertlen);
 PEMChain *readcertchain(char *filename);
 
blob - e664fe74a5c6f29d9c472072414ff59325770198
blob + 978a88df86692f37f9f0f0088a1ddf1b5daef41a
--- include/mach.h
+++ include/mach.h
@@ -154,7 +154,7 @@ enum
 	LREG,		/* register */
 	LADDR,		/* absolute address */
 	LCONST,		/* constant (an anonymous readonly location) */
-	LOFFSET,		/* dereference offset + register ptr */
+	LOFFSET		/* dereference offset + register ptr */
 };
 
 struct Loc
@@ -357,7 +357,7 @@ enum
 
 	RINT = 0<<0,
 	RFLT = 1<<0,
-	RRDONLY = 1<<1,
+	RRDONLY = 1<<1
 };
 
 struct Regdesc
@@ -456,7 +456,7 @@ enum
 	CPARAM,		/* function parameter */
 	CTEXT,		/* text segment */
 	CDATA,		/* data segment */
-	CANY,
+	CANY
 };
 
 struct Symbol
blob - a1981ecaa41201bf9ca78b028d6107dbd6a3f4d5
blob + 057a0a8a25aaad6b458b86342c4c890264eaa24a
--- include/memdraw.h
+++ include/memdraw.h
@@ -33,7 +33,7 @@ enum {
 	Fgrey	= 1<<2,	/* is grey */
 	Falpha	= 1<<3,	/* has explicit alpha */
 	Fcmap	= 1<<4,	/* has cmap channel */
-	Fbytes	= 1<<5,	/* has only 8-bit channels */
+	Fbytes	= 1<<5	/* has only 8-bit channels */
 };
 
 struct Memimage
@@ -94,8 +94,8 @@ enum {
 	Simplemask=1<<1,
 	Replsrc=1<<2,
 	Replmask=1<<3,
-	Fullsrc = 1<<4,
-	Fullmask=1<<5,
+	Fullsrc=1<<4,
+	Fullmask=1<<5
 };
 struct	Memdrawparam
 {
blob - 153fd03b6ed26dee505b8b3fb012e726c115d8dd
blob + b8ad0d1684f84fac7652b3087aa30b07c7f6f0ed
--- include/mp.h
+++ include/mp.h
@@ -15,17 +15,17 @@ AUTOLIB(mp)
 
 typedef ulong mpdigit;
 
-// the code assumes mpdigit to be at least an int
-// mpdigit must be an atomic type.  mpdigit is defined
-// in the architecture specific u.h
+/* the code assumes mpdigit to be at least an int */
+/* mpdigit must be an atomic type.  mpdigit is defined */
+/* in the architecture specific u.h */
 
 typedef struct mpint mpint;
 
 struct mpint
 {
-	int	sign;	// +1 or -1
-	int	size;	// allocated digits
-	int	top;	// significant digits
+	int	sign;	/* +1 or -1 */
+	int	size;	/* allocated digits */
+	int	top;	/* significant digits */
 	mpdigit	*p;
 	char	flags;
 };
@@ -33,117 +33,117 @@ struct mpint
 enum
 {
 	MPstatic=	0x01,
-	Dbytes=		sizeof(mpdigit),	// bytes per digit
-	Dbits=		Dbytes*8		// bits per digit
+	Dbytes=		sizeof(mpdigit),	/* bytes per digit */
+	Dbits=		Dbytes*8		/* bits per digit */
 };
 
-// allocation
-void	mpsetminbits(int n);	// newly created mpint's get at least n bits
-mpint*	mpnew(int n);		// create a new mpint with at least n bits
+/* allocation */
+void	mpsetminbits(int n);	/* newly created mpint's get at least n bits */
+mpint*	mpnew(int n);		/* create a new mpint with at least n bits */
 void	mpfree(mpint *b);
-void	mpbits(mpint *b, int n);	// ensure that b has at least n bits
-void	mpnorm(mpint *b);		// dump leading zeros
+void	mpbits(mpint *b, int n);	/* ensure that b has at least n bits */
+void	mpnorm(mpint *b);		/* dump leading zeros */
 mpint*	mpcopy(mpint *b);
 void	mpassign(mpint *old, mpint *new);
 
-// random bits
+/* random bits */
 mpint*	mprand(int bits, void (*gen)(uchar*, int), mpint *b);
 
-// conversion
-mpint*	strtomp(char*, char**, int, mpint*);	// ascii
+/* conversion */
+mpint*	strtomp(char*, char**, int, mpint*);	/* ascii */
 int	mpfmt(Fmt*);
 char*	mptoa(mpint*, int, char*, int);
-mpint*	letomp(uchar*, uint, mpint*);	// byte array, little-endian
+mpint*	letomp(uchar*, uint, mpint*);	/* byte array, little-endian */
 int	mptole(mpint*, uchar*, uint, uchar**);
-mpint*	betomp(uchar*, uint, mpint*);	// byte array, little-endian
+mpint*	betomp(uchar*, uint, mpint*);	/* byte array, little-endian */
 int	mptobe(mpint*, uchar*, uint, uchar**);
-uint	mptoui(mpint*);			// unsigned int
+uint	mptoui(mpint*);			/* unsigned int */
 mpint*	uitomp(uint, mpint*);
-int	mptoi(mpint*);			// int
+int	mptoi(mpint*);			/* int */
 mpint*	itomp(int, mpint*);
-uvlong	mptouv(mpint*);			// unsigned vlong
+uvlong	mptouv(mpint*);			/* unsigned vlong */
 mpint*	uvtomp(uvlong, mpint*);
-vlong	mptov(mpint*);			// vlong
+vlong	mptov(mpint*);			/* vlong */
 mpint*	vtomp(vlong, mpint*);
 
-// divide 2 digits by one
+/* divide 2 digits by one */
 void	mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient);
 
-// in the following, the result mpint may be
-// the same as one of the inputs.
-void	mpadd(mpint *b1, mpint *b2, mpint *sum);	// sum = b1+b2
-void	mpsub(mpint *b1, mpint *b2, mpint *diff);	// diff = b1-b2
-void	mpleft(mpint *b, int shift, mpint *res);	// res = b<<shift
-void	mpright(mpint *b, int shift, mpint *res);	// res = b>>shift
-void	mpmul(mpint *b1, mpint *b2, mpint *prod);	// prod = b1*b2
-void	mpexp(mpint *b, mpint *e, mpint *m, mpint *res);	// res = b**e mod m
-void	mpmod(mpint *b, mpint *m, mpint *remainder);	// remainder = b mod m
+/* in the following, the result mpint may be */
+/* the same as one of the inputs. */
+void	mpadd(mpint *b1, mpint *b2, mpint *sum);	/* sum = b1+b2 */
+void	mpsub(mpint *b1, mpint *b2, mpint *diff);	/* diff = b1-b2 */
+void	mpleft(mpint *b, int shift, mpint *res);	/* res = b<<shift */
+void	mpright(mpint *b, int shift, mpint *res);	/* res = b>>shift */
+void	mpmul(mpint *b1, mpint *b2, mpint *prod);	/* prod = b1*b2 */
+void	mpexp(mpint *b, mpint *e, mpint *m, mpint *res);	/* res = b**e mod m */
+void	mpmod(mpint *b, mpint *m, mpint *remainder);	/* remainder = b mod m */
 
-// quotient = dividend/divisor, remainder = dividend % divisor
+/* quotient = dividend/divisor, remainder = dividend % divisor */
 void	mpdiv(mpint *dividend, mpint *divisor,  mpint *quotient, mpint *remainder);
 
-// return neg, 0, pos as b1-b2 is neg, 0, pos
+/* return neg, 0, pos as b1-b2 is neg, 0, pos */
 int	mpcmp(mpint *b1, mpint *b2);
 
-// extended gcd return d, x, and y, s.t. d = gcd(a,b) and ax+by = d
+/* extended gcd return d, x, and y, s.t. d = gcd(a,b) and ax+by = d */
 void	mpextendedgcd(mpint *a, mpint *b, mpint *d, mpint *x, mpint *y);
 
-// res = b**-1 mod m
+/* res = b**-1 mod m */
 void	mpinvert(mpint *b, mpint *m, mpint *res);
 
-// bit counting
-int	mpsignif(mpint*);	// number of sigificant bits in mantissa
-int	mplowbits0(mpint*);	// k, where n = 2**k * q for odd q
+/* bit counting */
+int	mpsignif(mpint*);	/* number of sigificant bits in mantissa */
+int	mplowbits0(mpint*);	/* k, where n = 2**k * q for odd q */
 
-// well known constants
+/* well known constants */
 extern mpint	*mpzero, *mpone, *mptwo;
 
-// sum[0:alen] = a[0:alen-1] + b[0:blen-1]
-// prereq: alen >= blen, sum has room for alen+1 digits
+/* sum[0:alen] = a[0:alen-1] + b[0:blen-1] */
+/* prereq: alen >= blen, sum has room for alen+1 digits */
 void	mpvecadd(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *sum);
 
-// diff[0:alen-1] = a[0:alen-1] - b[0:blen-1]
-// prereq: alen >= blen, diff has room for alen digits
+/* diff[0:alen-1] = a[0:alen-1] - b[0:blen-1] */
+/* prereq: alen >= blen, diff has room for alen digits */
 void	mpvecsub(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *diff);
 
-// p[0:n] += m * b[0:n-1]
-// prereq: p has room for n+1 digits
+/* p[0:n] += m * b[0:n-1] */
+/* prereq: p has room for n+1 digits */
 void	mpvecdigmuladd(mpdigit *b, int n, mpdigit m, mpdigit *p);
 
-// p[0:n] -= m * b[0:n-1]
-// prereq: p has room for n+1 digits
+/* p[0:n] -= m * b[0:n-1] */
+/* prereq: p has room for n+1 digits */
 int	mpvecdigmulsub(mpdigit *b, int n, mpdigit m, mpdigit *p);
 
-// p[0:alen*blen-1] = a[0:alen-1] * b[0:blen-1]
-// prereq: alen >= blen, p has room for m*n digits
+/* p[0:alen*blen-1] = a[0:alen-1] * b[0:blen-1] */
+/* prereq: alen >= blen, p has room for m*n digits */
 void	mpvecmul(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *p);
 
-// sign of a - b or zero if the same
+/* sign of a - b or zero if the same */
 int	mpveccmp(mpdigit *a, int alen, mpdigit *b, int blen);
 
-// divide the 2 digit dividend by the one digit divisor and stick in quotient
-// we assume that the result is one digit - overflow is all 1's
+/* divide the 2 digit dividend by the one digit divisor and stick in quotient */
+/* we assume that the result is one digit - overflow is all 1's */
 void	mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient);
 
-// playing with magnitudes
+/* playing with magnitudes */
 int	mpmagcmp(mpint *b1, mpint *b2);
-void	mpmagadd(mpint *b1, mpint *b2, mpint *sum);	// sum = b1+b2
-void	mpmagsub(mpint *b1, mpint *b2, mpint *sum);	// sum = b1+b2
+void	mpmagadd(mpint *b1, mpint *b2, mpint *sum);	/* sum = b1+b2 */
+void	mpmagsub(mpint *b1, mpint *b2, mpint *sum);	/* sum = b1+b2 */
 
-// chinese remainder theorem
-typedef struct CRTpre	CRTpre;		// precomputed values for converting
-					//  twixt residues and mpint
-typedef struct CRTres	CRTres;		// residue form of an mpint
+/* chinese remainder theorem */
+typedef struct CRTpre	CRTpre;		/* precomputed values for converting */
+					/*  twixt residues and mpint */
+typedef struct CRTres	CRTres;		/* residue form of an mpint */
 
 struct CRTres
 {
-	int	n;		// number of residues
-	mpint	*r[1];		// residues
+	int	n;		/* number of residues */
+	mpint	*r[1];		/* residues */
 };
 
-CRTpre*	crtpre(int, mpint**);			// precompute conversion values
-CRTres*	crtin(CRTpre*, mpint*);			// convert mpint to residues
-void	crtout(CRTpre*, CRTres*, mpint*);	// convert residues to mpint
+CRTpre*	crtpre(int, mpint**);			/* precompute conversion values */
+CRTres*	crtin(CRTpre*, mpint*);			/* convert mpint to residues */
+void	crtout(CRTpre*, CRTres*, mpint*);	/* convert residues to mpint */
 void	crtprefree(CRTpre*);
 void	crtresfree(CRTres*);
 
blob - deb4968bc1679b52abdaacf81218f6e53af1c286
blob + ba4baf01c26ff25519aa51e3e5a4b5ad8c8e6f59
--- include/ndb.h
+++ include/ndb.h
@@ -21,7 +21,7 @@ typedef struct Ndbcache	Ndbcache;
 enum
 {
 	Ndbalen=	32,	/* max attribute length */
-	Ndbvlen=	64,	/* max value length */
+	Ndbvlen=	64	/* max value length */
 };
 
 /*
blob - 7967380f3aad4e11013f2e0eb6b031cb8af7afc5
blob + 618fa7b7015062b3b9e18cf3855c1d10e36f8c64
--- include/nfs3.h
+++ include/nfs3.h
@@ -148,7 +148,7 @@ enum {
 	Nfs3FsCanSetTime = 16,
 
 	Nfs3Version = 3,	
-	Nfs3Program = 100003,
+	Nfs3Program = 100003
 };
 typedef enum
 {
@@ -183,7 +183,7 @@ typedef enum
 	Nfs3ErrBadType = 10007,
 	Nfs3ErrJukebox = 10008,
 	Nfs3ErrFprintNotFound = 10009,
-	Nfs3ErrAborted = 10010,
+	Nfs3ErrAborted = 10010
 } Nfs3Status;
 
 void nfs3errstr(Nfs3Status);
@@ -196,14 +196,14 @@ typedef enum
 	Nfs3FileChar = 4,
 	Nfs3FileSymlink = 5,
 	Nfs3FileSocket = 6,
-	Nfs3FileFifo = 7,
+	Nfs3FileFifo = 7
 } Nfs3FileType;
 
 enum
 {
 	Nfs3ModeSetUid = 0x800,
 	Nfs3ModeSetGid = 0x400,
-	Nfs3ModeSticky = 0x200,
+	Nfs3ModeSticky = 0x200
 };
 
 typedef enum
@@ -251,7 +251,7 @@ typedef enum
 	Nfs3CallTPathconf,
 	Nfs3CallRPathconf,
 	Nfs3CallTCommit,
-	Nfs3CallRCommit,
+	Nfs3CallRCommit
 } Nfs3CallType;
 
 typedef struct Nfs3Handle Nfs3Handle;
@@ -263,7 +263,7 @@ typedef enum
 {
 	Nfs3SetTimeDont = 0,
 	Nfs3SetTimeServer = 1,
-	Nfs3SetTimeClient = 2,
+	Nfs3SetTimeClient = 2
 } Nfs3SetTime;
 
 typedef struct Nfs3SetAttr Nfs3SetAttr;
@@ -285,7 +285,7 @@ typedef enum
 {
 	Nfs3SyncNone = 0,
 	Nfs3SyncData = 1,
-	Nfs3SyncFile = 2,
+	Nfs3SyncFile = 2
 } Nfs3Sync;
 
 typedef struct Nfs3TWrite Nfs3TWrite;
@@ -294,7 +294,7 @@ typedef enum
 {
 	Nfs3CreateUnchecked = 0,
 	Nfs3CreateGuarded = 1,
-	Nfs3CreateExclusive = 2,
+	Nfs3CreateExclusive = 2
 } Nfs3Create;
 
 typedef struct Nfs3TCreate Nfs3TCreate;
blob - 4917e261a6f8f2e5359b4ed94a0d4943e8e44d5b
blob + 9dd9aba3054f59b124113082d9c0ffafc7a4afa4
--- include/sunrpc.h
+++ include/sunrpc.h
@@ -21,7 +21,7 @@ enum
 	SunAuthNone = 0,
 	SunAuthSys,
 	SunAuthShort,
-	SunAuthDes,
+	SunAuthDes
 };
 
 typedef enum {
@@ -46,7 +46,7 @@ typedef enum {
 	SunAuthRejectedVerf,
 	SunAuthTooWeak,
 	SunAuthInvalidResp,
-	SunAuthFailed,
+	SunAuthFailed
 } SunStatus;
 
 struct SunAuthInfo
@@ -78,7 +78,7 @@ struct SunRpc
 	u32int proc;
 
 	/* call */
-	// uint proc;
+	/* uint proc; */
 	u32int prog, vers;
 	SunAuthInfo cred;
 	SunAuthInfo verf;
@@ -87,16 +87,16 @@ struct SunRpc
 
 	/* reply */
 	u32int status;
-	// SunAuthInfo verf;
+	/* SunAuthInfo verf; */
 	u32int low, high;
-	// uchar *data;
-	// uint ndata;
+	/* uchar *data; */
+	/* uint ndata; */
 };
 
 typedef enum
 {
 	SunCallTypeTNull,
-	SunCallTypeRNull,
+	SunCallTypeRNull
 } SunCallType;
 
 struct SunCall
@@ -191,7 +191,7 @@ typedef struct SunSrv SunSrv;
 
 enum
 {
-	SunStackSize = 32768,
+	SunStackSize = 32768
 };
 
 struct SunMsg
@@ -316,7 +316,7 @@ typedef enum
 	PortCallTDump,
 	PortCallRDump,
 	PortCallTCallit,
-	PortCallRCallit,
+	PortCallRCallit
 } PortCallType;
 
 enum
blob - 353d35d3aff8bb297c0b2c52ca293294ccc0482c
blob + 2a84e619461835702aaad40c00ce682aad8fc691
--- include/thread.h
+++ include/thread.h
@@ -71,7 +71,7 @@ enum
 	CHANSND,
 	CHANRCV,
 	CHANNOP,
-	CHANNOBLK,
+	CHANNOBLK
 };
 
 struct Alt
blob - e7a602d529c6aa011714c4b88a3d1b0de3133384
blob + eb5ea42a8fb35a599cf3b1be760a3142fc5f7f34
--- include/utf.h
+++ include/utf.h
@@ -11,7 +11,7 @@ enum
 	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	= 0xFFFD,		/* decoding error in UTF */
+	Runeerror	= 0xFFFD		/* decoding error in UTF */
 };
 
 /* Edit .+1,/^$/ | cfn $PLAN9/src/lib9/utf/?*.c | grep -v static |grep -v __ */
blob - 2250e0b949230020fb68d0e5f1a8f81a9bf49d98
blob + 1b239af9934051984891c358f3dc5d4dac5d3cd7
--- include/venti.h
+++ include/venti.h
@@ -17,7 +17,7 @@ AUTOLIB(venti)
  */
 enum
 {
-	MaxFragSize = 9*1024,
+	MaxFragSize = 9*1024
 };
 
 typedef struct Packet Packet;
@@ -91,7 +91,7 @@ enum
 	VtScoreSize = 20,
 	VtMaxStringSize = 1024,
 	VtMaxLumpSize	= 56*1024,
-	VtPointerDepth	= 7,
+	VtPointerDepth	= 7
 };
 #define VtMaxFileSize ((1ULL<<48)-1)
 
@@ -120,7 +120,7 @@ enum
 	VtCorruptType = 0xFF,
 
 	VtTypeDepthMask = 7,
-	VtTypeBaseMask = ~VtTypeDepthMask,
+	VtTypeBaseMask = ~VtTypeDepthMask
 };
 
 /* convert to/from on-disk type numbers */
@@ -141,11 +141,11 @@ enum
 	_VtEntryDir = 1<<1,		/* a directory */
 	_VtEntryDepthShift = 2,		/* shift for pointer depth */
 	_VtEntryDepthMask = 7<<2,	/* mask for pointer depth */
-	VtEntryLocal = 1<<5,		/* for local storage only */
+	VtEntryLocal = 1<<5		/* for local storage only */
 };
 enum
 {
-	VtEntrySize = 40,
+	VtEntrySize = 40
 };
 struct VtEntry
 {
@@ -173,7 +173,7 @@ struct VtRoot
 enum
 {
 	VtRootSize = 300,
-	VtRootVersion = 2,
+	VtRootVersion = 2
 };
 
 void vtrootpack(VtRoot*, uchar*);
@@ -231,7 +231,7 @@ enum
 	VtCryptoStrengthNone,
 	VtCryptoStrengthAuth,
 	VtCryptoStrengthWeak,
-	VtCryptoStrengthStrong,
+	VtCryptoStrengthStrong
 };
 
 /*
@@ -242,7 +242,7 @@ enum
 	VtCryptoNone,
 	VtCryptoSSL3,
 	VtCryptoTLS1,
-	VtCryptoMax,
+	VtCryptoMax
 };
 
 /* 
@@ -313,7 +313,7 @@ enum
 {
 	VtStateAlloc,
 	VtStateConnected,
-	VtStateClosed,
+	VtStateClosed
 };
 
 struct VtConn
@@ -387,7 +387,7 @@ int vtping(VtConn*);
  */
 enum
 {
-	NilBlock = ~0,
+	NilBlock = ~0
 };
 
 typedef struct VtBlock VtBlock;
@@ -459,7 +459,7 @@ enum
 {
 	VtOREAD,
 	VtOWRITE,
-	VtORDWR,
+	VtORDWR
 };
 
 VtFile *vtfileopenroot(VtCache*, VtEntry*);
blob - 9f6f41067f766eee55709b9c5acfdc94323b8c28
blob + 837d28a28697d3f82cf2850fca3a4eec2cd37f6d
--- mail/lib/rewrite
+++ mail/lib/rewrite
@@ -14,7 +14,7 @@
 [^!@.]+			translate	"$PLAN9/bin/upas/aliasmail '&'"
 
 # append the local domain to addresses without a domain
-local!(.*)		alias		\1@YOURDOMAIN.DOM
+local!(.*)		alias		\1@swtch.com
 
 # convert source domain address to a chain a@b@c@d...
 @([^@!,]*):([^!@]*)@([^!]*)		alias	\2@\3@\1
@@ -24,5 +24,8 @@ local!(.*)		alias		\1@YOURDOMAIN.DOM
 ([^@]+)@([^@]+)@(.+)	alias		\2!\1@\3
 ([^@]+)@([^@]+)		alias		\2!\1
 
+# send swtch.com mail separately to appease mail avenger
+(swtch.com)!(.*)	|	"$PLAN9/mail/lib/qmail '\s' 'swtch.com'" "'\2@\1'"
+
 # send all mail to the gateway or mail server, $smtp,  for delivery
-([^!]*)!(.*) 		| 		"$PLAN9/mail/lib/qmail '\s' 'YOURGATEWAY.DOM'" "'\2@\1'"
+([^!]*)!(.*) 		| 		"$PLAN9/mail/lib/qmail '\s' 'holo.morphisms.net'" "'\2@\1'"
blob - 492e028949d386d50a693c47c4949628345a5a5a
blob + 757bfcd930cc65189251c9f3562597f243f96b0b
--- src/cmd/9660/cdrdwr.c
+++ src/cmd/9660/cdrdwr.c
@@ -251,7 +251,7 @@ parsedir(Cdimg *cd, Direc *d, uchar *buf, int len, cha
 		d->mode = little(p, 4);
 	}
 
-	// BUG: rock ridge extensions
+	/* BUG: rock ridge extensions */
 	return 0;
 }
 
@@ -604,7 +604,7 @@ Cgetc(Cdimg *cd)
 	if((c = Bgetc(&cd->brd)) == Beof) {
 		fprint(2, "getc at %lud\n", Croffset(cd));
 		assert(0);
-		//sysfatal("Bgetc: %r");
+		/*sysfatal("Bgetc: %r"); */
 	}
 	return c;
 }
blob - f82ff30fde3034438491a8a558025d65fdff2c03
blob + 4e66bd78a91d2166848dcc0a6926cb0365f7ff03
--- src/cmd/9660/dump9660.c
+++ src/cmd/9660/dump9660.c
@@ -203,16 +203,16 @@ main(int argc, char **argv)
 	} 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 @@ addprotofile(char *new, char *old, Dir *d, void *a)
 	if((direc = adddirec((Direc*)a, new, &xd))) {
 		direc->srcfile = atom(old);
 
-		// BUG: abstract, biblio, notice
+		/* BUG: abstract, biblio, notice */
 	}
 	if(name)
 		free(name);
blob - 5eefae8830a370d15caf7f80000b8c7d2a112680
blob + b5131a27c1cb2e566b7ebcce97f705c17cc27639
--- src/cmd/9660/iso9660.h
+++ src/cmd/9660/iso9660.h
@@ -65,7 +65,7 @@ struct Direc {
 	int nchild;
 };
 enum {  /* Direc flags */
-	Dbadname = 1<<0,  /* Non-conformant name     */
+	Dbadname = 1<<0  /* Non-conformant name     */
 };
 
 /*
@@ -132,7 +132,7 @@ enum {	/* Cdimg->flags, Cdinfo->flags */
 	CDrockridge = 1<<3,
 	CDnew = 1<<4,
 	CDdump = 1<<5,
-	CDbootable = 1<<6,
+	CDbootable = 1<<6
 };
 
 typedef struct Tx Tx;
@@ -159,7 +159,7 @@ struct Cdinfo {
 };
 
 enum {
-	Blocklen = 2048,
+	Blocklen = 2048
 };
 
 /*
@@ -265,7 +265,7 @@ enum { /* Rockridge flags */
 	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 @@ enum { /* CputrripTF type argument */
 	TFbackup = 1<<4,
 	TFexpiration = 1<<5,
 	TFeffective = 1<<6,
-	TFlongform = 1<<7,
+	TFlongform = 1<<7
 };
 
 enum { /* CputrripNM flag types */
@@ -285,7 +285,7 @@ enum { /* CputrripNM flag types */
 	NMparent = 1<<2,
 	NMroot = 1<<3,
 	NMvolroot = 1<<4,
-	NMhost = 1<<5,
+	NMhost = 1<<5
 };
 
 /* boot.c */
@@ -414,7 +414,7 @@ enum { 
 	DTdotdot,
 	DTiden,
 	DTroot,
-	DTrootdot,
+	DTrootdot
 };
 
 extern ulong now;
blob - dc326c6a850d04f6348236269b24bab242c6fdeb
blob + 78716524380f573a5f74436130ab7948f33d30ec
--- src/cmd/9660/sysuse.c
+++ src/cmd/9660/sysuse.c
@@ -19,7 +19,7 @@ static ulong CputsuspCE(Cdimg *cd, ulong offset);
 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 @@ CputrripTF(Cdimg *cd, Direc *d, int type, int dowrite)
 		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;
 }
blob - f060c104c7a4e8f2446b1b76498cf0fa443af756
blob + 07e405703f992246ce68e4d47f939c4cad403885
--- src/cmd/9660/unix.c
+++ src/cmd/9660/unix.c
@@ -23,7 +23,7 @@ static long numericgid(char *gp);
 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 @@ dirtoxdir(XDir *xd, Dir *d)
 	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 */
 	}
 }
 
blob - 06c95f55387c6e287abefc28fa4f83dc4e93dc7b
blob + 07ed8e081c9bc96123046b8416fa85c3df05df01
--- src/cmd/9pserve.c
+++ src/cmd/9pserve.c
@@ -8,7 +8,7 @@ enum
 {
 	STACK = 32768,
 	NHASH = 31,
-	MAXMSG = 64,	/* per connection */
+	MAXMSG = 64	/* per connection */
 };
 
 typedef struct Hash Hash;
@@ -240,8 +240,8 @@ mainproc(void *v)
 	threadcreate(inputthread, nil, STACK);
 	threadcreate(outputthread, nil, STACK);
 
-//	if(rootfid)
-//		dorootstat();
+/*	if(rootfid) */
+/*		dorootstat(); */
 	
 	threadcreate(listenthread, nil, STACK);
 	threadexits(0);
@@ -618,14 +618,14 @@ openfdthread(void *v)
 			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 @@ openfdthread(void *v)
 			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 @@ inputthread(void *arg)
 			msgput(m);
 	}
 	closeioproc(io);
-	//fprint(2, "%T input eof\n");
+	/*fprint(2, "%T input eof\n"); */
 	threadexitsall(0);
 }
 
blob - 24a0a11553f42186ee01d28df41a1956fccdf631
blob + ec54ca3f31825daadf14a8d8a0e3b2794bba6650
--- src/cmd/9term/9term.c
+++ src/cmd/9term/9term.c
@@ -248,7 +248,7 @@ new(Image *i, int hideit, int scrollit, int pid, char 
 		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 @@ enum
 	Plumb,
 	Send,
 	Scroll,
-	Cook,
+	Cook
 };
 
 char		*menu2str[] = {
blob - 982eea18b9641657e67dd405788703408cf282e1
blob + bc6d1fc959632de3230f9dd2c68a45333070b770
--- src/cmd/9term/dat.h
+++ src/cmd/9term/dat.h
@@ -24,13 +24,13 @@ enum
 	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 @@ enum	/* control messages */
 	Holdon,
 	Holdoff,
 	Deleted,
-	Exited,
+	Exited
 };
 
 struct Wctlmesg
blob - 86e589b3e9ad5d736c0456347d2dc54b14b4de5a
blob + e0f18e873b2ac0397adf7e7189ff92f86767b5f3
--- src/cmd/9term/data.c
+++ src/cmd/9term/data.c
@@ -169,7 +169,7 @@ Cursor l = {
 Cursor *corners[9] = {
 	&tl,	&t,	&tr,
 	&l,	nil,	&r,
-	&bl,	&b,	&br,
+	&bl,	&b,	&br
 };
 
 void
blob - 00b56004d538fc9248a6dad86f030df4b929fa45
blob + cef83d069c8866c525ebd92e5fcce6ecdbef449c
--- src/cmd/9term/win.c
+++ src/cmd/9term/win.c
@@ -31,7 +31,7 @@ Event blank = {
 	'X',
 	0, 0, 0, 1, 1,
 	{ ' ', 0 },
-	{ ' ', 0 },
+	{ ' ', 0 }
 };
 
 struct Q
@@ -47,7 +47,7 @@ CFid *eventfd;
 CFid *addrfd;
 CFid *datafd;
 CFid *ctlfd;
-// int bodyfd;
+/* int bodyfd; */
 
 char	*typing;
 int	ntypeb;
blob - 666933086194028140a971ea79115467ff52ac09
blob + 577fe27df4a6922feb4b64b9857d33a27c7eb165
--- src/cmd/9term/wind.c
+++ src/cmd/9term/wind.c
@@ -19,7 +19,7 @@ enum
 {
 	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 @@ fprint(2, "res %p %p\n", w->i, i);
 		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 @@ winctl(void *arg)
 		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 @@ winctl(void *arg)
 				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 @@ winctl(void *arg)
 				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);
blob - 266175e2076ae7d5243c295809857b22a57ce584
blob + e58e9b135437181070a99558f5d1d30494843ab9
--- src/cmd/acid/acid.h
+++ src/cmd/acid/acid.h
@@ -10,7 +10,7 @@ enum
 	NFD		= 100,
 	Maxproc		= 50,
 	Maxval		= 10,
-	Mempergc	= 1024*1024,
+	Mempergc	= 1024*1024
 };
 
 /* #pragma varargck type "L"	void */
@@ -81,7 +81,7 @@ enum
 	TCODE,
 	TREG,
 	TCON,
-	NUMT,
+	NUMT
 };
 
 struct Type
@@ -327,5 +327,5 @@ enum
 	OEVAL,
 	OWHAT,
 	OUPLUS,
-	NUMO,
+	NUMO
 };
blob - 58acdfc9947f17d1c5d6efa1158f0e5a2dce0c9a
blob + c4b870e9fafa4e61b94bdbb379828553787b86f1
--- src/cmd/acid/print.c
+++ src/cmd/acid/print.c
@@ -38,7 +38,7 @@ char *typenames[] = {
 	"float",
 	"string",
 	"list",
-	"code",
+	"code"
 };
 
 void
blob - 034af9912eefbe94103452b7b150d7766279aa6e
blob + e6efc95a0da1d031b09e679303577e2c5f7da1db
--- src/cmd/acid/proc.c
+++ src/cmd/acid/proc.c
@@ -202,7 +202,7 @@ deinstall(int pid)
 	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;
blob - 1c26e6bd07b3b1c531b434668f3b6889fa7282ae
blob + 8a043787cf480fe97c2562febc2824f0e6103d28
--- src/cmd/acidtypes/dat.h
+++ src/cmd/acidtypes/dat.h
@@ -14,7 +14,7 @@ enum
 	Array,
 	Range,
 	Defer,
-	Typedef,
+	Typedef
 };
 
 struct Type
blob - 066e8bad65e37d90706321fe9aa3810a00550369
blob + f272f67a982f364ca5c9a82d0c263feb3e245424
--- src/cmd/acidtypes/main.c
+++ src/cmd/acidtypes/main.c
@@ -67,7 +67,7 @@ main(int argc, char **argv)
 		
 		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);
 	}
blob - 01ecc3e7e141914d3f93c84a607fa2fc05ddd392
blob + 00897e34670e0a1174ef7108e6292201cd282a0a
--- src/cmd/acidtypes/type.c
+++ src/cmd/acidtypes/type.c
@@ -235,7 +235,7 @@ struct {
 	"XER",		"$XER",
 	"CTR",		"$CTR",
 	"VRSAVE",		"$VRSAVE",
-	"FPSCR",		"$FPSCR",
+	"FPSCR",		"$FPSCR"
 };
 
 char*
@@ -469,7 +469,7 @@ nameof(Type *t, int doanon)
 }
 
 static char
-basecharof(Type *t)	//XXX
+basecharof(Type *t)	/*XXX */
 {
 	switch(t->xsizeof){
 	default:
blob - f95c3a17ea0e1d647514009f562c33a8de8f33d3
blob + 395033b1e32a83cdcb89277aff11cd6e767b596f
--- src/cmd/acme/acme.c
+++ src/cmd/acme/acme.c
@@ -37,7 +37,7 @@ Rune	snarfrune[NSnarf+1];
 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 @@ threadmain(int argc, char *argv[])
 
 	d = display;
 	font = d->defaultfont;
-//assert(font);
+/*assert(font); */
 
 	reffont.f = font;
 	reffonts[0] = &reffont;
@@ -355,8 +355,8 @@ killprocs(void)
 	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");
blob - 7af5f6beb89183f01070ebd5edb69c037dc3eefc
blob + 3869e39b356ab6f8b516c93ce6f21e01ef510172
--- src/cmd/acme/addr.c
+++ src/cmd/acme/addr.c
@@ -15,13 +15,13 @@ enum
 {
 	None = 0,
 	Fore = '+',
-	Back = '-',
+	Back = '-'
 };
 
 enum
 {
 	Char,
-	Line,
+	Line
 };
 
 int
blob - 39982f17e73e1dac06c371a6a9bc02b019a50221
blob + 875bb0b0402839847a186f5ab294ea77e0672866
--- src/cmd/acme/buff.c
+++ 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
blob - d44388849d2281ab5a05cb220267f696279d9f77
blob + 0bf82381708ea9e8527648287cf1183b0ba1f661
--- src/cmd/acme/dat.h
+++ src/cmd/acme/dat.h
@@ -21,7 +21,7 @@ enum
 	QWwrsel,
 	QWtag,
 	QWxdata,
-	QMAX,
+	QMAX
 };
 
 enum
@@ -29,7 +29,7 @@ enum
 	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 @@ enum	/* Text.what */
 	Columntag,
 	Rowtag,
 	Tag,
-	Body,
+	Body
 };
 
 struct Text
@@ -463,7 +463,7 @@ enum
 	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 @@ enum
 {
 	FALSE,
 	TRUE,
-	XXX,
+	XXX
 };
 
 enum
@@ -487,14 +487,14 @@ enum
 	Delete	= 'd',
 	Insert	= 'i',
 	Replace	= 'r',
-	Filename	= 'f',
+	Filename	= 'f'
 };
 
 enum	/* editing */
 {
 	Inactive	= 0,
 	Inserting,
-	Collecting,
+	Collecting
 };
 
 uint		globalincref;
@@ -545,7 +545,7 @@ int			dodollarsigns;
 enum
 {
 	Kscrolloneup		= KF|0x20,
-	Kscrollonedown	= KF|0x21,
+	Kscrollonedown	= KF|0x21
 };
 
 Channel	*cplumb;		/* chan(Plumbmsg*) */
blob - 6fef0698fa389fad9558c5af165a40ad8580e633
blob + ac578235a7faf1a2725c1d834b5fee1e7371da2a
--- src/cmd/acme/ecmd.c
+++ src/cmd/acme/ecmd.c
@@ -898,14 +898,14 @@ alllooper(Window *w, void *v)
 
 	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 @@ cmdaddress(Addr *ap, Address a, int sign)
 
 		case '\'':
 editerror("can't handle '");
-//			a.r = f->mark;
+/*			a.r = f->mark; */
 			break;
 
 		case '?':
@@ -1093,8 +1093,8 @@ alltofile(Window *w, void *v)
 	/* 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 @@ allmatchfile(Window *w, void *v)
 	/* 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);
blob - 7bccd3abb77217fe9703ca501b5d7d6de68b2cab
blob + a6375f66db7471674fe9e1b362fe5f687ff45c6e
--- src/cmd/acme/edit.c
+++ src/cmd/acme/edit.c
@@ -49,7 +49,7 @@ struct cmdtab cmdtab[]={
 	'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 @@ editthread(void *v)
 	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();
blob - efa0b02e381fe5d8e212113cdcf1b3f8f14546ce
blob + 211d58a2e525f7dff45c8e2ef461d261b2644e84
--- src/cmd/acme/edit.h
+++ src/cmd/acme/edit.h
@@ -76,7 +76,7 @@ struct List	/* code depends on a long being able to ho
 enum Defaddr{	/* default addresses */
 	aNo,
 	aDot,
-	aAll,
+	aAll
 };
 
 int	nl_cmd(Text*, Cmd*), a_cmd(Text*, Cmd*), b_cmd(Text*, Cmd*);
blob - 022d928ee9b30dfff4dfba1ec901796e4589e02b
blob + 0fd45dddb913c0d0ab2e42432311781822870e73
--- src/cmd/acme/elog.c
+++ src/cmd/acme/elog.c
@@ -36,7 +36,7 @@ struct Buflog
 
 enum
 {
-	Buflogsize = sizeof(Buflog)/sizeof(Rune),
+	Buflogsize = sizeof(Buflog)/sizeof(Rune)
 };
 
 /*
@@ -46,7 +46,7 @@ enum
 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
blob - bd867c7c4f64bc1db68741b56c2fe15a47c88c51
blob + 1a4e097b0de2f6cd4926d3b9b6e94bb7e638e812
--- src/cmd/acme/exec.c
+++ src/cmd/acme/exec.c
@@ -108,7 +108,7 @@ Exectab exectab[] = {
 	{ 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 @@ enum {
 	IGlobal = -2,
 	IError = -1,
 	Ion = 0,
-	Ioff = 1,
+	Ioff = 1
 };
 
 static int
@@ -1318,7 +1318,7 @@ runproc(void *argvp)
 	char buf[512];
 	int olddir;
 	int ret;
-	//static void *parg[2];
+	/*static void *parg[2]; */
 	char *rcarg[4];
 	void **argv;
 	CFsys *fs;
blob - cca91b2ee7c7b5d6bf7d331fa88b3858b3cd3ed2
blob + 00d5d54ccd7ca38c67746298d1c61da92820cca1
--- src/cmd/acme/file.c
+++ src/cmd/acme/file.c
@@ -33,7 +33,7 @@ struct Undo
 
 enum
 {
-	Undosize = sizeof(Undo)/sizeof(Rune),
+	Undosize = sizeof(Undo)/sizeof(Rune)
 };
 
 File*
blob - 033ce20d3595728d7cae63610b058a574dd0c1dd
blob + 9a7dbd10650a866adf7be5b4018edabf4fd423d3
--- src/cmd/acme/fsys.c
+++ src/cmd/acme/fsys.c
@@ -467,8 +467,10 @@ fsyswalk(Xfid *x, Fid *f)
 			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");
blob - 01d685be00d76075952be069f219c13f8188d1c2
blob + a83216491ed2d3c5d9e6896050b7788d630730b8
--- src/cmd/acme/mail/dat.h
+++ src/cmd/acme/mail/dat.h
@@ -7,7 +7,7 @@ enum
 {
 	STACK		= 8192,
 	EVENTSIZE	= 256,
-	NEVENT		= 5,
+	NEVENT		= 5
 };
 
 struct Event
blob - 0d894d93e7892dff66ef7cea50275c68a48e9dc6
blob + 1ba19c24768eca80ed6637ed041820a53fcede0c
--- src/cmd/acme/mail/mesg.c
+++ src/cmd/acme/mail/mesg.c
@@ -42,7 +42,7 @@ char *goodtypes[] = {
 	"text/richtext",
 	"text/tab-separated-values",
 	"application/octet-stream",
-	nil,
+	nil
 };
 
 char *okheaders[] =
@@ -60,7 +60,7 @@ char *extraheaders[] =
 	"Resent-From:",
 	"Resent-To:",
 	"Sort:",
-	nil,
+	nil
 };
 
 char*
@@ -100,10 +100,10 @@ mkaddrs(char *t)
 	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 @@ mesgcommand(Message *m, char *cmd)
 			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 @@ tokenizec(char *str, char **args, int max, char *split
 	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 @@ mesgopen(Message *mbox, char *dir, char *s, Message *m
 		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 @@ mesglookupfile(Message *mbox, char *name, char *digest
 	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);
blob - 9d6fd35ba0d795a4b002243c1b0f6ea1a6821aed
blob + 5dda0edc317be4f0634392b032b3162627ba709d
--- src/cmd/acme/mail/reply.c
+++ src/cmd/acme/mail/reply.c
@@ -240,7 +240,7 @@ enum{
 	CC,
 	FROM,
 	INCLUDE,
-	TO,
+	TO
 };
 
 char *headers[] = {
@@ -250,7 +250,7 @@ char *headers[] = {
 	"from:",
 	"include:",
 	"to:",
-	nil,
+	nil
 };
 
 int
@@ -516,7 +516,7 @@ mesgsend(Message *m)
 	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){
blob - 02340cc651338e674f72bc4d5246bda2655d7f06
blob + baf7ec79cb30d5d773994e388fb342a68ef051f2
--- src/cmd/acme/scrl.c
+++ src/cmd/acme/scrl.c
@@ -74,7 +74,7 @@ textscrdraw(Text *t)
 		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? */
 	}
 }
 
blob - 44cb6544e0e72d75d5879fb0b49401c6b9bed8d2
blob + 9cfdb525d84e21ffcc43c6fb7863a810259c1876
--- src/cmd/acme/text.c
+++ src/cmd/acme/text.c
@@ -1174,7 +1174,7 @@ textsetselect(Text *t, uint q0, uint q1)
  */
 enum {
 	DELAY = 2,
-	MINMOVE = 4,
+	MINMOVE = 4
 };
 
 uint
blob - 2f0328c8a4635a8771039a7e0f9ca8364029beab
blob + 510b4095085d044810d3f22d47ea2bed108c7a86
--- src/cmd/acme/wind.c
+++ src/cmd/acme/wind.c
@@ -53,7 +53,7 @@ wininit(Window *w, Window *clone, Rectangle r)
 		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 @@ wininit(Window *w, Window *clone, Rectangle r)
 		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 @@ wininit(Window *w, Window *clone, Rectangle r)
 	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;
blob - 1c74a162e3553bf78bc5e0dd18d2b0c54f7cc264
blob + 52754039aeaa7f9b8e358936bd264f5b3ecb4d89
--- src/cmd/astro/astro.h
+++ 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 @@ enum
 	DARK	= 1<<0,
 	SIGNIF	= 1<<1,
 	PTIME	= 1<<2,
-	LIGHT	= 1<<3,
+	LIGHT	= 1<<3
 };
 
 struct	Obj1
@@ -150,7 +152,7 @@ extern	double	cosx(double, int, int, int, int, double)
 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);
blob - f376f665f70af3c84e0e4f8b8af57ca3406df2e0
blob + 9375a3a96d18b97be86e33fe160f00ef96dca37e
--- src/cmd/astro/init.c
+++ src/cmd/astro/init.c
@@ -14,7 +14,7 @@ Obj2*	objlst[] =
 	&onept,
 	&oplut,
 	&ocomet,
-	0,
+	0
 };
 
 struct	idata
@@ -35,7 +35,7 @@ struct	idata
 	"Uranus",	"uranus",	uran,
 	"Neptune",	"neptune",	nept,
 	"Pluto",	"pluto",	plut,
-	"Comet",	"comet",	comet,
+	"Comet",	"comet",	comet
 };
 
 void
blob - a6441aae8dbd1d7919116a06928eae15bf0c3a6e
blob + 43ce4cc452ca607c4add0fddf2a2d6d6f5504b98
--- src/cmd/astro/main.c
+++ src/cmd/astro/main.c
@@ -52,12 +52,12 @@ loop:
 			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 @@ args(int argc, char *argv[])
 	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();
 
blob - ebe1f0ec73971c99324d20dc48b1ff4624c37989
blob + 6ada968d5d5891fa4dcc1c3138d0d226fec3cb87
--- src/cmd/astro/merct.c
+++ src/cmd/astro/merct.c
@@ -168,7 +168,7 @@ double	mercfp[] =
 	0.160e-6,	2.1241,
 	0.134e-6,	5.1260,
 	0.347e-6,	5.1620,
-	0,
+	0
 };
 
 char	merccp[] =
@@ -332,5 +332,5 @@ char	merccp[] =
 	 0,	2,
 	-1,	2,
 	 2,	3,
-	 1,	3,
+	 1,	3
 };
blob - 1509492e8cf0aa0fe37ebb82f2bcb23fbb67ae0b
blob + 3658035c68b77972af5c951686599c49106f66f0
--- src/cmd/astro/moont.c
+++ src/cmd/astro/moont.c
@@ -286,5 +286,5 @@ Moontab	moontab[] =
 	    -.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
 };
blob - 2d05d59c649b0b6380d828db68153c0a5465c2d8
blob + ff0c9fcaf13b264e264ba370ecd4aa345f3dfbd0
--- src/cmd/astro/nept.c
+++ 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 @@ nept(void)
 
 	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;
blob - 8ddf2b91314d03818554190855e3239e9f8edd96
blob + b4bfdefec73946f87cad8b7d6f303083a8f2e5f2
--- src/cmd/astro/nutt.c
+++ src/cmd/astro/nutt.c
@@ -34,7 +34,7 @@ double	nutfp[] =
 	  .0183,	0,
 	  .0113,	0,
 	 -.0050,	0,
-	      0,
+	      0
 };
 
 char	nutcp[] =
@@ -67,5 +67,5 @@ char	nutcp[] =
 	2,2,0,
 	1,2,0,
 	2,2,1,
-	2,2,-1,
+	2,2,-1
 };
blob - e88d7006acc447a67a5a0b7af58401b26b3ee378
blob + 4d60fdebb260c3c24cf9de2c1b9a78371798baa8
--- src/cmd/astro/pdate.c
+++ src/cmd/astro/pdate.c
@@ -14,7 +14,7 @@ char*	month[] =
 	"September",
 	"October",
 	"November",
-	"December",
+	"December"
 };
 
 double
@@ -163,13 +163,13 @@ pstime(double d)
 	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();
 
blob - 36702a80eb80e2f86b67a54aae537972010e5f13
blob + 6c31ed5894721ee971448b24cf60821bf483a313
--- src/cmd/astro/plut.c
+++ 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 @@ plut(void)
 
 	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;
blob - 38206e5f9649ded5cf86e2168b314284217e693a
blob + e610afa127ccc2764fe02fc6fa1a54c2dcd01f4f
--- src/cmd/astro/satel.c
+++ src/cmd/astro/satel.c
@@ -2,7 +2,7 @@
 
 char*	satlst[] =
 {
-	0,
+	0
 };
 
 struct
blob - e4ed4eda8d8550fc04044a477746df4891869a8d
blob + 71424ee82f8954e920668c2d41174c3d9fa1245b
--- src/cmd/astro/search.c
+++ src/cmd/astro/search.c
@@ -5,7 +5,7 @@ char*	solstr[] =
 	"Fall equinox",
 	"Winter solstice",
 	"Spring equinox",
-	"Summer solstice",
+	"Summer solstice"
 };
 
 struct
blob - 7f452bcfcf73786a0493311256975ff62293c14c
blob + 0265632d82ba83ae7e87d3043e2fb8f06a286c37
--- src/cmd/astro/sunt.c
+++ src/cmd/astro/sunt.c
@@ -122,7 +122,7 @@ double	sunfp[]	=
 	-1.33e-6, 0,
 	 0.37e-6, 0,
 	 0.36e-6, 0,
-	0,
+	0
 };
 char	suncp[]	=
 {
@@ -238,5 +238,5 @@ char	suncp[]	=
 	1,0,0,
 	1,-1,0,
 	1,1,0,
-	1,0,-1,
+	1,0,-1
 };
blob - b40fabe10c15c9fc4950ea542ed63e9f10492a47
blob + 33e6f1bd358e068bd02d094165f265205a3bea25
--- src/cmd/astro/uran.c
+++ 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 @@ uran(void)
 
 	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;
blob - a4521af60f6c40ef607f6f0bbd19c72377c4052f
blob + e34643afaf61d302232031a8f5b7a18050c94095
--- src/cmd/astro/venust.c
+++ src/cmd/astro/venust.c
@@ -27,7 +27,7 @@ double	venfp[]	=
 	0.717e-6,	2.2969,
 	2.991e-6,	2.0611,
 	1.335e-6,	0.9628,
-	0.,
+	0.
 };
 
 char	vencp[]	=
@@ -56,5 +56,5 @@ char	vencp[]	=
 	4,-5,0,0,
 	2,0,-3,0,
 	1,0,0,-1,
-	2,0,0,-2,
+	2,0,0,-2
 };
blob - 5703571d87111feed48ba2b80ecdea47873320a0
blob + 992cc0ad1283140bafda1980db15d45faa0564a9
--- src/cmd/auth/factotum/apop.c
+++ src/cmd/auth/factotum/apop.c
@@ -148,7 +148,7 @@ struct ServerState
 
 enum
 {
-	APOPCHALLEN = 128,
+	APOPCHALLEN = 128
 };
 
 static int apopchal(ServerState*, int, char[APOPCHALLEN]);
blob - 2f2511b9748f42a4020cc3df038b88d7631903fa
blob + 1c037a5366f09f1939d948b214916d3d7f45329b
--- src/cmd/auth/factotum/attr.c
+++ src/cmd/auth/factotum/attr.c
@@ -143,7 +143,7 @@ hasqueries(Attr *a)
 
 char *ignored[] = {
 	"role",
-	"disabled",
+	"disabled"
 };
 
 static int
blob - 2b2589022ebf1e0261babf88bb5704c6ae46e612
blob + b27f64a79c8f895dc0b6b1e0d53b2d6e0aa1d4bf
--- src/cmd/auth/factotum/chap.c
+++ src/cmd/auth/factotum/chap.c
@@ -33,7 +33,7 @@ enum {
 
 	MShashlen = 16,
 	MSchallen = 8,
-	MSresplen = 24,
+	MSresplen = 24
 };
 
 static int
@@ -315,7 +315,7 @@ out:
 	keyclose(s.k);
 	free(user);
 	free(resp);
-//	xioclose(s.asfd);
+/*	xioclose(s.asfd); */
 	return ret;
 }
 
@@ -411,16 +411,17 @@ chaproles[] = 
 };
 
 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
 };
 
+
blob - da8280ada929d6305234c49dc6c57fadea6876e7
blob + 46399049ec119cd108957901b26aa9cdc2657030
--- src/cmd/auth/factotum/cpu.c
+++ src/cmd/auth/factotum/cpu.c
@@ -56,7 +56,7 @@ struct AuthMethod {
 {
 	{ "p9",		p9auth,		srvp9auth,},
 	{ "netkey",	netkeyauth,	netkeysrvauth,},
-//	{ "none",	noauth,		srvnoauth,},
+/*	{ "none",	noauth,		srvnoauth,}, */
 	{ nil,	nil}
 };
 AuthMethod *am = authmethod;	/* default is p9 */
@@ -687,7 +687,7 @@ enum
 	Qdir,
 	Qcpunote,
 
-	Nfid = 32,
+	Nfid = 32
 };
 
 struct {
@@ -697,7 +697,7 @@ struct {
 } fstab[] =
 {
 	[Qdir]		{ ".",		{Qdir, 0, QTDIR},	DMDIR|0555	},
-	[Qcpunote]	{ "cpunote",	{Qcpunote, 0},		0444		},
+	[Qcpunote]	{ "cpunote",	{Qcpunote, 0},		0444		}
 };
 
 typedef struct Note Note;
blob - d426f86f96087e419e29ad20261a21818b7cd1a8
blob + 6195bb8401ddc524b0a090b4f2ffcf6be12740b3
--- src/cmd/auth/factotum/ctl.c
+++ src/cmd/auth/factotum/ctl.c
@@ -17,7 +17,7 @@
 static char *msg[] = {
 	"key",
 	"delkey",
-	"debug",
+	"debug"
 };
 
 static int
blob - eaf94cafee87efc6094ccf5882e1343c86ee3453
blob + 49377f40192e6c37f25094ecd5cd347bad3830f6
--- src/cmd/auth/factotum/dat.h
+++ src/cmd/auth/factotum/dat.h
@@ -13,7 +13,7 @@ enum
 	RpcWriteHex,
 
 	/* thread stack size - big buffers for printing */
-	STACK = 65536,
+	STACK = 65536
 };
 
 typedef struct Conv Conv;
blob - 68e862891f10907498b115f572c5024cb9396ba5
blob + 08894ae6fd1219ab55b994825dda2d67efc99f05
--- src/cmd/auth/factotum/fs.c
+++ src/cmd/auth/factotum/fs.c
@@ -12,7 +12,7 @@ enum
 	Qlog,
 	Qctl,
 	Qneedkey,
-	Qconv,
+	Qconv
 };
 
 static int qtop;
@@ -41,7 +41,7 @@ static struct
 	"rpc",		Qrpc,		0666,
 	"proto",		Qprotolist,	0444,
 	"log",		Qlog,		0600|DMEXCL,
-	"conv",		Qconv,		0400,
+	"conv",		Qconv,		0400
 };
 
 static void
blob - b18cbf3d1f2b85a0852689019517ed61abe160aa
blob + 010b5d51f35afe16cbac85985c06966a0bf3aa08
--- src/cmd/auth/factotum/main.c
+++ src/cmd/auth/factotum/main.c
@@ -26,7 +26,7 @@ threadmain(int argc, char *argv[])
 	char *mtpt;
 	char err[ERRMAX];
 
-//	mtpt = "/mnt";
+/*	mtpt = "/mnt"; */
 	mtpt = nil;
 	owner = getuser();
 	quotefmtinstall();
blob - 789d4d709540d247c2087ef7ac79098205813100
blob + 0267a6164717a68000c578b20fe517428d7fbd4d
--- src/cmd/auth/factotum/p9any.c
+++ src/cmd/auth/factotum/p9any.c
@@ -15,7 +15,7 @@ extern Proto p9sk1, p9sk2, p9cr;
 static Proto* okproto[] =
 {
 	&p9sk1,
-	nil,
+	nil
 };
 
 static int
@@ -267,6 +267,6 @@ p9anyroles[] = 
 
 Proto p9any = {
 	"p9any",
-	p9anyroles,
+	p9anyroles
 };
 
blob - abbad4c4f90fa44641fae1dc2ce03b16b122f40e
blob + 32cccb82b9ce4303145aaa260653013bb0525f9c
--- src/cmd/auth/factotum/p9cr.c
+++ src/cmd/auth/factotum/p9cr.c
@@ -197,7 +197,7 @@ out:
 
 enum
 {
-	MAXCHAL = 64,
+	MAXCHAL = 64
 };
 
 typedef struct State State;
@@ -222,7 +222,7 @@ enum
 	SHaveChal,
 	SNeedResp,
 
-	Maxphase,
+	Maxphase
 };
 
 static char *phasenames[Maxphase] =
@@ -231,7 +231,7 @@ static char *phasenames[Maxphase] =
 [CHaveResp]	"CHaveResp",
 
 [SHaveChal]	"SHaveChal",
-[SNeedResp]	"SNeedResp",
+[SNeedResp]	"SNeedResp"
 };
 
 static void
@@ -525,7 +525,7 @@ Proto p9cr =
 .write=		p9crwrite,
 .read=		p9crread,
 .close=		p9crclose,
-.keyprompt=	"user? !password?",
+.keyprompt=	"user? !password?"
 };
 
 Proto vnc =
@@ -536,5 +536,5 @@ Proto vnc =
 .read=		p9crread,
 .close=		p9crclose,
 .keyprompt=	"!password?",
-.addkey=	vncaddkey,
+.addkey=	vncaddkey
 };
blob - 04981e58089a8785c2ff2ab3e6cab9fc65c58115
blob + 46156939ddad596549be8562df70ced658b163a0
--- src/cmd/auth/factotum/p9sk1.c
+++ src/cmd/auth/factotum/p9sk1.c
@@ -343,11 +343,11 @@ Proto p9sk1 = {
 	p9sk1roles,
 	"user? dom? !password?",
 	p9sk1check,
-	p9sk1close,
+	p9sk1close
 };
 
 Proto p9sk2 = {
 	"p9sk2",
-	p9sk2roles,
+	p9sk2roles
 };
 
blob - 97da15ec1a51cad14bfbf37ee66a7634edf0bab6
blob + daf90cddae204e6f04c2f39915044fa8a1586313
--- src/cmd/auth/factotum/proto.c
+++ src/cmd/auth/factotum/proto.c
@@ -23,7 +23,7 @@ Proto *prototab[] = {
 	&p9sk2,
 	&pass,
 	&rsa,
-	nil,
+	nil
 };
 
 Proto*
blob - 350a07954e915a2693a0e9e734e6aecc5a5756a4
blob + ad894330731d63abd907b1ba722ff20d0fde152e
--- src/cmd/auth/factotum/rpc.c
+++ src/cmd/auth/factotum/rpc.c
@@ -41,7 +41,7 @@ char *rpcname[] = 
 	"start",
 	"write",
 	"readhex",
-	"writehex",
+	"writehex"
 };
 
 static int
blob - 0156e170f6859b30bf1943f5b884d2bdcb87b30c
blob + 315de0eb696487ca624f2b181672b766c538831a
--- src/cmd/auth/factotum/secstore.c
+++ 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 @@ havesecstore(void)
 	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 @@ typedef struct ConnState {
 } 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 @@ SC_secret(SConn *conn, uchar *sigma, int direction)
 		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 @@ SC_read(SConn *conn, uchar *buf, int n)
 		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 @@ getfile(SConn *conn, uchar *key, int nkey)
 	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 @@ typedef struct PAKparams{
 
 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 @@ initPAKparams(void)
 		"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 @@ longhash(char *ver, char *C, uchar *passwd, mpint *H)
 	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 @@ PAK_Hi(char *C, char *passphrase, mpint *H, mpint *Hi)
 	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 @@ shorthash(char *mess, char *C, char *S, char *m, char 
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 		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;
 	}
blob - b41048980556fe7a81615ffbf1af9b703d5757b0
blob + c9403c0bf9d8eff55c46d480a546680c673baee4
--- src/cmd/auth/factotum/test.c
+++ src/cmd/auth/factotum/test.c
@@ -41,7 +41,7 @@ Test test[] =
 	"cram",		proxyserver,		proxyclient,
 	"p9sk1",		proxyserver,		proxyclient,
 	"p9sk2",		proxyserver,		proxyclient,
-	"p9any",		proxyserver,		proxyclient,
+	"p9any",		proxyserver,		proxyclient
 };
 
 void
blob - 7a8654acb3e8f36fbf2d1152c0a10c05ccbaa1cc
blob + 9ad9a7cc691f9e1adf06743d8950885d2b832ec9
--- src/cmd/auth/secstore/SConn.c
+++ src/cmd/auth/secstore/SConn.c
@@ -13,8 +13,8 @@ typedef struct ConnState {
 } 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 @@ SC_secret(SConn *conn, uchar *sigma, int direction)
 		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 @@ SC_read(SConn *conn, uchar *buf, int n)
 		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){
blob - 9a428d833b1ac5aa6b7e8be04252bf562fc5a9fc
blob + 31765f3ecc4dff853258aec872c101453f80cdc0
--- src/cmd/auth/secstore/SConn.h
+++ 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);
blob - 56aeb00b531f69c7715634f77242d43cb3ba6740
blob + 86cb1bffb534d887593368c0efb9d06669a5d217
--- src/cmd/auth/secstore/aescbc.c
+++ src/cmd/auth/secstore/aescbc.c
@@ -100,7 +100,7 @@ main(int argc, char **argv)
 		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 @@ main(int argc, char **argv)
 				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);
blob - b4479413a8a00ba426432bf72f0ae9b5000eb8f1
blob + eaae8cdc99547c4ae0e416b1414ba5a6f3916c92
--- src/cmd/auth/secstore/dirls.c
+++ src/cmd/auth/secstore/dirls.c
@@ -74,7 +74,7 @@ dirls(char *path)
 	}
 	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);
blob - fb008e0f8e8f1baa7340129679c84974fb9489a1
blob + effc01d9f5bb985ca44a4974dfa4ce8fe13d52af
--- src/cmd/auth/secstore/pak.c
+++ 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 @@ typedef struct PAKparams{
 
 static PAKparams *pak;
 
-// from seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E
+/* from seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E */
 static void
 initPAKparams(void)
 {
@@ -43,8 +43,8 @@ initPAKparams(void)
 		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 @@ longhash(char *ver, char *C, uchar *passwd, mpint *H)
 	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 @@ PAK_Hi(char *C, char *passphrase, mpint *H, mpint *Hi)
 	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 @@ shorthash(char *mess, char *C, char *S, char *m, char 
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 	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 @@ PAKclient(SConn *conn, char *C, char *pass, char **pS)
 		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 @@ done:
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	}
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 	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 @@ PAKserver(SConn *conn, char *S, char *mess, PW **pwp)
 		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){
blob - aacadd9b184dd688aaebfe8296426a75d7893001
blob + b2a00e724f989e031bc25808ee8b767da81528e8
--- src/cmd/auth/secstore/password.c
+++ src/cmd/auth/secstore/password.c
@@ -42,7 +42,7 @@ getPW(char *id, int dead_or_alive)
 	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 @@ getPW(char *id, int dead_or_alive)
 	}
 	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 @@ getPW(char *id, int dead_or_alive)
 		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;
 }
 
blob - cb6e585e43a1d3ae46f29c9147650f368d3fd0aa
blob + 571c6fae465b346253b80ec1b54cc8157478a602
--- src/cmd/auth/secstore/secstore.c
+++ src/cmd/auth/secstore/secstore.c
@@ -142,8 +142,8 @@ getfile(SConn *conn, char *gf, uchar **buf, ulong *buf
 	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 @@ putfile(SConn *conn, char *pf, uchar *buf, ulong len, 
 		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 @@ cmd(AuthConn *c, char **gf, int *Gflag, char **pf, cha
 		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 @@ chpasswd(AuthConn *c, char *id)
 
 	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 @@ login(char *id, char *dest, int pass_stdin, int pass_n
 		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 @@ login(char *id, char *dest, int pass_stdin, int pass_n
 			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");
 	}
blob - dbd2ec9cfeec4dd3aad3a57c5fd9a602ce10168c
blob + d9cb807dc41c5e7292f961a70d0f3613334c7064
--- src/cmd/auth/secstore/secstore.h
+++ 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 *);
blob - ecf59e2fc071d4ed812a736ce1369b1176cf2e40
blob + 9a3c4b66bed1778db6227a6e4b90b290bbdc132c
--- src/cmd/auth/secstore/secstored.c
+++ 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 @@ dologin(int fd, char *S, int forceSTA)
 	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 @@ dologin(int fd, char *S, int forceSTA)
 		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 @@ dologin(int fd, char *S, int forceSTA)
 	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 @@ main(int argc, char **argv)
 
 	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 @@ main(int argc, char **argv)
 		if(p == nil)
 			usage();
 		USED(p);
-	//	setnetmtpt(net, sizeof(net), p);
+	/*	setnetmtpt(net, sizeof(net), p); */
 		break;
 	case 'v':
 		verbose++;
@@ -395,7 +395,7 @@ main(int argc, char **argv)
 			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 @@ main(int argc, char **argv)
 			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);
blob - 95adb38541c9a7a656957ae28cabd7e2ecefb149
blob + 8ef6f6aaad7202198a9ff7a8178d13a16447d1b4
--- src/cmd/auth/secstore/secureidcheck.c
+++ src/cmd/auth/secstore/secureidcheck.c
@@ -29,7 +29,7 @@ typedef struct Secret{
 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 @@ typedef struct Packet{
 	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 @@ authcmp(Secret *shared, uchar *buf, int m, uchar *auth
 	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 @@ rpc(char *dest, Secret *shared, Packet *req)
 	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 @@ rpc(char *dest, Secret *shared, Packet *req)
 	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 @@ rpc(char *dest, Secret *shared, Packet *req)
 		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 @@ rpc(char *dest, Secret *shared, Packet *req)
 	if(m <= 0)
 		return nil;
 
-	// unmarshal reply
+	/* unmarshal reply */
 	b = buf2;
 	e = buf2+m;
 	resp = (Packet*)malloc(sizeof(*resp));
@@ -192,18 +192,18 @@ rpc(char *dest, Secret *shared, Packet *req)
 	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 @@ setAttribute(Packet *p, uchar type, uchar *s, int n)
 	}
 	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 @@ secureidcheck(char *user, char *response)
 			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);
blob - 00e24af8c4c41675900a5a5b0144f429c585cb6a
blob + eee98675602017844ac3b833110d7ea271fdd64a
--- src/cmd/auth/ssh-agent.c
+++ src/cmd/auth/ssh-agent.c
@@ -49,7 +49,7 @@ enum		/* agent protocol packet types */
 	SSH2_AGENT_FAILURE = 30,
 	
 	SSH_COM_AGENT2_FAILURE = 102,
-	SSH_AGENT_OLD_SIGNATURE = 0x01,
+	SSH_AGENT_OLD_SIGNATURE = 0x01
 };
 
 typedef struct Aconn Aconn;
blob - 83d27d46669ad00950f9ce327f725e9c9c01fee5
blob + fd14a4114388a6231c35b3e2e33629596d445825
--- src/cmd/auxclog.c
+++ src/cmd/auxclog.c
@@ -56,7 +56,7 @@ main(int argc, char **argv)
 				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);
blob - 168d866c08ce750acd1c643b6ea21dab79135b76
blob + 07f3596c9193a853d416359b577a0bfe50d7ebba
--- src/cmd/auxstats/Darwin.c
+++ src/cmd/auxstats/Darwin.c
@@ -88,7 +88,7 @@ sampleinit(void)
 	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 @@ xvm(int first)
 		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
blob - 4e8e75bcd71be2d095f3b6027967f56f8b1af900
blob + 19ae96b1d7a624ccd294ca39e22deec42f0659b9
--- src/cmd/auxstats/FreeBSD.c
+++ src/cmd/auxstats/FreeBSD.c
@@ -47,7 +47,7 @@ static kvm_t *kvm;
 static struct nlist nl[] = {
 	{ "_ifnet" },
 	{ "_cp_time" },
-	{ "" },
+	{ "" }
 };
 
 void
blob - 32a473f621eb2b1266021bad6ca579a92b580739
blob + ee84dea16e29b769cd9aaca61fbdf11b4445d889
--- src/cmd/auxstats/OpenBSD.c
+++ src/cmd/auxstats/OpenBSD.c
@@ -41,7 +41,7 @@ static kvm_t *kvm;
 static struct nlist nl[] = {
 	{ "_ifnet" },
 	{ "_cp_time" },
-	{ "" },
+	{ "" }
 };
 
 void
@@ -220,4 +220,4 @@ xsysctl(int first)
 
 	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
+}
blob - c9369e62db44098ffea7d5dc645c18733f9c7f30
blob + d27e67573c513d918a120d4b5665ae44f81371b5
--- src/cmd/bzip2/lib/bzcompress.c
+++ src/cmd/bzip2/lib/bzcompress.c
@@ -423,7 +423,7 @@ int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int acti
          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;
blob - 0625122714b6979edb9e1316346014817fc892f8
blob + 96c5591838ab1593fb8a40cbbb2ce28a8462dec7
--- src/cmd/bzip2/lib/compress.c
+++ src/cmd/bzip2/lib/compress.c
@@ -268,7 +268,7 @@ void generateMTFValues ( EState* s )
          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]++;
blob - 32bd94fb23a491f2936017476ce73c153b6ccc22
blob + 9ea30f8aafe965f78d9fe8920a4c870e57ecdbf4
--- src/cmd/db/fns.h
+++ src/cmd/db/fns.h
@@ -69,9 +69,9 @@ void		redirout(char*);
 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);
blob - 7fec64378ed79c8243198477ddea255563c73786
blob + eaeb61f2b140ab241ae0af4091ec562388239efa
--- src/cmd/db/setup.c
+++ src/cmd/db/setup.c
@@ -96,8 +96,8 @@ cmdmap(Map *map)
 		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"); 
blob - daff401d89bcc7f8b152fbd4505d65a75851bb63
blob + bdcfadeed24a65c43954a53a2a94e417cf19454a
--- src/cmd/dc.c
+++ src/cmd/dc.c
@@ -2149,7 +2149,7 @@ seekc(Blk *hptr, int n)
 		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 @@ more(Blk *hptr)
 		longest = size;
 	lbytes += size/2;
 	lmore++;
-/*	free(hptr->beg);*//**/
+/*	free(hptr->beg);*/
 	p = realloc(hptr->beg, size);
 
 	if(p == 0) {
blob - 0a2cf4f300fa94a8139337107a50fb6b63119afa
blob + 9e196b118c4209c007f7062a3f86df922d8f9e19
--- src/cmd/dict/dict.c
+++ src/cmd/dict/dict.c
@@ -52,7 +52,7 @@ void	usage(void);
 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
blob - 9b843d8aee3e9cdd2091108acf3af32e9280561e
blob + bf7a80c32483bd89fd0527938a8fc937b2f66955
--- src/cmd/dict/dict.h
+++ src/cmd/dict/dict.h
@@ -62,7 +62,7 @@ enum {	NONE=0xe800,	/* Emit nothing */
 	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)
blob - d667aafdec1052c55f58361c0177838dfb7f1c23
blob + 162bbda624323b77c4f6094c8ad682b8f525490a
--- src/cmd/dict/gb2312.c
+++ src/cmd/dict/gb2312.c
@@ -1104,5 +1104,5 @@ Rune tabgb2312[GB2312MAX] = {
 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
 };
blob - d2086e6a0d2a433dd19c6e072ddcbffe64277e7b
blob + 4fb835e594e6ae4b34d27c51c23512faf9c5c8e4
--- src/cmd/dict/jis208.c
+++ src/cmd/dict/jis208.c
@@ -1055,5 +1055,5 @@ Rune tabjis208[JIS208MAX] = {
 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
 };
blob - d924a89c2526a788d04e2308272c0d3935536522
blob + 81efe829b680e7300607a9d5d13d252324958454
--- src/cmd/dict/oed.c
+++ src/cmd/dict/oed.c
@@ -5,7 +5,7 @@
 
 enum {
 	Buflen=1000,
-	Maxaux=5,
+	Maxaux=5
 };
 
 /* Possible tags */
@@ -185,7 +185,7 @@ static Assoc tagtab[] = {
 	{"xi",		Xi},
 	{"xid",		Xid},
 	{"xr",		Xr},
-	{"xs",		Xs},
+	{"xs",		Xs}
 };
 
 /* Possible tag auxilliary info */
@@ -800,7 +800,7 @@ static Assoc spectab[] = {
 	{"zced",	0x7a},		/* +cedilla */
 	{"zeta",	0x3b6},
 	{"zh",		0x292},
-	{"zhacek",	0x17e},
+	{"zhacek",	0x17e}
 };
 /*
    The following special characters don't have close enough
@@ -816,7 +816,7 @@ static Assoc spectab[] = {
 	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 @@ static Rune normtab[128] = {
 /*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 @@ static Rune phtab[128] = {
 /*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 @@ static Rune grtab[128] = {
 /*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 @@ static Rune subtab[128] = {
 /*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 @@ static Rune suptab[128] = {
 /*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 @@ oednextoff(long fromoff)
 	return (Boffset(bdict)-n);
 }
 
-static char *prkey =
+static char *prkey1 =
 "KEY TO THE PRONUNCIATION\n"
 "\n"
 "I. CONSONANTS\n"
@@ -1252,6 +1252,8 @@ static char *prkey =
 "ʃ  ...  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 @@ static char *prkey =
 "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 @@ static char *prkey =
 "ɔ  ...  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 @@ static char *prkey =
 "øː ...  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 @@ static char *prkey =
 "ʊə ...  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 @@ static char *prkey =
 void
 oedprintkey(void)
 {
-	Bprint(bout, "%s", prkey);
+	Bprint(bout, "%s%s%s%s%s%s",
+		prkey1, prkey2, prkey3, prkey4, prkey5, prkey6);
 }
 
 /*
blob - 0abe649cd867eec2d3b9f9973b4d834f6f8d6037
blob + e4d4497835856e852a9c05c07e7b991ea4fb0d93
--- src/cmd/dict/pcollins.c
+++ 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 @@ enum {
 	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 @@ static Assoc tagtab[] = {
 	{"um",		LUML},
 	{"{",		Ps},
 	{"~",		0x7e},
-	{"~~",		MTT},
+	{"~~",		MTT}
 };
 
 static Rune normtab[128] = {
@@ -73,7 +73,7 @@ static Rune normtab[128] = {
 /*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 *);
blob - bca5c4022835864d1bd9ba1c9834ac90c3552278
blob + cbdff9e6ad6dc261a198a68e0822d121cd727740
--- src/cmd/dict/pcollinsg.c
+++ 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 @@ static Rune intab[256] = {
 /*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 @@ static Nassoc overtab[] = {
 	{0x3a,	LUML},
 	{'\\',	LGRV},
 	{0x5e,	LFRN},
-	{0x7e,	LTIL},
+	{0x7e,	LTIL}
 };
 
 static uchar *reach(uchar*, int);
blob - e3cb937407eada1cdf2e0b82db1e8d15c376aa67
blob + 8cdaec35e5022ec568218d546f9c3ddb1c1b5ed9
--- src/cmd/dict/pgw.c
+++ src/cmd/dict/pgw.c
@@ -6,7 +6,7 @@
 
 enum {
 	Buflen=1000,
-	Maxaux=5,
+	Maxaux=5
 };
 
 /* Possible tags */
@@ -42,7 +42,7 @@ static Assoc tagtab[] = {
 	{"pos",		Pos},
 	{"sn",		Sn},
 	{"u",			U},
-	{"wf",		Wf},
+	{"wf",		Wf}
 };
 
 /* Possible tag auxilliary info */
@@ -659,7 +659,7 @@ static Assoc spectab[] = {
 	{"zced",	0x7a},		/* +cedilla */
 	{"zeta",	0x3b6},
 	{"zh",		0x292},
-	{"zhacek",	0x17e},
+	{"zhacek",	0x17e}
 };
 /*
    The following special characters don't have close enough
@@ -766,7 +766,7 @@ static Rune normtab[128] = {
 /*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 @@ static Rune phtab[128] = {
 /*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 @@ static Rune grtab[128] = {
 /*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 @@ static Rune subtab[128] = {
 /*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 @@ static Rune suptab[128] = {
 /*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 @@ pgwnextoff(long fromoff)
 	return (Boffset(bdict)-n);
 }
 
-static char *prkey =
+static char *prkey1 =
 "KEY TO THE PRONUNCIATION\n"
 "\n"
 "I. CONSONANTS\n"
@@ -1024,6 +1024,8 @@ static char *prkey =
 "ʃ  ...  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 @@ static char *prkey =
 "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 @@ static char *prkey =
 "ɔ  ...  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 @@ static char *prkey =
 "øː ...  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 @@ static char *prkey =
 "ʊə ...  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 @@ static char *prkey =
 void
 pgwprintkey(void)
 {
-	Bprint(bout, "%s", prkey);
+	Bprint(bout, "%s%s%s%s%s%s",
+		prkey1, prkey2, prkey3, prkey4, prkey5, prkey6);
 }
 
 /*
blob - eee400230c29d1cefb8db486c20e13acda69fdde
blob + 877c3b130f53446c1019175f7881769228e4091c
--- src/cmd/dict/robert.c
+++ src/cmd/dict/robert.c
@@ -55,7 +55,7 @@ static Rune intab[256] = {
 /*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];
blob - bd32b9762f3f4bfcbd3169ec4f4fd51e60bf5f28
blob + 400019bcd977df3f3dfad8de72e1bfe56a15de99
--- src/cmd/dict/slang.c
+++ src/cmd/dict/slang.c
@@ -15,7 +15,7 @@ enum {
 	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 @@ static Assoc tagtab[] = {
 	{"pr",	PR},
 	{"ps",	PS},
 	{"xr",	XR},
-	{"xx",	XX},
+	{"xx",	XX}
 };
 static long	sget(char *, char *, char **, char **);
 static void	soutpiece(char *, char *);
blob - ef03f668a0d45bdf1c7065a69d6d9e97a1880675
blob + d7033d37fc6a73705332ed64c906dbfcb8b51c14
--- src/cmd/dict/utils.c
+++ src/cmd/dict/utils.c
@@ -228,7 +228,7 @@ Rune multitab[Nmulti][5] = {
 	{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 @@ static Rune latin_fold_tab[] =
 	'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];
blob - 7ee79a4e80628a397b29355c52bd5aa5e13486ed
blob + 6ead3ed6d14c4057c98b887ddcbc22235670f4e5
--- src/cmd/dict/world.c
+++ src/cmd/dict/world.c
@@ -56,10 +56,10 @@ static Rune chartab[] = {
 /*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)
blob - f522ec716be51b16f7853669478f9e7fbe47551d
blob + 93de4e378ae67e829bdea3a54dcff18b91420a55
--- src/cmd/diff/diffio.c
+++ src/cmd/diff/diffio.c
@@ -325,7 +325,7 @@ change(int a, int b, int c, int d)
 
 enum
 {
-	Lines = 3,	/* number of lines of context shown */
+	Lines = 3		/* number of lines of context shown */
 };
 
 int
blob - 9a29cf614d7c3f3871765e27f97b53cb86cb1a50
blob + bb3fd11241b4607b8a973dac94b8fc3c88e8a780
--- src/cmd/diff/diffreg.c
+++ src/cmd/diff/diffreg.c
@@ -379,7 +379,7 @@ diffreg(char *f, char *t)
 		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);
blob - e397a312c30484bfc961d379c5a0b32574fe6c56
blob + e0710d655252b53dbc1997969ac7ddb91bac23ae
--- src/cmd/draw/crop.c
+++ src/cmd/draw/crop.c
@@ -9,7 +9,7 @@ enum
 	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 */
 };
 
blob - d935910e381c9832b8998bf2bdded6a237de7354
blob + 68b6ad433837120f0f2098689a48b9fca3d6197c
--- src/cmd/draw/gview.c
+++ 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 @@ double out_length(const fpoint* p0, const fpoint* pn, 
 #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 @@ void usage(void)
 "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"
blob - a04a1c5f0a985a7f61d3953c1a203d79cf7d645a
blob + 75069e2b02650904c152837e9d53cb52a7b95821
--- src/cmd/draw/stats.c
+++ src/cmd/draw/stats.c
@@ -23,7 +23,7 @@ enum
 	Lx		= 4,	/* label tick length */
 
 	STACK	= 8192,
-	XSTACK	= 32768,
+	XSTACK	= 32768
 };
 
 enum
@@ -45,7 +45,7 @@ enum
 	Vsys,
 	Vsyscall,
 	Vuser,
-	Nvalue,
+	Nvalue
 };
 
 char*
@@ -67,7 +67,7 @@ labels[Nvalue] = 
 	"swap",
 	"sys",
 	"syscall",
-	"user",
+	"user"
 };	
 
 struct Graph
@@ -527,7 +527,7 @@ resize(void)
 	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);
blob - 8ce9002302477c091dffb7cf6810da395b902ddf
blob + 150dbeb8c6704e75fd38be9ad4b3c16372181834
--- src/cmd/draw/tcolors.c
+++ src/cmd/draw/tcolors.c
@@ -7,7 +7,7 @@
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 int nbit, npix;
blob - 6f20a4fb3832e087538e29832ae895a8fb3b9e50
blob + 1ee5d14cbbb97c5c24d4acb02893752b1c1583f8
--- src/cmd/draw/tweak.c
+++ src/cmd/draw/tweak.c
@@ -30,7 +30,7 @@ enum
 	Up		= 1,
 	Down	= 0,
 	Mag		= 4,
-	Maxmag	= 10,
+	Maxmag	= 10
 };
 
 enum
@@ -49,12 +49,12 @@ enum
 	Mchar,
 	Mpixels,
 	Mclose,
-	Mexit,
+	Mexit
 };
 
 enum
 {
-	Blue	= 54,
+	Blue	= 54
 };
 
 char	*menu3str[] = {
@@ -66,7 +66,7 @@ char	*menu3str[] = {
 	"pixels",
 	"close",
 	"exit",
-	0,
+	0
 };
 
 Menu	menu3 = {
blob - 60ba83ca4e8dcfa90e35472796a96e8da28bc76f
blob + f8ae9f05ff32559ad20e354e5114247701ef4ec6
--- src/cmd/ed.c
+++ src/cmd/ed.c
@@ -18,7 +18,7 @@ enum
 	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);
blob - 3fa133a5301d994759b9fa0939e716c9b2ec0bfb
blob + a24a391ad60b86091ff3b14d57a243f59643fad1
--- src/cmd/faces/facedb.c
+++ src/cmd/faces/facedb.c
@@ -9,7 +9,7 @@
 
 enum	/* number of deleted faces to cache */
 {
-	Nsave	= 20,
+	Nsave	= 20
 };
 
 static Facefile	*facefiles;
blob - 0a4661c1f4e578b2c6a8e4cdaa59c70233f14774
blob + f6348f967b383d090abddacc4f68a1395432711c
--- src/cmd/faces/faces.h
+++ src/cmd/faces/faces.h
@@ -9,7 +9,7 @@ enum	/* face strings */
 
 enum
 {
-	Facesize = 48,
+	Facesize = 48
 };
 
 typedef struct Face		Face;
blob - 18eb70b40ef9adea1e1490cbccb2278fe3877ec9
blob + bb36ed7cef322964ac1c0afa71314f7f97db2ac2
--- src/cmd/faces/main.c
+++ src/cmd/faces/main.c
@@ -36,7 +36,7 @@ char *procnames[] = {
 	"main",
 	"time",
 	"mouse",
-	"resize",
+	"resize"
 };
 
 Rectangle leftright = {0, 0, 20, 15};
blob - 4dbf66be0a5a5e7d85eb5a38379352597bf2e79f
blob + f325871931e978d04657bf98d5b78b6db44d8136
--- src/cmd/file.c
+++ src/cmd/file.c
@@ -541,7 +541,7 @@ filemagic(Filemagic *tab, int ntab, ulong x)
 int
 long0(void)
 {
-//	Fhdr *f;
+/*	Fhdr *f; */
 	long x;
 
 	seek(fd, 0, 0);		/* reposition to start of file */
blob - dfc1e8cf372b6efee73716e232160971b3e87c53
blob + 19b3fa9a2162bcc487acc0f447e1949e63b5b231
--- src/cmd/freq.c
+++ src/cmd/freq.c
@@ -13,7 +13,7 @@ enum
 	Fhex	= 1<<1,
 	Foct	= 1<<2,
 	Fchar	= 1<<3,
-	Frune	= 1<<4,
+	Frune	= 1<<4
 };
 
 void
blob - 6d96b2f18e51d075edfc856ed2e3f82458a660a5
blob + cb75a721f1ccd8dc5dcc55dc2550806a308bed71
--- src/cmd/grap/grap.y
+++ 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);
blob - 07f4ecad06e8bcf862b6cff64494a7f2a901d6d6
blob + db2098f54773a7160c04ca51847403daec689677
--- src/cmd/grap/main.c
+++ src/cmd/grap/main.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE 1	/* strdup, mkstemp */
 #include <stdio.h>
 #include <signal.h>
 #include <math.h>
blob - 030e7e3ffcad2babb4fbfd6aae5c6aa47de3f711
blob + c3e1549a6e068bbc733ed520a599f304101797c1
--- src/cmd/grep/comp.c
+++ src/cmd/grep/comp.c
@@ -128,12 +128,12 @@ loop:
 Rune	tab1[] =
 {
 	0x007f,
-	0x07ff,
+	0x07ff
 };
 Rune	tab2[] =
 {
 	0x003f,
-	0x0fff,
+	0x0fff
 };
 
 Re2
@@ -144,7 +144,7 @@ rclass(Rune p0, Rune p1)
 	Re2 x;
 
 	if(p0 > p1)
-		return re2char(0xff, 0xff);	// no match
+		return re2char(0xff, 0xff);	/* no match */
 
 	/*
 	 * bust range into same length
blob - e32f89a50fe1f22db744ca98efedf1cb8e0bb170
blob + f5ab7ff4ce29c3e6e40af8e4159fc6cb83e8c6ce
--- src/cmd/grep/main.c
+++ src/cmd/grep/main.c
@@ -170,11 +170,11 @@ loop:
 		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') {
blob - f504b6df9c060daf0d841a685660ab7cb32bcdbe
blob + 5ea07c09517ce41c93442bd600735f9259a3afe8
--- src/cmd/grep/sub.c
+++ src/cmd/grep/sub.c
@@ -30,7 +30,7 @@ sal(int n)
 	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;
blob - 1713a26c3328d24cd886ed3fbc32c368ad23d45a
blob + 146de4815012b797a7deee8f93879238d0366b91
--- src/cmd/gzip/gzip.h
+++ src/cmd/gzip/gzip.h
@@ -37,5 +37,5 @@ enum
 #define GZCRCPOLY 0xedb88320
 /* 	GZCRCPOLY	= 0xedb88320UL, */
 
-	GZOSINFERNO	= GZOSUNIX,
+	GZOSINFERNO	= GZOSUNIX
 };
blob - 63903ece8c1b630988167bb49c1824c90e9eab25
blob + bd87d2ec688c4246656fd4718c52511ace039231
--- src/cmd/gzip/zip.c
+++ src/cmd/gzip/zip.c
@@ -6,7 +6,7 @@
 
 enum
 {
-	HeadAlloc	= 64,
+	HeadAlloc	= 64
 };
 
 static	void	zip(Biobuf *bout, char *file, int stdout);
blob - d005469f7eb4c8134fa84d253facdb6824ae82b6
blob + 344498032b031a0a4c876ac7a11afb16f09f9bed
--- src/cmd/gzip/zip.h
+++ src/cmd/gzip/zip.h
@@ -58,7 +58,7 @@ enum
 	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
 };
 
 /*
blob - 66fb60dabd0c68ea47ee0952e2f7a7328f09c7be
blob + d78bb52252038b71194d25043240f4c3b3308e13
--- src/cmd/hget.c
+++ src/cmd/hget.c
@@ -51,7 +51,7 @@ enum
 	Eof = 0,
 	Error = -1,
 	Server = -2,
-	Changed = -3,
+	Changed = -3
 };
 
 int debug;
@@ -106,7 +106,7 @@ threadmain(int argc, char **argv)
 	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 @@ enum
 	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*, ...);
blob - e07453253cb5c5cc60d589c48463aa0378b79652
blob + 27270671dc35a2e641e40c4b34574dda4e97fb00
--- src/cmd/hoc/init.c
+++ src/cmd/hoc/init.c
@@ -16,7 +16,7 @@ static struct {		/* Keywords */
 	"for",		FOR,
 	"print",	PRINT,
 	"read",		READ,
-	0,		0,
+	0,		0
 };
 
 static struct {		/* Constants */
blob - 53db700cb927c955359906d486645e86862b4f41
blob + eb9d6fa03c8e6dcaad03d237d1591fb370cb86b2
--- src/cmd/htmlfmt/dat.h
+++ src/cmd/htmlfmt/dat.h
@@ -4,7 +4,7 @@ typedef struct URLwin URLwin;
 enum
 {
 	STACK		= 8192,
-	EVENTSIZE	= 256,
+	EVENTSIZE	= 256
 };
 
 struct Bytes
blob - 7589e3e15b23ce2c9e370f57e68ee830ce4ae5d0
blob + 9fb008133c9b504136a8b85f4b3b25aa615f1383
--- src/cmd/htmlfmt/html.c
+++ src/cmd/htmlfmt/html.c
@@ -314,7 +314,7 @@ rendertext(URLwin *u, Bytes *b)
 
 	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);
 }
blob - c17da850c6552993a6429feada4870782574a4fd
blob + 173fdc9611421aa70cdd8b74ee650148d446f9fb
--- src/cmd/htmlroff/a.h
+++ src/cmd/htmlroff/a.h
@@ -30,7 +30,7 @@ enum
 	ArgMode = 1<<3,
 	HtmlMode = 1<<4,
 	
-	MaxLine = 1024,
+	MaxLine = 1024
 };
 
 Rune*	L(char*);
blob - 1c7d1237b4145775170a8716ad6b21866ad0b57a
blob + e67975165a411d8a272675f9749270ce5dc74935
--- src/cmd/htmlroff/char.c
+++ src/cmd/htmlroff/char.c
@@ -70,7 +70,7 @@ static Trtab trinit[] =
 	"em",	0x2014,
 	"en",	0x2013,
 	"mi",	Umi,
-	"fm",	0x2032,
+	"fm",	0x2032
 };
 
 Rune
blob - 6a7cd09e4c64b81d7079e2c8cb738177233c638e
blob + bdc51a3e18445698250613de211cc1e9022b92b7
--- src/cmd/htmlroff/roff.c
+++ src/cmd/htmlroff/roff.c
@@ -7,7 +7,7 @@ enum
 	MAXESC = 60,
 	MAXLINE = 1024,
 	MAXIF = 20,
-	MAXARG = 10,
+	MAXARG = 10
 };
 
 typedef struct Esc Esc;
blob - 2800ec7655c78a681a1fd87d819b947046a68c68
blob + bbd095d54250a8ea9b63c1c4f5c88b00ba7929b9
--- src/cmd/htmlroff/t17.c
+++ src/cmd/htmlroff/t17.c
@@ -47,7 +47,7 @@ Env defenv =
 	12,
 	0,
 	0,
-	0,
+	0
 };
 
 Env env[3];
blob - eadc76edfd832889ab6f0ded5ff8154e3e17767c
blob + 157169de6a0b8eaf7bb651f33a168152b9aa7036
--- src/cmd/htmlroff/t4.c
+++ src/cmd/htmlroff/t4.c
@@ -49,7 +49,7 @@ r_fi(int argc, Rune **argv)
 	USED(argc);
 	USED(argv);
 	nr(L(".fi"), 1);
-// warn(".fi");
+/* warn(".fi"); */
 }
 
 /* no-fill mode */
blob - 19b77ec1f9c3f5ac6bc7d140b1c2f83aa3a2cfe7
blob + 9936a44c88f12bff85bf84ee65fa5985be3818ad
--- src/cmd/htmlroff/t7.c
+++ src/cmd/htmlroff/t7.c
@@ -375,7 +375,7 @@ r_di(int argc, Rune **argv)
 	if(argc == 1){
 		/* end diversion */
 		if(ndi <= 0){
-			// warn("unmatched %C%S", dot, argv[0]);
+			/* warn("unmatched %C%S", dot, argv[0]); */
 			return;
 		}
 		flushdi();
blob - 428cf90f397f529455c3e6a4be72b4634c156239
blob + 88ee7c1649fb213976cbfbc34351f819074d9a0c
--- src/cmd/import.c
+++ src/cmd/import.c
@@ -26,7 +26,7 @@ char *prog = "import";
 
 enum
 {
-	Stack= 32*1024,
+	Stack= 32*1024
 };
 
 void
@@ -68,13 +68,13 @@ threadmain(int argc, char *argv[])
 	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 @@ threadmain(int argc, char *argv[])
 		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 @@ runproc(void *arg)
 {
 	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 @@ call(char *rsys, char *ns, char *srv)
 	}
 	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 @@ shuffle(void *arg)
 				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
blob - 8b5179589b5403402a2d94d0e79d5bc0d1381866
blob + 0ca5084fecf65f2aded876fa94f6e20779f31dd7
--- src/cmd/ip/dhcp.h
+++ src/cmd/ip/dhcp.h
@@ -126,7 +126,7 @@ enum {
 	Srequesting,
 	Sbound,
 	Srenewing,
-	Srebinding,
+	Srebinding
 };	
 
 typedef struct Bootp	Bootp;
blob - 28604c1b9ea76d96b53580f8d7ace6b235ea6474
blob + aa64deebd6a1cfd1748e5a4c4666e331686e6670
--- src/cmd/ip/dhcpd/dat.h
+++ src/cmd/ip/dhcpd/dat.h
@@ -2,7 +2,7 @@
 
 enum
 {
-	Maxstr=	256,
+	Maxstr=	256
 };
 
 typedef struct Binding Binding;
blob - 3b0873c2f89c0134a29df04df981d5137517ea45
blob + ae4bd22332917e6207286d93900397b16b0eb023
--- src/cmd/ip/dhcpd/dhcpd.c
+++ 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 @@ int	slow;
 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 @@ char *optname[256] =
 [ODvendorclass]		"vendorclass",
 [ODclientid]		"cid",
 [ODtftpserver]		"tftpserver",
-[ODbootfile]		"bf",
+[ODbootfile]		"bf"
 };
 
 void	addropt(Req*, int, uchar*);
@@ -1131,8 +1131,8 @@ miscoptions(Req *rp, uchar *ip)
 		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 @@ miscoptions(Req *rp, uchar *ip)
 			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 @@ miscoptions(Req *rp, uchar *ip)
 		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 @@ char *dhcpmsgname[] =
 	[Ack]		"Ack",
 	[Nak]		"Nak",
 	[Release]	"Release",
-	[Inform]	"Inform",
+	[Inform]	"Inform"
 };
 
 void
blob - 7fa7a4243cd59f9d3f90e0954a966afd987e481b
blob + 666bcc410b56dc41418d9e55f0aeb445d1c2d5ad
--- src/cmd/ip/dhcpd/ping.c
+++ src/cmd/ip/dhcpd/ping.c
@@ -37,7 +37,7 @@ enum
 	InfoReply	= 16,
 
 	ICMP_IPSIZE	= 20,
-	ICMP_HDRSIZE	= 8,
+	ICMP_HDRSIZE	= 8
 };
 
 static void
blob - 061a6d9d95fd18ee712585139d0b15f874fb4742
blob + d317c1bbbd2358ba6ee8b8b6df4a808e58403320
--- src/cmd/ip/snoopy/arp.c
+++ src/cmd/ip/snoopy/arp.c
@@ -20,7 +20,7 @@ struct Hdr
 
 enum
 {
-	ARPLEN=	28,
+	ARPLEN=	28
 };
 
 enum
@@ -31,7 +31,7 @@ enum
 	Osha,
 	Otha,
 	Ostha,
-	Opa,
+	Opa
 };
 
 static Field p_fields[] = 
@@ -114,7 +114,7 @@ Proto arp =
 	nil,
 	nil,
 	p_fields,
-	defaultframer,
+	defaultframer
 };
 
 Proto rarp =
@@ -126,5 +126,5 @@ Proto rarp =
 	nil,
 	nil,
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - 31b2b0e0b799a625842551b94129eb9f70b2a0fc
blob + e7ead8637e99bbc2389eda7c3a115e7c39f001b9
--- src/cmd/ip/snoopy/bootp.c
+++ src/cmd/ip/snoopy/bootp.c
@@ -24,7 +24,7 @@ enum
 	Bootreply= 	2,
 
 	/* bootp flags */
-	Fbroadcast=	1<<15,
+	Fbroadcast=	1<<15
 };
 
 typedef struct Hdr	Hdr;
@@ -52,7 +52,7 @@ enum
 {
 	Oca,
 	Osa,
-	Ot,
+	Ot
 };
 
 static Field p_fields[] = 
@@ -173,5 +173,5 @@ Proto bootp =
 	p_mux,
 	"%#.8lux",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - 2d041f8b3060d71ed7cf485cea1ee9185b48a220
blob + cd976ec0b899f6a113f722ab59e33442b609d5ee
--- src/cmd/ip/snoopy/dhcp.c
+++ src/cmd/ip/snoopy/dhcp.c
@@ -99,8 +99,8 @@ enum
 	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 @@ static char *dhcptype[256] =
 [Ack]		"Ack",
 [Nak]		"Nak",
 [Release]	"Release",
-[Inform]	"Inform",
+[Inform]	"Inform"
 };
 
 
@@ -471,6 +471,6 @@ Proto dhcp =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
blob - 227ac641eda9e5655019166271b69fd7eaf1f4b0
blob + ec2a3ce7cab4fdb33d0fd7ea299306e3c5db4673
--- src/cmd/ip/snoopy/dump.c
+++ src/cmd/ip/snoopy/dump.c
@@ -75,5 +75,5 @@ Proto dump =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - 7e1f0a7f476b4075317865894e2844b098e92af8
blob + 9e16579ad7cccb341427b978b858bf581f8a8ae6
--- src/cmd/ip/snoopy/ether.c
+++ src/cmd/ip/snoopy/ether.c
@@ -29,10 +29,10 @@ static Mux p_mux[] =
 
 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[] = 
blob - 908d1553e32b49be3e04f77bf3008b8d5618363b
blob + 6808293b74919434a787c15c651b52010a42c430
--- src/cmd/ip/snoopy/gre.c
+++ src/cmd/ip/snoopy/gre.c
@@ -8,7 +8,7 @@ enum {
 	GRE_srcrt	= (1<<11),
 	GRE_recur	= (7<<8),
 	GRE_ack		= (1<<7),
-	GRE_ver		= 0x7,
+	GRE_ver		= 0x7
 };
 
 /* GRE protocols */
@@ -25,7 +25,7 @@ enum {
 	GRE_vinesecho	= 0x0bae,
 	GRE_vinesloop	= 0x0baf,
 	GRE_decnetIV	= 0x6003,
-	GRE_ppp		= 0x880b,
+	GRE_ppp		= 0x880b
 };
 
 int
blob - fdf2aaac89879464607d472f3499acb6db39c1bc
blob + e7bf37390c62f0e4f83fb75baed197a0640ecf79
--- src/cmd/ip/snoopy/hdlc.c
+++ src/cmd/ip/snoopy/hdlc.c
@@ -12,7 +12,7 @@ enum {
 	PPP_addr=	0xff,
 	PPP_ctl=	0x3,
 	PPP_initfcs=	0xffff,
-	PPP_goodfcs=	0xf0b8,
+	PPP_goodfcs=	0xf0b8
 };
 
 /*
@@ -171,5 +171,5 @@ Proto hdlc =
 	p_mux,
 	"%#.4lux",
 	nil,
-	p_framer,
+	p_framer
 };
blob - 274c955ee22a874e9c82e26d8244bbd1acfea98b
blob + bf09f8d85091bb9e8d023fa29be6f5e8cf21587f
--- src/cmd/ip/snoopy/icmp.c
+++ src/cmd/ip/snoopy/icmp.c
@@ -14,7 +14,7 @@ struct Hdr
 
 enum
 {
-	ICMPLEN=	4,
+	ICMPLEN=	4
 };
 
 enum
@@ -41,7 +41,7 @@ enum
 	TSreq=		13,
 	TSrep=		14,
 	InfoReq=	15,
-	InfoRep=	16,
+	InfoRep=	16
 };
 
 static Mux p_mux[] =
@@ -51,7 +51,7 @@ static Mux p_mux[] =
 	{"ip",	Redirect, },
 	{"ip",	TimeExceed, },
 	{"ip",	ParamProb, },
-	{0},
+	{0}
 };
 
 char *icmpmsg[236] =
@@ -66,7 +66,7 @@ char *icmpmsg[236] =
 [TSreq]		"TSreq",
 [TSrep]		"TSrep",
 [InfoReq]	"InfoReq",
-[InfoRep]	"InfoRep",
+[InfoRep]	"InfoRep"
 };
 
 static void
@@ -193,5 +193,5 @@ Proto icmp =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - ad33610ff5d29b9b897909f1e8e29586944ffa02
blob + 9ba74939807545cb77da053aa035791692a2091c
--- src/cmd/ip/snoopy/icmp6.c
+++ src/cmd/ip/snoopy/icmp6.c
@@ -14,7 +14,7 @@ struct Hdr
 
 enum
 {
-	ICMP6LEN=	4,
+	ICMP6LEN=	4
 };
 
 enum
@@ -30,7 +30,7 @@ static Field p_fields[] = 
 
 enum
 {	
-	// ICMPv6 types
+	/* ICMPv6 types */
 	EchoReply	= 0,
 	UnreachableV6	= 1,
 	PacketTooBigV6	= 2,
@@ -54,7 +54,7 @@ enum
 	NbrAdvert	= 136,
 	RedirectV6	= 137,
 
-	Maxtype6	= 137,
+	Maxtype6	= 137
 };
 
 static Mux p_mux[] =
@@ -62,7 +62,7 @@ static Mux p_mux[] =
 	{"ip6",	UnreachableV6, },
 	{"ip6",	RedirectV6, },
 	{"ip6",	TimeExceedV6, },
-	{0},
+	{0}
 };
 
 char *icmpmsg6[256] =
@@ -87,7 +87,7 @@ char *icmpmsg6[256] =
 [RouterAdvert]		"RouterAdvert",
 [NbrSolicit]		"NbrSolicit",
 [NbrAdvert]		"NbrAdvert",
-[RedirectV6]		"RedirectV6",
+[RedirectV6]		"RedirectV6"
 };
 
 static char *unreachcode[] =
@@ -97,14 +97,14 @@ static char *unreachcode[] =
 [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 @@ static char *parpcode[] =
 [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 @@ enum 
 	tll	= 2,
 	pref	= 3,
 	redir	= 4,
-	mtu	= 5,
+	mtu	= 5
 };
 
 static char *icmp6opts[256] = 
@@ -130,7 +130,7 @@ static char *icmp6opts[256] = 
 [2]	"tll_addr",
 [3]	"pref_opt",
 [4]	"redirect",
-[5]	"mtu_opt",
+[5]	"mtu_opt"
 };
 
 static void
@@ -278,7 +278,7 @@ p_seprint(Msg *m)
 	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 @@ Proto icmp6 =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - 46bd281125513313b38287180f46950cd3093e1b
blob + a4ff60eb79d46f4de173884df5ed36c3c21b9251
--- src/cmd/ip/snoopy/il.c
+++ src/cmd/ip/snoopy/il.c
@@ -19,14 +19,14 @@ struct Hdr
 
 enum
 {
-	ILLEN= 18,
+	ILLEN= 18
 };
 
 enum
 {
 	Os,
 	Od,
-	Osd,
+	Osd
 };
 
 static Field p_fields[] = 
@@ -45,7 +45,7 @@ static Mux p_mux[] =
 	{"ninep",	17005, },	/* ocpu */
 	{"ninep",	17010, },	/* ncpu */
 	{"ninep",	17013, },	/* cpu */
-	{0},
+	{0}
 };
 
 static void
@@ -143,5 +143,5 @@ Proto il =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - fe836ebafc7e6277f3f94a088fdffcbe2f1e722e
blob + 234ca85ff6cc83406378de8049e328f457fedfcd
--- src/cmd/ip/snoopy/ip.c
+++ src/cmd/ip/snoopy/ip.c
@@ -129,10 +129,10 @@ static Mux p_mux[] =
 
 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 @@ Proto ip =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - eea4ba0de749d78231f5ba1c96069c723a023fe3
blob + 7187cda771661ed9f9f34e4787ea4e12c9bdf441
--- src/cmd/ip/snoopy/ip6.c
+++ src/cmd/ip/snoopy/ip6.c
@@ -23,7 +23,7 @@ enum
 	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 @@ static Mux p_mux[] =
 
 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 @@ Proto ip6 =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - cf43e5c00b7d6d92d1d91a94417fe3457985f42d
blob + f7bf0b1a317fef2c3707a83f211cf8893360642f
--- src/cmd/ip/snoopy/main.c
+++ src/cmd/ip/snoopy/main.c
@@ -20,7 +20,7 @@ char *prom = "promiscuous";
 enum
 {
 	Pktlen=	64*1024,
-	Blen=	16*1024,
+	Blen=	16*1024
 };
 
 Filter *filter;
blob - a3e40d345bc8cd473585d0ad0bcf0c255768d12e
blob + eb3eab3906e5ed3f335084167abefdc483ce486c
--- src/cmd/ip/snoopy/ninep.c
+++ src/cmd/ip/snoopy/ninep.c
@@ -38,5 +38,5 @@ Proto ninep =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - 10da17cd4dca61f4a6b9fe21660035d302c22a33
blob + bb4cd893b4dde6b07be03ff7db1bae0ee080c58e
--- src/cmd/ip/snoopy/ospf.c
+++ src/cmd/ip/snoopy/ospf.c
@@ -30,7 +30,7 @@ enum
 	OSPFdd=		2,
 	OSPFlsrequest=	3,
 	OSPFlsupdate=	4,
-	OSPFlsack=	5,
+	OSPFlsack=	5
 };
 
 
@@ -39,7 +39,7 @@ char *ospftype[] = {
 	[OSPFdd]	"data definition",
 	[OSPFlsrequest]	"link state request",
 	[OSPFlsupdate]	"link state update",
-	[OSPFlsack]	"link state ack",
+	[OSPFlsack]	"link state ack"
 };
 
 char*
@@ -115,7 +115,7 @@ char *lsatype[] = {
 	[LSANetwork]	"Network LSA",
 	[LSASummN]	"Summary LSA (Network)",
 	[LSASummR]	"Summary LSA (Router)",
-	[LSAASext]	"LSA AS external",
+	[LSAASext]	"LSA AS external"
 };
 
 char*
@@ -386,5 +386,5 @@ Proto ospf =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - 3c36e4371cb5772ddfda34b195737d2871ed36d5
blob + 9319cdaec7a5ab795a386dcb08c18fc287cafe00
--- src/cmd/ip/snoopy/ppp.c
+++ src/cmd/ip/snoopy/ppp.c
@@ -90,7 +90,7 @@ enum
 	Oipdns=		129,
 	Oipwins=	130,
 	Oipdns2=	131,
-	Oipwins2=	132,
+	Oipwins2=	132
 };
 
 char *
@@ -110,7 +110,7 @@ lcpcode[] = {
 	"id",
 	"timeremain",
 	"resetreq",
-	"resetack",
+	"resetack"
 };
 
 static Mux p_mux[] =
@@ -126,12 +126,12 @@ static Mux p_mux[] =
 	{"ppp_lcp",	PPP_lcp, },
 	{"ppp_lqm",	PPP_lqm, },
 	{"ppp_chap",	PPP_chap, },
-	{0},
+	{0}
 };
 
 enum
 {
-	OOproto,
+	OOproto
 };
 
 static void
@@ -571,7 +571,7 @@ Proto ppp =
 	p_mux,
 	"%#.4lux",
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_ipcp =
@@ -583,7 +583,7 @@ Proto ppp_ipcp =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_lcp =
@@ -595,7 +595,7 @@ Proto ppp_lcp =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_ccp =
@@ -607,7 +607,7 @@ Proto ppp_ccp =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_chap =
@@ -619,7 +619,7 @@ Proto ppp_chap =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
 
 Proto ppp_comp =
@@ -631,5 +631,5 @@ Proto ppp_comp =
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - c8a5aebac8eeb505ea611d45a91ea6e7b48fbd28
blob + 058f059df039a023c0caa25c34bd6ca640a6f2d9
--- src/cmd/ip/snoopy/pppoe_disc.c
+++ src/cmd/ip/snoopy/pppoe_disc.c
@@ -27,7 +27,7 @@ enum
 	Overs,
 	Otype,
 	Ocode,
-	Osess,
+	Osess
 };
 
 static Field p_fields[] = 
@@ -42,7 +42,7 @@ static Field p_fields[] = 
 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 @@ p_compilesess(Filter *f)
 static void
 p_compiledisc(Filter *f)
 {
-//	Mux *m;
+/*	Mux *m; */
 
 	if(f->op == '='){
 		compile_cmp(pppoe_disc.name, f, p_fields);
blob - 4cf78e27d90e6ccf7162d19aa2dab1d311d90d27
blob + 4503f7f0ce041dada115d5e7d4195eef88eae90d
--- src/cmd/ip/snoopy/protos.c
+++ src/cmd/ip/snoopy/protos.c
@@ -29,5 +29,5 @@ Proto *protos[] =
 	&ppp_ipcp,
 	&pppoe_sess,
 	&pppoe_disc,
-	0,
+	0
 };
blob - 939f78db14f04843f9d8bdb94413ce1d00309126
blob + 29745d658bdf44f7756b8b99a1626b3e8778cb33
--- src/cmd/ip/snoopy/rtcp.c
+++ 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 @@ Proto rtcp = {
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - e9160711743188bc0cf4a0e7d9ae4ec380f84a68
blob + 1aef15fa50b0b2ba00632bf94e588de64d6cf365
--- src/cmd/ip/snoopy/rtp.c
+++ 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 @@ Proto rtp = {
 	nil,
 	nil,
 	nil,
-	defaultframer,
+	defaultframer
 };
blob - 1e7f07931fb42359bab9a8670f65d948e110fa7c
blob + b8ea7e40ed6cc3488e461d2299317099debf5a64
--- src/cmd/ip/snoopy/tcp.c
+++ src/cmd/ip/snoopy/tcp.c
@@ -29,14 +29,14 @@ typedef struct PseudoHdr{
 
 enum
 {
-	TCPLEN= 20,
+	TCPLEN= 20
 };
 
 enum
 {
 	Os,
 	Od,
-	Osd,
+	Osd
 };
 
 static Field p_fields[] = 
@@ -55,7 +55,7 @@ static Mux p_mux[] =
 	{"ninep",	17005, },	/* ocpu */
 	{"ninep",	17010, },	/* ncpu */
 	{"ninep",	17013, },	/* cpu */
-	{0},
+	{0}
 };
 
 enum
@@ -204,7 +204,7 @@ p_seprint(Msg *m)
 	}
 
 	if(Cflag){
-		// editing in progress by ehg
+		/* editing in progress by ehg */
 	}
 	return 0;
 }
@@ -218,5 +218,5 @@ Proto tcp =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - a83c6f137cd917e9c8106cbb3ebde5e7b75e9c1e
blob + fc68d6f341b4e0bcd748025c0b194cb09617fc4b
--- src/cmd/ip/snoopy/udp.c
+++ src/cmd/ip/snoopy/udp.c
@@ -15,7 +15,7 @@ struct Hdr
 
 enum
 {
-	UDPLEN=	8,
+	UDPLEN=	8
 };
 
 enum
@@ -23,7 +23,7 @@ enum
 	Os,
 	Od,
 	Osd,
-	Osetport,
+	Osetport
 };
 
 static Field p_fields[] = 
@@ -43,7 +43,7 @@ static Mux p_mux[] =
 	{"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 @@ Proto udp =
 	p_mux,
 	"%lud",
 	p_fields,
-	defaultframer,
+	defaultframer
 };
blob - 7a260c1087bc8f9579576860e32b6df52f35c583
blob + 2b833519afa44a437fe659fd5f9f9feb0027b530
--- src/cmd/jpg/close.c
+++ src/cmd/jpg/close.c
@@ -22,7 +22,7 @@ closest(int Y, int Cb, int Cr)
 	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 @@ closest(int Y, int Cb, int Cr)
 		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;
 		}
blob - aad715fed873b71da123d05f6e8cf182894e0897
blob + bc7bee05b97ec7b1d6e898eba1d636dfacd1036b
--- src/cmd/jpg/ico.c
+++ src/cmd/jpg/ico.c
@@ -269,14 +269,14 @@ enum
 	Mexit,
 
 	Up= 1,
-	Down= 0,
+	Down= 0
 };
 
 char	*menu3str[] = {
 	"write image",
 	"write mask",
 	"exit",
-	0,
+	0
 };
 
 Menu	menu3 = {
@@ -409,7 +409,7 @@ mousemoved(void)
 
 enum
 {
-	BORDER= 1,
+	BORDER= 1
 };
 
 void
blob - 592c5a2e2cb499f1832750452bc52ba83abde592
blob + 5f5a487367ef82589d84a5f1db5de8f8e00cb142
--- src/cmd/jpg/imagefile.h
+++ src/cmd/jpg/imagefile.h
@@ -39,7 +39,7 @@ enum
 
 enum{	/* PNG flags */
 	II_GAMMA =	1 << 0,
-	II_COMMENT =	1 << 1,
+	II_COMMENT =	1 << 1
 };
 
 typedef struct ImageInfo {
blob - 0b132cb738ad3ab89d33adad9a1a8040e4e13451
blob + ee94d07f1207412603e9c21856b9942a6566b0c1
--- src/cmd/jpg/jpegdump.c
+++ src/cmd/jpg/jpegdump.c
@@ -113,7 +113,7 @@ char *sofName[16] = {
 	"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 @@ main (int argc, char *argv[]) {
 	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)
blob - b154e75b18615836bf075ca51ddc22296a99c462
blob + f3ad802e61c6dd7c99f3dfcbf01c79e7742ed31e
--- src/cmd/jpg/readjpg.c
+++ src/cmd/jpg/readjpg.c
@@ -1192,7 +1192,7 @@ enum {
 	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
blob - f6e8e9d1d9f4936ccdd602e082bb42164481f774
blob + 2985c5ffc392b965eada90f4506dd97a21f7a30a
--- src/cmd/jpg/readpng.c
+++ src/cmd/jpg/readpng.c
@@ -16,31 +16,31 @@ enum{  IDATSIZE=1000000,
 	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]
-	int scanpix;
-	int bpp;		// bits per sample
+	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 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;
 
blob - 569025fd721913c7a41a967bfca011b79ce75949
blob + 073f4436b0640308154a1a964846bf7284cf4ec2
--- src/cmd/jpg/readppm.c
+++ src/cmd/jpg/readppm.c
@@ -155,7 +155,7 @@ static Pix pix[] = {
 	{ '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*
blob - eae2764e7d6d19dca0d02781bb1bffacef6592f6
blob + f90bc2373d04293382342b6bccdeb0054afef59f
--- src/cmd/jpg/readyuv.c
+++ src/cmd/jpg/readyuv.c
@@ -76,19 +76,19 @@ Breadyuv(Biobuf *bp, int colourspace)
 	}
 
 	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 @@ Breadyuv(Biobuf *bp, int colourspace)
 		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;
blob - 3654a2d20e16cf7e3de55776ecc4b965340e54b5
blob + d20cc789c638cd315c7f40e1f9f27e34f377ec7e
--- src/cmd/jpg/rgbycc.c
+++ src/cmd/jpg/rgbycc.c
@@ -21,7 +21,7 @@ closest(int Y, int Cb, int Cr)
 	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 @@ closest(int Y, int Cb, int Cr)
 		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 @@ main(int argc, char *argv[])
 	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");
blob - 536b64ff3cd62354463df955f347273c5c4436e0
blob + 513326239125cc5f9cbaa254b79e5883a502b585
--- src/cmd/jpg/toico.c
+++ src/cmd/jpg/toico.c
@@ -7,7 +7,7 @@ enum
 {
 	FileHdrLen=	6,
 	IconDescrLen=	16,
-	IconHdrLen=	40,
+	IconHdrLen=	40
 };
 
 typedef struct Icon Icon;
blob - 0da5d9a3f4339fd61d6bcada3a4b5edc22d3ab37
blob + d30a68438481daa561b78cf09007e11f0b4a6c85
--- src/cmd/jpg/totruecolor.c
+++ src/cmd/jpg/totruecolor.c
@@ -8,7 +8,7 @@ enum {
 	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*
blob - 4bb018b3d70ef016312df21706c9835421c8e59d
blob + 08fc4801e040ed5c5a1d07218e0df99919c088a8
--- src/cmd/jpg/writegif.c
+++ src/cmd/jpg/writegif.c
@@ -8,7 +8,7 @@
 enum
 {
 	Nhash	= 4001,
-	Nbuf		= 300,
+	Nbuf		= 300
 };
 
 typedef struct Entry Entry;
blob - e280a9cc2b604cffe742e047e51726c4da58324c
blob + 3b63bb7f3a16a4944b44c9d24962b910f0c5050c
--- src/cmd/jpg/writepng.c
+++ 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 @@ zread(void *va, void *buf, int n)
 	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 @@ zwrite(void *va, void *buf, int n)
 	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 @@ memwritepng(Biobuf *bo, Memimage *r, ImageInfo *II)
 	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 @@ memwritepng(Biobuf *bo, Memimage *r, ImageInfo *II)
 
 	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);
blob - 8b1ba5f098d23e1eee813f6e1e9c43599347f0d8
blob + 8264f4c4ee7d0a9d1d8c734a5d1f68f02bd91bdc
--- src/cmd/lex/header.c
+++ src/cmd/lex/header.c
@@ -31,7 +31,7 @@ phead1(void)
 	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");
blob - a9e1a0aee626ef4f92809dbb6935a30248602f24
blob + 903bc7a3cc40121a47b36176e6c6b954b64d3dbe
--- src/cmd/listen1.c
+++ src/cmd/listen1.c
@@ -87,9 +87,9 @@ main(int argc, char **argv)
 			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);
blob - c040db58f103a8b60246d1086c2c98dbeed5a17a
blob + ffb2762e75e30f59f549007cd3ee8c9a785b1247
--- src/cmd/mk/env.c
+++ src/cmd/mk/env.c
@@ -27,7 +27,7 @@ static char	*myenv[] =
 	"stem7",
 	"stem8",
 	"stem9",
-	0,
+	0
 };
 
 void
blob - 80721237c021d54ceb05e3de1b9167f1ad7c7c93
blob + da346c0345bac3bdb5421017ad00b84b4c9cdd00
--- src/cmd/mk/graph.c
+++ src/cmd/mk/graph.c
@@ -37,7 +37,7 @@ applyrules(char *target, char *cnt)
 	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);
blob - 9f8bbf4e696320f6787af7d4b3b2550e19529f58
blob + 5ae4fc214309bbd103137c386cdf8c153045b368
--- src/cmd/mk/mk.c
+++ src/cmd/mk/mk.c
@@ -76,7 +76,7 @@ work(Node *node, Node *p, Arc *parc)
 	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 @@ update(int fake, Node *node)
 			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
blob - 53f5d5a5fb93c5d87d1e0aaa4b8c131215dfacb3
blob + 2407662f837327eaf91eaad5b1117bcb108f860d
--- src/cmd/mk/rc.c
+++ src/cmd/mk/rc.c
@@ -190,5 +190,5 @@ Shell rcshell = {
 	rcexpandquote,
 	rcescapetoken,
 	rccopyq,
-	rcmatchname,
+	rcmatchname
 };
blob - 144a49041313501e1fc442dcb8ae62f07795322c
blob + bf7f8ab1e8a865d23ea513f2338770c0e3988878
--- src/cmd/mk/recipe.c
+++ src/cmd/mk/recipe.c
@@ -99,7 +99,7 @@ dorecipe(Node *node)
 		}
 		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);
 }
blob - ba80162bfa090629d4e48beb4f6073e7e437b32d
blob + e25665141637d5fb2df92c167200f7946edb927c
--- src/cmd/mk/sh.c
+++ src/cmd/mk/sh.c
@@ -201,6 +201,6 @@ Shell shshell = {
 	shexpandquote,
 	shescapetoken,
 	shcopyq,
-	shmatchname,
+	shmatchname
 };
 
blob - cee2f6ccc3ecde978d94e0fbaa64287a91871348
blob + 8c15ec218e3217a1b6d39ea6cfe83d2a26af399c
--- src/cmd/mk/shell.c
+++ src/cmd/mk/shell.c
@@ -2,7 +2,7 @@
 
 static Shell *shells[] = {
 	&rcshell,
-	&shshell,
+	&shshell
 };
 
 Shell *shelldefault = &shshell;
blob - 28951f55854685abbc99efb32770a0fb67004abc
blob + 7ecce69fa2b83e3a3c50c4046c8065b1ed991bbe
--- src/cmd/mk/unix.c
+++ src/cmd/mk/unix.c
@@ -259,7 +259,7 @@ static	struct
 	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
 };
 
blob - 8052d58256f1d3056b55743e517de51d494bfbbb
blob + c9356b54500640974ef8fe54cec84c267c8b2ff6
--- src/cmd/ndb/dn.c
+++ src/cmd/ndb/dn.c
@@ -112,7 +112,7 @@ char *rname[Rmask+1] =
 	"server failure",
 	"bad name",
 	"unimplemented",
-	"we don't like you",
+	"we don't like you"
 };
 
 Lock	dnlock;
blob - 2fc3d7f72f62ab73d14954fca055005e266e8297
blob + fcdffcf96b4c74d7090ab2dcdaae185daa56853b
--- src/cmd/ndb/ndbmkhosts.c
+++ src/cmd/ndb/ndbmkhosts.c
@@ -187,19 +187,17 @@ main(int argc, char *argv[])
 		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);
 	if(fd < 0){
blob - 9bd9672bb696ba33d6ed0458fe9ab3cb88b40f70
blob + 45e19416316cf9b6bf770002fc8af6b85de5a278
--- src/cmd/netfiles/main.c
+++ src/cmd/netfiles/main.c
@@ -41,7 +41,7 @@ Win *mkwin(char*);
 int do3(Win *w, char *arg);
 
 enum {
-	STACK = 128*1024,
+	STACK = 128*1024
 };
 
 enum {
@@ -65,7 +65,7 @@ char *cmds[] = {
 char *debugstr[] = {
 	"off",
 	"minimal",
-	"chatty",
+	"chatty"
 };
 
 typedef struct Arg Arg;
@@ -218,7 +218,7 @@ doplumb(void *vm)
 	winaddr(w, "%s", addr);
 	winctl(w, "dot=addr");
 	winctl(w, "show");
-//	windecref(w);
+/*	windecref(w); */
 	plumbfree(m);
 }
 
blob - 6a947039031b9f114d12a1869b4b86c4c5b34e87
blob + 9ce6f74c937fad14f88e4ac7ff44ebff141d0340
--- src/cmd/page/gfx.c
+++ src/cmd/page/gfx.c
@@ -44,7 +44,7 @@ enum {
 	Ippm,
 	Ipng,
 	Iyuv,
-	Ibmp,
+	Ibmp
 };
 
 /*
@@ -65,7 +65,7 @@ Convert cvt[] = {
 [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 @@ spawnrc(char *cmd, uchar *stdinbuf, int nstdinbuf)
 		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");
 	}
blob - 2093af56f3166c6d20c40fa26280a9a25ed06d24
blob + fd7337ec81d64f42f4c1ad3ebbc1574ab0d3aab0
--- src/cmd/page/gs.c
+++ src/cmd/page/gs.c
@@ -305,10 +305,10 @@ waitgs(GSInfo *gs)
 	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(;;) {
blob - 65fe33aba638186f0d01dcb5399672f1ed6fe0c4
blob + 9f6816e23f6b7c9e18521d8f422ca0550aec3c67
--- src/cmd/page/nrotate.c
+++ src/cmd/page/nrotate.c
@@ -23,7 +23,7 @@ int ndraw = 0;
 
 enum {
 	Xaxis,
-	Yaxis,
+	Yaxis
 };
 
 static void reverse(Image*, Image*, int);
@@ -229,7 +229,7 @@ swapadjacent(Image *img, Image *tmp, int axis, int img
 	/*
 	 * r0 is the lower rectangle, while r1 is the upper one.
 	 */
-	draw(tmp, tmp->r, img, nil, 
+	draw(tmp, tmp->r, img, nil
 }
 
 void
blob - 9e1c20dbfc88577c7f509ef7d98cc4d00e991000
blob + fc13059bf22d7933eaa170e00c30621ad3814cac
--- src/cmd/page/rotate.c
+++ 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 @@ nextmask(Image *mask, int axis, int maskdim)
 	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 @@ shuffle(Image *im, Image *tmp, int axis, int n, Image 
 	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 @@ rot180(Image *im)
 	}
 	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);
blob - 4321f829cc7c84f163a1d3bcfe4f6a4bac51545e
blob + 1cdb254144026a863b5a0b3394c4108b97d8f128
--- src/cmd/page/view.c
+++ src/cmd/page/view.c
@@ -56,7 +56,7 @@ enum {
 	Middle = 2,
 	Right = 4,
 
-	RMenu = 3,
+	RMenu = 3
 };
 
 void
@@ -265,7 +265,7 @@ enum{
 	Del,
 	Write,
 	Empty3,
-	Exit,
+	Exit
 };
  
 void
@@ -866,7 +866,7 @@ redraw(Image *screen)
 		}
 	}
 	border(screen, r, -4000, gray, ZP);
-//	flushimage(display, 0);	
+/*	flushimage(display, 0);	 */
 }
 
 void
@@ -1047,7 +1047,7 @@ newwin(void)
 	dup(cons, 1);
 	dup(cons, 2);
 	close(cons);
-//	wctlfd = open("/dev/wctl", OWRITE);
+/*	wctlfd = open("/dev/wctl", OWRITE); */
 }
 
 Rectangle
blob - 1ada1c1c365575f380684d1ab66599484c8bf9c2
blob + e888fafc827612055d05f390f5eb05f21508489e
--- src/cmd/pic/misc.c
+++ src/cmd/pic/misc.c
@@ -212,7 +212,7 @@ int whatpos(obj *p, int corner, double *px, double *py
 
 	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) {
blob - 2fe216afc3aeecd522bf5de5bd0df7ae10badc4e
blob + 8b62387bb5ccbcc3c25d785eb9e856e62c87f186
--- src/cmd/plot/plot.c
+++ src/cmd/plot/plot.c
@@ -92,7 +92,7 @@ struct pcall {
 	/*SPLINE*/ 	"sp", 	2,
 	/*TEXT*/ 		"t", 	1,
 	/*VEC*/ 		"v", 	1,
-	/*LAST*/	 	0, 	0,
+	/*LAST*/	 	0, 	0
 };
 
 struct pcall *pplots;		/* last command read */
blob - e9be1eb65f8a140838151190729a2ea944c3dc98
blob + 4ae99afd895ae1b89757b29f9274a8019fbda961
--- src/cmd/plumb/fsys.c
+++ src/cmd/plumb/fsys.c
@@ -92,7 +92,7 @@ static Dirtab dir[NDIR] =
 {
 	{ ".",			QTDIR,	Qdir,			0500|DMDIR },
 	{ "rules",		QTFILE,	Qrules,		0600 },
-	{ "send",		QTFILE,	Qsend,		0200 },
+	{ "send",		QTFILE,	Qsend,		0200 }
 };
 static int	ndir = NQID;
 
blob - 4b9267a5fdc6e88a02df6a08a8a8b4144d3d7572
blob + c8f3081660300160dec85b67d642bcb12d96dbac
--- src/cmd/plumb/plumber.h
+++ src/cmd/plumb/plumber.h
@@ -14,7 +14,7 @@ enum
 	OPlumb,
 	OSrc,
 	OType,
-	OWdir,
+	OWdir
 };
 
 /*
@@ -31,7 +31,7 @@ enum
 	VMatches,
 	VSet,
 	VStart,
-	VTo,
+	VTo
 };
 
 struct Rule
blob - 01ee6ba812f1aa305c2bb4a1f39baedce3f30af9
blob + ee5a79d06b42257e629af6c25ddb2e3396d8c642
--- src/cmd/postscript/common/rune.c
+++ src/cmd/postscript/common/rune.c
@@ -21,7 +21,7 @@ enum
 	Maskx	= (1<<Bitx)-1,			/* 0011 1111 */
 	Testx	= Maskx ^ 0xFF,			/* 1100 0000 */
 
-	Bad	= Runeerror,
+	Bad	= Runeerror
 };
 
 int
blob - 2df5f767ef23dd466f90a55cac70b8197511b569
blob + 0e7d0cb6e4ea5bc15e0750656ca3cacdd9fa5ef1
--- src/cmd/postscript/common/rune.h
+++ src/cmd/postscript/common/rune.h
@@ -14,6 +14,6 @@ enum
 	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
blob - 2f61c2772e8178717d6c8c0e46f42728d9b1298b
blob + 7b45e667a16740d81d23717d063cfb59122ed26b
--- src/cmd/postscript/misc/laserbar.c
+++ src/cmd/postscript/misc/laserbar.c
@@ -43,7 +43,7 @@ static int code39[256] = {
 	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();
blob - 4cf5004326673d7162b87a014f70a42262cb228b
blob + 6330f04c77f8f96c468f3bfb8e69d42d1efcd613
--- src/cmd/ramfs.c
+++ src/cmd/ramfs.c
@@ -14,7 +14,7 @@ enum
 	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 @@ enum
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 ulong	path;		/* incremented for each new file */
@@ -703,7 +703,7 @@ rwstat(Fid *f)
 	 */
 	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)
blob - aeb9344994a7d59a85b831e2fb994da7c3358db9
blob + f5e4e6a3530da092fe20a1d09fc54e4c097fd93a
--- src/cmd/rc/plan9ish.c
+++ src/cmd/rc/plan9ish.c
@@ -127,7 +127,7 @@ void Vinit(void){
 		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';
blob - 2b242242ba8825baeb43825df56372ef3e4abdad
blob + 06a22b26af535711f549939eff8b779dc6955249
--- src/cmd/rc/subr.c
+++ 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");
 }
blob - e2bc6fc09e7816b067444fb10e3a62f80b4e91e8
blob + d3208419572986e0139cdb1b07d84ea78f010453
--- src/cmd/resample.c
+++ src/cmd/resample.c
@@ -208,7 +208,7 @@ main(int argc, char *argv[])
 
 	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 */
blob - df8225fd31a5ef5e991ee8875f10feb079b8a509
blob + 58b0697fe2490580c2c098e89f40880325214655
--- src/cmd/rio/client.c
+++ src/cmd/rio/client.c
@@ -15,7 +15,7 @@ Client	*current;
 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 @@ draw_border(Client *c, int active)
 			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 @@ top(Client *c)
 		}
 		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 @@ dump_revert(void)
 
 	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 @@ dump_clients(void)
 	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 @@ shuffle(int up)
 	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 @@ shuffle(int up)
 		c->next = 0;
 		XLowerWindow(dpy, c->window);
 	}
-//	XMapRaised(dpy, clients->parent);
-//	top(clients);	
-//	active(clients);
+/*	XMapRaised(dpy, clients->parent); */
+/*	top(clients);	 */
+/*	active(clients); */
 }
 
blob - 9acab5192aa260129a032c104880ae460405dfb5
blob + 33f635224435331e1b3f669aa33cb738df6ba9dd
--- src/cmd/rio/cursor.c
+++ src/cmd/rio/cursor.c
@@ -25,7 +25,7 @@ Cursordata bigarrow = {
 	  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 @@ Cursordata blitsweep = {
 #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 l = {
 Cursor *corners[9] = {
 	&tl,	&t,	&tr,
 	&l,	nil,	&r,
-	&bl,	&b,	&br,
+	&bl,	&b,	&br
 };
 
 */
blob - aa08fcf97068ff1dbe0939067c0d49505a133efb
blob + e56429eb510f0c008c82ef67c0eb1e733c031c5c
--- src/cmd/rio/dat.h
+++ 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 @@ enum BorderOrient {
 	BorderW,
 	BorderWNW,
 	BorderNNW,
-	NBorder,
+	NBorder
 };
+typedef enum BorderOrient BorderOrient;
 
 struct ScreenInfo {
 	int			num;
blob - 5215f32a2df08294a321926fb1fb39c05a1fa9fb
blob + 358a36a50fec691ea170d42b49f7c87313fd826e
--- src/cmd/rio/error.c
+++ src/cmd/rio/error.c
@@ -87,9 +87,9 @@ dotrace(char *s, Client *c, XEvent *e)
 {
 	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");
blob - 457153df644e1e6f6fef141d3447829a5735c900
blob + 1fa00ffcfeba9409d66321611129f29dc504ca18
--- src/cmd/rio/event.c
+++ src/cmd/rio/event.c
@@ -191,7 +191,7 @@ mapreq(XMapRequestEvent *e)
 	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);
blob - bff0d14d4bfc3dd4a6d1a4768b3b0c2457576c23
blob + 95333ec540e6f5594849e938ef1afbea36ad9a0d
--- src/cmd/rio/key.c
+++ 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 @@ keysetup(void)
 	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 @@ static void
 alttab(int shift)
 {
 	shuffle(shift);
-//	fprintf(stderr, "%sTab\n", shift ? "Back" : "");
+/*	fprintf(stderr, "%sTab\n", shift ? "Back" : ""); */
 }
 
blob - d20c3a003d91c4f479333028f359e4aa14e86fa2
blob + afb2bb8bbd3ae0f26b6c4751a332195affb84593
--- src/cmd/rio/main.c
+++ 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 @@ char	*fontlist[] = {
 	"9x15bold",
 	"fixed",
 	"*",
-	0,
+	0
 };
 
 void
blob - eb92b7441a63376301e700a1d40893686aeceb49
blob + 379291cce851a16eb768314967785bc9d44a9e5a
--- src/cmd/rio/menu.c
+++ 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 @@ int reversehide = 1;
 
 Client * currents[NUMVIRTUALS] =
 {
-	NULL, NULL, NULL, NULL, 
+	NULL, NULL, NULL, NULL
 };
 
 char	*b2items[NUMVIRTUALS+1] =
@@ -41,12 +42,12 @@ char	*b2items[NUMVIRTUALS+1] =
 	"Ten",
 	"Eleven",
 	"Twelve",
-	0,
+	0
 };
 
 Menu b2menu = 
 {
-	b2items,
+	b2items
 };
 
 char	*b3items[B3FIXED+MAXHIDDEN+1] =
@@ -56,7 +57,7 @@ char	*b3items[B3FIXED+MAXHIDDEN+1] =
 	"Move",
 	"Delete",
 	"Hide",
-	0,
+	0
 };
 
 enum
@@ -70,12 +71,12 @@ enum
 
 Menu	b3menu =
 {
-	b3items,
+	b3items
 };
 
 Menu	egg =
 {
-	version,
+	version
 };
 
 void
blob - 9a525b66671f9204aaa54422d600aea1955b6176
blob + c32c2ef5ac99912e51f2c0926dff3b08b56b9951
--- src/cmd/sam/buff.c
+++ 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
blob - aa356952fc6ce75448d4a31db15f7e1759d9bec5
blob + a5b636af141725f271c2ea9bafdcd30ddb3bbc54
--- src/cmd/sam/cmd.c
+++ src/cmd/sam/cmd.c
@@ -37,7 +37,7 @@ struct cmdtab cmdtab[]={
 	'|',	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);
blob - d19b9621b55166ba080d3080ab7a4ee1bd945fae
blob + eb4e48f459eb8ae4e19f7867f6789031f0a8e7e7
--- src/cmd/sam/error.c
+++ src/cmd/sam/error.c
@@ -50,7 +50,7 @@ static char *emsg[]={
 	"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 @@ static char *wmsg[]={
 	"null characters elided",
 	"can't run pwd",
 	"last char not newline",
-	"exit status not 0",
+	"exit status not 0"
 };
 
 void
blob - 7bf46ea11902502d110eb78aa5bb25fb5aeefd41
blob + 5e88f492d8f62a8886197ed6da97dc001e10f88f
--- src/cmd/sam/errors.h
+++ src/cmd/sam/errors.h
@@ -48,7 +48,7 @@ typedef enum Err{
 	Etmpovfl,
 	Eappend,
 	Ecantplumb,
-	Ebufload,
+	Ebufload
 }Err;
 typedef enum Warn{
 	/* warn_s */
@@ -61,5 +61,5 @@ typedef enum Warn{
 	Wnulls,
 	Wpwd,
 	Wnotnewline,
-	Wbadstatus,
+	Wbadstatus
 }Warn;
blob - bc3c0f4ab406f31f05d3797fb28359cf97f97572
blob + 875a26c70201ccad53989624860ab5fe0ffffaeb
--- src/cmd/sam/file.c
+++ src/cmd/sam/file.c
@@ -35,7 +35,7 @@ struct Merge
 enum
 {
 	Maxmerge = 50,
-	Undosize = sizeof(Undo)/sizeof(Rune),
+	Undosize = sizeof(Undo)/sizeof(Rune)
 };
 
 static Merge	merge;
blob - 95c2e0ce577b97120ccb62ef206d76f6fa868ea1
blob + 8740c7ca89e319c1d8ed354700dafc3f8fd33297
--- src/cmd/sam/io.c
+++ src/cmd/sam/io.c
@@ -223,7 +223,7 @@ connectto(char *machine, char **argv)
 	char **av;
 	int ac;
 
-	// count args
+	/* count args */
 	for(av = argv; *av; av++)
 		;
 	av = malloc(sizeof(char*)*((av-argv) + 5));
blob - 8edd4b2a8edf53ee759ce18dade1dbfb9eee7b40
blob + 01016ce93b1e74767bb8c0cd391a1f0a7f3db25d
--- src/cmd/sam/mesg.c
+++ src/cmd/sam/mesg.c
@@ -46,7 +46,7 @@ char *hname[] = {
 	[Hsnarflen]	"Hsnarflen",
 	[Hack]		"Hack",
 	[Hexit]		"Hexit",
-	[Hplumb]		"Hplumb",
+	[Hplumb]		"Hplumb"
 };
 
 char *tname[] = {
@@ -72,7 +72,7 @@ char *tname[] = {
 	[Tsetsnarf]	"Tsetsnarf",
 	[Tack]		"Tack",
 	[Texit]		"Texit",
-	[Tplumb]		"Tplumb",
+	[Tplumb]		"Tplumb"
 };
 
 void
blob - 6e34f664a260a9b56587bf8011030dac9271bca9
blob + 234414998eaddd945b0a79a6cb5f198f7e121a4d
--- src/cmd/sam/mesg.h
+++ src/cmd/sam/mesg.h
@@ -34,7 +34,7 @@ typedef enum Tmesg
 	Tack,		/* acknowledge Hack */
 	Texit,		/* exit */
 	Tplumb,		/* send plumb message */
-	TMAX,
+	TMAX
 }Tmesg;
 /*
  * Messages originating at the host
@@ -67,7 +67,7 @@ typedef enum Hmesg
 	Hack,		/* request acknowledgement */
 	Hexit,
 	Hplumb,		/* return plumb message to terminal - version 1 */
-	HMAX,
+	HMAX
 }Hmesg;
 typedef struct Header{
 	uchar	type;		/* one of the above */
blob - 12f293f29ffaf5bfdfd98755309bae5b4723cc3a
blob + d5fabf14ef8156a1aac0c1a64bcf2e04d55e63ca
--- src/cmd/sam/parse.h
+++ src/cmd/sam/parse.h
@@ -48,7 +48,7 @@ extern struct cmdtab{
 enum Defaddr{	/* default addresses */
 	aNo,
 	aDot,
-	aAll,
+	aAll
 };
 
 int	nl_cmd(File*, Cmd*), a_cmd(File*, Cmd*), b_cmd(File*, Cmd*);
blob - eefb4b344fb583ff97c301b51a681f13fa1701f1
blob + fa86efd1daa5b9536c632c28fc064c280daca123
--- src/cmd/sam/sam.h
+++ src/cmd/sam/sam.h
@@ -42,7 +42,7 @@ enum State
 {
 	Clean =		' ',
 	Dirty =		'\'',
-	Unread =	'-',
+	Unread =	'-'
 };
 
 struct Range
@@ -97,7 +97,7 @@ enum
 	Maxblock = 	8*1024,
 
 	BUFSIZE = Maxblock,	/* size from fbufalloc() */
-	RBUFSIZE = BUFSIZE/sizeof(Rune),
+	RBUFSIZE = BUFSIZE/sizeof(Rune)
 };
 
 
@@ -108,7 +108,7 @@ enum
 	Insert		= 'i',
 	Filename	= 'f',
 	Dot		= 'D',
-	Mark		= 'm',
+	Mark		= 'm'
 };
 
 struct Block
@@ -168,10 +168,12 @@ struct File
 	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 @@ struct File
 	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*);
blob - 2505f854c6166e7c55a50f31f4d3bdd9535c1b8a
blob + a745a5bc378990173de7cfc838cb1de06e82dd68
--- src/cmd/sam/unix.c
+++ src/cmd/sam/unix.c
@@ -128,7 +128,7 @@ statfd(int fd, ulong *dev, uvlong *id, long *time, lon
 void
 hup(int sig)
 {
-        panicking = 1; // ???
+        panicking = 1; /* ??? */
         rescue();
         exit(1);
 }
@@ -137,7 +137,7 @@ int
 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;
 }
blob - 41306f79e782e454621c81c06029b2eff20b010c
blob + 62c98076a22670617d281cfa86bc3e429b964242
--- src/cmd/samterm/flayer.h
+++ 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;
blob - 18070a8fcfa4a6f559de14ca31d1bf00715f9212
blob + 7dcf5affcd7c26fee91aa898fabdb43a2adfdfba
--- src/cmd/samterm/menu.c
+++ src/cmd/samterm/menu.c
@@ -59,7 +59,7 @@ char	*menu3str[] = {
 	"zerox",
 	"resize",
 	"close",
-	"write",
+	"write"
 };
 
 Menu	menu2 =	{0, genmenu2};
blob - e4803d5986c4a6ed39f46b90668fce92e1efb18b
blob + 04de4b90d64430f81635709e6c6d74825bdaebbd
--- src/cmd/samterm/samterm.h
+++ src/cmd/samterm/samterm.h
@@ -53,7 +53,7 @@ enum Resource
 	RMouse,
 	RPlumb,
 	RResize,
-	NRes,
+	NRes
 };
 
 extern int	protodebug;
blob - b4bd286baa51490af3e0ad91ce0582824a942245
blob + ec37e0d6a6a05cc2cb7b2cc4928ad7719fc227d4
--- src/cmd/scat/bitinput.c
+++ src/cmd/scat/bitinput.c
@@ -11,7 +11,7 @@ static int hufvals[] = {
 	 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 @@ static int huflens[] = {
 	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;
blob - 968229cccfd7c003a7ff6d6e83e394469b931bb3
blob + 0cbf1de849aaf729a6a4c944f7beb76a739c971e
--- src/cmd/scat/desc.c
+++ src/cmd/scat/desc.c
@@ -313,7 +313,7 @@ char *desctab[][2]={
 	"vs",	"very suddenly",
 	"vv",	"very very",
 	"zeta",	"ζ",
-	0,	0,
+	0,	0
 };
 
 /*&
blob - 11642e59902daa61024f5cd1db5ffa58a61d181a
blob + 739fca82b119dd9738aedd55b07063a0daf4d93d
--- src/cmd/scat/display.c
+++ src/cmd/scat/display.c
@@ -25,7 +25,7 @@ displaypic(Picture *pic)
 		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 @@ displaypic(Picture *pic)
 				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 @@ displayimage(Image *im)
 		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");
 
blob - 4d10bb5b24134ee8ebf8fcfba3d91647acae1fc0
blob + f2786f6388f6bb602aaac839dbce27b8f2dfe11b
--- src/cmd/scat/plate.h
+++ src/cmd/scat/plate.h
@@ -67,7 +67,7 @@ enum
 	Ppltdecd,
 	Ppltdecm,
 	Ppltdecs,
-	Pnparam,
+	Pnparam
 };
 
 typedef	struct	Plate	Plate;
blob - 24ff4e2033ca9c52dd1bcf1f8fddc99ac54b6045
blob + f8c1ee6e6b62cdcf8ba3a7e37759d88c650d97e1
--- src/cmd/scat/scat.c
+++ src/cmd/scat/scat.c
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
 	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 @@ char *ngctypes[] =
 [Uncertain]	"?",
 [Nonexistent]	"-",
 [Unknown]	" ",
-[PlateDefect]	"PD",
+[PlateDefect]	"PD"
 };
 
 char*
blob - cd2b6e863b270c0be1f0deec3cd5236dd764a260
blob + 53045853dfb473db3ac083f5b358972ac01b56bd
--- src/cmd/scat/sky.h
+++ src/cmd/scat/sky.h
@@ -63,7 +63,7 @@ typedef enum
 	/* internal */
 	NGCN,
 	PatchC,
-	NONGC,
+	NONGC
 }Type;
 
 enum
@@ -128,7 +128,7 @@ enum
 	Ppltdecd,
 	Ppltdecm,
 	Ppltdecs,
-	Pnparam,
+	Pnparam
 };
 
 #define	UNKNOWNMAG	32767
blob - e60246c708c80361c7f3e5113f84a20cdce34bbc
blob + fa078f8de16795123b477bf7ff9c0e22856c64e8
--- src/cmd/scat/strings.c
+++ 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 @@ char *constel[]={ 0,	/* 1-indexed */
 	"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 @@ Name names[]={
 	"nonexistent",	Nonexistent,
 	"unknown",	Unknown,
 	"platedefect",	PlateDefect,
-	0,		0,
+	0,		0
 };
blob - 182163eb6d8eac98cea0c08fcd498390d5360441
blob + ddbcbf81d71d4e3d1936babe8b7a3a9adb275013
--- src/cmd/sed.c
+++ src/cmd/sed.c
@@ -16,7 +16,7 @@ enum {
 	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 @@ typedef struct	{
 		A_DOL,
 		A_LINE,
 		A_RE,
-		A_LAST,
+		A_LAST
 	}type;
 	union {
 		long line;		/* Line # */
blob - 0579484c89b54ebf6d02c2c3b6adfe8c6d0f5d4a
blob + 3f8ea16554beca72061f5fcd47003c65432db85e
--- src/cmd/sftpcache.c
+++ src/cmd/sftpcache.c
@@ -179,9 +179,9 @@ main(int argc, char **argv)
 		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);
blob - ab3691058c52f04edeee528bd15a433a3e47a102
blob + 6a51d72fea5403749414f486860a379f00c15170
--- src/cmd/snarfer/snarfer.c
+++ src/cmd/snarfer/snarfer.c
@@ -54,7 +54,7 @@ AUTOFRAMEWORK(Carbon)
 AUTOLIB(draw)	/* to cause link of X11 */
 
 enum {
-	SnarfSize = 65536,
+	SnarfSize = 65536
 };
 char snarf[3*SnarfSize+1];
 Rune rsnarf[SnarfSize+1];
blob - e15672da2fcbc01ceeab1e78d1953250c311d66e
blob + 9606f90fc4bf1be13b0a5df6a93e5c2a7103e8d4
--- src/cmd/sort.c
+++ src/cmd/sort.c
@@ -34,7 +34,7 @@ enum
 	NSzerofract,
 	NSexp,
 	NSexpsign,
-	NSexpdigit,
+	NSexpdigit
 };
 
 typedef	struct	Line	Line;
@@ -1583,7 +1583,7 @@ Rune*	month[12] =
 
 enum
 {
-	Threshold	= 14,
+	Threshold	= 14
 };
 
 void	rsort4(Key***, ulong, int);
blob - 0fe6794cfc4cd9e9f960c0260a41c2b5dd7602fa
blob + 6eaa026f8a3245e9aaf94e77f356be1d0305d2a2
--- src/cmd/spell/sprog.c
+++ src/cmd/spell/sprog.c
@@ -229,7 +229,7 @@ Suftab*	suftab[] =
 	stabz,
 	stabz,
 	staby,
-	stabz,
+	stabz
 };
 
 Ptab	ptaba[] =
@@ -417,7 +417,7 @@ Ptab*	preftab[] =
 	ptabw,
 	ptabx,
 	ptaby,
-	ptabz,
+	ptabz
 };
 
 typedef struct {
@@ -1338,7 +1338,7 @@ loop:
 		close(f);
 		while(sp < 128*128)
 			spacep[++sp] = s;
-		*s = 0x80;		/* fence */
+		*s = (char)0x80;		/* fence */
 		return;
 	}
 	p = (c>>3) & 0xf;
blob - 2d596a3cfd8ee0668654d42c0aca1704f00f7e90
blob + bc83648e81ead804426e86780f8eb48816415562
--- src/cmd/tapefs/fs.c
+++ src/cmd/tapefs/fs.c
@@ -31,21 +31,24 @@ char	*rflush(Fid*), *rversion(Fid*), *rauth(Fid*),
 	*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 @@ main(int argc, char *argv[])
 	char buf[TICKREQLEN];
 
 	fmtinstall('F', fcallfmt);
+	initfcalls();
 
 	defmnt = "tapefs";
 	ARGBEGIN{
blob - bfe7593798278297e0c98fd1e09d63024996bb2b
blob + a76cf383b867cada88a267cd72a18f2fae7125dc
--- src/cmd/tapefs/tapefs.h
+++ src/cmd/tapefs/tapefs.h
@@ -9,7 +9,7 @@ enum
 {
 	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 @@ enum
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 typedef struct idmap {
blob - 9b703de281c09d152c2ba8bf7488a4e03cf6b7a9
blob + 344498032b031a0a4c876ac7a11afb16f09f9bed
--- src/cmd/tapefs/zip.h
+++ src/cmd/tapefs/zip.h
@@ -16,7 +16,8 @@ enum
 	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 @@ enum
 	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
 };
 
 /*
blob - 26bd4dc9f55a720a89c9e02c001470bd4270d970
blob + 5d3c4338e216227ed4a7a16409ab7f60db1d7308
--- src/cmd/tapefs/zipfs.c
+++ 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;
blob - 1306ed4122c15c20e2eea38948694e0a9888cc35
blob + c863aff2496ff53c9fad81b81a4d955c6c313c16
--- src/cmd/tar.c
+++ src/cmd/tar.c
@@ -56,7 +56,7 @@ enum {
 
 	Nblock = 40,		/* maximum blocksize */
 	Dblock = 20,		/* default blocksize */
-	DEBUG = 0,
+	DEBUG = 0
 };
 
 /* POSIX link flags */
@@ -70,7 +70,7 @@ enum {
 	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 @@ mkhdr(Hdr *hp, Dir *dir, char *file)
 			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] = ' ';
blob - 573dc445aaf0b11aa484905ccbc6c58a9d3c79ab
blob + 32d71686bff3e3b46d8273b194ead13c6abdd02f
--- src/cmd/tcs/8859.h
+++ src/cmd/tcs/8859.h
@@ -15,7 +15,7 @@ long tab8859_1[256] =
 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 @@ long tab8859_2[256] =
 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 @@ long tab8859_3[256] =
 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 @@ long tab8859_4[256] =
 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 @@ long tab8859_5[256] =
 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 @@ long tab8859_6[256] =
 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 @@ long tab8859_7[256] =
 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 @@ long tab8859_8[256] =
 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 @@ long tab8859_9[256] =
 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 @@ long tab8859_10[256] =	/* from dkuug.dk:i18n/charmaps/
 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
 };
 
 
blob - dda738fab73584270aa376fe0378e99b29b5422d
blob + 051f1b0f90d85c96283337ca908a50f484ccf3cd
--- src/cmd/tcs/big5.c
+++ src/cmd/tcs/big5.c
@@ -1747,5 +1747,5 @@ long tabbig5[BIG5MAX] = {
     -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
 };
blob - d81c87172c803baf46c9d8f439549d7166abcbc8
blob + 111bf5c408787aa0ff38faa5a053bf2caec8c5ee
--- src/cmd/tcs/conv_big5.c
+++ src/cmd/tcs/conv_big5.c
@@ -139,7 +139,7 @@ big5_out(Rune *base, int n, long *notused)
 			if(tab[r] != -1){
 				r = tab[r];
 				if(r >= BIG5MAX){
-					*p++ = 0xA1;
+					*p++ = (char)0xA1;
 					*p++ = r-BIG5MAX;
 					continue;
 				} else {
blob - 569b4907e018c31c51dc451932a95a2eaeee65c4
blob + b4460eb37ffad65c6bdfcb860ac5c8eff073b7a2
--- src/cmd/tcs/cyrillic.h
+++ src/cmd/tcs/cyrillic.h
@@ -23,7 +23,7 @@ long tabucode[256] =
 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 @@ long tabkoi8[256] =
 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 @@ long tab866[256] =
 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 @@ long tabav[256] =
 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 @@ long tabov[256] =
 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
 };
blob - 71c9b0041288bbf7a1a264f58b19d4363ba2d14c
blob + e488033694d619ebb7ef6621aa4aa38a56f85893
--- src/cmd/tcs/font/bbits.c
+++ 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 *
blob - acc3ea3f26b4bf845c9358ba1fe3444265747a0c
blob + db25152cdecd91aed78a400647d18eb293a8c227
--- src/cmd/tcs/font/main.c
+++ src/cmd/tcs/font/main.c
@@ -19,7 +19,7 @@ struct {
 	[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
blob - b149b8fc67fec17e0e28ee5ec105a41a6064aae3
blob + c4cd0178c6b73cb341099188ddc3b94932e1e6b7
--- src/cmd/tcs/gb.c
+++ src/cmd/tcs/gb.c
@@ -1100,5 +1100,5 @@ long tabgb[GBMAX] = {
 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
 };
blob - 4f5515263afa6df9d3e36ce8dd92402eea90a309
blob + d1366e8be823362cb50542d7a0e54ee809693d51
--- src/cmd/tcs/kuten208.c
+++ src/cmd/tcs/kuten208.c
@@ -1051,5 +1051,5 @@ long tabkuten208[KUTEN208MAX] = {
 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
 };
blob - c1ad93b201f9194e61a19ec28fc40bdf8643aac8
blob + d00750fb6f0873f42e8aae167c6c42d7f22958e3
--- src/cmd/tcs/kuten212.c
+++ src/cmd/tcs/kuten212.c
@@ -971,5 +971,5 @@ long tabkuten212[KUTEN212MAX] = {
 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
 };
blob - 84aa44403420626a3688b84f78c719fb77ace5fa
blob + 7e427c8b65f4e281b3c9036ae40d54e2938612e1
--- src/cmd/tcs/misc.h
+++ src/cmd/tcs/misc.h
@@ -26,7 +26,7 @@ long tabatari[256] =	/* from jhelling@cs.ruu.nl (Jeroe
 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 @@ long tabebcdic[256] =	/* from jhelling@cs.ruu.nl (Jero
 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 @@ long tabmacroman[256] =	/* (modified via world.std.com
 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 @@ long tabps2[256] =	/* from jhelling@cs.ruu.nl (Jeroen 
 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 @@ long tabsf1[256] =	/* From Kari.Hurtta@Helsinki.FI (Ka
   -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 @@ long tabsf2[256] =	/* from wirzeniu@cc.helsinki.fi (La
   -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 @@ long tabtis620[256] =	/* from jhelling@cs.ruu.nl (Jero
 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) */
 {
blob - 884557e9ff39d09005f5d3fbf1bad0863b0e03a0
blob + 617dd198a97c617399a28ab081ba0b0bb8f8193f
--- src/cmd/tcs/ms.h
+++ src/cmd/tcs/ms.h
@@ -53,7 +53,7 @@ long tabcp437[256] = {
 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 @@ long tabcp720[256] = {
 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 @@ long tabcp737[256] = {
 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 @@ long tabcp775[256] = {
 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 @@ long tabcp850[256] = {
 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 @@ long tabcp852[256] = {
 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 @@ long tabcp855[256] = {
 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 @@ long tabcp857[256] = {
 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 @@ long tabcp858[256] = {
 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 @@ long tabcp862[256] = {
 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 @@ long tabcp866[256] = {
 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 @@ long tabcp874[256] = {
 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 @@ long tabcp1250[256] = {
 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 @@ long tabcp1251[256] = {
 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 @@ long tabcp1252[256] = {
 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 @@ long tabcp1253[256] = {
 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 @@ long tabcp1254[256] = {
 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 @@ long tabcp1255[256] = {
 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 @@ long tabcp1256[256] = {
 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 @@ long tabcp1257[256] = {
 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 @@ long tabcp1258[256] = {
 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
 };
blob - 37753765d049819f9903b5c0749a16474831263c
blob + bb2f61f78bbfcb8aaef8d771885397e6712548c2
--- src/cmd/tcs/tcs.c
+++ src/cmd/tcs/tcs.c
@@ -319,7 +319,6 @@ long tabascii[256] =
 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,
-  -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,
@@ -327,6 +326,7 @@ long tabascii[256] =
   -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 @@ long tabmsdos[256] =	/* from jhelling@cs.ruu.nl (Jeroe
 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 @@ long tabmsdos2[256] =	/* from jhelling@cs.ruu.nl (Jero
 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 @@ struct convert convert[] =
 	{ "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 }
 };
blob - 623637fc7f420a8a2868ec7d9e56d19254a6a5bf
blob + c2b0662480145e28b5b263d56717399f588609bd
--- src/cmd/troff/hytab.c
+++ src/cmd/troff/hytab.c
@@ -35,7 +35,7 @@ Uchar	hxx[26][13] = {
 	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 @@ Uchar	bxxh[26][13] = {
 	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 @@ Uchar	xhx[26][13] = {
 	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 @@ Uchar	xxh[26][13] = {
 	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
 };
blob - 17eb14af9095be1c2f7157bdd402e6d8edaad20a
blob + f465e7642a346856f4b5dd4770fc9c35bb7ec033
--- src/cmd/troff/mkfile
+++ src/cmd/troff/mkfile
@@ -27,7 +27,7 @@ HFILES=tdef.h\
 
 
 <$PLAN9/src/mkone
-CFLAGS=-c -DUNICODE
+CFLAGS=-DUNICODE
 
 TMACDIR='"tmac/tmac."'
 FONTDIR='"troff/font"'
blob - 4c2bec4b3c6afa410c22221c26f59627239c0b37
blob + c65898cec0f5528cc29e8b773d23bd7bbc9d6377
--- src/cmd/troff/n1.c
+++ src/cmd/troff/n1.c
@@ -393,9 +393,9 @@ char gchtab[NCHARS] = {
 	000,000,000,000,000,000,000,000,
 	000,000,000,000,000,000,000,000,
 	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 @@ g0:
 			if (ip)
 				goto again;
 		}
-//g2:
+/*g2: */
 		if (i >= 040)			/* zapped: && i < 0177 */
 			goto g4;
 		i = ifilt[i];
blob - 22fd101949cce864c3270ea1e4e795708f9df16c
blob + 6495d3301e58b7783b991f13510f2347c7dd320b
--- src/cmd/troff/n2.c
+++ 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"
blob - bcea354acea75bf61a5f6205c5b5d009a8fe7c7e
blob + 17ab2bd5bf1620a9fe2df845d7de161dda5d2a72
--- src/cmd/troff/n7.c
+++ src/cmd/troff/n7.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE 1	/* isascii */
 #include "tdef.h"
 #include "fns.h"
 #include "ext.h"
blob - a80cec6437edd23dfd4e7ec144b8a0d061e126b7
blob + ee09ed4a037ee431bd7e202d198194e0c8899b68
--- src/cmd/troff/ni.c
+++ src/cmd/troff/ni.c
@@ -22,7 +22,7 @@ Numtab numtab[NN] = {
 	{ PAIR('s', 't') },
 	{ PAIR('s', 'b') },
 	{ PAIR('c', '.') },
-	{ PAIR('$', '$') },
+	{ PAIR('$', '$') }
 };
 
 
@@ -150,7 +150,7 @@ Contab contab[NM] = {
 	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 @@ Env env[NEV] = { {	/* this sets up env[0] */
 /* 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 */
blob - 1aa8a009b7a6671bb1e25ae76119285ed6a88b74
blob + 858a641973e510ef0fb4a15387ef0df6766541e8
--- src/cmd/troff/suftab.c
+++ src/cmd/troff/suftab.c
@@ -608,5 +608,5 @@ Uchar	*suftab[] = {
 	0,
 	0,
 	sufy,
-	0,
+	0
 };
blob - 7db2f85f33e0603362cc4545071413c9f15d7679
blob + 669ddb43c99100bd26c022cad7ad9ed3eba01d68
--- src/cmd/troff2html/chars.h
+++ src/cmd/troff2html/chars.h
@@ -191,5 +191,5 @@ Troffchar troffchars[] =
 	{ "ul", "_", },
 	{ "rn", " ", },
 	{ "**", "*", },
-	{ nil, nil, },
+	{ nil, nil, }
 };
blob - bce497421026ecf0f1a5e505baa86f9e44b55beb
blob + c0956c7d9fbca0b85b06f226a53faf43756ef5bc
--- src/cmd/troff2html/troff2html.c
+++ 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 @@ enum
 	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 @@ HTMLfont htmlfonts[] =
 	"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 @@ trailer(void)
 
 	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 @@ process(Biobuf *b, char *name)
 			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 @@ process(Biobuf *b, char *name)
 			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);
blob - 372295fd2bee0f199a66c38ccb3df13b5960ad5f
blob + 2127179fac2c2e5617388b89389e1d5a55f2534b
--- src/cmd/units.y
+++ src/cmd/units.y
@@ -8,7 +8,7 @@ enum
 	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;
blob - a040429065e7346fb2fbb8200e93b4dafec28669
blob + 91a8b4eacce199f8fe1537614e02360d2f983cda
--- src/cmd/upas/bayes/bayes.c
+++ src/cmd/upas/bayes/bayes.c
@@ -7,7 +7,7 @@
 enum
 {
 	MAXTAB = 256,
-	MAXBEST = 32,
+	MAXBEST = 32
 };
 
 typedef struct Table Table;
blob - 80142deea50ad98ee6ff45a6dcad7e7444976128
blob + ce4dc58a6a770734cacb6e28bcd8a71789027108
--- src/cmd/upas/bayes/dfa.c
+++ src/cmd/upas/bayes/dfa.c
@@ -667,8 +667,8 @@ main(int argc, char **argv)
 		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);
blob - 9c7babd35d71917ba6233ea06406a16248c2277f
blob + 404538c1b606c564a7a21d72715cd9afaa053cd6
--- src/cmd/upas/bayes/dump.c
+++ src/cmd/upas/bayes/dump.c
@@ -55,8 +55,8 @@ main(int argc, char **argv)
 		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);
blob - bd3c571ca06b302526aef8b198e09ce29954386f
blob + 999ba50c33c810ecda849667f45b0dc487a76630
--- src/cmd/upas/bayes/msgclass.c
+++ src/cmd/upas/bayes/msgclass.c
@@ -15,7 +15,7 @@ enum
 {
 	MAXBEST = 32,
 	MAXLEN = 64,
-	MAXTAB = 256,
+	MAXTAB = 256
 };
 
 typedef struct Ndb Ndb;
@@ -163,7 +163,7 @@ main(int argc, char **argv)
 			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;
blob - 4f550095c82acf7252d589f075bc9f945b861d30
blob + cddf034a1c58f60da33d2a4b4b46612701cf7c94
--- src/cmd/upas/bayes/regen.c
+++ src/cmd/upas/bayes/regen.c
@@ -52,12 +52,12 @@ char *ignore[] = 
 
 	/* little things */
 	".",
-	"\n",
+	"\n"
 };
 
 char *keywords[] =
 {
-	"([a-zA-Z'`$!¡-￿]|[0-9]([.,][0-9])*)+",
+	"([a-zA-Z'`$!¡-￿]|[0-9]([.,][0-9])*)+"
 };
 
 int debug;
blob - 98f515789ea3bb426ea8615993c722c0d5a6e7f1
blob + a718a836c65e7d7e768b2e160d700ebdc198089c
--- src/cmd/upas/common/appendfiletombox.c
+++ src/cmd/upas/common/appendfiletombox.c
@@ -1,7 +1,7 @@
 #include "common.h"
 
 enum {
-	Buffersize = 64*1024,
+	Buffersize = 64*1024
 };
 
 typedef struct Inbuf Inbuf;
blob - 2a6925d2b57e6fc1ba724b4387368f8572579102
blob + 7a26dea1b11c0de0e2a9c5ff2653e9bbbd23cef8
--- src/cmd/upas/common/common.h
+++ src/cmd/upas/common/common.h
@@ -19,7 +19,7 @@ enum
 	Errlen=	128,
 	Pathlen= 256,
 	
-	RetryCode = 2,
+	RetryCode = 2
 };
 
 /*
blob - a1c29517632d90c7da52e549da612fd1870f88d4
blob + ced00033acdfd398e40634f3eb15e1f18691fcac
--- src/cmd/upas/common/libsys.c
+++ src/cmd/upas/common/libsys.c
@@ -805,9 +805,9 @@ remoteaddr(int fd, char *dir)
 	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 @@ docreate(char *file, int perm)
 	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 @@ docreate(char *file, int perm)
 	return 0;
 }
 
-//  create a mailbox
+/*  create a mailbox */
 int
 creatembox(char *user, char *folder)
 {
@@ -852,14 +852,14 @@ creatembox(char *user, char *folder)
 		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 @@ creatembox(char *user, char *folder)
 		*p = '/';
 	}
 
-	//  create the mbox
+	/*  create the mbox */
 	if(docreate(s_to_c(mailfile), 0622|DMAPPEND|DMEXCL) < 0)
 		return -1;
 
blob - ffcbf5b3caabb66243e11f1749e4d965b98815a5
blob + 14208ed6af55b68cd4f85c6fb411cab887f974e0
--- src/cmd/upas/fs/dat.h
+++ src/cmd/upas/fs/dat.h
@@ -79,7 +79,7 @@ enum
 	Dfile,
 	Dignore,
 
-	PAD64=	'=',
+	PAD64=	'='
 };
 
 typedef struct Mailbox Mailbox;
@@ -194,7 +194,7 @@ enum
 	Qmbox,
 	Qdir,
 	Qctl,
-	Qmboxctl,
+	Qmboxctl
 };
 
 #define PATH(id, f)	((((id)&0xfffff)<<10) | (f))
blob - b68b8d2e3ef111262257f9a41dc05bef16bb1f0c
blob + 728a95aa474a5c7488a8573889088ace16e4ba8b
--- src/cmd/upas/fs/fs.c
+++ 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 @@ struct Fid
 	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 @@ char 	*(*fcalls[])(Fid*) = {
 	[Tclunk]	rclunk,
 	[Tremove]	rremove,
 	[Tstat]		rstat,
-	[Twstat]	rwstat,
+	[Twstat]	rwstat
 };
 
 char	Eperm[] =	"permission denied";
@@ -125,12 +125,12 @@ char *dirtab[] =
 [Qunixdate]	"unixdate",
 [Qunixheader]	"unixheader",
 [Qctl]		"ctl",
-[Qmboxctl]	"ctl",
+[Qmboxctl]	"ctl"
 };
 
 enum
 {
-	Hsize=	1277,
+	Hsize=	1277
 };
 
 Hash	*htab[Hsize];
@@ -455,7 +455,7 @@ int infofields[] = {
 	Qsender,
 	Qmessageid,
 	Qlines,
-	-1,
+	-1
 };
 
 static int
@@ -654,7 +654,7 @@ dowalk(Fid *f, char *name)
 	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 @@ ropen(Fid *f)
 		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 @@ readmboxdir(Fid *f, uchar *buf, long off, int cnt, int
 			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 @@ readmboxdir(Fid *f, uchar *buf, long off, int cnt, int
 	} 
 
 	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 @@ readmboxdir(Fid *f, uchar *buf, long off, int cnt, int
 		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 @@ hdrlen(char *p, char *e)
 	return ep - p;
 }
 
-// rfc2047 non-ascii
+/* rfc2047 non-ascii */
 typedef struct Charset Charset;
 struct Charset {
 	char *name;
@@ -1386,7 +1386,7 @@ struct Charset {
 	{ "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 @@ rfc2047convert(String *s, char *token, int len)
 	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 @@ rfc2047convert(String *s, char *token, int len)
 	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 @@ rfc2047start(char *start, char *end)
 	return nil;
 }
 
-// convert a header line
+/* convert a header line */
 String*
 stringconvert(String *s, char *uneaten, int len)
 {
@@ -1521,7 +1521,7 @@ readheader(Message *m, char *buf, int off, int cnt)
 	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 @@ readheader(Message *m, char *buf, int off, int cnt)
 			continue;
 		}
 
-		// rfc2047 processing
+		/* rfc2047 processing */
 		s = stringconvert(s, p, n);
 		ns = s_len(s);
 		if(off > 0){
blob - dd67f64dade4b87bc9576e567ecd5d19904f0e48
blob + 48119fa77c2db201cc34634dc92b07288b8be315
--- src/cmd/upas/fs/imap4.c
+++ src/cmd/upas/fs/imap4.c
@@ -15,7 +15,7 @@ int	pipeline = 1;
 
 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 @@ struct Imap {
 
 	Thumbprint *thumb;
 
-	// open network connection
+	/* open network connection */
 	Biobuf bin;
 	Biobuf bout;
 	int fd;
@@ -56,9 +56,9 @@ removecr(char *s)
 	return s;
 }
 
-//
-// send imap4 command
-//
+/* */
+/* send imap4 command */
+/* */
 static void
 imap4cmd(Imap *imap, char *fmt, ...)
 {
@@ -89,7 +89,7 @@ enum {
 	EXISTS,
 	STATUS,
 	FETCH,
-	UNKNOWN,
+	UNKNOWN
 };
 
 static char *verblist[] = {
@@ -99,7 +99,7 @@ static char *verblist[] = {
 [BYE]	"BYE",
 [EXISTS]	"EXISTS",
 [STATUS]	"STATUS",
-[FETCH]	"FETCH",
+[FETCH]	"FETCH"
 };
 
 static int
@@ -141,7 +141,7 @@ imapgrow(Imap *imap, int n)
 		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 @@ imapgrow(Imap *imap, int n)
 }
 
 
-//
-// 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 @@ imap4resp(Imap *imap)
 				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 @@ imap4resp(Imap *imap)
 			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 @@ imap4resp(Imap *imap)
 				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 @@ imap4resp(Imap *imap)
 					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 @@ imap4resp(Imap *imap)
 					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 @@ imap4resp(Imap *imap)
 				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 @@ isokay(char *resp)
 	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 @@ imap4login(Imap *imap)
 	return nil;
 }
 
-//
-// push tls onto a connection
-//
+/* */
+/* push tls onto a connection */
+/* */
 int
 mypushtls(int fd)
 {
@@ -409,9 +409,9 @@ mypushtls(int fd)
 	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 @@ imap4dial(Imap *imap)
 	return nil;
 }
 
-//
-// close connection
-//
+/* */
+/* close connection */
+/* */
 #if 0  /* jpc */
 static void
 imap4hangup(Imap *imap)
@@ -489,9 +489,9 @@ imap4hangup(Imap *imap)
 }
 #endif
 
-//
-// download a single message
-//
+/* */
+/* download a single message */
+/* */
 static char*
 imap4fetch(Mailbox *mb, Message *m)
 {
@@ -522,7 +522,7 @@ imap4fetch(Mailbox *mb, Message *m)
 
 	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 @@ imap4fetch(Mailbox *mb, Message *m)
 	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 @@ imap4read(Imap *imap, Mailbox *mb, int doplumb)
 				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 @@ imap4read(Imap *imap, Mailbox *mb, int doplumb)
 		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 @@ imap4read(Imap *imap, Mailbox *mb, int doplumb)
 		l = &(*l)->next;
 	}
 
-	// download new messages
+	/* download new messages */
 	t = imap->tag;
 	if(pipeline)
 	switch(rfork(RFPROC|RFMEM)){
@@ -631,7 +631,7 @@ imap4read(Imap *imap, Mailbox *mb, int doplumb)
 		}
 
 		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 @@ imap4read(Imap *imap, Mailbox *mb, int doplumb)
 	return nil;
 }
 
-//
-// sync mailbox
-//
+/* */
+/* sync mailbox */
+/* */
 static void
 imap4purge(Imap *imap, Mailbox *mb)
 {
@@ -682,9 +682,9 @@ imap4purge(Imap *imap, Mailbox *mb)
 	}
 }
 
-//
-// connect to imap4 server, sync mailbox
-//
+/* */
+/* connect to imap4 server, sync mailbox */
+/* */
 static char*
 imap4sync(Mailbox *mb, int doplumb)
 {
@@ -705,7 +705,7 @@ imap4sync(Mailbox *mb, int doplumb)
 	/*
 	 * 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 @@ imap4ctl(Mailbox *mb, int argc, char **argv)
 	return Eimap4ctl;
 }
 
-//
-// free extra memory associated with mb
-//
+/* */
+/* free extra memory associated with mb */
+/* */
 static void
 imap4close(Mailbox *mb)
 {
@@ -771,9 +771,9 @@ imap4close(Mailbox *mb)
 	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 @@ imap4mbox(Mailbox *mb, char *path)
 	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
blob - c539df8de3ff86d967699ad7de54d5d56b427021
blob + 2f4837473d6f2f904b725628ee9055b411b3638f
--- src/cmd/upas/fs/mbox.c
+++ src/cmd/upas/fs/mbox.c
@@ -53,7 +53,7 @@ Header head[] =
 [Mhead]	{ "content-type:", ctype, },
 	{ "content-transfer-encoding:", cencoding, },
 	{ "content-disposition:", cdisposition, },
-	{ 0, },
+	{ 0, }
 };
 
 /* static	void	fatal(char *fmt, ...); jpc */
@@ -76,13 +76,13 @@ char *Enotme = "path not served by this file server";
 
 enum
 {
-	Chunksize = 1024,
+	Chunksize = 1024
 };
 
 Mailboxinit *boxinit[] = {
 	imap4mbox,
 	pop3mbox,
-	plan9mbox,
+	plan9mbox
 };
 
 char*
@@ -119,7 +119,7 @@ newmbox(char *path, char *name, int std)
 	}
 
 	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 @@ newmbox(char *path, char *name, int std)
 		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 @@ newmbox(char *path, char *name, int std)
 		}
 	}
 
-	// always try locking
+	/* always try locking */
 	mb->dolock = 1;
 
 	mb->refs = 1;
@@ -172,7 +172,7 @@ newmbox(char *path, char *name, int std)
 	return rv;
 }
 
-// close the named mailbox
+/* close the named mailbox */
 void
 freembox(char *name)
 {
@@ -248,7 +248,7 @@ parseheaders(Message *m, int justmime, Mailbox *mb, in
 		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 @@ parseheaders(Message *m, int justmime, Mailbox *mb, in
 	}
 	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 @@ parseheaders(Message *m, int justmime, Mailbox *mb, in
 		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 @@ parseheaders(Message *m, int justmime, Mailbox *mb, in
 			}
 		}
 
-		// 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 @@ parseheaders(Message *m, int justmime, Mailbox *mb, in
 	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 @@ parsebody(Message *m, Mailbox *mb)
 {
 	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 @@ parsebody(Message *m, Mailbox *mb)
 		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 @@ parseattachments(Message *m, Mailbox *mb)
 	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 @@ parseattachments(Message *m, Mailbox *mb)
 		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 @@ addr822(char *p)
 	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 @@ addr822(char *p)
 			continue;
 		}
 
-		// ignore everything in an expicit comment
+		/* ignore everything in an expicit comment */
 		if(!quoted && c == '('){
 			incomment = 1;
 			continue;
@@ -532,7 +532,7 @@ addr822(char *p)
 			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 @@ addr822(char *p)
 			continue;
 		}
 
-		// commas separate addresses
+		/* commas separate addresses */
 		if(!quoted && c == ',' && !inanticomment){
 			s_terminate(s);
 			addrdone = 0;
@@ -555,10 +555,10 @@ addr822(char *p)
 			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 @@ newmessage(Message *parent)
 	return m;
 }
 
-// delete a message from a mailbox
+/* delete a message from a mailbox */
 void
 delmessage(Mailbox *mb, Message *m)
 {
@@ -812,13 +812,13 @@ delmessage(Mailbox *mb, Message *m)
 	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 @@ delmessage(Mailbox *mb, Message *m)
 	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 @@ setfilename(Message *m, char *p)
 			*p = '_';
 }
 
-//
-// undecode message body
-//
+/* */
+/* undecode message body */
+/* */
 void
 decode(Message *m)
 {
@@ -1033,7 +1033,7 @@ decode(Message *m)
 	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 @@ decode(Message *m)
 		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 @@ decode(Message *m)
 	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 @@ convert(Message *m)
 enum
 {
 	Self=	1,
-	Hex=	2,
+	Hex=	2
 };
 uchar	tableqp[256];
 
@@ -1243,7 +1243,7 @@ decquoted(char *out, char *in, char *e)
 	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 @@ is8bit(Message *m)
 	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 @@ latin1toutf(char *out, char *in, char *e)
 	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 @@ xtoutf(char *charset, char **out, char *in, char *e)
 		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 @@ xtoutf(char *charset, char **out, char *in, char *e)
 
 enum {
 	Winstart= 0x7f,
-	Winend= 0x9f,
+	Winend= 0x9f
 };
 
 Rune winchars[] = {
@@ -1388,7 +1388,7 @@ Rune winchars[] = {
 	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 @@ mailplumb(Mailbox *mb, Message *m, int delete)
 	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 @@ nullsqueeze(Message *m)
 }
 
 
-//
-// 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*
blob - 89ee2922c01ed0e39497fea2723babdf98f866ac
blob + 3a5b4486a4ccb1884c856fd22c6b7192452d2c0b
--- src/cmd/upas/fs/plan9.c
+++ 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 @@ addtomessage(Message *m, uchar *p, int n, int done)
 {
 	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 @@ addtomessage(Message *m, uchar *p, int n, int done)
 	m->end += n;
 }
 
-//
-//  read in a single message
-//
+/* */
+/*  read in a single message */
+/* */
 static int
 readmessage(Message *m, Inbuf *inb)
 {
@@ -83,9 +83,9 @@ readmessage(Message *m, Inbuf *inb)
 			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 @@ readmessage(Message *m, Inbuf *inb)
 			}
 		}
 
-		// 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 @@ readmessage(Message *m, Inbuf *inb)
 }
 
 
-// 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 @@ purgedeleted(Mailbox *mb)
 	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 @@ retry:
 	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 @@ retry:
 			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 @@ retry:
 				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 @@ retry:
 	}
 	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 @@ plan9syncmbox(Mailbox *mb, int doplumb)
 	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)
 {
blob - ebffcdd313d1fd681d603e9a01ee110961f54234
blob + da8021dd29ba386f5ae597364b14009140380192
--- src/cmd/upas/fs/pop3.c
+++ 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 @@ struct Pop {
 	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 @@ geterrstr(void)
 	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 @@ pop3pushtls(Pop *pop)
 	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 @@ pop3pushtls(Pop *pop)
 	return nil;
 }
 
-//
-// get capability list, possibly start tls
-//
+/* */
+/* get capability list, possibly start tls */
+/* */
 static char*
 pop3capa(Pop *pop)
 {
@@ -183,9 +183,9 @@ pop3capa(Pop *pop)
 	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 @@ pop3login(Pop *pop)
 	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 @@ pop3login(Pop *pop)
 	}
 }
 
-//
-// dial and handshake with pop server
-//
+/* */
+/* dial and handshake with pop server */
+/* */
 static char*
 pop3dial(Pop *pop)
 {
@@ -277,9 +277,9 @@ pop3dial(Pop *pop)
 	return nil;
 }
 
-//
-// close connection
-//
+/* */
+/* close connection */
+/* */
 static void
 pop3hangup(Pop *pop)
 {
@@ -288,9 +288,9 @@ pop3hangup(Pop *pop)
 	close(pop->fd);
 }
 
-//
-// download a single message
-//
+/* */
+/* download a single message */
+/* */
 static char*
 pop3download(Pop *pop, Message *m)
 {
@@ -361,13 +361,13 @@ pop3download(Pop *pop, Message *m)
 
 	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 @@ pop3download(Pop *pop, Message *m)
 	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 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 	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 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 
 			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 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 			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 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 		l = &(*l)->next;
 	}
 
-	// download new messages
+	/* download new messages */
 	nnew = 0;
 	if(pop->pipeline){
 		switch(rfork(RFPROC|RFMEM)){
@@ -485,7 +485,7 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 			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 @@ pop3read(Pop *pop, Mailbox *mb, int doplumb)
 	return nil;	
 }
 
-//
-// delete marked messages
-//
+/* */
+/* delete marked messages */
+/* */
 static void
 pop3purge(Pop *pop, Mailbox *mb)
 {
@@ -554,7 +554,7 @@ pop3purge(Pop *pop, Mailbox *mb)
 }
 
 
-// connect to pop3 server, sync mailbox
+/* connect to pop3 server, sync mailbox */
 static char*
 pop3sync(Mailbox *mb, int doplumb)
 {
@@ -625,7 +625,7 @@ pop3ctl(Mailbox *mb, int argc, char **argv)
 	return Epop3ctl;
 }
 
-// free extra memory associated with mb
+/* free extra memory associated with mb */
 static void
 pop3close(Mailbox *mb)
 {
@@ -636,9 +636,9 @@ pop3close(Mailbox *mb)
 	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)
 {
blob - da54c760239051ffc6b3d81c5de8be5c1d33887e
blob + fb94fa611e28a9e330f97190593687275ad0530f
--- src/cmd/upas/marshal/marshal.c
+++ src/cmd/upas/marshal/marshal.c
@@ -53,12 +53,12 @@ enum {
 	Hcontent,
 	Hx,
 	Hprecedence,
-	Nhdr,
+	Nhdr
 };
 
 enum {
 	PGPsign = 1,
-	PGPencrypt = 2,
+	PGPencrypt = 2
 };
 
 char *hdrs[Nhdr] = {
@@ -76,7 +76,7 @@ char *hdrs[Nhdr] = {
 [Hmime]		"mime-",
 [Hcontent]	"content-",
 [Hx]		"x-",
-[Hprecedence]	"precedence",
+[Hprecedence]	"precedence"
 };
 
 struct Ctype {
@@ -92,7 +92,7 @@ Ctype ctype[] = {
 	{ "text/tab-separated-values",	"tsv",	1,	},
 	{ "text/richtext",		"rtx",	1,	},
 	{ "message/rfc822",		"txt",	1,	},
-	{ "", 				0,	0,	},
+	{ "", 				0,	0,	}
 };
 
 Ctype *mimetypes;
@@ -153,7 +153,7 @@ enum
 	Ok = 0,
 	Nomessage = 1,
 	Nobody = 2,
-	Error = -1,
+	Error = -1
 };
 
 #pragma varargck	type	"Z"	char*
@@ -244,27 +244,27 @@ threadmain(int argc, char **argv)
 		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 @@ threadmain(int argc, char **argv)
 	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 @@ threadmain(int argc, char **argv)
 		}
 
 		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 @@ threadmain(int argc, char **argv)
 		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 @@ threadmain(int argc, char **argv)
 		}
 	}
 
-	// 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 @@ threadmain(int argc, char **argv)
 		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 @@ threadmain(int argc, char **argv)
 			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 @@ threadmain(int argc, char **argv)
 	threadexitsall(waitforsubprocs());
 }
 
-// evaluate pgp option string
+/* evaluate pgp option string */
 int
 pgpopts(char *s)
 {
@@ -448,9 +448,9 @@ pgpopts(char *s)
 	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 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **t
 			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 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **t
 			}
 		}
 
-		// 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 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **t
 		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 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **t
 
 		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 @@ readheaders(Biobuf *in, int *fp, String **sp, Addr **t
 	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 @@ body(Biobuf *in, Biobuf *out, int docontenttype)
 	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 @@ body(Biobuf *in, Biobuf *out, int docontenttype)
 		buf[n++] = '\n';
 	}
 
-	// read into memory
+	/* read into memory */
 	if(docontenttype){
 		while(docontenttype){
 			if(n == len){
@@ -604,7 +604,7 @@ body(Biobuf *in, Biobuf *out, int docontenttype)
 		}
 	}
 
-	// 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 @@ body(Biobuf *in, Biobuf *out, int docontenttype)
 		lastchar = '\n';
 
 
-	// pass the rest
+	/* pass the rest */
 	for(;;){
 		n = Bread(in, buf, len);
 		if(n < 0)
@@ -626,15 +626,15 @@ body(Biobuf *in, Biobuf *out, int docontenttype)
 	}
 }
 
-// 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 @@ body64(Biobuf *in, Biobuf *out)
 	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 @@ attachment(Attach *a, Biobuf *out)
 
 	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 @@ attachment(Attach *a, Biobuf *out)
 		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 @@ mkattach(char *file, char *type, int inline)
 		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 @@ mkattach(char *file, char *type, int inline)
 			}
 	}
 
-	// try the mime types file
+	/* try the mime types file */
 	if(p != nil){
 		if(mimetypes == nil)
 			readmimetypes();
@@ -886,8 +886,8 @@ mkattach(char *file, char *type, int inline)
 			}
 	}
 
-	// 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 @@ mkboundary(void)
 	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 @@ teeproc(void *v)
 	write(a[2], "\n", 1);
 }
 
-// print the unix from line
+/* print the unix from line */
 int
 printunixfrom(int fd)
 {
@@ -987,7 +987,7 @@ char *specialfile[] =
 	"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 @@ special(String *s)
 	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 @@ openfolder(char *rcvr)
 	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 @@ openfolder(char *rcvr)
 	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 @@ sendmail(Addr *to, Addr *cc, int *pid, char *rcvr)
 	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 @@ pgpfilter(int *pid, int fd, int pgpflag)
 	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 @@ freealiases(Alias *a)
 	}
 }
 
-//
-//  read alias file
-//
+/* */
+/*  read alias file */
+/* */
 Alias*
 readaliases(void)
 {
@@ -1328,7 +1328,7 @@ readaliases(void)
 	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 @@ readaliases(void)
 
 	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 @@ newaddr(char *name)
 	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 @@ expand(int ac, char **av)
 
 	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 @@ expand(int ac, char **av)
 		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 @@ s_copyn(char *s, int n)
 	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 @@ enum {
 	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 @@ get822token(String **tok, char *p, char **pp)
 		*pp = nil;
 		return Tend;
 
-	case ' ':	// get whitespace
+	case ' ':	/* get whitespace */
 	case '\t':
 	case '\n':
 	case '\r':
@@ -1560,7 +1560,7 @@ get822token(String **tok, char *p, char **pp)
 			p++;
 		break;
 
-	case '(':	// get comment
+	case '(':	/* get comment */
 		type = Tcomment;
 		for(p++; *p && *p != ')'; p++)
 			if(*p == '\\') {
@@ -1589,7 +1589,7 @@ get822token(String **tok, char *p, char **pp)
 		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 @@ get822token(String **tok, char *p, char **pp)
 	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 @@ expandline(String **s, Addr *to)
 	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 @@ expandline(String **s, Addr *to)
 			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 @@ readmimetypes(void)
 		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 @@ erealloc(void *x, int n)
 	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
blob - c6ca2f28a3b3e6cddd84d20fbe53f39eed6d4fb0
blob + 193d8f2133117804fc91258ab9161b53e68280e9
--- src/cmd/upas/ned/nedmail.c
+++ src/cmd/upas/ned/nedmail.c
@@ -31,7 +31,7 @@ struct Message {
 	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 @@ struct {
 	{ "|",	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 @@ threadmain(int argc, char **argv)
 			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 @@ threadmain(int argc, char **argv)
 			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 @@ mkaddrs(char *t)
 	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 @@ freemessage(Message *m)
 	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 @@ dir2message(Message *parent, int reverse)
 	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 @@ dir2message(Message *parent, int reverse)
 		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 @@ dir2message(Message *parent, int reverse)
 	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 @@ dir2message(Message *parent, int reverse)
 	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 @@ dosingleton(Message *parent, char *path)
 	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 @@ dosingleton(Message *parent, char *path)
 	return m;
 }
 
-//
-//  read a file into a string
-//
+/* */
+/*  read a file into a string */
+/* */
 String*
 file2string(String *dir, char *file)
 {
@@ -605,9 +605,9 @@ file2string(String *dir, char *file)
 	return s;
 }
 
-//
-//  get the length of a file
-//
+/* */
+/*  get the length of a file */
+/* */
 int
 filelen(String *dir, char *file)
 {
@@ -627,9 +627,9 @@ filelen(String *dir, char *file)
 	return rv;
 }
 
-//
-//  walk the path name an element
-//
+/* */
+/*  walk the path name an element */
+/* */
 String*
 extendpath(String *dir, char *name)
 {
@@ -720,21 +720,21 @@ cracktime(char *d, char *out, int len)
 	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 @@ snprintheader(char *buf, int len, Message *m)
 	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 @@ snprintHeader(char *buf, int len, int indent, Message 
 	char typeid[64];
 	char *p, *e;
 
-	// create id
+	/* create id */
 	id = s_new();
 	mkid(id, m);
 
@@ -900,17 +900,17 @@ snprintHeader(char *buf, int len, int indent, Message 
 
 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 @@ parseaddr(char **pp, Message *first, Message *cur, Mes
 	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 @@ rawsearch(Message *m, Reprog *prog)
 	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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 	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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 		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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 				*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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 		}
 	} 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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 			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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 			if(s == nil)
 				return "null address range";
 		} else {
-			// single address
+			/* single address */
 			if(s != &top){
 				*l = s;
 				s->cmd = nil;
@@ -1222,7 +1222,7 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 		}
 	}
 
-	// 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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 	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 @@ parsecmd(char *p, Cmd *cmd, Message *first, Message *c
 	return nil; 
 }
 
-// inefficient read from standard input
+/* inefficient read from standard input */
 char*
 readline(char *prompt, char *line, int len)
 {
@@ -1471,7 +1471,7 @@ pcmd(Cmd *x, Message *m)
 	} 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 @@ quotecmd(Cmd *x, Message *m)
 	return m;
 }
 
-// really delete messages
+/* really delete messages */
 Message*
 flushdeleted(Message *cur)
 {
@@ -1611,7 +1611,7 @@ flushdeleted(Message *cur)
 			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 @@ flushdeleted(Message *cur)
 		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 @@ flushdeleted(Message *cur)
 	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 @@ qcmd(Cmd *x, Message *m)
 	Bflush(&out);
 
 	exitfs(0);
-	return nil;	// not reached
+	return nil;	/* not reached */
 }
 
 Message*
@@ -1692,7 +1692,7 @@ xcmd(Cmd *x, Message *m)
 	USED(m);
 
 	exitfs(0);
-	return nil;	// not reached
+	return nil;	/* not reached */
 }
 
 Message*
@@ -1776,7 +1776,7 @@ tomailer(char **av)
 	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 @@ tomailer(char **av)
 	return 0;
 }
 
-//
-// like tokenize but obey "" quoting
-//
+/* */
+/* like tokenize but obey "" quoting */
+/* */
 int
 tokenize822(char *str, char **args, int max)
 {
@@ -2077,7 +2077,7 @@ appendtofile(Message *m, char *part, char *base, int m
 	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 @@ appendtofile(Message *m, char *part, char *base, int m
 		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 @@ char *specialfile[] =
 	"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 @@ special(String *s)
 	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 @@ foldername(char *rcvr)
 	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 @@ xpipecmd(Cmd *c, Message *m, char *part)
 	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 @@ closemb(void)
 	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 @@ switchmb(char *file, char *singleton)
 	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 @@ switchmb(char *file, char *singleton)
 	
 		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 @@ switchmb(char *file, char *singleton)
 			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 @@ switchmb(char *file, char *singleton)
 	return 0;
 }
 
-// like tokenize but for into lines
+/* like tokenize but for into lines */
 int
 lineize(char *s, char **f, int n)
 {
blob - 7e5e8121d1e6405a0d28a4919fa7197d287cbb11
blob + f30e51c177dad7f2f9d26b2bdca9a2b483789b05
--- src/cmd/upas/nfs/a.h
+++ src/cmd/upas/nfs/a.h
@@ -27,7 +27,7 @@ enum
 	NoEncoding,
 	QuotedPrintable,
 	QuotedPrintableU,
-	Base64,
+	Base64
 };
 
 char*	decode(int, char*, int*);
blob - 044edf200a6803b252e5c853197fbdccdeab1093
blob + f7a52bc508dc7564b6aff7d7a6961455dca13f38
--- src/cmd/upas/nfs/box.c
+++ src/cmd/upas/nfs/box.c
@@ -6,7 +6,7 @@ enum
 	BoxChunk = 64,
 	MsgChunk = 256,
 	PartChunk = 4,
-	PartSubChunk = 4,
+	PartSubChunk = 4
 };
 
 Box **boxes;
blob - 9513df731bec4d710acd8d0c20029b19e2012705
blob + da2b0ab50b3b544e408fa092337169b1d231ef1a
--- src/cmd/upas/nfs/box.h
+++ src/cmd/upas/nfs/box.h
@@ -11,7 +11,7 @@ enum
 	FlagMarked = 1<<8,
 	FlagNoSelect = 1<<9,
 	FlagUnMarked = 1<<10,
-	FlagRecent = 1<<11,
+	FlagRecent = 1<<11
 };
 
 typedef struct Box Box;
blob - 572ae7b4a638c479499a6955897a29fb634b54b8
blob + 2d7185b8909d7ff0b9534a6dd86989ec0e4b3905
--- src/cmd/upas/nfs/decode.c
+++ src/cmd/upas/nfs/decode.c
@@ -105,7 +105,7 @@ struct {
 	"big5",			"big5",
 	"iso-2022-jp",	"jis-kanji",
 	"windows-1251",	"cp1251",
-	"koi8-r",			"koi8",
+	"koi8-r",			"koi8"
 };
 
 char*
blob - 2b94e9786b8bc31f234ac327a99f6470d908c651
blob + d170c8358095ba96ac7eb329089f7363a646ef9a
--- src/cmd/upas/nfs/fs.c
+++ src/cmd/upas/nfs/fs.c
@@ -77,7 +77,7 @@ enum
 	Qunixheader,
 	
 	Qfile0 = Qbody,
-	Qnfile = Qunixheader+1-Qfile0,
+	Qnfile = Qunixheader+1-Qfile0
 };
 
 static char Egreg[] = "gone postal";
@@ -189,7 +189,7 @@ static struct {
 	Qidstr,			"idstr",
 	Qdesc,			"desc",
 	Qencoding,		"encoding",
-	Qcharset,		"charset",
+	Qcharset,		"charset"
 };
 
 char*
@@ -334,9 +334,9 @@ static struct {
 	FlagNonJunk,		"notjunk",
 	FlagReplied,	"replied",
 	FlagFlagged,		"flagged",
-//	FlagDeleted,		"deleted",
+/*	FlagDeleted,		"deleted", */
 	FlagDraft,		"draft",
-	FlagSeen,			"seen",
+	FlagSeen,			"seen"
 };
 
 static void
@@ -604,9 +604,9 @@ filedata(int type, Box *box, Msg *msg, Part *part, cha
 			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 @@ static int mimemsgdir[] = {
 	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 @@ msggen(int i, Dir *d, void *aux)
 
 enum
 {
-	CMhangup,
+	CMhangup
 };
 static Cmdtab ctltab[] =
 {
-	CMhangup, "hangup", 2,
+	CMhangup, "hangup", 2
 };
 
 enum
@@ -848,7 +848,7 @@ enum
 	CMread,
 	CMsave,
 	CMjunk,
-	CMnonjunk,
+	CMnonjunk
 };
 static Cmdtab boxctltab[] =
 {
@@ -858,7 +858,7 @@ static Cmdtab boxctltab[] =
 	CMread,		"read", 0,
 	CMsave,		"save", 0,
 	CMjunk,		"junk", 0,
-	CMnonjunk,	"nonjunk", 0,
+	CMnonjunk,	"nonjunk", 0
 };
 
 static void
@@ -996,7 +996,7 @@ fswrite(Req *r)
 			}
 			nm = mkmsglist(box, cb->f+2, cb->nf-2, &m);
 			if(nm != cb->nf-2){
-			//	free(m);
+			/*	free(m); */
 				respond(r, Enomsg);
 				break;
 			}
blob - 546193bad6bd22774b2d61963296d2c1489f65aa
blob + b79acf533bf5d307786b5d8e4c79b40967618df5
--- src/cmd/upas/nfs/imap.c
+++ src/cmd/upas/nfs/imap.c
@@ -50,7 +50,7 @@ static struct {
 	"\\NoInferiors",	FlagNoInferiors,
 	"\\NoSelect",	FlagNoSelect,
 	"\\Marked",	FlagMarked,
-	"\\UnMarked",	FlagUnMarked,
+	"\\UnMarked",	FlagUnMarked
 };
 
 int			chattyimap;
@@ -775,7 +775,7 @@ enum
 {
 	Qok = 0,
 	Qquote,
-	Qbackslash,
+	Qbackslash
 };
 
 static int
@@ -1172,7 +1172,7 @@ static struct {
 	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 @@ static struct {
 	"RFC822.SIZE", xmsgrfc822size,
 	"ENVELOPE", xmsgenvelope,
 	"BODY", xmsgbody,
-	"BODY[", xmsgbodydata,
+	"BODY[", xmsgbodydata
 };
 
 static void
@@ -1460,7 +1460,7 @@ static struct {
 	char *name;
 	int offset;
 } paramtab[] = {
-	"charset",	offsetof(Part, charset),
+	"charset",	offsetof(Part, charset)
 };
 
 static void
@@ -1641,7 +1641,7 @@ struct {
 	"PERMANENTFLAGS", 'L',	xokpermflags,
 	"UNSEEN", 'N',	xokunseen,
 	"READ-WRITE", 0,	xokreadwrite,
-	"READ-ONLY",	0, xokreadonly,
+	"READ-ONLY",	0, xokreadonly
 };
 
 static void
@@ -1695,24 +1695,24 @@ xokuidvalidity(Imap *z, Sx *sx)
 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; */
 }
 
blob - 910f002e8cb5b29cb723f79839181227e186ac9e
blob + 38a801d45ba3115a0dc70b8e5f23e12b5d821356
--- src/cmd/upas/nfs/sx.h
+++ src/cmd/upas/nfs/sx.h
@@ -8,7 +8,7 @@ enum
 	SxAtom,
 	SxString,
 	SxNumber,
-	SxList,
+	SxList
 };
 
 typedef struct Sx Sx;
blob - 84e92b1824beaac666a495077d421e1d34c8fd19
blob + af674368515fa877152d695f57e7ac1c89105981
--- src/cmd/upas/pop3/pop3.c
+++ src/cmd/upas/pop3/pop3.c
@@ -54,7 +54,7 @@ Cmd cmdtab[] =
 	"top", 1, topcmd,
 	"uidl", 1, uidlcmd,
 	"user", 0, usercmd,
-	0, 0, 0,
+	0, 0, 0
 };
 
 static Biobuf in;
@@ -729,7 +729,7 @@ enableaddr(void)
 	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 @@ passcmd(char *arg)
 	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);
blob - eab9e2fcc943b026150e8bfa9985667d1f6d1e8b
blob + 2e3685040fcd95947cc6139bc46df89b86089a41
--- src/cmd/upas/scanmail/common.c
+++ 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 @@ Keyword	keywords[] =
 	"hold",		Hold,
 	"dump",		Dump,
 	"loff",		Lineoff,
-	0,		Nactions,
+	0,		Nactions
 };
 
 Patterns patterns[] = {
@@ -74,7 +74,7 @@ Patterns patterns[] = {
 [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 @@ conv64(char *msg, char *end, char *buf, int bufsize)
 	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 @@ static uchar t64d[256] = {
 /*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
 };
blob - f1d24b2e0a6b13abe9565a47d94d30c712d76235
blob + 109329f4a3d5ad9d40e0955bc78dfa58348af134
--- src/cmd/upas/scanmail/spam.h
+++ src/cmd/upas/scanmail/spam.h
@@ -15,7 +15,7 @@ enum{
 	MaxHtml		= 256,
 	Hdrsize		= 4096,
 	Bodysize	= 8192,
-	Maxread		= 64*1024,
+	Maxread		= 64*1024
 };
 
 typedef struct spat 	Spat;
blob - 34393a96a8f19f56d6d51603818e48f7e457db26
blob + 3ec8d706eb2610f42a48b412ac85dc4e986b9000
--- src/cmd/upas/send/message.c
+++ src/cmd/upas/send/message.c
@@ -171,7 +171,7 @@ static char *fieldname[] =
 [MESSAGEID-WORD]	"MESSAGEID",
 [RECEIVED-WORD]	"RECEIVED",
 [MAILER-WORD]	"MAILER",
-[BADTOKEN-WORD]	"BADTOKEN",
+[BADTOKEN-WORD]	"BADTOKEN"
 };
 #endif
 
blob - 47ff9ecc8ee596a98ec5580aeea993a6b56fab74
blob + d68a5d16660de5938c73627a85d6a01be55e21bd
--- src/cmd/upas/smtp/mxdial.c
+++ src/cmd/upas/smtp/mxdial.c
@@ -6,7 +6,7 @@
 enum
 {
 	Nmx=	16,
-	Maxstring=	256,
+	Maxstring=	256
 };
 
 typedef struct Mx	Mx;
blob - 1f12e48e78c6f7058b874912ecfa6780e808290b
blob + cacf86729622ee4c4a171cfb6f4ddd7a12ad6012
--- src/cmd/upas/smtp/rfc822.tab.c
+++ src/cmd/upas/smtp/rfc822.tab.c
@@ -603,7 +603,7 @@ static	const	short	yyexca[] =
 	31, 72,
 	32, 72,
 	35, 72,
-	-2, 74,
+	-2, 74
 };
 #define	YYNPROD	122
 #define	YYPRIVATE 57344
blob - d3297dfa4f5030b296feb6217fd33427596357b7
blob + fd867cd6474d49b3d9833fdc5883f2012bf585d3
--- src/cmd/upas/smtp/smtp.c
+++ src/cmd/upas/smtp/smtp.c
@@ -179,7 +179,7 @@ threadmain(int argc, char **argv)
 	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 @@ dotls(char *me)
 		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);
blob - 3a8e60e275b0da16761a8850620aad310863118d
blob + bb982a2f398e625a598e6f6b9e7b1377841c33f6
--- src/cmd/upas/smtp/smtpd.h
+++ src/cmd/upas/smtp/smtpd.h
@@ -8,7 +8,7 @@ enum {
 	TRUSTED,
 	NONE,
 
-	MAXREJECTS = 100,
+	MAXREJECTS = 100
 };
 
 	
blob - a4d49485e654e60445a8fda3d904da30923fe5ed
blob + 723e341d5e2a5f4cd524d2bf1116c85b7498ed47
--- src/cmd/upas/smtp/spam.c
+++ src/cmd/upas/smtp/spam.c
@@ -11,7 +11,7 @@ enum {
 	OURDOMS,
 
 	IP = 0,
-	STRING,
+	STRING
 };
 
 
@@ -29,7 +29,7 @@ static Keyword options[] = {
 	"defaultdomain",	DOMNAME,	
 	"ournets",		OURNETS,
 	"ourdomains",		OURDOMS,
-	0,			NONE,
+	0,			NONE
 };
 
 static Keyword actions[] = {
@@ -38,7 +38,7 @@ static Keyword actions[] = {
 	"deny",			DENIED,
 	"dial",			DIALUP,
 	"delay",		DELAY,
-	0,			NONE,
+	0,			NONE
 };
 
 static	int	hisaction;
blob - bc8a7960fec47f60dcde5cb71feb6bac109bca97
blob + 4a8846b28abbb31b7892c6d5284628d6cd5d5f2f
--- src/cmd/upas/vf/vf.c
+++ src/cmd/upas/vf/vf.c
@@ -41,18 +41,18 @@ static void	writeheader(Part *p, int);
 
 enum
 {
-	// encodings
+	/* encodings */
 	Enone=	0,
 	Ebase64,
 	Equoted,
 
-	// disposition possibilities
+	/* disposition possibilities */
 	Dnone=	0,
 	Dinline,
 	Dfile,
 	Dignore,
 
-	PAD64=	'=',
+	PAD64=	'='
 };
 
 /*
@@ -98,7 +98,7 @@ Hdef hdefs[] =
 	{ "content-type:", ctype, },
 	{ "content-transfer-encoding:", cencoding, },
 	{ "content-disposition:", cdisposition, },
-	{ 0, },
+	{ 0, }
 };
 
 /*
@@ -926,7 +926,7 @@ struct Charset {
 {
 	{ "us-ascii",		8,	1, },
 	{ "utf-8",		5,	0, },
-	{ "iso-8859-1",		10,	1, },
+	{ "iso-8859-1",		10,	1, }
 };
 
 /*
@@ -951,7 +951,7 @@ tokenconvert(String *t)
 	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 @@ tokenconvert(String *t)
 	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 @@ err:
 enum
 {
 	Self=	1,
-	Hex=	2,
+	Hex=	2
 };
 uchar	tableqp[256];
 
@@ -1084,7 +1084,7 @@ decquoted(char *out, char *in, char *e)
 	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;
blob - 869ea7a2ebb745c6de71018319f54cd5e02bb412
blob + 1967c43614fd3f81cbbc599f00db92da77f29821
--- src/cmd/vac/dat.h
+++ src/cmd/vac/dat.h
@@ -7,7 +7,7 @@ enum {
 	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 */
 };
 
 
blob - e5629aed16d143f4f301cc9bad65c3ba26834bde
blob + 893d6a82935ecd6cf0e995b5478bb9e8153e1958
--- src/cmd/vac/file.c
+++ src/cmd/vac/file.c
@@ -917,12 +917,12 @@ vacfilesetdir(VacFile *f, VacDir *dir, char *uid)
 	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 @@ fprint(2, "fileMetaFlush moving entry from %ud -> %ud\
 	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 @@ chksource(VacFile *f)
 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 @@ filerunlock(VacFile *f)
 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 @@ static void
 filemetalock(VacFile *f)
 {
 	assert(f->up != nil);
-//	assert(!canwlock(&f->fs->elk));
+/*	assert(!canwlock(&f->fs->elk)); */
 	wlock(&f->up->lk);
 }
 
blob - d45cd0fe594d174e920212b95409548db827a30f
blob + 81143337d5789f40d7edd60762f2970ea7a4294b
--- src/cmd/vac/rtest.c
+++ src/cmd/vac/rtest.c
@@ -2,7 +2,7 @@
 
 enum {
 	Nblock = 300000,
-	BlockSize = 8*1024,
+	BlockSize = 8*1024
 };
 
 uchar data[Nblock*VtScoreSize];
blob - 5dec719f4f221bae5720ecff372db69da735f5f0
blob + 8f3b2a0c9266fd148aec8f48c70a51d3e4bd6a2d
--- src/cmd/vac/srcload.c
+++ src/cmd/vac/srcload.c
@@ -89,12 +89,12 @@ stats(r);
 	}
 
 	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);
blob - c38365be55cb0b70ac1c717f901e10ff53e88b64
blob + 637c49c03441f4bc3adaba13a1f71aae1b762386
--- src/cmd/vac/vac-orig.c
+++ src/cmd/vac/vac-orig.c
@@ -73,7 +73,7 @@ void plan9ToVacDir(VacDir*, Dir*, ulong entry, uvlong 
 enum {
 	Version = 8,
 	BlockSize = 8*1024,
-	MaxExclude = 1000,
+	MaxExclude = 1000
 };
 
 struct {
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
 	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();
 
blob - 9ff3d12af23bf0701918a807a884c34f8910416f
blob + 4848d7cef34947b0455a96abe2b335d990ec9c02
--- src/cmd/vac/vac.c
+++ src/cmd/vac/vac.c
@@ -77,7 +77,7 @@ void plan9tovacdir(VacDir*, Dir*, ulong entry, uvlong 
 enum {
 	Version = 8,
 	BlockSize = 8*1024,
-	MaxExclude = 1000,
+	MaxExclude = 1000
 };
 
 struct {
@@ -202,7 +202,7 @@ threadmain(int argc, char *argv[])
 	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);
blob - 9d0cf525761caf0af3edaf7b6121acb9337f2f1a
blob + 6d5a82053cb18b94a1c50b24d1430eb500bb773a
--- src/cmd/vac/vac.h
+++ src/cmd/vac/vac.h
@@ -30,7 +30,7 @@ enum
 	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 @@ enum
 	MetaHeaderSize = 12,
 	MetaIndexSize = 4,
 	IndexEntrySize = 8,
-	DirMagic = 0x1c4d9072,
+	DirMagic = 0x1c4d9072
 };
 
 enum
@@ -47,7 +47,7 @@ enum
 	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
blob - 17d0903cbd11ca1120e0c3dd950e672e7084446b
blob + 24758459ba17ab8e8839c378fbcbf04cd37e3c6c
--- src/cmd/vac/vacfs.c
+++ src/cmd/vac/vacfs.c
@@ -9,12 +9,12 @@ typedef struct DirBuf DirBuf;
 
 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 @@ enum
 	Pread = 	4,
 	Pother = 	1,
 	Pgroup = 	8,
-	Powner =	64,
+	Powner =	64
 };
 
 Fid	*fids;
@@ -59,7 +59,7 @@ Fcall	rhdr;
 Fcall	thdr;
 VacFs	*fs;
 VtConn  *conn;
-// VtSession *session;
+/* VtSession *session; */
 int	noperm;
 int	dotu;
 
blob - 3cc15e9cab5caab737267dd03c869cd5995b95cd
blob + 35dc8233bc46cb8dfdadcfee68e8fde91e20ff3a
--- src/cmd/vac/wtest.c
+++ src/cmd/vac/wtest.c
@@ -2,7 +2,7 @@
 
 enum {
 	Nblock = 10000,
-	BlockSize = 8*1024,
+	BlockSize = 8*1024
 };
 
 uchar data[Nblock*BlockSize];
blob - 0efeeee92c8f47e6770d151f751717c6ddfef250
blob + 7d5e2d8c6df11596ba6349b29e028759af80a270
--- src/cmd/vbackup/config.c
+++ src/cmd/vbackup/config.c
@@ -117,22 +117,22 @@ readconfigfile(char *name, VtCache *vcache)
 		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;
 		}
 	}
blob - 329db782d5a14214153f012ae0dcc248f9ed5b60
blob + 79d4464e27ebe939479dc5db2d5d2923a040b816
--- src/cmd/vbackup/nfs3srv.h
+++ src/cmd/vbackup/nfs3srv.h
@@ -11,6 +11,6 @@ extern void mount3proc(void*);
 
 enum
 {
-	MaxDataSize = 8192,
+	MaxDataSize = 8192
 };
 
blob - 053346ad88319adc0689872a3f14582f436762de
blob + 6b2317c3b878ac3542a9e44f7a5279e81fb5d925
--- src/cmd/vbackup/queue.h
+++ src/cmd/vbackup/queue.h
@@ -1,6 +1,6 @@
 enum
 {
-	MAXQ = 256,
+	MAXQ = 256
 };
 
 typedef struct Queue Queue;
blob - b5d8251dffa69a15500f24324d665db7e77f9dd2
blob + 9e4c3b00d3ccc00d285a70bcfbdd917ee0e4f2a9
--- src/cmd/vbackup/vbackup.c
+++ src/cmd/vbackup/vbackup.c
@@ -43,7 +43,7 @@
 
 enum
 {
-	STACK = 32768,
+	STACK = 32768
 };
 
 typedef struct WriteReq WriteReq;
blob - a5f1874db174fbdd70d2b664e0aebdc4955e9b73
blob + d692afdcfeefec3b44042cd0327ec7c26e9019ba
--- src/cmd/vbackup/vftp.c
+++ src/cmd/vbackup/vftp.c
@@ -42,7 +42,7 @@ Cmd cmdtab[] = 
 	"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*
blob - 8d6505866d5b1c323f392464d915dac9dd045384
blob + 93340c116d348a38d893249221526c9888289ed9
--- src/cmd/vbackup/vmount0.c
+++ src/cmd/vbackup/vmount0.c
@@ -15,7 +15,7 @@ int handlelen = 20;
 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
blob - 7ec7d525f5b0bf4089edefdc4d78daa357169aa5
blob + 1de100cb02253bcd25470d03c4c525add1754a45
--- src/cmd/vbackup/vnfs.c
+++ src/cmd/vbackup/vnfs.c
@@ -233,7 +233,7 @@ enum
 	RandSize = 16,
 	SessidSize = 8,
 	HeaderSize = RandSize+SessidSize,
-	MaxHandleSize = Nfs3MaxHandleSize - HeaderSize,
+	MaxHandleSize = Nfs3MaxHandleSize - HeaderSize
 };
 
 AESstate		aesstate;
@@ -342,7 +342,7 @@ enum
 {
 	/* sizes used in handles; see nfs server below */
 	CnodeHandleSize = 8,
-	FsysHandleOffset = CnodeHandleSize,
+	FsysHandleOffset = CnodeHandleSize
 };
 
 /*
@@ -588,7 +588,7 @@ parseipandmask(char *s, uchar *ip, uchar *mask)
 		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 @@ timerthread(void *v)
 {
 	for(;;){
 		recvp(timerchan);
-	//	refreshconfig();
+	/*	refreshconfig(); */
 	}
 }
 
blob - 29cf9ecf357ee848a501062d669c61e3dfc299b2
blob + c48a93a5beae58ee925118dfb03e59f2b8f0a1a7
--- src/cmd/venti/devnull.c
+++ src/cmd/venti/devnull.c
@@ -14,7 +14,7 @@ int verbose;
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 void
blob - bb1d9b6b50c2b0dcd612d8747b5f38c694784eb1
blob + 6d928086ada810a5d0188ee0a4fcd78e7302e756
--- src/cmd/venti/readlist.c
+++ src/cmd/venti/readlist.c
@@ -105,7 +105,7 @@ run(Biobuf *b)
 		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);
 	}
blob - 541dae4ee54df0236ed4e4c6ec65b7a15fbf9f08
blob + ee954a32bac73877351ef2496153f7e34f1283e0
--- src/cmd/venti/ro.c
+++ src/cmd/venti/ro.c
@@ -15,7 +15,7 @@ int verbose;
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 void
blob - f1ccce35e433d6d3edbd7e1c847488d17d85284b
blob + 8cfe3e5d886798f6a924dc5a286f35a63306be63
--- src/cmd/venti/srv/arena.c
+++ src/cmd/venti/srv/arena.c
@@ -257,7 +257,7 @@ writearena(Arena *arena, u64int aa, u8int *clbuf, u32i
 		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 @@ writeaclump(Arena *arena, Clump *c, u8int *clbuf, u64i
 		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 @@ wbarenahead(Arena *arena)
 	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;
 	}
 	/*
blob - 2ad1bb02c0d1d274dedf3af49dd5f96612498292
blob + 0bffd3cfcba7fcc89901c0ab407e20dc9a2b191b
--- src/cmd/venti/srv/arenas.c
+++ src/cmd/venti/srv/arenas.c
@@ -214,7 +214,7 @@ wbarenapart(ArenaPart *ap)
 		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){
blob - 240e77d726d97d3079515b44e62c54b3ee446ef3
blob + 225bdc43cdf2ec7b8f85a442d8a00f51818f2518
--- src/cmd/venti/srv/buildbuck.c
+++ src/cmd/venti/srv/buildbuck.c
@@ -21,7 +21,7 @@ initiestream(Part *part, u64int off, u64int clumps, u3
 {
 	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 @@ peekientry(IEStream *ies)
 		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 @@ buildbucket(Index *ix, IEStream *ies, IBucket *ib, uin
 		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{
blob - 640b190684fa76fff63a8a62794fef80cc24d1d1
blob + e70a830d340e0ee2ccd29b04875e7b2ac665d4b1
--- src/cmd/venti/srv/buildindex.c
+++ src/cmd/venti/srv/buildindex.c
@@ -43,7 +43,7 @@ buildindex(Index *ix, Part *part, u64int off, u64int c
 	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);
blob - f7040d12ec5c7eba19a9fdd081c2557ff14cf519
blob + 9397d789a4197bbc1868eea57a9d7a53ed37d7df
--- src/cmd/venti/srv/checkindex.c
+++ src/cmd/venti/srv/checkindex.c
@@ -109,7 +109,7 @@ checkindex(Index *ix, Part *part, u64int off, u64int c
 	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);
blob - 13afc7d24d8389698397b8ffff911acfd60ba715
blob + 83f51df0f990c7a6214e2fbb440a8212f8ed7665
--- src/cmd/venti/srv/conv.c
+++ src/cmd/venti/srv/conv.c
@@ -23,7 +23,7 @@ static struct {
 	ArenaHeadMagic, "ArenaHeadMagic",
 	ArenaMagic, "ArenaMagic",
 	ISectMagic, "ISectMagic",
-	BloomMagic, "BloomMagic",
+	BloomMagic, "BloomMagic"
 };
 
 static char*
blob - 37c3a05b3d8bd8e292848826432a827aa8d3ca7a
blob + 5101ff88908d66d573628b9c13a15b9cd6d51643
--- src/cmd/venti/srv/dat.h
+++ src/cmd/venti/srv/dat.h
@@ -75,17 +75,23 @@ enum
 	/*
 	 * 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 @@ struct Index
 	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;
blob - 72aaafaf67c6720813263e6f9cb16e39bc15aa98
blob + f5cc8e64057554836e2166ead7dfdfc2cefcf1c7
--- src/cmd/venti/srv/dcache.c
+++ src/cmd/venti/srv/dcache.c
@@ -34,7 +34,7 @@ enum
 {
 	HashLog		= 9,
 	HashSize	= 1<<HashLog,
-	HashMask	= HashSize - 1,
+	HashMask	= HashSize - 1
 };
 
 struct DCache
@@ -213,7 +213,7 @@ return;
 		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 @@ _getdblock(Part *part, u64int addr, int mode, int load
 	/*
 	 * 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 @@ found:
 		fixheap(b->heap, b);
 
 	qunlock(&dcache.lock);
-//checkdcache();
+/*checkdcache(); */
 
 	trace(TraceBlock, "getdblock lock");
 	addstat(StatDblockStall, 1);
@@ -427,7 +427,7 @@ putdblock(DBlock *b)
 	else
 		wunlock(&b->lock);
 
-//checkdcache();
+/*checkdcache(); */
 	qlock(&dcache.lock);
 	if(--b->ref == 0 && !b->dirty){
 		if(b->heap == TWID32)
@@ -435,7 +435,7 @@ putdblock(DBlock *b)
 		rwakeupall(&dcache.full);
 	}
 	qunlock(&dcache.lock);
-//checkdcache();
+/*checkdcache(); */
 }
 
 void
blob - 226d97aef20e794ce196f496f89e764c9245ddd4
blob + 6681503dfdc1a04c5f2e32e1960ba1887234afbe
--- src/cmd/venti/srv/findscore.c
+++ src/cmd/venti/srv/findscore.c
@@ -27,7 +27,7 @@ findscore(Arena *arena, uchar *score)
 	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);
 
blob - 2269c979e9b9eaaabe4515bef6b5d6ef5bec3c33
blob + ad7222dd8c21ad77458cf336add45f524fc65788
--- src/cmd/venti/srv/httpd.c
+++ src/cmd/venti/srv/httpd.c
@@ -105,7 +105,7 @@ listenproc(void *vaddress)
 	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 @@ httpproc(void *v)
 	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 @@ static char* graphname[] =
 	"isectwritebyte",
 
 	"sumread",
-	"sumreadbyte",
+	"sumreadbyte"
 };
 
 static int
blob - 900af871eccd69e2e8514cdf50a0dfbb31305ffb
blob + 9c36ba2ca54e48f55acc645d01f79b1b2d487418
--- src/cmd/venti/srv/icachewrite.c
+++ src/cmd/venti/srv/icachewrite.c
@@ -102,7 +102,7 @@ icachewritesect(Index *ix, ISect *is, u8int *buf)
 
 		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 @@ icachewritesect(Index *ix, ISect *is, u8int *buf)
 
 		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;
blob - 46bf91e2b337e9ae71fecb2b73743471fb4ee85b
blob + 8cff4180ee3f5e5d4ed318fec42ee11983687fb4
--- src/cmd/venti/srv/index.c
+++ 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 @@ initisect1(ISect *is)
 	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 @@ wbisect(ISect *is)
 
 	b = alloczblock(HeadSize, 1, 0);
 	if(b == nil)
-//ZZZ set error?
+/*ZZZ set error? */
 		return -1;
 
 	if(packisect(is, b->data) < 0){
blob - d1e58a6df13b450676f354a8f3faaf8d41ed7d7f
blob + 1fe3cf5c375cdf7e38cff67bfc951a8c7dcd96a4
--- src/cmd/venti/srv/lump.c
+++ src/cmd/venti/srv/lump.c
@@ -45,7 +45,7 @@ readlump(u8int *score, int type, u32int size, int *cac
 		*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);
blob - 8a1e2d95a1620db98e5c29d4674386aad7d1e0cf
blob + f183e128d06ebe8bf7840a4590a4f759a06e7dc7
--- src/cmd/venti/srv/lumpcache.c
+++ src/cmd/venti/srv/lumpcache.c
@@ -11,7 +11,7 @@ enum
 {
 	HashLog		= 9,
 	HashSize	= 1<<HashLog,
-	HashMask	= HashSize - 1,
+	HashMask	= HashSize - 1
 };
 
 struct LumpCache
@@ -175,7 +175,7 @@ again:
 	 * 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());
blob - 111db0187fa47017c41c628517fbafdd4602b060
blob + 90c74ccceed97f90d3af4b5d3c0d54762ad88ebc
--- src/cmd/venti/srv/printarenas.c
+++ src/cmd/venti/srv/printarenas.c
@@ -36,7 +36,7 @@ shoulddump(char *name, int argc, char **argv)
 
 enum
 {
-	ClumpChunks = 32*1024,
+	ClumpChunks = 32*1024
 };
 
 void
blob - 28d469fcf2730f740b6642ec594ac703905bc636
blob + 7ed9ba3a08f10c69146eadfff47d1e2c5254f7b5
--- src/cmd/venti/srv/sortientry.c
+++ src/cmd/venti/srv/sortientry.c
@@ -61,7 +61,7 @@ sortrawientries(Index *ix, Part *tmp, u64int *base, Bl
 	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 @@ readarenainfo(IEBucks *ib, Arena *arena, u64int a, Blo
 	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 @@ readarenainfo(IEBucks *ib, Arena *arena, u64int a, Blo
 	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 @@ readarenainfo(IEBucks *ib, Arena *arena, u64int a, Blo
 			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 @@ readiebuck(IEBucks *ib, int b)
 	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");
blob - 874f7d27065398e0d6277cd5d18d54f235ba856c
blob + f578860adab94622db2d25b9add9e51d8967e90e
--- src/cmd/venti/srv/stats.c
+++ src/cmd/venti/srv/stats.c
@@ -80,7 +80,7 @@ Statdesc statdesc[NStat] =
 	{ "isect block write bytes", },
 
 	{ "sum reads", },
-	{ "sum read bytes", },
+	{ "sum read bytes", }
 };
 
 QLock statslock;
blob - d11ca4f3b421285637788f7a7bbeab915efdf59f
blob + 7a5d6f9dd4daf5d139c5f4ee014a9f5dc589a2c5
--- src/cmd/venti/srv/syncarena.c
+++ src/cmd/venti/srv/syncarena.c
@@ -30,7 +30,7 @@ syncarena(Arena *arena, u64int start, u32int n, int zo
 	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;
blob - 5530bd07d003f43c444940d600c9b41cae07a809
blob + 587046cc5aea3b0583729932f6d85207d7cf89ee
--- src/cmd/venti/srv/unwhack.c
+++ src/cmd/venti/srv/unwhack.c
@@ -23,7 +23,7 @@ static uchar lenval[1 << (DBigLenBits - 1)] =
 static uchar lenbits[] =
 {
 	0, 0, 0,
-	2, 3, 5, 5,
+	2, 3, 5, 5
 };
 
 static uchar offbits[16] =
blob - 84abddd71a7f033943dadad798d3a5e927df4045
blob + 1e924aebb3d33394fc3fce0cc925261a88f5f8f2
--- src/cmd/venti/srv/venti.c
+++ src/cmd/venti/srv/venti.c
@@ -210,8 +210,8 @@ ventiserver(void *v)
 		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");
blob - 7563faef2cdff349417a216bc6fa862f1502e600
blob + 8a2e9299e61380777ea75004b56c23b1e56028e1
--- src/cmd/venti/srv/wrarena.c
+++ src/cmd/venti/srv/wrarena.c
@@ -83,8 +83,8 @@ rdarena(Arena *arena, u64int offset)
 		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);
blob - fe75c81df9ee152941a3e16a479904cc5b373b0d
blob + 70c25b73d2d94f37f51d8a4679c2eb18bda496fa
--- src/cmd/venti/srv/zeropart.c
+++ src/cmd/venti/srv/zeropart.c
@@ -10,10 +10,10 @@ zeropart(Part *part, int blocksize)
 	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;
blob - 83940880e3b169ed3e7583c75928fbd9db7daefe
blob + 64a791de91fd08dc769dda5fb5d1ca5eefcfbed0
--- src/cmd/wc.c
+++ src/cmd/wc.c
@@ -120,7 +120,7 @@ enum{			/* actions */
 	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 @@ AC2W, AC2W, AC2W, AC2W, AC2W, AC2W, AC2W, AC2W,	/* d8-
 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 @@ AC2,  AC2,  AC2,  AC2,  AC2,  AC2,  AC2,  AC2,	/* d8-d
 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 @@ AC2X, AC2X, AC2X, AC2X, AC2X, AC2X, AC2X, AC2X,	/* d8-
 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 @@ AC2X, AC2X, AC2X, AC2X, AC2X, AC2X, AC2X, AC2X,	/* d8-
 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)
blob - be31686dbbebb4e9984b9eaa298b3d45ecedb11f
blob + c15db2e4528f7fa6a5292017b89948449a769f67
--- src/cmd/yacc.c
+++ src/cmd/yacc.c
@@ -98,7 +98,7 @@ enum
 	EMPTY		= 1,
 	WHOKNOWS	= 0,
 	OK		= 1,
-	NOMORE		= -1000,
+	NOMORE		= -1000
 };
 
 	/* macros for getting associativity and precedence levels */
blob - 3958e24314ed211aeaadf30a813684303624864d
blob + 8df272196d4eca471b77e75c4aea14f1f214316b
--- src/lib9/debugmalloc.c
+++ src/lib9/debugmalloc.c
@@ -111,13 +111,13 @@ p9malloc(ulong n)
 	void *v;
 	if(n == 0)
 		n++;
-//fprint(2, "%s %d malloc\n", argv0, getpid());
+/*fprint(2, "%s %d malloc\n", argv0, getpid()); */
 	lock(&malloclock);
 	mallocpid = getpid();
 	v = malloc(n+Overhead);
 	v = mark(v, getcallerpc(&n), n, MallocMagic);
 	unlock(&malloclock);
-//fprint(2, "%s %d donemalloc\n", argv0, getpid());
+/*fprint(2, "%s %d donemalloc\n", argv0, getpid()); */
 	return v;
 }
 
@@ -127,13 +127,13 @@ p9free(void *v)
 	if(v == nil)
 		return;
 
-//fprint(2, "%s %d free\n", argv0, getpid());
+/*fprint(2, "%s %d free\n", argv0, getpid()); */
 	lock(&malloclock);
 	mallocpid = getpid();
 	v = mark(v, getcallerpc(&v), 0, FreeMagic);
 	free(v);
 	unlock(&malloclock);
-//fprint(2, "%s %d donefree\n", argv0, getpid());
+/*fprint(2, "%s %d donefree\n", argv0, getpid()); */
 }
 
 void*
@@ -141,26 +141,26 @@ p9calloc(ulong a, ulong b)
 {
 	void *v;
 
-//fprint(2, "%s %d calloc\n", argv0, getpid());
+/*fprint(2, "%s %d calloc\n", argv0, getpid()); */
 	lock(&malloclock);
 	mallocpid = getpid();
 	v = calloc(a*b+Overhead, 1);
 	v = mark(v, getcallerpc(&a), a*b, CallocMagic);
 	unlock(&malloclock);
-//fprint(2, "%s %d donecalloc\n", argv0, getpid());
+/*fprint(2, "%s %d donecalloc\n", argv0, getpid()); */
 	return v;
 }
 
 void*
 p9realloc(void *v, ulong n)
 {
-//fprint(2, "%s %d realloc\n", argv0, getpid());
+/*fprint(2, "%s %d realloc\n", argv0, getpid()); */
 	lock(&malloclock);
 	mallocpid = getpid();
 	v = mark(v, getcallerpc(&v), 0, CheckMagic);
 	v = realloc(v, n+Overhead);
 	v = mark(v, getcallerpc(&v), n, ReallocMagic);
 	unlock(&malloclock);
-//fprint(2, "%s %d donerealloc\n", argv0, getpid());
+/*fprint(2, "%s %d donerealloc\n", argv0, getpid()); */
 	return v;
 }
blob - 944580975a80ce235a9260fc6cb804d7f0d34e2d
blob + 503350521c1c100a661c8e3e9232fac36accb05b
--- src/lib9/encodefmt.c
+++ src/lib9/encodefmt.c
@@ -9,7 +9,7 @@ encodefmt(Fmt *f)
 	int ilen;
 	int rv;
 	uchar *b;
-	char obuf[64];	// rsc optimization
+	char obuf[64];	/* rsc optimization */
 
 	b = va_arg(f->args, uchar*);
 	if(b == 0)
@@ -44,7 +44,7 @@ encodefmt(Fmt *f)
 	} else
 		buf = obuf;
 
-	// convert
+	/* convert */
 	out = buf;
 	switch(f->r){
 	case '<':
blob - af989f4726e123af21f2929dba5b066245c00cd9
blob + caf7153236c0caffe2c3ad7ceffc3c629c966548
--- src/lib9/errstr.c
+++ src/lib9/errstr.c
@@ -12,7 +12,7 @@
 
 enum
 {
-	EPLAN9 = 0x19283745,
+	EPLAN9 = 0x19283745
 };
 
 char *(*_syserrstr)(void);
blob - 14ad867997660c4d1338afff38b03f718a0122de
blob + 9c94f156c75b8445c2ef711b65ad4130aab107af
--- src/lib9/fmt/fltfmt.c
+++ src/lib9/fmt/fltfmt.c
@@ -286,7 +286,7 @@ found:
 		if(e >= -5 && e <= prec) {
 			c1 = -e - 1;
 			c4 = prec - e;
-			chr = 'h';	// flag for 'f' style
+			chr = 'h';	/* flag for 'f' style */
 		}
 		break;
 	case 'f':
blob - b6f2e17900dc4d25e38d355c57f9512fc194201e
blob + 2304c4e5445661c21d80d0e11d61498acbe61219
--- src/lib9/fmt/fmtquote.c
+++ src/lib9/fmt/fmtquote.c
@@ -209,7 +209,7 @@ __quotestrfmt(int runesin, Fmt *f)
 		outlen = (char*)f->stop - (char*)f->to;
 
 	__quotesetup(s, r, nin, outlen, &q, f->flags&FmtSharp, f->runes);
-//print("bytes in %d bytes out %d runes in %d runesout %d\n", q.nbytesin, q.nbytesout, q.nrunesin, q.nrunesout);
+/*print("bytes in %d bytes out %d runes in %d runesout %d\n", q.nbytesin, q.nbytesout, q.nrunesin, q.nrunesout); */
 
 	if(runesin){
 		if(!q.quoted)
blob - fbc1c59ec0880d0dcf5de36c631e6027a0160f96
blob + c19c2849843633da674904b721456ceee00e0c41
--- src/lib9/fmt/strtod.c
+++ src/lib9/fmt/strtod.c
@@ -67,7 +67,7 @@ enum
 	S4,			/* _+#.#	#S4	eS5 */
 	S5,			/* _+#.#e	+S6	#S7 */
 	S6,			/* _+#.#e+	#S7 */
-	S7,			/* _+#.#e+#	#S7 */
+	S7			/* _+#.#e+#	#S7 */
 };
 
 static	int	xcmp(char*, char*);
blob - 2a562b628defce10bcb0854b343b44a64da1d80b
blob + 8480b24662f2a4372ac92d6545965a26afd645ed
--- src/lib9/notify.c
+++ src/lib9/notify.c
@@ -37,7 +37,7 @@ struct Sig
 enum
 {
 	Restart = 1<<0,
-	Ignore = 1<<1,
+	Ignore = 1<<1
 };
 
 static Sig sigs[] = {
blob - 88484f60cfaf8ad14d0c3dede2cfee492f32ec42
blob + 3d6831b029f61522f122c51bebecf0e488ff88ef
--- src/lib9/utf/rune.c
+++ src/lib9/utf/rune.c
@@ -37,7 +37,7 @@ enum
 	Maskx	= (1<<Bitx)-1,			/* 0011 1111 */
 	Testx	= Maskx ^ 0xFF,			/* 1100 0000 */
 
-	Bad	= Runeerror,
+	Bad	= Runeerror
 };
 
 int
blob - f254c13a0efc467746de059efb0a31d84821825b
blob + cf3535fb4ed2035d8ae0378da46a33d7862e9c56
--- src/lib9/utf/utfecpy.c
+++ src/lib9/utf/utfecpy.c
@@ -11,6 +11,7 @@
  * ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
  * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
  */
+#define _BSD_SOURCE 1	/* memccpy */
 #include <stdarg.h>
 #include <string.h>
 #include "plan9.h"
blob - a2f0b3d71824df0f665397fb4937820a47d44d25
blob + 4be187935cc38501d1ab86fdbd957cb490f93121
--- src/lib9p/ramfs.c
+++ src/lib9p/ramfs.c
@@ -25,7 +25,7 @@ fsread(Req *r)
 	offset = r->ifcall.offset;
 	count = r->ifcall.count;
 
-//print("read %ld %lld\n", *count, offset);
+/*print("read %ld %lld\n", *count, offset); */
 	if(offset >= rf->ndata){
 		r->ofcall.count = 0;
 		respond(r, nil);
@@ -104,7 +104,7 @@ fsdestroyfile(File *f)
 {
 	Ramfile *rf;
 
-//fprint(2, "clunk\n");
+/*fprint(2, "clunk\n"); */
 	rf = f->aux;
 	if(rf){
 		free(rf->data);
blob - 2ceba54503a7d31c836ad38e8661a8a67bf3a894
blob + 29b1ac2d636442dc612a91d16ac00b5e5b0752df
--- src/lib9p/srv.c
+++ src/lib9p/srv.c
@@ -7,20 +7,20 @@
 
 int chatty9p;
 
-// static char Ebadattach[] = "unknown specifier in attach";
+/* static char Ebadattach[] = "unknown specifier in attach"; */
 static char Ebadoffset[] = "bad offset";
-// static char Ebadcount[] = "bad count";
+/* static char Ebadcount[] = "bad count"; */
 static char Ebotch[] = "9P protocol botch";
 static char Ecreatenondir[] = "create in non-directory";
 static char Edupfid[] = "duplicate fid";
 static char Eduptag[] = "duplicate tag";
 static char Eisdir[] = "is a directory";
 static char Enocreate[] = "create prohibited";
-// static char Enomem[] = "out of memory";
+/* static char Enomem[] = "out of memory"; */
 static char Enoremove[] = "remove prohibited";
 static char Enostat[] = "stat prohibited";
 static char Enotfound[] = "file not found";
-// static char Enowrite[] = "write prohibited";
+/* static char Enowrite[] = "write prohibited"; */
 static char Enowstat[] = "wstat prohibited";
 static char Eperm[] = "permission denied";
 static char Eunknownfid[] = "unknown fid";
@@ -348,7 +348,7 @@ rwalk(Req *r, char *error)
 			if(error==nil && r->ifcall.nwname!=0)
 				r->error = Enotfound;
 		}else
-			r->error = nil;	// No error on partial walks
+			r->error = nil;	/* No error on partial walks */
 	}else{
 		if(r->ofcall.nwqid == 0){
 			/* Just a clone */
blob - ff03ad3fd743ab60b8f3dc6a945bb0319b8afdf2
blob + dc6c4d8d85821dbce1dffd728a962a21feaac7de
--- src/lib9pclient/fs.c
+++ src/lib9pclient/fs.c
@@ -106,7 +106,7 @@ _fsdecref(CFsys *fs)
 
 	qlock(&fs->lk);
 	--fs->ref;
-	//fprint(2, "fsdecref %p to %d\n", fs, fs->ref);
+	/*fprint(2, "fsdecref %p to %d\n", fs, fs->ref); */
 	if(fs->ref == 0){
 		if(fs->fd >= 0)
 			close(fs->fd);
blob - 59581eaf613cd55abdde8d2ce7df1b3e0c16a40c
blob + 7745d677a0d5afea8b4e843acf60fa5afa8c1a7f
--- src/libString/s_read.c
+++ src/libString/s_read.c
@@ -5,7 +5,7 @@
 
 enum
 {
-	Minread=	256,
+	Minread=	256
 };
 
 /* Append up to 'len' input bytes to the string 'to'.
blob - d8ad9ab337bce12e836026fb63264e5022ca74a2
blob + 8adeefe6c7841135c880ed70607085d44909c088
--- src/libauth/attr.c
+++ src/libauth/attr.c
@@ -144,10 +144,10 @@ _parseattr(char *s)
 		t = tok[i];
 		if(p = strchr(t, '=')){
 			*p++ = '\0';
-		//	if(p-2 >= t && p[-2] == ':'){
-		//		p[-2] = '\0';
-		//		type = AttrDefault;
-		//	}else
+		/*	if(p-2 >= t && p[-2] == ':'){ */
+		/*		p[-2] = '\0'; */
+		/*		type = AttrDefault; */
+		/*	}else */
 				type = AttrNameval;
 			a = _mkattr(type, t, p, a);
 			setmalloctag(a, getcallerpc(&s));
blob - 4a40b263c69625331936039fa33d46d953328b6b
blob + 522304ce25296d3a037409a2bf06249a0b823c90
--- src/libauth/auth_getuserpasswd.c
+++ src/libauth/auth_getuserpasswd.c
@@ -4,7 +4,7 @@
 #include "authlocal.h"
 
 enum {
-	ARgiveup = 100,
+	ARgiveup = 100
 };
 
 static int
blob - 8761cc9d9e3cbee935d9dd5575bdf4b2d33f8868
blob + 257bafe76e5526b308de60971599c7440c495d83
--- src/libauth/auth_proxy.c
+++ src/libauth/auth_proxy.c
@@ -6,7 +6,7 @@
 #include "authlocal.h"
 
 enum { 
-	ARgiveup = 100,
+	ARgiveup = 100
 };
 
 static uchar*
blob - d39facfd0ea03ee273729eed809f0e83a7cdb326
blob + b3cf6665f16a877f6e0899d81066a83c45a2c31a
--- src/libauth/auth_respond.c
+++ src/libauth/auth_respond.c
@@ -5,7 +5,7 @@
 #include "authlocal.h"
 
 enum {
-	ARgiveup = 100,
+	ARgiveup = 100
 };
 
 static int
blob - d40bcb17f8027c6fa432024ea866fa41234a8eab
blob + 11e6950b9629cc74d55ce0f30c019b95ebc98be0
--- src/libauthsrv/readnvram.c
+++ src/libauthsrv/readnvram.c
@@ -144,7 +144,7 @@ readnvram(Nvrsafe *safep, int flag)
 		safe = safep;
 
 		err |= check(safe->machkey, DESKEYLEN, safe->machsum, "bad nvram key");
-//		err |= check(safe->config, CONFIGLEN, safe->configsum, "bad secstore key");
+/*		err |= check(safe->config, CONFIGLEN, safe->configsum, "bad secstore key"); */
 		err |= check(safe->authid, ANAMELEN, safe->authidsum, "bad authentication id");
 		err |= check(safe->authdom, DOMLEN, safe->authdomsum, "bad authentication domain");
 	}
blob - 4583616060a205d6d9849aea462937fac16abf85
blob + a39276f4ae2b3060106779930d78a1cd7230dbf2
--- src/libdisk/disk.c
+++ src/libdisk/disk.c
@@ -49,7 +49,7 @@ enum {
 	Toffset		= 446,		/* offset of partition table in sector */
 	Magic0		= 0x55,
 	Magic1		= 0xAA,
-	NTentry		= 4,
+	NTentry		= 4
 };
 struct Table {
 	Tentry	entry[NTentry];
blob - 9d5ff15b97a8e0d5dbd477505b31894b98b9a019
blob + ee30fc92a5d278e9aaaebad58aaba5c8f05b78f8
--- src/libdisk/proto.c
+++ src/libdisk/proto.c
@@ -7,7 +7,7 @@
 
 enum {
 	LEN	= 8*1024,
-	HUNKS	= 128,
+	HUNKS	= 128
 };
 
 #undef warn
@@ -67,11 +67,11 @@ static void	setnames(Mkaux*, File*);
 static void	skipdir(Mkaux*);
 static void	warn(Mkaux*, char *, ...);
 
-//static void
-//mprint(char *new, char *old, Dir *d, void*)
-//{
-//	print("%s %s %D\n", new, old, d);
-//}
+/*static void */
+/*mprint(char *new, char *old, Dir *d, void*) */
+/*{ */
+/*	print("%s %s %D\n", new, old, d); */
+/*} */
 
 int
 rdproto(char *proto, char *root, Mkfsenum *mkenum, Mkfserr *mkerr, void *a)
blob - ccab244ce882f82e74b90d90894995210728e729
blob + 3f351053a369d74a85114140d68a959b905961f2
--- src/libdisk/scsi.c
+++ src/libdisk/scsi.c
@@ -264,8 +264,8 @@ scsi(Scsi *s, uchar *cmd, int ccount, void *v, int dco
 	if(scsiverbose)
 		fprint(2, "scsi cmd #%.2ux: %.2ux %.2ux %.2ux: %s\n", cmd[0], key, code, sense[13], p);
 
-//	if(key == 0)
-//		return dcount;
+/*	if(key == 0) */
+/*		return dcount; */
 	return -1;
 }
 
blob - cdef865ea448754afb608fb1f1705c65f2c41c76
blob + f1af6f1b66e2422b4757778f96769424eff50e41
--- src/libdiskfs/cache.c
+++ src/libdiskfs/cache.c
@@ -145,7 +145,7 @@ diskcachereadbig(DiskCache *d, u64int offset)
 	lock(&d->lk);
 	dcb = findblock(d, offset);
 	if(dcb){
-//fprint(2, "found %llud in cache %p\n", (uvlong)offset, dcb);
+/*fprint(2, "found %llud in cache %p\n", (uvlong)offset, dcb);*/
 		if(dcb->ref++ == 0)
 			delfromlru(d, dcb);
 		unlock(&d->lk);
@@ -165,7 +165,7 @@ diskcachereadbig(DiskCache *d, u64int offset)
 		putlru(d, dcb);
 		dcb = nil;
 	}else{
-//fprint(2, "read %llud from disk %p\n", (uvlong)offset, dcb);
+/*fprint(2, "read %llud from disk %p\n", (uvlong)offset, dcb); */
 		dcb->subblock = b;
 		dcb->ref++;
 		addtohash(d, dcb, offset);
@@ -223,7 +223,7 @@ diskcacheread(Disk *dd, u32int len, u64int offset)
 		len = dlen-frag;
 	}
 	b->len = len;
-//fprint(2, "offset %llud at pointer %p %lux\n", (uvlong)offset, b->data, *(ulong*)(b->data+4));
+/*fprint(2, "offset %llud at pointer %p %lux\n", (uvlong)offset, b->data, *(ulong*)(b->data+4)); */
 	return b;
 }
 
blob - b6b9773dcdb991149bc97ec50529c2073409b418
blob + 41ebfcee4173d26243078a3c78a59d604c8e680a
--- src/libdiskfs/ext2.c
+++ src/libdiskfs/ext2.c
@@ -111,8 +111,8 @@ ext2blockread(Fsys *fsys, u64int vbno)
 			fprint(2, "loading group: %r...");
 		return nil;
 	}
-//	if(debug)
-//		fprint(2, "group %d bitblock=%d...", bno/fs->blockspergroup, g->bitblock);
+/*	if(debug) */
+/*		fprint(2, "group %d bitblock=%d...", bno/fs->blockspergroup, g->bitblock); */
 
 	if((bitb = diskread(fs->disk, fs->blocksize, (u64int)g->bitblock*fs->blocksize)) == nil){
 		if(debug)
blob - 29bf60b5cd83aedbba83833f37195b21052b0f5a
blob + d0503b4036f78877e8d88379f14378962e9563b2
--- src/libdiskfs/ext2.h
+++ src/libdiskfs/ext2.h
@@ -44,7 +44,7 @@ enum
 	IFREG = 0100000,
 	IFLNK = 0120000,
 	IFSOCK = 0140000,
-	IFWHT = 0160000,
+	IFWHT = 0160000
 };
 
 #define DIRLEN(namlen)	(((namlen)+8+3)&~3)
@@ -144,7 +144,7 @@ struct Dirent
 };
 enum
 {
-	MinDirentSize = 4+2+1+1,
+	MinDirentSize = 4+2+1+1
 };
 
 /*
blob - 3ae65a88d28c3cc9767342fddc4f48630b71b6d7
blob + 099c7bbd7dbe0f13f77f587d53b9c6a73f0ae8c4
--- src/libdiskfs/ffs.c
+++ src/libdiskfs/ffs.c
@@ -164,9 +164,9 @@ okay:
 				blockput(cgb);
 				goto error;
 			}
-			// cg->nfrag = cgblk->nfrag;
-			// cg->nblock = (cgblk->nfrag+fs->fragsperblock-1) / fs->fragsperblock;
-			// fprint(2, "cg #%d: cgblk %lud, %d blocks, %d inodes\n", cgblk->num, (ulong)cg->cgblkno, cg->nblock, cg->nino);
+			/* cg->nfrag = cgblk->nfrag; */
+			/* cg->nblock = (cgblk->nfrag+fs->fragsperblock-1) / fs->fragsperblock; */
+			/* fprint(2, "cg #%d: cgblk %lud, %d blocks, %d inodes\n", cgblk->num, (ulong)cg->cgblkno, cg->nblock, cg->nino); */
 		}
 	}
 	blockput(b);
blob - 4a90aef248a482c9355cd8ae1cc8a2d3fb0e0eda
blob + 6a5a387d3c6fc2ed3101a92603b0fe90c62d37bc
--- src/libdiskfs/ffs.h
+++ src/libdiskfs/ffs.h
@@ -100,7 +100,7 @@ enum
 	DTREG = 8,
 	DTLNK = 10,
 	DTSOCK = 12,
-	DTWHT = 14,
+	DTWHT = 14
 };
 
 struct Cylsum
blob - 6843e341f44c758ac8e935f7622c2eec74077631
blob + d829578ecb48467e56e2e06b531b6fd161efa3a1
--- src/libdiskfs/file.c
+++ src/libdiskfs/file.c
@@ -21,7 +21,7 @@ preadn(int fd, void *vdata, u32int ulen, u64int offset
 	nfilereads++;
 	len = ulen;
 	data = vdata;
-//	fprint(2, "readn 0x%llux 0x%ux\n", offset, ulen);
+/*	fprint(2, "readn 0x%llux 0x%ux\n", offset, ulen); */
 	while(len > 0){
 		n = pread(fd, data, len, offset);
 		if(n <= 0)
blob - 5d8528c292ac41c6f1936f99b4153ff97ecc8f6f
blob + cf246f98463f5327a7ad48b02b784c96bab40ebe
--- src/libdiskfs/venti.c
+++ src/libdiskfs/venti.c
@@ -56,14 +56,14 @@ _vtfileblock(VtCache *c, VtEntry *e, u32int bn)
 		return nil;
 	}
 
-//fprint(2, "vtread %V\n", e->score);
+/*fprint(2, "vtread %V\n", e->score); */
 	b = vtcacheglobal(c, e->score, e->type);
 	if(b == nil)
 		return nil;
 
 	for(i=d-1; i>=0; i--){
 		t = VtDataType+i;
-//fprint(2, "vtread %V\n", b->data+index[i]*VtScoreSize);
+/*fprint(2, "vtread %V\n", b->data+index[i]*VtScoreSize); */
 		bb = vtcacheglobal(c, b->data+index[i]*VtScoreSize, t);
 		vtblockput(b);
 		if(bb == nil)
blob - 3fa76854a23c731851e5add42a04e8a0deed1cf8
blob + 74e10c31097c69aa3dfa0cab267b543c6b371215
--- src/libdraw/devdraw.c
+++ src/libdraw/devdraw.c
@@ -799,10 +799,10 @@ _drawmsgwrite(Display *d, void *v, int n)
 
 	while((n-=m) > 0){
 		a += m;
-//fprint(2, "msgwrite %d(%d)...", n, *a);
+/*fprint(2, "msgwrite %d(%d)...", n, *a); */
 		switch(*a){
 		default:
-//fprint(2, "bad command %d\n", *a);
+/*fprint(2, "bad command %d\n", *a); */
 			err = "bad draw command";
 			goto error;
 
blob - f596d7a2e2836130ce59592b55c98b5f6c94bcc2
blob + 89cdd7f2acad0f1c561688bca260bbc1b32b3eb4
--- src/libdraw/emenuhit.c
+++ src/libdraw/emenuhit.c
@@ -12,7 +12,7 @@ enum
 	Maxunscroll = 25,	/* maximum #entries before scrolling turns on */
 	Nscroll = 20,		/* number entries in scrolling part */
 	Scrollwid = 14,		/* width of scroll bar */
-	Gap = 4,			/* between text and scroll bar */
+	Gap = 4			/* between text and scroll bar */
 };
 
 static	Image	*menutxt;
blob - c01298d510724d1d1b3df6fbf310b1ab7733cac2
blob + 2e70b136b438d64fc11ace49398d3951eb160760
--- src/libdraw/init.c
+++ src/libdraw/init.c
@@ -61,7 +61,7 @@ initdraw(void (*error)(Display*, char*), char *fontnam
 	if(fontname == nil){
 		snprint(buf, sizeof buf, "%d %d\n0 %d\t%s\n", df->height, df->ascent,
 			df->n-1, deffontname);
-//BUG: Need something better for this	installsubfont("*default*", df);
+/*BUG: Need something better for this	installsubfont("*default*", df); */
 		font = buildfont(display, buf, deffontname);
 		if(font == nil){
 			fprint(2, "initdraw: can't open default font: %r\n");
blob - 22b78b3983204b37fffa7f7686fe1e16f3c9d486
blob + 45dc69fefd01afd3449fc8cb9759c68c6950f3ea
--- src/libdraw/md-draw.c
+++ src/libdraw/md-draw.c
@@ -92,14 +92,14 @@ _memimagedrawsetup(Memimage *dst, Rectangle r, Memimag
 DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->chan, r, dst->data->bdata, src, src->chan, p0, mask, mask->chan, p1);
 
 	if(drawclip(dst, &r, src, &p0, mask, &p1, &par.sr, &par.mr) == 0){
-//		if(drawdebug)
-//			iprint("empty clipped rectangle\n");
+/*		if(drawdebug) */
+/*			iprint("empty clipped rectangle\n"); */
 		return nil;
 	}
 
 	if(op < Clear || op > SoverD){
-//		if(drawdebug)
-//			iprint("op out of range: %d\n", op);
+/*		if(drawdebug) */
+/*			iprint("op out of range: %d\n", op); */
 		return nil;
 	}
 
@@ -120,7 +120,7 @@ DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/
 			par.srgba = _imgtorgba(src, par.sval);
 			par.sdval = _rgbatoimg(dst, par.srgba);
 			if((par.srgba&0xFF) == 0 && (op&DoutS)){
-//				if (drawdebug) iprint("fill with transparent source\n");
+/*				if (drawdebug) iprint("fill with transparent source\n"); */
 				return nil;	/* no-op successfully handled */
 			}
 			if((par.srgba&0xFF) == 0xFF)
@@ -133,7 +133,7 @@ DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/
 		if(Dx(mask->r)==1 && Dy(mask->r)==1){
 			par.mval = pixelbits(mask, mask->r.min);
 			if(par.mval == 0 && (op&DoutS)){
-//				if(drawdebug) iprint("fill with zero mask\n");
+/*				if(drawdebug) iprint("fill with zero mask\n"); */
 				return nil;	/* no-op successfully handled */
 			}
 			par.state |= Simplemask;
@@ -143,8 +143,8 @@ DBG	print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/
 		}
 	}
 
-//	if(drawdebug)
-//		iprint("dr %R sr %R mr %R...", r, par.sr, par.mr);
+/*	if(drawdebug) */
+/*		iprint("dr %R sr %R mr %R...", r, par.sr, par.mr); */
 DBG print("draw dr %R sr %R mr %R %lux\n", r, par.sr, par.mr, par.state);
 
 	return &par;
@@ -167,7 +167,7 @@ _memimagedraw(Memdrawparam *par)
 	 */
 DBG print("test hwdraw\n");
 	if(hwdraw(par)){
-//if(drawdebug) iprint("hw handled\n");
+/*if(drawdebug) iprint("hw handled\n"); */
 DBG print("hwdraw handled\n");
 		return;
 	}
@@ -176,7 +176,7 @@ DBG print("hwdraw handled\n");
 	 */
 DBG print("test memoptdraw\n");
 	if(memoptdraw(par)){
-//if(drawdebug) iprint("memopt handled\n");
+/*if(drawdebug) iprint("memopt handled\n"); */
 DBG print("memopt handled\n");
 		return;
 	}
@@ -187,7 +187,7 @@ DBG print("memopt handled\n");
 	 */
 DBG print("test chardraw\n");
 	if(chardraw(par)){
-//if(drawdebug) iprint("chardraw handled\n");
+/*if(drawdebug) iprint("chardraw handled\n"); */
 DBG print("chardraw handled\n");
 		return;
 	}
@@ -197,7 +197,7 @@ DBG print("chardraw handled\n");
 	 */
 DBG print("do alphadraw\n");
 	alphadraw(par);
-//if(drawdebug) iprint("alphadraw handled\n");
+/*if(drawdebug) iprint("alphadraw handled\n"); */
 DBG print("alphadraw handled\n");
 }
 #undef DBG
@@ -663,9 +663,9 @@ alphadraw(Memdrawparam *par)
 	 * but it avoids a fair amount of code duplication to make this a case here
 	 * rather than have a separate booldraw.
 	 */
-//if(drawdebug) iprint("flag %lud mchan %lux=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth);
+/*if(drawdebug) iprint("flag %lud mchan %lux=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth); */
 	if(!(src->flags&Falpha) && mask->chan == GREY1 && dst->depth >= 8 && op == SoverD){
-//if(drawdebug) iprint("boolcopy...");
+/*if(drawdebug) iprint("boolcopy..."); */
 		rdsrc = convfn(dst, &dpar, src, &spar);
 		rddst = readptr;
 		rdmask = readfn(mask);
@@ -1817,13 +1817,13 @@ static Readfn*
 convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar)
 {
 	if(dst->chan == src->chan && !(src->flags&Frepl)){
-//if(drawdebug) iprint("readptr...");
+/*if(drawdebug) iprint("readptr..."); */
 		return readptr;
 	}
 
 	if(dst->chan==CMAP8 && (src->chan==GREY1||src->chan==GREY2||src->chan==GREY4)){
 		/* cheat because we know the replicated value is exactly the color map entry. */
-//if(drawdebug) iprint("Readnbit...");
+/*if(drawdebug) iprint("Readnbit..."); */
 		return readnbit;
 	}
 
@@ -1840,7 +1840,7 @@ convfn(Memimage *dst, Param *dpar, Memimage *src, Para
 		spar->dx = Dx(spar->img->r);
 	}
 
-//if(drawdebug) iprint("genconv...");
+/*if(drawdebug) iprint("genconv..."); */
 	return genconv;
 }
 
@@ -2040,7 +2040,7 @@ _rgbatoimg(Memimage *img, u32int rgba)
 		}
 		d += nb;
 	}
-//	print("rgba2img %.8lux = %.*lux\n", rgba, 2*d/8, v);
+/*	print("rgba2img %.8lux = %.*lux\n", rgba, 2*d/8, v); */
 	return v;
 }
 
@@ -2329,7 +2329,7 @@ if(0) if(drawdebug) iprint("chardraw? mf %lux md %d sf
 	|| op != SoverD)
 		return 0;
 
-//if(drawdebug) iprint("chardraw...");
+/*if(drawdebug) iprint("chardraw..."); */
 
 	depth = mask->depth;
 	maskwid = mask->width*sizeof(u32int);
@@ -2365,14 +2365,14 @@ DBG print("bsh %d\n", bsh);
 	sp[2] = v>>16;
 	sp[3] = v>>24;
 
-//print("sp %x %x %x %x\n", sp[0], sp[1], sp[2], sp[3]);
+/*print("sp %x %x %x %x\n", sp[0], sp[1], sp[2], sp[3]); */
 	for(y=0; y<dy; y++, rp+=maskwid, wp+=dstwid){
 		q = rp;
 		if(bsh)
 			bits = *q++;
 		switch(ddepth){
 		case 8:
-//if(drawdebug) iprint("8loop...");
+/*if(drawdebug) iprint("8loop..."); */
 			wc = wp;
 			for(x=bx; x>ex; x--, wc++){
 				i = x&7;
blob - 26eb54de3af2b75f33c6845d1dad1e18a02be8d2
blob + 9d991782589c4659265a782c13fc3bd707e800f4
--- src/libdraw/md-drawtest.c
+++ src/libdraw/md-drawtest.c
@@ -115,7 +115,7 @@ main(int argc, char *argv[])
 	stmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan));
 	mtmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
 	ones = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan));
-//	print("chan %lux %lux %lux %lux %lux %lux\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan);
+/*	print("chan %lux %lux %lux %lux %lux %lux\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan); */
 	if(dst==0 || src==0 || mask==0 || mtmp==0 || ones==0) {
 	Alloc:
 		fprint(2, "dtest: allocation failed: %r\n");
@@ -235,13 +235,13 @@ dumpimage(char *name, Memimage *img, void *vdata, Poin
 	bpp = img->depth;
 	Bprint(&b, "%s\t%d\tr %R clipr %R repl %d data %p *%P\n", name, r.min.x, r, img->clipr, (img->flags&Frepl) ? 1 : 0, vdata, labelpt);
 	mask = (1ULL<<bpp)-1;
-//	for(y=r.min.y; y<r.max.y; y++){
+/*	for(y=r.min.y; y<r.max.y; y++){ */
 	for(y=0; y<Yrange; y++){
 		nb = 0;
 		v = 0;
 		p = data+(byteaddr(img, Pt(0,y))-(uchar*)img->data->bdata);
 		Bprint(&b, "%-4d\t", y);
-//		for(x=r.min.x; x<r.max.x; x++){
+/*		for(x=r.min.x; x<r.max.x; x++){ */
 		for(x=0; x<Xrange; x++){
 			if(x==0)
 				Bprint(&b, "\t");
@@ -263,7 +263,7 @@ dumpimage(char *name, Memimage *img, void *vdata, Poin
 				nb += 8;
 			}
 			nb -= bpp;
-//			print("bpp %d v %.8lux mask %.8lux nb %d\n", bpp, v, mask, nb);
+/*			print("bpp %d v %.8lux mask %.8lux nb %d\n", bpp, v, mask, nb); */
 			fmt(&b, arg, (v>>nb)&mask);
 		}
 		Bprint(&b, "\n");
@@ -635,8 +635,8 @@ replicate(Memimage *i, Memimage *tmp)
 	i->flags |= Frepl;
 	i->r = r;
 	i->clipr = randrect();
-//	fprint(2, "replicate [[%d %d] [%d %d]] [[%d %d][%d %d]]\n", r.min.x, r.min.y, r.max.x, r.max.y,
-//		i->clipr.min.x, i->clipr.min.y, i->clipr.max.x, i->clipr.max.y);
+/*	fprint(2, "replicate [[%d %d] [%d %d]] [[%d %d][%d %d]]\n", r.min.x, r.min.y, r.max.x, r.max.y, */
+/*		i->clipr.min.x, i->clipr.min.y, i->clipr.max.x, i->clipr.max.y); */
 	tmp->clipr = i->clipr;
 }
 
@@ -651,7 +651,7 @@ verifyrectmaskrepl(int srcrepl, int maskrepl)
 	int x, y;
 	Memimage *s, *m;
 
-//	print("verfrect %d %d\n", srcrepl, maskrepl);
+/*	print("verfrect %d %d\n", srcrepl, maskrepl); */
 	src->flags &= ~Frepl;
 	src->r = Rect(0, 0, Xrange, Yrange);
 	src->clipr = src->r;
blob - 7053c171c6837abc070e5a995598ee503f8e65a7
blob + c7042b9fc4f1ac4f9d1c6ffb105213f4b59a42a3
--- src/libdraw/md-line.c
+++ src/libdraw/md-line.c
@@ -7,7 +7,7 @@ enum
 {
 	Arrow1 = 8,
 	Arrow2 = 10,
-	Arrow3 = 3,
+	Arrow3 = 3
 };
 
 /*
blob - 883043380494df0b6470278ba067c9e5177647aa
blob + 242236e185ea051510f66ca14a58ec805becc73d
--- src/libdraw/menuhit.c
+++ src/libdraw/menuhit.c
@@ -13,7 +13,7 @@ enum
 	Maxunscroll = 25,	/* maximum #entries before scrolling turns on */
 	Nscroll = 20,		/* number entries in scrolling part */
 	Scrollwid = 14,		/* width of scroll bar */
-	Gap = 4,			/* between text and scroll bar */
+	Gap = 4			/* between text and scroll bar */
 };
 
 static	Image	*menutxt;
blob - 27fdcfc56b8a889a8455d20cc7f7f7df4b7d57d2
blob + 800ffc859e7ce4be661c1f52bbda287f82cb63fb
--- src/libdraw/ml-layerop.c
+++ src/libdraw/ml-layerop.c
@@ -26,7 +26,7 @@ _layerop(
 	fr = front->layer->screenr;
 	if(rectXrect(r, fr) == 0){
 		/* r doesn't touch this window; continue on next rearmost */
-		// assert(front && front->layer && front->layer->screen && front->layer->rear);
+		/* assert(front && front->layer && front->layer->screen && front->layer->rear); */
 		front = front->layer->rear;
 		goto Top;
 	}
blob - 8c09a53592f42b750bc77df0bd156bb543c53b1a
blob + f74930ef0440253c6e3a26f22dde7a1b46594a38
--- src/libdraw/ml-line.c
+++ src/libdraw/ml-line.c
@@ -67,8 +67,8 @@ _memline(Memimage *dst, Point p0, Point p1, int end0, 
 
 	/* XXX */
 	/* this is not the correct set of tests */
-//	if(log2[dst->depth] != log2[src->depth] || log2[dst->depth]!=3)
-//		return;
+/*	if(log2[dst->depth] != log2[src->depth] || log2[dst->depth]!=3) */
+/*		return; */
 
 	/* can't use sutherland-cohen clipping because lines are wide */
 	r = memlinebbox(p0, p1, end0, end1, radius);
blob - 68b5b016e70da0794d9fd9dfa4a6794d7bbb2eeb
blob + 6c41daffd1cf889f03ce7842461391e1ba9b4ea5
--- src/libdraw/x11-draw.c
+++ src/libdraw/x11-draw.c
@@ -66,7 +66,7 @@ xdraw(Memdrawparam *par)
 	m = Simplesrc|Fullsrc|Simplemask|Fullmask;
 	if((state&m) == m){
 		_xfillcolor(dst, r, par->sdval);
-	//	xdirtyxdata(dst, r);
+	/*	xdirtyxdata(dst, r); */
 		return 1;
 	}
 
@@ -85,7 +85,7 @@ xdraw(Memdrawparam *par)
 
 		XCopyArea(_x.display, xsrc->pixmap, xdst->pixmap, gc,
 			sp.x, sp.y, Dx(r), Dy(r), dp.x, dp.y);
-	//	xdirtyxdata(dst, r);
+	/*	xdirtyxdata(dst, r); */
 		return 1;
 	}
 
@@ -132,7 +132,7 @@ xdraw(Memdrawparam *par)
 		XSetTSOrigin(_x.display, gc, mp.x, mp.y);
 		XFillRectangle(_x.display, xdst->pixmap, gc, dp.x, dp.y,
 			Dx(r), Dy(r));
-	//	xdirtyxdata(dst, r);
+	/*	xdirtyxdata(dst, r); */
 		return 1;
 	}
 
blob - a640e2eeeb50d568ed3d195a0a7bb603888e9177
blob + 277e85205de87c23d9f6864ecc08cc5cf275cb93
--- src/libdraw/x11-init.c
+++ src/libdraw/x11-init.c
@@ -152,7 +152,7 @@ getwindow(Display *d, int ref)
 	oi = d->image;
 	i = getimage0(d, oi);
 	d->image = i;
-	// fprint(2, "getwindow %p -> %p\n", oi, i);
+	/* fprint(2, "getwindow %p -> %p\n", oi, i); */
 
 	_screen = allocscreen(i, d->white, 0);
 	_freeimage1(screen);
@@ -181,7 +181,7 @@ xerror(XDisplay *d, XErrorEvent *e)
 static int
 xioerror(XDisplay *d)
 {
-	//print("X I/O error\n");
+	/*print("X I/O error\n"); */
 	sysfatal("X I/O error\n");
 	abort();
 	return -1;
blob - 538028da9860e286ded1e59d990fdb1a4ba7511f
blob + 2bb11f5c365688668fb8f486f0d71314be82f52b
--- src/libdraw/x11-itrans.c
+++ src/libdraw/x11-itrans.c
@@ -560,7 +560,7 @@ applegetsnarf(void)
 	PasteboardSyncFlags flags;
 	UInt32 i;
 
-//	fprint(2, "applegetsnarf\n");
+/*	fprint(2, "applegetsnarf\n"); */
 	qlock(&clip.lk);
 	if(clip.apple == nil){
 		if(PasteboardCreate(kPasteboardClipboard, &clip.apple) != noErr){
@@ -614,7 +614,7 @@ appleputsnarf(char *s)
 	CFDataRef cfdata;
 	PasteboardSyncFlags flags;
 
-//	fprint(2, "appleputsnarf\n");
+/*	fprint(2, "appleputsnarf\n"); */
 
 	if(strlen(s) >= SnarfSize)
 		return;
blob - dc9785ebd567e090d119e886c1a2cf6c96b1461d
blob + 582b68e1d86fe10ef54bc1b4b199afe0012843cd
--- src/libdraw/x11-wsys.c
+++ src/libdraw/x11-wsys.c
@@ -26,14 +26,14 @@ drawtopwindow(void)
 void
 drawresizewindow(Rectangle r)
 {
-//	XConfigureRequestEvent e;
+/*	XConfigureRequestEvent e; */
 	XWindowChanges e;
 	int value_mask;
 
 	memset(&e, 0, sizeof e);
 	value_mask = CWWidth|CWHeight;
-//	e.x = r.min.x;
-//	e.y = r.min.y;
+/*	e.x = r.min.x; */
+/*	e.y = r.min.y; */
 	e.width = Dx(r);
 	e.height = Dy(r);
 	XConfigureWindow(_x.display, _x.drawable, value_mask, &e);
blob - 6f01778f36b52f92f949f834439d0be0c4a0eeb2
blob + 3f5b69a683bfff1f0842e57678f02caf5d7fc0b3
--- src/libflate/deflate.c
+++ src/libflate/deflate.c
@@ -67,7 +67,7 @@ enum
 
 	EstLitBits	= 8,
 	EstLenBits	= 4,
-	EstOffBits	= 5,
+	EstOffBits	= 5
 };
 
 /*
blob - 9669d86a81432505728f69ca970617c98d142808
blob + da97c0c6386eec36b764165338e23ee27c4e42f0
--- src/libflate/zlib.h
+++ src/libflate/zlib.h
@@ -7,5 +7,5 @@ enum
 	ZlibDeflate	= 0x08,
 
 	ZlibCInfo	= 0xf0,			/* mask of compression aux. info */
-	ZlibWin32k	= 0x70,			/* 32k history window */
+	ZlibWin32k	= 0x70			/* 32k history window */
 };
blob - 7cae15d4213618f287fed7999ad14032ef87371d
blob + c65918c2fba5e807f421c89c6a63d1aad5c2c57c
--- src/libhtml/build.c
+++ src/libhtml/build.c
@@ -5,45 +5,45 @@
 #include <html.h>
 #include "impl.h"
 
-// A stack for holding integer values
+/* A stack for holding integer values */
 enum {
-	Nestmax = 40	// max nesting level of lists, font styles, etc.
+	Nestmax = 40	/* max nesting level of lists, font styles, etc. */
 };
 
 struct Stack {
-	int		n;				// next available slot (top of stack is stack[n-1])
-	int		slots[Nestmax];	// stack entries
+	int		n;				/* next available slot (top of stack is stack[n-1]) */
+	int		slots[Nestmax];	/* stack entries */
 };
 
-// Parsing state
+/* Parsing state */
 struct Pstate
 {
-	Pstate*	next;			// in stack of Pstates
-	int		skipping;		// true when we shouldn't add items
-	int		skipwhite;		// true when we should strip leading space
-	int		curfont;		// font index for current font
-	int		curfg;		// current foreground color
-	Background	curbg;	// current background
-	int		curvoff;		// current baseline offset
-	uchar	curul;		// current underline/strike state
-	uchar	curjust;		// current justify state
-	int		curanchor;	// current (href) anchor id (if in one), or 0
-	int		curstate;		// current value of item state
-	int		literal;		// current literal state
-	int		inpar;		// true when in a paragraph-like construct
-	int		adjsize;		// current font size adjustment
-	Item*	items;		// dummy head of item list we're building
-	Item*	lastit;		// tail of item list we're building
-	Item*	prelastit;		// item before lastit
-	Stack	fntstylestk;	// style stack
-	Stack	fntsizestk;		// size stack
-	Stack	fgstk;		// text color stack
-	Stack	ulstk;		// underline stack
-	Stack	voffstk;		// vertical offset stack
-	Stack	listtypestk;	// list type stack
-	Stack	listcntstk;		// list counter stack
-	Stack	juststk;		// justification stack
-	Stack	hangstk;		// hanging stack
+	Pstate*	next;			/* in stack of Pstates */
+	int		skipping;		/* true when we shouldn't add items */
+	int		skipwhite;		/* true when we should strip leading space */
+	int		curfont;		/* font index for current font */
+	int		curfg;		/* current foreground color */
+	Background	curbg;	/* current background */
+	int		curvoff;		/* current baseline offset */
+	uchar	curul;		/* current underline/strike state */
+	uchar	curjust;		/* current justify state */
+	int		curanchor;	/* current (href) anchor id (if in one), or 0 */
+	int		curstate;		/* current value of item state */
+	int		literal;		/* current literal state */
+	int		inpar;		/* true when in a paragraph-like construct */
+	int		adjsize;		/* current font size adjustment */
+	Item*	items;		/* dummy head of item list we're building */
+	Item*	lastit;		/* tail of item list we're building */
+	Item*	prelastit;		/* item before lastit */
+	Stack	fntstylestk;	/* style stack */
+	Stack	fntsizestk;		/* size stack */
+	Stack	fgstk;		/* text color stack */
+	Stack	ulstk;		/* underline stack */
+	Stack	voffstk;		/* vertical offset stack */
+	Stack	listtypestk;	/* list type stack */
+	Stack	listcntstk;		/* list counter stack */
+	Stack	juststk;		/* justification stack */
+	Stack	hangstk;		/* hanging stack */
 };
 
 struct ItemSource
@@ -60,23 +60,23 @@ struct ItemSource
 	Kidinfo*		kidstk;
 };
 
-// Some layout parameters
+/* Some layout parameters */
 enum {
-	FRKIDMARGIN = 6,	// default margin around kid frames
-	IMGHSPACE = 0,	// default hspace for images (0 matches IE, Netscape)
-	IMGVSPACE = 0,	// default vspace for images
-	FLTIMGHSPACE = 2,	// default hspace for float images
-	TABSP = 5,		// default cellspacing for tables
-	TABPAD = 1,		// default cell padding for tables
-	LISTTAB = 1,		// number of tabs to indent lists
-	BQTAB = 1,		// number of tabs to indent blockquotes
-	HRSZ = 2,			// thickness of horizontal rules
-	SUBOFF = 4,		// vertical offset for subscripts
-	SUPOFF = 6,		// vertical offset for superscripts
-	NBSP = 160		// non-breaking space character
+	FRKIDMARGIN = 6,	/* default margin around kid frames */
+	IMGHSPACE = 0,	/* default hspace for images (0 matches IE, Netscape) */
+	IMGVSPACE = 0,	/* default vspace for images */
+	FLTIMGHSPACE = 2,	/* default hspace for float images */
+	TABSP = 5,		/* default cellspacing for tables */
+	TABPAD = 1,		/* default cell padding for tables */
+	LISTTAB = 1,		/* number of tabs to indent lists */
+	BQTAB = 1,		/* number of tabs to indent blockquotes */
+	HRSZ = 2,			/* thickness of horizontal rules */
+	SUBOFF = 4,		/* vertical offset for subscripts */
+	SUPOFF = 6,		/* vertical offset for superscripts */
+	NBSP = 160		/* non-breaking space character */
 };
 
-// These tables must be sorted
+/* These tables must be sorted */
 static StringInt *align_tab;
 static AsciiInt _align_tab[] = {
 	{"baseline",	ALbaseline},
@@ -147,7 +147,7 @@ static char* _roman[15]= {
 };
 #define NROMAN 15
 
-// List number types
+/* List number types */
 enum {
 	LTdisc, LTsquare, LTcircle, LT1, LTa, LTA, LTi, LTI
 };
@@ -159,11 +159,11 @@ enum {
 	BLBA = (BL|SPBefore|SPAfter)
 };
 
-// blockbrk[tag] is break info for a block level element, or one
-// of a few others that get the same treatment re ending open paragraphs
-// and requiring a line break / vertical space before them.
-// If we want a line of space before the given element, SPBefore is OR'd in.
-// If we want a line of space after the given element, SPAfter is OR'd in.
+/* blockbrk[tag] is break info for a block level element, or one */
+/* of a few others that get the same treatment re ending open paragraphs */
+/* and requiring a line break / vertical space before them. */
+/* If we want a line of space before the given element, SPBefore is OR'd in. */
+/* If we want a line of space after the given element, SPAfter is OR'd in. */
 
 static uchar blockbrk[Numtags]= {
 /*Notfound*/ 0,
@@ -268,8 +268,8 @@ enum {
 	AGEN = 1
 };
 
-// attrinfo is information about attributes.
-// The AGEN value means that the attribute is generic (applies to almost all elements)
+/* attrinfo is information about attributes. */
+/* The AGEN value means that the attribute is generic (applies to almost all elements) */
 static uchar attrinfo[Numattrs]= {
 /*Aabbr*/ 0,
 /*Aaccept_charset*/ 0,
@@ -508,7 +508,7 @@ static uchar scriptev[Numattrs]= {
 /*Awidth*/ 0,
 };
 
-// Color lookup table
+/* Color lookup table */
 static StringInt *color_tab;
 static AsciiInt _color_tab[] = {
 	{"aqua", 0x00FFFF},
@@ -691,11 +691,11 @@ newitemsource(Docinfo* di)
 
 static Item *getitems(ItemSource* is, uchar* data, int datalen);
 
-// Parse an html document and create a list of layout items.
-// Allocate and return document info in *pdi.
-// When caller is done with the items, it should call
-// freeitems on the returned result, and then
-// freedocinfo(*pdi).
+/* Parse an html document and create a list of layout items. */
+/* Allocate and return document info in *pdi. */
+/* When caller is done with the items, it should call */
+/* freeitems on the returned result, and then */
+/* freedocinfo(*pdi). */
 Item*
 parsehtml(uchar* data, int datalen, Rune* pagesrc, int mtype, int chset, Docinfo** pdi)
 {
@@ -716,10 +716,10 @@ parsehtml(uchar* data, int datalen, Rune* pagesrc, int
 	return it;
 }
 
-// Get a group of tokens for lexer, parse them, and create
-// a list of layout items.
-// When caller is done with the items, it should call
-// freeitems on the returned result.
+/* Get a group of tokens for lexer, parse them, and create */
+/* a list of layout items. */
+/* When caller is done with the items, it should call */
+/* freeitems on the returned result. */
 static Item*
 getitems(ItemSource* is, uchar* data, int datalen)
 {
@@ -796,7 +796,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 
 	if(!buildinited)
 		buildinit();
-	doscripts = 0;	// for now
+	doscripts = 0;	/* for now */
 	ps = is->psstk;
 	curtab = is->tabstk;
 	di = is->doc;
@@ -826,15 +826,15 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->inpar = 0;
 			}
 		}
-		// check common case first (Data), then switch statement on tag
+		/* check common case first (Data), then switch statement on tag */
 		if(tag == Data) {
-			// Lexing didn't pay attention to SGML record boundary rules:
-			// \n after start tag or before end tag to be discarded.
-			// (Lex has already discarded all \r's).
-			// Some pages assume this doesn't happen in <PRE> text,
-			// so we won't do it if literal is true.
-			// BUG: won't discard \n before a start tag that begins
-			// the next bufferful of tokens.
+			/* Lexing didn't pay attention to SGML record boundary rules: */
+			/* \n after start tag or before end tag to be discarded. */
+			/* (Lex has already discarded all \r's). */
+			/* Some pages assume this doesn't happen in <PRE> text, */
+			/* so we won't do it if literal is true. */
+			/* BUG: won't discard \n before a start tag that begins */
+			/* the next bufferful of tokens. */
 			s = tok->text;
 			n = _Strlen(s);
 			if(!ps->literal) {
@@ -842,8 +842,8 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				j = n;
 				if(toki > 0) {
 					pt = toks[toki - 1].tag;
-					// IE and Netscape both ignore this rule (contrary to spec)
-					// if previous tag was img
+					/* IE and Netscape both ignore this rule (contrary to spec) */
+					/* if previous tag was img */
 					if(pt < Numtags && pt != Timg && j > 0 && s[0] == '\n')
 						i++;
 				}
@@ -873,26 +873,28 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				if(s != nil)
 					ps->skipwhite = 0;
 			}
-			tok->text = nil;		// token doesn't own string anymore
-			if(s != nil)
+			tok->text = nil;		/* token doesn't own string anymore */
+			if(s != nil){
 				addtext(ps, s);
+				s = nil;
+			}
 		}
 		else
 			switch(tag) {
-			// Some abbrevs used in following DTD comments
-			// %text = 	#PCDATA
-			//		| TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP
-			//		| EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE
-			//		| A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP
-			//		| INPUT | SELECT | TEXTAREA
-			// %block = P | UL | OL | DIR | MENU | DL | PRE | DL | DIV | CENTER
-			//		| BLOCKQUOTE | FORM | ISINDEX | HR | TABLE
-			// %flow = (%text | %block)*
-			// %body.content = (%heading | %text | %block | ADDRESS)*
+			/* Some abbrevs used in following DTD comments */
+			/* %text = 	#PCDATA */
+			/*		| TT | I | B | U | STRIKE | BIG | SMALL | SUB | SUP */
+			/*		| EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE */
+			/*		| A | IMG | APPLET | FONT | BASEFONT | BR | SCRIPT | MAP */
+			/*		| INPUT | SELECT | TEXTAREA */
+			/* %block = P | UL | OL | DIR | MENU | DL | PRE | DL | DIV | CENTER */
+			/*		| BLOCKQUOTE | FORM | ISINDEX | HR | TABLE */
+			/* %flow = (%text | %block)* */
+			/* %body.content = (%heading | %text | %block | ADDRESS)* */
 
-			// <!ELEMENT A - - (%text) -(A)>
-			// Anchors are not supposed to be nested, but you sometimes see
-			// href anchors inside destination anchors.
+			/* <!ELEMENT A - - (%text) -(A)> */
+			/* Anchors are not supposed to be nested, but you sometimes see */
+			/* href anchors inside destination anchors. */
 			case Ta:
 				if(ps->curanchor != 0) {
 					if(warn)
@@ -901,18 +903,18 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				}
 				name = aval(tok, Aname);
 				href = aurlval(tok, Ahref, nil, di->base);
-				// ignore rel, rev, and title attrs
+				/* ignore rel, rev, and title attrs */
 				if(href != nil) {
 					target = atargval(tok, di->target);
 					di->anchors = newanchor(++is->nanchors, name, href, target, di->anchors);
 					if(name != nil)
-						name = _Strdup(name);	// for DestAnchor construction, below
+						name = _Strdup(name);	/* for DestAnchor construction, below */
 					ps->curanchor = is->nanchors;
 					ps->curfg = push(&ps->fgstk, di->link);
 					ps->curul = push(&ps->ulstk, ULunder);
 				}
 				if(name != nil) {
-					// add a null item to be destination
+					/* add a null item to be destination */
 					additem(ps, newispacer(ISPnull), tok);
 					di->dests = newdestanchor(++is->nanchors, name, ps->lastit, di->dests);
 				}
@@ -926,16 +928,16 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				}
 				break;
 
-			// <!ELEMENT APPLET - - (PARAM | %text)* >
-			// We can't do applets, so ignore PARAMS, and let
-			// the %text contents appear for the alternative rep
+			/* <!ELEMENT APPLET - - (PARAM | %text)* > */
+			/* We can't do applets, so ignore PARAMS, and let */
+			/* the %text contents appear for the alternative rep */
 			case Tapplet:
 			case Tapplet+RBRA:
 				if(warn && tag == Tapplet)
 					fprint(2, "warning: <APPLET> ignored\n");
 				break;
 
-			// <!ELEMENT AREA - O EMPTY>
+			/* <!ELEMENT AREA - O EMPTY> */
 			case Tarea:
 				map = di->maps;
 				if(map == nil) {
@@ -950,7 +952,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				setdimarray(tok, Acoords, &map->areas->coords, &map->areas->ncoords);
 				break;
 
-			// <!ELEMENT (B|STRONG) - - (%text)*>
+			/* <!ELEMENT (B|STRONG) - - (%text)*> */
 			case Tb:
 			case Tstrong:
 				pushfontstyle(ps, FntB);
@@ -971,7 +973,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				popfontstyle(ps);
 				break;
 
-			// <!ELEMENT BASE - O EMPTY>
+			/* <!ELEMENT BASE - O EMPTY> */
 			case Tbase:
 				t = di->base;
 				di->base = aurlval(tok, Ahref, di->base, di->base);
@@ -980,12 +982,12 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				di->target = atargval(tok, di->target);
 				break;
 
-			// <!ELEMENT BASEFONT - O EMPTY>
+			/* <!ELEMENT BASEFONT - O EMPTY> */
 			case Tbasefont:
 				ps->adjsize = aintval(tok, Asize, 3) - 3;
 				break;
 
-			// <!ELEMENT (BIG|SMALL) - - (%text)*>
+			/* <!ELEMENT (BIG|SMALL) - - (%text)*> */
 			case Tbig:
 			case Tsmall:
 				sz = ps->adjsize;
@@ -1001,7 +1003,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				popfontsize(ps);
 				break;
 
-			// <!ELEMENT BLOCKQUOTE - - %body.content>
+			/* <!ELEMENT BLOCKQUOTE - - %body.content> */
 			case Tblockquote:
 				changeindent(ps, BQTAB);
 				break;
@@ -1010,7 +1012,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				changeindent(ps, -BQTAB);
 				break;
 
-			// <!ELEMENT BODY O O %body.content>
+			/* <!ELEMENT BODY O O %body.content> */
 			case Tbody:
 				ps->skipping = 0;
 				bg = makebackground(nil, acolorval(tok, Abgcolor, di->background.color));
@@ -1018,8 +1020,8 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				if(bgurl != nil) {
 					if(di->backgrounditem != nil)
 						freeitem((Item*)di->backgrounditem);
-						// really should remove old item from di->images list,
-						// but there should only be one BODY element ...
+						/* really should remove old item from di->images list, */
+						/* but there should only be one BODY element ... */
 					di->backgrounditem = (Iimage*)newiimage(bgurl, nil, ALnone, 0, 0, 0, 0, 0, 0, nil);
 					di->backgrounditem->nextimage = di->images;
 					di->images = di->backgrounditem;
@@ -1037,17 +1039,17 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				break;
 
 			case Tbody+RBRA:
-				// HTML spec says ignore things after </body>,
-				// but IE and Netscape don't
-				// ps.skipping = 1;
+				/* HTML spec says ignore things after </body>, */
+				/* but IE and Netscape don't */
+				/* ps.skipping = 1; */
 				break;
 
-			// <!ELEMENT BR - O EMPTY>
+			/* <!ELEMENT BR - O EMPTY> */
 			case Tbr:
 				addlinebrk(ps, atabval(tok, Aclear, clear_tab, NCLEARTAB, 0));
 				break;
 
-			// <!ELEMENT CAPTION - - (%text;)*>
+			/* <!ELEMENT CAPTION - - (%text;)*> */
 			case Tcaption:
 				if(curtab == nil) {
 					if(warn)
@@ -1089,7 +1091,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				popjust(ps);
 				break;
 
-			// <!ELEMENT DD - O  %flow >
+			/* <!ELEMENT DD - O  %flow > */
 			case Tdd:
 				if(ps->hangstk.n == 0) {
 					if(warn)
@@ -1104,8 +1106,8 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				push(&ps->hangstk, 0);
 				break;
 
-			//<!ELEMENT (DIR|MENU) - - (LI)+ -(%block) >
-			//<!ELEMENT (OL|UL) - - (LI)+>
+			/*<!ELEMENT (DIR|MENU) - - (LI)+ -(%block) > */
+			/*<!ELEMENT (OL|UL) - - (LI)+> */
 			case Tdir:
 			case Tmenu:
 			case Tol:
@@ -1130,7 +1132,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				changeindent(ps, -LISTTAB);
 				break;
 
-			// <!ELEMENT DL - - (DT|DD)+ >
+			/* <!ELEMENT DL - - (DT|DD)+ > */
 			case Tdl:
 				changeindent(ps, LISTTAB);
 				push(&ps->hangstk, 0);
@@ -1148,7 +1150,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				pop(&ps->hangstk);
 				break;
 
-			// <!ELEMENT DT - O (%text)* >
+			/* <!ELEMENT DT - O (%text)* > */
 			case Tdt:
 				if(ps->hangstk.n == 0) {
 					if(warn)
@@ -1163,7 +1165,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				push(&ps->hangstk, 1);
 				break;
 
-			// <!ELEMENT FONT - - (%text)*>
+			/* <!ELEMENT FONT - - (%text)*> */
 			case Tfont:
 				sz = top(&ps->fntsizestk, Normal);
 				if(_tokaval(tok, Asize, &nsz, 0)) {
@@ -1188,7 +1190,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				popfontsize(ps);
 				break;
 
-			// <!ELEMENT FORM - - %body.content -(FORM) >
+			/* <!ELEMENT FORM - - %body.content -(FORM) > */
 			case Tform:
 				if(is->curform != nil) {
 					if(warn)
@@ -1216,12 +1218,12 @@ getitems(ItemSource* is, uchar* data, int datalen)
 						fprint(2, "warning: unexpected </FORM>\n");
 					continue;
 				}
-				// put fields back in input order
+				/* put fields back in input order */
 				is->curform->fields = (Formfield*)_revlist((List*)is->curform->fields);
 				is->curform = nil;
 				break;
 
-			// <!ELEMENT FRAME - O EMPTY>
+			/* <!ELEMENT FRAME - O EMPTY> */
 			case Tframe:
 				ks = is->kidstk;
 				if(ks == nil) {
@@ -1246,7 +1248,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					kd->flags |= FRnoresize;
 				break;
 
-			// <!ELEMENT FRAMESET - - (FRAME|FRAMESET)+>
+			/* <!ELEMENT FRAMESET - - (FRAME|FRAMESET)+> */
 			case Tframeset:
 				ks = newkidinfo(1, nil);
 				pks = is->kidstk;
@@ -1279,8 +1281,8 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					continue;
 				}
 				ks = is->kidstk;
-				// put kids back in original order
-				// and add blank frames to fill out cells
+				/* put kids back in original order */
+				/* and add blank frames to fill out cells */
 				n = ks->nrows*ks->ncols;
 				nblank = n - _listlen((List*)ks->kidinfos);
 				while(nblank-- > 0)
@@ -1288,13 +1290,13 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ks->kidinfos = (Kidinfo*)_revlist((List*)ks->kidinfos);
 				is->kidstk = is->kidstk->nextframeset;
 				if(is->kidstk == nil) {
-					// end input
+					/* end input */
 					ans = nil;
 					goto return_ans;
 				}
 				break;
 
-			// <!ELEMENT H1 - - (%text;)*>, etc.
+			/* <!ELEMENT H1 - - (%text;)*>, etc. */
 			case Th1:
 			case Th2:
 			case Th3:
@@ -1330,16 +1332,16 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				break;
 
 			case Thead:
-				// HTML spec says ignore regular markup in head,
-				// but Netscape and IE don't
-				// ps.skipping = 1;
+				/* HTML spec says ignore regular markup in head, */
+				/* but Netscape and IE don't */
+				/* ps.skipping = 1; */
 				break;
 
 			case Thead+RBRA:
 				ps->skipping = 0;
 				break;
 
-			// <!ELEMENT HR - O EMPTY>
+			/* <!ELEMENT HR - O EMPTY> */
 			case Thr:
 				al = atabval(tok, Aalign, align_tab, NALIGNTAB, ALcenter);
 				sz = auintval(tok, Asize, HRSZ);
@@ -1360,7 +1362,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				pushfontstyle(ps, FntI);
 				break;
 
-			// <!ELEMENT IMG - O EMPTY>
+			/* <!ELEMENT IMG - O EMPTY> */
 			case Timg:
 				map = nil;
 				oldcuranchor = ps->curanchor;
@@ -1400,7 +1402,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 						map);
 				if(align == ALleft || align == ALright) {
 					additem(ps, newifloat(img, align), tok);
-					// if no hspace specified, use FLTIMGHSPACE
+					/* if no hspace specified, use FLTIMGHSPACE */
 					if(!_tokaval(tok, Ahspace, &val, 0))
 						((Iimage*)img)->hspace = FLTIMGHSPACE;
 				}
@@ -1415,7 +1417,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->curanchor = oldcuranchor;
 				break;
 
-			// <!ELEMENT INPUT - O EMPTY>
+			/* <!ELEMENT INPUT - O EMPTY> */
 			case Tinput:
 				ps->skipwhite = 0;
 				if(is->curform == nil) {
@@ -1475,9 +1477,9 @@ getitems(ItemSource* is, uchar* data, int datalen)
 							fprint(2, "warning: image form field missing src\n");
 						continue;
 					}
-					// width and height attrs aren't specified in HTML 3.2,
-					// but some people provide them and they help avoid
-					// a relayout
+					/* width and height attrs aren't specified in HTML 3.2, */
+					/* but some people provide them and they help avoid */
+					/* a relayout */
 					field->image = newiimage(src,
 						astrval(tok, Aalt, L(Lsubmit)),
 						atabval(tok, Aalign, align_tab, NALIGNTAB, ALbottom),
@@ -1504,7 +1506,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					field->events = ffit->genattr->events;
 				break;
 
-			// <!ENTITY ISINDEX - O EMPTY>
+			/* <!ENTITY ISINDEX - O EMPTY> */
 			case Tisindex:
 				ps->skipwhite = 0;
 				prompt = astrval(tok, Aprompt, L(Lindex));
@@ -1531,7 +1533,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				addbrk(ps, 1, 0);
 				break;
 
-			// <!ELEMENT LI - O %flow>
+			/* <!ELEMENT LI - O %flow> */
 			case Tli:
 				if(ps->listtypestk.n == 0) {
 					if(warn)
@@ -1556,7 +1558,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->skipwhite = 1;
 				break;
 
-			// <!ELEMENT MAP - - (AREA)+>
+			/* <!ELEMENT MAP - - (AREA)+> */
 			case Tmap:
 				if(_tokaval(tok, Aname, &name, 0))
 					is->curmap = getmap(di, name);
@@ -1595,7 +1597,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				}
 				break;
 
-			// Nobr is NOT in HMTL 4.0, but it is ubiquitous on the web
+			/* Nobr is NOT in HMTL 4.0, but it is ubiquitous on the web */
 			case Tnobr:
 				ps->skipwhite = 0;
 				ps->curstate &= ~IFwrap;
@@ -1605,7 +1607,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->curstate |= IFwrap;
 				break;
 
-			// We do frames, so skip stuff in noframes
+			/* We do frames, so skip stuff in noframes */
 			case Tnoframes:
 				ps->skipping = 1;
 				break;
@@ -1614,7 +1616,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->skipping = 0;
 				break;
 
-			// We do scripts (if enabled), so skip stuff in noscripts
+			/* We do scripts (if enabled), so skip stuff in noscripts */
 			case Tnoscript:
 				if(doscripts)
 					ps->skipping = 1;
@@ -1625,7 +1627,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					ps->skipping = 0;
 				break;
 
-			// <!ELEMENT OPTION - O (	//PCDATA)>
+			/* <!ELEMENT OPTION - O (	//PCDATA)> */
 			case Toption:
 				if(is->curform == nil || is->curform->fields == nil) {
 					if(warn)
@@ -1646,7 +1648,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					option->value = _Strdup(option->display);
 				break;
 
-			// <!ELEMENT P - O (%text)* >
+			/* <!ELEMENT P - O (%text)* > */
 			case Tp:
 				pushjust(ps, atabval(tok, Aalign, align_tab, NALIGNTAB, ps->curjust));
 				ps->inpar = 1;
@@ -1656,12 +1658,12 @@ getitems(ItemSource* is, uchar* data, int datalen)
 			case Tp+RBRA:
 				break;
 
-			// <!ELEMENT PARAM - O EMPTY>
-			// Do something when we do applets...
+			/* <!ELEMENT PARAM - O EMPTY> */
+			/* Do something when we do applets... */
 			case Tparam:
 				break;
 
-			// <!ELEMENT PRE - - (%text)* -(IMG|BIG|SMALL|SUB|SUP|FONT) >
+			/* <!ELEMENT PRE - - (%text)* -(IMG|BIG|SMALL|SUB|SUP|FONT) > */
 			case Tpre:
 				ps->curstate &= ~IFwrap;
 				ps->literal = 1;
@@ -1677,13 +1679,13 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				}
 				break;
 
-			// <!ELEMENT SCRIPT - - CDATA>
+			/* <!ELEMENT SCRIPT - - CDATA> */
 			case Tscript:
 				if(doscripts) {
 					if(!di->hasscripts) {
 						if(di->scripttype == TextJavascript) {
-							// TODO: initialize script if nec.
-							// initjscript(di);
+							/* TODO: initialize script if nec. */
+							/* initjscript(di); */
 							di->hasscripts = 1;
 						}
 					}
@@ -1716,7 +1718,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->skipping = 0;
 				break;
 
-			// <!ELEMENT SELECT - - (OPTION+)>
+			/* <!ELEMENT SELECT - - (OPTION+)> */
 			case Tselect:
 				if(is->curform == nil) {
 					if(warn)
@@ -1738,7 +1740,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				additem(ps, ffit, tok);
 				if(ffit->genattr != nil)
 					field->events = ffit->genattr->events;
-				// throw away stuff until next tag (should be <OPTION>)
+				/* throw away stuff until next tag (should be <OPTION>) */
 				s = getpcdata(toks, tokslen, &toki);
 				if(s != nil)
 					free(s);
@@ -1753,11 +1755,11 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				field = is->curform->fields;
 				if(field->ftype != Fselect)
 					continue;
-				// put options back in input order
+				/* put options back in input order */
 				field->options = (Option*)_revlist((List*)field->options);
 				break;
 
-			// <!ELEMENT (STRIKE|U) - - (%text)*>
+			/* <!ELEMENT (STRIKE|U) - - (%text)*> */
 			case Tstrike:
 			case Tu:
 				ps->curul = push(&ps->ulstk, (tag==Tstrike)? ULmid : ULunder);
@@ -1773,7 +1775,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->curul = popretnewtop(&ps->ulstk, ULnone);
 				break;
 
-			// <!ELEMENT STYLE - - CDATA>
+			/* <!ELEMENT STYLE - - CDATA> */
 			case Tstyle:
 				if(warn)
 					fprint(2, "warning: unimplemented <STYLE>\n");
@@ -1784,7 +1786,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps->skipping = 0;
 				break;
 
-			// <!ELEMENT (SUB|SUP) - - (%text)*>
+			/* <!ELEMENT (SUB|SUP) - - (%text)*> */
 			case Tsub:
 			case Tsup:
 				if(tag == Tsub)
@@ -1807,7 +1809,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				popfontsize(ps);
 				break;
 
-			// <!ELEMENT TABLE - - (CAPTION?, TR+)>
+			/* <!ELEMENT TABLE - - (CAPTION?, TR+)> */
 			case Ttable:
 				ps->skipwhite = 0;
 				tab = newtable(++is->ntables,
@@ -1876,10 +1878,10 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					addbrk(ps, 0, 0);
 				break;
 
-			// <!ELEMENT (TH|TD) - O %body.content>
-			// Cells for a row are accumulated in reverse order.
-			// We push ps on a stack, and use a new one to accumulate
-			// the contents of the cell.
+			/* <!ELEMENT (TH|TD) - O %body.content> */
+			/* Cells for a row are accumulated in reverse order. */
+			/* We push ps on a stack, and use a new one to accumulate */
+			/* the contents of the cell. */
 			case Ttd:
 			case Tth:
 				if(curtab == nil) {
@@ -1951,7 +1953,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				ps = finishcell(curtab, ps);
 				break;
 
-			// <!ELEMENT TEXTAREA - - (	//PCDATA)>
+			/* <!ELEMENT TEXTAREA - - (	//PCDATA)> */
 			case Ttextarea:
 				if(is->curform == nil) {
 					if(warn)
@@ -1978,15 +1980,15 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					field->events = ffit->genattr->events;
 				break;
 
-			// <!ELEMENT TITLE - - (	//PCDATA)* -(%head.misc)>
+			/* <!ELEMENT TITLE - - (	//PCDATA)* -(%head.misc)> */
 			case Ttitle:
 				di->doctitle = getpcdata(toks, tokslen, &toki);
 				if(warn && toki < tokslen - 1 && toks[toki + 1].tag != Ttitle + RBRA)
 					fprint(2, "warning: <TITLE> data ended by %T\n", &toks[toki + 1]);
 				break;
 
-			// <!ELEMENT TR - O (TH|TD)+>
-			// rows are accumulated in reverse order in curtab->rows
+			/* <!ELEMENT TR - O (TH|TD)+> */
+			/* rows are accumulated in reverse order in curtab->rows */
 			case Ttr:
 				if(curtab == nil) {
 					if(warn)
@@ -2024,7 +2026,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 					tr->flags = 0;
 				break;
 
-			// <!ELEMENT (TT|CODE|KBD|SAMP) - - (%text)*>
+			/* <!ELEMENT (TT|CODE|KBD|SAMP) - - (%text)*> */
 			case Ttt:
 			case Tcode:
 			case Tkbd:
@@ -2032,7 +2034,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				pushfontstyle(ps, FntT);
 				break;
 
-			// Tags that have empty action
+			/* Tags that have empty action */
 			case Tabbr:
 			case Tabbr+RBRA:
 			case Tacronym:
@@ -2061,7 +2063,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				break;
 
 
-			// Tags not implemented
+			/* Tags not implemented */
 			case Tbdo:
 			case Tbdo+RBRA:
 			case Tbutton:
@@ -2097,7 +2099,7 @@ getitems(ItemSource* is, uchar* data, int datalen)
 				break;
 			}
 	}
-	// some pages omit trailing </table>
+	/* some pages omit trailing </table> */
 	while(curtab != nil) {
 		if(warn)
 			fprint(2, "warning: <TABLE> not closed\n");
@@ -2124,12 +2126,12 @@ getitems(ItemSource* is, uchar* data, int datalen)
 	}
 	outerps = lastps(ps);
 	ans = outerps->items->next;
-	// note: ans may be nil and di->kids not nil, if there's a frameset!
+	/* note: ans may be nil and di->kids not nil, if there's a frameset! */
 	outerps->items = newispacer(ISPnull);
 	outerps->lastit = outerps->items;
 	is->psstk = ps;
 	if(ans != nil && di->hasscripts) {
-		// TODO evalscript(nil);
+		/* TODO evalscript(nil); */
 		;
 	}
 
@@ -2144,10 +2146,10 @@ return_ans:
 	return ans;
 }
 
-// Concatenate together maximal set of Data tokens, starting at toks[toki+1].
-// Lexer has ensured that there will either be a following non-data token or
-// we will be at eof.
-// Return emallocd trimmed concatenation, and update *ptoki to last used toki
+/* Concatenate together maximal set of Data tokens, starting at toks[toki+1]. */
+/* Lexer has ensured that there will either be a following non-data token or */
+/* we will be at eof. */
+/* Return emallocd trimmed concatenation, and update *ptoki to last used toki */
 static Rune*
 getpcdata(Token* toks, int tokslen, int* ptoki)
 {
@@ -2161,7 +2163,7 @@ getpcdata(Token* toks, int tokslen, int* ptoki)
 
 	ans = nil;
 	anslen = 0;
-	// first find length of answer
+	/* first find length of answer */
 	toki = (*ptoki) + 1;
 	while(toki < tokslen) {
 		tok = &toks[toki];
@@ -2172,7 +2174,7 @@ getpcdata(Token* toks, int tokslen, int* ptoki)
 		else
 			break;
 	}
-	// now make up the initial answer
+	/* now make up the initial answer */
 	if(anslen > 0) {
 		ans = _newstr(anslen);
 		p = ans;
@@ -2198,9 +2200,9 @@ getpcdata(Token* toks, int tokslen, int* ptoki)
 	return ans;
 }
 
-// If still parsing head of curtab->cells list, finish it off
-// by transferring the items on the head of psstk to the cell.
-// Then pop the psstk and return the new psstk.
+/* If still parsing head of curtab->cells list, finish it off */
+/* by transferring the items on the head of psstk to the cell. */
+/* Then pop the psstk and return the new psstk. */
 static Pstate*
 finishcell(Table* curtab, Pstate* psstk)
 {
@@ -2226,8 +2228,8 @@ finishcell(Table* curtab, Pstate* psstk)
 	return psstk;
 }
 
-// Make a new Pstate for a cell, based on the old pstate, oldps.
-// Also, put the new ps on the head of the oldps stack.
+/* Make a new Pstate for a cell, based on the old pstate, oldps. */
+/* Also, put the new ps on the head of the oldps stack. */
 static Pstate*
 cell_pstate(Pstate* oldps, int ishead)
 {
@@ -2251,8 +2253,8 @@ cell_pstate(Pstate* oldps, int ishead)
 	return ps;
 }
 
-// Return a new Pstate with default starting state.
-// Use link to add it to head of a list, if any.
+/* Return a new Pstate with default starting state. */
+/* Use link to add it to head of a list, if any. */
 static Pstate*
 newpstate(Pstate* link)
 {
@@ -2273,7 +2275,7 @@ newpstate(Pstate* link)
 	return ps;
 }
 
-// Return last Pstate on psl list
+/* Return last Pstate on psl list */
 static Pstate*
 lastps(Pstate* psl)
 {
@@ -2283,9 +2285,9 @@ lastps(Pstate* psl)
 	return psl;
 }
 
-// Add it to end of ps item chain, adding in current state from ps.
-// Also, if tok is not nil, scan it for generic attributes and assign
-// the genattr field of the item accordingly.
+/* Add it to end of ps item chain, adding in current state from ps. */
+/* Also, if tok is not nil, scan it for generic attributes and assign */
+/* the genattr field of the item accordingly. */
 static void
 additem(Pstate* ps, Item* it, Token* tok)
 {
@@ -2350,8 +2352,8 @@ additem(Pstate* ps, Item* it, Token* tok)
 	ps->lastit = it;
 }
 
-// Make a text item out of s,
-// using current font, foreground, vertical offset and underline state.
+/* Make a text item out of s, */
+/* using current font, foreground, vertical offset and underline state. */
 static Item*
 textit(Pstate* ps, Rune* s)
 {
@@ -2359,19 +2361,19 @@ textit(Pstate* ps, Rune* s)
 	return newitext(s, ps->curfont, ps->curfg, ps->curvoff + Voffbias, ps->curul);
 }
 
-// Add text item or items for s, paying attention to
-// current font, foreground, baseline offset, underline state,
-// and literal mode.  Unless we're in literal mode, compress
-// whitespace to single blank, and, if curstate has a break,
-// trim any leading whitespace.  Whether in literal mode or not,
-// turn nonbreaking spaces into spacer items with IFnobrk set.
-//
-// In literal mode, break up s at newlines and add breaks instead.
-// Also replace tabs appropriate number of spaces.
-// In nonliteral mode, break up the items every 100 or so characters
-// just to make the layout algorithm not go quadratic.
-//
-// addtext assumes ownership of s.
+/* Add text item or items for s, paying attention to */
+/* current font, foreground, baseline offset, underline state, */
+/* and literal mode.  Unless we're in literal mode, compress */
+/* whitespace to single blank, and, if curstate has a break, */
+/* trim any leading whitespace.  Whether in literal mode or not, */
+/* turn nonbreaking spaces into spacer items with IFnobrk set. */
+/* */
+/* In literal mode, break up s at newlines and add breaks instead. */
+/* Also replace tabs appropriate number of spaces. */
+/* In nonliteral mode, break up the items every 100 or so characters */
+/* just to make the layout algorithm not go quadratic. */
+/* */
+/* addtext assumes ownership of s. */
 static void
 addtext(Pstate* ps, Rune* s)
 {
@@ -2396,7 +2398,7 @@ addtext(Pstate* ps, Rune* s)
 		while(i < n) {
 			if(s[i] == '\n') {
 				if(i > j) {
-					// trim trailing blanks from line
+					/* trim trailing blanks from line */
 					for(k = i; k > j; k--)
 						if(s[k - 1] != ' ')
 							break;
@@ -2411,7 +2413,7 @@ addtext(Pstate* ps, Rune* s)
 				if(s[i] == '\t') {
 					col += i - j;
 					nsp = 8 - (col%8);
-					// make ss = s[j:i] + nsp spaces
+					/* make ss = s[j:i] + nsp spaces */
 					ss = _newstr(i-j+nsp);
 					p = _Stradd(ss, s+j, i-j);
 					p = _Stradd(p, L(Ltab2space), nsp);
@@ -2432,7 +2434,7 @@ addtext(Pstate* ps, Rune* s)
 		}
 		if(i > j) {
 			if(j == 0 && i == n) {
-				// just transfer s over
+				/* just transfer s over */
 				additem(ps, textit(ps, s), nil);
 			}
 			else {
@@ -2441,7 +2443,7 @@ addtext(Pstate* ps, Rune* s)
 			}
 		}
 	}
-	else {	// not literal mode
+	else {	/* not literal mode */
 		if((ps->curstate&IFbrk) || ps->lastit == ps->items)
 			while(i < n) {
 				c = s[i];
@@ -2488,7 +2490,7 @@ addtext(Pstate* ps, Rune* s)
 			assert(p+i-j < buf+SMALLBUFSIZE-1);
 			p = _Stradd(p, s+j, i-j);
 		}
-		// don't add a space if previous item ended in a space
+		/* don't add a space if previous item ended in a space */
 		if(p-buf == 1 && buf[0] == ' ' && ps->lastit != nil) {
 			it = ps->lastit;
 			if(it->tag == Itexttag) {
@@ -2504,14 +2506,14 @@ addtext(Pstate* ps, Rune* s)
 	}
 }
 
-// Add a break to ps->curstate, with extra space if sp is true.
-// If there was a previous break, combine this one's parameters
-// with that to make the amt be the max of the two and the clr
-// be the most general. (amt will be 0 or 1)
-// Also, if the immediately preceding item was a text item,
-// trim any whitespace from the end of it, if not in literal mode.
-// Finally, if this is at the very beginning of the item list
-// (the only thing there is a null spacer), then don't add the space.
+/* Add a break to ps->curstate, with extra space if sp is true. */
+/* If there was a previous break, combine this one's parameters */
+/* with that to make the amt be the max of the two and the clr */
+/* be the most general. (amt will be 0 or 1) */
+/* Also, if the immediately preceding item was a text item, */
+/* trim any whitespace from the end of it, if not in literal mode. */
+/* Finally, if this is at the very beginning of the item list */
+/* (the only thing there is a null spacer), then don't add the space. */
 static void
 addbrk(Pstate* ps, int sp, int clr)
 {
@@ -2534,8 +2536,8 @@ addbrk(Pstate* ps, int sp, int clr)
 		if(!ps->literal && ps->lastit->tag == Itexttag) {
 			t = (Itext*)ps->lastit;
 			_splitr(t->s, _Strlen(t->s), notwhitespace, &l, &nl, &r, &nr);
-			// try to avoid making empty items
-			// but not crucial f the occasional one gets through
+			/* try to avoid making empty items */
+			/* but not crucial f the occasional one gets through */
 			if(nl == 0 && ps->prelastit != nil) {
 				ps->lastit = ps->prelastit;
 				ps->lastit->next = nil;
@@ -2544,8 +2546,8 @@ addbrk(Pstate* ps, int sp, int clr)
 			else {
 				s = t->s;
 				if(nl == 0) {
-					// need a non-nil pointer to empty string
-					// (_Strdup(L(Lempty)) returns nil)
+					/* need a non-nil pointer to empty string */
+					/* (_Strdup(L(Lempty)) returns nil) */
 					t->s = emalloc(sizeof(Rune));
 					t->s[0] = 0;
 				}
@@ -2558,13 +2560,13 @@ addbrk(Pstate* ps, int sp, int clr)
 	}
 }
 
-// Add break due to a <br> or a newline within a preformatted section.
-// We add a null item first, with current font's height and ascent, to make
-// sure that the current line takes up at least that amount of vertical space.
-// This ensures that <br>s on empty lines cause blank lines, and that
-// multiple <br>s in a row give multiple blank lines.
-// However don't add the spacer if the previous item was something that
-// takes up space itself.
+/* Add break due to a <br> or a newline within a preformatted section. */
+/* We add a null item first, with current font's height and ascent, to make */
+/* sure that the current line takes up at least that amount of vertical space. */
+/* This ensures that <br>s on empty lines cause blank lines, and that */
+/* multiple <br>s in a row give multiple blank lines. */
+/* However don't add the spacer if the previous item was something that */
+/* takes up space itself. */
 static void
 addlinebrk(Pstate* ps, int clr)
 {
@@ -2572,8 +2574,8 @@ addlinebrk(Pstate* ps, int clr)
 	int	b;
 	int	addit;
 
-	// don't want break before our null item unless the previous item
-	// was also a null item for the purposes of line breaking
+	/* don't want break before our null item unless the previous item */
+	/* was also a null item for the purposes of line breaking */
 	obrkstate = ps->curstate&(IFbrk|IFbrksp);
 	b = IFnobrk;
 	addit = 0;
@@ -2594,24 +2596,24 @@ addlinebrk(Pstate* ps, int clr)
 	addbrk(ps, 0, clr);
 }
 
-// Add a nonbreakable space
+/* Add a nonbreakable space */
 static void
 addnbsp(Pstate* ps)
 {
-	// if nbsp comes right where a break was specified,
-	// do the break anyway (nbsp is being used to generate undiscardable
-	// space rather than to prevent a break)
+	/* if nbsp comes right where a break was specified, */
+	/* do the break anyway (nbsp is being used to generate undiscardable */
+	/* space rather than to prevent a break) */
 	if((ps->curstate&IFbrk) == 0)
 		ps->curstate |= IFnobrk;
 	additem(ps, newispacer(ISPhspace), nil);
-	// but definitely no break on next item
+	/* but definitely no break on next item */
 	ps->curstate |= IFnobrk;
 }
 
-// Change hang in ps.curstate by delta.
-// The amount is in 1/10ths of tabs, and is the amount that
-// the current contiguous set of items with a hang value set
-// is to be shifted left from its normal (indented) place.
+/* Change hang in ps.curstate by delta. */
+/* The amount is in 1/10ths of tabs, and is the amount that */
+/* the current contiguous set of items with a hang value set */
+/* is to be shifted left from its normal (indented) place. */
 static void
 changehang(Pstate* ps, int delta)
 {
@@ -2626,7 +2628,7 @@ changehang(Pstate* ps, int delta)
 	ps->curstate = (ps->curstate&~IFhangmask)|amt;
 }
 
-// Change indent in ps.curstate by delta.
+/* Change indent in ps.curstate by delta. */
 static void
 changeindent(Pstate* ps, int delta)
 {
@@ -2641,7 +2643,7 @@ changeindent(Pstate* ps, int delta)
 	ps->curstate = (ps->curstate&~IFindentmask)|(amt << IFindentshift);
 }
 
-// Push val on top of stack, and also return value pushed
+/* Push val on top of stack, and also return value pushed */
 static int
 push(Stack* stk, int val)
 {
@@ -2654,7 +2656,7 @@ push(Stack* stk, int val)
 	return val;
 }
 
-// Pop top of stack
+/* Pop top of stack */
 static void
 pop(Stack* stk)
 {
@@ -2662,7 +2664,7 @@ pop(Stack* stk)
 		--stk->n;
 }
 
-//Return top of stack, using dflt if stack is empty
+/*Return top of stack, using dflt if stack is empty */
 static int
 top(Stack* stk, int dflt)
 {
@@ -2671,7 +2673,7 @@ top(Stack* stk, int dflt)
 	return stk->slots[stk->n-1];
 }
 
-// pop, then return new top, with dflt if empty
+/* pop, then return new top, with dflt if empty */
 static int
 popretnewtop(Stack* stk, int dflt)
 {
@@ -2683,7 +2685,7 @@ popretnewtop(Stack* stk, int dflt)
 	return stk->slots[stk->n-1];
 }
 
-// Copy fromstk entries into tostk
+/* Copy fromstk entries into tostk */
 static void
 copystack(Stack* tostk, Stack* fromstk)
 {
@@ -2770,8 +2772,8 @@ setcurjust(Pstate* ps)
 	}
 }
 
-// Do final rearrangement after table parsing is finished
-// and assign cells to grid points
+/* Do final rearrangement after table parsing is finished */
+/* and assign cells to grid points */
 static void
 finish_table(Table* t)
 {
@@ -2802,7 +2804,7 @@ finish_table(Table* t)
 	ncol = 0;
 	r = nrow - 1;
 	for(row = rl; row != nil; row = rownext) {
-		// copy the data from the allocated Tablerow into the array slot
+		/* copy the data from the allocated Tablerow into the array slot */
 		t->rows[r] = *row;
 		rownext = row->next;
 		row = &t->rows[r];
@@ -2810,12 +2812,12 @@ finish_table(Table* t)
 		rcols = 0;
 		c = row->cells;
 
-		// If rowspan is > 1 but this is the last row,
-		// reset the rowspan
+		/* If rowspan is > 1 but this is the last row, */
+		/* reset the rowspan */
 		if(c != nil && c->rowspan > 1 && r == nrow-2)
 				c->rowspan = 1;
 
-		// reverse row->cells list (along nextinrow pointers)
+		/* reverse row->cells list (along nextinrow pointers) */
 		row->cells = nil;
 		while(c != nil) {
 			cnext = c->nextinrow;
@@ -2830,8 +2832,8 @@ finish_table(Table* t)
 	t->ncol = ncol;
 	t->cols = (Tablecol*)emalloc(ncol * sizeof(Tablecol));
 
-	// Reverse cells just so they are drawn in source order.
-	// Also, trim their contents so they don't end in whitespace.
+	/* Reverse cells just so they are drawn in source order. */
+	/* Also, trim their contents so they don't end in whitespace. */
 	t->cells = (Tablecell*)_revlist((List*)t->cells);
 	for(c = t->cells; c != nil; c= c->next)
 		trim_cell(c);
@@ -2839,10 +2841,10 @@ finish_table(Table* t)
 	for(i = 0; i < nrow; i++)
 		t->grid[i] = (Tablecell**)emalloc(ncol * sizeof(Tablecell*));
 
-	// The following arrays keep track of cells that are spanning
-	// multiple rows;  rowspancnt[i] is the number of rows left
-	// to be spanned in column i.
-	// When done, cell's (row,col) is upper left grid point.
+	/* The following arrays keep track of cells that are spanning */
+	/* multiple rows;  rowspancnt[i] is the number of rows left */
+	/* to be spanned in column i. */
+	/* When done, cell's (row,col) is upper left grid point. */
 	rowspancnt = (int*)emalloc(ncol * sizeof(int));
 	rowspancell = (Tablecell**)emalloc(ncol * sizeof(Tablecell*));
 	for(ri = 0; ri < nrow; ri++) {
@@ -2865,8 +2867,8 @@ finish_table(Table* t)
 				cspan = c->colspan;
 				rspan = c->rowspan;
 				if(ci + cspan > ncol) {
-					// because of row spanning, we calculated
-					// ncol incorrectly; adjust it
+					/* because of row spanning, we calculated */
+					/* ncol incorrectly; adjust it */
 					newncol = ci + cspan;
 					t->cols = (Tablecol*)erealloc(t->cols, newncol * sizeof(Tablecol));
 					rowspancnt = (int*)erealloc(rowspancnt, newncol * sizeof(int));
@@ -2896,7 +2898,7 @@ finish_table(Table* t)
 	}
 }
 
-// Remove tail of cell content until it isn't whitespace.
+/* Remove tail of cell content until it isn't whitespace. */
 static void
 trim_cell(Tablecell* c)
 {
@@ -2941,7 +2943,7 @@ trim_cell(Tablecell* c)
 	}
 }
 
-// Caller must free answer (eventually).
+/* Caller must free answer (eventually). */
 static Rune*
 listmark(uchar ty, int n)
 {
@@ -2956,9 +2958,9 @@ listmark(uchar ty, int n)
 	case LTsquare:
 	case LTcircle:
 		s = _newstr(1);
-		s[0] = (ty == LTdisc)? 0x2022		// bullet
-			: ((ty == LTsquare)? 0x220e	// filled square
-			    : 0x2218);				// degree
+		s[0] = (ty == LTdisc)? 0x2022		/* bullet */
+			: ((ty == LTsquare)? 0x220e	/* filled square */
+			    : 0x2218);				/* degree */
 		s[1] = 0;
 		break;
 
@@ -3009,9 +3011,9 @@ listmark(uchar ty, int n)
 	return s;
 }
 
-// Find map with given name in di.maps.
-// If not there, add one, copying name.
-// Ownership of map remains with di->maps list.
+/* Find map with given name in di.maps. */
+/* If not there, add one, copying name. */
+/* Ownership of map remains with di->maps list. */
 static Map*
 getmap(Docinfo* di, Rune* name)
 {
@@ -3029,7 +3031,7 @@ getmap(Docinfo* di, Rune* name)
 	return m;
 }
 
-// Transfers ownership of href to Area
+/* Transfers ownership of href to Area */
 static Area*
 newarea(int shape, Rune* href, int target, Area* link)
 {
@@ -3043,32 +3045,32 @@ newarea(int shape, Rune* href, int target, Area* link)
 	return a;
 }
 
-// Return string value associated with attid in tok, nil if none.
-// Caller must free the result (eventually).
+/* Return string value associated with attid in tok, nil if none. */
+/* Caller must free the result (eventually). */
 static Rune*
 aval(Token* tok, int attid)
 {
 	Rune*	ans;
 
-	_tokaval(tok, attid, &ans, 1);	// transfers string ownership from token to ans
+	_tokaval(tok, attid, &ans, 1);	/* transfers string ownership from token to ans */
 	return ans;
 }
 
-// Like aval, but use dflt if there was no such attribute in tok.
-// Caller must free the result (eventually).
+/* Like aval, but use dflt if there was no such attribute in tok. */
+/* Caller must free the result (eventually). */
 static Rune*
 astrval(Token* tok, int attid, Rune* dflt)
 {
 	Rune*	ans;
 
 	if(_tokaval(tok, attid, &ans, 1))
-		return ans;	// transfers string ownership from token to ans
+		return ans;	/* transfers string ownership from token to ans */
 	else
 		return _Strdup(dflt);
 }
 
-// Here we're supposed to convert to an int,
-// and have a default when not found
+/* Here we're supposed to convert to an int, */
+/* and have a default when not found */
 static int
 aintval(Token* tok, int attid, int dflt)
 {
@@ -3080,7 +3082,7 @@ aintval(Token* tok, int attid, int dflt)
 		return toint(ans);
 }
 
-// Like aintval, but result should be >= 0
+/* Like aintval, but result should be >= 0 */
 static int
 auintval(Token* tok, int attid, int dflt)
 {
@@ -3095,7 +3097,7 @@ auintval(Token* tok, int attid, int dflt)
 	}
 }
 
-// int conversion, but with possible error check (if warning)
+/* int conversion, but with possible error check (if warning) */
 static int
 toint(Rune* s)
 {
@@ -3113,7 +3115,7 @@ toint(Rune* s)
 	return ans;
 }
 
-// Attribute value when need a table to convert strings to ints
+/* Attribute value when need a table to convert strings to ints */
 static int
 atabval(Token* tok, int attid, StringInt* tab, int ntab, int dflt)
 {
@@ -3131,7 +3133,7 @@ atabval(Token* tok, int attid, StringInt* tab, int nta
 	return ans;
 }
 
-// Attribute value when supposed to be a color
+/* Attribute value when supposed to be a color */
 static int
 acolorval(Token* tok, int attid, int dflt)
 {
@@ -3144,7 +3146,7 @@ acolorval(Token* tok, int attid, int dflt)
 	return ans;
 }
 
-// Attribute value when supposed to be a target frame name
+/* Attribute value when supposed to be a target frame name */
 static int
 atargval(Token* tok, int dflt)
 {
@@ -3158,8 +3160,8 @@ atargval(Token* tok, int dflt)
 	return ans;
 }
 
-// special for list types, where "i" and "I" are different,
-// but "square" and "SQUARE" are the same
+/* special for list types, where "i" and "I" are different, */
+/* but "square" and "SQUARE" are the same */
 static int
 listtyval(Token* tok, int dflt)
 {
@@ -3207,9 +3209,9 @@ listtyval(Token* tok, int dflt)
 	return ans;
 }
 
-// Attribute value when value is a URL, possibly relative to base.
-// FOR NOW: leave the url relative.
-// Caller must free the result (eventually).
+/* Attribute value when value is a URL, possibly relative to base. */
+/* FOR NOW: leave the url relative. */
+/* Caller must free the result (eventually). */
 static Rune*
 aurlval(Token* tok, int attid, Rune* dflt, Rune* base)
 {
@@ -3225,8 +3227,8 @@ aurlval(Token* tok, int attid, Rune* dflt, Rune* base)
 	return ans;
 }
 
-// Return copy of s but with all whitespace (even internal) removed.
-// This fixes some buggy URL specification strings.
+/* Return copy of s but with all whitespace (even internal) removed. */
+/* This fixes some buggy URL specification strings. */
 static Rune*
 removeallwhite(Rune* s)
 {
@@ -3258,8 +3260,8 @@ removeallwhite(Rune* s)
 	return ans;
 }
 
-// Attribute value when mere presence of attr implies value of 1,
-// but if there is an integer there, return it as the value.
+/* Attribute value when mere presence of attr implies value of 1, */
+/* but if there is an integer there, return it as the value. */
 static int
 aflagval(Token* tok, int attid)
 {
@@ -3285,7 +3287,7 @@ makealign(int halign, int valign)
 	return al;
 }
 
-// Make an Align (two alignments, horizontal and vertical)
+/* Make an Align (two alignments, horizontal and vertical) */
 static Align
 aalign(Token* tok)
 {
@@ -3294,7 +3296,7 @@ aalign(Token* tok)
 		atabval(tok, Avalign, align_tab, NALIGNTAB, ALnone));
 }
 
-// Make a Dimen, based on value of attid attr
+/* Make a Dimen, based on value of attid attr */
 static Dimen
 adimen(Token* tok, int attid)
 {
@@ -3306,7 +3308,7 @@ adimen(Token* tok, int attid)
 		return makedimen(Dnone, 0);
 }
 
-// Parse s[0:n] as num[.[num]][unit][%|*]
+/* Parse s[0:n] as num[.[num]][unit][%|*] */
 static Dimen
 parsedim(Rune* s, int ns)
 {
@@ -3444,7 +3446,7 @@ newirule(int align, int size, int noshade, Dimen wspec
 	return (Item*)r;
 }
 
-// Map is owned elsewhere.
+/* Map is owned elsewhere. */
 static Item*
 newiimage(Rune* src, Rune* altrep, int align, int width, int height,
 		int hspace, int vspace, int border, int ismap, Map* map)
@@ -3517,7 +3519,7 @@ newispacer(int spkind)
 	return (Item*)s;
 }
 
-// Free one item (caller must deal with next pointer)
+/* Free one item (caller must deal with next pointer) */
 static void
 freeitem(Item* it)
 {
@@ -3557,7 +3559,7 @@ freeitem(Item* it)
 	free(it);
 }
 
-// Free list of items chained through next pointer
+/* Free list of items chained through next pointer */
 void
 freeitems(Item* ithead)
 {
@@ -3601,8 +3603,8 @@ freetable(Table* t)
 	if(t == nil)
 		return;
 
-	// We'll find all the unique cells via t->cells and next pointers.
-	// (Other pointers to cells in the table are duplicates of these)
+	/* We'll find all the unique cells via t->cells and next pointers. */
+	/* (Other pointers to cells in the table are duplicates of these) */
 	for(c = t->cells; c != nil; c = cnext) {
 		cnext = c->next;
 		freeitems(c->content);
@@ -3626,7 +3628,7 @@ freeform(Form* f)
 
 	free(f->name);
 	free(f->action);
-	// Form doesn't own its fields (Iformfield items do)
+	/* Form doesn't own its fields (Iformfield items do) */
 	free(f);
 }
 
@@ -3768,13 +3770,13 @@ freedocinfo(Docinfo* d)
 	freedestanchors(d->dests);
 	freeforms(d->forms);
 	freemaps(d->maps);
-	// tables, images, and formfields are freed when
-	// the items pointing at them are freed
+	/* tables, images, and formfields are freed when */
+	/* the items pointing at them are freed */
 	free(d);
 }
 
-// Currently, someone else owns all the memory
-// pointed to by things in a Pstate.
+/* Currently, someone else owns all the memory */
+/* pointed to by things in a Pstate. */
 static void
 freepstate(Pstate* p)
 {
@@ -3926,7 +3928,7 @@ Iconv(Fmt *f)
 	return fmtstrcpy(f, buf);
 }
 
-// String version of alignment 'a'
+/* String version of alignment 'a' */
 static Rune*
 stringalign(int a)
 {
@@ -3938,8 +3940,8 @@ stringalign(int a)
 	return s;
 }
 
-// Put at most nbuf chars of representation of d into buf,
-// and return number of characters put
+/* Put at most nbuf chars of representation of d into buf, */
+/* and return number of characters put */
 static int
 dimprint(char* buf, int nbuf, Dimen d)
 {
@@ -4002,7 +4004,7 @@ newformfield(int ftype, int fieldid, Form* form, Rune*
 	return ff;
 }
 
-// Transfers ownership of value and display to Option.
+/* Transfers ownership of value and display to Option. */
 static Option*
 newoption(int selected, Rune* value, Rune* display, Option* link)
 {
@@ -4210,8 +4212,8 @@ resetdocinfo(Docinfo* d)
 	d->frameid = -1;
 }
 
-// Use targetmap array to keep track of name <-> targetid mapping.
-// Use real malloc(), and never free
+/* Use targetmap array to keep track of name <-> targetid mapping. */
+/* Use real malloc(), and never free */
 static void
 targetmapinit(void)
 {
@@ -4263,10 +4265,10 @@ targetname(int targid)
 	return L(Lquestion);
 }
 
-// Convert HTML color spec to RGB value, returning dflt if can't.
-// Argument is supposed to be a valid HTML color, or "".
-// Return the RGB value of the color, using dflt if s
-// is nil or an invalid color.
+/* Convert HTML color spec to RGB value, returning dflt if can't. */
+/* Argument is supposed to be a valid HTML color, or "". */
+/* Return the RGB value of the color, using dflt if s */
+/* is nil or an invalid color. */
 static int
 color(Rune* s, int dflt)
 {
@@ -4285,12 +4287,12 @@ color(Rune* s, int dflt)
 	return dflt;
 }
 
-// Debugging
+/* Debugging */
 
 #define HUGEPIX 10000
 
-// A "shallow" validitem, that doesn't follow next links
-// or descend into tables.
+/* A "shallow" validitem, that doesn't follow next links */
+/* or descend into tables. */
 static int
 validitem(Item* i)
 {
@@ -4308,8 +4310,8 @@ validitem(Item* i)
 		(i->ascent > -HUGEPIX && i->ascent < HUGEPIX) &&
 		(i->anchorid >= 0) &&
 		(i->genattr == nil || validptr(i->genattr));
-	// also, could check state for ridiculous combinations
-	// also, could check anchorid for within-doc-range
+	/* also, could check state for ridiculous combinations */
+	/* also, could check anchorid for within-doc-range */
 	if(ok)
 		switch(i->tag) {
 		case Itexttag:
@@ -4357,9 +4359,9 @@ validitem(Item* i)
 	return ok;
 }
 
-// "deep" validation, that checks whole list of items,
-// and descends into tables and floated tables.
-// nil is ok for argument.
+/* "deep" validation, that checks whole list of items, */
+/* and descends into tables and floated tables. */
+/* nil is ok for argument. */
 int
 validitems(Item* i)
 {
@@ -4401,12 +4403,12 @@ validformfield(Formfield* f)
 		(f->options == nil || validptr(f->options)) &&
 		(f->image == nil || validitem(f->image)) &&
 		(f->events == nil || validptr(f->events));
-	// when all built, should have f->fieldid < f->form->nfields,
-	// but this may be called during build...
+	/* when all built, should have f->fieldid < f->form->nfields, */
+	/* but this may be called during build... */
 	return ok;
 }
 
-// "deep" validation -- checks cell contents too
+/* "deep" validation -- checks cell contents too */
 static int
 validtable(Table* t)
 {
@@ -4428,10 +4430,10 @@ validtable(Table* t)
 		(t->totw >= 0 && t->totw < HUGEPIX) &&
 		(t->toth >= 0 && t->toth < HUGEPIX) &&
 		(t->tabletok == nil || validptr(t->tabletok));
-	// during parsing, t->rows has list;
-	// only when parsing is done is t->nrow set > 0
+	/* during parsing, t->rows has list; */
+	/* only when parsing is done is t->nrow set > 0 */
 	if(ok && t->nrow > 0 && t->ncol > 0) {
-		// table is "finished"
+		/* table is "finished" */
 		for(i = 0; i < t->nrow && ok; i++) 
 			ok = validtablerow(t->rows+i);
 		for(j = 0; j < t->ncol && ok; j++)
@@ -4528,9 +4530,9 @@ validtablecell(Tablecell* c)
 static int
 validptr(void* p)
 {
-	// TODO: a better job of this.
-	// For now, just dereference, which cause a bomb
-	// if not valid
+	/* TODO: a better job of this. */
+	/* For now, just dereference, which cause a bomb */
+	/* if not valid */
 	static char c;
 
 	c = *((char*)p);
blob - 1dfa689cff343b124cfb157d6d93f54297bae502
blob + 170505c7b339ca067e5d9b864bb62e8f06393116
--- src/libhtml/impl.h
+++ src/libhtml/impl.h
@@ -1,9 +1,9 @@
 
-// UTILS
+/* UTILS */
 typedef struct List List;
 typedef struct Strlist Strlist;
 
-// List of integers (and also generic list with next pointer at beginning)
+/* List of integers (and also generic list with next pointer at beginning) */
 struct List
 {
 	List*	next;
@@ -45,10 +45,10 @@ extern void	_trimwhite(Rune* s, int n, Rune** pans, in
 extern Rune	notwhitespace[];
 extern Rune	whitespace[];
 
-// STRINTTAB
+/* STRINTTAB */
 typedef struct StringInt StringInt;
 
-// Element of String-Int table (used for keyword lookup)
+/* Element of String-Int table (used for keyword lookup) */
 struct StringInt
 {
 	Rune*	key;
@@ -59,17 +59,17 @@ extern int			_lookup(StringInt* t, int n, Rune* key, i
 extern StringInt*	_makestrinttab(Rune** a, int n);
 extern Rune*		_revlookup(StringInt* t, int n, int val);
 
-// Colors, in html format, not Plan 9 format.  (RGB values in bottom 3 bytes)
+/* Colors, in html format, not Plan 9 format.  (RGB values in bottom 3 bytes) */
 enum {
 	White = 0xFFFFFF,
 	Black = 0x000000,
-	Blue = 0x0000CC,
+	Blue = 0x0000CC
 };
 
-// LEX
+/* LEX */
 
-// HTML 4.0 tags (plus blink, nobr)
-// sorted in lexical order; used as array indices
+/* HTML 4.0 tags (plus blink, nobr) */
+/* sorted in lexical order; used as array indices */
 enum {
 	Notfound,
 	Comment,
@@ -101,8 +101,8 @@ enum {
 	Data = Numtags+RBRA
 };
 
-// HTML 4.0 tag attributes
-// Keep sorted in lexical order
+/* HTML 4.0 tag attributes */
+/* Keep sorted in lexical order */
 enum {
 	Aabbr, Aaccept_charset, Aaccess_key, Aaction,
 	Aalign, Aalink, Aalt, Aarchive, Aaxis,
@@ -138,17 +138,17 @@ enum {
 
 struct Attr
 {
-	Attr*		next;		// in list of attrs for a token
-	int		attid;		// Aabbr, etc.
+	Attr*		next;		/* in list of attrs for a token */
+	int		attid;		/* Aabbr, etc. */
 	Rune*	value;
 };
 
 struct Token
 {
-	int		tag;		// Ta, etc
-	Rune*	text;		// text in Data, attribute text in tag
-	Attr*		attr;		// list of Attrs
-	int		starti;	// index into source buffer of token start
+	int		tag;		/* Ta, etc */
+	Rune*	text;		/* text in Data, attribute text in tag */
+	Attr*		attr;		/* list of Attrs */
+	int		starti;	/* index into source buffer of token start */
 };
 
 extern Rune**	tagnames;
blob - cc368ac2c5e367c1de93b60c0e00a807ea8581fc
blob + 12127b584b90b69376b19178fcfee326d0e0a5f1
--- src/libhtml/lex.c
+++ src/libhtml/lex.c
@@ -8,11 +8,11 @@
 typedef struct TokenSource TokenSource;
 struct TokenSource
 {
-	int			i;		// index of next byte to use
-	uchar*		data;		// all the data
-	int			edata;	// data[0:edata] is valid
-	int			chset;	// one of US_Ascii, etc.
-	int			mtype;	// TextHtml or TextPlain
+	int			i;		/* index of next byte to use */
+	uchar*		data;		/* all the data */
+	int			edata;	/* data[0:edata] is valid */
+	int			chset;	/* one of US_Ascii, etc. */
+	int			mtype;	/* TextHtml or TextPlain */
 };
 
 enum {
@@ -25,8 +25,8 @@ enum {
 #define SMALLBUFSIZE 240
 #define BIGBUFSIZE 2000
 
-// HTML 4.0 tag names.
-// Keep sorted, and in correspondence with enum in iparse.h.
+/* HTML 4.0 tag names. */
+/* Keep sorted, and in correspondence with enum in iparse.h. */
 Rune **tagnames;
 char *_tagnames[] = {
 	" ",
@@ -127,8 +127,8 @@ char *_tagnames[] = {
 	"var"
 };
 
-// HTML 4.0 attribute names.
-// Keep sorted, and in correspondence with enum in i.h.
+/* HTML 4.0 attribute names. */
+/* Keep sorted, and in correspondence with enum in i.h. */
 Rune **attrnames;
 char* _attrnames[] = {
 	"abbr",
@@ -250,8 +250,8 @@ char* _attrnames[] = {
 };
 
 
-// Character entity to unicode character number map.
-// Keep sorted by name.
+/* Character entity to unicode character number map. */
+/* Keep sorted by name. */
 StringInt *chartab;
 AsciiInt _chartab[] = {
 	{"AElig", 198},
@@ -405,22 +405,22 @@ AsciiInt _chartab[] = {
 };
 #define NCHARTAB (sizeof(_chartab)/sizeof(_chartab[0]))
 
-// Characters Winstart..Winend are those that Windows
-// uses interpolated into the Latin1 set.
-// They aren't supposed to appear in HTML, but they do....
+/* Characters Winstart..Winend are those that Windows */
+/* uses interpolated into the Latin1 set. */
+/* They aren't supposed to appear in HTML, but they do.... */
 enum {
 	Winstart = 127,
 	Winend = 159
 };
 
-static int	winchars[]= { 8226,	// 8226 is a bullet
+static int	winchars[]= { 8226,	/* 8226 is a bullet */
 	8226, 8226, 8218, 402, 8222, 8230, 8224, 8225,
 	710, 8240, 352, 8249, 338, 8226, 8226, 8226,
 	8226, 8216, 8217, 8220, 8221, 8226, 8211, 8212,
 	732, 8482, 353, 8250, 339, 8226, 8226, 376};
 
-static StringInt*	tagtable;		// initialized from tagnames
-static StringInt*	attrtable;		// initialized from attrnames
+static StringInt*	tagtable;		/* initialized from tagnames */
+static StringInt*	attrtable;		/* initialized from attrnames */
 
 static void		lexinit(void);
 static int		getplaindata(TokenSource* ts, Token* a, int* pai);
@@ -431,11 +431,11 @@ static Rune*		buftostr(Rune* s, Rune* buf, int j);
 static int		comment(TokenSource* ts);
 static int		findstr(TokenSource* ts, Rune* s);
 static int		ampersand(TokenSource* ts);
-//static int		lowerc(int c);
+/*static int		lowerc(int c); */
 static int		getchar(TokenSource* ts);
 static void		ungetchar(TokenSource* ts, int c);
 static void		backup(TokenSource* ts, int savei);
-//static void		freeinsidetoken(Token* t);
+/*static void		freeinsidetoken(Token* t); */
 static void		freeattrs(Attr* ahead);
 static Attr*		newattr(int attid, Rune* value, Attr* link);
 static int		Tconv(Fmt* f);
@@ -475,8 +475,8 @@ enum {
 	ToksChunk = 500
 };
 
-// Call this to get the tokens.
-//  The number of returned tokens is returned in *plen.
+/* Call this to get the tokens. */
+/*  The number of returned tokens is returned in *plen. */
 Token*
 _gettoks(uchar* data, int datalen, int chset, int mtype, int* plen)
 {
@@ -509,7 +509,7 @@ _gettoks(uchar* data, int datalen, int chset, int mtyp
 			if(c == '<'){
 				tag = gettag(ts, starti, a, &ai);
 				if(tag == Tscript){
-					// special rules for getting Data after....
+					/* special rules for getting Data after.... */
 					starti = ts->i;
 					c = getchar(ts);
 					tag = getscriptdata(ts, c, starti, a, &ai);
@@ -524,7 +524,7 @@ _gettoks(uchar* data, int datalen, int chset, int mtyp
 		}
 	}
 	else {
-		// plain text (non-html) tokens
+		/* plain text (non-html) tokens */
 		for(;;){
 			if(ai == alen){
 				a = (Token*)erealloc(a, (alen+ToksChunk)*sizeof(Token));
@@ -545,12 +545,12 @@ _gettoks(uchar* data, int datalen, int chset, int mtyp
 	return a;
 }
 
-// For case where source isn't HTML.
-// Just make data tokens, one per line (or partial line,
-// at end of buffer), ignoring non-whitespace control
-// characters and dumping \r's.
-// If find non-empty token, fill in a[*pai], bump *pai, and return Data.
-// Otherwise return -1;
+/* For case where source isn't HTML. */
+/* Just make data tokens, one per line (or partial line, */
+/* at end of buffer), ignoring non-whitespace control */
+/* characters and dumping \r's. */
+/* If find non-empty token, fill in a[*pai], bump *pai, and return Data. */
+/* Otherwise return -1; */
 static int
 getplaindata(TokenSource* ts, Token* a, int* pai)
 {
@@ -568,8 +568,8 @@ getplaindata(TokenSource* ts, Token* a, int* pai)
 		if(c < ' '){
 			if(isspace(c)){
 				if(c == '\r'){
-					// ignore it unless no following '\n',
-					// in which case treat it like '\n'
+					/* ignore it unless no following '\n', */
+					/* in which case treat it like '\n' */
 					c = getchar(ts);
 					if(c != '\n'){
 						if(c >= 0)
@@ -602,7 +602,7 @@ getplaindata(TokenSource* ts, Token* a, int* pai)
 	return Data;
 }
 
-// Return concatenation of s and buf[0:j]
+/* Return concatenation of s and buf[0:j] */
 static Rune*
 buftostr(Rune* s, Rune* buf, int j)
 {
@@ -614,11 +614,11 @@ buftostr(Rune* s, Rune* buf, int j)
 	return s;
 }
 
-// Gather data up to next start-of-tag or end-of-buffer.
-// Translate entity references (&amp;).
-// Ignore non-whitespace control characters and get rid of \r's.
-// If find non-empty token, fill in a[*pai], bump *pai, and return Data.
-// Otherwise return -1;
+/* Gather data up to next start-of-tag or end-of-buffer. */
+/* Translate entity references (&amp;). */
+/* Ignore non-whitespace control characters and get rid of \r's. */
+/* If find non-empty token, fill in a[*pai], bump *pai, and return Data. */
+/* Otherwise return -1; */
 static int
 getdata(TokenSource* ts, int firstc, int starti, Token* a, int* pai)
 {
@@ -640,8 +640,8 @@ getdata(TokenSource* ts, int firstc, int starti, Token
 		else if(c < ' '){
 			if(isspace(c)){
 				if(c == '\r'){
-					// ignore it unless no following '\n',
-					// in which case treat it like '\n'
+					/* ignore it unless no following '\n', */
+					/* in which case treat it like '\n' */
 					c = getchar(ts);
 					if(c != '\n'){
 						if(c >= 0)
@@ -680,8 +680,8 @@ getdata(TokenSource* ts, int firstc, int starti, Token
 	return Data;
 }
 
-// The rules for lexing scripts are different (ugh).
-// Gather up everything until see a </SCRIPT>.
+/* The rules for lexing scripts are different (ugh). */
+/* Gather up everything until see a </SCRIPT>. */
 static int
 getscriptdata(TokenSource* ts, int firstc, int starti, Token* a, int* pai)
 {
@@ -702,7 +702,7 @@ getscriptdata(TokenSource* ts, int firstc, int starti,
 	done = 0;
 	while(c >= 0){
 		if(c == '<'){
-			// other browsers ignore stuff to end of line after <!
+			/* other browsers ignore stuff to end of line after <! */
 			savei = ts->i;
 			c = getchar(ts);
 			if(c == '!'){
@@ -725,7 +725,7 @@ getscriptdata(TokenSource* ts, int firstc, int starti,
 					done = 1;
 					break;
 				}
-				// here tag was not </SCRIPT>, so take as regular data
+				/* here tag was not </SCRIPT>, so take as regular data */
 				c = getchar(ts);
 			}
 		}
@@ -754,13 +754,13 @@ getscriptdata(TokenSource* ts, int firstc, int starti,
 	return -1;
 }
 
-// We've just seen a '<'.  Gather up stuff to closing '>' (if buffer
-// ends before then, return -1).
-// If it's a tag, look up the name, gather the attributes, and return
-// the appropriate token.
-// Else it's either just plain data or some kind of ignorable stuff:
-// return Data or Comment as appropriate.
-// If it's not a Comment, put it in a[*pai] and bump *pai.
+/* We've just seen a '<'.  Gather up stuff to closing '>' (if buffer */
+/* ends before then, return -1). */
+/* If it's a tag, look up the name, gather the attributes, and return */
+/* the appropriate token. */
+/* Else it's either just plain data or some kind of ignorable stuff: */
+/* return Data or Comment as appropriate. */
+/* If it's not a Comment, put it in a[*pai] and bump *pai. */
 static int
 gettag(TokenSource* ts, int starti, Token* a, int* pai)
 {
@@ -795,7 +795,7 @@ gettag(TokenSource* ts, int starti, Token* a, int* pai
 	if(c < 0)
 		goto eob_done;
 	if(c >= 256 || !isalpha(c)){
-		// not a tag
+		/* not a tag */
 		if(c == '!'){
 			ans = comment(ts);
 			if(ans != -1)
@@ -810,7 +810,7 @@ gettag(TokenSource* ts, int starti, Token* a, int* pai
 			return Data;
 		}
 	}
-	// c starts a tagname
+	/* c starts a tagname */
 	buf[0] = c;
 	i = 1;
 	for(;;){
@@ -819,20 +819,20 @@ gettag(TokenSource* ts, int starti, Token* a, int* pai
 			goto eob_done;
 		if(!ISNAMCHAR(c))
 			break;
-		// if name is bigger than buf it won't be found anyway...
+		/* if name is bigger than buf it won't be found anyway... */
 		if(i < BIGBUFSIZE)
 			buf[i++] = c;
 	}
 	if(_lookup(tagtable, Numtags, buf, i, &tag))
 		tok->tag = tag + rbra;
 	else
-		tok->text = _Strndup(buf, i);	// for warning print, in build
+		tok->text = _Strndup(buf, i);	/* for warning print, in build */
 
-	// attribute gathering loop
+	/* attribute gathering loop */
 	al = nil;
 	for(;;){
-		// look for "ws name" or "ws name ws = ws val"  (ws=whitespace)
-		// skip whitespace
+		/* look for "ws name" or "ws name ws = ws val"  (ws=whitespace) */
+		/* skip whitespace */
 attrloop_continue:
 		while(c < 256 && isspace(c)){
 			c = getchar(ts);
@@ -850,7 +850,7 @@ attrloop_continue:
 		if(c >= 256 || !isalpha(c)){
 			if(warn)
 				fprint(2, "warning: expected attribute name\n");
-			// skipt to next attribute name
+			/* skipt to next attribute name */
 			for(;;){
 				c = getchar(ts);
 				if(c < 0)
@@ -867,7 +867,7 @@ attrloop_continue:
 					goto attrloop_done;
 			}
 		}
-		// gather attribute name
+		/* gather attribute name */
 		buf[0] = c;
 		i = 1;
 		for(;;){
@@ -884,7 +884,7 @@ attrloop_continue:
 			buf[i] = 0;
 			fprint(2, "warning: unknown attribute name %S\n", buf);
 		}
-		// skip whitespace
+		/* skip whitespace */
 		while(c < 256 && isspace(c)){
 			c = getchar(ts);
 			if(c < 0)
@@ -895,7 +895,7 @@ attrloop_continue:
 				al = newattr(attid, nil, al);
 			goto attrloop_continue;
 		}
-		//# c is '=' here;  skip whitespace
+		/*# c is '=' here;  skip whitespace */
 		for(;;){
 			c = getchar(ts);
 			if(c < 0)
@@ -918,9 +918,9 @@ valloop_continue:
 				goto eob_done;
 			if(c == '>'){
 				if(quote){
-					// c might be part of string (though not good style)
-					// but if line ends before close quote, assume
-					// there was an unmatched quote
+					/* c might be part of string (though not good style) */
+					/* but if line ends before close quote, assume */
+					/* there was an unmatched quote */
 					ti = ts->i;
 					for(;;){
 						c = getchar(ts);
@@ -999,18 +999,18 @@ eob_done:
 	return Data;
 }
 
-// We've just read a '<!' at position starti,
-// so this may be a comment or other ignored section, or it may
-// be just a literal string if there is no close before end of file
-// (other browsers do that).
-// The accepted practice seems to be (note: contrary to SGML spec!):
-// If see <!--, look for --> to close, or if none, > to close.
-// If see <!(not --), look for > to close.
-// If no close before end of file, leave original characters in as literal data.
-//
-// If we see ignorable stuff, return Comment.
-// Else return nil (caller should back up and try again when more data arrives,
-// unless at end of file, in which case caller should just make '<' a data token).
+/* We've just read a '<!' at position starti, */
+/* so this may be a comment or other ignored section, or it may */
+/* be just a literal string if there is no close before end of file */
+/* (other browsers do that). */
+/* The accepted practice seems to be (note: contrary to SGML spec!): */
+/* If see <!--, look for --> to close, or if none, > to close. */
+/* If see <!(not --), look for > to close. */
+/* If no close before end of file, leave original characters in as literal data. */
+/* */
+/* If we see ignorable stuff, return Comment. */
+/* Else return nil (caller should back up and try again when more data arrives, */
+/* unless at end of file, in which case caller should just make '<' a data token). */
 static int
 comment(TokenSource* ts)
 {
@@ -1043,9 +1043,9 @@ comment(TokenSource* ts)
 	return -1;
 }
 
-// Look for string s in token source.
-// If found, return 1, with buffer at next char after s,
-// else return 0 (caller should back up).
+/* Look for string s in token source. */
+/* If found, return 1, with buffer at next char after s, */
+/* else return 0 (caller should back up). */
 static int
 findstr(TokenSource* ts, Rune* s)
 {
@@ -1093,13 +1093,13 @@ xdigit(int c)
 	return -1;
 }
 
-// We've just read an '&'; look for an entity reference
-// name, and if found, return translated char.
-// if there is a complete entity name but it isn't known,
-// try prefixes (gets around some buggy HTML out there),
-// and if that fails, back up to just past the '&' and return '&'.
-// If the entity can't be completed in the current buffer, back up
-// to the '&' and return -1.
+/* We've just read an '&'; look for an entity reference */
+/* name, and if found, return translated char. */
+/* if there is a complete entity name but it isn't known, */
+/* try prefixes (gets around some buggy HTML out there), */
+/* and if that fails, back up to just past the '&' and return '&'. */
+/* If the entity can't be completed in the current buffer, back up */
+/* to the '&' and return -1. */
 static int
 ampersand(TokenSource* ts)
 {
@@ -1164,7 +1164,7 @@ ampersand(TokenSource* ts)
 		if(c >= 0){
 			fnd = _lookup(chartab, NCHARTAB, buf, k, &ans);
 			if(!fnd){
-				// Try prefixes of s
+				/* Try prefixes of s */
 				if(c == ';' || c == '\n' || c == '\r')
 					ungetchar(ts, c);
 				i = k;
@@ -1188,8 +1188,8 @@ ampersand(TokenSource* ts)
 	return ans;
 }
 
-// Get next char, obeying ts.chset.
-// Returns -1 if no complete character left before current end of data.
+/* Get next char, obeying ts.chset. */
+/* Returns -1 if no complete character left before current end of data. */
 static int
 getchar(TokenSource* ts)
 {
@@ -1226,19 +1226,19 @@ getchar(TokenSource* ts)
 			c = r;
 		}
 		else {
-			// not enough bytes in buf to complete utf-8 char
-			ts->i = ts->edata;	// mark "all used"
+			/* not enough bytes in buf to complete utf-8 char */
+			ts->i = ts->edata;	/* mark "all used" */
 			c = -1;
 		}
 		break;
 	case Unicode:
 		if(ts->i < ts->edata - 1){
-			//standards say most-significant byte first
+			/*standards say most-significant byte first */
 			c = (c << 8)|(buf[ts->i + 1]);
 			ts->i += 2;
 		}
 		else {
-			ts->i = ts->edata;	// mark "all used"
+			ts->i = ts->edata;	/* mark "all used" */
 			c = -1;
 		}
 		break;
@@ -1246,9 +1246,9 @@ getchar(TokenSource* ts)
 	return c;
 }
 
-// Assuming c was the last character returned by getchar, set
-// things up so that next getchar will get that same character
-// followed by the current 'next character', etc.
+/* Assuming c was the last character returned by getchar, set */
+/* things up so that next getchar will get that same character */
+/* followed by the current 'next character', etc. */
 static void
 ungetchar(TokenSource* ts, int c)
 {
@@ -1271,7 +1271,7 @@ ungetchar(TokenSource* ts, int c)
 	ts->i -= n;
 }
 
-// Restore ts so that it is at the state where the index was savei.
+/* Restore ts so that it is at the state where the index was savei. */
 static void
 backup(TokenSource* ts, int savei)
 {
@@ -1281,14 +1281,14 @@ backup(TokenSource* ts, int savei)
 }
 
 
-// Look for value associated with attribute attid in token t.
-// If there is one, return 1 and put the value in *pans,
-// else return 0.
-// If xfer is true, transfer ownership of the string to the caller
-// (nil it out here); otherwise, caller must duplicate the answer
-// if it needs to save it.
-// OK to have pans==0, in which case this is just looking
-// to see if token is present.
+/* Look for value associated with attribute attid in token t. */
+/* If there is one, return 1 and put the value in *pans, */
+/* else return 0. */
+/* If xfer is true, transfer ownership of the string to the caller */
+/* (nil it out here); otherwise, caller must duplicate the answer */
+/* if it needs to save it. */
+/* OK to have pans==0, in which case this is just looking */
+/* to see if token is present. */
 int
 _tokaval(Token* t, int attid, Rune** pans, int xfer)
 {
@@ -1356,8 +1356,8 @@ Tconv(Fmt *f)
 	return fmtstrcpy(f, buf);
 }
 
-// Attrs own their constituent strings, but build may eventually
-// transfer some values to its items and nil them out in the Attr.
+/* Attrs own their constituent strings, but build may eventually */
+/* transfer some values to its items and nil them out in the Attr. */
 static Attr*
 newattr(int attid, Rune* value, Attr* link)
 {
@@ -1370,7 +1370,7 @@ newattr(int attid, Rune* value, Attr* link)
 	return ans;
 }
 
-// Free list of Attrs linked through next field
+/* Free list of Attrs linked through next field */
 static void
 freeattrs(Attr* ahead)
 {
@@ -1386,11 +1386,11 @@ freeattrs(Attr* ahead)
 	}
 }
 
-// Free array of Tokens.
-// Allocated space might have room for more than n tokens,
-// but only n of them are initialized.
-// If caller has transferred ownership of constitutent strings
-// or attributes, it must have nil'd out the pointers in the Tokens.
+/* Free array of Tokens. */
+/* Allocated space might have room for more than n tokens, */
+/* but only n of them are initialized. */
+/* If caller has transferred ownership of constitutent strings */
+/* or attributes, it must have nil'd out the pointers in the Tokens. */
 void
 _freetokens(Token* tarray, int n)
 {
blob - 42f4928d5d947eb306fb40fe485db277a2149fc5
blob + 767b9483e083e547d0e146be423fe98101a04991
--- src/libhtml/runetab.h
+++ src/libhtml/runetab.h
@@ -46,7 +46,7 @@ enum {
 	Lrefresh,
 	Lselect,
 	Lsquare,
-	Ltextarea,
+	Ltextarea
 };
 
 #define L(x)	runeconsttab[(x)]
blob - 7883c044add74f7a33e2c7a27ad046f9dea671dc
blob + df52e3fea166890f7a111847f3ae950fb2ed1da3
--- src/libhtml/strinttab.c
+++ src/libhtml/strinttab.c
@@ -4,10 +4,10 @@
 #include <html.h>
 #include "impl.h"
 
-// Do case-insensitive lookup of key[0:keylen] in t[0:n] (key part),
-// returning 1 if found, 0 if not.
-// Array t must be sorted in increasing lexicographic order of key.
-// If found, return corresponding val in *pans.
+/* Do case-insensitive lookup of key[0:keylen] in t[0:n] (key part), */
+/* returning 1 if found, 0 if not. */
+/* Array t must be sorted in increasing lexicographic order of key. */
+/* If found, return corresponding val in *pans. */
 int
 _lookup(StringInt* t, int n, Rune* key, int keylen, int* pans)
 {
@@ -33,8 +33,8 @@ _lookup(StringInt* t, int n, Rune* key, int keylen, in
 	return 0;
 }
 
-// Return first key in t[0:n] that corresponds to val,
-// nil if none.
+/* Return first key in t[0:n] that corresponds to val, */
+/* nil if none. */
 Rune*
 _revlookup(StringInt* t, int n, int val)
 {
@@ -46,8 +46,8 @@ _revlookup(StringInt* t, int n, int val)
 	return nil;
 }
 
-// Make a StringInt table out of a[0:n], mapping each string
-// to its index.  Check that entries are in alphabetical order.
+/* Make a StringInt table out of a[0:n], mapping each string */
+/* to its index.  Check that entries are in alphabetical order. */
 StringInt*
 _makestrinttab(Rune** a, int n)
 {
blob - 32fd70d0d8add58d512a7b985b490c8075db495b
blob + f8d2a19aefd97c72ecad844e3aca8d05b68b79d8
--- src/libhtml/utils.c
+++ src/libhtml/utils.c
@@ -8,8 +8,8 @@
 Rune whitespace[] = { ' ', '\t', '\n', '\r', '\0' };
 Rune notwhitespace[] = { '^', ' ', '\t', '\n', '\r' , '\0'};
 
-// All lists start out like List structure.
-// List itself can be used as list of int.
+/* All lists start out like List structure. */
+/* List itself can be used as list of int. */
 int
 _listlen(List* l)
 {
@@ -22,7 +22,7 @@ _listlen(List* l)
 	return n;
 }
 
-// Cons
+/* Cons */
 List*
 _newlist(int val, List* rest)
 {
@@ -34,7 +34,7 @@ _newlist(int val, List* rest)
 	return ans;
 }
 
-// Reverse a list in place
+/* Reverse a list in place */
 List*
 _revlist(List* l)
 {
@@ -51,15 +51,15 @@ _revlist(List* l)
 	return newl;
 }
 
-// The next few routines take a "character class" as argument.
-//    e.g., "a-zA-Z", or "^ \t\n"
-// (ranges indicated by - except in first position;
-//  ^ is first position means "not in" the following class)
+/* The next few routines take a "character class" as argument. */
+/*    e.g., "a-zA-Z", or "^ \t\n" */
+/* (ranges indicated by - except in first position; */
+/*  ^ is first position means "not in" the following class) */
 
-// Splitl splits s[0:n] just before first character of class cl.
-// Answers go in (p1, n1) and (p2, n2).
-// If no split, the whole thing goes in the first component.
-// Note: answers contain pointers into original string.
+/* Splitl splits s[0:n] just before first character of class cl. */
+/* Answers go in (p1, n1) and (p2, n2). */
+/* If no split, the whole thing goes in the first component. */
+/* Note: answers contain pointers into original string. */
 void
 _splitl(Rune* s, int n, Rune* cl, Rune** p1, int* n1, Rune** p2, int* n2)
 {
@@ -79,10 +79,10 @@ _splitl(Rune* s, int n, Rune* cl, Rune** p1, int* n1, 
 	}
 }
 
-// Splitr splits s[0:n] just after last character of class cl.
-// Answers go in (p1, n1) and (p2, n2).
-// If no split, the whole thing goes in the last component.
-// Note: answers contain pointers into original string.
+/* Splitr splits s[0:n] just after last character of class cl. */
+/* Answers go in (p1, n1) and (p2, n2). */
+/* If no split, the whole thing goes in the last component. */
+/* Note: answers contain pointers into original string. */
 void
 _splitr(Rune* s, int n, Rune* cl, Rune** p1, int* n1, Rune** p2, int* n2)
 {
@@ -103,11 +103,11 @@ _splitr(Rune* s, int n, Rune* cl, Rune** p1, int* n1, 
 	}
 }
 
-// Splitall splits s[0:n] into parts that are separated by characters from class cl.
-// Each part will have nonzero length.
-// At most alen parts are found, and pointers to their starts go into
-// the strarr array, while their lengths go into the lenarr array.
-// The return value is the number of parts found.
+/* Splitall splits s[0:n] into parts that are separated by characters from class cl. */
+/* Each part will have nonzero length. */
+/* At most alen parts are found, and pointers to their starts go into */
+/* the strarr array, while their lengths go into the lenarr array. */
+/* The return value is the number of parts found. */
 int
 _splitall(Rune* s, int n, Rune* cl, Rune** strarr, int* lenarr, int alen)
 {
@@ -138,8 +138,8 @@ _splitall(Rune* s, int n, Rune* cl, Rune** strarr, int
 	return i;
 }
 
-// Find part of s that excludes leading and trailing whitespace,
-// and return that part in *pans (and its length in *panslen).
+/* Find part of s that excludes leading and trailing whitespace, */
+/* and return that part in *pans (and its length in *panslen). */
 void
 _trimwhite(Rune* s, int n, Rune** pans, int* panslen)
 {
@@ -159,8 +159,8 @@ _trimwhite(Rune* s, int n, Rune** pans, int* panslen)
 	*panslen = n;
 }
 
-// _Strclass returns a pointer to the first element of s that is
-// a member of class cl, nil if none.
+/* _Strclass returns a pointer to the first element of s that is */
+/* a member of class cl, nil if none. */
 Rune*
 _Strclass(Rune* s, Rune* cl)
 {
@@ -172,8 +172,8 @@ _Strclass(Rune* s, Rune* cl)
 	return nil;
 }
 
-// _Strnclass returns a pointer to the first element of s[0:n] that is
-// a member of class cl, nil if none.
+/* _Strnclass returns a pointer to the first element of s[0:n] that is */
+/* a member of class cl, nil if none. */
 Rune*
 _Strnclass(Rune* s, Rune* cl, int n)
 {
@@ -185,8 +185,8 @@ _Strnclass(Rune* s, Rune* cl, int n)
 	return nil;
 }
 
-// _Strrclass returns a pointer to the last element of s that is
-// a member of class cl, nil if none
+/* _Strrclass returns a pointer to the last element of s that is */
+/* a member of class cl, nil if none */
 Rune*
 _Strrclass(Rune* s, Rune* cl)
 {
@@ -203,8 +203,8 @@ _Strrclass(Rune* s, Rune* cl)
 	return nil;
 }
 
-// _Strnrclass returns a pointer to the last element of s[0:n] that is
-// a member of class cl, nil if none
+/* _Strnrclass returns a pointer to the last element of s[0:n] that is */
+/* a member of class cl, nil if none */
 Rune*
 _Strnrclass(Rune* s, Rune* cl, int n)
 {
@@ -221,7 +221,7 @@ _Strnrclass(Rune* s, Rune* cl, int n)
 	return nil;
 }
 
-// Is c in the class cl?
+/* Is c in the class cl? */
 int
 _inclass(Rune c, Rune* cl)
 {
@@ -258,7 +258,7 @@ _inclass(Rune c, Rune* cl)
 	return ans;
 }
 
-// Is pre a prefix of s?
+/* Is pre a prefix of s? */
 int
 _prefix(Rune* pre, Rune* s)
 {
@@ -277,7 +277,7 @@ _prefix(Rune* pre, Rune* s)
 	return 1;
 }
 
-// Number of runes in (null-terminated) s
+/* Number of runes in (null-terminated) s */
 int
 _Strlen(Rune* s)
 {
@@ -286,7 +286,7 @@ _Strlen(Rune* s)
 	return runestrlen(s);
 }
 
-// -1, 0, 1 as s1 is lexicographically less, equal greater than s2
+/* -1, 0, 1 as s1 is lexicographically less, equal greater than s2 */
 int
 _Strcmp(Rune *s1, Rune *s2)
 {
@@ -297,11 +297,11 @@ _Strcmp(Rune *s1, Rune *s2)
 	return runestrcmp(s1, s2);
 }
 
-// Like Strcmp, but use exactly n chars of s1 (assume s1 has at least n chars).
-// Also, do a case-insensitive match, assuming s2
-// has no chars in [A-Z], only their lowercase versions.
-// (This routine is used for in-place keyword lookup, where s2 is in a keyword
-// list and s1 is some substring, possibly mixed-case, in a buffer.)
+/* Like Strcmp, but use exactly n chars of s1 (assume s1 has at least n chars). */
+/* Also, do a case-insensitive match, assuming s2 */
+/* has no chars in [A-Z], only their lowercase versions. */
+/* (This routine is used for in-place keyword lookup, where s2 is in a keyword */
+/* list and s1 is some substring, possibly mixed-case, in a buffer.) */
 int
 _Strncmpci(Rune *s1, int n1, Rune *s2)
 {
@@ -325,7 +325,7 @@ _Strncmpci(Rune *s1, int n1, Rune *s2)
 	}
 }
 
-// emalloc and copy
+/* emalloc and copy */
 Rune*
 _Strdup(Rune* s)
 {
@@ -334,9 +334,9 @@ _Strdup(Rune* s)
 	return _Strndup(s, runestrlen(s));
 }
 
-// emalloc and copy n chars of s (assume s is at least that long),
-// and add 0 terminator.
-// Return nil if n==0.
+/* emalloc and copy n chars of s (assume s is at least that long), */
+/* and add 0 terminator. */
+/* Return nil if n==0. */
 Rune*
 _Strndup(Rune* s, int n)
 {
@@ -349,15 +349,15 @@ _Strndup(Rune* s, int n)
 	ans[n] = 0;
 	return ans;
 }
-// emalloc enough room for n Runes, plus 1 null terminator.
-// (Not initialized to anything.)
+/* emalloc enough room for n Runes, plus 1 null terminator. */
+/* (Not initialized to anything.) */
 Rune*
 _newstr(int n)
 {
 	return (Rune*)emalloc((n+1)*sizeof(Rune));
 }
 
-// emalloc and copy s+t
+/* emalloc and copy s+t */
 Rune*
 _Strdup2(Rune* s, Rune* t)
 {
@@ -376,7 +376,7 @@ _Strdup2(Rune* s, Rune* t)
 	return ans;
 }
 
-// Return emalloc'd substring s[start:stop],
+/* Return emalloc'd substring s[start:stop], */
 Rune*
 _Strsubstr(Rune* s, int start, int stop)
 {
@@ -388,7 +388,7 @@ _Strsubstr(Rune* s, int start, int stop)
 	return t;
 }
 
-// Copy n chars to s1 from s2, and return s1+n
+/* Copy n chars to s1 from s2, and return s1+n */
 Rune*
 _Stradd(Rune* s1, Rune* s2, int n)
 {
@@ -398,10 +398,10 @@ _Stradd(Rune* s1, Rune* s2, int n)
 	return s1+n;
 }
 
-// Like strtol, but converting from Rune* string
+/* Like strtol, but converting from Rune* string */
 
-//#define LONG_MAX	2147483647L
-//#define LONG_MIN	-2147483648L
+/*#define LONG_MAX	2147483647L */
+/*#define LONG_MIN	-2147483648L */
 
 long
 _Strtol(Rune* nptr, Rune** endptr, int base)
@@ -493,8 +493,8 @@ _Strtol(Rune* nptr, Rune** endptr, int base)
 	return n;
 }
 
-// Convert buf[0:n], bytes whose character set is chset,
-// into a emalloc'd null-terminated Unicode string.
+/* Convert buf[0:n], bytes whose character set is chset, */
+/* into a emalloc'd null-terminated Unicode string. */
 Rune*
 toStr(uchar* buf, int n, int chset)
 {
@@ -534,9 +534,9 @@ toStr(uchar* buf, int n, int chset)
 	return ans;
 }
 
-// Convert buf[0:n], Unicode characters,
-// into an emalloc'd null-terminated string in character set chset.
-// Use 0x80 for unconvertable characters.
+/* Convert buf[0:n], Unicode characters, */
+/* into an emalloc'd null-terminated string in character set chset. */
+/* Use 0x80 for unconvertable characters. */
 uchar*
 fromStr(Rune* buf, int n, int chset)
 {
@@ -580,7 +580,7 @@ fromStr(Rune* buf, int n, int chset)
 
 }
 
-// Convert n to emalloc'd String.
+/* Convert n to emalloc'd String. */
 Rune*
 _ltoStr(int n)
 {
blob - f03e9c321697881597815e4d43d3b214d2c11e38
blob + a9c57913f9404eaf9c061a81fb79e474ff571634
--- src/libhttpd/parse.c
+++ src/libhttpd/parse.c
@@ -13,7 +13,7 @@ enum
 	 * tokens
 	 */
 	Word	= 1,
-	QString,
+	QString
 };
 
 #define UlongMax	4294967295UL
blob - 98a88369087b577d3c4c49d0768ccc018c33e578
blob + ce487c80be596213505f514877a04257c1c5403d
--- src/libhttpd/parsereq.c
+++ src/libhttpd/parsereq.c
@@ -152,7 +152,7 @@ parseuri(HConnect *c, char *uri)
 
 	/*
 	 * anything starting with // is a host name or number
-	 * hostnames constists of letters, digits, - and .
+	 * hostnames consists of letters, digits, - and .
 	 * for now, just ignore any port given
 	 */
 	if(uri[0] == '/' && uri[1] == '/'){
blob - bb715451d8364ca1894342ce49f23a2073a48d60
blob + 97d153a317bf0b985df1de119b82f38ddee4feba
--- src/libip/eipfmt.c
+++ src/libip/eipfmt.c
@@ -4,10 +4,10 @@
 
 enum
 {
-	Isprefix= 16,
+	Isprefix= 16
 };
 
-// XXX: manually initialize once to placate the Sun monster
+/* XXX: manually initialize once to placate the Sun monster */
 uchar prefixvals[256];
 #ifdef NOTDEF
 uchar prefixvals[256] =
@@ -37,7 +37,7 @@ eipfmt(Fmt *f)
 	ushort s;
 	int i, j, n, eln, eli;
 
-	static int once = 0;	// XXX: placate the Sun monster
+	static int once = 0;	/* XXX: placate the Sun monster */
 
 	if(!once){
 		once = 1;
blob - a7149ffa1f44c1cf7844f1e86b55a78bf02c9686
blob + bbde18f78ed6e4818163ac4d1847a5fa36182d42
--- src/libip/myipaddr.c
+++ src/libip/myipaddr.c
@@ -15,8 +15,8 @@ static uchar loopbackmask[IPaddrlen] = {
 	0xff, 0, 0, 0
 };
 
-// find first ip addr that isn't the friggin loopback address
-// unless there are no others
+/* find first ip addr that isn't the friggin loopback address */
+/* unless there are no others */
 int
 myipaddr(uchar *ip, char *net)
 {
blob - afe94be14f3c0df34e330a7e1252d10db2f5e801
blob + eb01a6e64b00ac20ac8b55389d219baa56622863
--- src/libmach/Linux.c
+++ src/libmach/Linux.c
@@ -433,7 +433,7 @@ ctlproc(int pid, char *msg)
 				}
 				return -1;
 			}
-//fprint(2, "got pid %d status %x\n", pid, status);
+/*fprint(2, "got pid %d status %x\n", pid, status); */
 			if(WIFEXITED(status) || WIFSTOPPED(status))
 				return 0;
 		}
blob - 9404a37019494ce650df73ec38a176e504b88046
blob + bd0fe56d905642aaaef296a9604ca5be3a764a95
--- src/libmach/dwarf.h
+++ src/libmach/dwarf.h
@@ -102,7 +102,7 @@ enum
 	LangAda95 = 0x000D,
 	LangFortran95 = 0x000E,
 	LangPLI = 0x000F,
-	// 0x8000-0xFFFF reserved
+	/* 0x8000-0xFFFF reserved */
 
 	IdCaseSensitive = 0x00,
 	IdCaseUpper = 0x01,
@@ -112,7 +112,7 @@ enum
 	CallingNormal = 0x01,
 	CallingProgram = 0x02,
 	CallingNocall = 0x03,
-	// 0x40-0xFF reserved
+	/* 0x40-0xFF reserved */
 
 	InNone = 0x00,
 	InInlined = 0x01,
@@ -132,22 +132,22 @@ enum
 	TFlag = 1<<4,
 	TAddress = 1<<5,
 
-	OpAddr = 0x03,	// 1 op, const addr
+	OpAddr = 0x03,	/* 1 op, const addr */
 	OpDeref = 0x06,
-	OpConst1u = 0x08,	// 1 op, 1 byte const
-	OpConst1s = 0x09,	//	" signed
-	OpConst2u = 0x0A,	// 1 op, 2 byte const 
-	OpConst2s = 0x0B,	//	" signed
-	OpConst4u = 0x0C,	// 1 op, 4 byte const
-	OpConst4s = 0x0D,	//	" signed
-	OpConst8u = 0x0E,	// 1 op, 8 byte const
-	OpConst8s = 0x0F,	//	" signed
-	OpConstu = 0x10,	// 1 op, LEB128 const
-	OpConsts = 0x11,	//	" signed
+	OpConst1u = 0x08,	/* 1 op, 1 byte const */
+	OpConst1s = 0x09,	/*	" signed */
+	OpConst2u = 0x0A,	/* 1 op, 2 byte const  */
+	OpConst2s = 0x0B,	/*	" signed */
+	OpConst4u = 0x0C,	/* 1 op, 4 byte const */
+	OpConst4s = 0x0D,	/*	" signed */
+	OpConst8u = 0x0E,	/* 1 op, 8 byte const */
+	OpConst8s = 0x0F,	/*	" signed */
+	OpConstu = 0x10,	/* 1 op, LEB128 const */
+	OpConsts = 0x11,	/*	" signed */
 	OpDup = 0x12,
 	OpDrop = 0x13,
 	OpOver = 0x14,
-	OpPick = 0x15,		// 1 op, 1 byte stack index
+	OpPick = 0x15,		/* 1 op, 1 byte stack index */
 	OpSwap = 0x16,
 	OpRot = 0x17,
 	OpXderef = 0x18,
@@ -161,13 +161,13 @@ enum
 	OpNot = 0x20,
 	OpOr = 0x21,
 	OpPlus = 0x22,
-	OpPlusUconst = 0x23,	// 1 op, ULEB128 addend
+	OpPlusUconst = 0x23,	/* 1 op, ULEB128 addend */
 	OpShl = 0x24,
 	OpShr = 0x25,
 	OpShra = 0x26,
 	OpXor = 0x27,
-	OpSkip = 0x2F,		// 1 op, signed 2-byte constant
-	OpBra = 0x28,		// 1 op, signed 2-byte constant
+	OpSkip = 0x2F,		/* 1 op, signed 2-byte constant */
+	OpBra = 0x28,		/* 1 op, signed 2-byte constant */
 	OpEq = 0x29,
 	OpGe = 0x2A,
 	OpGt = 0x2B,
@@ -175,24 +175,24 @@ enum
 	OpLt = 0x2D,
 	OpNe = 0x2E,
 	OpLit0 = 0x30,
-		// OpLitN = OpLit0 + N for N = 0..31
+		/* OpLitN = OpLit0 + N for N = 0..31 */
 	OpReg0 = 0x50,
-		// OpRegN = OpReg0 + N for N = 0..31
-	OpBreg0 = 0x70,	// 1 op, signed LEB128 constant
-		// OpBregN = OpBreg0 + N for N = 0..31
-	OpRegx = 0x90,	// 1 op, ULEB128 register
-	OpFbreg = 0x91,	// 1 op, SLEB128 offset
-	OpBregx = 0x92,	// 2 op, ULEB128 reg, SLEB128 off
-	OpPiece = 0x93,	// 1 op, ULEB128 size of piece
-	OpDerefSize = 0x94,	// 1-byte size of data retrieved
-	OpXderefSize = 0x95,	// 1-byte size of data retrieved
-	OpNop = 0x96,
-	// next four new in Dwarf v3
+		/* OpRegN = OpReg0 + N for N = 0..31 */
+	OpBreg0 = 0x70,	/* 1 op, signed LEB128 constant */
+		/* OpBregN = OpBreg0 + N for N = 0..31 */
+	OpRegx = 0x90,	/* 1 op, ULEB128 register */
+	OpFbreg = 0x91,	/* 1 op, SLEB128 offset */
+	OpBregx = 0x92,	/* 2 op, ULEB128 reg, SLEB128 off */
+	OpPiece = 0x93,	/* 1 op, ULEB128 size of piece */
+	OpDerefSize = 0x94,	/* 1-byte size of data retrieved */
+	OpXderefSize = 0x95,	/* 1-byte size of data retrieved */
+	OpNop = 0x96,
+	/* next four new in Dwarf v3 */
 	OpPushObjAddr = 0x97,
-	OpCall2 = 0x98,	// 2-byte offset of DIE
-	OpCall4 = 0x99,	// 4-byte offset of DIE
-	OpCallRef = 0x9A,	// 4- or 8- byte offset of DIE
-	// 0xE0-0xFF reserved for user-specific
+	OpCall2 = 0x98,	/* 2-byte offset of DIE */
+	OpCall4 = 0x99,	/* 4-byte offset of DIE */
+	OpCallRef = 0x9A	/* 4- or 8- byte offset of DIE */
+	/* 0xE0-0xFF reserved for user-specific */
 };
 
 struct DwarfBlock
@@ -356,7 +356,7 @@ enum
 	RuleCfaOffset,
 	RuleRegister,
 	RuleRegOff,
-	RuleLocation,
+	RuleLocation
 };
 struct DwarfExpr
 {
blob - 0da7273a11fbd6c35a593872c6e060e6dfb935c2
blob + 30c227b3f52e2786443e6eb583a68d601b5b3639
--- src/libmach/dwarfeval.c
+++ src/libmach/dwarfeval.c
@@ -1,19 +1,19 @@
-	OpAddr = 0x03,	// 1 op, const addr
+	OpAddr = 0x03,	/* 1 op, const addr */
 	OpDeref = 0x06,
-	OpConst1u = 0x08,	// 1 op, 1 byte const
-	OpConst1s = 0x09,	//	" signed
-	OpConst2u = 0x0A	// 1 op, 2 byte const 
-	OpConst2s = 0x0B,	//	" signed
-	OpConst4u = 0x0C,	// 1 op, 4 byte const
-	OpConst4s = 0x0D,	//	" signed
-	OpConst8u = 0x0E,	// 1 op, 8 byte const
-	OpConst8s = 0x0F,	//	" signed
-	OpConstu = 0x10,	// 1 op, LEB128 const
-	OpConsts = 0x11,	//	" signed
+	OpConst1u = 0x08,	/* 1 op, 1 byte const */
+	OpConst1s = 0x09,	/*	" signed */
+	OpConst2u = 0x0A	/* 1 op, 2 byte const  */
+	OpConst2s = 0x0B,	/*	" signed */
+	OpConst4u = 0x0C,	/* 1 op, 4 byte const */
+	OpConst4s = 0x0D,	/*	" signed */
+	OpConst8u = 0x0E,	/* 1 op, 8 byte const */
+	OpConst8s = 0x0F,	/*	" signed */
+	OpConstu = 0x10,	/* 1 op, LEB128 const */
+	OpConsts = 0x11,	/*	" signed */
 	OpDup = 0x12,
 	OpDrop = 0x13,
 	OpOver = 0x14,
-	OpPick = 0x15,		// 1 op, 1 byte stack index
+	OpPick = 0x15,		/* 1 op, 1 byte stack index */
 	OpSwap = 0x16,
 	OpRot = 0x17,
 	OpXderef = 0x18,
@@ -27,13 +27,13 @@
 	OpNot = 0x20,
 	OpOr = 0x21,
 	OpPlus = 0x22,
-	OpPlusUconst = 0x23,	// 1 op, ULEB128 addend
+	OpPlusUconst = 0x23,	/* 1 op, ULEB128 addend */
 	OpShl = 0x24,
 	OpShr = 0x25,
 	OpShra = 0x26,
 	OpXor = 0x27,
-	OpSkip = 0x2F,		// 1 op, signed 2-byte constant
-	OpBra = 0x28,		// 1 op, signed 2-byte constant
+	OpSkip = 0x2F,		/* 1 op, signed 2-byte constant */
+	OpBra = 0x28,		/* 1 op, signed 2-byte constant */
 	OpEq = 0x29,
 	OpGe = 0x2A,
 	OpGt = 0x2B,
@@ -41,22 +41,22 @@
 	OpLt = 0x2D,
 	OpNe = 0x2E,
 	OpLit0 = 0x30,
-		// OpLitN = OpLit0 + N for N = 0..31
+		/* OpLitN = OpLit0 + N for N = 0..31 */
 	OpReg0 = 0x50,
-		// OpRegN = OpReg0 + N for N = 0..31
-	OpBreg0 = 0x70,	// 1 op, signed LEB128 constant
-		// OpBregN = OpBreg0 + N for N = 0..31
-	OpRegx = 0x90,	// 1 op, ULEB128 register
-	OpFbreg = 0x91,	// 1 op, SLEB128 offset
-	OpBregx = 0x92,	// 2 op, ULEB128 reg, SLEB128 off
-	OpPiece = 0x93,	// 1 op, ULEB128 size of piece
-	OpDerefSize = 0x94,	// 1-byte size of data retrieved
-	OpXderefSize = 0x95,	// 1-byte size of data retrieved
+		/* OpRegN = OpReg0 + N for N = 0..31 */
+	OpBreg0 = 0x70,	/* 1 op, signed LEB128 constant */
+		/* OpBregN = OpBreg0 + N for N = 0..31 */
+	OpRegx = 0x90,	/* 1 op, ULEB128 register */
+	OpFbreg = 0x91,	/* 1 op, SLEB128 offset */
+	OpBregx = 0x92,	/* 2 op, ULEB128 reg, SLEB128 off */
+	OpPiece = 0x93,	/* 1 op, ULEB128 size of piece */
+	OpDerefSize = 0x94,	/* 1-byte size of data retrieved */
+	OpXderefSize = 0x95,	/* 1-byte size of data retrieved */
 	OpNop = 0x96,
-	// next four new in Dwarf v3
+	/* next four new in Dwarf v3 */
 	OpPushObjAddr = 0x97,
-	OpCall2 = 0x98,	// 2-byte offset of DIE
-	OpCall4 = 0x99,	// 4-byte offset of DIE
-	OpCallRef = 0x9A,	// 4- or 8- byte offset of DIE
-	// 0xE0-0xFF reserved for user-specific
+	OpCall2 = 0x98,	/* 2-byte offset of DIE */
+	OpCall4 = 0x99,	/* 4-byte offset of DIE */
+	OpCallRef = 0x9A,	/* 4- or 8- byte offset of DIE */
+	/* 0xE0-0xFF reserved for user-specific */
 
blob - 61c58dd4f77dd2775281a67b9bec738362de591c
blob + 4c0eacd8bc2d4ff971de02cc1d223a57517f706d
--- src/libmach/dwarfinfo.c
+++ src/libmach/dwarfinfo.c
@@ -104,7 +104,7 @@ enum
 	FormRef4 = 0x13,
 	FormRef8 = 0x14,
 	FormRefUdata = 0x15,
-	FormIndirect = 0x16,
+	FormIndirect = 0x16
 };
 
 static int parseattrs(DwarfBuf*, ulong, DwarfAbbrev*, DwarfAttrs*);
blob - 4c8a8a9accaa9f1c9d36e69be0d91f4c262b61f2
blob + 9c36cf0824b91d14c456f8a332c22df56ad1f6b1
--- src/libmach/dwarfpc.c
+++ src/libmach/dwarfpc.c
@@ -25,7 +25,7 @@ enum
 	BasicDwarfBlock = 1<<1,
 	EndSequence = 1<<2,
 	PrologueEnd = 1<<3,
-	EpilogueBegin = 1<<4,
+	EpilogueBegin = 1<<4
 };
 
 typedef struct State State;
blob - f52450997363bafa1d6692c425816801babbe6c2
blob + 8ba234e0dcf25a36386eeb0088df5b3b8fa5a5a1
--- src/libmach/elf.h
+++ src/libmach/elf.h
@@ -125,7 +125,7 @@ enum
 	ElfNotePrPsinfo = 3,
 	ElfNotePrTaskstruct = 4,
 	ElfNotePrAuxv = 6,
-	ElfNotePrXfpreg = 0x46e62b7f,	/* for gdb/386 */
+	ElfNotePrXfpreg = 0x46e62b7f	/* for gdb/386 */
 };
 
 struct ElfHdr
blob - 847a93faee2757b2b92835b95d204799743a7414
blob + 0d01d969d6759d2abc75ebfa6120807a1a943d42
--- src/libmach/elfcorefreebsd386.c
+++ src/libmach/elfcorefreebsd386.c
@@ -108,7 +108,7 @@ corecmdfreebsd386(Elf *elf, ElfNote *note, char **pp)
 		return -1;
 	}
 	p = (Psinfo*)note->desc;
-	// print("elf name %s\nelf args %s\n", p->name, p->psargs);
+	/* print("elf name %s\nelf args %s\n", p->name, p->psargs); */
 	t = malloc(80+1);
 	if(t == nil)
 		return -1;
blob - 4c4aabc44e13cdaf16e7bc5885d24cbd9ac8dd41
blob + 6cd0a5f99a9d08f160ae103c0d3f53cad7bcb755
--- src/libmach/elfcorelinux386.c
+++ src/libmach/elfcorelinux386.c
@@ -36,7 +36,7 @@ struct Status
 };
 enum
 {
-	StatusSize = sizeof(Status),
+	StatusSize = sizeof(Status)
 };
 
 struct Psinfo
@@ -57,7 +57,7 @@ struct Psinfo
 };
 enum
 {
-	PsinfoSize = sizeof(Psinfo),
+	PsinfoSize = sizeof(Psinfo)
 };
 
 int
@@ -92,7 +92,7 @@ corecmdlinux386(Elf *elf, ElfNote *note, char **pp)
 		return -1;
 	}
 	p = (Psinfo*)note->desc;
-	// print("elf name %s\nelf args %s\n", p->fname, p->psargs);
+	/* print("elf name %s\nelf args %s\n", p->fname, p->psargs); */
 	t = malloc(80+1);
 	if(t == nil)
 		return -1;
blob - 5386f1b64ff567594b7d1c28797fd50a19a66c46
blob + fc4e37fbc3c004cb45c2f70eab54a44cb7bcffce
--- src/libmach/elfdl386.c
+++ src/libmach/elfdl386.c
@@ -44,7 +44,7 @@ enum
 	DT_PLTREL,
 	DT_DEBUG,
 	DT_TEXTREL,
-	DT_JMPREL,
+	DT_JMPREL
 };
 
 static int
blob - 1fffaae50e6e6c71fc55bd58731a249d149a11a8
blob + 1f756abf1c4faf010adf8fd0cf1d7dbace6eea8a
--- src/libmach/mach386.c
+++ src/libmach/mach386.c
@@ -28,9 +28,21 @@ static	int	i386foll(Map*, Regs*, ulong, ulong*);
 static	int	i386hexinst(Map*, ulong, char*, int);
 static	int	i386das(Map*, ulong, char, char*, int);
 static	int	i386instlen(Map*, ulong);
-static	char	*i386windregs[];
 static	int	i386unwind(Map*, Regs*, ulong*, Symbol*);
 
+static char *i386windregs[] = {
+	"PC",
+	"SP",
+	"BP",
+	"AX",
+	"CX",
+	"DX",
+	"BX",
+	"SI",
+	"DI",
+	0,
+};
+
 static	Regdesc i386reglist[] = {
 	{"DI",		REGOFF(di),	RINT, 'X'},
 	{"SI",		REGOFF(si),	RINT, 'X'},
@@ -115,19 +127,6 @@ Mach mach386 =
 	i386instlen,		/* instruction size calculation */
 };
 
-static char *i386windregs[] = {
-	"PC",
-	"SP",
-	"BP",
-	"AX",
-	"CX",
-	"DX",
-	"BX",
-	"SI",
-	"DI",
-	0,
-};
-
 /*
  * The wrapper code around Linux system calls 
  * saves AX on the stack before calling some calls
@@ -158,7 +157,7 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 	u32int v;
 	char buf[60], *p;
 
-//print("i386unwind %s\n", sym ? sym->name : nil);
+/*print("i386unwind %s\n", sym ? sym->name : nil); */
 	isp = windindex("SP");
 	ipc = windindex("PC");
 	ibp = windindex("BP");
@@ -176,14 +175,14 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 	 */
 	if(sym){
 		pc = sym->loc.addr;
-//print("startpc %lux\n", pc);
+/*print("startpc %lux\n", pc); */
 		memset(off, 0xff, sizeof off);
 		spoff = 0;
 		havebp = 0;
 		for(;;){
 			if((n = i386das(map, pc, 0, buf, sizeof buf)) < 0)
 				break;
-//print("%s\n", buf);
+/*print("%s\n", buf); */
 			pc += n;
 			if(strncmp(buf, "PUSHL\t", 6) == 0){
 				spoff += 4;
@@ -193,7 +192,7 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 				havebp = 1;
 			}else if(strncmp(buf, "SUBL\t$", 6) == 0){
 				if((p = strrchr(buf, ',')) && strcmp(p, ",SP") == 0){
-//print("spoff %s\n", buf+6);
+/*print("spoff %s\n", buf+6); */
 					spoff += strtol(buf+6, 0, 16);
 				}
 				break;
@@ -209,14 +208,14 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 		syscallhack(map, regs, &spoff);
 
 		if(havebp){
-//print("havebp\n");
+/*print("havebp\n"); */
 			rget(regs, "BP", &next[isp]);
 			get4(map, next[isp], &v);
 			next[ibp] = v;
 			next[isp] += 4;
 		}else{
 			rget(regs, "SP", &next[isp]);
-//print("old sp %lux + %d\n", next[isp], spoff);
+/*print("old sp %lux + %d\n", next[isp], spoff); */
 			next[isp] += spoff;
 		}
 		for(i=0; i<nelem(off); i++)
@@ -227,7 +226,7 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 
 		if(get4(map, next[isp], &v) < 0)
 			return -1;
-//print("new pc %lux => %lux\n", next[isp], v);
+/*print("new pc %lux => %lux\n", next[isp], v); */
 		next[ipc] = v;
 		next[isp] += 4;
 		return 0;
@@ -248,8 +247,8 @@ i386unwind(Map *map, Regs *regs, ulong *next, Symbol *
 	return 0;
 }
 
-//static	char	STARTSYM[] =	"_main";
-//static	char	PROFSYM[] =	"_mainp";
+/*static	char	STARTSYM[] =	"_main"; */
+/*static	char	PROFSYM[] =	"_mainp"; */
 static	char	FRAMENAME[] =	".frame";
 static char *excname[] =
 {
@@ -348,7 +347,7 @@ enum{
 	SP,
 	BP,
 	SI,
-	DI,
+	DI
 };
 	/* Operand Format codes */
 /*
@@ -404,7 +403,7 @@ enum {
 	PRE,			/* Instr Prefix */
 	SEG,			/* Segment Prefix */
 	OPOVER,			/* Operand size override */
-	ADDOVER,		/* Address size override */
+	ADDOVER		/* Address size override */
 };
 	
 static Optable optab0F00[8]=
blob - 641db598c9732ed2875ce2bc076c117929e9bc37
blob + 9d9a1232d3870842cd9affa1c48db3723e3098e2
--- src/libmach/macho.c
+++ src/libmach/macho.c
@@ -4,7 +4,7 @@
 #include "macho.h"
 
 /*
-http://www.channelu.com/NeXT/NeXTStep/3.3/nd/DevTools/14_MachO/MachO.htmld/
+http://www.channelu.com/NeXT/NeXTStep/3.3/nd/DevTools/14_MachO/MachO.htmld/ 
 */
 
 Macho*
blob - 377e0d2b85dacc16d26e501ab6b5c3da4edf0207
blob + d2a1a2e8ef3624efb47d55bb8cda4ef82be6ba73
--- src/libmach/macho.h
+++ src/libmach/macho.h
@@ -25,7 +25,7 @@ enum
 	MachoFileExecutable = 2,
 	MachoFileFvmlib = 3,
 	MachoFileCore = 4,
-	MachoFilePreload = 5,
+	MachoFilePreload = 5
 };
 
 struct MachoCmd
blob - 0eb3761d18d65922d4d8510bc7024ff93db31016
blob + 9cd06afbac01e22260fdede8570accef567697c0
--- src/libmach/machocorepower.c
+++ src/libmach/machocorepower.c
@@ -12,7 +12,7 @@ enum
 	VectorState,
 	ThreadState64,
 	ExceptionState64,
-	ThreadStateNone,
+	ThreadStateNone
 };
 
 typedef struct Lreg Lreg;
blob - 141645a6c670678e182dd7fb62d0fc8373500e60
blob + d33651c0df6459aaf0ce6dee9a1272bec8b0ac3a
--- src/libmach/machpower.c
+++ src/libmach/machpower.c
@@ -78,7 +78,7 @@ powerexcep(Map *map, Regs *regs)
 #define	REGSP	1	/* should come from q.out.h, but there's a clash */
 #define	REGSB	2
 
-//static	char FRAMENAME[] = ".frame";
+/*static	char FRAMENAME[] = ".frame"; */
 
 static Map *mymap;
 
@@ -1348,12 +1348,12 @@ powerunwind(Map *map, Regs *regs, ulong *next, Symbol 
 	 * to disassemble the function prologues in order to figure
 	 * this out.
 	 */
-	// evaluate lr
-	// if in this function, no good - go to saved one.
-	// set next[sp] to *cur[sp]
-	// set next[pc] to lr
-	// set next[lr] to lr
-	// 
+	/* evaluate lr */
+	/* if in this function, no good - go to saved one. */
+	/* set next[sp] to *cur[sp] */
+	/* set next[pc] to lr */
+	/* set next[lr] to lr */
+	/*  */
 	werrstr("powerunwind not implemented");
 	return -1;
 }
blob - 68d2bdfcade814519979a5f9df87ce2fc9c787c0
blob + 37d4b505ccb6bd791cfed83b37c21ee2e141e4ec
--- src/libmach/t.c
+++ src/libmach/t.c
@@ -163,9 +163,9 @@ main(int argc, char **argv)
 	attachargs(argc, argv, OREAD);
 	attachdynamic();
 
-//	if(!corpid && !corhdr)
-//		sysfatal("could not attach to process");
-//
+/*	if(!corpid && !corhdr) */
+/*		sysfatal("could not attach to process"); */
+/* */
 	p.pid = corpid;
 	if((e = td_ta_new(&p, &ta)) != TD_OK)
 		sysfatal("td_ta_new: %s", terr(e));
blob - 76945030fe746f6365382228d42f630808c24096
blob + b2df1fe7e368211955063cd7ac2f64c0a5a827dd
--- src/libmach/ureg386.c
+++ src/libmach/ureg386.c
@@ -18,8 +18,8 @@ linux2ureg386(UregLinux386 *l, Ureg *u)
 	u->fs = l->xfs;
 	u->es = l->xes;
 	u->ds = l->xds;
-	u->trap = ~0; // l->trapno;
-	u->ecode = ~0; // l->err;
+	u->trap = ~0; /* l->trapno; */
+	u->ecode = ~0; /* l->err; */
 	u->pc = l->eip;
 	u->cs = l->xcs;
 	u->flags = l->eflags;
blob - 95935fcdf90a81be61525cda49f5704dcc225c1e
blob + 27fe3430f85b0aba39085f5aeb50d9730ba50062
--- src/libmp/port/betomp.c
+++ src/libmp/port/betomp.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// convert a big-endian byte array (most significant byte first) to an mpint
+/* convert a big-endian byte array (most significant byte first) to an mpint */
 mpint*
 betomp(uchar *p, uint n, mpint *b)
 {
@@ -12,18 +12,18 @@ betomp(uchar *p, uint n, mpint *b)
 	if(b == nil)
 		b = mpnew(0);
 
-	// dump leading zeros
+	/* dump leading zeros */
 	while(*p == 0 && n > 1){
 		p++;
 		n--;
 	}
 
-	// get the space
+	/* get the space */
 	mpbits(b, n*8);
 	b->top = DIGITS(n*8);
 	m = b->top-1;
 
-	// first digit might not be Dbytes long
+	/* first digit might not be Dbytes long */
 	s = ((n-1)*8)%Dbits;
 	x = 0;
 	for(; n > 0; n--){
blob - a98fef53aa3ddcdc47bb0e9850fe5a9cd1e47bb8
blob + 6dc6eea68abcc45d45d55902fbdca4bd06ca2f72
--- src/libmp/port/crt.c
+++ src/libmp/port/crt.c
@@ -1,20 +1,20 @@
 #include "os.h"
 #include <mp.h>
 
-// chinese remainder theorem
-//
-// handbook of applied cryptography, menezes et al, 1997, pp 610 - 613
+/* chinese remainder theorem */
+/* */
+/* handbook of applied cryptography, menezes et al, 1997, pp 610 - 613 */
 
 struct CRTpre
 {
-	int	n;		// number of moduli
-	mpint	**m;		// pointer to moduli
-	mpint	**c;		// precomputed coefficients
-	mpint	**p;		// precomputed products
-	mpint	*a[1];		// local storage
+	int	n;		/* number of moduli */
+	mpint	**m;		/* pointer to moduli */
+	mpint	**c;		/* precomputed coefficients */
+	mpint	**p;		/* precomputed products */
+	mpint	*a[1];		/* local storage */
 };
 
-// setup crt info, returns a newly created structure
+/* setup crt info, returns a newly created structure */
 CRTpre*
 crtpre(int n, mpint **m)
 {
@@ -30,18 +30,18 @@ crtpre(int n, mpint **m)
 	crt->p = crt->c+n;
 	crt->n = n;
 
-	// make a copy of the moduli
+	/* make a copy of the moduli */
 	for(i = 0; i < n; i++)
 		crt->m[i] = mpcopy(m[i]);
 
-	// precompute the products
+	/* precompute the products */
 	u = mpcopy(mpone);
 	for(i = 0; i < n; i++){
 		mpmul(u, m[i], u);
 		crt->p[i] = mpcopy(u);
 	}
 
-	// precompute the coefficients
+	/* precompute the coefficients */
 	for(i = 1; i < n; i++){
 		crt->c[i] = mpcopy(mpone);
 		for(j = 0; j < i; j++){
@@ -70,7 +70,7 @@ crtprefree(CRTpre *crt)
 	free(crt);
 }
 
-// convert to residues, returns a newly created structure
+/* convert to residues, returns a newly created structure */
 CRTres*
 crtin(CRTpre *crt, mpint *x)
 {
@@ -88,7 +88,7 @@ crtin(CRTpre *crt, mpint *x)
 	return res;
 }
 
-// garners algorithm for converting residue form to linear
+/* garners algorithm for converting residue form to linear */
 void
 crtout(CRTpre *crt, CRTres *res, mpint *x)
 {
@@ -109,7 +109,7 @@ crtout(CRTpre *crt, CRTres *res, mpint *x)
 	mpfree(u);
 }
 
-// free the residue
+/* free the residue */
 void
 crtresfree(CRTres *res)
 {
blob - 1ae68c7f61ec951b8d70eaa6acbb189e13e3d33d
blob + 7106076377824eda7f67a2ce7cadffbafd625e16
--- src/libmp/port/crttest.c
+++ src/libmp/port/crttest.c
@@ -11,19 +11,19 @@ testcrt(mpint **p)
 
 	fmtinstall('B', mpconv);
 
-	// get a modulus and a test number
+	/* get a modulus and a test number */
 	m = mpnew(1024+160);
 	mpmul(p[0], p[1], m);
 	x = mpnew(1024+160);
 	mpadd(m, mpone, x);
 
-	// do the precomputation for crt conversion
+	/* do the precomputation for crt conversion */
 	crt = crtpre(2, p);
 
-	// convert x to residues
+	/* convert x to residues */
 	res = crtin(crt, x);
 
-	// convert back
+	/* convert back */
 	y = mpnew(1024+160);
 	crtout(crt, res, y);
 	print("x %B\ny %B\n", x, y);
blob - 50fbf6713f907c90e2f50359c112d34b149cdd24
blob + 95f4196f2c6629e6db3d16ec2b2c9b29bd73ef57
--- src/libmp/port/dat.h
+++ src/libmp/port/dat.h
@@ -1,12 +1,12 @@
 #define	mpdighi  (mpdigit)((ulong)1<<(Dbits-1))
 #define DIGITS(x) ((Dbits - 1 + (x))/Dbits)
 
-// for converting between int's and mpint's
+/* for converting between int's and mpint's */
 #define MAXUINT ((uint)-1)
 #define MAXINT (MAXUINT>>1)
 #define MININT (MAXINT+1)
 
-// for converting between vlongs's and mpint's
+/* for converting between vlongs's and mpint's */
 #define MAXUVLONG (~0ULL)
 #define MAXVLONG (MAXUVLONG>>1)
 #define MINVLONG (MAXVLONG+1ULL)
blob - e23fed21e865b6627ce742aff121fcaf04f79200
blob + 8e494f99550597b498a5740f45f24bd010ca6ad4
--- src/libmp/port/letomp.c
+++ src/libmp/port/letomp.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// convert a little endian byte array (least significant byte first) to an mpint
+/* convert a little endian byte array (least significant byte first) to an mpint */
 mpint*
 letomp(uchar *s, uint n, mpint *b)
 {
blob - 6022a64ef948942844ea339c1209b07a67a133c6
blob + 48112506d7ea8deeba13f17c3960435f3923eb09
--- src/libmp/port/mpadd.c
+++ src/libmp/port/mpadd.c
@@ -2,14 +2,14 @@
 #include <mp.h>
 #include "dat.h"
 
-// sum = abs(b1) + abs(b2), i.e., add the magnitudes
+/* sum = abs(b1) + abs(b2), i.e., add the magnitudes */
 void
 mpmagadd(mpint *b1, mpint *b2, mpint *sum)
 {
 	int m, n;
 	mpint *t;
 
-	// get the sizes right
+	/* get the sizes right */
 	if(b2->top > b1->top){
 		t = b1;
 		b1 = b2;
@@ -34,7 +34,7 @@ mpmagadd(mpint *b1, mpint *b2, mpint *sum)
 	mpnorm(sum);
 }
 
-// sum = b1 + b2
+/* sum = b1 + b2 */
 void
 mpadd(mpint *b1, mpint *b2, mpint *sum)
 {
blob - c395d83707f7d805016fc176cfbf18323dcdd3b8
blob + ef94813a2f6e849ed00b318e57b52ff7eaf283c9
--- src/libmp/port/mpaux.c
+++ src/libmp/port/mpaux.c
@@ -37,7 +37,7 @@ mpint *mpzero = &_mpzero;
 
 static int mpmindigits = 33;
 
-// set minimum digit allocation
+/* set minimum digit allocation */
 void
 mpsetminbits(int n)
 {
@@ -48,7 +48,7 @@ mpsetminbits(int n)
 	mpmindigits = DIGITS(n);
 }
 
-// allocate an n bit 0'd number 
+/* allocate an n bit 0'd number  */
 mpint*
 mpnew(int n)
 {
@@ -72,7 +72,7 @@ mpnew(int n)
 	return b;
 }
 
-// guarantee at least n significant bits
+/* guarantee at least n significant bits */
 void
 mpbits(mpint *b, int m)
 {
@@ -101,7 +101,7 @@ mpfree(mpint *b)
 		return;
 	if(b->flags & MPstatic)
 		sysfatal("freeing mp constant");
-	memset(b->p, 0, b->size*Dbytes);	// information hiding
+	memset(b->p, 0, b->size*Dbytes);	/* information hiding */
 	free(b->p);
 	free(b);
 }
@@ -140,7 +140,7 @@ mpassign(mpint *old, mpint *new)
 	memmove(new->p, old->p, Dbytes*old->top);
 }
 
-// number of significant bits in mantissa
+/* number of significant bits in mantissa */
 int
 mpsignif(mpint *n)
 {
@@ -159,7 +159,7 @@ mpsignif(mpint *n)
 	return 0;
 }
 
-// k, where n = 2**k * q for odd q
+/* k, where n = 2**k * q for odd q */
 int
 mplowbits0(mpint *n)
 {
blob - a2e3cf7245dcff389fc2d296ae1426fade935c92
blob + 7447221229b915917972d6d54f0f630ecc20a6e0
--- src/libmp/port/mpcmp.c
+++ src/libmp/port/mpcmp.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// return neg, 0, pos as abs(b1)-abs(b2) is neg, 0, pos
+/* return neg, 0, pos as abs(b1)-abs(b2) is neg, 0, pos */
 int
 mpmagcmp(mpint *b1, mpint *b2)
 {
@@ -15,7 +15,7 @@ mpmagcmp(mpint *b1, mpint *b2)
 	return mpveccmp(b1->p, b1->top, b2->p, b2->top);
 }
 
-// return neg, 0, pos as b1-b2 is neg, 0, pos
+/* return neg, 0, pos as b1-b2 is neg, 0, pos */
 int
 mpcmp(mpint *b1, mpint *b2)
 {
blob - 4a73bb3a406ef2a9903a8a1f2cf7fff1dc865923
blob + 723127e443ba00e2e951dcb8b942e721544b84fe
--- src/libmp/port/mpdigdiv.c
+++ src/libmp/port/mpdigdiv.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include "dat.h"
 
-//
-//	divide two digits by one and return quotient
-//
+/* */
+/*	divide two digits by one and return quotient */
+/* */
 void
 mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient)
 {
@@ -14,15 +14,15 @@ mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *
 	hi = dividend[1];
 	lo = dividend[0];
 
-	// return highest digit value if the result >= 2**32
+	/* return highest digit value if the result >= 2**32 */
 	if(hi >= divisor || divisor == 0){
 		divisor = 0;
 		*quotient = ~divisor;
 		return;
 	}
 
-	// at this point we know that hi < divisor
-	// just shift and subtract till we're done
+	/* at this point we know that hi < divisor */
+	/* just shift and subtract till we're done */
 	q = 0;
 	x = divisor;
 	for(i = Dbits-1; hi > 0 && i >= 0; i--){
blob - 92aee03f4c40d482d877777bfe5905326ad73415
blob + 90ab4ba5a26318e0c012e45ce303959c97dca843
--- src/libmp/port/mpdiv.c
+++ src/libmp/port/mpdiv.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include "dat.h"
 
-// division ala knuth, seminumerical algorithms, pp 237-238
-// the numbers are stored backwards to what knuth expects so j
-// counts down rather than up.
+/* division ala knuth, seminumerical algorithms, pp 237-238 */
+/* the numbers are stored backwards to what knuth expects so j */
+/* counts down rather than up. */
 
 void
 mpdiv(mpint *dividend, mpint *divisor, mpint *quotient, mpint *remainder)
@@ -13,11 +13,11 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 	mpdigit qd, *up, *vp, *qp;
 	mpint *u, *v, *t;
 
-	// divide bv zero
+	/* divide bv zero */
 	if(divisor->top == 0)
 		abort();
 
-	// quick check
+	/* quick check */
 	if(mpmagcmp(dividend, divisor) < 0){
 		if(remainder != nil)
 			mpassign(dividend, remainder);
@@ -26,8 +26,8 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 		return;
 	}
 
-	// D1: shift until divisor, v, has hi bit set (needed to make trial
-	//     divisor accurate)
+	/* D1: shift until divisor, v, has hi bit set (needed to make trial */
+	/*     divisor accurate) */
 	qd = divisor->p[divisor->top-1];
 	for(s = 0; (qd & mpdighi) == 0; s++)
 		qd <<= 1;
@@ -44,13 +44,13 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 	vp = v->p+v->top-1;
 	vn = v->top;
 
-	// D1a: make sure high digit of dividend is less than high digit of divisor
+	/* D1a: make sure high digit of dividend is less than high digit of divisor */
 	if(*up >= *vp){
 		*++up = 0;
 		u->top++;
 	}
 
-	// storage for multiplies
+	/* storage for multiplies */
 	t = mpnew(4*Dbits);
 
 	qp = nil;
@@ -60,15 +60,15 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 		qp = quotient->p+quotient->top-1;
 	}
 
-	// D2, D7: loop on length of dividend
+	/* D2, D7: loop on length of dividend */
 	for(j = u->top; j > vn; j--){
 
-		// D3: calculate trial divisor
+		/* D3: calculate trial divisor */
 		mpdigdiv(up-1, *vp, &qd);
 
-		// D3a: rule out trial divisors 2 greater than real divisor
+		/* D3a: rule out trial divisors 2 greater than real divisor */
 		if(vn > 1) for(;;){
-			memset(t->p, 0, 3*Dbytes);	// mpvecdigmuladd adds to what's there
+			memset(t->p, 0, 3*Dbytes);	/* mpvecdigmuladd adds to what's there */
 			mpvecdigmuladd(vp-1, 2, qd, t->p);
 			if(mpveccmp(t->p, 3, up-2, 3) > 0)
 				qd--;
@@ -76,21 +76,21 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 				break;
 		}
 
-		// D4: u -= v*qd << j*Dbits
+		/* D4: u -= v*qd << j*Dbits */
 		sign = mpvecdigmulsub(v->p, vn, qd, up-vn);
 		if(sign < 0){
 
-			// D6: trial divisor was too high, add back borrowed
-			//     value and decrease divisor
+			/* D6: trial divisor was too high, add back borrowed */
+			/*     value and decrease divisor */
 			mpvecadd(up-vn, vn+1, v->p, vn, up-vn);
 			qd--;
 		}
 
-		// D5: save quotient digit
+		/* D5: save quotient digit */
 		if(qp != nil)
 			*qp-- = qd;
 
-		// push top of u down one
+		/* push top of u down one */
 		u->top--;
 		*up-- = 0;
 	}
@@ -101,7 +101,7 @@ mpdiv(mpint *dividend, mpint *divisor, mpint *quotient
 	}
 
 	if(remainder != nil){
-		mpright(u, s, remainder);	// u is the remainder shifted
+		mpright(u, s, remainder);	/* u is the remainder shifted */
 		remainder->sign = dividend->sign;
 	}
 
blob - 80b5983bf658978dae5e2fa97b44a7b310fe63d3
blob + dda77eab65665d9982c07405c5073a01753caca6
--- src/libmp/port/mpeuclid.c
+++ src/libmp/port/mpeuclid.c
@@ -1,12 +1,12 @@
 #include "os.h"
 #include <mp.h>
 
-// extended euclid
-//
-// For a and b it solves, d = gcd(a,b) and finds x and y s.t.
-// ax + by = d
-//
-// Handbook of Applied Cryptography, Menezes et al, 1997, pg 67
+/* extended euclid */
+/* */
+/* For a and b it solves, d = gcd(a,b) and finds x and y s.t. */
+/* ax + by = d */
+/* */
+/* Handbook of Applied Cryptography, Menezes et al, 1997, pg 67 */
 
 void
 mpeuclid(mpint *a, mpint *b, mpint *d, mpint *x, mpint *y)
@@ -44,16 +44,16 @@ mpeuclid(mpint *a, mpint *b, mpint *d, mpint *x, mpint
 	r = mpnew(0);
 
 	while(b->top != 0 && b->sign > 0){
-		// q = a/b
-		// r = a mod b
+		/* q = a/b */
+		/* r = a mod b */
 		mpdiv(a, b, q, r);
-		// x0 = x2 - qx1
+		/* x0 = x2 - qx1 */
 		mpmul(q, x1, x0);
 		mpsub(x2, x0, x0);
-		// y0 = y2 - qy1
+		/* y0 = y2 - qy1 */
 		mpmul(q, y1, y0);
 		mpsub(y2, y0, y0);
-		// rotate values
+		/* rotate values */
 		tmp = a;
 		a = b;
 		b = r;
blob - 9ec067cb9b7ba58c8239d4b711a99d89f004f11a
blob + 995ba2809c1e1adba2a8636ac79faa6cf003e78e
--- src/libmp/port/mpexp.c
+++ src/libmp/port/mpexp.c
@@ -2,17 +2,17 @@
 #include <mp.h>
 #include "dat.h"
 
-// res = b**e
-//
-// knuth, vol 2, pp 398-400
+/* res = b**e */
+/* */
+/* knuth, vol 2, pp 398-400 */
 
 enum {
 	Freeb=	0x1,
 	Freee=	0x2,
-	Freem=	0x4,
+	Freem=	0x4
 };
 
-//int expdebug;
+/*int expdebug; */
 
 void
 mpexp(mpint *b, mpint *e, mpint *m, mpint *res)
@@ -47,7 +47,7 @@ mpexp(mpint *b, mpint *e, mpint *m, mpint *res)
 		tofree |= Freem;
 	}
 
-	// skip first bit
+	/* skip first bit */
 	i = e->top-1;
 	d = e->p[i];
 	for(bit = mpdighi; (bit & d) == 0; bit >>= 1)
blob - 413a05c2a8664f127b0cd8543926f164d050c623
blob + 712db1706b322d1ffe93fa443b935a1354bbd4bb
--- src/libmp/port/mpextendedgcd.c
+++ src/libmp/port/mpextendedgcd.c
@@ -3,12 +3,12 @@
 
 #define iseven(a)	(((a)->p[0] & 1) == 0)
 
-// extended binary gcd
-//
-// For a anv b it solves, v = gcd(a,b) and finds x and y s.t.
-// ax + by = v
-//
-// Handbook of Applied Cryptography, Menezes et al, 1997, pg 608.  
+/* extended binary gcd */
+/* */
+/* For a anv b it solves, v = gcd(a,b) and finds x and y s.t. */
+/* ax + by = v */
+/* */
+/* Handbook of Applied Cryptography, Menezes et al, 1997, pg 608.   */
 void
 mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, mpint *y)
 {
@@ -53,7 +53,7 @@ mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, 
 	D = mpcopy(mpone);
 
 	for(;;) {
-//		print("%B %B %B %B %B %B\n", u, v, A, B, C, D);
+/*		print("%B %B %B %B %B %B\n", u, v, A, B, C, D); */
 		while(iseven(u)){
 			mpright(u, 1, u);
 			if(!iseven(A) || !iseven(B)) {
@@ -64,7 +64,7 @@ mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, 
 			mpright(B, 1, B);
 		}
 	
-//		print("%B %B %B %B %B %B\n", u, v, A, B, C, D);
+/*		print("%B %B %B %B %B %B\n", u, v, A, B, C, D); */
 		while(iseven(v)){
 			mpright(v, 1, v);
 			if(!iseven(C) || !iseven(D)) {
@@ -75,7 +75,7 @@ mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, 
 			mpright(D, 1, D);
 		}
 	
-//		print("%B %B %B %B %B %B\n", u, v, A, B, C, D);
+/*		print("%B %B %B %B %B %B\n", u, v, A, B, C, D); */
 		if(mpcmp(u, v) >= 0){
 			mpsub(u, v, u);
 			mpsub(A, C, A);
blob - 0a1fb8159714d4aaf82d40ef13c1ab2e381fabde
blob + 7e34597dd21ae9899d7ab180e04be6d8d51c85ae
--- src/libmp/port/mpfmt.c
+++ src/libmp/port/mpfmt.c
@@ -23,7 +23,7 @@ to32(mpint *b, char *buf, int len)
 	uchar *p;
 	int n, rv;
 
-	// leave room for a multiple of 5 buffer size
+	/* leave room for a multiple of 5 buffer size */
 	n = b->top*Dbytes + 5;
 	p = malloc(n);
 	if(p == nil)
@@ -32,7 +32,7 @@ to32(mpint *b, char *buf, int len)
 	if(n < 0)
 		return -1;
 
-	// round up buffer size, enc32 only accepts a multiple of 5
+	/* round up buffer size, enc32 only accepts a multiple of 5 */
 	if(n%5)
 		n += 5 - (n%5);
 	rv = enc32(buf, len, p, n);
blob - ee2630702501fe70d52978a9007a392f6384ca47
blob + 451b40f1e74b09aa6b20a5d247d53a5b6f96fdde
--- src/libmp/port/mpinvert.c
+++ src/libmp/port/mpinvert.c
@@ -3,12 +3,12 @@
 
 #define iseven(a)	(((a)->p[0] & 1) == 0)
 
-// use extended gcd to find the multiplicative inverse
-// res = b**-1 mod m
+/* use extended gcd to find the multiplicative inverse */
+/* res = b**-1 mod m */
 void
 mpinvert(mpint *b, mpint *m, mpint *res)
 {
-	mpint *dc1, *dc2;	// don't care
+	mpint *dc1, *dc2;	/* don't care */
 
 	dc1 = mpnew(0);
 	dc2 = mpnew(0);
blob - cdcdff74086916b8b6c796bb871e8200837832f0
blob + 6da07d2ef03786b199a1a1e2a60aedd38f968790
--- src/libmp/port/mpleft.c
+++ src/libmp/port/mpleft.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// res = b << shift
+/* res = b << shift */
 void
 mpleft(mpint *b, int shift, mpint *res)
 {
@@ -15,17 +15,17 @@ mpleft(mpint *b, int shift, mpint *res)
 		return;
 	}
 
-	// a negative left shift is a right shift
+	/* a negative left shift is a right shift */
 	if(shift < 0){
 		mpright(b, -shift, res);
 		return;
 	}
 
-	// b and res may be the same so remember the old top
+	/* b and res may be the same so remember the old top */
 	otop = b->top;
 
-	// shift
-	mpbits(res, otop*Dbits + shift);	// overkill
+	/* shift */
+	mpbits(res, otop*Dbits + shift);	/* overkill */
 	res->top = DIGITS(otop*Dbits + shift);
 	d = shift/Dbits;
 	l = shift - d*Dbits;
@@ -46,7 +46,7 @@ mpleft(mpint *b, int shift, mpint *res)
 	for(i = 0; i < d; i++)
 		res->p[i] = 0;
 
-	// normalize
+	/* normalize */
 	while(res->top > 0 && res->p[res->top-1] == 0)
 		res->top--;
 }
blob - 91bebfa2727a66fb200787b700e9ce89a216c93a
blob + 409dd38f423fd8e014d7e0e3527739d249718c15
--- src/libmp/port/mpmod.c
+++ src/libmp/port/mpmod.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include "dat.h"
 
-// remainder = b mod m
-//
-// knuth, vol 2, pp 398-400
+/* remainder = b mod m */
+/* */
+/* knuth, vol 2, pp 398-400 */
 
 void
 mpmod(mpint *b, mpint *m, mpint *remainder)
blob - dedd474a794c1d48008fe057a9720b722e0b0ea8
blob + a6ce9a0b022d4f7c05fbd85397704f644208dcd1
--- src/libmp/port/mpmul.c
+++ src/libmp/port/mpmul.c
@@ -2,18 +2,18 @@
 #include <mp.h>
 #include "dat.h"
 
-//
-//  from knuth's 1969 seminumberical algorithms, pp 233-235 and pp 258-260
-//
-//  mpvecmul is an assembly language routine that performs the inner
-//  loop.
-//
-//  the karatsuba trade off is set empiricly by measuring the algs on
-//  a 400 MHz Pentium II.
-//
+/* */
+/*  from knuth's 1969 seminumberical algorithms, pp 233-235 and pp 258-260 */
+/* */
+/*  mpvecmul is an assembly language routine that performs the inner */
+/*  loop. */
+/* */
+/*  the karatsuba trade off is set empiricly by measuring the algs on */
+/*  a 400 MHz Pentium II. */
+/* */
 
-// karatsuba like (see knuth pg 258)
-// prereq: p is already zeroed
+/* karatsuba like (see knuth pg 258) */
+/* prereq: p is already zeroed */
 static void
 mpkaratsuba(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *p)
 {
@@ -21,7 +21,7 @@ mpkaratsuba(mpdigit *a, int alen, mpdigit *b, int blen
 	int u0len, u1len, v0len, v1len, reslen;
 	int sign, n;
 
-	// divide each piece in half
+	/* divide each piece in half */
 	n = alen/2;
 	if(alen&1)
 		n++;
@@ -39,7 +39,7 @@ mpkaratsuba(mpdigit *a, int alen, mpdigit *b, int blen
 	v0 = b;
 	v1 = b + v0len;
 
-	// room for the partial products
+	/* room for the partial products */
 	t = mallocz(Dbytes*5*(2*n+1), 1);
 	if(t == nil)
 		sysfatal("mpkaratsuba: %r");
@@ -49,7 +49,7 @@ mpkaratsuba(mpdigit *a, int alen, mpdigit *b, int blen
 	res = t + 3*(2*n+1);
 	reslen = 4*n+1;
 
-	// t[0] = (u1-u0)
+	/* t[0] = (u1-u0) */
 	sign = 1;
 	if(mpveccmp(u1, u1len, u0, u0len) < 0){
 		sign = -1;
@@ -57,35 +57,35 @@ mpkaratsuba(mpdigit *a, int alen, mpdigit *b, int blen
 	} else
 		mpvecsub(u1, u1len, u0, u1len, u0v0);
 
-	// t[1] = (v0-v1)
+	/* t[1] = (v0-v1) */
 	if(mpveccmp(v0, v0len, v1, v1len) < 0){
 		sign *= -1;
 		mpvecsub(v1, v1len, v0, v1len, u1v1);
 	} else
 		mpvecsub(v0, v0len, v1, v1len, u1v1);
 
-	// t[4:5] = (u1-u0)*(v0-v1)
+	/* t[4:5] = (u1-u0)*(v0-v1) */
 	mpvecmul(u0v0, u0len, u1v1, v0len, diffprod);
 
-	// t[0:1] = u1*v1
+	/* t[0:1] = u1*v1 */
 	memset(t, 0, 2*(2*n+1)*Dbytes);
 	if(v1len > 0)
 		mpvecmul(u1, u1len, v1, v1len, u1v1);
 
-	// t[2:3] = u0v0
+	/* t[2:3] = u0v0 */
 	mpvecmul(u0, u0len, v0, v0len, u0v0);
 
-	// res = u0*v0<<n + u0*v0
+	/* res = u0*v0<<n + u0*v0 */
 	mpvecadd(res, reslen, u0v0, u0len+v0len, res);
 	mpvecadd(res+n, reslen-n, u0v0, u0len+v0len, res+n);
 
-	// res += u1*v1<<n + u1*v1<<2*n
+	/* res += u1*v1<<n + u1*v1<<2*n */
 	if(v1len > 0){
 		mpvecadd(res+n, reslen-n, u1v1, u1len+v1len, res+n);
 		mpvecadd(res+2*n, reslen-2*n, u1v1, u1len+v1len, res+2*n);
 	}
 
-	// res += (u1-u0)*(v0-v1)<<n
+	/* res += (u1-u0)*(v0-v1)<<n */
 	if(sign < 0)
 		mpvecsub(res+n, reslen-n, diffprod, u0len+v0len, res+n);
 	else
@@ -104,7 +104,7 @@ mpvecmul(mpdigit *a, int alen, mpdigit *b, int blen, m
 	mpdigit d;
 	mpdigit *t;
 
-	// both mpvecdigmuladd and karatsuba are fastest when a is the longer vector
+	/* both mpvecdigmuladd and karatsuba are fastest when a is the longer vector */
 	if(alen < blen){
 		i = alen;
 		alen = blen;
@@ -119,10 +119,10 @@ mpvecmul(mpdigit *a, int alen, mpdigit *b, int blen, m
 	}
 
 	if(alen >= KARATSUBAMIN && blen > 1){
-		// O(n^1.585)
+		/* O(n^1.585) */
 		mpkaratsuba(a, alen, b, blen, p);
 	} else {
-		// O(n^2)
+		/* O(n^2) */
 		for(i = 0; i < blen; i++){
 			d = b[i];
 			if(d != 0)
blob - aaf413b4abdc1ddc481b0700ed5ce59f8b20751c
blob + 95a01ccbf082a38d27d72d92513f4a033f97d84a
--- src/libmp/port/mprand.c
+++ src/libmp/port/mprand.c
@@ -22,7 +22,7 @@ mprand(int bits, void (*gen)(uchar*, int), mpint *b)
 	betomp(p, n*Dbytes, b);
 	free(p);
 
-	// make sure we don't give too many bits
+	/* make sure we don't give too many bits */
 	m = bits%Dbits;
 	n--;
 	if(m > 0){
blob - 03039177b9bc7c35dad68dbefcfe9c6936802b8d
blob + ee661d55aec8890e930e55f7006f88e57daaff29
--- src/libmp/port/mpright.c
+++ src/libmp/port/mpright.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// res = b >> shift
+/* res = b >> shift */
 void
 mpright(mpint *b, int shift, mpint *res)
 {
@@ -15,7 +15,7 @@ mpright(mpint *b, int shift, mpint *res)
 		return;
 	}
 
-	// a negative right shift is a left shift
+	/* a negative right shift is a left shift */
 	if(shift < 0){
 		mpleft(b, -shift, res);
 		return;
@@ -27,13 +27,13 @@ mpright(mpint *b, int shift, mpint *res)
 	r = shift - d*Dbits;
 	l = Dbits - r;
 
-	//  shift all the bits out == zero
+	/*  shift all the bits out == zero */
 	if(d>=b->top){
 		res->top = 0;
 		return;
 	}
 
-	// special case digit shifts
+	/* special case digit shifts */
 	if(r == 0){
 		for(i = 0; i < b->top-d; i++)
 			res->p[i] = b->p[i+d];
blob - 3fe6ca0956efed2b1ab2b2822d120a59d4e65adc
blob + 7976d3a4dd1ebcd259e35803f173788817870274
--- src/libmp/port/mpsub.c
+++ src/libmp/port/mpsub.c
@@ -2,14 +2,14 @@
 #include <mp.h>
 #include "dat.h"
 
-// diff = abs(b1) - abs(b2), i.e., subtract the magnitudes
+/* diff = abs(b1) - abs(b2), i.e., subtract the magnitudes */
 void
 mpmagsub(mpint *b1, mpint *b2, mpint *diff)
 {
 	int n, m, sign;
 	mpint *t;
 
-	// get the sizes right
+	/* get the sizes right */
 	if(mpmagcmp(b1, b2) < 0){
 		sign = -1;
 		t = b1;
@@ -32,7 +32,7 @@ mpmagsub(mpint *b1, mpint *b2, mpint *diff)
 	mpnorm(diff);
 }
 
-// diff = b1 - b2
+/* diff = b1 - b2 */
 void
 mpsub(mpint *b1, mpint *b2, mpint *diff)
 {
blob - e08ae56bebbb9c14819a5b7b34160a03a334577a
blob + d49225e9edbc4bd91bfb4ebf111b82c12134d529
--- src/libmp/port/mptobe.c
+++ src/libmp/port/mptobe.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include "dat.h"
 
-// convert an mpint into a big endian byte array (most significant byte first)
-//   return number of bytes converted
-//   if p == nil, allocate and result array
+/* convert an mpint into a big endian byte array (most significant byte first) */
+/*   return number of bytes converted */
+/*   if p == nil, allocate and result array */
 int
 mptobe(mpint *b, uchar *p, uint n, uchar **pp)
 {
@@ -22,7 +22,7 @@ mptobe(mpint *b, uchar *p, uint n, uchar **pp)
 		*pp = p;
 	memset(p, 0, n);
 
-	// special case 0
+	/* special case 0 */
 	if(b->top == 0){
 		if(n < 1)
 			return -1;
@@ -46,7 +46,7 @@ mptobe(mpint *b, uchar *p, uint n, uchar **pp)
 		}
 	}
 
-	// guarantee at least one byte
+	/* guarantee at least one byte */
 	if(s == p){
 		if(p >= e)
 			return -1;
blob - 9421d5f6602e8a0d65fc2e226babce4e4d1e8f29
blob + 0b676ef658983b7ede806db51bab06c141146302
--- src/libmp/port/mptole.c
+++ src/libmp/port/mptole.c
@@ -2,10 +2,10 @@
 #include <mp.h>
 #include "dat.h"
 
-// convert an mpint into a little endian byte array (least significant byte first)
+/* convert an mpint into a little endian byte array (least significant byte first) */
 
-//   return number of bytes converted
-//   if p == nil, allocate and result array
+/*   return number of bytes converted */
+/*   if p == nil, allocate and result array */
 int
 mptole(mpint *b, uchar *p, uint n, uchar **pp)
 {
@@ -23,7 +23,7 @@ mptole(mpint *b, uchar *p, uint n, uchar **pp)
 		return -1;
 	memset(p, 0, n);
 
-	// special case 0
+	/* special case 0 */
 	if(b->top == 0){
 		if(n < 1)
 			return -1;
blob - 98fdcc901b65753e3eda212c4c0837d146461b87
blob + d0fe174403421be9024b916fa7ff9b7c128df8f4
--- src/libmp/port/mpvecadd.c
+++ src/libmp/port/mpvecadd.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// prereq: alen >= blen, sum has at least blen+1 digits
+/* prereq: alen >= blen, sum has at least blen+1 digits */
 void
 mpvecadd(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *sum)
 {
blob - 28d4205a84b0c4c5ba1a5dfcbc6c874da37ed19a
blob + 909314f002484d9d41f24030cc324564ce95d3ef
--- src/libmp/port/mpvecdigmuladd.c
+++ src/libmp/port/mpvecdigmuladd.c
@@ -11,19 +11,19 @@ mpdigmul(mpdigit a, mpdigit b, mpdigit *p)
 	mpdigit x, ah, al, bh, bl, p1, p2, p3, p4;
 	int carry;
 
-	// half digits
+	/* half digits */
 	ah = HI(a);
 	al = LO(a);
 	bh = HI(b);
 	bl = LO(b);
 
-	// partial products
+	/* partial products */
 	p1 = ah*bl;
 	p2 = bh*al;
 	p3 = bl*al;
 	p4 = ah*bh;
 
-	// p = ((p1+p2)<<(Dbits/2)) + (p4<<Dbits) + p3
+	/* p = ((p1+p2)<<(Dbits/2)) + (p4<<Dbits) + p3 */
 	carry = 0;
 	x = p1<<(Dbits/2);
 	p3 += x;
@@ -33,12 +33,12 @@ mpdigmul(mpdigit a, mpdigit b, mpdigit *p)
 	p3 += x;
 	if(p3 < x)
 		carry++;
-	p4 += carry + HI(p1) + HI(p2);	// can't carry out of the high digit
+	p4 += carry + HI(p1) + HI(p2);	/* can't carry out of the high digit */
 	p[0] = p3;
 	p[1] = p4;
 }
 
-// prereq: p must have room for n+1 digits
+/* prereq: p must have room for n+1 digits */
 void
 mpvecdigmuladd(mpdigit *b, int n, mpdigit m, mpdigit *p)
 {
@@ -66,7 +66,7 @@ mpvecdigmuladd(mpdigit *b, int n, mpdigit m, mpdigit *
 	*p = part[1] + carry;
 }
 
-// prereq: p must have room for n+1 digits
+/* prereq: p must have room for n+1 digits */
 int
 mpvecdigmulsub(mpdigit *b, int n, mpdigit m, mpdigit *p)
 {
blob - db93b65bba5496f0fe15dc4a483ace3bb059fd66
blob + 818d729df5a97fc474019db3f3c5a29468f8a7e2
--- src/libmp/port/mpvecsub.c
+++ src/libmp/port/mpvecsub.c
@@ -2,7 +2,7 @@
 #include <mp.h>
 #include "dat.h"
 
-// prereq: a >= b, alen >= blen, diff has at least alen digits
+/* prereq: a >= b, alen >= blen, diff has at least alen digits */
 void
 mpvecsub(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit *diff)
 {
blob - e84db7998e4220ba164793d13c8a6804c082e2bf
blob + 5dced61b869880ea3de7d7bd6011b396b67980af
--- src/libmp/port/strtomp.c
+++ src/libmp/port/strtomp.c
@@ -84,7 +84,7 @@ from10(char *a, mpint *b)
 
 	b->top = 0;
 	for(;;){
-		// do a billion at a time in native arithmetic
+		/* do a billion at a time in native arithmetic */
 		x = 0;
 		for(i = 0; i < 9; i++){
 			y = tab.t10[*(uchar*)a];
@@ -97,7 +97,7 @@ from10(char *a, mpint *b)
 		if(i == 0)
 			break;
 
-		// accumulate into mpint
+		/* accumulate into mpint */
 		uitomp(mppow10[i], pow);
 		uitomp(x, r);
 		mpmul(b, pow, b);
@@ -191,7 +191,7 @@ strtomp(char *a, char **pp, int base, mpint *b)
 		break;
 	}
 
-	// if no characters parsed, there wasn't a number to convert
+	/* if no characters parsed, there wasn't a number to convert */
 	if(e == a)
 		return nil;
 
blob - 90c1cfccdcc740627d86f80aae6c5cc2f8cdb603
blob + e6438b019d8990dec8c7e898712def5edf64a989
--- src/libmux/mux.c
+++ src/libmux/mux.c
@@ -44,7 +44,7 @@ muxrpc(Mux *mux, void *tx)
 	/* assign the tag, add selves to response queue */
 	qlock(&mux->lk);
 	tag = gettag(mux, r);
-//print("gettag %p %d\n", r, tag);
+/*print("gettag %p %d\n", r, tag); */
 	enqueue(mux, r);
 	qunlock(&mux->lk);
 
@@ -77,7 +77,7 @@ muxrpc(Mux *mux, void *tx)
 				tag = mux->gettag(mux, p) - mux->mintag;
 			else
 				tag = ~0;
-//print("mux tag %d\n", tag);
+/*print("mux tag %d\n", tag); */
 			qlock(&mux->lk);
 			if(p == nil){	/* eof -- just give up and pass the buck */
 				dequeue(mux, r);
@@ -105,7 +105,7 @@ muxrpc(Mux *mux, void *tx)
 		if(mux->sleep.next != &mux->sleep)
 			rwakeup(&mux->sleep.next->r);
 	}
-//print("finished %p\n", r);
+/*print("finished %p\n", r); */
 	p = r->p;
 	puttag(mux, r);
 	qunlock(&mux->lk);
blob - 701d63ebc87c3bed690a5e117d7f261ca00365a2
blob + 80dbc35b4c9e50950459d3d61b11918ba20b2237
--- src/libndb/ndbcache.c
+++ src/libndb/ndbcache.c
@@ -14,7 +14,7 @@ struct Ndbcache
 
 enum
 {
-	Maxcached=	128,
+	Maxcached=	128
 };
 
 static void
blob - a6965cdbc8f4b19a0da46e368e6317daf82b3f34
blob + 4f9cb4b644031c89817dd43b0b189989197b5af1
--- src/libndb/ndbhash.c
+++ src/libndb/ndbhash.c
@@ -7,7 +7,7 @@
 enum {
 	Dptr,	/* pointer to database file */
 	Cptr,	/* pointer to first chain entry */
-	Cptr1,	/* pointer to second chain entry */
+	Cptr1	/* pointer to second chain entry */
 };
 
 /*
blob - a860c8b72943987de2927fad67a0ef4db83c79b9
blob + 29dd4df1e2db8681dc75401c45633581309b21da
--- src/libndb/ndbipinfo.c
+++ src/libndb/ndbipinfo.c
@@ -7,8 +7,8 @@
 enum
 {
 	Ffound=	1<<0,
-	Fignore=1<<1,
-	Faddr=	1<<2,
+	Fignore=	1<<1,
+	Faddr=	1<<2
 };
 
 static Ndbtuple*	filter(Ndb *db, Ndbtuple *t, Ndbtuple *f);
blob - 8d3bf7b6ac683f471c25126aff1db7d493dd0fc6
blob + b9661be1c22845ce90336351a1e597afc6a674ea
--- src/libndb/sysdnsquery.c
+++ src/libndb/sysdnsquery.c
@@ -134,8 +134,7 @@ enum
 	Chs,		/* Hesiod (?) */
 
 	/* class queries (all class types are also queries) */
-	Call=	255,	/* all classes */
-
+	Call=	255	/* all classes */
 };
 
 
blob - 144aaf69ef0164a1327111a0da4dd90dd82470db
blob + 9cbb6bd90a6341a60b1e7a344f40bbbb112e2389
--- src/libsec/port/aes.c
+++ src/libsec/port/aes.c
@@ -63,12 +63,12 @@ setupAESstate(AESstate *s, uchar key[], int keybytes, 
 		memmove(s->ivec, ivec, AESbsize);
 	if(keybytes==16 || keybytes==24 || keybytes==32)
 		s->setup = 0xcafebabe;
-	// else rijndaelKeySetup was invalid
+	/* else rijndaelKeySetup was invalid */
 }
 
-// Define by analogy with desCBCencrypt;  AES modes are not standardized yet.
-// Because of the way that non-multiple-of-16 buffers are handled,
-// the decryptor must be fed buffers of the same size as the encryptor.
+/* Define by analogy with desCBCencrypt;  AES modes are not standardized yet. */
+/* Because of the way that non-multiple-of-16 buffers are handled, */
+/* the decryptor must be fed buffers of the same size as the encryptor. */
 void
 aesCBCencrypt(uchar *p, int len, AESstate *s)
 {
blob - 5dcc677c70cc68df16db14278e1b4882bded43f3
blob + 0eed2939ae04cd51a331ba43111275bbb6398f94
--- src/libsec/port/blowfish.c
+++ src/libsec/port/blowfish.c
@@ -2,10 +2,10 @@
 #include <mp.h>
 #include <libsec.h>
 
-// Blowfish block cipher.  See:
-// 	Lecture Notes in Computer Science 809
-// 	Fast Software Encryption
-// 	Cambridge Security Workshop, Cambridge, England (1993)
+/* Blowfish block cipher.  See: */
+/* 	Lecture Notes in Computer Science 809 */
+/* 	Fast Software Encryption */
+/* 	Cambridge Security Workshop, Cambridge, England (1993) */
 
 static u32int sbox[1024];
 static u32int pbox[BFrounds+2];
blob - 2632930043ac77dbd32e4b562600f2b7d699fb54
blob + 2d830bac730213f22ea4c15e0f75eb566c9edcdd
--- src/libsec/port/des3CBC.c
+++ src/libsec/port/des3CBC.c
@@ -2,14 +2,14 @@
 #include <mp.h>
 #include <libsec.h>
 
-// Because of the way that non multiple of 8
-// buffers are handled, the decryptor must
-// be fed buffers of the same size as the
-// encryptor
+/* Because of the way that non multiple of 8 */
+/* buffers are handled, the decryptor must */
+/* be fed buffers of the same size as the */
+/* encryptor */
 
 
-// If the length is not a multiple of 8, I encrypt
-// the overflow to be compatible with lacy's cryptlib
+/* If the length is not a multiple of 8, I encrypt */
+/* the overflow to be compatible with lacy's cryptlib */
 void
 des3CBCencrypt(uchar *p, int len, DES3state *s)
 {
blob - 324254b194924811421d27b3c607967d5ee2c088
blob + a03d7044e754b0cc419c4e6822ee569726793b0f
--- src/libsec/port/des3ECB.c
+++ src/libsec/port/des3ECB.c
@@ -2,10 +2,10 @@
 #include <mp.h>
 #include <libsec.h>
 
-// I wasn't sure what to do when the buffer was not
-// a multiple of 8.  I did what lacy's cryptolib did
-// to be compatible, but it looks dangerous to me
-// since its encrypting plain text with the key. -- presotto
+/* I wasn't sure what to do when the buffer was not */
+/* a multiple of 8.  I did what lacy's cryptolib did */
+/* to be compatible, but it looks dangerous to me */
+/* since its encrypting plain text with the key. -- presotto */
 
 void
 des3ECBencrypt(uchar *p, int len, DES3state *s)
blob - ecee29e80f24dee5ece79249f4540421c6a8f74d
blob + eaba07ed4191fc57b9fea70c78ed45bb7fd26088
--- src/libsec/port/desCBC.c
+++ src/libsec/port/desCBC.c
@@ -2,14 +2,14 @@
 #include <mp.h>
 #include <libsec.h>
 
-// Because of the way that non multiple of 8
-// buffers are handled, the decryptor must
-// be fed buffers of the same size as the
-// encryptor
+/* Because of the way that non multiple of 8 */
+/* buffers are handled, the decryptor must */
+/* be fed buffers of the same size as the */
+/* encryptor */
 
 
-// If the length is not a multiple of 8, I encrypt
-// the overflow to be compatible with lacy's cryptlib
+/* If the length is not a multiple of 8, I encrypt */
+/* the overflow to be compatible with lacy's cryptlib */
 void
 desCBCencrypt(uchar *p, int len, DESstate *s)
 {
blob - a9ad00185c192656f4ab426ad74104e8ccb2b12d
blob + 0bc3414193cecfa278567ac11bef186dcf962c93
--- src/libsec/port/desECB.c
+++ src/libsec/port/desECB.c
@@ -2,10 +2,10 @@
 #include <mp.h>
 #include <libsec.h>
 
-// I wasn't sure what to do when the buffer was not
-// a multiple of 8.  I did what lacy's cryptolib did
-// to be compatible, but it looks dangerous to me
-// since its encrypting plain text with the key. -- presotto
+/* I wasn't sure what to do when the buffer was not */
+/* a multiple of 8.  I did what lacy's cryptolib did */
+/* to be compatible, but it looks dangerous to me */
+/* since its encrypting plain text with the key. -- presotto */
 
 void
 desECBencrypt(uchar *p, int len, DESstate *s)
blob - 46c369e143c99bff954284ab887d945c1fb68dfd
blob + cf35f0436d2db7fe79d385c835ecc7e8d25f9d3e
--- src/libsec/port/dsagen.c
+++ src/libsec/port/dsagen.c
@@ -29,9 +29,9 @@ dsagen(DSApub *opub)
 	pub->key = mpnew(0);
 	priv->secret = mpnew(0);
 
-	// find a generator alpha of the multiplicative
-	// group Z*p, i.e., of order n = p-1.  We use the
-	// fact that q divides p-1 to reduce the exponent.
+	/* find a generator alpha of the multiplicative */
+	/* group Z*p, i.e., of order n = p-1.  We use the */
+	/* fact that q divides p-1 to reduce the exponent. */
 	exp = mpnew(0);
 	g = mpnew(0);
 	r = mpnew(0);
@@ -49,7 +49,7 @@ dsagen(DSApub *opub)
 	mpfree(g);
 	mpfree(exp);
 
-	// create the secret key
+	/* create the secret key */
 	mprand(bits, genrandom, priv->secret);
 	mpmod(priv->secret, pub->p, priv->secret);
 	mpexp(pub->alpha, priv->secret, pub->p, pub->key);
blob - ff1dd5d87dffe3cb68a30d6087dff4e883feebf1
blob + 72546f15e25ecf8d40b4fff1cb8c9e579897547e
--- src/libsec/port/dsaprimes.c
+++ src/libsec/port/dsaprimes.c
@@ -2,12 +2,12 @@
 #include <mp.h>
 #include <libsec.h>
 
-// NIST algorithm for generating DSA primes
-// Menezes et al (1997) Handbook of Applied Cryptography, p.151
-// q is a 160-bit prime;  p is a 1024-bit prime;  q divides p-1
+/* NIST algorithm for generating DSA primes */
+/* Menezes et al (1997) Handbook of Applied Cryptography, p.151 */
+/* q is a 160-bit prime;  p is a 1024-bit prime;  q divides p-1 */
 
-// arithmetic on unsigned ints mod 2**160, represented
-//    as 20-byte, little-endian uchar array
+/* arithmetic on unsigned ints mod 2**160, represented */
+/*    as 20-byte, little-endian uchar array */
 
 static void
 Hrand(uchar *s)
@@ -29,7 +29,7 @@ Hincr(uchar *s)
 			break;
 }
 
-// this can run for quite a while;  be patient
+/* this can run for quite a while;  be patient */
 void
 DSAprimes(mpint *q, mpint *p, uchar seed[SHA1dlen])
 {
@@ -58,7 +58,7 @@ forever:
 		Hs[19] |= 0x80;
 		letomp(Hs, 20, q);
 	}while(!probably_prime(q, 18));
-	if(seed != nil)	// allow skeptics to confirm computation
+	if(seed != nil)	/* allow skeptics to confirm computation */
 		memmove(seed, s, SHA1dlen);
 	i = 0;
 	j = 2;
blob - 137134be01f7869a254c31b9ddb9405c213cc1b7
blob + c33024994805a7939563887b3363b781a3d6bde0
--- src/libsec/port/dsasign.c
+++ src/libsec/port/dsasign.c
@@ -18,7 +18,7 @@ dsasign(DSApriv *priv, mpint *m)
 	k = mpnew(0);
 	mpsub(pub->q, mpone, qm1);
 
-	// find a k that has an inverse mod q
+	/* find a k that has an inverse mod q */
 	while(1){
 		mprand(qlen, genrandom, k);
 		if((mpcmp(mpone, k) > 0) || (mpcmp(k, pub->q) >= 0))
@@ -29,14 +29,14 @@ dsasign(DSApriv *priv, mpint *m)
 		break;
 	}
 
-  	// make kinv positive
+  	/* make kinv positive */
 	mpmod(kinv, pub->q, kinv);
 
-	// r = ((alpha**k) mod p) mod q
+	/* r = ((alpha**k) mod p) mod q */
 	mpexp(alpha, k, p, r);
 	mpmod(r, q, r);
 
-	// s = (kinv*(m + ar)) mod q
+	/* s = (kinv*(m + ar)) mod q */
 	mpmul(r, priv->secret, s);
 	mpadd(s, m, s);
 	mpmul(s, kinv, s);
blob - 70e7f3cb8a2c6a3040bb1b56a0590be1a9831205
blob + 93310b971cd5bf17dabac030758d1822f4bff3f3
--- src/libsec/port/dsaverify.c
+++ src/libsec/port/dsaverify.c
@@ -17,18 +17,18 @@ dsaverify(DSApub *pub, DSAsig *sig, mpint *m)
 	v = mpnew(0);
 	sinv = mpnew(0);
 
-	// find (s**-1) mod q, make sure it exists
+	/* find (s**-1) mod q, make sure it exists */
 	mpextendedgcd(sig->s, pub->q, u1, sinv, v);
 	if(mpcmp(u1, mpone) != 0)
 		goto out;
 
-	// u1 = (sinv * m) mod q, u2 = (r * sinv) mod q
+	/* u1 = (sinv * m) mod q, u2 = (r * sinv) mod q */
 	mpmul(sinv, m, u1);
 	mpmod(u1, pub->q, u1);
 	mpmul(sig->r, sinv, u2);
 	mpmod(u2, pub->q, u2);
 
-	// v = (((alpha**u1)*(key**u2)) mod p) mod q
+	/* v = (((alpha**u1)*(key**u2)) mod p) mod q */
 	mpexp(pub->alpha, u1, pub->p, sinv);
 	mpexp(pub->key, u2, pub->p, v);
 	mpmul(sinv, v, v);
blob - 9b6b12c6c2901340c3959a25feee4ae4e20e30b8
blob + 646e7e20a141833cb271e0023f2a1069ebb827ed
--- src/libsec/port/egencrypt.c
+++ src/libsec/port/egencrypt.c
@@ -9,7 +9,7 @@ egencrypt(EGpub *pub, mpint *in, mpint *out)
 	mpint *p = pub->p, *alpha = pub->alpha;
 	int plen = mpsignif(p);
 	int shift = ((plen+Dbits)/Dbits)*Dbits;
-	// in libcrypt version, (int)(LENGTH(pub->p)*sizeof(NumType)*CHARBITS);
+	/* in libcrypt version, (int)(LENGTH(pub->p)*sizeof(NumType)*CHARBITS); */
 
 	if(out == nil)
 		out = mpnew(0);
blob - 10540041c0add8221f63ae3a6418f9a49dec0ec7
blob + ce95228ba42c8c462ca1746de9e1ac894acc83f7
--- src/libsec/port/egsign.c
+++ src/libsec/port/egsign.c
@@ -26,7 +26,7 @@ egsign(EGpriv *priv, mpint *m)
 			continue;
 		break;
 	}
-	mpmod(kinv, pm1, kinv);  // make kinv positive
+	mpmod(kinv, pm1, kinv);  /* make kinv positive */
 	mpexp(alpha, k, p, r);
 	mpmul(priv->secret, r, s);
 	mpmod(s, pm1, s);
blob - c0e16d92b5652326eb66e865ac2fcc3377f648d8
blob + 25a3f0e2f2708968676dac0341dc2ecd5c0d5c2f
--- src/libsec/port/genprime.c
+++ src/libsec/port/genprime.c
@@ -2,13 +2,13 @@
 #include <mp.h>
 #include <libsec.h>
 
-//  generate a probable prime.  accuracy is the miller-rabin interations
+/*  generate a probable prime.  accuracy is the miller-rabin interations */
 void
 genprime(mpint *p, int n, int accuracy)
 {
 	mpdigit x;
 
-	// generate n random bits with high and low bits set
+	/* generate n random bits with high and low bits set */
 	mpbits(p, n);
 	genrandom((uchar*)p->p, (n+7)/8);
 	p->top = (n+Dbits-1)/Dbits;
@@ -18,7 +18,7 @@ genprime(mpint *p, int n, int accuracy)
 	p->p[p->top-1] |= x;
 	p->p[0] |= 1;
 
-	// keep icrementing till it looks prime
+	/* keep icrementing till it looks prime */
 	for(;;){
 		if(probably_prime(p, accuracy))
 			break;
blob - e95c94c995a3257a3cda22ce22b1cbbaaf004212
blob + 0a069b45854b310480a66a92b9be4228b0a7a528
--- src/libsec/port/gensafeprime.c
+++ src/libsec/port/gensafeprime.c
@@ -2,8 +2,8 @@
 #include <mp.h>
 #include <libsec.h>
 
-// find a prime p of length n and a generator alpha of Z^*_p
-// Alg 4.86 Menezes et al () Handbook, p.164
+/* find a prime p of length n and a generator alpha of Z^*_p */
+/* Alg 4.86 Menezes et al () Handbook, p.164 */
 void
 gensafeprime(mpint *p, mpint *alpha, int n, int accuracy)
 {
@@ -13,12 +13,12 @@ gensafeprime(mpint *p, mpint *alpha, int n, int accura
 	while(1){
 		genprime(q, n-1, accuracy);
 		mpleft(q, 1, p);
-		mpadd(p, mpone, p); // p = 2*q+1
+		mpadd(p, mpone, p); /* p = 2*q+1 */
 		if(probably_prime(p, accuracy))
 			break;
 	}
-	// now find a generator alpha of the multiplicative
-	// group Z*_p of order p-1=2q
+	/* now find a generator alpha of the multiplicative */
+	/* group Z*_p of order p-1=2q */
 	b = mpnew(0);
 	while(1){
 		mprand(n, genrandom, alpha);
blob - 27c43a96688043af7888120942394a35b819a355
blob + 6ac4fa3324da2573feafbaac1af55354fa05d909
--- src/libsec/port/genstrongprime.c
+++ src/libsec/port/genstrongprime.c
@@ -2,8 +2,8 @@
 #include <mp.h>
 #include <libsec.h>
 
-// Gordon's algorithm for generating a strong prime
-//	Menezes et al () Handbook, p.150
+/* Gordon's algorithm for generating a strong prime */
+/*	Menezes et al () Handbook, p.150 */
 void
 genstrongprime(mpint *p, int n, int accuracy)
 {
@@ -17,20 +17,20 @@ genstrongprime(mpint *p, int n, int accuracy)
 	t = mpnew(n/2);
 	genprime(t, n-mpsignif(s)-32, accuracy);
 
-	// first r = 2it + 1 that's prime
+	/* first r = 2it + 1 that's prime */
 	i = mpnew(16);
 	r = mpnew(0);
 	itomp(0x8000, i);
-	mpleft(t, 1, t);	// 2t
-	mpmul(i, t, r);		// 2it
-	mpadd(r, mpone, r);	// 2it + 1
+	mpleft(t, 1, t);	/* 2t */
+	mpmul(i, t, r);		/* 2it */
+	mpadd(r, mpone, r);	/* 2it + 1 */
 	for(;;){
 		if(probably_prime(r, 18))
 			break;
-		mpadd(r, t, r);	// r += 2t
+		mpadd(r, t, r);	/* r += 2t */
 	}
 
-	// p0 = 2(s**(r-2) mod r)s - 1
+	/* p0 = 2(s**(r-2) mod r)s - 1 */
 	itomp(2, p);
 	mpsub(r, p, p);
 	mpexp(s, p, r, p);
@@ -38,16 +38,16 @@ genstrongprime(mpint *p, int n, int accuracy)
 	mpleft(p, 1, p);
 	mpsub(p, mpone, p);
 
-	// first p = p0 + 2irs that's prime
+	/* first p = p0 + 2irs that's prime */
 	itomp(0x8000, i);
-	mpleft(r, 1, r);	// 2r
-	mpmul(r, s, r);		// 2rs
-	mpmul(r, i, i);		// 2irs
-	mpadd(p, i, p);		// p0 + 2irs
+	mpleft(r, 1, r);	/* 2r */
+	mpmul(r, s, r);		/* 2rs */
+	mpmul(r, i, i);		/* 2irs */
+	mpadd(p, i, p);		/* p0 + 2irs */
 	for(;;){
 		if(probably_prime(p, accuracy))
 			break;
-		mpadd(p, r, p); // p += 2rs
+		mpadd(p, r, p); /* p += 2rs */
 	}
 
 	mpfree(i);
blob - c4a2f32d292a3cc3b428eafe060676d65d92dab5
blob + dc4a8c2a87569c38dd4513e3492137cb2f40a245
--- src/libsec/port/md4.c
+++ src/libsec/port/md4.c
@@ -24,7 +24,7 @@ enum
 	S31=	3,
 	S32=	9,
 	S33=	11,
-	S34=	15,
+	S34=	15
 };
 
 typedef struct MD4Table MD4Table;
blob - 2d082e64fb15f845de278df193d57cd472d230b2
blob + 405b906ce26843475aeda881ec7a488b364779d4
--- src/libsec/port/primetest.c
+++ src/libsec/port/primetest.c
@@ -11,9 +11,9 @@ main(void)
 	mpint *nine = mpnew(0);
 
 	fmtinstall('B', mpconv);
-	strtomp("2492491", nil, 16, z);	// 38347921 = x*y = (2**28-9)/7, 
-				//    an example of 3**(n-1)=1 mod n
-	strtomp("15662C00E811", nil, 16, p);// 23528569104401, a prime
+	strtomp("2492491", nil, 16, z);	/* 38347921 = x*y = (2**28-9)/7,  */
+				/*    an example of 3**(n-1)=1 mod n */
+	strtomp("15662C00E811", nil, 16, p);/* 23528569104401, a prime */
 	uitomp(9, nine);
 
 	if(probably_prime(z, 5) == 1)
@@ -29,13 +29,13 @@ main(void)
 	exits(0);
 }
 
-// example output, checked with Maple:
-// seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E
-// q=E0F0EF284E10796C5A2A511E94748BA03C795C13
-//  = 1284186945063585093695748280224501481698995297299
-// p=C41CFBE4D4846F67A3DF7DE9921A49D3B42DC33728427AB159CEC8CBBDB12B5F0C244F1A734AEB9840804EA3C25036AD1B61AFF3ABBC247CD4B384224567A863A6F020E7EE9795554BCD08ABAD7321AF27E1E92E3DB1C6E7E94FAAE590AE9C48F96D93D178E809401ABE8A534A1EC44359733475A36A70C7B425125062B1142D
-//  = 137715385439333164327584575331308277462546592976152006175830654712456008630139443747529133857837818585400418619916530061955288983751958831927807888408309879880101870216437711393638413509484569804814373511469405934988856674935304074081350525593807908358867354528898618574659752879015380013845760006721861915693
-// r=DF310F4E54A5FEC5D86D3E14863921E834113E060F90052AD332B3241CEF2497EFA0303D6344F7C819691A0F9C4A773815AF8EAECFB7EC1D98F039F17A32A7E887D97251A927D093F44A55577F4D70444AEBD06B9B45695EC23962B175F266895C67D21C4656848614D888A4
-//  = 107239359478548771267308764204625458348785444483302647285245969203446101233421655396874997253111222983406676955642093641709149748793954493558324738441197139556917622937892491175016280660608595599724194374948056515856812347094848443460715881455884639869144172708
-// g=2F1C308DC46B9A44B52DF7DACCE1208CCEF72F69C743ADD4D2327173444ED6E65E074694246E07F9FD4AE26E0FDDD9F54F813C40CB9BCD4338EA6F242AB94CD410E676C290368A16B1A3594877437E516C53A6EEE5493A038A017E955E218E7819734E3E2A6E0BAE08B14258F8C03CC1B30E0DDADFCF7CEDF0727684D3D255F1
-//  = 33081848392740465806285326014906437543653045153885419334085917570615301913274531387168723847139029827598735376746057461417880810924280288611116213062512408829164220104555543445909528701551198146080221790002337033997295756585193926863581671466708482411159477816144226847280417522524922667065714073338662508017
+/* example output, checked with Maple: */
+/* seed EB7B6E35F7CD37B511D96C67D6688CC4DD440E1E */
+/* q=E0F0EF284E10796C5A2A511E94748BA03C795C13 */
+/*  = 1284186945063585093695748280224501481698995297299 */
+/* p=C41CFBE4D4846F67A3DF7DE9921A49D3B42DC33728427AB159CEC8CBBDB12B5F0C244F1A734AEB9840804EA3C25036AD1B61AFF3ABBC247CD4B384224567A863A6F020E7EE9795554BCD08ABAD7321AF27E1E92E3DB1C6E7E94FAAE590AE9C48F96D93D178E809401ABE8A534A1EC44359733475A36A70C7B425125062B1142D */
+/*  = 137715385439333164327584575331308277462546592976152006175830654712456008630139443747529133857837818585400418619916530061955288983751958831927807888408309879880101870216437711393638413509484569804814373511469405934988856674935304074081350525593807908358867354528898618574659752879015380013845760006721861915693 */
+/* r=DF310F4E54A5FEC5D86D3E14863921E834113E060F90052AD332B3241CEF2497EFA0303D6344F7C819691A0F9C4A773815AF8EAECFB7EC1D98F039F17A32A7E887D97251A927D093F44A55577F4D70444AEBD06B9B45695EC23962B175F266895C67D21C4656848614D888A4 */
+/*  = 107239359478548771267308764204625458348785444483302647285245969203446101233421655396874997253111222983406676955642093641709149748793954493558324738441197139556917622937892491175016280660608595599724194374948056515856812347094848443460715881455884639869144172708 */
+/* g=2F1C308DC46B9A44B52DF7DACCE1208CCEF72F69C743ADD4D2327173444ED6E65E074694246E07F9FD4AE26E0FDDD9F54F813C40CB9BCD4338EA6F242AB94CD410E676C290368A16B1A3594877437E516C53A6EEE5493A038A017E955E218E7819734E3E2A6E0BAE08B14258F8C03CC1B30E0DDADFCF7CEDF0727684D3D255F1 */
+/*  = 33081848392740465806285326014906437543653045153885419334085917570615301913274531387168723847139029827598735376746057461417880810924280288611116213062512408829164220104555543445909528701551198146080221790002337033997295756585193926863581671466708482411159477816144226847280417522524922667065714073338662508017 */
blob - fc2e508aafa60ec2577e15f563af50fb69aa3dbd
blob + 75b3f6bfcbb9b2167a0d576b74264eb21d6efb5e
--- src/libsec/port/prng.c
+++ src/libsec/port/prng.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include <libsec.h>
 
-//
-//  just use the libc prng to fill a buffer
-//
+/* */
+/*  just use the libc prng to fill a buffer */
+/* */
 void
 prng(uchar *p, int n)
 {
blob - 4eaccbad322d2a1d992dc969749459a310c8be38
blob + beb032517b22f13658bd9a1d4b3c2e173b1c30a8
--- src/libsec/port/probably_prime.c
+++ src/libsec/port/probably_prime.c
@@ -2,10 +2,10 @@
 #include <mp.h>
 #include <libsec.h>
 
-// Miller-Rabin probabilistic primality testing
-//	Knuth (1981) Seminumerical Algorithms, p.379
-//	Menezes et al () Handbook, p.39
-// 0 if composite; 1 if almost surely prime, Pr(err)<1/4**nrep
+/* Miller-Rabin probabilistic primality testing */
+/*	Knuth (1981) Seminumerical Algorithms, p.379 */
+/*	Menezes et al () Handbook, p.39 */
+/* 0 if composite; 1 if almost surely prime, Pr(err)<1/4**nrep */
 int
 probably_prime(mpint *n, int nrep)
 {
@@ -19,18 +19,18 @@ probably_prime(mpint *n, int nrep)
 		nrep = 18;
 
 	k = mptoi(n);
-	if(k == 2)		// 2 is prime
+	if(k == 2)		/* 2 is prime */
 		return 1;
-	if(k < 2)		// 1 is not prime
+	if(k < 2)		/* 1 is not prime */
 		return 0;
-	if((n->p[0] & 1) == 0)	// even is not prime
+	if((n->p[0] & 1) == 0)	/* even is not prime */
 		return 0;
 
-	// test against small prime numbers
+	/* test against small prime numbers */
 	if(smallprimetest(n) < 0)
 		return 0;
 
-	// fermat test, 2^n mod n == 2 if p is prime
+	/* fermat test, 2^n mod n == 2 if p is prime */
 	x = uitomp(2, nil);
 	y = mpnew(0);
 	mpexp(x, n, n, y);
@@ -43,21 +43,21 @@ probably_prime(mpint *n, int nrep)
 
 	nbits = mpsignif(n);
 	nm1 = mpnew(nbits);
-	mpsub(n, mpone, nm1);	// nm1 = n - 1 */
+	mpsub(n, mpone, nm1);	/* nm1 = n - 1 */
 	k = mplowbits0(nm1);
 	q = mpnew(0);
-	mpright(nm1, k, q);	// q = (n-1)/2**k
+	mpright(nm1, k, q);	/* q = (n-1)/2**k */
 
 	for(rep = 0; rep < nrep; rep++){
 		
-		// x = random in [2, n-2]
+		/* x = random in [2, n-2] */
 		r = mprand(nbits, prng, nil);
 		mpmod(r, nm1, x);
 		mpfree(r);
 		if(mpcmp(x, mpone) <= 0)
 			continue;
 
-		// y = x**q mod n
+		/* y = x**q mod n */
 		mpexp(x, q, n, y);
 
 		if(mpcmp(y, mpone) == 0 || mpcmp(y, nm1) == 0)
@@ -65,7 +65,7 @@ probably_prime(mpint *n, int nrep)
 
 		for(j = 1; j < k; j++){
 			mpmul(y, y, x);
-			mpmod(x, n, y);	// y = y*y mod n
+			mpmod(x, n, y);	/* y = y*y mod n */
 			if(mpcmp(y, nm1) == 0)
 				goto done;
 			if(mpcmp(y, mpone) == 0){
blob - 1e937bec833a555ce978dea62c740512b289d163
blob + 82e2eeea0e72a2d997e1d59e56acae7899f72ae9
--- src/libsec/port/rsadecrypt.c
+++ src/libsec/port/rsadecrypt.c
@@ -2,9 +2,9 @@
 #include <mp.h>
 #include <libsec.h>
 
-// decrypt rsa using garner's algorithm for the chinese remainder theorem
-//	seminumerical algorithms, knuth, pp 253-254
-//	applied cryptography, menezes et al, pg 612
+/* decrypt rsa using garner's algorithm for the chinese remainder theorem */
+/*	seminumerical algorithms, knuth, pp 253-254 */
+/*	applied cryptography, menezes et al, pg 612 */
 mpint*
 rsadecrypt(RSApriv *rsa, mpint *in, mpint *out)
 {
@@ -13,17 +13,17 @@ rsadecrypt(RSApriv *rsa, mpint *in, mpint *out)
 	if(out == nil)
 		out = mpnew(0);
 
-	// convert in to modular representation
+	/* convert in to modular representation */
 	v1 = mpnew(0);
 	mpmod(in, rsa->p, v1);
 	v2 = mpnew(0);
 	mpmod(in, rsa->q, v2);
 
-	// exponentiate the modular rep
+	/* exponentiate the modular rep */
 	mpexp(v1, rsa->kp, rsa->p, v1);
 	mpexp(v2, rsa->kq, rsa->q, v2);
 	
-	// out = v1 + p*((v2-v1)*c2 mod q)
+	/* out = v1 + p*((v2-v1)*c2 mod q) */
 	mpsub(v2, v1, v2);
 	mpmul(v2, rsa->c2, v2);
 	mpmod(v2, rsa->q, v2);
blob - f514b073b8318657a62bb5bdeb516c3701443a54
blob + 7b7156140fabe1e0ebc97f25c950b608ecf7ff33
--- src/libsec/port/rsafill.c
+++ src/libsec/port/rsafill.c
@@ -8,7 +8,7 @@ rsafill(mpint *n, mpint *e, mpint *d, mpint *p, mpint 
 	mpint *c2, *kq, *kp, *x;
 	RSApriv *rsa;
 
-	// make sure we're not being hoodwinked
+	/* make sure we're not being hoodwinked */
 	if(!probably_prime(p, 10) || !probably_prime(q, 10)){
 		werrstr("rsafill: p or q not prime");
 		return nil;
@@ -33,10 +33,10 @@ rsafill(mpint *n, mpint *e, mpint *d, mpint *p, mpint 
 		return nil;
 	}
 
-	// compute chinese remainder coefficient
+	/* compute chinese remainder coefficient */
 	mpinvert(p, q, c2);
 
-	// for crt a**k mod p == (a**(k mod p-1)) mod p
+	/* for crt a**k mod p == (a**(k mod p-1)) mod p */
 	kq = mpnew(0);
 	kp = mpnew(0);
 	mpsub(p, mpone, x);
blob - ebe1079d909636e29202e919a4e0a43a465a0051
blob + f51cddaff19fe75518d3374eae9bf087a1250934
--- src/libsec/port/rsagen.c
+++ src/libsec/port/rsagen.c
@@ -15,7 +15,7 @@ rsagen(int nlen, int elen, int rounds)
 	d = mpnew(0);
 	phi = mpnew(nlen);
 
-	// create the prime factors and euclid's function
+	/* create the prime factors and euclid's function */
 	genprime(p, nlen/2, rounds);
 	genprime(q, nlen - mpsignif(p) + 1, rounds);
 	mpmul(p, q, n);
@@ -23,16 +23,16 @@ rsagen(int nlen, int elen, int rounds)
 	mpsub(q, mpone, d);
 	mpmul(e, d, phi);
 
-	// find an e relatively prime to phi
+	/* find an e relatively prime to phi */
 	t1 = mpnew(0);
 	t2 = mpnew(0);
 	mprand(elen, genrandom, e);
 	if(mpcmp(e,mptwo) <= 0)
 		itomp(3, e);
-	// See Menezes et al. p.291 "8.8 Note (selecting primes)" for discussion
-	// of the merits of various choices of primes and exponents.  e=3 is a
-	// common and recommended exponent, but doesn't necessarily work here
-	// because we chose strong rather than safe primes.
+	/* See Menezes et al. p.291 "8.8 Note (selecting primes)" for discussion */
+	/* of the merits of various choices of primes and exponents.  e=3 is a */
+	/* common and recommended exponent, but doesn't necessarily work here */
+	/* because we chose strong rather than safe primes. */
 	for(;;){
 		mpextendedgcd(e, phi, t1, d, t2);
 		if(mpcmp(t1, mpone) == 0)
@@ -42,11 +42,11 @@ rsagen(int nlen, int elen, int rounds)
 	mpfree(t1);
 	mpfree(t2);
 
-	// compute chinese remainder coefficient
+	/* compute chinese remainder coefficient */
 	c2 = mpnew(0);
 	mpinvert(p, q, c2);
 
-	// for crt a**k mod p == (a**(k mod p-1)) mod p
+	/* for crt a**k mod p == (a**(k mod p-1)) mod p */
 	kq = mpnew(0);
 	kp = mpnew(0);
 	mpsub(p, mpone, phi);
blob - cf94dac2ad398dbf38c829a714b6600632bece25
blob + c6a1befc02248634723a14dc5d369e0b7fe7a46b
--- src/libsec/port/smallprimetest.c
+++ src/libsec/port/smallprimetest.c
@@ -1005,7 +1005,7 @@ static ulong smallprimes[] = {
 	104677,	104681,	104683,	104693,	104701,	104707,	104711,	104717,	104723,	104729,
 };
 
-//  return 1 if p is divisable by sp, 0 otherwise
+/*  return 1 if p is divisable by sp, 0 otherwise */
 static int
 divides(mpint *dividend, ulong divisor)
 {
@@ -1021,7 +1021,7 @@ divides(mpint *dividend, ulong divisor)
 	return d[1] == 0;
 }
 
-//  return -1 if p is divisable by one of the small primes, 0 otherwise
+/*  return -1 if p is divisable by one of the small primes, 0 otherwise */
 int
 smallprimetest(mpint *p)
 {
blob - ee4cd43d0cf25b827e8320dd99f166214f72cc17
blob + 8816db3ba5c4a7a1bae9ebc05c95fb55c05ce50d
--- src/libsec/port/tlshand.c
+++ src/libsec/port/tlshand.c
@@ -5,37 +5,37 @@
 #include <mp.h>
 #include <libsec.h>
 
-// The main groups of functions are:
-//		client/server - main handshake protocol definition
-//		message functions - formating handshake messages
-//		cipher choices - catalog of digest and encrypt algorithms
-//		security functions - PKCS#1, sslHMAC, session keygen
-//		general utility functions - malloc, serialization
-// The handshake protocol builds on the TLS/SSL3 record layer protocol,
-// which is implemented in kernel device #a.  See also /lib/rfc/rfc2246.
+/* The main groups of functions are: */
+/*		client/server - main handshake protocol definition */
+/*		message functions - formating handshake messages */
+/*		cipher choices - catalog of digest and encrypt algorithms */
+/*		security functions - PKCS#1, sslHMAC, session keygen */
+/*		general utility functions - malloc, serialization */
+/* The handshake protocol builds on the TLS/SSL3 record layer protocol, */
+/* which is implemented in kernel device #a.  See also /lib/rfc/rfc2246. */
 
 enum {
 	TLSFinishedLen = 12,
 	SSL3FinishedLen = MD5dlen+SHA1dlen,
-	MaxKeyData = 104,	// amount of secret we may need
+	MaxKeyData = 104,	/* amount of secret we may need */
 	MaxChunk = 1<<14,
 	RandomSize = 32,
 	SidSize = 32,
 	MasterSecretSize = 48,
 	AQueue = 0,
-	AFlush = 1,
+	AFlush = 1
 };
 
 typedef struct TlsSec TlsSec;
 
 typedef struct Bytes{
 	int len;
-	uchar data[1];  // [len]
+	uchar data[1];  /* [len] */
 } Bytes;
 
 typedef struct Ints{
 	int len;
-	int data[1];  // [len]
+	int data[1];  /* [len] */
 } Ints;
 
 typedef struct Algs{
@@ -52,34 +52,34 @@ typedef struct Finished{
 } Finished;
 
 typedef struct TlsConnection{
-	TlsSec *sec;	// security management goo
-	int hand, ctl;	// record layer file descriptors
-	int erred;		// set when tlsError called
-	int (*trace)(char*fmt, ...); // for debugging
-	int version;	// protocol we are speaking
-	int verset;		// version has been set
-	int ver2hi;		// server got a version 2 hello
-	int isClient;	// is this the client or server?
-	Bytes *sid;		// SessionID
-	Bytes *cert;	// only last - no chain
+	TlsSec *sec;	/* security management goo */
+	int hand, ctl;	/* record layer file descriptors */
+	int erred;		/* set when tlsError called */
+	int (*trace)(char*fmt, ...); /* for debugging */
+	int version;	/* protocol we are speaking */
+	int verset;		/* version has been set */
+	int ver2hi;		/* server got a version 2 hello */
+	int isClient;	/* is this the client or server? */
+	Bytes *sid;		/* SessionID */
+	Bytes *cert;	/* only last - no chain */
 
 	Lock statelk;
-	int state;		// must be set using setstate
+	int state;		/* must be set using setstate */
 
-	// input buffer for handshake messages
+	/* input buffer for handshake messages */
 	uchar buf[MaxChunk+2048];
 	uchar *rp, *ep;
 
-	uchar crandom[RandomSize];	// client random
-	uchar srandom[RandomSize];	// server random
-	int clientVersion;	// version in ClientHello
-	char *digest;	// name of digest algorithm to use
-	char *enc;		// name of encryption algorithm to use
-	int nsecret;	// amount of secret data to init keys
+	uchar crandom[RandomSize];	/* client random */
+	uchar srandom[RandomSize];	/* server random */
+	int clientVersion;	/* version in ClientHello */
+	char *digest;	/* name of digest algorithm to use */
+	char *enc;		/* name of encryption algorithm to use */
+	int nsecret;	/* amount of secret data to init keys */
 
-	// for finished messages
-	MD5state	hsmd5;	// handshake hash
-	SHAstate	hssha1;	// handshake hash
+	/* for finished messages */
+	MD5state	hsmd5;	/* handshake hash */
+	SHAstate	hssha1;	/* handshake hash */
 	Finished	finished;
 } TlsConnection;
 
@@ -117,16 +117,16 @@ typedef struct Msg{
 } Msg;
 
 struct TlsSec{
-	char *server;	// name of remote; nil for server
-	int ok;	// <0 killed; ==0 in progress; >0 reusable
+	char *server;	/* name of remote; nil for server */
+	int ok;	/* <0 killed; ==0 in progress; >0 reusable */
 	RSApub *rsapub;
-	AuthRpc *rpc;	// factotum for rsa private key
-	uchar sec[MasterSecretSize];	// master secret
-	uchar crandom[RandomSize];	// client random
-	uchar srandom[RandomSize];	// server random
-	int clientVers;		// version in ClientHello
-	int vers;			// final version
-	// byte generation and handshake checksum
+	AuthRpc *rpc;	/* factotum for rsa private key */
+	uchar sec[MasterSecretSize];	/* master secret */
+	uchar crandom[RandomSize];	/* client random */
+	uchar srandom[RandomSize];	/* server random */
+	int clientVers;		/* version in ClientHello */
+	int vers;			/* final version */
+	/* byte generation and handshake checksum */
 	void (*prf)(uchar*, int, uchar*, int, char*, uchar*, int, uchar*, int);
 	void (*setFinished)(TlsSec*, MD5state, SHAstate, uchar*, int);
 	int nfin;
@@ -136,12 +136,12 @@ struct TlsSec{
 enum {
 	TLSVersion = 0x0301,
 	SSL3Version = 0x0300,
-	ProtocolVersion = 0x0301,	// maximum version we speak
-	MinProtoVersion = 0x0300,	// limits on version we accept
-	MaxProtoVersion	= 0x03ff,
+	ProtocolVersion = 0x0301,	/* maximum version we speak */
+	MinProtoVersion = 0x0300,	/* limits on version we accept */
+	MaxProtoVersion	= 0x03ff
 };
 
-// handshake type
+/* handshake type */
 enum {
 	HHelloRequest,
 	HClientHello,
@@ -157,7 +157,7 @@ enum {
 	HMax
 };
 
-// alerts
+/* alerts */
 enum {
 	ECloseNotify = 0,
 	EUnexpectedMessage = 10,
@@ -186,7 +186,7 @@ enum {
 	EMax = 256
 };
 
-// cipher suites
+/* cipher suites */
 enum {
 	TLS_NULL_WITH_NULL_NULL	 		= 0x0000,
 	TLS_RSA_WITH_NULL_MD5 			= 0x0001,
@@ -207,7 +207,7 @@ enum {
 	TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA	= 0X0010,
 	TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA	= 0X0011,
 	TLS_DHE_DSS_WITH_DES_CBC_SHA		= 0X0012,
-	TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA	= 0X0013,	// ZZZ must be implemented for tls1.0 compliance
+	TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA	= 0X0013,	/* ZZZ must be implemented for tls1.0 compliance */
 	TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA	= 0X0014,
 	TLS_DHE_RSA_WITH_DES_CBC_SHA		= 0X0015,
 	TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA	= 0X0016,
@@ -217,7 +217,7 @@ enum {
 	TLS_DH_anon_WITH_DES_CBC_SHA		= 0X001A,
 	TLS_DH_anon_WITH_3DES_EDE_CBC_SHA	= 0X001B,
 
-	TLS_RSA_WITH_AES_128_CBC_SHA		= 0X002f,	// aes, aka rijndael with 128 bit blocks
+	TLS_RSA_WITH_AES_128_CBC_SHA		= 0X002f,	/* aes, aka rijndael with 128 bit blocks */
 	TLS_DH_DSS_WITH_AES_128_CBC_SHA		= 0X0030,
 	TLS_DH_RSA_WITH_AES_128_CBC_SHA		= 0X0031,
 	TLS_DHE_DSS_WITH_AES_128_CBC_SHA	= 0X0032,
@@ -232,7 +232,7 @@ enum {
 	CipherMax
 };
 
-// compression methods
+/* compression methods */
 enum {
 	CompressionNull = 0,
 	CompressionMax
@@ -306,10 +306,10 @@ static Ints* newints(int len);
 /* static Ints* makeints(int* buf, int len); */
 static void freeints(Ints* b);
 
-//================= client/server ========================
+/*================= client/server ======================== */
 
-//	push TLS onto fd, returning new (application) file descriptor
-//		or -1 if error.
+/*	push TLS onto fd, returning new (application) file descriptor */
+/*		or -1 if error. */
 int
 tlsServer(int fd, TLSconn *conn)
 {
@@ -352,7 +352,7 @@ tlsServer(int fd, TLSconn *conn)
 	}
 	if(conn->cert)
 		free(conn->cert);
-	conn->cert = 0;  // client certificates are not yet implemented
+	conn->cert = 0;  /* client certificates are not yet implemented */
 	conn->certlen = 0;
 	conn->sessionIDlen = tls->sid->len;
 	conn->sessionID = emalloc(conn->sessionIDlen);
@@ -361,8 +361,8 @@ tlsServer(int fd, TLSconn *conn)
 	return data;
 }
 
-//	push TLS onto fd, returning new (application) file descriptor
-//		or -1 if error.
+/*	push TLS onto fd, returning new (application) file descriptor */
+/*		or -1 if error. */
 int
 tlsClient(int fd, TLSconn *conn)
 {
@@ -465,7 +465,7 @@ tlsServer2(int ctl, int hand, uchar *cert, int ncert, 
 	memmove(c->crandom, m.u.clientHello.random, RandomSize);
 	cipher = okCipher(m.u.clientHello.ciphers);
 	if(cipher < 0) {
-		// reply with EInsufficientSecurity if we know that's the case
+		/* reply with EInsufficientSecurity if we know that's the case */
 		if(cipher == -2)
 			tlsError(c, EInsufficientSecurity, "cipher suites too weak");
 		else
@@ -676,8 +676,8 @@ tlsClient2(int ctl, int hand, uchar *csid, int ncsid, 
 	if(m.tag == HServerKeyExchange) {
 		tlsError(c, EUnexpectedMessage, "got an server key exchange");
 		goto Err;
-		// If implementing this later, watch out for rollback attack
-		// described in Wagner Schneier 1996, section 4.4.
+		/* If implementing this later, watch out for rollback attack */
+		/* described in Wagner Schneier 1996, section 4.4. */
 	}
 
 	/* certificate request (optional) */
@@ -739,8 +739,8 @@ tlsClient2(int ctl, int hand, uchar *csid, int ncsid, 
 		goto Err;
 	}
 
-	// Cipherchange must occur immediately before Finished to avoid
-	// potential hole;  see section 4.3 of Wagner Schneier 1996.
+	/* Cipherchange must occur immediately before Finished to avoid */
+	/* potential hole;  see section 4.3 of Wagner Schneier 1996. */
 	if(tlsSecFinished(c->sec, c->hsmd5, c->hssha1, c->finished.verify, c->finished.n, 1) < 0){
 		tlsError(c, EInternalError, "can't set finished 1: %r");
 		goto Err;
@@ -793,14 +793,14 @@ Err:
 }
 
 
-//================= message functions ========================
+/*================= message functions ======================== */
 
 static uchar sendbuf[9000], *sendp;
 
 static int
 msgSend(TlsConnection *c, Msg *m, int act)
 {
-	uchar *p; // sendp = start of new message;  p = write pointer
+	uchar *p; /* sendp = start of new message;  p = write pointer */
 	int nn, n, i;
 
 	if(sendp == nil)
@@ -809,7 +809,7 @@ msgSend(TlsConnection *c, Msg *m, int act)
 	if(c->trace)
 		c->trace("send %s", msgPrint((char*)p, (sizeof sendbuf) - (p-sendbuf), m));
 
-	p[0] = m->tag;	// header - fill in size later
+	p[0] = m->tag;	/* header - fill in size later */
 	p += 4;
 
 	switch(m->tag) {
@@ -817,15 +817,15 @@ msgSend(TlsConnection *c, Msg *m, int act)
 		tlsError(c, EInternalError, "can't encode a %d", m->tag);
 		goto Err;
 	case HClientHello:
-		// version
+		/* version */
 		put16(p, m->u.clientHello.version);
 		p += 2;
 
-		// random
+		/* random */
 		memmove(p, m->u.clientHello.random, RandomSize);
 		p += RandomSize;
 
-		// sid
+		/* sid */
 		n = m->u.clientHello.sid->len;
 		assert(n < 256);
 		p[0] = n;
@@ -851,11 +851,11 @@ msgSend(TlsConnection *c, Msg *m, int act)
 		put16(p, m->u.serverHello.version);
 		p += 2;
 
-		// random
+		/* random */
 		memmove(p, m->u.serverHello.random, RandomSize);
 		p += RandomSize;
 
-		// sid
+		/* sid */
 		n = m->u.serverHello.sid->len;
 		assert(n < 256);
 		p[0] = n;
@@ -901,12 +901,12 @@ msgSend(TlsConnection *c, Msg *m, int act)
 		break;
 	}
 
-	// go back and fill in size
+	/* go back and fill in size */
 	n = p-sendp;
 	assert(p <= sendbuf+sizeof(sendbuf));
 	put24(sendp+1, n-4);
 
-	// remember hash of Handshake messages
+	/* remember hash of Handshake messages */
 	if(m->tag != HHelloRequest) {
 		md5(sendp, n, 0, &c->hsmd5);
 		sha1(sendp, n, 0, &c->hssha1);
@@ -1366,7 +1366,7 @@ tlsError(TlsConnection *c, int err, char *fmt, ...)
 	fprint(c->ctl, "alert %d", err);
 }
 
-// commit to specific version number
+/* commit to specific version number */
 static int
 setVersion(TlsConnection *c, int version)
 {
@@ -1386,15 +1386,15 @@ setVersion(TlsConnection *c, int version)
 	return fprint(c->ctl, "version 0x%x", version);
 }
 
-// confirm that received Finished message matches the expected value
+/* confirm that received Finished message matches the expected value */
 static int
 finishedMatch(TlsConnection *c, Finished *f)
 {
 	return memcmp(f->verify, c->finished.verify, f->n) == 0;
 }
 
-// free memory associated with TlsConnection struct
-//		(but don't close the TLS channel itself)
+/* free memory associated with TlsConnection struct */
+/*		(but don't close the TLS channel itself) */
 static void
 tlsConnectionFree(TlsConnection *c)
 {
@@ -1406,7 +1406,7 @@ tlsConnectionFree(TlsConnection *c)
 }
 
 
-//================= cipher choices ========================
+/*================= cipher choices ======================== */
 
 static int weakCipher[CipherMax] =
 {
@@ -1579,10 +1579,10 @@ makeciphers(void)
 
 
 
-//================= security functions ========================
+/*================= security functions ======================== */
 
-// given X.509 certificate, set up connection to factotum
-//	for using corresponding private key
+/* given X.509 certificate, set up connection to factotum */
+/*	for using corresponding private key */
 static AuthRpc*
 factotum_rsa_open(uchar *cert, int certlen)
 {
@@ -1600,7 +1600,7 @@ factotum_rsa_open(uchar *cert, int certlen)
 		return nil;
 	}
 
-	// roll factotum keyring around to match certificate
+	/* roll factotum keyring around to match certificate */
 	rsapub = X509toRSApub(cert, certlen, nil, 0);
 	while(1){
 		if(auth_rpc(rpc, "read", nil, 0) != ARok){
@@ -1651,7 +1651,7 @@ tlsPmd5(uchar *buf, int nbuf, uchar *key, int nkey, uc
 	int i, n;
 	MD5state *s;
 
-	// generate a1
+	/* generate a1 */
 	s = hmac_md5(label, nlabel, key, nkey, nil, nil);
 	s = hmac_md5(seed0, nseed0, key, nkey, nil, s);
 	hmac_md5(seed1, nseed1, key, nkey, ai, s);
@@ -1680,7 +1680,7 @@ tlsPsha1(uchar *buf, int nbuf, uchar *key, int nkey, u
 	int i, n;
 	SHAstate *s;
 
-	// generate a1
+	/* generate a1 */
 	s = hmac_sha1(label, nlabel, key, nkey, nil, nil);
 	s = hmac_sha1(seed0, nseed0, key, nkey, nil, s);
 	hmac_sha1(seed1, nseed1, key, nkey, ai, s);
@@ -1702,7 +1702,7 @@ tlsPsha1(uchar *buf, int nbuf, uchar *key, int nkey, u
 	}
 }
 
-// fill buf with md5(args)^sha1(args)
+/* fill buf with md5(args)^sha1(args) */
 static void
 tlsPRF(uchar *buf, int nbuf, uchar *key, int nkey, char *label, uchar *seed0, int nseed0, uchar *seed1, int nseed1)
 {
@@ -1729,7 +1729,7 @@ tlsSecInits(int cvers, uchar *csid, int ncsid, uchar *
 {
 	TlsSec *sec = emalloc(sizeof(*sec));
 
-	USED(csid); USED(ncsid);  // ignore csid for now
+	USED(csid); USED(ncsid);  /* ignore csid for now */
 
 	memmove(sec->crandom, crandom, RandomSize);
 	sec->clientVers = cvers;
@@ -1905,9 +1905,9 @@ serverMasterSecret(TlsSec *sec, uchar *epm, int nepm)
 
 	pm = pkcs1_decrypt(sec, epm, nepm);
 
-	// if the client messed up, just continue as if everything is ok,
-	// to prevent attacks to check for correctly formatted messages.
-	// Hence the fprint(2,) can't be replaced by tlsError(), which sends an Alert msg to the client.
+	/* if the client messed up, just continue as if everything is ok, */
+	/* to prevent attacks to check for correctly formatted messages. */
+	/* Hence the fprint(2,) can't be replaced by tlsError(), which sends an Alert msg to the client. */
 	if(sec->ok < 0 || pm == nil || get16(pm->data) != sec->clientVers){
 		fprint(2, "serverMasterSecret failed ok=%d pm=%p pmvers=%x cvers=%x nepm=%d\n",
 			sec->ok, pm, pm ? get16(pm->data) : -1, sec->clientVers, nepm);
@@ -1988,14 +1988,14 @@ sslSetFinished(TlsSec *sec, MD5state hsmd5, SHAstate h
 	sha1(h1, SHA1dlen, finished + MD5dlen, s);
 }
 
-// fill "finished" arg with md5(args)^sha1(args)
+/* fill "finished" arg with md5(args)^sha1(args) */
 static void
 tlsSetFinished(TlsSec *sec, MD5state hsmd5, SHAstate hssha1, uchar *finished, int isClient)
 {
 	uchar h0[MD5dlen], h1[SHA1dlen];
 	char *label;
 
-	// get current hash value, but allow further messages to be hashed in
+	/* get current hash value, but allow further messages to be hashed in */
 	md5(nil, 0, h0, &hsmd5);
 	sha1(nil, 0, h1, &hssha1);
 
@@ -2061,8 +2061,8 @@ mptobytes(mpint* big)
 	return ans;
 }
 
-// Do RSA computation on block according to key, and pad
-// result on left with zeros to make it modlen long.
+/* Do RSA computation on block according to key, and pad */
+/* result on left with zeros to make it modlen long. */
 static Bytes*
 rsacomp(Bytes* block, RSApub* key, int modlen)
 {
@@ -2084,7 +2084,7 @@ rsacomp(Bytes* block, RSApub* key, int modlen)
 		ybytes = a;
 	}
 	else if(ylen > modlen) {
-		// assume it has leading zeros (mod should make it so)
+		/* assume it has leading zeros (mod should make it so) */
 		a = newbytes(modlen);
 		memmove(a->data, ybytes->data, modlen);
 		freebytes(ybytes);
@@ -2094,7 +2094,7 @@ rsacomp(Bytes* block, RSApub* key, int modlen)
 	return ybytes;
 }
 
-// encrypt data according to PKCS#1, /lib/rfc/rfc2437 9.1.2.1
+/* encrypt data according to PKCS#1, /lib/rfc/rfc2437 9.1.2.1 */
 static Bytes*
 pkcs1_encrypt(Bytes* data, RSApub* key, int blocktype)
 {
@@ -2128,8 +2128,8 @@ pkcs1_encrypt(Bytes* data, RSApub* key, int blocktype)
 	return ans;
 }
 
-// decrypt data according to PKCS#1, with given key.
-// expect a block type of 2.
+/* decrypt data according to PKCS#1, with given key. */
+/* expect a block type of 2. */
 static Bytes*
 pkcs1_decrypt(TlsSec *sec, uchar *epm, int nepm)
 {
@@ -2145,7 +2145,7 @@ pkcs1_decrypt(TlsSec *sec, uchar *epm, int nepm)
 	if(y == nil)
 		return nil;
 	eb = mptobytes(y);
-	if(eb->len < modlen){ // pad on left with zeros
+	if(eb->len < modlen){ /* pad on left with zeros */
 		ans = newbytes(modlen);
 		memset(ans->data, 0, modlen-eb->len);
 		memmove(ans->data+modlen-eb->len, eb->data, eb->len);
@@ -2164,7 +2164,7 @@ pkcs1_decrypt(TlsSec *sec, uchar *epm, int nepm)
 }
 
 
-//================= general utility functions ========================
+/*================= general utility functions ======================== */
 
 static void *
 emalloc(int n)
blob - f204ca6fbc51343a5a48fff9f28cb7a41665270e
blob + 60b3d0735be2babc2123d8f15ae8cb3ca5b2a60a
--- src/libsec/port/x509.c
+++ src/libsec/port/x509.c
@@ -575,7 +575,7 @@ int_decode(uchar** pp, uchar* pend, int count, int uns
 			err = ASN_ETOOBIG;
 		else {
 			if(!unsgned && count > 0 && count < 4 && (*p&0x80))
-				num = -1;		// set all bits, initially
+				num = -1;		/* set all bits, initially */
 			while(count--)
 				num = (num << 8)|(*p++);
 		}
@@ -2141,7 +2141,7 @@ X509toRSApub(uchar *cert, int ncert, char *name, int n
 	if(name != nil && c->subject != nil){
 		e = strchr(c->subject, ',');
 		if(e != nil)
-			*e = 0;  // take just CN part of Distinguished Name
+			*e = 0;  /* take just CN part of Distinguished Name */
 		strncpy(name, c->subject, nname);
 	}
 	pk = decode_rsapubkey(c->publickey);
blob - 23cfb4017d5f8d64654a8418bef6bd586164ac1e
blob + a808ad553b7fba5ccaccb552d67a0718df70854a
--- src/libsunrpc/fd.c
+++ src/libsunrpc/fd.c
@@ -5,7 +5,7 @@
 
 enum
 {
-	MaxRead = 17000,
+	MaxRead = 17000
 };
 
 typedef struct SunMsgFd SunMsgFd;
blob - 837ead212b5a52930bdb15ff6c868a3f49d5df41
blob + 4c32442941779e756b4789c512019a96c115cedb
--- src/libsunrpc/rpc.c
+++ src/libsunrpc/rpc.c
@@ -38,7 +38,7 @@ enum
 	MsgAuthRejectedVerf = 4,
 	MsgAuthTooWeak = 5,
 	MsgAuthInvalidResp = 6,
-	MsgAuthFailed = 7,
+	MsgAuthFailed = 7
 };
 
 SunStatus
@@ -271,8 +271,8 @@ sunauthinfoprint(Fmt *fmt, SunAuthInfo *ai)
 		fmtprint(fmt, "%#ux", ai->flavor);
 		break;
 	}
-//	if(ai->ndata)
-//		fmtprint(fmt, " %.*H", ai->ndata, ai->data);
+/*	if(ai->ndata) */
+/*		fmtprint(fmt, " %.*H", ai->ndata, ai->data); */
 }
 
 uint
blob - 30b031c73c94d2b9b478c4bcfc1bb8865467aa33
blob + ec73126abfa7569ecf99d96ad9c5301d921c0dea
--- src/libthread/ioproc.c
+++ src/libthread/ioproc.c
@@ -5,7 +5,7 @@
 
 enum
 {
-	STACK = 32768,
+	STACK = 32768
 };
 
 void
blob - 8a5643b0ca18ea513d5e484c22d6d11164664360
blob + d89a30b9497abae789bcd8e5e32d189b0c456ace
--- src/libthread/thread.c
+++ src/libthread/thread.c
@@ -85,11 +85,11 @@ threadstart(uint y, uint x)
 	z |= y;
 	t = (_Thread*)z;
 
-//print("threadstart %p\n", v);
+/*print("threadstart %p\n", v); */
 	t->startfn(t->startarg);
-//print("threadexits %p\n", v);
+/*print("threadexits %p\n", v); */
 	threadexits(nil);
-//print("not reacehd\n");
+/*print("not reacehd\n"); */
 }
 
 static _Thread*
@@ -187,7 +187,7 @@ _threadswitch(void)
 
 	needstack(0);
 	p = proc();
-//print("threadswtch %p\n", p);
+/*print("threadswtch %p\n", p); */
 	contextswitch(&p->thread->context, &p->schedcontext);
 }
 
@@ -200,7 +200,7 @@ _threadready(_Thread *t)
 	lock(&p->lock);
 	p->runrend.l = &p->lock;
 	addthread(&p->runqueue, t);
-//print("%d wake for job %d->%d\n", time(0), getpid(), p->osprocid);
+/*print("%d wake for job %d->%d\n", time(0), getpid(), p->osprocid); */
 	if(p != proc())
 		_procwakeupandunlock(&p->runrend);
 	else
@@ -265,7 +265,7 @@ procscheduler(Proc *p)
 
 	setproc(p);
 	_threaddebug("scheduler enter");
-//	print("s %p\n", p);
+/*	print("s %p\n", p); */
 	lock(&p->lock);
 	for(;;){
 		while((t = p->runqueue.head) == nil){
@@ -292,13 +292,13 @@ procscheduler(Proc *p)
 		p->nswitch++;
 		_threaddebug("run %d (%s)", t->id, t->name);
 		contextswitch(&p->schedcontext, &t->context);
-//print("back in scheduler\n");
+/*print("back in scheduler\n"); */
 		p->thread = nil;
 		lock(&p->lock);
 		if(t->exiting){
 			delthreadinproc(p, t);
 			p->nthread--;
-//print("nthread %d\n", p->nthread);
+/*print("nthread %d\n", p->nthread); */
 			free(t);
 		}
 	}
@@ -425,11 +425,11 @@ needstack(int n)
 static int
 threadqlock(QLock *l, int block, ulong pc)
 {
-//print("threadqlock %p\n", l);
+/*print("threadqlock %p\n", l); */
 	lock(&l->l);
 	if(l->owner == nil){
 		l->owner = (*threadnow)();
-//print("qlock %p @%#x by %p\n", l, pc, l->owner);
+/*print("qlock %p @%#x by %p\n", l, pc, l->owner); */
 		unlock(&l->l);
 		return 1;
 	}
@@ -437,7 +437,7 @@ threadqlock(QLock *l, int block, ulong pc)
 		unlock(&l->l);
 		return 0;
 	}
-//print("qsleep %p @%#x by %p\n", l, pc, (*threadnow)());
+/*print("qsleep %p @%#x by %p\n", l, pc, (*threadnow)()); */
 	addthread(&l->waiting, (*threadnow)());
 	unlock(&l->l);
 
@@ -448,7 +448,7 @@ threadqlock(QLock *l, int block, ulong pc)
 			argv0, pc, l->owner, (*threadnow)());
 		abort();
 	}
-//print("qlock wakeup %p @%#x by %p\n", l, pc, (*threadnow)());
+/*print("qlock wakeup %p @%#x by %p\n", l, pc, (*threadnow)()); */
 	return 1;
 }
 
@@ -458,7 +458,7 @@ threadqunlock(QLock *l, ulong pc)
 	_Thread *ready;
 	
 	lock(&l->l);
-//print("qlock unlock %p @%#x by %p (owner %p)\n", l, pc, (*threadnow)(), l->owner);
+/*print("qlock unlock %p @%#x by %p (owner %p)\n", l, pc, (*threadnow)(), l->owner); */
 	if(l->owner == 0){
 		fprint(2, "%s: qunlock pc=0x%lux owner=%p self=%p oops\n",
 			argv0, pc, l->owner, (*threadnow)());
blob - be0d6ac4e04cd50ec4598d84111206c7dcc04566
blob + 76436f18e575673eb5d0158e7a0fb8964f84820e
--- src/libventi/cache.c
+++ src/libventi/cache.c
@@ -22,10 +22,10 @@ enum {
 	BioReading,
 	BioWriting,
 	BioEmpty,
-	BioVentiError,
+	BioVentiError
 };
 enum {
-	BadHeap = ~0,
+	BadHeap = ~0
 };
 struct VtCache
 {
@@ -159,7 +159,7 @@ cachecheck(VtCache *c)
 	}
 if(c->nheap + refed != c->nblock){
 fprint(2, "cachecheck: nheap %d refed %d nblocks %d\n", c->nheap, refed, c->nblock);
-//vtcachedump(c);
+/*vtcachedump(c); */
 }
 	assert(c->nheap + refed == c->nblock);
 	refed = 0;
@@ -488,7 +488,7 @@ if(0)fprint(2, "vtblockput: %d: %x %d %d\n", getpid(),
 	assert(b->ref == 0);
 	switch(b->iostate){
 	case BioVenti:
-//if(b->addr != NilBlock) print("blockput %d\n", b->addr);
+/*if(b->addr != NilBlock) print("blockput %d\n", b->addr); */
 		b->used = c->now++;
 	case BioVentiError:
 		heapins(b);
blob - 8c9ecc6eab2c6305ef0b40b614d118b3c0b641ee
blob + 174561eccf6d482fc89eb8b815ace8a01dad1f7b
--- src/libventi/file.c
+++ src/libventi/file.c
@@ -517,7 +517,7 @@ blockwalk(VtBlock *p, int index, VtCache *c, int mode,
 		score = p->data+index*VtScoreSize;
 		break;
 	}
-//print("walk from %V/%d ty %d to %V ty %d\n", p->score, index, p->type, score, type);
+/*print("walk from %V/%d ty %d to %V ty %d\n", p->score, index, p->type, score, type); */
 
 	if(mode == VtOWRITE && vtglobaltolocal(score) == NilBlock){
 		b = vtcacheallocblock(c, type);
blob - 02f3aa390c0d9ad9a57f2bdd2c7e26f43376f237
blob + 7d0accde2c0b8518b45c826a109b5eaa2e88255d
--- src/libventi/log.c
+++ src/libventi/log.c
@@ -10,7 +10,7 @@ static char Eremoved[] = "[removed]";
 enum
 {	/* defaults */
 	LogChunkSize = 8192,
-	LogSize = 65536,
+	LogSize = 65536
 };
 
 static struct {
blob - cf86fe134114a8145475ac20d8a82559cb1d813b
blob + 1346126fe90a0ffe3ef0991aa76dd62db46cb738
--- src/libventi/mem.c
+++ src/libventi/mem.c
@@ -4,7 +4,7 @@
 
 enum {
 	IdealAlignment = 32,
-	ChunkSize 	= 128*1024,
+	ChunkSize 	= 128*1024
 };
 
 
blob - d319893990d85a7da6e0a879d0c240150bc98ef2
blob + aa5b2a0ec2f06d057cc624bbbc3a72f02ff9e881
--- src/libventi/packet.c
+++ src/libventi/packet.c
@@ -9,14 +9,14 @@ typedef struct Frag Frag;
 enum {
 	BigMemSize = MaxFragSize,
 	SmallMemSize = BigMemSize/8,
-	NLocalFrag = 2,
+	NLocalFrag = 2
 };
 
 /* position to carve out of a Mem */
 enum {
 	PFront,
 	PMiddle,
-	PEnd,
+	PEnd
 };
 
 struct Mem
@@ -33,7 +33,7 @@ struct Mem
 enum {
 	FragLocalFree,
 	FragLocalAlloc,
-	FragGlobal,
+	FragGlobal
 };
 	
 struct Frag
@@ -126,7 +126,7 @@ packetalloc(void)
 	p->next = nil;
 	p->pc = getcallerpc((char*)&p+8);	/* might not work, but fine */
 
-//if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4));
+/*if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4)); */
 
 	NOTFREE(p);
 	return p;
@@ -137,7 +137,7 @@ packetfree(Packet *p)
 {
 	Frag *f, *ff;
 
-//if(1)fprint(2, "packetfree %p from %08lux\n", p, getcallerpc(&p));
+/*if(1)fprint(2, "packetfree %p from %08lux\n", p, getcallerpc(&p)); */
 
 	if(p == nil)
 		return;
blob - 1fb3c14bcbf6ba822354d0d6febdfeff7ea06b1b
blob + d82be698691213087dd1b6144ac14dfb8ee4f171
--- src/libventi/server.c
+++ src/libventi/server.c
@@ -6,7 +6,7 @@
 
 enum
 {
-	STACK = 8192,
+	STACK = 8192
 };
 
 typedef struct VtSconn VtSconn;
@@ -93,7 +93,7 @@ listenproc(void *v)
 		proccreate(connproc, sc, STACK);
 	}
 
-	// hangup
+	/* hangup */
 }
 
 static void