[Pkg-wmaker-commits] [wmmoonclock] 06/15: Remove trailing whitespace.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 14 23:32:57 UTC 2017


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

dtorrance-guest pushed a commit to branch upstream
in repository wmmoonclock.

commit 487c4e2f24a5660f3bc7317d167ed466438e5c10
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sun Oct 5 10:29:59 2014 -0500

    Remove trailing whitespace.
---
 changelog         |   6 +--
 src/CalcEphem.c   |  22 +++++-----
 src/Makefile      |   2 +-
 src/Moon.c        |  46 ++++++++++----------
 src/MoonRise.c    |   2 +-
 src/wmMoonClock.1 |  20 ++++-----
 src/wmMoonClock.c | 126 +++++++++++++++++++++++++++---------------------------
 src/xutils.c      |  48 ++++++++++-----------
 src/xutils.h      |   4 +-
 9 files changed, 138 insertions(+), 138 deletions(-)

diff --git a/changelog b/changelog
index 24e5e8a..28853d4 100644
--- a/changelog
+++ b/changelog
@@ -53,7 +53,7 @@
  *                     	Now auto-detects 8-bit display and forces the LowColor pixmap to
  *			be used. The -low option still works if you need to conserve colors
  *			even on high-color displays.
- *			
+ *
  *			Added 3 command line options + code to change colors of the data
  *			entries:
  *
@@ -85,9 +85,9 @@
  *			  conversion of AGE....).
  *			+ Horizon Coords. Altitude is measured up from horizon to
  *			  Moon in degrees. Azimuth is in degrees from due south.
- *			
+ *
  *       	      Also shuffled things around a bit...
- *			
+ *
  *
  *
  *	Version 1.1 - released December 24, 1998.
diff --git a/src/CalcEphem.c b/src/CalcEphem.c
index 97d9ca9..fc4aefc 100644
--- a/src/CalcEphem.c
+++ b/src/CalcEphem.c
@@ -38,7 +38,7 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
 
 
 
-    /* 
+    /*
      *  Compute Greenwich Mean Sidereal Time (gmst)
      *  The TU here is number of Julian centuries
      *  since 2000 January 1.5
@@ -47,14 +47,14 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
     TU = (jd(year, month, day, 0.0) - 2451545.0)/36525.0;
     TU2 = TU*TU;
     TU3 = TU2*TU;
-    T0 = (6.0 + 41.0/60.0 + 50.54841/3600.0) + 8640184.812866/3600.0*TU 
+    T0 = (6.0 + 41.0/60.0 + 50.54841/3600.0) + 8640184.812866/3600.0*TU
             + 0.093104/3600.0*TU2 - 6.2e-6/3600.0*TU3;
     T0 = hour24(T0);
     c->gmst = hour24(T0 + UT*1.002737909);
 
 
     /* convert to radians for ease later on */
-    gmst = c->gmst*15.0*M_PI/180.0; 
+    gmst = c->gmst*15.0*M_PI/180.0;
 
     lmst = 24.0*frac( (c->gmst - c->Glon/15.0) / 24.0 );
 
@@ -67,7 +67,7 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
      *
      *   Construct Transformation Matrix from GEI to GSE  systems
      *
-     * 
+     *
      *   First compute:
      *          mean ecliptic longitude of sun at epoch TU (varep)
      *          elciptic longitude of perigee at epoch TU (varpi)
@@ -91,7 +91,7 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
      * centuries since epoch 2000 January 1.5
      */
     TU  = (jd(year, month, day, TDT) - jd(2000, 1, 1, 12.0))/36525.0;
-    epsilon = (23.43929167 - 0.013004166*TU - 1.6666667e-7*TU*TU 
+    epsilon = (23.43929167 - 0.013004166*TU - 1.6666667e-7*TU*TU
                 - 5.0277777778e-7*TU*TU*TU)*RadPerDeg;
     c->epsilon = epsilon;
 
@@ -102,8 +102,8 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
      *          The Mean Anomaly (M)
      *          The True Anomaly (nu)
      *	    The Eccentric Anomaly via Keplers equation (E)
-     *          
-     *          
+     *
+     *
      */
     days  = jd(year, month, day, TDT) - jd(year, month, day, TDT);
     M = angle2pi(2.0*M_PI/365.242191*days + varep - varpi);
@@ -112,14 +112,14 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
     lambnew = angle2pi(nu + varpi);
     c->lambda_sun = lambnew;
 
-	
+
     /*
      *  Compute distance from earth to the sun
      */
     r0 = 1.495985e8;  /* in km */
     earth_sun_distance  = r0*(1-eccen*eccen)/(1.0 + eccen*cos(nu))/6371.2;
     c->earth_sun_dist = earth_sun_distance;
-	
+
 
 
 
@@ -181,12 +181,12 @@ CTrans 		*c;	/* structure containing all the relevent coord trans info */
     c->MoonAge = (TU - NewMoon(Ta, Tb, Tc))*36525.0;
 
 
-    
+
     /*
      * Compute Earth-Moon distance
      */
     c->EarthMoonDistance = R;
-    
+
 
 
 }
diff --git a/src/Makefile b/src/Makefile
index b31bdfc..da08654 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,7 +21,7 @@ OBJS   = wmMoonClock.o CalcEphem.o Moon.o MoonRise.o \
 all:	wmMoonClock.o wmMoonClock
 
 wmMoonClock.o: wmMoonClock_master.xpm wmMoonClock_mask.xbm CalcEphem.h
-wmMoonClock:	$(OBJS) 
+wmMoonClock:	$(OBJS)
 	$(CC) $(CFLAGS) $(SYSTEM) -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
 
 clean:
diff --git a/src/Moon.c b/src/Moon.c
index f7e001d..6cc4e21 100644
--- a/src/Moon.c
+++ b/src/Moon.c
@@ -31,7 +31,7 @@ double	DL0, DL, DD, DGAM, DLS, DF;
 double	L0, L, LS, F, D;
 double	ARG = 0.0, FAC = 0.0;
 int	MAX = 0, i, j;
-double	S; 
+double	S;
 
 
     T2 = T*T;
@@ -66,20 +66,20 @@ double	S;
 
     for (i=1; i<=4; ++i){
         switch (i){
-	    case 1: 
+	    case 1:
 		ARG = L,  MAX = 4, FAC = 1.000002208;
 		break;
-	    case 2: 
+	    case 2:
 		ARG = LS, MAX = 3, FAC = 0.997504612 - 0.002495388*T;
 		break;
-	    case 3: 
+	    case 3:
 		ARG = F,  MAX = 4, FAC = 1.000002708 + 139.978*DGAM;
 		break;
-	    case 4: 
+	    case 4:
 		ARG = D,  MAX = 6, FAC = 1.0;
 		break;
         }
-    
+
         CO[6+0][i] = 1.0, CO[6+1][i] = cos(ARG)*FAC;
         SI[6+0][i] = 0.0, SI[6+1][i] = sin(ARG)*FAC;
         for (j=2; j<=MAX; ++j) addthe(CO[6+j-1][i], SI[6+j-1][i], CO[6+1][i], SI[6+1][i], &CO[6+j][i], &SI[6+j][i]);
@@ -183,7 +183,7 @@ double	S;
     addsol(    9.366,    0.71, 0.0  ,  -0.0112,1, 0,-2,-2);
     addsol(    0.202,    0.02, 0.0  ,   0.0   ,1, 0,-2,-4);
 
-    /* 
+    /*
      *  Solar3
      */
     addsol(    0.415,    0.10, 0.0  ,  0.0013,0, 1, 2, 0);
@@ -378,11 +378,11 @@ double NewMoon(double ax, double bx, double cx){
 
 
 /*
- * MINI_MOON: low precision lunar coordinates (approx. 5'/1')   
- *            T  : time in Julian centuries since J2000        
- *                 ( T=(JD-2451545)/36525 )                   
- *            RA : right ascension (in h; equinox of date)   
- *            DEC: declination (in deg; equinox of date)    
+ * MINI_MOON: low precision lunar coordinates (approx. 5'/1')
+ *            T  : time in Julian centuries since J2000
+ *                 ( T=(JD-2451545)/36525 )
+ *            RA : right ascension (in h; equinox of date)
+ *            DEC: declination (in deg; equinox of date)
  *
  */
 void MiniMoon(double T, double *RA, double *DEC){
@@ -390,7 +390,7 @@ void MiniMoon(double T, double *RA, double *DEC){
     double	L0,L,LS,F,D,H,S,N,DL,CB,L_MOON,B_MOON,V,W,X,Y,Z,RHO;
     double	frac(), cosEPS, sinEPS, P2, ARC;
 
- 
+
     cosEPS = 0.91748;
     sinEPS = 0.39778;
     P2 	= 6.283185307;
@@ -400,32 +400,32 @@ void MiniMoon(double T, double *RA, double *DEC){
     /*
      * mean elements of lunar orbit
      */
-    L0 = frac(0.606433+1336.855225*T); /* mean longitude Moon (in rev) */   
+    L0 = frac(0.606433+1336.855225*T); /* mean longitude Moon (in rev) */
     L  = P2*frac(0.374897+1325.552410*T); /* mean anomaly of the Moon     */
     LS = P2*frac(0.993133+  99.997361*T); /* mean anomaly of the Sun      */
     D  = P2*frac(0.827361+1236.853086*T); /* diff. longitude Moon-Sun     */
     F  = P2*frac(0.259086+1342.227825*T); /* mean argument of latitude    */
-    DL  =  +22640.0*sin(L) - 4586.0*sin(L-2.0*D) + 2370.0*sin(2.0*D) +  769.0*sin(2.0*L) 
+    DL  =  +22640.0*sin(L) - 4586.0*sin(L-2.0*D) + 2370.0*sin(2.0*D) +  769.0*sin(2.0*L)
             -668.0*sin(LS)- 412.0*sin(2.0*F) - 212.0*sin(2.0*L-2.0*D) - 206.0*sin(L+LS-2.0*D)
             +192.0*sin(L+2.0*D) - 165.0*sin(LS-2.0*D) - 125.0*sin(D) - 110.0*sin(L+LS)
             +148.0*sin(L-LS) - 55.0*sin(2.0*F-2.0*D);
-    S  =  F + (DL+412.0*sin(2.0*F)+541.0*sin(LS)) / ARC; 
+    S  =  F + (DL+412.0*sin(2.0*F)+541.0*sin(LS)) / ARC;
     H  =  F-2.0*D;
-    N  =  -526.0*sin(H) + 44.0*sin(L+H) - 31.0*sin(-L+H) - 23.0*sin(LS+H) 
+    N  =  -526.0*sin(H) + 44.0*sin(L+H) - 31.0*sin(-L+H) - 23.0*sin(LS+H)
          + 11.0*sin(-LS+H) -25.0*sin(-2.0*L+F) + 21.0*sin(-L+F);
     L_MOON  =  P2 * frac ( L0 + DL/1296e3 ); /* in rad */
     B_MOON  =  ( 18520.0*sin(S) + N ) / ARC; /* in rad */
 
     /* equatorial coordinates */
     CB = cos(B_MOON);
-    X = CB*cos(L_MOON); 
-    V = CB*sin(L_MOON); 
+    X = CB*cos(L_MOON);
+    V = CB*sin(L_MOON);
     W = sin(B_MOON);
-    Y = cosEPS*V-sinEPS*W; 
-    Z = sinEPS*V+cosEPS*W; 
+    Y = cosEPS*V-sinEPS*W;
+    Z = sinEPS*V+cosEPS*W;
     RHO = sqrt(1.0-Z*Z);
-    *DEC  =  (360.0/P2)*atan2(Z, RHO); 
-    *RA   =  ( 48.0/P2)*atan2(Y, X+RHO); 
+    *DEC  =  (360.0/P2)*atan2(Z, RHO);
+    *RA   =  ( 48.0/P2)*atan2(Y, X+RHO);
     if (*RA<0.0) *RA += 24.0;
 
 
diff --git a/src/MoonRise.c b/src/MoonRise.c
index 2ecc105..9fcb541 100644
--- a/src/MoonRise.c
+++ b/src/MoonRise.c
@@ -159,7 +159,7 @@ double SinH(int year, int month, int day, double UT){
      *  Compute Greenwich Mean Sidereal Time (gmst)
      */
     UT = 24.0*frac( UT/24.0 );
-    /* this is for the ephemeris meridian??? 
+    /* this is for the ephemeris meridian???
     gmst = 6.697374558 + 1.0027379093*UT + (8640184.812866+(0.093104-6.2e-6*TU)*TU)*TU/3600.0;
     */
     gmst = UT + 6.697374558 + (8640184.812866+(0.093104-6.2e-6*TU)*TU)*TU/3600.0;
diff --git a/src/wmMoonClock.1 b/src/wmMoonClock.1
index cd6bdf8..db6c05f 100644
--- a/src/wmMoonClock.1
+++ b/src/wmMoonClock.1
@@ -1,4 +1,4 @@
-.TH WMMOONCLOCK 1 "21 December 1998" 
+.TH WMMOONCLOCK 1 "21 December 1998"
 .SH NAME
 WMMOONCLOCK \- Dockable Moon Phase Clock
 .SH SYNOPSIS
@@ -15,11 +15,11 @@ are;
 Shows the Moon phase image.
 .TP
 .B Second Page
-Shows the current Local Time (LT) and Universal Time (UT), the Moon's Age 
-(number of days since last new moon), the geometric (as opposed to temporal) 
-fraction of the way through the current lunar cyle (e.g. 50\% for full moon), the 
-fraction of the Moon's disc that is illuminated (ratio of area illuminated to 
-total area of disc) and whether the Moon is (locally) visible of not (i.e. is 
+Shows the current Local Time (LT) and Universal Time (UT), the Moon's Age
+(number of days since last new moon), the geometric (as opposed to temporal)
+fraction of the way through the current lunar cyle (e.g. 50\% for full moon), the
+fraction of the Moon's disc that is illuminated (ratio of area illuminated to
+total area of disc) and whether the Moon is (locally) visible of not (i.e. is
 it above the horizon?).
 .TP
 .B Third Page
@@ -27,21 +27,21 @@ Shows the Rise and Set times for yesterday (first line), today (middle line), an
 tommorrow (last line). If the Moon does not rise or set on a given day a `null
 time' is shown (\-\-:\-\-). Note that these times should still be good for high
 latitude observers. Also note that there will always be at least one (\-\-:\-\-)
-showing up per month. This is because once per month the Moon will rise (set) on 
+showing up per month. This is because once per month the Moon will rise (set) on
 a given day but will set (rise) in the very early portion of the next day.
 .TP
 .B Fourth Page
 Shows the Moon's horizon coordinates (i.e. the Altitude/Azimuth system). Azimuth is
-measured in degrees CCW from due south, and altitude is measured in degrees from 
+measured in degrees CCW from due south, and altitude is measured in degrees from
 the horizon up to the Moon. Distance (Dist) is measured in units on Earth radii (1 Re is
 about 6370km). Note that this is a local coordinate system and will not be correct if the
 observer's latitude and longitude are not set correctly.
 .TP
 .B Fifth Page
-Shows the Moon's ecliptic coordinates. (i.e. the Right Ascention/Declination system). 
+Shows the Moon's ecliptic coordinates. (i.e. the Right Ascention/Declination system).
 Useful for astronomers?
 .PP
-Many of the quantities shown will not be correct unless LT and UT are correct, and the user 
+Many of the quantities shown will not be correct unless LT and UT are correct, and the user
 specifies the proper latitude and longitude.
 .SH OPTIONS
 .TP
diff --git a/src/wmMoonClock.c b/src/wmMoonClock.c
index 2c46973..af9bdbb 100644
--- a/src/wmMoonClock.c
+++ b/src/wmMoonClock.c
@@ -1,12 +1,12 @@
 /*
  *
  *  	wmMoonClock-1.26 (C) 1998, 1999 Mike Henderson (mghenderson at lanl.gov)
- * 
+ *
  *  		- Shows Moon Phase....
- *          
- * 
- * 
- * 
+ *
+ *
+ *
+ *
  *
  * 	This program is free software; you can redistribute it and/or modify
  * 	it under the terms of the GNU General Public License as published by
@@ -20,11 +20,11 @@
  *
  * 	You should have received a copy of the GNU General Public License
  * 	along with this program (see the file COPYING); if not, write to the
- * 	Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * 	Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  *      Boston, MA 02110-1301 USA
  *
  *      Things TODO:
- *                  - clean up code! 
+ *                  - clean up code!
  *                  - more detailed documentation.
  *                  - reduce size of pixmap! Dont need it in one pixmap.
  *		      Aslo, does the hi-color pixmap really need all those colors?
@@ -34,8 +34,8 @@
  * 		       as costly as the Moon calcs.) Sun posiiton is calculated but not used yet...
  *		    - Next new moons, next full moons, next quarters, etc...
  *		    - Moon names. I.e. Harvest, Blue, etc...
- *                  
- *                 
+ *
+ *
  *
  *      Changes:
  *      Version 1.27 - 	released June 7, 1999.
@@ -47,44 +47,44 @@
  *                     	Now auto-detects 8-bit display and forces the LowColor pixmap to
  *			be used. The -low option still works if you need to conserve colors
  *			even on high-color displays.
- *			
+ *
  *			Added 3 command line options + code to change colors of the data
  *			entries:
- *                  
- *				-bc <Color> to change background color.                  
- *				-lc <Color> to change color of labels and headers.                  
+ *
+ *				-bc <Color> to change background color.
+ *				-lc <Color> to change color of labels and headers.
  *				-dc <Color> to change color of data values.
- *                  
+ *
  *      Version 1.24 - 	released February 9, 1999.
  *                     	Added low color support via the -low command line option.
- *                  
+ *
  *      Version 1.23 - 	released February 4, 1999.
  *                     	cosmetic for AfterStep users. removed spurious black line at RHS edge an mask.
  *
- *	Version 1.22 - 	released January 8, 1999. 
+ *	Version 1.22 - 	released January 8, 1999.
  *
  *		       	+ Changed PI2 to TwoPi in Moon.c -- Linux Pyth. had probs because
  *                        PI2 was defined in <math.h>.
  *
- *	Version 1.21 -  released January 7, 1999. 
- *    
+ *	Version 1.21 -  released January 7, 1999.
+ *
  *                     + minor bug fixes in Makefile and manpage.
  *
- *	Version 1.2 - released January 3, 1999. 
+ *	Version 1.2 - released January 3, 1999.
  *		      Added:
  *
  *			+ Local Time/ Universal Time display.
  *			+ Visible: Yes/No to indicate if Moon is up or not.
  *			+ Frac (percent through orbit -- this is NOT a simple
  *			  conversion of AGE....).
- *			+ Horizon Coords. Altitude is measured up from horizon to 
+ *			+ Horizon Coords. Altitude is measured up from horizon to
  *			  Moon in degrees. Azimuth is in degrees from due south.
- *			
+ *
  *       	      Also shuffled things around a bit...
- *			
  *
  *
- *	Version 1.1 - released December 24, 1998. 
+ *
+ *	Version 1.1 - released December 24, 1998.
  *                    Fixed bug in AGE calculation. It now should be highly accurate.
  *                    Note that AGE is not the same as Phase*29.530589 ...
  *                    I have checked with the Astronomical Almanac and it agrees very
@@ -101,8 +101,8 @@
 
 
 
-/*  
- *   Includes  
+/*
+ *   Includes
  */
 #include <stdio.h>
 #include <unistd.h>
@@ -120,8 +120,8 @@
 
 
 
-/* 
- *  Delay between refreshes (in microseconds) 
+/*
+ *  Delay between refreshes (in microseconds)
  */
 #define DELAY 1000000L
 #define WMMOONCLOCK_VERSION "1.27"
@@ -137,7 +137,7 @@ void print_usage();
 
 int	ToggleWindow = 0;
 int	nMAX = 1;
-int	Flag = 1; 
+int	Flag = 1;
 double 	Glat, Glon, SinGlat, CosGlat, TimeZone;
 int	UseLowColorPixmap = 0;
 char    LabelColor[30]    = "#a171ff";
@@ -149,8 +149,8 @@ char    BackColor[30]     = "#010101";
 
 
 
-/*  
- *   main  
+/*
+ *   main
  */
 int main(int argc, char *argv[]) {
 
@@ -172,7 +172,7 @@ int main(int argc, char *argv[]) {
 
 
 
-  
+
     /*
      *  Parse any command line arguments.
      */
@@ -180,9 +180,9 @@ int main(int argc, char *argv[]) {
     ParseCMDLine(argc, argv);
     c.Glat = Glat, c.Glon = Glon;
     Glat *= RadPerDeg; SinGlat = sin( Glat ); CosGlat = cos( Glat );
-   
 
-   
+
+
     initXwindow(argc, argv);
     if ((DisplayDepth <= 8)||UseLowColorPixmap)
         openXwindow(argc, argv, wmMoonClock_masterLow, wmMoonClock_mask_bits, wmMoonClock_mask_width, wmMoonClock_mask_height, BackColor, LabelColor, DataColor);
@@ -192,7 +192,7 @@ int main(int argc, char *argv[]) {
 
 
 
-   
+
     /*
      *  Loop until we die
      */
@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) {
 
 	    n = 0;
 
-            CurrentGMTTime = time(CurrentTime); GMTTime = gmtime(&CurrentGMTTime); 
+            CurrentGMTTime = time(CurrentTime); GMTTime = gmtime(&CurrentGMTTime);
 	    UT = GMTTime->tm_hour + GMTTime->tm_min/60.0 + GMTTime->tm_sec/3600.0;
 	    Year = GMTTime->tm_year+1900;
 	    Month = GMTTime->tm_mon+1;
@@ -267,7 +267,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up LT and UT. 
+		 *  Paste up LT and UT.
 		 */
 		val = LocalHour;
 		H = (int)val; val = (val - H)*60.0;
@@ -294,7 +294,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up AGE. 
+		 *  Paste up AGE.
 		 */
 		val = c.MoonAge;
 		q = (val < 10.0) ? 5 : 0;
@@ -312,7 +312,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up Phase (Percent Illuminated). 
+		 *  Paste up Phase (Percent Illuminated).
 		 */
 		val = 0.5*( 1.0 - cos(c.MoonPhase*6.2831853) );
 		val *= 100.0;
@@ -335,7 +335,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up Frac (Percent of way through current lunar cycle). 
+		 *  Paste up Frac (Percent of way through current lunar cycle).
 		 */
 		val = c.MoonPhase*100.0;
 		A = (int)(val+0.5);
@@ -355,7 +355,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up Visible Status. 
+		 *  Paste up Visible Status.
 		 */
 		if (c.Visible)
 	            copyXPMArea(6,  327, 13, 6, 46, 51);
@@ -383,8 +383,8 @@ int main(int argc, char *argv[]) {
 		/*
 		 *   Do Yesterday's first
 		 */
-	        MoonRise(Year, Month, DayOfMonth-1, LocalHour, &UTRise, &UTSet); 
-		UTTohhmm(UTRise, &H, &M); 
+	        MoonRise(Year, Month, DayOfMonth-1, LocalHour, &UTRise, &UTSet);
+		UTTohhmm(UTRise, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 7, 19);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 7+5, 19);
@@ -396,7 +396,7 @@ int main(int argc, char *argv[]) {
 		    copyXPMArea(117, 354, 1, 4, 7+10, 20);
 		    copyXPMArea(57, 355, 5, 1, 7+12, 22); copyXPMArea(57, 355, 5, 1, 7+17, 22);
 		}
-		UTTohhmm(UTSet, &H, &M); 
+		UTTohhmm(UTSet, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 35, 19);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 35+5, 19);
@@ -414,7 +414,7 @@ int main(int argc, char *argv[]) {
 		 *  Plot up todays Rise/Set times.
 		 */
 	        MoonRise(Year, Month, DayOfMonth,   LocalHour, &UTRise, &UTSet);
-		UTTohhmm(UTRise, &H, &M); 
+		UTTohhmm(UTRise, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 7, 29);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 7+5, 29);
@@ -426,7 +426,7 @@ int main(int argc, char *argv[]) {
 		    copyXPMArea(117, 354, 1, 4, 7+10, 30);
 		    copyXPMArea(57, 355, 5, 1, 7+12, 32); copyXPMArea(57, 355, 5, 1, 7+17, 32);
 		}
-		UTTohhmm(UTSet, &H, &M); 
+		UTTohhmm(UTSet, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 35, 29);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 35+5, 29);
@@ -445,7 +445,7 @@ int main(int argc, char *argv[]) {
 		 *  Plot up tomorrow's Rise/Set times.
 		 */
 	        MoonRise(Year, Month, DayOfMonth+1, LocalHour, &UTRise, &UTSet);
-		UTTohhmm(UTRise, &H, &M); 
+		UTTohhmm(UTRise, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 7, 39);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 7+5, 39);
@@ -457,7 +457,7 @@ int main(int argc, char *argv[]) {
 		    copyXPMArea(117, 354, 1, 4, 7+10, 40);
 		    copyXPMArea(57, 355, 5, 1, 7+12, 42); copyXPMArea(57, 355, 5, 1, 7+17, 42);
 		}
-		UTTohhmm(UTSet, &H, &M); 
+		UTTohhmm(UTSet, &H, &M);
 		if (H >= 0){
 		    digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 35, 39);
 		    digit = H%10; copyXPMArea(67+digit*5, 353, 5, 7, 35+5, 39);
@@ -497,7 +497,7 @@ int main(int argc, char *argv[]) {
 		D = (int)val;
 		val = (val-(double)D)*100.0;
 		M = (int)val;
-		
+
 		if (sgn < 0) copyXPMArea(120, 357, 2, 1, 19, 27);
 
 		/* degrees 100's */
@@ -534,7 +534,7 @@ int main(int argc, char *argv[]) {
 		D = (int)val;
 		val = (val-(double)D)*100.0;
 		M = (int)val;
-		
+
 		if (sgn < 0) copyXPMArea(120, 357, 2, 1, 19, 39);
 
 		/* degrees 10's */
@@ -559,7 +559,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up Earth-Moon Distance (in units of Earth radii). 
+		 *  Paste up Earth-Moon Distance (in units of Earth radii).
 		 */
 		val = c.EarthMoonDistance;
 		A = (int)val;
@@ -598,7 +598,7 @@ int main(int argc, char *argv[]) {
 		RA = (RA-(double)H)*60.0;
 		M = (int)RA; RA = (RA-(double)M)*60.0;
 		S = (int)(RA+0.5);
-		
+
 		/* hours 10's */
 		digit = H/10; copyXPMArea(67+digit*5, 353, 5, 7, 17, 25);
 
@@ -640,7 +640,7 @@ int main(int argc, char *argv[]) {
 		M = (int)DEC;
 		DEC = (DEC-(double)M)*60.0;
 		S = (int)(DEC+0.5);
-		
+
 		if (sgn < 0) copyXPMArea(120, 357, 2, 1, 14, 39);
 
 
@@ -675,7 +675,7 @@ int main(int argc, char *argv[]) {
 
 
 		/*
-		 *  Paste up Earth-Moon Distance (in units of Earth radii). 
+		 *  Paste up Earth-Moon Distance (in units of Earth radii).
 		 */
 		val = c.EarthMoonDistance;
 		A = (int)val;
@@ -689,14 +689,14 @@ int main(int argc, char *argv[]) {
 
 
 
-	    } 
+	    }
 
 
 
 	} else {
 
 	    /*
-	     *  Update the counter. 
+	     *  Update the counter.
 	     */
 	    ++n;
 
@@ -714,7 +714,7 @@ int main(int argc, char *argv[]) {
 
 
 
-	/* 
+	/*
 	 *   Process any pending X events.
 	 */
         while(XPending(display)){
@@ -735,9 +735,9 @@ int main(int argc, char *argv[]) {
 
 
 
-	
-	/* 
-	 *  Redraw and wait for next update 
+
+	/*
+	 *  Redraw and wait for next update
 	 */
 	RedrawWindow();
 	timeout.tv_sec = DELAY / 1000000L;
@@ -758,14 +758,14 @@ int main(int argc, char *argv[]) {
 
 
 
-/* 
- *   ParseCMDLine()  
+/*
+ *   ParseCMDLine()
  */
 void ParseCMDLine(int argc, char *argv[]) {
 
     int  i;
     char *eptr;
-  
+
     for (i = 1; i < argc; i++) {
 
         if (!strcmp(argv[i], "-display")){
@@ -836,7 +836,7 @@ void ParseCMDLine(int argc, char *argv[]) {
             }
 
 	} else {
-	    
+
 	    print_usage();
 	    exit(1);
 	}
diff --git a/src/xutils.c b/src/xutils.c
index 40ecec0..25d2e1f 100644
--- a/src/xutils.c
+++ b/src/xutils.c
@@ -1,10 +1,10 @@
 /*
  *   xutils.c - A collection of X-windows utilties for creating WindowMAker
- *		DockApps. 
+ *		DockApps.
  *
  *     This file contains alot of the lower-level X windows routines. Origins with wmppp
  *     (by  Martijn Pieterse (pieterse at xs4all.nl)), but its been hacked up quite a bit
- *     and passed on from one new DockApp to the next. 
+ *     and passed on from one new DockApp to the next.
  *
  *
  *
@@ -27,7 +27,7 @@
  *
  *
  *
- */  
+ */
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -42,7 +42,7 @@
 
 
 /*
- *   X11 Variables 
+ *   X11 Variables
  */
 int		x_fd;
 XSizeHints	mysizehints;
@@ -85,7 +85,7 @@ static int flush_expose(Window w) {
  *   RedrawWindowXY
  */
 void RedrawWindow(void) {
-	
+
     flush_expose(iconwin);
     XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
 
@@ -95,7 +95,7 @@ void RedrawWindow(void) {
 }
 
 void RedrawWindowXY(int x, int y) {
-	
+
     flush_expose(iconwin);
     XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
 
@@ -159,8 +159,8 @@ void initXwindow(int argc, char *argv[]){
 /*
  *   openXwindow
  */
-void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, 
-    int pixmask_width, int pixmask_height, char *BackColor, char *LabelColor, 
+void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits,
+    int pixmask_width, int pixmask_height, char *BackColor, char *LabelColor,
     char *DataColor) {
 
     unsigned int	borderwidth = 1;
@@ -175,9 +175,9 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
     					{"DataColor", NULL, 0}};
 
 
-    
 
-    /* 
+
+    /*
      *  Create Pixmap
      */
     cols[0].pixel		  = getColor(BackColor, 1.0);
@@ -187,9 +187,9 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
     wmgen.attributes.colorsymbols = cols;
     wmgen.attributes.exactColors  = False;
     wmgen.attributes.closeness    = 40000;
-    wmgen.attributes.valuemask    = XpmReturnPixels | XpmReturnExtensions | XpmColorSymbols 
+    wmgen.attributes.valuemask    = XpmReturnPixels | XpmReturnExtensions | XpmColorSymbols
 							| XpmExactColors | XpmCloseness | XpmSize;
-    if (XpmCreatePixmapFromData(display, Root, pixmap_bytes, 
+    if (XpmCreatePixmapFromData(display, Root, pixmap_bytes,
       &(wmgen.pixmap), &(wmgen.mask), &(wmgen.attributes)) != XpmSuccess){
 	fprintf(stderr, "Not enough free colorcells.\n");
 	exit(1);
@@ -198,8 +198,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 
 
 
-    /* 
-     *  Create a window 
+    /*
+     *  Create a window
      */
     mysizehints.flags = USSize | USPosition;
     mysizehints.x = 0;
@@ -213,19 +213,19 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 
     mysizehints.width = 64;
     mysizehints.height = 64;
-		
+
 
 
     win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
 				mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
-	
+
     iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
 				mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
 
 
 
-    /* 
-     *  Activate hints 
+    /*
+     *  Activate hints
      */
     XSetWMNormalHints(display, win, &mysizehints);
     classHint.res_name = wname;
@@ -240,11 +240,11 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
      *  effect. I.e. for some you will need to Grab the focus and then return
      *  it after you are done...
      */
-    XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask 
-		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask 
+    XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask
+		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask
 						| KeyPressMask | KeyReleaseMask);
-    XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask 
-		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask 
+    XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask
+		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask
 						| KeyPressMask | KeyReleaseMask);
 
 
@@ -256,8 +256,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 
     XSetWMName(display, win, &name);
 
-    /* 
-     *   Create Graphics Context (GC) for drawing 
+    /*
+     *   Create Graphics Context (GC) for drawing
      */
     gcm = GCForeground | GCBackground | GCGraphicsExposures;
     gcv.foreground = fore_pix;
diff --git a/src/xutils.h b/src/xutils.h
index aa8a795..586942b 100644
--- a/src/xutils.h
+++ b/src/xutils.h
@@ -4,7 +4,7 @@
 
 
 /*
- *   Typedefs 
+ *   Typedefs
  */
 typedef struct {
 	Pixmap		pixmap;
@@ -21,7 +21,7 @@ typedef struct {
 Display		*display;
 Window          Root;
 Window          iconwin, win;
-int             screen; 
+int             screen;
 int             DisplayDepth;
 
 

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



More information about the Pkg-wmaker-commits mailing list