Version 1.28 Debian patches in upstream

This commit is contained in:
Rodolfo Garcia 2011-09-20 11:26:36 +02:00 committed by Carlos R. Mafra
parent e3ceda0456
commit 38d60e97a1
21 changed files with 463 additions and 53 deletions

View file

@ -1 +1 @@
Please send bug reports to mghenderson@lanl.gov
Please send bug reports to wmaker-dev@lists.windowmaker.info

View file

@ -35,9 +35,15 @@
* - Next new moons, next full moons, next quarters, etc...
* - Moon names. I.e. Harvest, Blue, etc...
*
*
*
* Changes:
* Version 1.28 - released September 20, 2011.
* Debian patches added to the upstream version. These patches are included:
* 01_all_previous_diff.diff, 02_update_time.diff, 03_add_southern_hemisphere_support.diff
* 03_add_southern_hemisphere_support.diff and 04_fix_hyphen_used_as_minus_sign.diff
* BUGS file updated to report to wmaker-dev@lists.windowmaker.info
* Source is now at http://repo.or.cz/w/dockapps.git
* Updated by Rodolfo García Peñas (kix) <kix@kix.es>
*
* Version 1.27 - released June 7, 1999.
* fixed a minor bug in computation of azimuth (A in Horizon Coords). Thanks to
* Dan Moraru for spotting this one. (There were two SinGlat factors instead of one).

View file

@ -0,0 +1,8 @@
The user's latitude and longitude are needed for wmMoonClock to work
correctly. They may be found at http://www.tageo.com/, positive is north/west,
negative is south/east. These have to be specified using the "-lat" and "-lon"
command line arguments. For the X menu system, please copy
"/usr/share/menu/wmmoonclock" to "/etc/menu/wmmoonclock", add latitude and
longitude there, and call "update-menus".
-- Martin A. Godisch <godisch@debian.org> Sun, 25 Mar 2007 10:27:18 +0200

View file

@ -0,0 +1,285 @@
wmmoonclock (1.28-1) unstable; urgency=low
* New upstream version 1.28 (debian patches are now in upstream)
-- Rodolfo García Peñas (kix) <kix@kix.es> Tue, 20 Sep 2011 11:14:33 +0200
wmmoonclock (1.27-30) unstable; urgency=low
* New maintainer (Closes: #588837)
* Standard version is now 3.9.2
* Package is now lintian clean
* new wmmoonclock.{manpages, menu} files
* Added text info about upstream version in watch
* debian/copyright is now DEP-5
* debian/patches are now DEP-3
-- Rodolfo García Peñas (kix) <kix@kix.es> Sun, 7 Aug 2011 15:41:54 +0200
wmmoonclock (1.27-29) unstable; urgency=low
* Switch to dpkg-source 3.0 (quilt) format.
* Bump standards version to 3.8.4.
* Add ${misc:Depends} to the binary dependencies.
* Allow Debian maintainers uploads.
-- Denis Briand <denis@narcan.fr> Sun, 14 Mar 2010 18:30:16 +0100
wmmoonclock (1.27-28) unstable; urgency=low
* Add southern hemisphere support (Closes: #537480).
Thanks to Alvaro Steiger.
* Bump standards version to 3.8.2.0
* Add quilt patch system.
* Add patches:
+ 01_all_previous_diff.diff
+ 02_update_time.diff
+ 03_add_southern_hemisphere_support.diff
+ 04_fix_hyphen_used_as_minus_sign.diff
* Add debhelper 7 build depends.
* Add debian/compat file.
* Remove trailing whitespaces in changelog.upstream.
* Add an empty watch file (no upstream repository).
* Improve rules file by using more debhelper commands.
* Remove Martin A. Godisch from uploaders field
Thanks to him to have sponsored wmmoonclock.
-- Denis Briand <denis@narcan.fr> Sun, 26 Jul 2009 10:30:00 +0200
wmmoonclock (1.27-27) unstable; urgency=low
* Add co-maintainer Martin A. Godisch.
* Fix versionless symlink license in debian/copyright
-- Denis Briand <denis@narcan.fr> Fri, 10 Apr 2009 18:43:04 +0200
wmmoonclock (1.27-26) unstable; urgency=low
* New maintainer, closes: #455542.
* ajusted nMax values, closes: #479229.
Thanks to Joerg Dietrich
* Updated standards version to 3.8.1
-- Denis Briand <denis@narcan.fr> Fri, 20 Mar 2009 17:32:50 +0100
wmmoonclock (1.27-25) unstable; urgency=low
* Removed db_purge in postrm, see: #502521.
Thanks to Cesare Tirabassi.
* Fixed copyright file.
* Updated standards version.
-- Martin A. Godisch <godisch@debian.org> Sun, 26 Oct 2008 10:02:17 +0100
wmmoonclock (1.27-24) unstable; urgency=low
* Enhanced display refresh rate, closes: #446680.
Thanks to Peter Colberg.
-- Martin A. Godisch <godisch@debian.org> Mon, 10 Dec 2007 18:25:50 +0100
wmmoonclock (1.27-23) unstable; urgency=low
* Changed display refresh rate to 100 ms, closes: #440406.
* Updated menu section.
* Fixed distclean target.
-- Martin A. Godisch <godisch@debian.org> Sun, 07 Oct 2007 09:22:20 +0200
wmmoonclock (1.27-22) unstable; urgency=low
* Fixed postrm, closes: #417144.
-- Martin A. Godisch <godisch@debian.org> Sun, 01 Apr 2007 19:30:02 +0200
wmmoonclock (1.27-21) unstable; urgency=low
* Removed debconf, added README.Debian, closes: #375082, #414244.
-- Martin A. Godisch <godisch@debian.org> Sun, 25 Mar 2007 10:40:39 +0200
wmmoonclock (1.27-20) unstable; urgency=low
* Updated Japanese debconf translation, closes: #411269.
Thanks to Hideki Yamane.
* Updated Spanish debconf translation, closes: #411803.
Thanks to Carlos Alberto.
-- Martin A. Godisch <godisch@debian.org> Sat, 24 Feb 2007 07:17:14 +0100
wmmoonclock (1.27-19) unstable; urgency=low
* Updated French debconf translation, closes: #410941.
-- Martin A. Godisch <godisch@debian.org> Sat, 17 Feb 2007 06:30:25 +0100
wmmoonclock (1.27-18) unstable; urgency=low
* Updated French debconf translation, closes: #410429.
Thanks to Christian Perrier.
* Updated Czech debconf translation, closes: #410532.
Thanks to Miroslav Kure.
* Updated Portuguese debconf translation, closes: #410455.
Thanks to Miguel Figueiredo.
-- Martin A. Godisch <godisch@debian.org> Tue, 13 Feb 2007 19:05:57 +0100
wmmoonclock (1.27-17) unstable; urgency=low
* Added Nederlands debconf translation, closes: #375079.
Thanks to Esther Hanko.
* Fixed longitude/latitude information URL, closes: #401872.
Thanks to Jacopo.
* Added Portuguese debconf translation, closes: #408811.
Thanks to Miguel Figueiredo.
* Updated German debconf translation.
* Updated debian files, fixed timestamps.
-- Martin A. Godisch <godisch@debian.org> Fri, 09 Feb 2007 19:54:30 +0100
wmmoonclock (1.27-16) unstable; urgency=low
* Updated build-dependencies according to xlibs-dev transition.
-- Martin A. Godisch <godisch@debian.org> Wed, 30 Nov 2005 19:12:10 +0100
wmmoonclock (1.27-15) unstable; urgency=low
* Added Vietnamese debconf translation, closes: #324132.
Thanks to Clytie Siddall.
* Added Swedish debconf translation, closes: #331189.
Thanks to Daniel Nylander.
* Updated standards version.
-- Martin A. Godisch <godisch@debian.org> Wed, 05 Oct 2005 19:42:45 +0200
wmmoonclock (1.27-14) unstable; urgency=low
* Added Czech debconf translation, closes: #294733.
Thanks to Miroslav Kure.
* Fixed POSIX compliance of debian/rules.
* Removed watch file, upstream homepage is gone.
-- Martin A. Godisch <godisch@debian.org> Fri, 11 Feb 2005 22:17:45 +0100
wmmoonclock (1.27-13) unstable; urgency=low
* Added Japanese debconf translation, closes: #236820.
Thanks to Hideki Yamane.
* Removed ucf/debconf and lintian workarounds.
* Updated debian/menu, debian/rules, and standards version.
-- Martin A. Godisch <godisch@debian.org> Mon, 08 Mar 2004 16:41:48 +0100
wmmoonclock (1.27-12) unstable; urgency=low
* Added Spanish debconf translation, closes: #201004.
Thanks to Carlos Alberto Martín Edo.
* Simplified ucf handling, see bug #199233, adjusted ucf dependency.
* Removed useless BUGS file.
* Converted debian/changelog to UTF-8.
* Updated standards version.
-- Martin A. Godisch <godisch@debian.org> Sun, 27 Jul 2003 15:57:02 +0200
wmmoonclock (1.27-11) unstable; urgency=low
* Improved ucf transition.
-- Martin A. Godisch <godisch@debian.org> Sun, 29 Jun 2003 10:24:05 +0200
wmmoonclock (1.27-10) unstable; urgency=low
* Updated deb'configuration, added ucf support.
-- Martin A. Godisch <godisch@debian.org> Fri, 27 Jun 2003 07:12:15 +0200
wmmoonclock (1.27-9) unstable; urgency=low
* Updated deb'configuration, closes: #185206.
* Updated standards version.
-- Martin A. Godisch <godisch@debian.org> Fri, 30 May 2003 18:39:00 +0200
wmmoonclock (1.27-8) unstable; urgency=low
* Added french debconf translation, closes: #189226.
Thanks to Christian Perrier.
* Updated configuration.
-- Martin A. Godisch <godisch@debian.org> Thu, 03 Apr 2003 16:26:10 +0200
wmmoonclock (1.27-7) unstable; urgency=low
* Added portuguese debconf translation, closes: #185686.
Thanks to André Luís Lopes.
* Improved debconf template, closes: #185710.
-- Martin A. Godisch <godisch@debian.org> Sat, 22 Mar 2003 07:33:12 +0100
wmmoonclock (1.27-6) unstable; urgency=low
* Transition to po-debconf, updated build-dependencies.
* Updated standards version.
-- Martin A. Godisch <godisch@debian.org> Fri, 14 Mar 2003 08:09:40 +0100
wmmoonclock (1.27-5) unstable; urgency=low
* New maintainer upload, closes: #170232, #182936.
* Fixed lots of compiler warnings.
* Added debconf'iguration for latitude and longitude.
* Removed build-dependency on debhelper, debian/ cleanup.
-- Martin A. Godisch <godisch@debian.org> Sat, 01 Mar 2003 10:39:32 +0100
wmmoonclock (1.27-4) unstable; urgency=low
* Recompile against newer libxpm (closes: #67953)
-- Adam Klein <aklein@debian.org> Sun, 30 Jul 2000 15:51:47 -0700
wmmoonclock (1.27-3) unstable; urgency=low
* Now FHS compliant; Standards-Version 3.0.1
-- Adam Klein <aklein@debian.org> Mon, 6 Sep 1999 09:34:16 -0700
wmmoonclock (1.27-2) unstable; urgency=low
* Extracted TODO and ChangeLog files from wmMoonClock.c (closes: #41431)
-- Adam Klein <aklein@debian.org> Fri, 16 Jul 1999 17:44:55 -0700
wmmoonclock (1.27-1) unstable; urgency=low
* New upstream bugfix release
-- Adam Klein <aklein@debian.org> Mon, 7 Jun 1999 22:17:31 -0700
wmmoonclock (1.26-1) unstable; urgency=low
* New upstream release (closes: Bug#36532)
-- Adam Klein <aklein@debian.org> Thu, 22 Apr 1999 23:01:29 -0700
wmmoonclock (1.25-1) unstable; urgency=low
* New upstream release
* The author removed the binary from the tarball, so it's now pristine source
-- Adam Klein <aklein@debian.org> Thu, 1 Apr 1999 07:05:39 -0800
wmmoonclock (1.24-1) unstable; urgency=low
* New upstream release
* Now supports 8-bit color when run with the -low switch (closes: #31560)
* Removed README.debian
-- Adam Klein <aklein@debian.org> Thu, 25 Feb 1999 15:13:13 -0800
wmmoonclock (1.1-1) unstable; urgency=low
* Initial Release.
-- Adam Klein <aklein@debian.org> Thu, 24 Dec 1998 23:27:25 -0800

View file

@ -0,0 +1 @@
7

View file

@ -0,0 +1,17 @@
Source: wmmoonclock
Section: x11
Priority: optional
Maintainer: Rodolfo García Peñas (kix) <kix@kix.es>
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 7.0.50~), libx11-dev, libxext-dev, libxpm-dev
Standards-Version: 3.9.2
Package: wmmoonclock
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Suggests: wmsun, wmaker | afterstep
Description: WindowMaker moon phase dockapp
wmMoonClock displays a small pixmap of the current phase of the moon.
You have to enter your Latitude and Longitude for it to work correctly.
wmMoonClock is designed to work with the WindowMaker dock, but will
work with other window managers as well.

View file

@ -0,0 +1,37 @@
Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=co&pathrev=174
Upstream-Name: wmMoonClock
Upstream-Contact: Michael G. Henderson <mghenderson@lanl.gov>
Source: http://repo.or.cz/w/dockapps.git
Files: *
Copyright: 1998, Michael G. Henderson <mghenderson@lanl.gov>
1999, Michael G. Henderson <mghenderson@lanl.gov>
License: GPL-2+
Files: debian/*
Copyright: 1998, Adam Klein <aklein@debian.org>
2009, Denis Briand <denis@narcan.fr>
2011, Rodolfo García Peñas (kix) <kix@kix.es>
License: GPL-2+
License: GPL-2+
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 the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more
details.
.
You should have received a copy of the GNU General Public
License along with this package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.

19
wmmoonclock/debian/rules Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/make -f
# GNU Copyright 2011 Rodolfo García Peñas (kix) <kix@kix.es>
# export DH_VERBOSE=1
%:
dh $@
override_dh_clean:
$(MAKE) -C src clean
dh_clean
override_dh_auto_install:
$(MAKE) -C src install DESTDIR=$(CURDIR)/debian/wmmoonclock
ln -s wmMoonClock $(CURDIR)/debian/wmmoonclock/usr/bin/wmmoonclock
ln -s wmMoonClock.1.gz $(CURDIR)/debian/wmmoonclock/usr/share/man/man1/wmmoonclock.1.gz
override_dh_installchangelogs:
dh_installchangelogs changelog upstream

View file

@ -0,0 +1 @@
3.0 (quilt)

1
wmmoonclock/debian/watch Normal file
View file

@ -0,0 +1 @@
# The upstream version is now in http://repo.or.cz/w/dockapps.git

View file

@ -0,0 +1 @@
src/wmMoonClock.1

View file

@ -0,0 +1,2 @@
?package(wmmoonclock):needs="X11" section="Applications/Science/Geoscience" \
title="wmMoonClock" command="/usr/bin/wmMoonClock"

View file

@ -1,13 +1,12 @@
#include <string.h>
#include "CalcEphem.h"
CalcEphem(date, UT, c)
void CalcEphem(date, UT, c)
long int date; /* integer containing the date (e.g. 960829) */
double UT; /* Universal Time */
CTrans *c; /* structure containing all the relevent coord trans info */
{
double vv;
int dd, mm, ss;
int year, month, day;
double TU, TU2, TU3, T0, gmst;
@ -16,12 +15,7 @@ int dd, mm, ss;
double days, M, E, nu, lambnew;
double r0, earth_sun_distance;
double RA, DEC, RA_Moon, DEC_Moon;
double dt, g0_1, g1_1, h1_1, gclat, glon, psi;
double TDT, Lmoon_0, P0, N0, Imoon, Lmoon, Mmoon_m, Nmoon, Cmoon;
double Emoon_nu, Amoon_e, Amoon_3, Mmoon_mp, Emoon_c, amoon, emoon, AGE;
double Amoon_4, Lmoon_p, Vmoon, Lmoon_pp, Nmoon_p, LambdaMoon, BetaMoon, R;
Vector S, K, Y, Z, D, Dgei, Dgsm;
int i, j;
double TDT, AGE, LambdaMoon, BetaMoon, R;
double jd(), hour24(), angle2pi(), angle360(), kepler(), Moon(), NewMoon();
double Ta, Tb, Tc, frac();
double SinGlat, CosGlat, SinGlon, CosGlon, Tau, lmst, x, y, z;
@ -237,7 +231,7 @@ int year, month, day;
char dowstr[];
{
double JD, A, Afrac, jd();
int n, iday, iA;
int n, iA;
JD = jd(year, month, day, 0.0);
A = (JD + 1.5)/7.0;
@ -282,7 +276,7 @@ double jd(ny, nm, nd, UT)
int ny, nm, nd;
double UT;
{
double A, B, C, D, JD, MJD, day;
double A, B, C, D, JD, day;
day = nd + UT/24.0;
@ -372,7 +366,7 @@ double angle;
}
Radec_to_Cart(ra, dec, r)
void Radec_to_Cart(ra, dec, r)
double ra, dec; /* RA and DEC */
Vector *r; /* returns corresponding cartesian unit vector */
{

View file

@ -54,4 +54,7 @@ typedef struct CTrans {
int Visible; /* Wether or not moon is above horizon */
} CTrans;
void CalcEphem(long int, double, CTrans*);
int DayofWeek(int, int, int, char*);
int DayofYear(int, int, int);

View file

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -O2
# CFLAGS = -O2
INCDIR = -I/usr/X11R6/include/X11
DESTDIR= /usr/X11R6
LIBDIR = -L/usr/X11R6/lib
@ -22,7 +22,7 @@ all: wmMoonClock.o wmMoonClock
wmMoonClock.o: wmMoonClock_master.xpm wmMoonClock_mask.xbm CalcEphem.h
wmMoonClock: $(OBJS)
$(CC) $(COPTS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
$(CC) $(CFLAGS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
clean:
for i in $(OBJS) ; do \
@ -31,6 +31,7 @@ clean:
rm -f wmMoonClock
install:: wmMoonClock
install -s -m 0755 wmMoonClock $(DESTDIR)/bin
install -m 0644 wmMoonClock.1 $(DESTDIR)/man/man1
install -d -m 0755 $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1
install -m 0755 wmMoonClock $(DESTDIR)/usr/bin
install -m 0644 wmMoonClock.1 $(DESTDIR)/usr/share/man/man1

View file

@ -8,6 +8,10 @@
double angle360();
void addthe(double, double, double, double, double*, double*);
void addsol(double, double, double, double, int, int, int, int);
void addn(double, int, int, int, int);
void term(int, int, int, int, double*, double*);
double TwoPi = 6.283185308;
double ARC = 206264.81;
@ -25,8 +29,8 @@ double T2;
double S1, S2, S3, S4, S5, S6, S7;
double DL0, DL, DD, DGAM, DLS, DF;
double L0, L, LS, F, D;
double ARG, FAC;
int MAX, i, j;
double ARG = 0.0, FAC = 0.0;
int MAX = 0, i, j;
double S;
@ -274,7 +278,7 @@ double frac(double x){
addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
void addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q, int R, int S){
double X, Y;
@ -289,7 +293,7 @@ addsol(double COEFFL, double COEFFS, double COEFFG, double COEFFP, int P, int Q,
term(int P, int Q, int R, int S, double *X, double *Y){
void term(int P, int Q, int R, int S, double *X, double *Y){
double XX, YY;
int k, I[5];
@ -307,7 +311,7 @@ term(int P, int Q, int R, int S, double *X, double *Y){
addthe(double C1, double S1, double C2, double S2, double *C, double *S){
void addthe(double C1, double S1, double C2, double S2, double *C, double *S){
*C = C1*C2 - S1*S2;
*S = S1*C2 + C1*S2;
@ -316,7 +320,7 @@ addthe(double C1, double S1, double C2, double S2, double *C, double *S){
}
addn(double COEFFN, int P, int Q, int R, int S){
void addn(double COEFFN, int P, int Q, int R, int S){
double X, Y;
@ -381,7 +385,7 @@ double NewMoon(double ax, double bx, double cx){
* DEC: declination (in deg; equinox of date)
*
*/
MiniMoon(double T, double *RA, double *DEC){
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;
@ -424,7 +428,6 @@ MiniMoon(double T, double *RA, double *DEC){
*RA = ( 48.0/P2)*atan2(Y, X+RHO);
if (*RA<0.0) *RA += 24.0;
return(0);
}

6
wmmoonclock/src/Moon.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef MOON_H
#define MOON_H
void MiniMoon(double, double*, double*);
#endif

View file

@ -1,5 +1,7 @@
#include <stdio.h>
#include <math.h>
#include "MoonRise.h"
#include "Moon.h"
#define DegPerRad 57.29577951308232087680
#define RadPerDeg 0.01745329251994329576
@ -7,7 +9,7 @@
extern double Glon, SinGlat, CosGlat, TimeZone;
MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
void MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double *UTSet){
double UT, ym, y0, yp, SinH0;
double xe, ye, z1, z2, SinH(), hour24();
@ -76,7 +78,7 @@ MoonRise(int year, int month, int day, double LocalHour, double *UTRise, double
}
UTTohhmm(double UT, int *h, int *m){
void UTTohhmm(double UT, int *h, int *m){
if (UT < 0.0) {
@ -85,6 +87,14 @@ UTTohhmm(double UT, int *h, int *m){
} else {
*h = (int)UT;
*m = (int)((UT-(double)(*h))*60.0+0.5);
if (*m == 60) {
/*
* If it was 23:60 this should become 24:00
* I prefer this designation to 00:00. So dont reset h to 0 when it goes above 24.
*/
*h += 1;
*m = 0;
}
}
}
@ -94,7 +104,7 @@ UTTohhmm(double UT, int *h, int *m){
Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
void Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, double *z2, int *nz){
double a, b, c, d, dx;
@ -115,7 +125,6 @@ Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, doub
if (*z1 < -1.0) *z1 = *z2;
}
return(0);
}
@ -125,8 +134,8 @@ Interp(double ym, double y0, double yp, double *xe, double *ye, double *z1, doub
double SinH(int year, int month, int day, double UT){
double TU, TU2, TU3, LambdaMoon, BetaMoon, R, AGE, frac(), jd();
double RA_Moon, DEC_Moon, T0, gmst, lmst, Tau, epsilon, Moon();
double TU, frac(), jd();
double RA_Moon, DEC_Moon, gmst, lmst, Tau, Moon();
double angle2pi();
TU = (jd(year, month, day, UT) - 2451545.0)/36525.0;

View file

@ -0,0 +1,8 @@
#ifndef MOONRISE_H
#define MOONRISE_H
void MoonRise(int, int, int, double, double*, double*);
void UTTohhmm(double, int*, int*);
void Interp(double, double, double, double*, double*, double*, double*, int*);
#endif

View file

@ -3,11 +3,11 @@
WMMOONCLOCK \- Dockable Moon Phase Clock
.SH SYNOPSIS
.B wmMoonClock
[-display <Display>] [-bc <Color>] [-lc <Color>] [-dc <Color>] [-low] [-lat <Latitude>] [-lon <Longitude>] [-h]
[\-display <Display>] [\-bc <Color>] [\-lc <Color>] [\-dc <Color>] [\-low] [\-lat <Latitude>] [\-lon <Longitude>] [\-h]
.SH DESCRIPTION
.PP
wmMoonClock displays the current phase of the moon. Clicking on the icon
brings up different displays -- there are 5 in all. The different "pages"
brings up different displays \-\- there are 5 in all. The different "pages"
are;
.TP
@ -25,8 +25,8 @@ it above the horizon?).
.B Third Page
Shows the Rise and Set times for yesterday (first line), today (middle line), and
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 (--:--)
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
a given day but will set (rise) in the very early portion of the next day.
.TP
@ -58,19 +58,19 @@ Set color of text labels.
Set color of data values.
.TP
.B \-low
Conserve colors. For 8-bit displays, a lower-color pixmap will be used automatically,
but you can also force its use on higher-color displays if necessary.
Conserve colors. For 8\-bit displays, a lower\-color pixmap will be used automatically,
but you can also force its use on higher\-color displays if necessary.
.TP
.B -lat <Latitude>
.B \-lat <Latitude>
Observers Latitude in degrees. Positive in northern hemisphere, negative in southern hemisphere.
.TP
.B -lon <Longitude>
.B \-lon <Longitude>
Observers Longitude in degrees. Greenwich is 0.0, and longitude increases positively
toward the west. (Alternatively, negative numbers can also be used to specify
longitudes to the east of Greenwich).
.TP
.B \-h
Display list of command-line options.
Display list of command\-line options.
.SH BUGS
Who knows? (Let me know if you find any).
.SH AUTHOR

View file

@ -112,6 +112,7 @@
#include <X11/X.h>
#include <X11/xpm.h>
#include "CalcEphem.h"
#include "MoonRise.h"
#include "xutils.h"
#include "wmMoonClock_master.xpm"
#include "wmMoonClock_masterLow.xpm"
@ -122,7 +123,7 @@
/*
* Delay between refreshes (in microseconds)
*/
#define DELAY 10000L
#define DELAY 1000000L
#define WMMOONCLOCK_VERSION "1.27"
@ -159,14 +160,13 @@ int main(int argc, char *argv[]) {
struct tm *GMTTime, *LocalTime;
XEvent event;
int i, n, k, j, ImageNumber;
int Year, Month, DayOfWeek, DayOfMonth;
int Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
int i, n, j, ImageNumber, Year, Month, DayOfMonth, digit;
long CurrentLocalTime, CurrentGMTTime, date;
double UT, val, RA, DEC, UTRise, UTSet, LocalHour, hour24();
int D, H, M, S, sgn, A, B, q;
char str[10];
CTrans c;
struct timeval timeout;
fd_set xfdset;
@ -244,6 +244,7 @@ int main(int argc, char *argv[]) {
nMAX = 1000;
ImageNumber = (int)(c.MoonPhase * 60.0 + 0.5);
if (ImageNumber > 59) ImageNumber = 0;
if (Glat < 0) ImageNumber = 59 - ImageNumber; /* add southern hemisphere support, closes: #537480 */
j = ImageNumber/10;
i = ImageNumber%10;
copyXPMArea(67+58*i, 2+58*j, 54, 54, 5, 5);
@ -254,8 +255,8 @@ int main(int argc, char *argv[]) {
* Update Numerical Display
*/
nMAX = 500;
/* This requires second precision for LT and UT */
nMAX = 0;
/*
@ -371,7 +372,7 @@ int main(int argc, char *argv[]) {
*/
nMAX = 500;
nMAX = 60;
/*
* Clear plotting area
@ -478,7 +479,7 @@ int main(int argc, char *argv[]) {
nMAX = 500;
nMAX = 3;
/*
* Clear plotting area
@ -580,7 +581,7 @@ int main(int argc, char *argv[]) {
nMAX = 500;
nMAX = 3;
/*
* Clear plotting area
@ -705,6 +706,11 @@ int main(int argc, char *argv[]) {
/*
* Add X display to file descriptor set for polling.
*/
FD_ZERO(&xfdset);
FD_SET(ConnectionNumber(display), &xfdset);
@ -734,7 +740,9 @@ int main(int argc, char *argv[]) {
* Redraw and wait for next update
*/
RedrawWindow();
usleep(DELAY);
timeout.tv_sec = DELAY / 1000000L;
timeout.tv_usec = DELAY % 1000000L;
select(ConnectionNumber(display) + 1, &xfdset, NULL, NULL, &timeout);
}