Index: trunk/SophyaExt/XephemAstroLib/moon.c
===================================================================
--- trunk/SophyaExt/XephemAstroLib/moon.c	(revision 1719)
+++ trunk/SophyaExt/XephemAstroLib/moon.c	(revision 2551)
@@ -62,10 +62,8 @@
  */
 
+#include <stdlib.h>
+#include <stdio.h>
 #include <math.h>
-#if defined(__STDC__)
-#include <stdlib.h>
-#endif
-
-#include "P_.h"
+
 #include "astro.h"
 
@@ -86,11 +84,11 @@
 };
 
-static double mods3600 P_((double x));
-static void mean_elements P_((double JED));
-static int sscc P_((int k, double arg, int n));
-static int g2plan P_((double J, struct plantbl *plan, double *pobj, int flag));
-static double g1plan P_((double J, struct plantbl *plan));
-static int gecmoon P_((double J, struct plantbl *lrtab,
-	struct plantbl *lattab, double *pobj));
+static double mods3600 (double x);
+static void mean_elements (double JED);
+static int sscc (int k, double arg, int n);
+static int g2plan (double J, struct plantbl *plan, double *pobj, int flag);
+static double g1plan (double J, struct plantbl *plan);
+static int gecmoon (double J, struct plantbl *lrtab,
+	struct plantbl *lattab, double *pobj);
 
 /* time points */
@@ -103,5 +101,4 @@
 static double Args[NARGS];
 static double LP_equinox;
-static double NF_arcsec;
 static double Ea_arcsec;
 static double pA_precession;
@@ -2832,6 +2829,5 @@
    answer in arc seconds  */
 static double
-mods3600(x)
-     double x;
+mods3600(double x)
 {
   double y;
@@ -2848,6 +2844,5 @@
 
 static void
-mean_elements (JED)
-     double JED;
+mean_elements (double JED)
 {
   double x, T, T2;
@@ -2932,5 +2927,4 @@
 	      - 7.5311878482337989e-04) * T /* F, t^3 */
 	     - 1.3117809789650071e+01) * T2; /* F, t^2 */
-  NF_arcsec = x;
   Args[10] = x;
 
@@ -3008,8 +3002,5 @@
  */
 static int 
-sscc (k, arg, n)
-     int k;
-     double arg;
-     int n;
+sscc (int k, double arg, int n)
 {
   double cu, su, cv, sv, s;
@@ -3040,9 +3031,5 @@
    of the same list of arguments.  */
 static int 
-g2plan (J, plan, pobj, flag)
-     double J;
-     struct plantbl *plan;
-     double pobj[];
-     int flag;
+g2plan (double J, struct plantbl *plan, double pobj[], int flag)
 {
   int i, j, k, m, k1, ip, np, nt;
@@ -3168,7 +3155,5 @@
 
 static double
-g1plan (J, plan)
-     double J;
-     struct plantbl *plan;
+g1plan (double J, struct plantbl *plan)
 {
   int i, j, k, m, k1, ip, np, nt;
@@ -3271,8 +3256,5 @@
  */
 static int 
-gecmoon (J, lrtab, lattab, pobj)
-     double J;
-     struct plantbl *lrtab, *lattab;
-     double pobj[];
+gecmoon (double J, struct plantbl *lrtab, struct plantbl *lattab, double pobj[])
 {
   double x;
@@ -3294,6 +3276,6 @@
 /*********** end stephen moshier's moon code ****************/
 
-static void moon_fast P_((double mjd, double *lam, double *bet,
-	double *hp, double *msp, double *mdp));
+static void moon_fast (double mj, double *lam, double *bet,
+	double *hp, double *msp, double *mdp);
 
 /* previous version (elwood):
@@ -3309,8 +3291,6 @@
  */
 static void
-moon_fast (mjd, lam, bet, hp, msp, mdp)
-double mjd;
-double *lam, *bet, *hp;
-double *msp, *mdp;
+moon_fast (double mj, double *lam, double *bet, double *hp, double *msp,
+double *mdp)
 {
 	double t, t2;
@@ -3324,18 +3304,18 @@
 	double m1, m2, m3, m4, m5, m6;
 
-	t = mjd/36525.;
+	t = mj/36525.;
 	t2 = t*t;
 
-	m1 = mjd/27.32158213;
+	m1 = mj/27.32158213;
 	m1 = 360.0*(m1-(long)m1);
-	m2 = mjd/365.2596407;
+	m2 = mj/365.2596407;
 	m2 = 360.0*(m2-(long)m2);
-	m3 = mjd/27.55455094;
+	m3 = mj/27.55455094;
 	m3 = 360.0*(m3-(long)m3);
-	m4 = mjd/29.53058868;
+	m4 = mj/29.53058868;
 	m4 = 360.0*(m4-(long)m4);
-	m5 = mjd/27.21222039;
+	m5 = mj/27.21222039;
 	m5 = 360.0*(m5-(long)m5);
-	m6 = mjd/6798.363307;
+	m6 = mj/6798.363307;
 	m6 = 360.0*(m6-(long)m6);
 
@@ -3456,18 +3436,16 @@
  */
 void
-moon (mjd, lam, bet, rho, msp, mdp)
-double mjd;
-double *lam, *bet, *rho;
-double *msp, *mdp;
+moon (double mj, double *lam, double *bet, double *rho, double *msp,
+double *mdp)
 {
 	double pobj[3], dt;
 	double hp;
 
-	if (mjd >= MOSHIER_BEGIN && mjd <= MOSHIER_END) {
+	if (mj >= MOSHIER_BEGIN && mj <= MOSHIER_END) {
 		/* retard for light time */
-		moon_fast (mjd, lam, bet, &hp, msp, mdp);
+		moon_fast (mj, lam, bet, &hp, msp, mdp);
 		*rho = EarthRadius/AUKM/sin(hp);
 		dt = *rho * 5.7755183e-3;       /* speed of light in a.u/day */
-		gecmoon(mjd + MJD0 - dt, &moonlr, &moonlat, pobj);
+		gecmoon(mj + MJD0 - dt, &moonlr, &moonlat, pobj);
 
 		*lam = pobj[0];
@@ -3478,5 +3456,5 @@
 		*mdp = STR * Args[12];
 	} else {
-		moon_fast (mjd, lam, bet, &hp, msp, mdp);
+		moon_fast (mj, lam, bet, &hp, msp, mdp);
 		*rho = EarthRadius/AUKM/sin(hp);
 
@@ -3485,3 +3463,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moon.c,v $ $Date: 2001-10-22 12:08:27 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moon.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
