wmsun: Remove trailing whitespace.
This commit is contained in:
parent
b919e2ddad
commit
f886377b0f
|
@ -124,7 +124,7 @@ double SinH(int year, int month, int day, double UT){
|
||||||
double TU, frac(), jd();
|
double TU, frac(), jd();
|
||||||
double RA_Sun, DEC_Sun, gmst, lmst, Tau;
|
double RA_Sun, DEC_Sun, gmst, lmst, Tau;
|
||||||
double M, DL, L, SL, X, Y, Z, RHO;
|
double M, DL, L, SL, X, Y, Z, RHO;
|
||||||
|
|
||||||
|
|
||||||
TU = (jd(year, month, day, UT+62.0/3600.0) - 2451545.0)/36525.0;
|
TU = (jd(year, month, day, UT+62.0/3600.0) - 2451545.0)/36525.0;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH WMSUN 1 "5 January 1999"
|
.TH WMSUN 1 "5 January 1999"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
WMSUN \- Dockable WindowMaker SunRise/SunSet App
|
WMSUN \- Dockable WindowMaker SunRise/SunSet App
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -33,7 +33,7 @@ Set the date to show sunrise/sunset for.
|
||||||
.B wmSun -lon 106.3 -lat 35.9
|
.B wmSun -lon 106.3 -lat 35.9
|
||||||
this would display rise/set times at Los Alamos in local time.
|
this would display rise/set times at Los Alamos in local time.
|
||||||
.TP
|
.TP
|
||||||
.B wmSun -lat 19.58 -lon 155.92 -td 10
|
.B wmSun -lat 19.58 -lon 155.92 -td 10
|
||||||
this would display rise/set times in Kona, Hawaii in local time (in winter -- you need to
|
this would display rise/set times in Kona, Hawaii in local time (in winter -- you need to
|
||||||
take into account daylight savings at other times of the year).
|
take into account daylight savings at other times of the year).
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* wmSun-1.03 (C) 1999 Mike Henderson (mghenderson@lanl.gov)
|
* wmSun-1.03 (C) 1999 Mike Henderson (mghenderson@lanl.gov)
|
||||||
*
|
*
|
||||||
* - Shows Sun Rise/Set Times....
|
* - Shows Sun Rise/Set Times....
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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
|
* 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
|
* along with this program (see the file COPYING); if not, write to the
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA
|
* Boston, MA 02111-1307, USA
|
||||||
*
|
*
|
||||||
* Things TODO:
|
* Things TODO:
|
||||||
* - clean up code!
|
* - clean up code!
|
||||||
* - support for 8-bit displays.
|
* - support for 8-bit displays.
|
||||||
* - more detailed documentation.
|
* - more detailed documentation.
|
||||||
* - eclipses?
|
* - eclipses?
|
||||||
|
@ -32,12 +32,12 @@
|
||||||
* Could be something like this;
|
* Could be something like this;
|
||||||
* First click brings up buttons to change date.
|
* First click brings up buttons to change date.
|
||||||
* Second click brings up buttons to change lat/lon.
|
* Second click brings up buttons to change lat/lon.
|
||||||
* Third goes back to display
|
* Third goes back to display
|
||||||
* Set time delay to go back to display if user doesnt do it...
|
* Set time delay to go back to display if user doesnt do it...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Changes:
|
* Changes:
|
||||||
*
|
*
|
||||||
|
@ -66,8 +66,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Includes
|
* Includes
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -83,8 +83,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delay between refreshes (in microseconds)
|
* Delay between refreshes (in microseconds)
|
||||||
*/
|
*/
|
||||||
#define DELAY 10000L
|
#define DELAY 10000L
|
||||||
#define WMSUN_VERSION "1.03"
|
#define WMSUN_VERSION "1.03"
|
||||||
|
@ -103,7 +103,7 @@ void SunRise(int year, int month, int day, double LocalHour, double *UTRise,
|
||||||
|
|
||||||
int ToggleWindow = 0;
|
int ToggleWindow = 0;
|
||||||
int nMAX = 1;
|
int nMAX = 1;
|
||||||
int Flag = 1;
|
int Flag = 1;
|
||||||
int UseUserTimeDiff = 0;
|
int UseUserTimeDiff = 0;
|
||||||
int UseUserDate = 0;
|
int UseUserDate = 0;
|
||||||
long UserDate;
|
long UserDate;
|
||||||
|
@ -115,8 +115,8 @@ int xDigit[11] = {8, 18, 27, 37, 46, 55, 64, 74, 83, 92, 102};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* main
|
* main
|
||||||
*/
|
*/
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
@ -137,22 +137,22 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse any command line arguments.
|
* Parse any command line arguments.
|
||||||
*/
|
*/
|
||||||
Glat = Glon = 0.0;
|
Glat = Glon = 0.0;
|
||||||
ParseCMDLine(argc, argv);
|
ParseCMDLine(argc, argv);
|
||||||
Glat *= RadPerDeg; SinGlat = sin( Glat ); CosGlat = cos( Glat );
|
Glat *= RadPerDeg; SinGlat = sin( Glat ); CosGlat = cos( Glat );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
openXwindow(argc, argv, wmSun_master, (char *)wmSun_mask_bits, wmSun_mask_width, wmSun_mask_height);
|
openXwindow(argc, argv, wmSun_master, (char *)wmSun_mask_bits, wmSun_mask_width, wmSun_mask_height);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop until we die
|
* Loop until we die
|
||||||
*/
|
*/
|
||||||
|
@ -181,7 +181,7 @@ int main(int argc, char *argv[]) {
|
||||||
nMAX = 1000;
|
nMAX = 1000;
|
||||||
|
|
||||||
|
|
||||||
CurrentGMTTime = time(CurrentTime); GMTTime = gmtime(&CurrentGMTTime);
|
CurrentGMTTime = time(CurrentTime); GMTTime = gmtime(&CurrentGMTTime);
|
||||||
DayOfMonth = GMTTime->tm_mday;
|
DayOfMonth = GMTTime->tm_mday;
|
||||||
|
|
||||||
UT = GMTTime->tm_hour + GMTTime->tm_min/60.0 + GMTTime->tm_sec/3600.0;
|
UT = GMTTime->tm_hour + GMTTime->tm_min/60.0 + GMTTime->tm_sec/3600.0;
|
||||||
|
@ -235,7 +235,7 @@ int main(int argc, char *argv[]) {
|
||||||
copyXPMArea(10, 84, 28, 7, 19, 15);
|
copyXPMArea(10, 84, 28, 7, 19, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (LTSet > 0.0){
|
if (LTSet > 0.0){
|
||||||
val = LTSet;
|
val = LTSet;
|
||||||
H = (int)val; val = (val-H)*60.0;
|
H = (int)val; val = (val-H)*60.0;
|
||||||
|
@ -257,7 +257,7 @@ int main(int argc, char *argv[]) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the counter.
|
* Update the counter.
|
||||||
*/
|
*/
|
||||||
++n;
|
++n;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process any pending X events.
|
* Process any pending X events.
|
||||||
*/
|
*/
|
||||||
while(XPending(display)){
|
while(XPending(display)){
|
||||||
|
@ -291,9 +291,9 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Redraw and wait for next update
|
* Redraw and wait for next update
|
||||||
*/
|
*/
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
usleep(DELAY);
|
usleep(DELAY);
|
||||||
|
@ -312,13 +312,13 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ParseCMDLine()
|
* ParseCMDLine()
|
||||||
*/
|
*/
|
||||||
void ParseCMDLine(int argc, char *argv[]) {
|
void ParseCMDLine(int argc, char *argv[]) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
|
|
||||||
if (!strcmp(argv[i], "-display")){
|
if (!strcmp(argv[i], "-display")){
|
||||||
|
|
Loading…
Reference in a new issue