mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b5fe4f2a0 | ||
|
|
98fc4a917f | ||
|
|
e633530a36 | ||
|
|
bfea9915b9 | ||
|
|
d68ed6e75d | ||
|
|
a22631d768 | ||
|
|
552bf84e33 | ||
|
|
28d0251093 | ||
|
|
f3d969f658 | ||
|
|
2afe95d090 | ||
|
|
3692a6b265 | ||
|
|
8fc19358bb | ||
|
|
c8f9773d83 | ||
|
|
e1091db82f | ||
|
|
9f8ed13434 | ||
|
|
914f03d5eb | ||
|
|
a801f6d4ce | ||
|
|
fde5a7b4ca |
9
README
9
README
@@ -64,6 +64,15 @@ TkRemind requires Tcl/Tk and the tcllib library.
|
|||||||
- On Arch Linux, you need tk and tcllib. The latter is available at
|
- On Arch Linux, you need tk and tcllib. The latter is available at
|
||||||
https://aur.archlinux.org/packages/tcllib
|
https://aur.archlinux.org/packages/tcllib
|
||||||
|
|
||||||
|
If the little arrows for "Previous Month" and "Next Month" do not display
|
||||||
|
correctly in TkRemind, you may need to install the Noto Fonts. Install
|
||||||
|
all of your distribution's Nonto Font-related packages.
|
||||||
|
|
||||||
|
- On Debian-like systems, install with:
|
||||||
|
|
||||||
|
apt install fonts-noto-core fonts-noto-color-emoji \
|
||||||
|
fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra
|
||||||
|
|
||||||
==========================================================================
|
==========================================================================
|
||||||
Contact info: mailto:dianne@skoll.ca
|
Contact info: mailto:dianne@skoll.ca
|
||||||
Home page: https://dianne.skoll.ca/projects/remind/
|
Home page: https://dianne.skoll.ca/projects/remind/
|
||||||
|
|||||||
16
configure
vendored
16
configure
vendored
@@ -3975,7 +3975,14 @@ fi
|
|||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||||
# Check for link-time optimization support
|
# Check for link-time optimization support
|
||||||
for f in -flto=auto -ffat-lto-objects; do
|
f=-flto=auto
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
|
||||||
|
$as_echo_n "checking whether $CC supports $f... " >&6; }
|
||||||
|
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
CFLAGS="$CFLAGS $f"
|
||||||
|
f=-ffat-lto-objects
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
|
||||||
$as_echo_n "checking whether $CC supports $f... " >&6; }
|
$as_echo_n "checking whether $CC supports $f... " >&6; }
|
||||||
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
||||||
@@ -3986,7 +3993,10 @@ $as_echo "yes" >&6; }
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$ac_cv_perlartifacts" = "yes" ; then
|
if test "$ac_cv_perlartifacts" = "yes" ; then
|
||||||
@@ -4015,7 +4025,7 @@ _ACEOF
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
VERSION=04.02.00
|
VERSION=04.02.01
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
configure.in
13
configure.in
@@ -47,7 +47,12 @@ AC_HEADER_TIME
|
|||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||||
# Check for link-time optimization support
|
# Check for link-time optimization support
|
||||||
for f in -flto=auto -ffat-lto-objects; do
|
f=-flto=auto
|
||||||
|
AC_MSG_CHECKING([whether $CC supports $f])
|
||||||
|
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
CFLAGS="$CFLAGS $f"
|
||||||
|
f=-ffat-lto-objects
|
||||||
AC_MSG_CHECKING([whether $CC supports $f])
|
AC_MSG_CHECKING([whether $CC supports $f])
|
||||||
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
if $CC -E $f /dev/null > /dev/null 2>&1 ; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -55,7 +60,9 @@ if test "$GCC" = yes; then
|
|||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$ac_cv_perlartifacts" = "yes" ; then
|
if test "$ac_cv_perlartifacts" = "yes" ; then
|
||||||
@@ -73,7 +80,7 @@ if test "$?" != 0 ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups)
|
AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups)
|
||||||
VERSION=04.02.00
|
VERSION=04.02.01
|
||||||
AC_SUBST(VERSION)
|
AC_SUBST(VERSION)
|
||||||
AC_SUBST(PERL)
|
AC_SUBST(PERL)
|
||||||
AC_SUBST(PERLARTIFACTS)
|
AC_SUBST(PERLARTIFACTS)
|
||||||
|
|||||||
@@ -1,5 +1,33 @@
|
|||||||
CHANGES TO REMIND
|
CHANGES TO REMIND
|
||||||
|
|
||||||
|
* VERSION 4.2 Patch 1 - 2022-12-15
|
||||||
|
|
||||||
|
- MINOR IMPROVEMENT: TkRemind: If "Extra Remind Options" contains -m, make
|
||||||
|
TkRemind start the calendar with Monday instead of Sunday.
|
||||||
|
|
||||||
|
- MINOR IMPROVEMENT: Sample files: Add French holidays courtesy of
|
||||||
|
Clément Bœsch.
|
||||||
|
|
||||||
|
- MINOR IMPROVEMENT: A few performance fixes, likely not even noticeable in
|
||||||
|
most cases.
|
||||||
|
|
||||||
|
- MINOR FIXES: Fix misleading comments in the source code.
|
||||||
|
|
||||||
|
- MINOR FIX: Remove a bunch of dead code in the moon-phase routines.
|
||||||
|
|
||||||
|
- MINOR FIX: Remove unnecessary %"...%" markers in holidays/us.rem
|
||||||
|
|
||||||
|
- MINOR FIX: Don't use the -ffat-lto-objects if we're compiling with Clang.
|
||||||
|
|
||||||
|
- MINOR FIX: Remind: Fix a broken printf-format string (need to double up on %
|
||||||
|
to get a literal % in the output.)
|
||||||
|
|
||||||
|
- BUG FIX: Make test suite pass regardless of the date on which it is run.
|
||||||
|
D'oh!!!
|
||||||
|
|
||||||
|
- BUG FIX: Make sure the banner gets printed each time through a "*N"
|
||||||
|
command-line option loop.
|
||||||
|
|
||||||
* VERSION 4.2 Patch 0 - 2022-10-14
|
* VERSION 4.2 Patch 0 - 2022-10-14
|
||||||
|
|
||||||
- NEW FEATURE: remind: Allow weekdays to be globally-omitted. For example:
|
- NEW FEATURE: remind: Allow weekdays to be globally-omitted. For example:
|
||||||
|
|||||||
20
include/holidays/fr.rem
Normal file
20
include/holidays/fr.rem
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# France Holidays
|
||||||
|
#
|
||||||
|
# Source: Article L3133-1
|
||||||
|
# https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006072050/LEGISCTA000006178007/2016-08-10/
|
||||||
|
#
|
||||||
|
|
||||||
|
SET easter EASTERDATE($Uy)
|
||||||
|
|
||||||
|
REM Jan 1 MSG %"Jour de l'an%"
|
||||||
|
REM [easter+1] MSG %"Lundi de Pâques%"
|
||||||
|
REM May 1 MSG %"Fête du Travail%"
|
||||||
|
REM May 8 MSG %"Victoire des alliés%"
|
||||||
|
REM [easter+39] MSG %"Jeudi de l'Ascension%"
|
||||||
|
REM [easter+50] MSG %"Lundi de Pentecôte%"
|
||||||
|
REM Jul 14 MSG %"Fête nationale%"
|
||||||
|
REM Aug 15 MSG %"Assomption%"
|
||||||
|
REM Nov 1 MSG %"La Toussaint%"
|
||||||
|
REM Nov 11 MSG %"Armistice%"
|
||||||
|
REM Dec 25 MSG %"Noël%"
|
||||||
@@ -2,22 +2,22 @@
|
|||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2022 Dianne Skoll
|
# Copyright (C) 1992-2022 Dianne Skoll
|
||||||
|
|
||||||
REM [easterdate($Uy)-46] MSG %"Ash Wednesday%"
|
REM [easterdate($Uy)-46] MSG Ash Wednesday
|
||||||
REM [easterdate($Uy)-7] MSG %"Palm Sunday%"
|
REM [easterdate($Uy)-7] MSG Palm Sunday
|
||||||
OMIT [easterdate($Uy)-2] MSG %"Good Friday%"
|
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||||
OMIT [easterdate($Uy)] MSG %"Easter%" Sunday
|
OMIT [easterdate($Uy)] MSG %"Easter%" Sunday
|
||||||
REM [easterdate($Uy)+39] MSG %"Ascension Day%"
|
REM [easterdate($Uy)+39] MSG Ascension Day
|
||||||
REM [easterdate($Uy)+49] MSG %"Pentecost%"
|
REM [easterdate($Uy)+49] MSG Pentecost
|
||||||
|
|
||||||
# Some holidays are omitted, some are not. You may want to change
|
# Some holidays are omitted, some are not. You may want to change
|
||||||
# which ones are omitted.
|
# which ones are omitted.
|
||||||
|
|
||||||
OMIT Jan 1 MSG %"New Year's Day%"
|
OMIT Jan 1 MSG New Year's Day
|
||||||
REM Third Monday in Jan MSG Martin Luther King - %"MLK Day%"
|
REM Third Monday in Jan MSG Martin Luther King - %"MLK Day%"
|
||||||
REM Feb 2 MSG %"Ground Hog Day%"
|
REM Feb 2 MSG Ground Hog Day
|
||||||
REM Feb 14 MSG %"Valentine's Day%"
|
REM Feb 14 MSG Valentine's Day
|
||||||
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG %"President's Day%"
|
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG President's Day
|
||||||
REM Mar 17 MSG %"St. Patrick's Day%"
|
REM Mar 17 MSG St. Patrick's Day
|
||||||
|
|
||||||
# These are accurate for most places in North America
|
# These are accurate for most places in North America
|
||||||
REM MAYBE-UNCOMPUTABLE Sun November SATISFY [isdst($T) != isdst($T+1)] MSG Daylight Saving Time Ends
|
REM MAYBE-UNCOMPUTABLE Sun November SATISFY [isdst($T) != isdst($T+1)] MSG Daylight Saving Time Ends
|
||||||
@@ -25,30 +25,30 @@ REM MAYBE-UNCOMPUTABLE Sun March SATISFY [isdst($T) != isdst($T+1)] MSG Daylight
|
|||||||
|
|
||||||
REM Apr 1 MSG %"April Fool's%" Day
|
REM Apr 1 MSG %"April Fool's%" Day
|
||||||
REM Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
|
REM Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
|
||||||
REM May 5 MSG %"Cinco de Mayo%"
|
REM May 5 MSG Cinco de Mayo
|
||||||
REM First Sat in May MSG %"Kentucky Derby%"
|
REM First Sat in May MSG Kentucky Derby
|
||||||
REM Second Sun in May MSG %"Mother's Day%"
|
REM Second Sun in May MSG Mother's Day
|
||||||
REM Third Sat in May MSG %"Armed Forces Day%"
|
REM Third Sat in May MSG Armed Forces Day
|
||||||
REM Last Monday in May SCANFROM -7 ADDOMIT MSG %"Memorial Day%"
|
REM Last Monday in May SCANFROM -7 ADDOMIT MSG Memorial Day
|
||||||
REM Jun 14 MSG %"Flag Day%"
|
REM Jun 14 MSG Flag Day
|
||||||
|
|
||||||
REM July 4 SCANFROM -7 ADDOMIT MSG Independence Day
|
REM July 4 SCANFROM -7 ADDOMIT MSG Independence Day
|
||||||
REM July 3 SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Independence Day (observed)
|
REM July 3 SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Independence Day (observed)
|
||||||
REM July 5 SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Independence Day (observed)
|
REM July 5 SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Independence Day (observed)
|
||||||
|
|
||||||
REM Third Sun in June MSG %"Father's Day%"
|
REM Third Sun in June MSG Father's Day
|
||||||
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG %"Labor Day%"
|
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG Labor Day
|
||||||
REM Second Mon in Oct MSG %"Columbus Day / Indigenous Peoples' Day%"
|
REM Second Mon in Oct MSG Columbus Day / Indigenous Peoples' Day
|
||||||
REM Nov 11 MSG %"Veterans Day%"
|
REM Nov 11 MSG Veterans Day
|
||||||
|
|
||||||
REM Oct 30 MSG %"Mischief Night%"
|
REM Oct 30 MSG Mischief Night
|
||||||
REM Oct 31 MSG %"Halloween%"
|
REM Oct 31 MSG Halloween
|
||||||
|
|
||||||
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG %"Election Day%"
|
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG Election Day
|
||||||
|
|
||||||
REM Thu 22 Nov SCANFROM -7 ADDOMIT MSG %"Thanksgiving Day%"
|
REM Thu 22 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving Day
|
||||||
|
|
||||||
REM Fri 23 Nov SCANFROM -7 ADDOMIT MSG %"Thanksgiving (cont.)%"
|
REM Fri 23 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving (cont.)
|
||||||
|
|
||||||
REM Dec 24 MSG %"Christmas Eve%"
|
REM Dec 24 MSG Christmas Eve
|
||||||
OMIT Dec 25 MSG %"Christmas%" Day
|
OMIT Dec 25 MSG %"Christmas%" Day
|
||||||
|
|||||||
@@ -955,6 +955,7 @@ proc WriteOptionsToFile {} {
|
|||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
proc LoadOptions {} {
|
proc LoadOptions {} {
|
||||||
global Option ConfigFile
|
global Option ConfigFile
|
||||||
|
global MondayFirst
|
||||||
set problem [catch {set f [open "$ConfigFile" "r"]}]
|
set problem [catch {set f [open "$ConfigFile" "r"]}]
|
||||||
if {$problem} {
|
if {$problem} {
|
||||||
return
|
return
|
||||||
@@ -974,6 +975,9 @@ proc LoadOptions {} {
|
|||||||
set Option($key) $val
|
set Option($key) $val
|
||||||
}
|
}
|
||||||
close $f
|
close $f
|
||||||
|
if {[regexp -- {-m.*} $Option(ExtraRemindArgs)]} {
|
||||||
|
set MondayFirst 1
|
||||||
|
}
|
||||||
font configure CalboxFont {*}$Option(CalboxFont)
|
font configure CalboxFont {*}$Option(CalboxFont)
|
||||||
font configure HeadingFont {*}$Option(HeadingFont)
|
font configure HeadingFont {*}$Option(HeadingFont)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!c) {
|
if (!c) {
|
||||||
Wprint("Warning: Unterminated %{...} substitution sequence");
|
Wprint("Warning: Unterminated %%{...} substitution sequence");
|
||||||
}
|
}
|
||||||
if (UserFuncExists(s) != 3) {
|
if (UserFuncExists(s) != 3) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
22
src/expr.c
22
src/expr.c
@@ -1194,9 +1194,9 @@ static int LogNot(void)
|
|||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* FindFunc */
|
/* FindOperator */
|
||||||
/* */
|
/* */
|
||||||
/* Find a function. */
|
/* Find an operator. */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
Operator *FindOperator(char const *name, Operator where[], int num)
|
Operator *FindOperator(char const *name, Operator where[], int num)
|
||||||
@@ -1205,7 +1205,7 @@ Operator *FindOperator(char const *name, Operator where[], int num)
|
|||||||
int mid, r;
|
int mid, r;
|
||||||
while (top >= bot) {
|
while (top >= bot) {
|
||||||
mid = (top + bot) / 2;
|
mid = (top + bot) / 2;
|
||||||
r = StrCmpi(name, where[mid].name);
|
r = strcmp(name, where[mid].name);
|
||||||
if (!r) return &where[mid];
|
if (!r) return &where[mid];
|
||||||
else if (r > 0) bot = mid+1;
|
else if (r > 0) bot = mid+1;
|
||||||
else top = mid-1;
|
else top = mid-1;
|
||||||
@@ -1213,6 +1213,20 @@ Operator *FindOperator(char const *name, Operator where[], int num)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Compare two strings case-insensitively, where we KNOW
|
||||||
|
that the second string is definitely lower-case */
|
||||||
|
static int strcmp_lcfirst(char const *s1, char const *s2)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
while (*s1 && *s2) {
|
||||||
|
r = tolower(*s1) - *s2;
|
||||||
|
if (r) return r;
|
||||||
|
s1++;
|
||||||
|
s2++;
|
||||||
|
}
|
||||||
|
return tolower(*s1) - *s2;
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* FindFunc */
|
/* FindFunc */
|
||||||
@@ -1226,7 +1240,7 @@ BuiltinFunc *FindFunc(char const *name, BuiltinFunc where[], int num)
|
|||||||
int mid, r;
|
int mid, r;
|
||||||
while (top >= bot) {
|
while (top >= bot) {
|
||||||
mid = (top + bot) / 2;
|
mid = (top + bot) / 2;
|
||||||
r = StrCmpi(name, where[mid].name);
|
r = strcmp_lcfirst(name, where[mid].name);
|
||||||
if (!r) return &where[mid];
|
if (!r) return &where[mid];
|
||||||
else if (r > 0) bot = mid+1;
|
else if (r > 0) bot = mid+1;
|
||||||
else top = mid-1;
|
else top = mid-1;
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ static void DoReminders(void)
|
|||||||
Parser p;
|
Parser p;
|
||||||
int purge_handled;
|
int purge_handled;
|
||||||
|
|
||||||
|
DidMsgReminder = 0;
|
||||||
|
|
||||||
if (!UseStdin) {
|
if (!UseStdin) {
|
||||||
FileAccessDate = GetAccessDate(InitialFile);
|
FileAccessDate = GetAccessDate(InitialFile);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
20
src/moon.c
20
src/moon.c
@@ -400,8 +400,8 @@ static double phase(double pdate,
|
|||||||
double *suangdia)
|
double *suangdia)
|
||||||
{
|
{
|
||||||
|
|
||||||
double Day, N, M, Ec, Lambdasun, ml, MM, MN, Ev, Ae, A3, MmP,
|
double Day, N, M, Ec, Lambdasun, ml, MM, Ev, Ae, A3, MmP,
|
||||||
mEc, A4, lP, V, lPP, NP, y, x, Lambdamoon,
|
mEc, A4, lP, V, lPP,
|
||||||
MoonAge, MoonPhase,
|
MoonAge, MoonPhase,
|
||||||
MoonDist, MoonDFrac, MoonAng,
|
MoonDist, MoonDFrac, MoonAng,
|
||||||
F, SunDist, SunAng;
|
F, SunDist, SunAng;
|
||||||
@@ -431,9 +431,6 @@ static double phase(double pdate,
|
|||||||
/* Moon's mean anomaly */
|
/* Moon's mean anomaly */
|
||||||
MM = fixangle(ml - 0.1114041 * Day - mmlongp);
|
MM = fixangle(ml - 0.1114041 * Day - mmlongp);
|
||||||
|
|
||||||
/* Moon's ascending node mean longitude */
|
|
||||||
MN = fixangle(mlnode - 0.0529539 * Day);
|
|
||||||
|
|
||||||
/* Evection */
|
/* Evection */
|
||||||
Ev = 1.2739 * sin(torad(2 * (ml - Lambdasun) - MM));
|
Ev = 1.2739 * sin(torad(2 * (ml - Lambdasun) - MM));
|
||||||
|
|
||||||
@@ -461,19 +458,6 @@ static double phase(double pdate,
|
|||||||
/* 1 longitude */
|
/* 1 longitude */
|
||||||
lPP = lP + V;
|
lPP = lP + V;
|
||||||
|
|
||||||
/* Corrected longitude of the node */
|
|
||||||
NP = MN - 0.16 * sin(torad(M));
|
|
||||||
|
|
||||||
/* Y inclination coordinate */
|
|
||||||
y = sin(torad(lPP - NP)) * cos(torad(minc));
|
|
||||||
|
|
||||||
/* X inclination coordinate */
|
|
||||||
x = cos(torad(lPP - NP));
|
|
||||||
|
|
||||||
/* Ecliptic longitude */
|
|
||||||
Lambdamoon = todeg(atan2(y, x));
|
|
||||||
Lambdamoon += NP;
|
|
||||||
|
|
||||||
/* Calculation of the phase of the Moon */
|
/* Calculation of the phase of the Moon */
|
||||||
|
|
||||||
/* Age of the Moon in degrees */
|
/* Age of the Moon in degrees */
|
||||||
|
|||||||
@@ -355,7 +355,8 @@ static int TokStrCmp(Token const *t, char const *s)
|
|||||||
register int r;
|
register int r;
|
||||||
char const *tk = t->name;
|
char const *tk = t->name;
|
||||||
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
|
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
|
||||||
r = tolower(*tk) - tolower(*s);
|
/* t->name is already lower-case */
|
||||||
|
r = *tk - tolower(*s);
|
||||||
tk++;
|
tk++;
|
||||||
s++;
|
s++;
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
@@ -363,5 +364,5 @@ static int TokStrCmp(Token const *t, char const *s)
|
|||||||
/* Ignore trailing commas on s */
|
/* Ignore trailing commas on s */
|
||||||
|
|
||||||
if (!*s || (*s == ',' && !*(s+1))) return 0;
|
if (!*s || (*s == ',' && !*(s+1))) return 0;
|
||||||
return (tolower(*tk) - tolower(*s));
|
return (*tk - tolower(*s));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ static void DestroyLocalVals (UserFunc *f);
|
|||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* DoFset */
|
/* DoFunset */
|
||||||
/* */
|
/* */
|
||||||
/* Undefine a user-defined function - the FUNSET command. */
|
/* Undefine a user-defined function - the FUNSET command. */
|
||||||
/* */
|
/* */
|
||||||
|
|||||||
@@ -398,6 +398,9 @@ EOF
|
|||||||
TZ=America/Toronto ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
|
TZ=America/Toronto ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
|
||||||
TZ=Europe/Berlin ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
|
TZ=Europe/Berlin ../src/remind -dxe ../tests/tz.rem >> ../tests/test.out 2>&1
|
||||||
|
|
||||||
|
# Test that banner is printed on every iteration
|
||||||
|
echo "MSG Should be three banners." | ../src/remind - 2022-10-20 '*3' >> ../tests/test.out 2>&1
|
||||||
|
|
||||||
# Remove references to SysInclude, which is build-specific
|
# Remove references to SysInclude, which is build-specific
|
||||||
grep -F -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out
|
grep -F -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out
|
||||||
cmp -s ../tests/test.out ../tests/test.cmp
|
cmp -s ../tests/test.out ../tests/test.cmp
|
||||||
|
|||||||
120
tests/test.cmp
120
tests/test.cmp
@@ -1060,7 +1060,7 @@ set a057 value("a05"+"6")
|
|||||||
"a05" + "6" => "a056"
|
"a05" + "6" => "a056"
|
||||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||||
set a058 version()
|
set a058 version()
|
||||||
version() => "04.02.00"
|
version() => "04.02.01"
|
||||||
set a059 wkday(today())
|
set a059 wkday(today())
|
||||||
today() => 1991-02-16
|
today() => 1991-02-16
|
||||||
wkday(1991-02-16) => "Saturday"
|
wkday(1991-02-16) => "Saturday"
|
||||||
@@ -2627,7 +2627,7 @@ a086 4
|
|||||||
a109 2012-01-01
|
a109 2012-01-01
|
||||||
a128 2018-02-03@16:45
|
a128 2018-02-03@16:45
|
||||||
a039 "February"
|
a039 "February"
|
||||||
a058 "04.02.00"
|
a058 "04.02.01"
|
||||||
a077 "1992 92\n"
|
a077 "1992 92\n"
|
||||||
a096 -4
|
a096 -4
|
||||||
a119 -1
|
a119 -1
|
||||||
@@ -10334,20 +10334,20 @@ STDOUT is a: PIPE
|
|||||||
|
|
||||||
set a localtoutc('2022-01-01@12:00')
|
set a localtoutc('2022-01-01@12:00')
|
||||||
localtoutc(2022-01-01@12:00) => 2022-01-01@17:00
|
localtoutc(2022-01-01@12:00) => 2022-01-01@17:00
|
||||||
set a localtoutc('2022-03-13@02:59')
|
set a localtoutc('2022-03-13@03:59')
|
||||||
localtoutc(2022-03-13@02:59) => 2022-03-13@07:59
|
localtoutc(2022-03-13@03:59) => 2022-03-13@07:59
|
||||||
set a localtoutc('2022-03-13@03:00')
|
set a localtoutc('2022-03-13@04:00')
|
||||||
localtoutc(2022-03-13@03:00) => 2022-03-13@07:00
|
localtoutc(2022-03-13@04:00) => 2022-03-13@08:00
|
||||||
set a localtoutc('2022-03-13@03:01')
|
set a localtoutc('2022-03-13@04:01')
|
||||||
localtoutc(2022-03-13@03:01) => 2022-03-13@07:01
|
localtoutc(2022-03-13@04:01) => 2022-03-13@08:01
|
||||||
set a localtoutc('2022-06-01@12:00')
|
set a localtoutc('2022-06-01@12:00')
|
||||||
localtoutc(2022-06-01@12:00) => 2022-06-01@16:00
|
localtoutc(2022-06-01@12:00) => 2022-06-01@16:00
|
||||||
set a localtoutc('2022-11-06@01:59')
|
set a localtoutc('2022-11-06@02:59')
|
||||||
localtoutc(2022-11-06@01:59) => 2022-11-06@05:59
|
localtoutc(2022-11-06@02:59) => 2022-11-06@07:59
|
||||||
set a localtoutc('2022-11-06@02:00')
|
set a localtoutc('2022-11-06@03:00')
|
||||||
localtoutc(2022-11-06@02:00) => 2022-11-06@07:00
|
localtoutc(2022-11-06@03:00) => 2022-11-06@08:00
|
||||||
set a localtoutc('2022-11-06@02:01')
|
set a localtoutc('2022-11-06@03:01')
|
||||||
localtoutc(2022-11-06@02:01) => 2022-11-06@07:01
|
localtoutc(2022-11-06@03:01) => 2022-11-06@08:01
|
||||||
set a localtoutc('2022-12-01@12:00')
|
set a localtoutc('2022-12-01@12:00')
|
||||||
localtoutc(2022-12-01@12:00) => 2022-12-01@17:00
|
localtoutc(2022-12-01@12:00) => 2022-12-01@17:00
|
||||||
|
|
||||||
@@ -10355,10 +10355,10 @@ set b utctolocal('2022-01-01@17:00')
|
|||||||
utctolocal(2022-01-01@17:00) => 2022-01-01@12:00
|
utctolocal(2022-01-01@17:00) => 2022-01-01@12:00
|
||||||
set b utctolocal('2022-03-13@06:00')
|
set b utctolocal('2022-03-13@06:00')
|
||||||
utctolocal(2022-03-13@06:00) => 2022-03-13@01:00
|
utctolocal(2022-03-13@06:00) => 2022-03-13@01:00
|
||||||
set b utctolocal('2022-03-13@06:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
utctolocal(2022-03-13@06:01) => 2022-03-13@01:01
|
utctolocal(2022-03-13@07:01) => 2022-03-13@03:01
|
||||||
set b utctolocal('2022-03-13@06:59')
|
set b utctolocal('2022-03-13@07:59')
|
||||||
utctolocal(2022-03-13@06:59) => 2022-03-13@01:59
|
utctolocal(2022-03-13@07:59) => 2022-03-13@03:59
|
||||||
set b utctolocal('2022-03-13@07:00')
|
set b utctolocal('2022-03-13@07:00')
|
||||||
utctolocal(2022-03-13@07:00) => 2022-03-13@03:00
|
utctolocal(2022-03-13@07:00) => 2022-03-13@03:00
|
||||||
set b utctolocal('2022-03-13@07:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
@@ -10367,20 +10367,20 @@ set b utctolocal('2022-03-13@07:59')
|
|||||||
utctolocal(2022-03-13@07:59) => 2022-03-13@03:59
|
utctolocal(2022-03-13@07:59) => 2022-03-13@03:59
|
||||||
set b utctolocal('2022-06-01@16:00')
|
set b utctolocal('2022-06-01@16:00')
|
||||||
utctolocal(2022-06-01@16:00) => 2022-06-01@12:00
|
utctolocal(2022-06-01@16:00) => 2022-06-01@12:00
|
||||||
set b utctolocal('2022-11-06@05:59')
|
set b utctolocal('2022-11-06@03:59')
|
||||||
utctolocal(2022-11-06@05:59) => 2022-11-06@01:59
|
utctolocal(2022-11-06@03:59) => 2022-11-05@23:59
|
||||||
set b utctolocal('2022-11-06@06:00')
|
|
||||||
utctolocal(2022-11-06@06:00) => 2022-11-06@01:00
|
|
||||||
set b utctolocal('2022-11-06@06:01')
|
|
||||||
utctolocal(2022-11-06@06:01) => 2022-11-06@01:01
|
|
||||||
set b utctolocal('2022-11-06@06:59')
|
|
||||||
utctolocal(2022-11-06@06:59) => 2022-11-06@01:59
|
|
||||||
set b utctolocal('2022-11-06@07:00')
|
set b utctolocal('2022-11-06@07:00')
|
||||||
utctolocal(2022-11-06@07:00) => 2022-11-06@02:00
|
utctolocal(2022-11-06@07:00) => 2022-11-06@02:00
|
||||||
set b utctolocal('2022-11-06@07:01')
|
set b utctolocal('2022-11-06@07:01')
|
||||||
utctolocal(2022-11-06@07:01) => 2022-11-06@02:01
|
utctolocal(2022-11-06@07:01) => 2022-11-06@02:01
|
||||||
set b utctolocal('2022-12-01@17:00')
|
set b utctolocal('2022-11-06@07:59')
|
||||||
utctolocal(2022-12-01@17:00) => 2022-12-01@12:00
|
utctolocal(2022-11-06@07:59) => 2022-11-06@02:59
|
||||||
|
set b utctolocal('2022-11-06@08:00')
|
||||||
|
utctolocal(2022-11-06@08:00) => 2022-11-06@03:00
|
||||||
|
set b utctolocal('2022-11-06@08:01')
|
||||||
|
utctolocal(2022-11-06@08:01) => 2022-11-06@03:01
|
||||||
|
set b utctolocal('2022-12-01@18:00')
|
||||||
|
utctolocal(2022-12-01@18:00) => 2022-12-01@13:00
|
||||||
|
|
||||||
set c timezone('2022-07-01')
|
set c timezone('2022-07-01')
|
||||||
timezone(2022-07-01) => "EDT"
|
timezone(2022-07-01) => "EDT"
|
||||||
@@ -10392,20 +10392,20 @@ No reminders.
|
|||||||
|
|
||||||
set a localtoutc('2022-01-01@12:00')
|
set a localtoutc('2022-01-01@12:00')
|
||||||
localtoutc(2022-01-01@12:00) => 2022-01-01@11:00
|
localtoutc(2022-01-01@12:00) => 2022-01-01@11:00
|
||||||
set a localtoutc('2022-03-13@02:59')
|
set a localtoutc('2022-03-13@03:59')
|
||||||
localtoutc(2022-03-13@02:59) => 2022-03-13@01:59
|
localtoutc(2022-03-13@03:59) => 2022-03-13@02:59
|
||||||
set a localtoutc('2022-03-13@03:00')
|
set a localtoutc('2022-03-13@04:00')
|
||||||
localtoutc(2022-03-13@03:00) => 2022-03-13@02:00
|
localtoutc(2022-03-13@04:00) => 2022-03-13@03:00
|
||||||
set a localtoutc('2022-03-13@03:01')
|
set a localtoutc('2022-03-13@04:01')
|
||||||
localtoutc(2022-03-13@03:01) => 2022-03-13@02:01
|
localtoutc(2022-03-13@04:01) => 2022-03-13@03:01
|
||||||
set a localtoutc('2022-06-01@12:00')
|
set a localtoutc('2022-06-01@12:00')
|
||||||
localtoutc(2022-06-01@12:00) => 2022-06-01@10:00
|
localtoutc(2022-06-01@12:00) => 2022-06-01@10:00
|
||||||
set a localtoutc('2022-11-06@01:59')
|
set a localtoutc('2022-11-06@02:59')
|
||||||
localtoutc(2022-11-06@01:59) => 2022-11-06@00:59
|
localtoutc(2022-11-06@02:59) => 2022-11-06@01:59
|
||||||
set a localtoutc('2022-11-06@02:00')
|
set a localtoutc('2022-11-06@03:00')
|
||||||
localtoutc(2022-11-06@02:00) => 2022-11-06@01:00
|
localtoutc(2022-11-06@03:00) => 2022-11-06@02:00
|
||||||
set a localtoutc('2022-11-06@02:01')
|
set a localtoutc('2022-11-06@03:01')
|
||||||
localtoutc(2022-11-06@02:01) => 2022-11-06@01:01
|
localtoutc(2022-11-06@03:01) => 2022-11-06@02:01
|
||||||
set a localtoutc('2022-12-01@12:00')
|
set a localtoutc('2022-12-01@12:00')
|
||||||
localtoutc(2022-12-01@12:00) => 2022-12-01@11:00
|
localtoutc(2022-12-01@12:00) => 2022-12-01@11:00
|
||||||
|
|
||||||
@@ -10413,10 +10413,10 @@ set b utctolocal('2022-01-01@17:00')
|
|||||||
utctolocal(2022-01-01@17:00) => 2022-01-01@18:00
|
utctolocal(2022-01-01@17:00) => 2022-01-01@18:00
|
||||||
set b utctolocal('2022-03-13@06:00')
|
set b utctolocal('2022-03-13@06:00')
|
||||||
utctolocal(2022-03-13@06:00) => 2022-03-13@07:00
|
utctolocal(2022-03-13@06:00) => 2022-03-13@07:00
|
||||||
set b utctolocal('2022-03-13@06:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
utctolocal(2022-03-13@06:01) => 2022-03-13@07:01
|
utctolocal(2022-03-13@07:01) => 2022-03-13@08:01
|
||||||
set b utctolocal('2022-03-13@06:59')
|
set b utctolocal('2022-03-13@07:59')
|
||||||
utctolocal(2022-03-13@06:59) => 2022-03-13@07:59
|
utctolocal(2022-03-13@07:59) => 2022-03-13@08:59
|
||||||
set b utctolocal('2022-03-13@07:00')
|
set b utctolocal('2022-03-13@07:00')
|
||||||
utctolocal(2022-03-13@07:00) => 2022-03-13@08:00
|
utctolocal(2022-03-13@07:00) => 2022-03-13@08:00
|
||||||
set b utctolocal('2022-03-13@07:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
@@ -10425,20 +10425,20 @@ set b utctolocal('2022-03-13@07:59')
|
|||||||
utctolocal(2022-03-13@07:59) => 2022-03-13@08:59
|
utctolocal(2022-03-13@07:59) => 2022-03-13@08:59
|
||||||
set b utctolocal('2022-06-01@16:00')
|
set b utctolocal('2022-06-01@16:00')
|
||||||
utctolocal(2022-06-01@16:00) => 2022-06-01@18:00
|
utctolocal(2022-06-01@16:00) => 2022-06-01@18:00
|
||||||
set b utctolocal('2022-11-06@05:59')
|
set b utctolocal('2022-11-06@03:59')
|
||||||
utctolocal(2022-11-06@05:59) => 2022-11-06@06:59
|
utctolocal(2022-11-06@03:59) => 2022-11-06@04:59
|
||||||
set b utctolocal('2022-11-06@06:00')
|
|
||||||
utctolocal(2022-11-06@06:00) => 2022-11-06@07:00
|
|
||||||
set b utctolocal('2022-11-06@06:01')
|
|
||||||
utctolocal(2022-11-06@06:01) => 2022-11-06@07:01
|
|
||||||
set b utctolocal('2022-11-06@06:59')
|
|
||||||
utctolocal(2022-11-06@06:59) => 2022-11-06@07:59
|
|
||||||
set b utctolocal('2022-11-06@07:00')
|
set b utctolocal('2022-11-06@07:00')
|
||||||
utctolocal(2022-11-06@07:00) => 2022-11-06@08:00
|
utctolocal(2022-11-06@07:00) => 2022-11-06@08:00
|
||||||
set b utctolocal('2022-11-06@07:01')
|
set b utctolocal('2022-11-06@07:01')
|
||||||
utctolocal(2022-11-06@07:01) => 2022-11-06@08:01
|
utctolocal(2022-11-06@07:01) => 2022-11-06@08:01
|
||||||
set b utctolocal('2022-12-01@17:00')
|
set b utctolocal('2022-11-06@07:59')
|
||||||
utctolocal(2022-12-01@17:00) => 2022-12-01@18:00
|
utctolocal(2022-11-06@07:59) => 2022-11-06@08:59
|
||||||
|
set b utctolocal('2022-11-06@08:00')
|
||||||
|
utctolocal(2022-11-06@08:00) => 2022-11-06@09:00
|
||||||
|
set b utctolocal('2022-11-06@08:01')
|
||||||
|
utctolocal(2022-11-06@08:01) => 2022-11-06@09:01
|
||||||
|
set b utctolocal('2022-12-01@18:00')
|
||||||
|
utctolocal(2022-12-01@18:00) => 2022-12-01@19:00
|
||||||
|
|
||||||
set c timezone('2022-07-01')
|
set c timezone('2022-07-01')
|
||||||
timezone(2022-07-01) => "CEST"
|
timezone(2022-07-01) => "CEST"
|
||||||
@@ -10446,3 +10446,15 @@ set c timezone('2022-12-01')
|
|||||||
timezone(2022-12-01) => "CET"
|
timezone(2022-12-01) => "CET"
|
||||||
|
|
||||||
No reminders.
|
No reminders.
|
||||||
|
Reminders for Thursday, 20th October, 2022:
|
||||||
|
|
||||||
|
Should be three banners.
|
||||||
|
|
||||||
|
Reminders for Friday, 21st October, 2022:
|
||||||
|
|
||||||
|
Should be three banners.
|
||||||
|
|
||||||
|
Reminders for Saturday, 22nd October, 2022:
|
||||||
|
|
||||||
|
Should be three banners.
|
||||||
|
|
||||||
|
|||||||
26
tests/tz.rem
26
tests/tz.rem
@@ -1,30 +1,30 @@
|
|||||||
# Test conversion between local time and UTC
|
# Test conversion between local time and UTC
|
||||||
|
|
||||||
set a localtoutc('2022-01-01@12:00')
|
set a localtoutc('2022-01-01@12:00')
|
||||||
set a localtoutc('2022-03-13@02:59')
|
set a localtoutc('2022-03-13@03:59')
|
||||||
set a localtoutc('2022-03-13@03:00')
|
set a localtoutc('2022-03-13@04:00')
|
||||||
set a localtoutc('2022-03-13@03:01')
|
set a localtoutc('2022-03-13@04:01')
|
||||||
set a localtoutc('2022-06-01@12:00')
|
set a localtoutc('2022-06-01@12:00')
|
||||||
set a localtoutc('2022-11-06@01:59')
|
set a localtoutc('2022-11-06@02:59')
|
||||||
set a localtoutc('2022-11-06@02:00')
|
set a localtoutc('2022-11-06@03:00')
|
||||||
set a localtoutc('2022-11-06@02:01')
|
set a localtoutc('2022-11-06@03:01')
|
||||||
set a localtoutc('2022-12-01@12:00')
|
set a localtoutc('2022-12-01@12:00')
|
||||||
|
|
||||||
set b utctolocal('2022-01-01@17:00')
|
set b utctolocal('2022-01-01@17:00')
|
||||||
set b utctolocal('2022-03-13@06:00')
|
set b utctolocal('2022-03-13@06:00')
|
||||||
set b utctolocal('2022-03-13@06:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
set b utctolocal('2022-03-13@06:59')
|
set b utctolocal('2022-03-13@07:59')
|
||||||
set b utctolocal('2022-03-13@07:00')
|
set b utctolocal('2022-03-13@07:00')
|
||||||
set b utctolocal('2022-03-13@07:01')
|
set b utctolocal('2022-03-13@07:01')
|
||||||
set b utctolocal('2022-03-13@07:59')
|
set b utctolocal('2022-03-13@07:59')
|
||||||
set b utctolocal('2022-06-01@16:00')
|
set b utctolocal('2022-06-01@16:00')
|
||||||
set b utctolocal('2022-11-06@05:59')
|
set b utctolocal('2022-11-06@03:59')
|
||||||
set b utctolocal('2022-11-06@06:00')
|
|
||||||
set b utctolocal('2022-11-06@06:01')
|
|
||||||
set b utctolocal('2022-11-06@06:59')
|
|
||||||
set b utctolocal('2022-11-06@07:00')
|
set b utctolocal('2022-11-06@07:00')
|
||||||
set b utctolocal('2022-11-06@07:01')
|
set b utctolocal('2022-11-06@07:01')
|
||||||
set b utctolocal('2022-12-01@17:00')
|
set b utctolocal('2022-11-06@07:59')
|
||||||
|
set b utctolocal('2022-11-06@08:00')
|
||||||
|
set b utctolocal('2022-11-06@08:01')
|
||||||
|
set b utctolocal('2022-12-01@18:00')
|
||||||
|
|
||||||
set c timezone('2022-07-01')
|
set c timezone('2022-07-01')
|
||||||
set c timezone('2022-12-01')
|
set c timezone('2022-12-01')
|
||||||
|
|||||||
Reference in New Issue
Block a user