Use gcc -ansi -pedantic in 9c.  Fix many non-C89-isms.
diff --git a/src/cmd/astro/astro.h b/src/cmd/astro/astro.h
index 1c74a16..5275403 100644
--- a/src/cmd/astro/astro.h
+++ b/src/cmd/astro/astro.h
@@ -1,8 +1,10 @@
 #include	<u.h>
 #include	<libc.h>
 
-//#pragma	varargck	type	"R"	double
-//#pragma	varargck	type	"D"	double
+#ifdef VARARGCK
+#pragma	varargck	type	"R"	double
+#pragma	varargck	type	"D"	double
+#endif
 
 typedef	struct	Obj1	Obj1;
 typedef	struct	Obj2	Obj2;
@@ -20,7 +22,7 @@
 	DARK	= 1<<0,
 	SIGNIF	= 1<<1,
 	PTIME	= 1<<2,
-	LIGHT	= 1<<3,
+	LIGHT	= 1<<3
 };
 
 struct	Obj1
@@ -150,7 +152,7 @@
 extern	double	dist(Obj1*, Obj1*);
 extern	double	dsrc(double, Tim*, int);
 extern	void	dtsetup(double, Tim*);
-//extern	int	evcomp(void*, void*);
+/*extern	int	evcomp(void*, void*);*/
 extern	void	event(char*, char*, char*, double, int);
 extern	void	evflush(void);
 extern	double	fmod(double, double);
diff --git a/src/cmd/astro/init.c b/src/cmd/astro/init.c
index f376f66..9375a3a 100644
--- a/src/cmd/astro/init.c
+++ b/src/cmd/astro/init.c
@@ -14,7 +14,7 @@
 	&onept,
 	&oplut,
 	&ocomet,
-	0,
+	0
 };
 
 struct	idata
@@ -35,7 +35,7 @@
 	"Uranus",	"uranus",	uran,
 	"Neptune",	"neptune",	nept,
 	"Pluto",	"pluto",	plut,
-	"Comet",	"comet",	comet,
+	"Comet",	"comet",	comet
 };
 
 void
diff --git a/src/cmd/astro/main.c b/src/cmd/astro/main.c
index a6441aa..43ce4cc 100644
--- a/src/cmd/astro/main.c
+++ b/src/cmd/astro/main.c
@@ -52,12 +52,12 @@
 			d = dist(&eobj1->point[i], &eobj2->point[i]);
 			print("dist %s to %s = %.4f\n", eobj1->name, eobj2->name, d);
 		}
-//		if(flags['p']) {
-//			pdate(d);
-//			print(" ");
-//			ptime(d);
-//			print("\n");
-//		}
+/*		if(flags['p']) { */
+/*			pdate(d); */
+/*			print(" "); */
+/*			ptime(d); */
+/*			print("\n"); */
+/*		} */
 		if(flags['p'] || flags['e'])
 			break;
 		d += deld;
@@ -151,8 +151,8 @@
 	if(flags['j'])
 		print("jday = %.4f\n", day);
 	deltat = day * .001704;
-	if(deltat > 32.184)		// assume date is utc1
-		deltat = 32.184;	// correct by leap sec
+	if(deltat > 32.184)		/* assume date is utc1 */
+		deltat = 32.184;	/* correct by leap sec */
 	if(flags['t'])
 		deltat = readdt();
 
diff --git a/src/cmd/astro/merct.c b/src/cmd/astro/merct.c
index ebe1f0e..6ada968 100644
--- a/src/cmd/astro/merct.c
+++ b/src/cmd/astro/merct.c
@@ -168,7 +168,7 @@
 	0.160e-6,	2.1241,
 	0.134e-6,	5.1260,
 	0.347e-6,	5.1620,
-	0,
+	0
 };
 
 char	merccp[] =
@@ -332,5 +332,5 @@
 	 0,	2,
 	-1,	2,
 	 2,	3,
-	 1,	3,
+	 1,	3
 };
diff --git a/src/cmd/astro/moont.c b/src/cmd/astro/moont.c
index 1509492..3658035 100644
--- a/src/cmd/astro/moont.c
+++ b/src/cmd/astro/moont.c
@@ -286,5 +286,5 @@
 	    -.0130,	4,0,0,-2,
 	    0.0115,	3,-1,0,0,
 	    -.0141,	2,0,-2,-2,
-	         0,	0,0,0,0,
+	         0,	0,0,0,0
 };
diff --git a/src/cmd/astro/nept.c b/src/cmd/astro/nept.c
index 2d05d59..ff0c9fc 100644
--- a/src/cmd/astro/nept.c
+++ b/src/cmd/astro/nept.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	30.06896348,		// [1] semi major axis (au)
-	0.00858587,		// [2] eccentricity
- 	1.76917,		// [3] inclination (deg)
-	131.72169,		// [4] longitude of the ascending node (deg)
-	44.97135,		// [5] longitude of perihelion (deg)
-	304.88003,		// [6] mean longitude (deg)
+	30.06896348,		/* [1] semi major axis (au) */
+	0.00858587,		/* [2] eccentricity */
+ 	1.76917,		/* [3] inclination (deg) */
+	131.72169,		/* [4] longitude of the ascending node (deg) */
+	44.97135,		/* [5] longitude of perihelion (deg) */
+	304.88003,		/* [6] mean longitude (deg) */
 
-	-0.00125196,		// [1+6] (au/julian century)
-	0.0000251,		// [2+6] (e/julian century)
-  	-3.64,			// [3+6] (arcsec/julian century)
-	-151.25,		// [4+6] (arcsec/julian century)
-	-844.43,		// [5+6] (arcsec/julian century)
-	786449.21,		// [6+6] (arcsec/julian century)
+	-0.00125196,		/* [1+6] (au/julian century) */
+	0.0000251,		/* [2+6] (e/julian century) */
+  	-3.64,			/* [3+6] (arcsec/julian century) */
+	-151.25,		/* [4+6] (arcsec/julian century) */
+	-844.43,		/* [5+6] (arcsec/julian century) */
+	786449.21,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/nutt.c b/src/cmd/astro/nutt.c
index 8ddf2b9..b4bfdef 100644
--- a/src/cmd/astro/nutt.c
+++ b/src/cmd/astro/nutt.c
@@ -34,7 +34,7 @@
 	  .0183,	0,
 	  .0113,	0,
 	 -.0050,	0,
-	      0,
+	      0
 };
 
 char	nutcp[] =
@@ -67,5 +67,5 @@
 	2,2,0,
 	1,2,0,
 	2,2,1,
-	2,2,-1,
+	2,2,-1
 };
diff --git a/src/cmd/astro/pdate.c b/src/cmd/astro/pdate.c
index e88d700..4d60fde 100644
--- a/src/cmd/astro/pdate.c
+++ b/src/cmd/astro/pdate.c
@@ -14,7 +14,7 @@
 	"September",
 	"October",
 	"November",
-	"December",
+	"December"
 };
 
 double
@@ -163,13 +163,13 @@
 	lambda = 0;
 	beta = 0;
 
-// uses lambda, beta, rad, motion
-// sets alpha, delta, rp
+/* uses lambda, beta, rad, motion */
+/* sets alpha, delta, rp */
 
 	helio();
 
-// uses alpha, delta, rp
-// sets ra, decl, lha, decl2, az, el
+/* uses alpha, delta, rp */
+/* sets ra, decl, lha, decl2, az, el */
 
 	geo();
 
diff --git a/src/cmd/astro/plut.c b/src/cmd/astro/plut.c
index 36702a8..6c31ed5 100644
--- a/src/cmd/astro/plut.c
+++ b/src/cmd/astro/plut.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	39.48168677,		// [1] semi major axis (au)
-	0.24880766,		// [2] eccentricity
- 	17.14175,		// [3] inclination (deg)
-	110.30347,		// [4] longitude of the ascending node (deg)
-	224.06676,		// [5] longitude of perihelion (deg)
-	238.92881,		// [6] mean longitude (deg)
+	39.48168677,		/* [1] semi major axis (au) */
+	0.24880766,		/* [2] eccentricity */
+ 	17.14175,		/* [3] inclination (deg) */
+	110.30347,		/* [4] longitude of the ascending node (deg) */
+	224.06676,		/* [5] longitude of perihelion (deg) */
+	238.92881,		/* [6] mean longitude (deg) */
 
-	-0.00076912,		// [1+6] (au/julian century)
-	0.00006465,		// [2+6] (e/julian century)
-  	11.07,			// [3+6] (arcsec/julian century)
-	-37.33,			// [4+6] (arcsec/julian century)
-	-132.25,		// [5+6] (arcsec/julian century)
-	522747.90,		// [6+6] (arcsec/julian century)
+	-0.00076912,		/* [1+6] (au/julian century) */
+	0.00006465,		/* [2+6] (e/julian century) */
+  	11.07,			/* [3+6] (arcsec/julian century) */
+	-37.33,			/* [4+6] (arcsec/julian century) */
+	-132.25,		/* [5+6] (arcsec/julian century) */
+	522747.90,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/satel.c b/src/cmd/astro/satel.c
index 38206e5..e610afa 100644
--- a/src/cmd/astro/satel.c
+++ b/src/cmd/astro/satel.c
@@ -2,7 +2,7 @@
 
 char*	satlst[] =
 {
-	0,
+	0
 };
 
 struct
diff --git a/src/cmd/astro/search.c b/src/cmd/astro/search.c
index e4ed4ed..71424ee 100644
--- a/src/cmd/astro/search.c
+++ b/src/cmd/astro/search.c
@@ -5,7 +5,7 @@
 	"Fall equinox",
 	"Winter solstice",
 	"Spring equinox",
-	"Summer solstice",
+	"Summer solstice"
 };
 
 struct
diff --git a/src/cmd/astro/sunt.c b/src/cmd/astro/sunt.c
index 7f452bc..0265632 100644
--- a/src/cmd/astro/sunt.c
+++ b/src/cmd/astro/sunt.c
@@ -122,7 +122,7 @@
 	-1.33e-6, 0,
 	 0.37e-6, 0,
 	 0.36e-6, 0,
-	0,
+	0
 };
 char	suncp[]	=
 {
@@ -238,5 +238,5 @@
 	1,0,0,
 	1,-1,0,
 	1,1,0,
-	1,0,-1,
+	1,0,-1
 };
diff --git a/src/cmd/astro/uran.c b/src/cmd/astro/uran.c
index b40fabe..33e6f1b 100644
--- a/src/cmd/astro/uran.c
+++ b/src/cmd/astro/uran.c
@@ -2,21 +2,21 @@
 
 static	double	elem[] =
 {
-	36525.0,		// [0] eday of epoc
+	36525.0,		/* [0] eday of epoc */
 
-	19.19126393,		// [1] semi major axis (au)
-	0.04716771,		// [2] eccentricity
- 	0.76986,		// [3] inclination (deg)
-	74.22988,		// [4] longitude of the ascending node (deg)
-	170.96424,		// [5] longitude of perihelion (deg)
-	313.23218,		// [6] mean longitude (deg)
+	19.19126393,		/* [1] semi major axis (au) */
+	0.04716771,		/* [2] eccentricity */
+ 	0.76986,		/* [3] inclination (deg) */
+	74.22988,		/* [4] longitude of the ascending node (deg) */
+	170.96424,		/* [5] longitude of perihelion (deg) */
+	313.23218,		/* [6] mean longitude (deg) */
 
-	0.00152025,		// [1+6] (au/julian century)
-	-0.00019150,		// [2+6] (e/julian century)
-  	-2.09,			// [3+6] (arcsec/julian century)
-	-1681.40,		// [4+6] (arcsec/julian century)
-	1312.56,		// [5+6] (arcsec/julian century)
-	1542547.79,		// [6+6] (arcsec/julian century)
+	0.00152025,		/* [1+6] (au/julian century) */
+	-0.00019150,		/* [2+6] (e/julian century) */
+  	-2.09,			/* [3+6] (arcsec/julian century) */
+	-1681.40,		/* [4+6] (arcsec/julian century) */
+	1312.56,		/* [5+6] (arcsec/julian century) */
+	1542547.79,		/* [6+6] (arcsec/julian century) */
 };
 
 void
@@ -32,12 +32,12 @@
 
 	double cy;
 
-	cy = (eday - elem[0]) / 36525.;		// per julian century
+	cy = (eday - elem[0]) / 36525.;		/* per julian century */
 
 	mrad = elem[1] + elem[1+6]*cy;
 	ecc = elem[2] + elem[2+6]*cy;
 
-	cy = cy / 3600;				// arcsec/deg per julian century
+	cy = cy / 3600;				/* arcsec/deg per julian century */
 	incl = elem[3] + elem[3+6]*cy;
 	node = elem[4] + elem[4+6]*cy;
 	argp = elem[5] + elem[5+6]*cy;
diff --git a/src/cmd/astro/venust.c b/src/cmd/astro/venust.c
index a4521af..e34643a 100644
--- a/src/cmd/astro/venust.c
+++ b/src/cmd/astro/venust.c
@@ -27,7 +27,7 @@
 	0.717e-6,	2.2969,
 	2.991e-6,	2.0611,
 	1.335e-6,	0.9628,
-	0.,
+	0.
 };
 
 char	vencp[]	=
@@ -56,5 +56,5 @@
 	4,-5,0,0,
 	2,0,-3,0,
 	1,0,0,-1,
-	2,0,0,-2,
+	2,0,0,-2
 };