-- Changed version number.

-- Made sunrise() and sunset() distinguish between cases when sun never
   rises and sun never sets.
This commit is contained in:
dfs
1996-12-18 00:20:43 +00:00
parent dfbbafe87b
commit d0be59edff
16 changed files with 84 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
# Makefile for REMIND
# $Id: Makefile,v 1.15 1996-10-27 21:49:54 dfs Exp $
# $Id: Makefile,v 1.16 1996-12-18 00:20:43 dfs Exp $
#-----------------------------------------------------------------------------
# THINGS FOR YOU TO EDIT START BELOW
@@ -54,7 +54,7 @@ GROUP=bin
# YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things
# in config.h; then, you should be able to type 'make'.
#-----------------------------------------------------------------------------
VERSION= 03.00.15
VERSION= 03.00.16
MATHLIB= -lm
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
@@ -133,9 +133,9 @@ tgz:
-rm -rf remind-$(VERSION)
-mkdir remind-$(VERSION)
cd remind-$(VERSION); for i in $(MANIFEST) ;do ln -s ../$$i .; done; cd ..
tar -c -h -v -f remind-3.0.15.tar remind-$(VERSION)
gzip -v -9 remind-3.0.15.tar
mv remind-3.0.15.tar.gz remind-3.0.15.tgz
tar -c -h -v -f remind-3.0.16.tar remind-$(VERSION)
gzip -v -9 remind-3.0.16.tar
mv remind-3.0.16.tar.gz remind-3.0.16.tgz
rm -rf remind-$(VERSION)
shar:
@@ -206,9 +206,9 @@ install-man:
release:
-mkdir RELEASE
-rm -f RELEASE/*
mkpatch ../prev . patch.15 Shar "Remind-3.0/Patch-15/part"
mkpatch ../prev . patch.16 Shar "Remind-3.0/Patch-15/part"
mv Shar* RELEASE
rm -f patch.15*
rm -f patch.16*
for i in *.1; do nroff -man $$i | sed -e 's/_//g' > `basename $$i .1`.man; done
mv *.man RELEASE
for i in *.1; do groff -man -Tps $$i > `basename $$i .1`.ps; done

View File

@@ -1,4 +1,4 @@
#$Id: Makefile_QDOS,v 1.3 1996-09-28 18:17:06 dfs Exp $
#$Id: Makefile_QDOS,v 1.4 1996-12-18 00:20:43 dfs Exp $
# Makefile for REMIND for QDOS / SMSQ
#-----------------------------------------------------------------------------
@@ -24,7 +24,7 @@ LDFLAGS= -bufp200K
# YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things
# in config_h; then, you should be able to type 'make'.
#-----------------------------------------------------------------------------
VERSION= 03.00.15
VERSION= 03.00.16
MATHLIB= -lm
HDRS= config_h err_h expr_h globals_h protos_h types_h version_h \

View File

@@ -1,5 +1,5 @@
$Id: README_QDOS,v 1.3 1996-09-28 18:17:07 dfs Exp $
REMIND version 3.0.15 for QDOS / SMSQ
$Id: README_QDOS,v 1.4 1996-12-18 00:20:44 dfs Exp $
REMIND version 3.0.16 for QDOS / SMSQ
REMIND is a sophisticated alarm/calendar program. Details are given
in the documentation file, "remind_doc" (QUILL format).

View File

@@ -6,6 +6,21 @@ CHANGES TO REMIND
- Added support for the Romanian language, courtesy of Liviu Daia
- Changed sunrise() and sunset() as follows: If the sun never rises,
sunrise() returns 1440 and sunset() returns 0. In this case,
sunrise()-sunset() returns the length of the dark period of the
day, in minutes. If the sun never sets, sunrise() returns 0 and
sunset() returns 1440, and sunset()-sunrise() returns the length
of the light period of the day, in minutes. Thanks to Michael Salmon
for explaining the utility of this. See the file "defs.rem" for the
functions _light_len and _dark_len which return the length in minutes
of the light and dark period of the day, respectively.
+ BUG FIXES
- Fixed a problem under Solaris 2.5 whereby rem2ps was skipping some
latin1 characters which it interpreted as white space.
* Version 3.0 Patch 15
+ IMPORTANT NOTES

View File

@@ -22,7 +22,7 @@
#############################################################################
#
# $Id: defs.rem,v 1.1 1996-03-27 03:25:51 dfs Exp $
# $Id: defs.rem,v 1.2 1996-12-18 00:20:44 dfs Exp $
#
RUN OFF
@@ -160,6 +160,14 @@ FSET _am_pm(tm) IIF(tm<01:00, tm+12*60+"am", \
FSET _no_lz(s) IIF(SUBSTR(s, 1, 1)=="0", SUBSTR(s, 2), s)
#################################################################
# Return the length of the daylight/night portion of a date, #
# in minutes. #
#################################################################
FSET _light_len(date) MAX(SUNSET(date)-SUNRISE(date), 0)
FSET _dark_len(date) 1440-_light_len(date)
############################################################
# Function to calculate number of years since a given year #
# or number of months since a given month and year... #

23
funcs.c
View File

@@ -10,7 +10,7 @@
/* */
/***************************************************************/
static char const RCSID[] = "$Id: funcs.c,v 1.4 1996-10-06 21:03:49 dfs Exp $";
static char const RCSID[] = "$Id: funcs.c,v 1.5 1996-12-18 00:20:45 dfs Exp $";
#include "config.h"
#include <stdio.h>
@@ -2030,7 +2030,14 @@ int jul;
/* Cosine of sun's local hour angle */
cosH = (cosz - sinDelta * sin(latitude)) / (cosDelta * cos(latitude));
if (cosH > 1.0 || cosH < -1.0) return NO_TIME;
if (cosH < -1.0) { /* Summer -- permanent daylight */
if (rise) return NO_TIME;
else return -NO_TIME;
}
if (cosH > 1.0) { /* Winter -- permanent darkness */
if (rise) return -NO_TIME;
else return NO_TIME;
}
H = RADDEG * acos(cosH);
if (rise) H = 360.0 - H;
@@ -2049,6 +2056,15 @@ int jul;
hours = (int) local;
mins = (int) ((local - hours) * 60.0);
/* Sometimes, we get roundoff error. Check for "reasonableness" of
answer. */
if (rise) {
/* Sunrise so close to midnight it wrapped around -- permament light */
if (hours >= 23) return NO_TIME;
} else {
/* Sunset so close to midnight it wrapped around -- permament light */
if (hours <= 1) return -NO_TIME;
}
return hours*60 + mins;
}
@@ -2077,6 +2093,9 @@ int rise;
if (r == NO_TIME) {
RetVal.v.val = 0;
RetVal.type = INT_TYPE;
} else if (r == -NO_TIME) {
RetVal.v.val = 1440;
RetVal.type = INT_TYPE;
} else {
RetVal.v.val = r;
RetVal.type = TIM_TYPE;

View File

@@ -1,7 +1,7 @@
# Makefile for REMIND for Borland C++
# $Id: makefile.bcc,v 1.3 1996-09-28 18:17:07 dfs Exp $
# $Id: makefile.bcc,v 1.4 1996-12-18 00:20:46 dfs Exp $
VERSION= 03.00.15
VERSION= 03.00.16
MODEL=l

View File

@@ -1,8 +1,8 @@
# Makefile for REMIND for Turbo C for MSDOS
# $Id: makefile.tc,v 1.3 1996-09-28 18:17:08 dfs Exp $
# $Id: makefile.tc,v 1.4 1996-12-18 00:20:46 dfs Exp $
CC= tcc
VERSION= 03.00.15
VERSION= 03.00.16
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \

View File

@@ -9,7 +9,7 @@
/* */
/***************************************************************/
static char const RCSID[] = "$Id: rem2ps.c,v 1.4 1996-07-07 16:35:42 dfs Exp $";
static char const RCSID[] = "$Id: rem2ps.c,v 1.5 1996-12-18 00:20:46 dfs Exp $";
#include "config.h"
#include "lang.h"
@@ -550,16 +550,18 @@ char *s;
printf(" [");
/* Chew up leading spaces */
while(isspace(*s)) s++;
while(isspace((unsigned char) *s)) s++;
PutChar('(');
while(*s) {
c = *s++;
/* Use the "unsigned char" cast to fix problem on Solaris 2.5 */
/* which treated some latin1 characters as white space. */
c = (unsigned char) *s++;
if (c == '\\' || c == '(' || c == ')') PutChar('\\');
if (!isspace(c)) PutChar(c);
else {
PutChar(')');
while(isspace(*s)) s++;
while(isspace((unsigned char)*s)) s++;
if (!*s) {
printf("]\n");
return;

View File

@@ -1,4 +1,4 @@
.\" $Id: remind.1,v 1.6 1996-12-10 02:36:34 dfs Exp $
.\" $Id: remind.1,v 1.7 1996-12-18 00:20:47 dfs Exp $
.TH REMIND 1 "27 April 1996"
.UC 4
.SH NAME
@@ -2157,13 +2157,14 @@ of \fIstr\fR.
Returns a \fBTIME\fR indicating the time of sunrise on the specified
\fIdate\fR (default \fBtoday()\fR.) In high lattitudes, there
may be no sunrise on a particular day, in which case \fBsunrise()\fR
returns the \fBINT\fR 0.
returns the \fBINT\fR 0 if the sun never sets, or 1440 if it never rises.
.TP
.B sunset([d_date])
Returns a \fBTIME\fR indicating the time of sunset on the specified
\fIdate\fR (default \fBtoday()\fR.) In high lattitudes, there
may be no sunset on a particular day, in which case \fBsunset()\fR
returns the \fBINT\fR 0.
returns the \fBINT\fR 0 if the sun never rises, or 1440 if it never
sets.
.RS
.PP
The functions \fBsunrise()\fR and \fBsunset()\fR are based on

View File

@@ -1,6 +1,6 @@
Begin3
Title: Remind
Version: 03.00.15
Version: 03.00.16
Entered-date: 27 October 1996
Description: Full-featured calendar/reminder program featuring
sophisticated date calculation, moon phases, sunrise/sunset,
@@ -12,7 +12,7 @@ Keywords: calendar reminder alarm datebook PostScript
Author: aa775@freenet.carleton.ca (David F. Skoll)
Maintained-by: aa775@freenet.carleton.ca (David F. Skoll)
Primary-site: ftp.doe.carleton.ca /pub/Remind-3.0
215kB remind-3.0.15.tgz
215kB remind-3.0.16.tgz
Alternate-site:
Original-site:
Platform: Linux, Solaris, SunOS, HP-UX -- virtually any UN*X-like

View File

@@ -631,7 +631,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "03.00.15"
version() => "03.00.16"
set a059 wkday(today())
today() => 1991/02/16
wkday(1991/02/16) => "Saturday"
@@ -772,7 +772,7 @@ dump
a048 "foo"
a067 "INT"
a039 "February"
a058 "03.00.15"
a058 "03.00.16"
a077 "1992 92
"
a049 21

View File

@@ -631,7 +631,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "03.00.15"
version() => "03.00.16"
set a059 wkday(today())
today() => 1991/02/16
wkday(1991/02/16) => "Saturday"
@@ -772,7 +772,7 @@ dump
a048 "foo"
a067 "INT"
a039 "February"
a058 "03.00.15"
a058 "03.00.16"
a077 "1992 92
"
a049 21

View File

@@ -1,6 +1,6 @@
# Test file for REMIND
#
# $Id: test1.cmp,v 1.4 1996-09-28 18:17:09 dfs Exp $
# $Id: test1.cmp,v 1.5 1996-12-18 00:20:50 dfs Exp $
#
# Use this file to test the date calculation routines
# of the REMIND program by typing:
@@ -633,7 +633,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "03.00.15"
version() => "03.00.16"
set a059 wkday(today())
today() => 1991/02/16
wkday(1991/02/16) => "Saturday"
@@ -774,7 +774,7 @@ dump
a048 "foo"
a067 "INT"
a039 "February"
a058 "03.00.15"
a058 "03.00.16"
a077 "1992 92
"
a049 21

View File

@@ -1,6 +1,6 @@
# Test file for REMIND
#
# $Id: test2.cmp,v 1.4 1996-09-28 18:17:10 dfs Exp $
# $Id: test2.cmp,v 1.5 1996-12-18 00:20:50 dfs Exp $
#
# Use this file to test the date calculation routines
# of the REMIND program by typing:
@@ -633,7 +633,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "03.00.15"
version() => "03.00.16"
set a059 wkday(today())
today() => 1991/02/16
wkday(1991/02/16) => "Saturday"
@@ -774,7 +774,7 @@ dump
a048 "foo"
a067 "INT"
a039 "February"
a058 "03.00.15"
a058 "03.00.16"
a077 "1992 92
"
a049 21

View File

@@ -9,5 +9,5 @@
/* */
/***************************************************************/
/* $Id: version.h,v 1.3 1996-09-28 18:17:10 dfs Exp $ */
#define VERSION "03.00.15"
/* $Id: version.h,v 1.4 1996-12-18 00:20:51 dfs Exp $ */
#define VERSION "03.00.16"