[Pkg-wmaker-commits] [wmsun] 23/73: wmsun: Fix implicit definition warnings.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Aug 28 12:04:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmsun.

commit 6c1d1ea44c696df875c58368ae6d5fe953cc354c
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Jun 14 17:04:38 2015 -0500

    wmsun: Fix implicit definition warnings.
    
    Add declaration for SunRise() in wmSun.c and move Interp() earlier in
    SunRise.c.
---
 SunRise.c | 59 +++++++++++++++++++++++++----------------------------------
 wmSun.c   |  3 ++-
 2 files changed, 27 insertions(+), 35 deletions(-)

diff --git a/SunRise.c b/SunRise.c
index 1126667..0a8e43c 100644
--- a/SunRise.c
+++ b/SunRise.c
@@ -10,6 +10,31 @@ double    cosEPS = 0.91748;
 double    sinEPS = 0.39778;
 double    P2  = 6.283185307;
 
+Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
+
+    double	a, b, c, d, dx;
+
+    *nz = 0;
+    a = 0.5*(ym+yp)-y0;
+    b = 0.5*(yp-ym);
+    c = y0;
+    *xe = -b/(2.0*a);
+    *ye = (a*(*xe) + b) * (*xe) + c;
+    d = b*b - 4.0*a*c;
+
+    if (d >= 0){
+	dx = 0.5*sqrt(d)/fabs(a);
+	*z1 = *xe - dx;
+	*z2 = *xe+dx;
+	if (fabs(*z1) <= 1.0) *nz += 1;
+	if (fabs(*z2) <= 1.0) *nz += 1;
+	if (*z1 < -1.0) *z1 = *z2;
+    }
+
+    return(0);
+
+
+}
 
 SunRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
 
@@ -93,40 +118,6 @@ UTTohhmm(double UT, int *h, int *m){
 
 }
 
-
-
-
-
-
-Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
-
-    double	a, b, c, d, dx;
-
-    *nz = 0;
-    a = 0.5*(ym+yp)-y0;
-    b = 0.5*(yp-ym);
-    c = y0;
-    *xe = -b/(2.0*a);
-    *ye = (a*(*xe) + b) * (*xe) + c;
-    d = b*b - 4.0*a*c;
-
-    if (d >= 0){
-	dx = 0.5*sqrt(d)/fabs(a);
-	*z1 = *xe - dx;
-	*z2 = *xe+dx;
-	if (fabs(*z1) <= 1.0) *nz += 1;
-	if (fabs(*z2) <= 1.0) *nz += 1;
-	if (*z1 < -1.0) *z1 = *z2;
-    }
-
-    return(0);
-
-
-}
-
-
-
-
 double SinH(int year, int month, int day, double UT){
 
     double	TU0, TU, TU2, TU3, LambdaMoon, BetaMoon, R, AGE, frac(), jd();
diff --git a/wmSun.c b/wmSun.c
index 70ad18c..3873636 100644
--- a/wmSun.c
+++ b/wmSun.c
@@ -98,7 +98,8 @@
 
 void ParseCMDLine(int argc, char *argv[]);
 void pressEvent(XButtonEvent *xev);
-
+SunRise(int year, int month, int day, double LocalHour, double *UTRise,
+	double *UTSet);
 
 int	ToggleWindow = 0;
 int	nMAX = 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmsun.git



More information about the Pkg-wmaker-commits mailing list