mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Compare commits
53 Commits
4695efaabd
...
05.00.07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dea2aed628 | ||
|
|
5618b928e0 | ||
|
|
91187c4c60 | ||
|
|
636ae8f21a | ||
|
|
405398b226 | ||
|
|
0df3a903b1 | ||
|
|
eac07d212c | ||
|
|
96da3a6596 | ||
|
|
94ef20d702 | ||
|
|
c9c309e436 | ||
|
|
52c973509b | ||
|
|
c192c580da | ||
|
|
235e5ec1c7 | ||
|
|
3d30173f9a | ||
|
|
8b0bbc9fb7 | ||
|
|
c57d2fd52a | ||
|
|
2970591187 | ||
|
|
23ec559ddf | ||
|
|
302bc5a5de | ||
|
|
950c0b3747 | ||
|
|
ad382fea25 | ||
|
|
a66e855ca7 | ||
|
|
a1b814d6b1 | ||
|
|
62030719bb | ||
|
|
985816dc32 | ||
|
|
a131a53132 | ||
|
|
c5e723b6ac | ||
|
|
3fe2b88e65 | ||
|
|
54603090ee | ||
|
|
2514b3681f | ||
|
|
0b7b101814 | ||
|
|
3ac1c622fd | ||
|
|
7878f6623c | ||
|
|
00ad38e5fe | ||
|
|
10ae0b0077 | ||
|
|
e032f3315d | ||
|
|
a38fd95a90 | ||
|
|
9f7609b2c6 | ||
|
|
a6c166ae0c | ||
|
|
e9c89b770f | ||
|
|
df6298bd63 | ||
|
|
739d285e36 | ||
|
|
ee1c931932 | ||
|
|
0806b6738f | ||
|
|
020e82d575 | ||
|
|
a20f2b588e | ||
|
|
631e721a96 | ||
|
|
8453e17c6c | ||
|
|
76c1e2abb3 | ||
|
|
3389f1c91b | ||
|
|
b2d47ae979 | ||
|
|
e2c615f310 | ||
|
|
e8492a4303 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,6 +22,7 @@ rem2pdf/Makefile.PL
|
||||
rem2pdf/Makefile.old
|
||||
rem2pdf/Makefile.top
|
||||
rem2pdf/bin/rem2pdf
|
||||
scripts/tkremind
|
||||
set-irc-topic
|
||||
src/*.tar.gz*
|
||||
src/Makefile
|
||||
|
||||
2
Makefile
2
Makefile
@@ -24,7 +24,7 @@ install:
|
||||
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
|
||||
clean:
|
||||
find . -name '*~' -exec rm {} \;
|
||||
-rm man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1
|
||||
-rm man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind
|
||||
-$(MAKE) -C src clean
|
||||
-$(MAKE) -C rem2pdf clean
|
||||
|
||||
|
||||
28
configure
vendored
28
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for remind 05.00.05.
|
||||
# Generated by GNU Autoconf 2.71 for remind 05.00.07.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
|
||||
@@ -608,8 +608,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='remind'
|
||||
PACKAGE_TARNAME='remind'
|
||||
PACKAGE_VERSION='05.00.05'
|
||||
PACKAGE_STRING='remind 05.00.05'
|
||||
PACKAGE_VERSION='05.00.07'
|
||||
PACKAGE_STRING='remind 05.00.07'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
|
||||
|
||||
@@ -651,6 +651,7 @@ LIBOBJS
|
||||
RELEASE_DATE
|
||||
PERLARTIFACTS
|
||||
VERSION
|
||||
CONFIG_CMD
|
||||
PERL
|
||||
SET_MAKE
|
||||
LN_S
|
||||
@@ -1264,7 +1265,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures remind 05.00.05 to adapt to many kinds of systems.
|
||||
\`configure' configures remind 05.00.07 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1326,7 +1327,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of remind 05.00.05:";;
|
||||
short | recursive ) echo "Configuration of remind 05.00.07:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1414,7 +1415,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
remind configure 05.00.05
|
||||
remind configure 05.00.07
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -1864,7 +1865,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by remind $as_me 05.00.05, which was
|
||||
It was created by remind $as_me 05.00.07, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -4198,11 +4199,16 @@ fi
|
||||
|
||||
|
||||
VERSION=$PACKAGE_VERSION
|
||||
CONFIG_CMD="$0$ac_configure_args_raw"
|
||||
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
|
||||
printf "%s\n" "#define CONFIG_CMD \"$CONFIG_CMD\"" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1"
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -4703,7 +4709,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by remind $as_me 05.00.05, which was
|
||||
This file was extended by remind $as_me 05.00.07, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -4768,7 +4774,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
remind config.status 05.00.05
|
||||
remind config.status 05.00.07
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -4903,6 +4909,7 @@ do
|
||||
"man/rem2ps.1") CONFIG_FILES="$CONFIG_FILES man/rem2ps.1" ;;
|
||||
"man/remind.1") CONFIG_FILES="$CONFIG_FILES man/remind.1" ;;
|
||||
"man/tkremind.1") CONFIG_FILES="$CONFIG_FILES man/tkremind.1" ;;
|
||||
"scripts/tkremind") CONFIG_FILES="$CONFIG_FILES scripts/tkremind" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
@@ -5490,4 +5497,5 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2
|
||||
fi
|
||||
|
||||
chmod a+x rem2pdf/bin/rem2pdf
|
||||
chmod a+x scripts/tkremind
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(remind, 05.00.05, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_INIT(remind, 05.00.07, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_CONFIG_SRCDIR([src/queue.c])
|
||||
|
||||
cat <<'EOF'
|
||||
@@ -87,10 +87,15 @@ fi
|
||||
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp setenv unsetenv glob mbstowcs setlocale initgroups inotify_init1)
|
||||
|
||||
VERSION=$PACKAGE_VERSION
|
||||
CONFIG_CMD="$0$ac_configure_args_raw"
|
||||
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
|
||||
AC_DEFINE_UNQUOTED([CONFIG_CMD], ["$CONFIG_CMD"])
|
||||
AC_SUBST(CONFIG_CMD)
|
||||
AC_SUBST(VERSION)
|
||||
AC_SUBST(PERL)
|
||||
AC_SUBST(PERLARTIFACTS)
|
||||
AC_SUBST(RELEASE_DATE)
|
||||
AC_CONFIG_FILES([src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1])
|
||||
AC_CONFIG_FILES([src/Makefile www/Makefile src/version.h rem2html/Makefile rem2html/rem2html rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1 scripts/tkremind])
|
||||
AC_OUTPUT
|
||||
chmod a+x rem2pdf/bin/rem2pdf
|
||||
chmod a+x scripts/tkremind
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Justin B. Alcorn
|
||||
Copyright (c) 2005, 2007, 2019 Justin B. Alcorn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -3,22 +3,32 @@
|
||||
# ical2rem.pl -
|
||||
# Reads iCal files and outputs remind-compatible files. Tested ONLY with
|
||||
# calendar files created by Mozilla Calendar/Sunbird. Use at your own risk.
|
||||
# Copyright (c) 2005, 2007, Justin B. Alcorn
|
||||
|
||||
# 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.
|
||||
# MIT License
|
||||
#
|
||||
# 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.
|
||||
# Copyright (c) 2005, 2007, 2019 Justin B. Alcorn
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
#
|
||||
# version 0.7.1 2024-09-19
|
||||
# - Made sure license statements were consistent
|
||||
# version 0.7 2024-09-04
|
||||
# - Added dummy _sfun to resolve Issue #8
|
||||
# version 0.6 2019-03-01
|
||||
# - Updates to put on GitHub
|
||||
# version 0.5.2 2007-03-23
|
||||
@@ -143,7 +143,7 @@
|
||||
"$NumTrig" "$October" "$On" "$OnceFile" "$ParseUntriggered" "$Pm"
|
||||
"$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday" "$September"
|
||||
"$SimpleCal" "$SortByDate" "$SortByPrio" "$SortByTime" "$SubsIndent"
|
||||
"$Sunday" "$SuppressLRM" "$SysInclude" "$T" "$Td"
|
||||
"$Sunday" "$SuppressImplicitWarnings" "$SuppressLRM" "$SysInclude" "$T" "$Td"
|
||||
"$TerminalBackground" "$Thursday" "$TimeSep" "$Tm" "$Today"
|
||||
"$Tomorrow" "$Tt" "$Tuesday" "$Tw" "$Ty" "$U" "$Ud" "$Um"
|
||||
"$UntimedFirst" "$Use256Colors" "$UseBGVTColors" "$UseTrueColors"
|
||||
|
||||
326
docs/WHATSNEW
326
docs/WHATSNEW
@@ -1,89 +1,147 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* VERSION 5.0 Patch 7 - 2024-10-16
|
||||
|
||||
- NEW FEATURE: tkremind: Add option to create a desktop notification when
|
||||
a queued reminder is triggered. For Tcl/Tk 9.0 or later, uses the native
|
||||
"tk sysnotify" facility. For earlier versions of Tcl/Tk, executes the
|
||||
"notify-send" program if possible.
|
||||
|
||||
- NEW FEATURE: remind: Add --print-config-cmd option which prints the
|
||||
exact ./configure command used to build Remind. This will let you
|
||||
configure future Remind releases exactly the same way an installed
|
||||
version was configured.
|
||||
|
||||
- UPDATE: include/holidays/ca.rem: Add National Day for Truth and
|
||||
Reconciliation to Canadian holiday list.
|
||||
|
||||
- MINOR IMPROVEMENTS: Update examples/ansitext and examples/astro
|
||||
|
||||
- MINOR IMPROVEMENT: remind: Use HashPJW to hash variable and function
|
||||
names; make the hash table size a prime rather than a power of two.
|
||||
This seems to improve hash performance ever so slightly in most cases.
|
||||
|
||||
- UPDATE: Update contrib/ical2rem to upstream version 0.7.1
|
||||
|
||||
- FIX: tkremind: Make tkremind work with Tcl/Tk 8.5 or higher, including
|
||||
Tcl/Tk 9.0
|
||||
|
||||
- MINOR CHANGE: remind: Add hash table statistics to "-ds" debugging
|
||||
output. This is probably of no use to anyone except the author of
|
||||
Remind.
|
||||
|
||||
* VERSION 5.0 Patch 6 - 2024-09-16
|
||||
|
||||
- NEW FEATURE: remind: Include a file containing the dates of Chinese
|
||||
New Year through 2050.
|
||||
|
||||
- NEW FEATURE: remind: Add $SuppressImplicitWarnings system variable.
|
||||
Setting this to 1 suppresses the warnings "Unrecognized command;
|
||||
interpreting as REM" and "Missing REM type; assuming MSG"
|
||||
|
||||
- NEW FEATURE: remind: Add --print-tokens command-line argument. This
|
||||
simply prints all of Remind's built-in tokens, functions, and system
|
||||
variables. It's designed to help people who are writing editor
|
||||
add-ons for syntax highlighting.
|
||||
|
||||
- CHANGE: remind: allow '12:34' to be parsed as a TIME constant. This
|
||||
matches DATEs and DATETIMEs which are enclosed in single-quotes.
|
||||
(The quotes are optional for TIME constants, however.)
|
||||
|
||||
- IMPROVEMENT: Improve many error messages and warnings.
|
||||
|
||||
- UPDATE: contrib/ical2rem: Update to upstream version 0.7
|
||||
|
||||
- IMPROVEMENT: contrib/remind-conf-mode: Improve the Emacs
|
||||
remind-conf-mode package. Add new keywords and make comment
|
||||
highlighting correct.
|
||||
|
||||
- FIX: remind man page: Remove note saying REM can be omitted.
|
||||
|
||||
* VERSION 5.0 Patch 5 - 2024-09-02
|
||||
|
||||
* CHANGE: remind: When using the "-c" option and with the SHADE special
|
||||
- CHANGE: remind: When using the "-c" option and with the SHADE special
|
||||
enabled, shade the entire calendar box including the line containing the
|
||||
day number.
|
||||
|
||||
* IMPROVEMENT: remind: Better error messages when diagnosing certain
|
||||
- IMPROVEMENT: remind: Better error messages when diagnosing certain
|
||||
errors in expressions.
|
||||
|
||||
* IMPROVEMENT: include/holidays/jewish.rem: Remove unnecessary _h()
|
||||
- IMPROVEMENT: include/holidays/jewish.rem: Remove unnecessary _h()
|
||||
function definition.
|
||||
|
||||
* BUG FIX: remind: In a couple of spots when we parsed a character, we did
|
||||
- BUG FIX: remind: In a couple of spots when we parsed a character, we did
|
||||
not check for an error return. This has been fixed.
|
||||
|
||||
* BUG FIX: remind: Fix edge-case bugs in "remind -c" output formatting.
|
||||
- BUG FIX: remind: Fix edge-case bugs in "remind -c" output formatting.
|
||||
|
||||
* BUG FIX: make test: Fix a test that was broken for all of September 2024.
|
||||
- BUG FIX: make test: Fix a test that was broken for all of September 2024.
|
||||
|
||||
* BUG FIX: remind: Fix a couple of potential file-descriptor leaks.
|
||||
- BUG FIX: remind: Fix a couple of potential file-descriptor leaks.
|
||||
|
||||
* BUG FIX: contrib/ical2rem.pl: Replace "SCHED _sfun" with "+15" to
|
||||
- BUG FIX: contrib/ical2rem.pl: Replace "SCHED _sfun" with "+15" to
|
||||
hard-code 15-minutes advance warning rather than using an undefined
|
||||
scheduling function. If this is not what you want, you should edit
|
||||
ical2rem.pl to suit your taste; it's not officially part of Remind and
|
||||
is meant more as a starting point for you to customize than a finished
|
||||
product.
|
||||
|
||||
* DOCUMENTATION FIX: Remove obsolete info from Remind man page.
|
||||
- DOCUMENTATION FIX: Remove obsolete info from Remind man page.
|
||||
|
||||
* VERSION 5.0 Patch 4 - 2024-08-29
|
||||
|
||||
* IMPROVEMENT: remind: When checking if a SATISFY expression refers to the
|
||||
- IMPROVEMENT: remind: When checking if a SATISFY expression refers to the
|
||||
trigger date, look recursively at any user-defined functions it calls.
|
||||
This reduces spurious warnings.
|
||||
|
||||
* CHANGE: remind: Allow any type to be used as the test argument for IIF.
|
||||
- CHANGE: remind: Allow any type to be used as the test argument for IIF.
|
||||
|
||||
* IMPROVEMENT: remind man page: Clarify how various types are treated
|
||||
- IMPROVEMENT: remind man page: Clarify how various types are treated
|
||||
in boolean context.
|
||||
|
||||
* VERSION 5.0 Patch 3 - 2024-08-28
|
||||
|
||||
* IMPROVEMENT: remind: Preserve newlines ("%_" sequences) in calendar
|
||||
- IMPROVEMENT: remind: Preserve newlines ("%_" sequences) in calendar
|
||||
mode in most cases. See the remind man page for details.
|
||||
|
||||
* IMPROVEMENT: rem2pdf: rem2pdf can now produce PostScript and
|
||||
- IMPROVEMENT: rem2pdf: rem2pdf can now produce PostScript and
|
||||
Encapsulated PostScript output in addition to PDF and SVG.
|
||||
|
||||
* IMPROVEMENT: remind: Emit warnings if a subst_XXX function takes the
|
||||
- IMPROVEMENT: remind: Emit warnings if a subst_XXX function takes the
|
||||
wrong number of arguments, or for custom sequences, if the function
|
||||
is not defined.
|
||||
|
||||
* IMPROVEMENT: remind: Emit warnings if WARN/SCHED/OMITFUNC functions
|
||||
- IMPROVEMENT: remind: Emit warnings if WARN/SCHED/OMITFUNC functions
|
||||
do not reference their argument.
|
||||
|
||||
* IMPROVEMENT: remind: Allow strings to be used with logical
|
||||
- IMPROVEMENT: remind: Allow strings to be used with logical
|
||||
operators. The empty string "" is considered false and all other
|
||||
strings are considered true.
|
||||
|
||||
* IMPROVEMENT: remind: Emit warnings for lines that are implicitly
|
||||
- IMPROVEMENT: remind: Emit warnings for lines that are implicitly
|
||||
treated as REM commands; add warnings for REM commands that are
|
||||
implicitly treated as MSG-type reminders.
|
||||
|
||||
* IMPROVEMENT: remind: Add an optional fourth argument to the built-in
|
||||
- IMPROVEMENT: remind: Add an optional fourth argument to the built-in
|
||||
ampm() function that specifies not to suppress a leading zero in the
|
||||
hour component.
|
||||
|
||||
* IMPROVEMENT: remind: If a SATISFY expression is not constant and
|
||||
- IMPROVEMENT: remind: If a SATISFY expression is not constant and
|
||||
doesn't reference the trigger date somehow, issue a warning.
|
||||
|
||||
* IMPROVEMENT: remind: Add a warning if a user-defined function is
|
||||
- IMPROVEMENT: remind: Add a warning if a user-defined function is
|
||||
redefined. If you do have a use-case that requires you to redefine
|
||||
a function, simply FUNSET it first before FSETting it for the second
|
||||
time.
|
||||
|
||||
* DOCUMENTATION FIX: Clarify man pages and remove some information that
|
||||
- DOCUMENTATION FIX: Clarify man pages and remove some information that
|
||||
has become incorrect as Remind has evolved.
|
||||
|
||||
* BUG FIX: Fix typos in man pages
|
||||
- BUG FIX: Fix typos in man pages
|
||||
|
||||
* VERSION 5.0 Patch 2 - 2024-07-26
|
||||
|
||||
* IMPROVEMENT: Remind: Revamp how ONCE works. You can now set a
|
||||
- IMPROVEMENT: Remind: Revamp how ONCE works. You can now set a
|
||||
special variable $OnceFile to be the path to a timestamp file. The
|
||||
ONCE directive uses this timestamp file to track when it was last
|
||||
run rather than the access date of the main reminder script. This
|
||||
@@ -91,38 +149,38 @@ CHANGES TO REMIND
|
||||
(which might not be maintained accurately) and is not affected if
|
||||
you edit your reminder script.
|
||||
|
||||
* CHANGE: Taking input from stdin no longer implies the "-o" option; ONCE can
|
||||
- CHANGE: Taking input from stdin no longer implies the "-o" option; ONCE can
|
||||
work if you set $OnceFile
|
||||
|
||||
* CHANGE: Any of the -c, -n, -p and -s options implicitly enable the
|
||||
- CHANGE: Any of the -c, -n, -p and -s options implicitly enable the
|
||||
-o option. As before, specifying a repeat factor *N or a date that
|
||||
is not today on the command-line also implies -o.
|
||||
|
||||
* MINOR NEW FEATURE: Rem2PDF: Add the "--svg" command-line option to produce
|
||||
- MINOR NEW FEATURE: Rem2PDF: Add the "--svg" command-line option to produce
|
||||
SVG output rather than PDF.
|
||||
|
||||
* MINOR IMPROVEMENT: Remind: Improve the storage efficiency of short
|
||||
- MINOR IMPROVEMENT: Remind: Improve the storage efficiency of short
|
||||
string constants in compiled expression trees.
|
||||
|
||||
* MINOR IMPROVEMENT: Remind: Remove some obsolete macro definitions
|
||||
- MINOR IMPROVEMENT: Remind: Remove some obsolete macro definitions
|
||||
|
||||
* VERSION 5.0 Patch 1 - 2024-06-08
|
||||
|
||||
* MINOR IMPROVEMENT: Add short-circuit evaluation to the isany() function,
|
||||
- MINOR IMPROVEMENT: Add short-circuit evaluation to the isany() function,
|
||||
which now only evaluates those arguments absolutely necessary to determine
|
||||
the result.
|
||||
|
||||
* BUG FIX: Mark weekno() as a non-constant function (the zero-argument form
|
||||
- BUG FIX: Mark weekno() as a non-constant function (the zero-argument form
|
||||
depends on external conditions.)
|
||||
|
||||
* BUG FIX: Fix a couple of memory leaks.
|
||||
- BUG FIX: Fix a couple of memory leaks.
|
||||
|
||||
* BUG FIX: Don't rely on support for unnamed function parameters; this caused
|
||||
- BUG FIX: Don't rely on support for unnamed function parameters; this caused
|
||||
compilation failures with older versions of gcc.
|
||||
|
||||
* VERSION 5.0 Patch 0 - 2024-06-06
|
||||
|
||||
* MAJOR CHANGE: The expression evaluation engine has been completely replaced
|
||||
- MAJOR CHANGE: The expression evaluation engine has been completely replaced
|
||||
with a new one that splits parsing and evaluating into two separate steps.
|
||||
It also features short-circuit evaluation of &&, ||, iif() and choose().
|
||||
This should speed up expression-heavy reminder files.
|
||||
@@ -153,56 +211,56 @@ CHANGES TO REMIND
|
||||
|
||||
and it will work for values of n that don't cause integer overflow.
|
||||
|
||||
* IMPROVEMENT: If there's an unmatched PUSH-OMIT-CONTEXT, print the
|
||||
- IMPROVEMENT: If there's an unmatched PUSH-OMIT-CONTEXT, print the
|
||||
filename and line number containing it.
|
||||
|
||||
* IMPROVEMENT: If there's an IF with a missing ENDIF, print the filename
|
||||
- IMPROVEMENT: If there's an IF with a missing ENDIF, print the filename
|
||||
and line number of the IF statement.
|
||||
|
||||
* NEW FEATURE: Add EXPR OFF command to completely disable expression
|
||||
- NEW FEATURE: Add EXPR OFF command to completely disable expression
|
||||
evaluation. Useful if you INCLUDE files that you don't expect to
|
||||
contain expressions and may come from slightly untrustworthy sources.
|
||||
|
||||
* NEW FEATURE: Add $ExpressionTimeLimit system variable to enforce a
|
||||
- NEW FEATURE: Add $ExpressionTimeLimit system variable to enforce a
|
||||
maximum limit on how long evaluating an expression is allowed to take.
|
||||
|
||||
* NEW FEATURE: Add --max-execution-time=n command-line option to terminate
|
||||
- NEW FEATURE: Add --max-execution-time=n command-line option to terminate
|
||||
Remind if it runs for more than n seconds.
|
||||
|
||||
* CHANGE: Make the command-line option "-ifoo" equivalent to "-ifoo=0"
|
||||
- CHANGE: Make the command-line option "-ifoo" equivalent to "-ifoo=0"
|
||||
|
||||
* CHANGE: Permit a literal [ in a reminder by using the sequence [[
|
||||
- CHANGE: Permit a literal [ in a reminder by using the sequence [[
|
||||
The old ["["] still works.
|
||||
|
||||
* BUG FIX: In "purge" mode, Remind would sometimes purge reminders with
|
||||
- BUG FIX: In "purge" mode, Remind would sometimes purge reminders with
|
||||
a relative "SCANFROM" which haven't actually expired. This has been fixed.
|
||||
|
||||
* BUG FIX: Disallow something like: FSET func(x, x) expr
|
||||
- BUG FIX: Disallow something like: FSET func(x, x) expr
|
||||
which shouldn't have been allowed in the first place.
|
||||
|
||||
* BUG FIX: Replace leading spaces with tabs in Makefiles (per Emanuele Torre
|
||||
- BUG FIX: Replace leading spaces with tabs in Makefiles (per Emanuele Torre
|
||||
and Tim Chase)
|
||||
|
||||
* VERSION 4.3 Patch 7 - 2024-04-29
|
||||
|
||||
* IMPROVEMENT: build.tk: Add a note if build.tk obtains default settings
|
||||
- IMPROVEMENT: build.tk: Add a note if build.tk obtains default settings
|
||||
from an existing Remind installation.
|
||||
|
||||
* IMPROVEMENT: configure: Pass all args to AC_INIT including the Remind
|
||||
- IMPROVEMENT: configure: Pass all args to AC_INIT including the Remind
|
||||
home page. Remove some unused autoconf cruft.
|
||||
|
||||
* IMPROVEMENT: Use standard C library versions of strdup, strcasecmp and
|
||||
- IMPROVEMENT: Use standard C library versions of strdup, strcasecmp and
|
||||
strncasecmp where available, rather than using our own versions.
|
||||
|
||||
* MINOR FEATURE: remind: Make $Tt a synonym for trigtime().
|
||||
- MINOR FEATURE: remind: Make $Tt a synonym for trigtime().
|
||||
|
||||
* BUG FIX: remind: Make sure shellescape() doesn't mangle UTF-8 characters
|
||||
- BUG FIX: remind: Make sure shellescape() doesn't mangle UTF-8 characters
|
||||
with high-bits set.
|
||||
|
||||
* BUG FIX: remind: Don't rely on undefined behavior of "%" operator in
|
||||
- BUG FIX: remind: Don't rely on undefined behavior of "%" operator in
|
||||
the ord() built-in function.
|
||||
|
||||
* BUG FIX: remind: Do not clear out trigtime() unnecessarily. Before,
|
||||
- BUG FIX: remind: Do not clear out trigtime() unnecessarily. Before,
|
||||
you could not write things like the following; now you can:
|
||||
|
||||
REM Tue AT 11:30 DURATION 0:30 MSG Thing 1
|
||||
@@ -212,90 +270,90 @@ CHANGES TO REMIND
|
||||
for successive reminders that should be moved as a block if the time of
|
||||
the first one changes.
|
||||
|
||||
* BUG FIX: Don't update trigdate() or trigtime() while parsing a REM
|
||||
- BUG FIX: Don't update trigdate() or trigtime() while parsing a REM
|
||||
statement... only when actually computing the trigger.
|
||||
|
||||
* VERSION 4.3 Patch 6 - 2024-04-02
|
||||
|
||||
* NEW FILE: Add [$SysInclude]/holidays/pt.rem - Portuguese holidays, courtesy
|
||||
- NEW FILE: Add [$SysInclude]/holidays/pt.rem - Portuguese holidays, courtesy
|
||||
of Joop Kiefte.
|
||||
|
||||
* BUG FIX: remind: Fix compile error on systems that don't support inotify(7).
|
||||
- BUG FIX: remind: Fix compile error on systems that don't support inotify(7).
|
||||
|
||||
* BUG FIX: remind: Fix test failures on FreeBSD. On FreeBSD, you have to copy
|
||||
- BUG FIX: remind: Fix test failures on FreeBSD. On FreeBSD, you have to copy
|
||||
the result of getenv() or else a subsequent setenv() can change the stored
|
||||
value.
|
||||
|
||||
* VERSION 4.3 Patch 5 - 2024-04-01
|
||||
|
||||
* IMPROVEMENT: remind: Use inotify to detect reminder file changes
|
||||
- IMPROVEMENT: remind: Use inotify to detect reminder file changes
|
||||
even in regular daemon mode (-zn where n>0).
|
||||
|
||||
* INTERNAL IMPROVEMENTS: Rearrange and refactor some code.
|
||||
- INTERNAL IMPROVEMENTS: Rearrange and refactor some code.
|
||||
|
||||
* FIXES: Various fixes and improvements to man pages.
|
||||
- FIXES: Various fixes and improvements to man pages.
|
||||
|
||||
* BUG FIX: remind: Handle queued "SPECIAL COLOR" reminders correctly.
|
||||
- BUG FIX: remind: Handle queued "SPECIAL COLOR" reminders correctly.
|
||||
|
||||
* BUG FIX: remind: Preserve the value of $DefaultColor that was in effect
|
||||
- BUG FIX: remind: Preserve the value of $DefaultColor that was in effect
|
||||
when a reminder was queued; restore it before issuing the queued reminder.
|
||||
|
||||
* VERSION 4.3 Patch 4 - 2024-03-25
|
||||
|
||||
* NEW FEATURE: remind: Add the new "multitrig" function, which is how "trig"
|
||||
- NEW FEATURE: remind: Add the new "multitrig" function, which is how "trig"
|
||||
should have worked in the first place. See man page for details.
|
||||
|
||||
* IMPROVEMENT: tkremind: Make errors in your reminders file stand out more
|
||||
- IMPROVEMENT: tkremind: Make errors in your reminders file stand out more
|
||||
prominently.
|
||||
|
||||
* IMPROVEMENT: tkremind: If you click on an error in the "Errors..." popup,
|
||||
- IMPROVEMENT: tkremind: If you click on an error in the "Errors..." popup,
|
||||
tkremind will open a text editor on the offending file and line.
|
||||
|
||||
* IMPROVEMENT: tkremind: Format the "Queue..." output better and make queue
|
||||
- IMPROVEMENT: tkremind: Format the "Queue..." output better and make queue
|
||||
items clickable; clicking on a queue item opens a text editor on the
|
||||
corresponding file and line.
|
||||
|
||||
* IMPROVEMENT: Add a standard [$SysInclude]/moonphases.rem file to display
|
||||
- IMPROVEMENT: Add a standard [$SysInclude]/moonphases.rem file to display
|
||||
moon phases on your calendar.
|
||||
|
||||
* IMPROVEMENT: Clean up the demo code in www/ and add PDF output.
|
||||
- IMPROVEMENT: Clean up the demo code in www/ and add PDF output.
|
||||
|
||||
* BUG FIX: tkremind: Correctly handle filenames containing spaces and other
|
||||
- BUG FIX: tkremind: Correctly handle filenames containing spaces and other
|
||||
characters that tend to confuse the shell.
|
||||
|
||||
* BUG FIX: tkremind: Raise dialog boxes after errors so that they
|
||||
- BUG FIX: tkremind: Raise dialog boxes after errors so that they
|
||||
remain visible.
|
||||
|
||||
* CLEANUP: tkremind: Remove some dead code.
|
||||
- CLEANUP: tkremind: Remove some dead code.
|
||||
|
||||
* VERSION 4.3 Patch 3 - 2024-03-18
|
||||
|
||||
* IMPROVEMENT: tkremind: Update icon to include a white border so it shows
|
||||
- IMPROVEMENT: tkremind: Update icon to include a white border so it shows
|
||||
up better on dark backgrounds.
|
||||
|
||||
* IMPROVEMENT: C code: Fix a number of cppcheck static-analysis warnings.
|
||||
- IMPROVEMENT: C code: Fix a number of cppcheck static-analysis warnings.
|
||||
|
||||
* IMPROVEMENT: remind: Update the "-zj" protocol to include a queue-id for
|
||||
- IMPROVEMENT: remind: Update the "-zj" protocol to include a queue-id for
|
||||
each queued reminder and add the DEL client command to delete a specific
|
||||
item from the queue. Used by tkremind to implement "don't remind me about
|
||||
this again today."
|
||||
|
||||
* MINOR NEW FEATURE: Add a "-ds" debugging flag to print out expression-parsing
|
||||
- MINOR NEW FEATURE: Add a "-ds" debugging flag to print out expression-parsing
|
||||
stack high-water marks on exit. This esoteric feature is of no use to
|
||||
anyone but the Remind author.
|
||||
|
||||
* IMPROVEMENT: tkremind: Stop using the deprecated tk_dialog command in favor
|
||||
- IMPROVEMENT: tkremind: Stop using the deprecated tk_dialog command in favor
|
||||
of the newer tk_messageBox command.
|
||||
|
||||
* IMPROVEMENT: remind: In server mode, try to minimize redraws by
|
||||
- IMPROVEMENT: remind: In server mode, try to minimize redraws by
|
||||
consuming inotify events until at least 0.2s elapses without an
|
||||
event appearing.
|
||||
|
||||
* BUG FIX: tkremind: The "Don't remind me about this again today" feature
|
||||
- BUG FIX: tkremind: The "Don't remind me about this again today" feature
|
||||
was unreliable and only worked for reminders created with TkRemind itself.
|
||||
It has been made more reliable and works with any reminder.
|
||||
|
||||
* BUG FIX: remind: Make it a syntax error if a local OMIT in a REM statement
|
||||
- BUG FIX: remind: Make it a syntax error if a local OMIT in a REM statement
|
||||
is not followed by at least one weekday name.
|
||||
|
||||
* VERSION 4.3 Patch 2 - 2024-03-01
|
||||
@@ -1268,7 +1326,7 @@ CHANGES TO REMIND
|
||||
|
||||
- MINOR IMPROVEMENT: Add the "ampm()" built-in function.
|
||||
|
||||
* Version 3.3 Patch 0 - 2020-01-31
|
||||
* VERSION 3.3 Patch 0 - 2020-01-31
|
||||
|
||||
- FIX: rem2ps: Add a %%PageBoundingBox: document structuring convention
|
||||
comment.
|
||||
@@ -1303,7 +1361,7 @@ CHANGES TO REMIND
|
||||
- CHANGE: SPECIALs are now case-insensitive. Before, only SPECIAL COLOR
|
||||
would work. Now you can use Special Color, special color, etc.
|
||||
|
||||
* Version 3.2 Patch 0 - 2020-01-03
|
||||
* VERSION 3.2 Patch 0 - 2020-01-03
|
||||
|
||||
- IMPROVEMENT: Add support for events spanning multiple days (with AT
|
||||
and DURATION). Add trigeventstart() and trigeventduration()
|
||||
@@ -1345,7 +1403,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: TkRemind: Fix startup failure of TkRemind if options are at
|
||||
default. :(
|
||||
|
||||
* Version 3.1 Patch 17 - 2019-11-15
|
||||
* VERSION 3.1 Patch 17 - 2019-11-15
|
||||
|
||||
- IMPROVEMENT: Add "Extra Remind Options" setting to TkRemind.
|
||||
|
||||
@@ -1362,7 +1420,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Fix various documentation errors and update man page.
|
||||
|
||||
* Version 3.1 Patch 16 - 2018-11-09
|
||||
* VERSION 3.1 Patch 16 - 2018-11-09
|
||||
|
||||
- IMPROVEMENT: Add patch from Stephen Morgan to calculate astronomical and
|
||||
nautical twilight in addition to civil twilight.
|
||||
@@ -1392,7 +1450,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: In "remind -z0" mode, remind wakes up exactly on the minute instead
|
||||
of sleeping for 60 seconds each time, which could cause it to fall behind.
|
||||
|
||||
* Version 3.1 Patch 15 - 2015-07-27
|
||||
* VERSION 3.1 Patch 15 - 2015-07-27
|
||||
|
||||
- BUG FIX: Fix a buffer overflow found by Alexander Keller
|
||||
|
||||
@@ -1402,7 +1460,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Make parser reject repeated delta or *repeat values.
|
||||
|
||||
* Version 3.1 Patch 14 - 2015-04-24
|
||||
* VERSION 3.1 Patch 14 - 2015-04-24
|
||||
|
||||
- NEW FEATURE: Putting the line __EOF__ in a .rem file causes Remind
|
||||
to treat it as end-of-file.
|
||||
@@ -1419,7 +1477,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Typo in Spanish translation was fixed.
|
||||
|
||||
* Version 3.1 Patch 13 - 2013-03-22
|
||||
* VERSION 3.1 Patch 13 - 2013-03-22
|
||||
|
||||
- BUG FIX: Sunrise/Sunset calculations greatly improved thanks to John
|
||||
McGowan. Accuracy should now be within a couple of minutes in most
|
||||
@@ -1436,7 +1494,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Spurious test harness failure was fixed.
|
||||
|
||||
* Version 3.1 Patch 12 - 2012-01-23
|
||||
* VERSION 3.1 Patch 12 - 2012-01-23
|
||||
|
||||
- NEW FEATURE: Many substitution sequences "%x" have an alternate mode
|
||||
denoted by "%*x". This alternate mode leaves out prepositions. For
|
||||
@@ -1448,7 +1506,7 @@ CHANGES TO REMIND
|
||||
so the results may be off by a minute or two compared to previous versions
|
||||
of Remind.
|
||||
|
||||
* Version 3.1 Patch 11 - 2011-12-16
|
||||
* VERSION 3.1 Patch 11 - 2011-12-16
|
||||
|
||||
- BUG FIX: For some inexplicable reason, dawn was considered to happen when
|
||||
the sun was 14 degrees below the horizon instead of the standard 6
|
||||
@@ -1462,7 +1520,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Apply minor Debian cleanups reported by Kurt B. Kaiser.
|
||||
|
||||
* Version 3.1 Patch 10 - 2010-11-01
|
||||
* VERSION 3.1 Patch 10 - 2010-11-01
|
||||
|
||||
- NOTE: This is the 20th anniversary of Remind's first public release.
|
||||
|
||||
@@ -1486,7 +1544,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: Don't declare variables in the middle of statements (old C
|
||||
compilers choke.)
|
||||
|
||||
* Version 3.1 Patch 9 - 2010-06-20
|
||||
* VERSION 3.1 Patch 9 - 2010-06-20
|
||||
|
||||
- MAJOR ENHANCEMENT: New "purge mode" to delete expired reminders. See
|
||||
the PURGE MODE section of the remind man page.
|
||||
@@ -1502,7 +1560,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: Yom HaShoah is moved to Thursday if it would normally fall on
|
||||
a Friday. Thanks to Jonathan Kamens for pointing this out.
|
||||
|
||||
* Version 3.1 Patch 8 - 2010-03-09
|
||||
* VERSION 3.1 Patch 8 - 2010-03-09
|
||||
|
||||
- ENHANCEMENT: Include some useful scripts in contrib/
|
||||
|
||||
@@ -1522,7 +1580,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: Fix bug in SCHED calculations if Remind is started in the middle
|
||||
of a SCHED interval.
|
||||
|
||||
* Version 3.1 Patch 7 - 2009-05-31
|
||||
* VERSION 3.1 Patch 7 - 2009-05-31
|
||||
|
||||
- ENHANCEMENT: Wherever you could write "day Mon year", the parser now
|
||||
accepts "YYYY-MM-DD". This applies on the command-line and to the
|
||||
@@ -1531,7 +1589,7 @@ CHANGES TO REMIND
|
||||
|
||||
- ENHANCEMENT: New slide() built-in function eases some complicated reminders.
|
||||
|
||||
* Version 3.1 Patch 6 - 2008-11-16
|
||||
* VERSION 3.1 Patch 6 - 2008-11-16
|
||||
|
||||
- MAJOR ENHANCEMENT: A new OMITFUNC clause gives you additional
|
||||
control and flexibility over "omitted days" calculations. This is
|
||||
@@ -1559,7 +1617,7 @@ CHANGES TO REMIND
|
||||
weekday would fail if it needed to cross a year boundary. This has
|
||||
been fixed.
|
||||
|
||||
* Version 3.1 Patch 5 - 2008-04-15
|
||||
* VERSION 3.1 Patch 5 - 2008-04-15
|
||||
|
||||
- MAJOR ENHANCEMENT: If you supply a directory name on the command line
|
||||
or for an INCLUDE command, then Remind reads all *.rem file in that
|
||||
@@ -1589,7 +1647,7 @@ CHANGES TO REMIND
|
||||
|
||||
- BUG FIX: Parse error in calendar mode was fixed.
|
||||
|
||||
* Version 3.1 Patch 4 - 2008-02-03
|
||||
* VERSION 3.1 Patch 4 - 2008-02-03
|
||||
|
||||
- ENHANCEMENT: tkremind respects the "-b1" option and operates in 24-hour
|
||||
clock mode if the option is supplied.
|
||||
@@ -1611,7 +1669,7 @@ CHANGES TO REMIND
|
||||
- BUG FIX: The "-ivar=value" command-line option failed if Remind re-execed
|
||||
itself because we overwrote argv[]. This has been fixed.
|
||||
|
||||
* Version 3.1 Patch 3 - 2007-10-15
|
||||
* VERSION 3.1 Patch 3 - 2007-10-15
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1630,7 +1688,7 @@ CHANGES TO REMIND
|
||||
is not evaluated. This helps avoid spurious error messages in some
|
||||
reminders.
|
||||
|
||||
* Version 3.1 Patch 2 - 2007-09-12
|
||||
* VERSION 3.1 Patch 2 - 2007-09-12
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1684,7 +1742,7 @@ CHANGES TO REMIND
|
||||
- Using the psshade() or psmoon() functions emits a warning on stderr. You
|
||||
should use SPECIAL SHADE or SPECIAL MOON instead.
|
||||
|
||||
* Version 3.1 Patch 1 - 2007-08-23
|
||||
* VERSION 3.1 Patch 1 - 2007-08-23
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -1714,7 +1772,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Various man-page fixes.
|
||||
|
||||
* Version 3.1 Patch 0 - 2007-07-14
|
||||
* VERSION 3.1 Patch 0 - 2007-07-14
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -1777,7 +1835,7 @@ CHANGES TO REMIND
|
||||
- rem2ps would produce invalid PostScript in some rare cases
|
||||
(eg, for February 2007). This has been fixed.
|
||||
|
||||
* Version 3.0 Patch 24 - 2005-11-19
|
||||
* VERSION 3.0 Patch 24 - 2005-11-19
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1800,7 +1858,7 @@ CHANGES TO REMIND
|
||||
- Fixed a bug in the tokenizer that could make Remind segfault. Fix courtesy
|
||||
of Stan Tobias.
|
||||
|
||||
* Version 3.0 Patch 23 - 2005-04-14
|
||||
* VERSION 3.0 Patch 23 - 2005-04-14
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1824,7 +1882,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed parser error for unterminated date constant: '2005/01/01
|
||||
|
||||
* Version 3.0 Patch 22 - 2000-06-16
|
||||
* VERSION 3.0 Patch 22 - 2000-06-16
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1846,7 +1904,7 @@ CHANGES TO REMIND
|
||||
- Fixed serious bug in which background queued reminders were ignored and
|
||||
Remind simply exited. Doh! Sorry about that.
|
||||
|
||||
* Version 3.0 Patch 21 - 2000-03-15
|
||||
* VERSION 3.0 Patch 21 - 2000-03-15
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -1877,7 +1935,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed compilation problem on FreeBSD, IRIX, Tru64 and other UNIXes.
|
||||
|
||||
* Version 3.0 Patch 20 - 1999-04-12
|
||||
* VERSION 3.0 Patch 20 - 1999-04-12
|
||||
|
||||
+ LICENSE CHANGE
|
||||
|
||||
@@ -1899,7 +1957,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed a typo in danish.h, courtesy of Niels Kristian Bech Jensen.
|
||||
|
||||
* Version 3.0 Patch 19 - 1998-05-09
|
||||
* VERSION 3.0 Patch 19 - 1998-05-09
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -1941,7 +1999,7 @@ CHANGES TO REMIND
|
||||
- Lots more silly little bugs squashed -- too many to go into in
|
||||
detail.
|
||||
|
||||
* Version 3.0 Patch 18 - 1998-02-15
|
||||
* VERSION 3.0 Patch 18 - 1998-02-15
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -2005,7 +2063,7 @@ CHANGES TO REMIND
|
||||
- Getting rid of fixed-sized buffers meant lots of changes to code.
|
||||
No doubt, I missed a few regression tests.
|
||||
|
||||
* Version 3.0 Patch 17 - 1997-09-07
|
||||
* VERSION 3.0 Patch 17 - 1997-09-07
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2046,7 +2104,7 @@ CHANGES TO REMIND
|
||||
library. All three of these fixes are courtesy of Christopher
|
||||
J. Madsen <madsen@iglobal.net>. Thanks, Christopher.
|
||||
|
||||
* Version 3.0 Patch 16 - 1997-02-11
|
||||
* VERSION 3.0 Patch 16 - 1997-02-11
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2074,7 +2132,7 @@ CHANGES TO REMIND
|
||||
- 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 - 1996-10-27
|
||||
* VERSION 3.0 Patch 15 - 1996-10-27
|
||||
|
||||
+ IMPORTANT NOTES
|
||||
|
||||
@@ -2104,7 +2162,7 @@ CHANGES TO REMIND
|
||||
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
||||
for a month beginning on Sunday. Doh!!!
|
||||
|
||||
* Version 3.0 Patch 14 - 1996-05-25
|
||||
* VERSION 3.0 Patch 14 - 1996-05-25
|
||||
|
||||
+ CHANGE IN COPYING POLICY
|
||||
|
||||
@@ -2163,7 +2221,7 @@ CHANGES TO REMIND
|
||||
_not_ support MS Windows, and in fact do not allow Remind to run
|
||||
under Windows (see COPYRIGHT).
|
||||
|
||||
* Version 3.0 Patch 13 - 1994-05-06
|
||||
* VERSION 3.0 Patch 13 - 1994-05-06
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2198,7 +2256,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Updated the copyright notices everywhere.
|
||||
|
||||
* Version 3.0 Patch 12 - 1994-02-01
|
||||
* VERSION 3.0 Patch 12 - 1994-02-01
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2217,7 +2275,7 @@ CHANGES TO REMIND
|
||||
- Fixed a problem with the '-k' option which resulted in a newline being
|
||||
placed after the message text. This was giving sh(1) heartburn...
|
||||
|
||||
* Version 3.0 Patch 11 - 1993-11-26
|
||||
* VERSION 3.0 Patch 11 - 1993-11-26
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2249,7 +2307,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed typos in french.h
|
||||
|
||||
* Version 3.0 Patch 10
|
||||
* VERSION 3.0 Patch 10
|
||||
|
||||
+ MAJOR ENHANCEMENT
|
||||
|
||||
@@ -2297,7 +2355,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed the Finnish language support which was missing a few newlines.
|
||||
|
||||
* Version 3.0 Patch 9 - 1993-10-04
|
||||
* VERSION 3.0 Patch 9 - 1993-10-04
|
||||
|
||||
+ NOTES
|
||||
|
||||
@@ -2354,7 +2412,7 @@ CHANGES TO REMIND
|
||||
so that newlines in the body start new paragraphs, rather than being
|
||||
swallowed as white-space.
|
||||
|
||||
* Version 3.0 Patch 8 - 1993-09-08
|
||||
* VERSION 3.0 Patch 8 - 1993-09-08
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -2406,7 +2464,7 @@ CHANGES TO REMIND
|
||||
range [-128, 255] (but not 0) so that char(asc(s)) works even
|
||||
on machines with signed char types.
|
||||
|
||||
* Version 3.0 Patch 7 - 1993-07-22
|
||||
* VERSION 3.0 Patch 7 - 1993-07-22
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
@@ -2449,7 +2507,7 @@ CHANGES TO REMIND
|
||||
- Changed kall so that "kall sh" doesn't commit suicide - patch courtesy
|
||||
of Michael Salmon.
|
||||
|
||||
* Version 3.0 Patch 6 - 1993-05-05
|
||||
* VERSION 3.0 Patch 6 - 1993-05-05
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
@@ -2472,7 +2530,7 @@ CHANGES TO REMIND
|
||||
- Fixed a bug in the -u option which sometimes caused a core dump
|
||||
(embarrassed grin!) The fix is due to Tina Hoeltig. Thanks, Tina!
|
||||
|
||||
* Version 3.0 Patch 5 - 1993-04-27
|
||||
* VERSION 3.0 Patch 5 - 1993-04-27
|
||||
|
||||
+ MAJOR ENHANCEMENTS:
|
||||
|
||||
@@ -2507,7 +2565,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed a bug in the man page - thanks to Ed Oskiewicz.
|
||||
|
||||
* Version 3.0 Patch 4 - 1993-03-08
|
||||
* VERSION 3.0 Patch 4 - 1993-03-08
|
||||
|
||||
- Added the -g option - this sorts reminders by date/time before
|
||||
issuing them. (You can see I'm running out of letters to
|
||||
@@ -2566,13 +2624,13 @@ CHANGES TO REMIND
|
||||
|
||||
- Put my new mailing address in the README files.
|
||||
|
||||
* Version 3.0 Patch 3 - 1993-02-21
|
||||
* VERSION 3.0 Patch 3 - 1993-02-21
|
||||
|
||||
- Corrected bugs in Remind and Rem2PS. No new features added. You
|
||||
should NOT use patch level 2 - either stick to 3.0.1 or upgrade to
|
||||
3.0.3.
|
||||
|
||||
* Version 3.0 Patch 2 - 1993-02-04
|
||||
* VERSION 3.0 Patch 2 - 1993-02-04
|
||||
|
||||
- Added the -u option to Remind so that root can run it as any user.
|
||||
This simplifies the remind-all scripts, and makes them more efficient.
|
||||
@@ -2612,7 +2670,7 @@ CHANGES TO REMIND
|
||||
- Changed Remind so that supplying the -a option causes timed reminders
|
||||
not to be placed into the calendar in calendar mode.
|
||||
|
||||
* Version 3.0 Patch 1 - 1992-12-18
|
||||
* VERSION 3.0 Patch 1 - 1992-12-18
|
||||
|
||||
- Wrote the Rem2ps program to produce PostScript calendars
|
||||
|
||||
@@ -2652,7 +2710,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Re-formatted the WHATSNEW.30 file.
|
||||
|
||||
* Version 3.0 - 1992-11-09
|
||||
* VERSION 3.0 - 1992-11-09
|
||||
|
||||
- Total rewrite from previous versions
|
||||
|
||||
@@ -2673,23 +2731,23 @@ CHANGES TO REMIND
|
||||
- Fixed a lurking bug in trigger date calculation which, amazingly, had not
|
||||
been caught in the couple of years that Remind has been out!
|
||||
|
||||
* Version 2.3 Patch 5 - 1992-04-11
|
||||
* VERSION 2.3 Patch 5 - 1992-04-11
|
||||
|
||||
- Added the "c+n" option for printing a calendar by
|
||||
weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
|
||||
|
||||
* Version 2.3 Patch 4 - 1991-11-06
|
||||
* VERSION 2.3 Patch 4 - 1991-11-06
|
||||
|
||||
- Made the init.c file nicer. Made the Makefile
|
||||
prettier. Added "make test", "make tar" and "make shar" Makefile targets.
|
||||
|
||||
* Version 2.3 Patch 3 - 1991-09-11
|
||||
* VERSION 2.3 Patch 3 - 1991-09-11
|
||||
|
||||
- Added a command-line option for Remind to process
|
||||
queued reminders in the foreground. This makes automatic termination
|
||||
of Remind processes from within X-Windows and Sunview easier.
|
||||
|
||||
* Version 2.3 Patch 2 - 1991-07-19
|
||||
* VERSION 2.3 Patch 2 - 1991-07-19
|
||||
|
||||
- Fixed up a problem with timed reminders which resulted
|
||||
in cursor not starting from left side of screen on some systems.
|
||||
@@ -2706,7 +2764,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Made the Makefile more portable
|
||||
|
||||
* Version 2.3 Patch 1 - 1991-03-08
|
||||
* VERSION 2.3 Patch 1 - 1991-03-08
|
||||
|
||||
- Added the "-t" command-line option to get Remind
|
||||
to trigger all non-expired reminders.
|
||||
@@ -2720,7 +2778,7 @@ CHANGES TO REMIND
|
||||
|
||||
- Added manual pages for "kall" and "rem".
|
||||
|
||||
* Version 2.3 - 1991-02-20
|
||||
* VERSION 2.3 - 1991-02-20
|
||||
|
||||
- Added the UNTIL keyword for forcing reminders to expire.
|
||||
|
||||
@@ -2742,32 +2800,32 @@ CHANGES TO REMIND
|
||||
- Modified the calendar and SimpleCalendar formats so that the % escape
|
||||
substitutions ARE performed.
|
||||
|
||||
* Version 2.2 - Patch 5 - 1990-12-03
|
||||
* VERSION 2.2 - Patch 5 - 1990-12-03
|
||||
|
||||
- Added the BEFORE, AFTER and SKIP tokens to make the
|
||||
handling of holidays more sensible. Also corrected a few more bugs.
|
||||
|
||||
* Version 2.2 - Patch 3 - 1990-11-28
|
||||
* VERSION 2.2 - Patch 3 - 1990-11-28
|
||||
|
||||
- Added the MSG or RUN tokens in an OMIT command; also
|
||||
allowed RUN-type reminders to be explicitly included in the calendar by
|
||||
using the %" escape sequence.
|
||||
|
||||
* Version 2.2 - 1990-11-16
|
||||
* VERSION 2.2 - 1990-11-16
|
||||
|
||||
- Added the AT keyword, the timed reminders daemon, and the
|
||||
calendar facility.
|
||||
|
||||
* Version 2.1 - 1990-11-06
|
||||
* VERSION 2.1 - 1990-11-06
|
||||
|
||||
- Added the "repeat" token for repeating reminders with a period
|
||||
other than 7 days. Also fixed some bugs from version 2.0
|
||||
|
||||
* Version 2.0 - 1990-11-01
|
||||
* VERSION 2.0 - 1990-11-01
|
||||
|
||||
- first public release. Included advanced date specifications,
|
||||
character substitution, and the RUN keyword.
|
||||
|
||||
* Version 1.0
|
||||
* VERSION 1.0
|
||||
|
||||
- never publicly released.
|
||||
|
||||
@@ -26,7 +26,10 @@ MSG This is [ansicolor(0,255,0)]green.[ansicolor("")]
|
||||
MSG This is [ansicolor(0,0,255)]blue.[ansicolor("")]
|
||||
MSG This is [ansicolor(255,255,0)]yellow.[ansicolor("")]
|
||||
MSG This is [ansicolor(255,0,255)]magenta.[ansicolor("")]
|
||||
MSG This is [ansicolor(0,255,255)]cyan.[ansicolor("")]%_
|
||||
MSG This is [ansicolor(0,255,255)]cyan.[ansicolor("")]
|
||||
MSG This is [ansi_bold][ansicolor(255,255,255)][ansicolor(0,0,0,1)]white on black[ansicolor("")][ansi_normal]
|
||||
MSG This is [ansi_bold][ansicolor(0,0,0)][ansicolor(255,255,255,1)]black on white[ansicolor("")][ansi_normal]
|
||||
MSG %_
|
||||
|
||||
# You can combine attributes
|
||||
MSG This is [ansicolor(0,255,0)][ansicolor(0,0,96,1)][ansi_italic][ansi_bold]Green-Bold-Italic-on-Blue[ansi_normal][ansicolor("")]
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
# Best used in a UTF-8 environment.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Set this variable to 1 if your terminal has a dark background or 0 if
|
||||
# it: light.
|
||||
|
||||
# Set your latitude and longitude correctly for Sunrise/Sunset/Equinox/Solstice
|
||||
#
|
||||
# The values below are for Ottawa, Ontario, Canada
|
||||
@@ -20,7 +17,8 @@ BANNER %
|
||||
|
||||
INCLUDE [$SysInclude]/ansitext.rem
|
||||
|
||||
MSG Today is [ansi_bold][$T][ansi_normal], being the [ord($T-date(year($T),1,1)+1)] day of [year($T)].%_
|
||||
MSG Today is [ansi_bold][$T][ansi_normal], being the [ord($T-date(year($T),1,1)+1)] day of [year($T)].
|
||||
MSG Not including today, the year [year($T)] has [date(year($T)+1, 1, 1)-$T-1] more [plural(date(year($T)+1, 1, 1)-$T-1, "day")] left.%_
|
||||
|
||||
IF $TerminalBackground == 0
|
||||
SPECIAL COLOR 255 255 0 Sunrise: 🌅 [sunrise()] today and [sunrise($T+1)] tomorrow
|
||||
|
||||
@@ -20,6 +20,8 @@ REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
|
||||
|
||||
REM First Monday in Sep SCANFROM -7 ADDOMIT MSG Labour Day
|
||||
|
||||
REM 30 Sep MSG National Day for Truth and Reconciliation
|
||||
|
||||
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
|
||||
|
||||
REM 11 November MSG Remembrance Day
|
||||
|
||||
29
include/holidays/chinese-new-year.rem
Normal file
29
include/holidays/chinese-new-year.rem
Normal file
@@ -0,0 +1,29 @@
|
||||
REM 1 Feb 2022 MSG Chinese New Year (Tiger)
|
||||
REM 22 Jan 2023 MSG Chinese New Year (Rabbit)
|
||||
REM 10 Feb 2024 MSG Chinese New Year (Dragon)
|
||||
REM 29 Jan 2025 MSG Chinese New Year (Snake)
|
||||
REM 17 Feb 2026 MSG Chinese New Year (Horse)
|
||||
REM 6 Feb 2027 MSG Chinese New Year (Goat)
|
||||
REM 26 Jan 2028 MSG Chinese New Year (Monkey)
|
||||
REM 13 Feb 2029 MSG Chinese New Year (Rooster)
|
||||
REM 3 Feb 2030 MSG Chinese New Year (Dog)
|
||||
REM 23 Jan 2031 MSG Chinese New Year (Pig)
|
||||
REM 11 Feb 2032 MSG Chinese New Year (Rat)
|
||||
REM 31 Jan 2033 MSG Chinese New Year (Ox)
|
||||
REM 19 Feb 2034 MSG Chinese New Year (Tiger)
|
||||
REM 8 Feb 2035 MSG Chinese New Year (Rabbit)
|
||||
REM 28 Jan 2036 MSG Chinese New Year (Dragon)
|
||||
REM 15 Feb 2037 MSG Chinese New Year (Snake)
|
||||
REM 4 Feb 2038 MSG Chinese New Year (Horse)
|
||||
REM 24 Jan 2039 MSG Chinese New Year (Goat)
|
||||
REM 12 Feb 2040 MSG Chinese New Year (Monkey)
|
||||
REM 1 Feb 2041 MSG Chinese New Year (Rooster)
|
||||
REM 22 Jan 2042 MSG Chinese New Year (Dog)
|
||||
REM 10 Feb 2043 MSG Chinese New Year (Pig)
|
||||
REM 30 Jan 2044 MSG Chinese New Year (Rat)
|
||||
REM 17 Feb 2045 MSG Chinese New Year (Ox)
|
||||
REM 6 Feb 2046 MSG Chinese New Year (Tiger)
|
||||
REM 26 Jan 2047 MSG Chinese New Year (Rabbit)
|
||||
REM 14 Feb 2048 MSG Chinese New Year (Dragon)
|
||||
REM 2 Feb 2049 MSG Chinese New Year (Snake)
|
||||
REM 23 Jan 2050 MSG Chinese New Year (Horse)
|
||||
@@ -467,6 +467,23 @@ case-sensitive:
|
||||
.B \-\-version
|
||||
The \fB\-\-version\fR option causes \fBRemind\fR to print its version number
|
||||
to standard output and then exit.
|
||||
.TP
|
||||
.B \-\-print-config-cmd
|
||||
This option causes \fBRemind\fR to print the exact \fB./configure\fR
|
||||
command that was used when \fBRemind\fR was built. You can use this
|
||||
to build a new version of \fBRemind\fR using the same configuration
|
||||
as an existing one by running:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
eval `remind --print-config-cmd`
|
||||
.fi
|
||||
.PP
|
||||
from the top-level \fBRemind\fR source directory. (However, it's safer
|
||||
to simply run \fBremind --print-config-cmd\fR and then type in the
|
||||
command once you've verified that it looks OK.)
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B \-\-print-tokens
|
||||
The \fB\-\-print-tokens\fR option causes \fBRemind\fR to print the tokens
|
||||
@@ -2189,6 +2206,11 @@ If the \fBTIME\fR is used where \fBRemind\fR expects a time-of-day
|
||||
\fIpm\fR suffix and the hour can be as large as you want, so long
|
||||
as the total number of minutes in the duration fits in a signed integer
|
||||
variable.
|
||||
.PP
|
||||
For convenience, a \fBTIME\fR constant may be surrounded by single
|
||||
quotes to match \fBDATE\fR and \fBDATETIME\fR constants, but these
|
||||
quotes are optional. That is, 12:56 and '12:56' represent the same
|
||||
\fBTIME\fR constant.
|
||||
.RE
|
||||
.TP
|
||||
.B DATE constants
|
||||
@@ -2820,8 +2842,15 @@ order, or 2 if sorting by time in descending order.
|
||||
The number of spaces by which all lines (except the first) of an
|
||||
\fBMSF\fR-type reminder should be indented. The default is 0.
|
||||
.TP
|
||||
.B $SuppressImplicitWarnings
|
||||
Normally, \fBRemind\fR issues a warning if a line begins with an unknown
|
||||
token and is treated as a \fBREM\fR command, or if a \fBREM\fR command
|
||||
is missing a type and is treated as a \fBMSG\fR-type reminder. Setting
|
||||
\fB$SuppressImplicitWarnings\fR to 1 suppresses these warnings. The default
|
||||
is 0 and we do not recommend disabling the warnings.
|
||||
.TP
|
||||
.B $SuppressLRM
|
||||
Normally, when Remind is run with the \fB\-c\fR option in a UTF-8 locale,
|
||||
Normally, when \fBRemind\fR is run with the \fB\-c\fR option in a UTF-8 locale,
|
||||
it emits a left-to-right mark sequence after printing day names or
|
||||
reminders. Some terminals render this incorrectly, so you can use:
|
||||
.RS
|
||||
|
||||
@@ -224,6 +224,14 @@ If this is selected, pop-up reminder boxes will be closed after one minute
|
||||
has elapsed. Otherwise, they remain on your screen forever until you
|
||||
explicitly dismiss them.
|
||||
|
||||
.TP
|
||||
.B Use system notifications when issuing a reminder
|
||||
This option is available only for Tcl/Tk version 9.0 or later, or if
|
||||
you have the \fBnotify-send\fR program installed; it will be greyed
|
||||
out if neither condition is true. If selected, then when a reminder
|
||||
is popped up, it will also be sent to the desktop notification system,
|
||||
causing a notification to appear.
|
||||
|
||||
.TP
|
||||
.B Beep terminal when popping up a reminder
|
||||
If selected, \fBTkRemind\fR beeps the terminal bell when a queued reminder
|
||||
|
||||
105
scripts/tkremind → scripts/tkremind.in
Executable file → Normal file
105
scripts/tkremind → scripts/tkremind.in
Executable file → Normal file
@@ -15,8 +15,10 @@
|
||||
# the next line restarts using wish \
|
||||
exec wish "$0" "$@"
|
||||
|
||||
tk appname tkremind
|
||||
|
||||
# We need at least version 8.5 because of {*} list expansion operator
|
||||
if {[catch {package require Tcl 8.5}]} {
|
||||
if {[catch {package require Tcl 8.5-}]} {
|
||||
puts stderr "This program requires Tcl 8.5 or higher."
|
||||
puts stderr "You have version [info tclversion]"
|
||||
exit 1
|
||||
@@ -24,7 +26,33 @@ if {[catch {package require Tcl 8.5}]} {
|
||||
|
||||
wm withdraw .
|
||||
|
||||
set Hostname [exec hostname]
|
||||
catch {
|
||||
set Hostname [exec hostname]
|
||||
}
|
||||
|
||||
global env
|
||||
set HOME $env(HOME)
|
||||
|
||||
# Check if we have "tk sysnotify"
|
||||
set HAVE_SYSNOTIFY 0
|
||||
set NOTIFY_SEND_PATH ""
|
||||
catch { tk sysnotify } err opt
|
||||
if { [dict get $opt -errorcode] == "TCL WRONGARGS" } {
|
||||
set HAVE_SYSNOTIFY 1
|
||||
} else {
|
||||
set path [split $env(PATH) :]
|
||||
foreach d $path {
|
||||
if { [file executable [file join $d "notify-send"]] } {
|
||||
set NOTIFY_SEND_PATH [file join $d "notify-send"]
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc home { f } {
|
||||
global HOME
|
||||
return [string cat $HOME $f]
|
||||
}
|
||||
|
||||
# Our icon photo
|
||||
catch {
|
||||
@@ -166,6 +194,9 @@ set OptDescr(Deiconify) "(0/1) If 1, TkRemind deiconifies the calendar window wh
|
||||
set Option(ShowTodaysReminders) 1
|
||||
set OptDescr(ShowTodaysReminders) "(0/1) If 1, TkRemind shows all of today's non-timed reminders in a window at startup and when the date changes"
|
||||
|
||||
set Option(SysNotify) 0
|
||||
set OptDescr(SysNotify) "(0/1) If 1, TkRemind uses the system notification mechanism when a reminder pops up (Tcl 9.0 or newer)"
|
||||
|
||||
set Option(RunCmd) ""
|
||||
set OptDescr(RunCmd) "(String) If non-blank, run specified command when a pop-up reminder appears"
|
||||
set Option(FeedReminder) 0
|
||||
@@ -231,8 +262,7 @@ if {[string match "rem2pdf:*" "$a"]} {
|
||||
}
|
||||
|
||||
# Reminder file to source -- default
|
||||
set ReminderFile {NOSUCHFILE}
|
||||
set ReminderFile [file nativename "~/.reminders"]
|
||||
set ReminderFile [file nativename [home "/.reminders"]]
|
||||
|
||||
# Default options file
|
||||
set ConfigFile ""
|
||||
@@ -243,8 +273,7 @@ set EditorPid -1
|
||||
set RemindErrors ""
|
||||
|
||||
# Reminder file to append to -- default
|
||||
set AppendFile {NOSUCHFILE}
|
||||
catch {set AppendFile $ReminderFile}
|
||||
set AppendFile $ReminderFile
|
||||
|
||||
# Array of tags -> JSON dicts
|
||||
array unset TagToObj
|
||||
@@ -400,8 +429,8 @@ proc Initialize {} {
|
||||
set TodayYear [clock format $now -format %Y]
|
||||
set TodayDay [string trim [clock format $now -format %e]]
|
||||
|
||||
set CommandLine "$Remind -itkremind=1 -pp -y -l @EXTRA@"
|
||||
set PSCmd "$Remind -itkremind=1 -itkprint=1 -pp -l @EXTRA@"
|
||||
set CommandLine "$Remind -itkremind=1 -pp -y -l %EXTRA%"
|
||||
set PSCmd "$Remind -itkremind=1 -itkprint=1 -pp -l %EXTRA%"
|
||||
set i 0
|
||||
while {$i < $argc} {
|
||||
if {[regexp -- {-[bgxim].*} [lindex $argv $i]]} {
|
||||
@@ -478,7 +507,7 @@ proc Initialize {} {
|
||||
append PSCmd " "
|
||||
append PSCmd [posix_escape $ReminderFile]
|
||||
|
||||
set CommandLine "|/bin/sh -c \"$CommandLine @MONTH@ @YEAR@\""
|
||||
set CommandLine "|/bin/sh -c \"$CommandLine %MONTH% %YEAR%\""
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
@@ -734,7 +763,7 @@ proc CreateCalWindow { dayNames } {
|
||||
# Lets user edit options
|
||||
#***********************************************************************
|
||||
proc EditOptions {} {
|
||||
global Option tmpOpt
|
||||
global Option tmpOpt HAVE_SYSNOTIFY NOTIFY_SEND_PATH ver
|
||||
|
||||
# Make a working copy of current option set
|
||||
foreach name [array names Option] {
|
||||
@@ -751,6 +780,8 @@ proc EditOptions {} {
|
||||
pack $w.f -side top -expand 1 -fill both
|
||||
pack $w.b -side top -expand 0 -fill x
|
||||
|
||||
label $w.ver -text "TkRemind version @VERSION@ on Tcl/Tk version [info tclversion] with Remind version $ver"
|
||||
pack $w.ver -in $w.f -side top -expand 0 -fill x
|
||||
# Start iconified
|
||||
checkbutton $w.startIconified -text "Start up Iconified" \
|
||||
-anchor w -justify left \
|
||||
@@ -770,6 +801,16 @@ proc EditOptions {} {
|
||||
-text "Automatically close pop-up reminders after a minute" \
|
||||
-anchor w -justify left -variable tmpOpt(AutoClose)
|
||||
|
||||
checkbutton $w.sysNotify \
|
||||
-text "Use system notifications when issuing a reminder" \
|
||||
-anchor w -justify left -variable tmpOpt(SysNotify)
|
||||
|
||||
if { ! $HAVE_SYSNOTIFY } {
|
||||
if { "$NOTIFY_SEND_PATH" == "" } {
|
||||
$w.sysNotify configure -state disabled -takefocus 0
|
||||
}
|
||||
}
|
||||
|
||||
# Ring bell when popping up reminder
|
||||
checkbutton $w.ring -text "Beep terminal when popping up a reminder" \
|
||||
-anchor w -justify left -variable tmpOpt(RingBell)
|
||||
@@ -873,6 +914,7 @@ proc EditOptions {} {
|
||||
pack $w.showTodays -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.confirmQuit -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.bringDown -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.sysNotify -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.ring -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.deic -in $w.f -side top -expand 0 -fill x
|
||||
pack $w.ancFrame -in $w.f -side top -expand 0 -fill x
|
||||
@@ -1063,7 +1105,11 @@ proc LoadOptions {} {
|
||||
proc ConfigureCalWindow { month year firstDay numDays } {
|
||||
global Hostname
|
||||
.h.title configure -text "$month $year"
|
||||
wm title . "$month $year - TkRemind on $Hostname"
|
||||
if {[info exists Hostname]} {
|
||||
wm title . "$month $year - TkRemind @VERSION@ on $Hostname"
|
||||
} else {
|
||||
wm title . "$month $year - TkRemind @VERSION@"
|
||||
}
|
||||
wm iconname . "$month $year"
|
||||
ConfigureCalFrame .cal $firstDay $numDays
|
||||
}
|
||||
@@ -1082,9 +1128,9 @@ proc FillCalWindow {} {
|
||||
set_button_to_queue
|
||||
set month [lindex $MonthNames $CurMonth]
|
||||
|
||||
set cmd [regsub @EXTRA@ $CommandLine $Option(ExtraRemindArgs)]
|
||||
set cmd [regsub @MONTH@ $cmd $month]
|
||||
set cmd [regsub @YEAR@ $cmd $CurYear]
|
||||
set cmd [regsub %EXTRA% $CommandLine $Option(ExtraRemindArgs)]
|
||||
set cmd [regsub %MONTH% $cmd $month]
|
||||
set cmd [regsub %YEAR% $cmd $CurYear]
|
||||
|
||||
set file [open $cmd r]
|
||||
# Look for # rem2ps2 begin line
|
||||
@@ -1428,13 +1474,13 @@ proc DoPrint {} {
|
||||
}
|
||||
|
||||
if {$HaveRem2PDF && $Option(PrintFormat) == "pdf"} {
|
||||
set p [regsub @EXTRA@ $PSCmd "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||
set p [regsub %EXTRA% $PSCmd "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF"
|
||||
} elseif {$HaveRem2PDF && $Option(PrintFormat) == "ps1"} {
|
||||
set p [regsub @EXTRA@ $PSCmd "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||
set p [regsub %EXTRA% $PSCmd "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --ps"
|
||||
} else {
|
||||
set p [regsub @EXTRA@ $PSCmd $Option(ExtraRemindArgs)]
|
||||
set p [regsub %EXTRA% $PSCmd $Option(ExtraRemindArgs)]
|
||||
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PS"
|
||||
set Option(PrintFormat) ps
|
||||
}
|
||||
@@ -2868,7 +2914,7 @@ proc DaemonReadable { file } {
|
||||
# Reads a background reminder from daemon and pops up window.
|
||||
#---------------------------------------------------------------------------
|
||||
proc IssueBackgroundReminder { body time now tag qid } {
|
||||
global BgCounter Option Ignore DaemonFile
|
||||
global BgCounter Option Ignore DaemonFile HAVE_SYSNOTIFY NOTIFY_SEND_PATH
|
||||
if {$Option(Deiconify)} {
|
||||
wm deiconify .
|
||||
}
|
||||
@@ -2928,6 +2974,15 @@ proc IssueBackgroundReminder { body time now tag qid } {
|
||||
if {$Option(RingBell)} {
|
||||
bell
|
||||
}
|
||||
if {$Option(SysNotify)} {
|
||||
if {$HAVE_SYSNOTIFY} {
|
||||
tk sysnotify "Reminder for $time" $body
|
||||
} elseif {"$NOTIFY_SEND_PATH" != "" } {
|
||||
catch {
|
||||
exec $NOTIFY_SEND_PATH -a tkremind -i dialog-information "Reminder for $time" "$body"
|
||||
}
|
||||
}
|
||||
}
|
||||
if {$Option(RunCmd) != ""} {
|
||||
if {$Option(FeedReminder)} {
|
||||
FeedReminderToCommand $Option(RunCmd) "$time: $body"
|
||||
@@ -4225,7 +4280,7 @@ proc FindConfigFile {} {
|
||||
set confighome $env(XDG_CONFIG_HOME)
|
||||
}
|
||||
if {"$confighome" == ""} {
|
||||
set confighome "~/.config"
|
||||
set confighome [home "/.config"]
|
||||
}
|
||||
|
||||
# If $confighome does not exist, attempt to
|
||||
@@ -4236,15 +4291,15 @@ proc FindConfigFile {} {
|
||||
|
||||
if {[file isdirectory $confighome]} {
|
||||
# Migrate .tkremindrc to $confighome/tkremindrc
|
||||
if {[file exists "~/.tkremindrc"]} {
|
||||
if {[file exists [home "/.tkremindrc"]]} {
|
||||
if {![file exists "$confighome/tkreminderc"]} {
|
||||
puts "Migrating ~/.tkremindrc to $confighome/tkremindrc"
|
||||
if {[catch { file copy "~/.tkremindrc" "$confighome/tkremindrc"}]} {
|
||||
if {[catch { file copy [home "/.tkremindrc"] "$confighome/tkremindrc"}]} {
|
||||
puts "FAILED!\n"
|
||||
set ConfigFile "~/.tkremindrc"
|
||||
set ConfigFile [home "/.tkremindrc"]
|
||||
return
|
||||
}
|
||||
catch { file delete "~/.tkremindrc" }
|
||||
catch { file delete [home "/.tkremindrc"] }
|
||||
}
|
||||
set ConfigFile "$confighome/tkremindrc"
|
||||
return
|
||||
@@ -4252,7 +4307,7 @@ proc FindConfigFile {} {
|
||||
set ConfigFile "$confighome/tkremindrc"
|
||||
return
|
||||
}
|
||||
set ConfigFile "~/.tkremindrc"
|
||||
set ConfigFile [home "/.tkremindrc"]
|
||||
}
|
||||
|
||||
proc set_default_colors { w } {
|
||||
@@ -4342,6 +4397,4 @@ proc DoneShowingErrors {} {
|
||||
destroy .errors
|
||||
}
|
||||
|
||||
# Rem2PS program to execute -- supply full path if you want
|
||||
|
||||
main
|
||||
@@ -1724,8 +1724,10 @@ static void GenerateCalEntries(int col)
|
||||
/* need to destroy it here. */
|
||||
|
||||
default:
|
||||
Wprint("Unrecognized command; interpreting as REM");
|
||||
WarnedAboutImplicit = 1;
|
||||
if (!SuppressImplicitRemWarnings) {
|
||||
Wprint("Unrecognized command; interpreting as REM");
|
||||
WarnedAboutImplicit = 1;
|
||||
}
|
||||
CreateParser(CurLine, &p);
|
||||
r=DoCalRem(&p, col);
|
||||
break;
|
||||
|
||||
@@ -48,5 +48,7 @@
|
||||
#define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
#define PACKAGE_URL "@PACKAGE_URL@"
|
||||
|
||||
#define CONFIG_CMD "@CONFIG_CMD@"
|
||||
|
||||
#include "custom.h"
|
||||
|
||||
|
||||
@@ -704,7 +704,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
||||
DBufFree(&buf);
|
||||
trig->typ = MSG_TYPE;
|
||||
if (s->isnested) return E_CANT_NEST_RTYPE;
|
||||
if (!WarnedAboutImplicit) {
|
||||
if (!WarnedAboutImplicit && !SuppressImplicitRemWarnings) {
|
||||
Wprint("Missing REM type; assuming MSG");
|
||||
WarnedAboutImplicit = 1;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,6 @@ int DBufGets(DynamicBuffer *dbuf, FILE *fp)
|
||||
/* Try reading the first few bytes right into the buffer --
|
||||
we can usually save some unnecessary copying */
|
||||
|
||||
*(dbuf->buffer) = 0;
|
||||
if (fgets(dbuf->buffer, dbuf->allocatedLen, fp) == NULL) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
43
src/expr.c
43
src/expr.c
@@ -38,8 +38,8 @@
|
||||
5) N_BUILTIN_FUNC: A reference to a built-in function
|
||||
6) N_USER_FUNC: A reference to a user-defined function
|
||||
7) N_OPERATOR: A reference to an operator such as "+" or "&&"
|
||||
8) N_ERROR: A node resulting from a parse error
|
||||
9) N_SHORT_STR: A string constant short enough to store in u.name
|
||||
8) N_SHORT_STR: A string constant short enough to store in u.name
|
||||
9) N_ERROR: An uninitialized node, or a parse error
|
||||
|
||||
Additional types are N_SHORT_VAR, N_SHORT_SYSVAR, and N_SHORT_USER_FUNC
|
||||
which behave identically to N_VARIABLE, N_SYSVAR and N_USER_FUNC
|
||||
@@ -97,7 +97,7 @@
|
||||
1) For N_CONSTANT nodes: The constant
|
||||
2) For N_VARIABLE nodes: The value of the variable
|
||||
3) For N_SYSVAR nodes: The value of the system variable
|
||||
4) For N_LOCAL_VAR nodes: The value of the user-defined functions argument
|
||||
4) For N_LOCAL_VAR nodes: The value of the user-defined function's argument
|
||||
|
||||
User-defined functions contain their own expr_node tree. This is
|
||||
evaluated with the "locals" parameter set to the values of all
|
||||
@@ -156,7 +156,7 @@
|
||||
/* Constants for the "how" arg to compare() */
|
||||
enum { EQ, GT, LT, GE, LE, NE };
|
||||
|
||||
/* Our pool of free expr_node objext, as a linked list, linked by child ptr */
|
||||
/* Our pool of free expr_node objects, as a linked list, linked by child ptr */
|
||||
static expr_node *expr_node_free_list = NULL;
|
||||
|
||||
#define TOKEN_IS(x) (!strcmp(DBufValue(&ExprBuf), x))
|
||||
@@ -231,7 +231,7 @@ alloc_expr_node(int *r)
|
||||
if (ExprNodesUsed > ExprNodesHighWater) ExprNodesHighWater = ExprNodesUsed;
|
||||
node = expr_node_free_list;
|
||||
expr_node_free_list = node->child;
|
||||
node->type = N_FREE;
|
||||
node->type = N_ERROR;
|
||||
node->child = NULL;
|
||||
node->sibling = NULL;
|
||||
node->num_kids = 0;
|
||||
@@ -1698,7 +1698,7 @@ static int peek_expr_token(DynamicBuffer *buf, char const *in)
|
||||
/***************************************************************/
|
||||
expr_node * free_expr_tree(expr_node *node)
|
||||
{
|
||||
if (node) {
|
||||
if (node && (node->type != N_FREE)) {
|
||||
ExprNodesUsed--;
|
||||
if (node->type == N_CONSTANT ||
|
||||
node->type == N_VARIABLE ||
|
||||
@@ -1904,17 +1904,25 @@ static int set_constant_value(expr_node *atom)
|
||||
return OK;
|
||||
} else if (*s == '\'') { /* It's a literal date */
|
||||
s++;
|
||||
if ((r=ParseLiteralDate(&s, &dse, &tim)) != 0) {
|
||||
if ((r=ParseLiteralDateOrTime(&s, &dse, &tim)) != 0) {
|
||||
Eprint("%s: %s", ErrMsg[r], DBufValue(&ExprBuf));
|
||||
return r;
|
||||
}
|
||||
if (*s != '\'') {
|
||||
Eprint("%s: %s", ErrMsg[E_BAD_DATE], DBufValue(&ExprBuf));
|
||||
return E_BAD_DATE;
|
||||
if (dse != NO_DATE) {
|
||||
Eprint("%s: %s", ErrMsg[E_BAD_DATE], DBufValue(&ExprBuf));
|
||||
return E_BAD_DATE;
|
||||
} else {
|
||||
Eprint("%s: %s", ErrMsg[E_BAD_TIME], DBufValue(&ExprBuf));
|
||||
return E_BAD_TIME;
|
||||
}
|
||||
}
|
||||
if (tim == NO_TIME) {
|
||||
atom->u.value.type = DATE_TYPE;
|
||||
atom->u.value.v.val = dse;
|
||||
} else if (dse == NO_DATE) {
|
||||
atom->u.value.type = TIME_TYPE;
|
||||
atom->u.value.v.val = tim;
|
||||
} else {
|
||||
atom->u.value.type = DATETIME_TYPE;
|
||||
atom->u.value.v.val = (dse * MINUTES_PER_DAY) + tim;
|
||||
@@ -2864,25 +2872,32 @@ int ParseLiteralTime(char const **s, int *tim)
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseLiteralDate */
|
||||
/* ParseLiteralDateOrTime */
|
||||
/* */
|
||||
/* Parse a literal date or datetime. Return result in dse */
|
||||
/* and tim; update s. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
int ParseLiteralDate(char const **s, int *dse, int *tim)
|
||||
int ParseLiteralDateOrTime(char const **s, int *dse, int *tim)
|
||||
{
|
||||
int y, m, d;
|
||||
int r;
|
||||
|
||||
char const *orig_s = *s;
|
||||
|
||||
y=0; m=0; d=0;
|
||||
|
||||
*tim = NO_TIME;
|
||||
*dse = NO_DATE;
|
||||
if (!isdigit(**s)) return E_BAD_DATE;
|
||||
while (isdigit(**s)) {
|
||||
y *= 10;
|
||||
y += *(*s)++ - '0';
|
||||
}
|
||||
if (**s == ':' || **s == '.' || **s == TimeSep) {
|
||||
*s = orig_s;
|
||||
return ParseLiteralTime(s, tim);
|
||||
}
|
||||
if (**s != '/' && **s != '-' && **s != DateSep) return E_BAD_DATE;
|
||||
(*s)++;
|
||||
if (!isdigit(**s)) return E_BAD_DATE;
|
||||
@@ -2938,7 +2953,8 @@ int DoCoerce(char type, Value *v)
|
||||
return OK;
|
||||
case STR_TYPE:
|
||||
s = v->v.str;
|
||||
if (ParseLiteralDate(&s, &i, &m)) return E_CANT_COERCE;
|
||||
if (ParseLiteralDateOrTime(&s, &i, &m)) return E_CANT_COERCE;
|
||||
if (i == NO_DATE) return E_CANT_COERCE;
|
||||
if (*s) return E_CANT_COERCE;
|
||||
v->type = DATETIME_TYPE;
|
||||
free(v->v.str);
|
||||
@@ -3020,7 +3036,8 @@ int DoCoerce(char type, Value *v)
|
||||
|
||||
case STR_TYPE:
|
||||
s = v->v.str;
|
||||
if (ParseLiteralDate(&s, &i, &m)) return E_CANT_COERCE;
|
||||
if (ParseLiteralDateOrTime(&s, &i, &m)) return E_CANT_COERCE;
|
||||
if (i == NO_DATE) return E_CANT_COERCE;
|
||||
if (*s) return E_CANT_COERCE;
|
||||
v->type = DATE_TYPE;
|
||||
free(v->v.str);
|
||||
|
||||
@@ -171,6 +171,9 @@ EXTERN DynamicBuffer ExprBuf;
|
||||
/* User-func recursion level */
|
||||
EXTERN INIT( unsigned int FuncRecursionLevel, 0);
|
||||
|
||||
/* Suppress warnings about implicit REM and MSG */
|
||||
EXTERN INIT( int SuppressImplicitRemWarnings, 0);
|
||||
|
||||
extern int NumFullOmits, NumPartialOmits;
|
||||
|
||||
/* List of months */
|
||||
|
||||
@@ -1071,6 +1071,10 @@ ProcessLongOption(char const *arg)
|
||||
printf("%s\n", VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (!strcmp(arg, "print-config-cmd")) {
|
||||
printf("%s\n", CONFIG_CMD);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (!strcmp(arg, "print-tokens")) {
|
||||
print_remind_tokens();
|
||||
print_builtinfunc_tokens();
|
||||
|
||||
12
src/main.c
12
src/main.c
@@ -60,9 +60,15 @@ exitfunc(void)
|
||||
/* Kill any execution-time-limiter process */
|
||||
unlimit_execution_time();
|
||||
|
||||
int maxlen, total;
|
||||
double avglen;
|
||||
if (DebugFlag & DB_PARSE_EXPR) {
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
get_var_hash_stats(&total, &maxlen, &avglen);
|
||||
fprintf(stderr, " Var hash: total = %d; maxlen = %d; avglen = %.3f\n", total, maxlen, avglen);
|
||||
get_userfunc_hash_stats(&total, &maxlen, &avglen);
|
||||
fprintf(stderr, "Func hash: total = %d; maxlen = %d; avglen = %.3f\n", total, maxlen, avglen);
|
||||
UnsetAllUserFuncs();
|
||||
print_expr_nodes_stats();
|
||||
}
|
||||
@@ -356,8 +362,10 @@ static void DoReminders(void)
|
||||
/* If we don't recognize the command, do a REM by default, but warn */
|
||||
|
||||
default:
|
||||
Wprint("Unrecognized command; interpreting as REM");
|
||||
WarnedAboutImplicit = 1;
|
||||
if (!SuppressImplicitRemWarnings) {
|
||||
Wprint("Unrecognized command; interpreting as REM");
|
||||
WarnedAboutImplicit = 1;
|
||||
}
|
||||
DestroyParser(&p);
|
||||
CreateParser(CurLine, &p);
|
||||
purge_handled = 1;
|
||||
|
||||
@@ -129,7 +129,7 @@ static double phase (double, double *, double *, double *, double *, double *, d
|
||||
/* */
|
||||
/* jdate */
|
||||
/* */
|
||||
/* Convert a date and time to DSE day and fraction. */
|
||||
/* Convert a date and time to Julian day and fraction. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static long jdate(int y, int mon, int day)
|
||||
|
||||
@@ -145,7 +145,9 @@ int PushOmitContext(ParsePtr p)
|
||||
context->partsave = malloc(NumPartialOmits * sizeof(int));
|
||||
if (NumPartialOmits && !context->partsave) {
|
||||
free(context->filename);
|
||||
free(context->fullsave);
|
||||
if (context->fullsave) {
|
||||
free(context->fullsave);
|
||||
}
|
||||
free(context);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ int TriggerReminder (ParsePtr p, Trigger *t, TimeTrig *tim, int dse, int is_queu
|
||||
int ShouldTriggerReminder (Trigger *t, TimeTrig *tim, int dse, int *err);
|
||||
int DoSubst (ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse, int mode);
|
||||
int DoSubstFromString (char const *source, DynamicBuffer *dbuf, int dse, int tim);
|
||||
int ParseLiteralDate (char const **s, int *dse, int *tim);
|
||||
int ParseLiteralDateOrTime (char const **s, int *dse, int *tim);
|
||||
int ParseLiteralTime (char const **s, int *tim);
|
||||
expr_node *parse_expression(char const **e, int *r, Var *locals);
|
||||
|
||||
@@ -247,3 +247,6 @@ extern int _private_sub_overflow(int a, int b);
|
||||
void print_sysvar_tokens(void);
|
||||
void print_builtinfunc_tokens(void);
|
||||
void print_remind_tokens(void);
|
||||
void get_var_hash_stats(int *total, int *maxlen, double *avglen);
|
||||
void get_userfunc_hash_stats(int *total, int *maxlen, double *avglen);
|
||||
|
||||
|
||||
60
src/token.c
60
src/token.c
@@ -119,6 +119,21 @@ Token TokArray[] = {
|
||||
|
||||
static int TokStrCmp (Token const *t, char const *s);
|
||||
|
||||
static void
|
||||
init_token(Token *t)
|
||||
{
|
||||
t->name = NULL;
|
||||
t->type = T_Illegal;
|
||||
t->val = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
token_error(Token *t, int errcode)
|
||||
{
|
||||
t->type = T_Illegal;
|
||||
t->val = -errcode;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* FindInitialToken */
|
||||
@@ -132,7 +147,7 @@ char const *FindInitialToken(Token *tok, char const *s)
|
||||
DynamicBuffer buf;
|
||||
DBufInit(&buf);
|
||||
|
||||
tok->type = T_Illegal;
|
||||
init_token(tok);
|
||||
|
||||
while (isempty(*s)) s++;
|
||||
|
||||
@@ -159,7 +174,7 @@ void FindToken(char const *s, Token *tok)
|
||||
int top, bot, mid, r, max;
|
||||
int l;
|
||||
|
||||
tok->type = T_Illegal;
|
||||
init_token(tok);
|
||||
if (! *s) {
|
||||
tok->type = T_Empty;
|
||||
return;
|
||||
@@ -235,8 +250,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
int ampm = 0;
|
||||
int r;
|
||||
|
||||
t->type = T_Illegal;
|
||||
t->val = 0;
|
||||
init_token(t);
|
||||
if (isdigit(*s)) {
|
||||
PARSENUM(t->val, s);
|
||||
|
||||
@@ -244,7 +258,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
if (*s == '-' || *s == '/') {
|
||||
char const *p = s_orig;
|
||||
int dse, tim;
|
||||
r = ParseLiteralDate(&p, &dse, &tim);
|
||||
r = ParseLiteralDateOrTime(&p, &dse, &tim);
|
||||
if (r == OK) {
|
||||
if (*p) {
|
||||
if (tim == NO_TIME) {
|
||||
@@ -259,12 +273,15 @@ void FindNumericToken(char const *s, Token *t)
|
||||
t->val = dse;
|
||||
return;
|
||||
}
|
||||
if (dse == NO_DATE) {
|
||||
t->type = T_Time;
|
||||
t->val = tim;
|
||||
return;
|
||||
}
|
||||
t->type = T_DateTime;
|
||||
t->val = MINUTES_PER_DAY * dse + tim;
|
||||
} else {
|
||||
t->type = T_Illegal;
|
||||
/* Store error message negated as val! */
|
||||
t->val = -r;
|
||||
token_error(t, r);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -283,15 +300,13 @@ void FindNumericToken(char const *s, Token *t)
|
||||
s++;
|
||||
hour = t->val;
|
||||
if (!isdigit(*s)) {
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_TIME;
|
||||
token_error(t, E_BAD_TIME);
|
||||
return;
|
||||
}
|
||||
PARSENUM(min, s);
|
||||
if (min > 59) {
|
||||
/* Illegal time */
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_TIME;
|
||||
token_error(t, E_BAD_TIME);
|
||||
return;
|
||||
}
|
||||
/* Check for p[m] or a[m] */
|
||||
@@ -303,14 +318,12 @@ void FindNumericToken(char const *s, Token *t)
|
||||
}
|
||||
}
|
||||
if (*s) {
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_TIME;
|
||||
token_error(t, E_BAD_TIME);
|
||||
return;
|
||||
}
|
||||
if (ampm) {
|
||||
if (hour < 1 || hour > 12) {
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_TIME;
|
||||
token_error(t, E_BAD_TIME);
|
||||
return;
|
||||
}
|
||||
if (ampm == 'a') {
|
||||
@@ -335,8 +348,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
|
||||
/* If we hit a non-digit, error! */
|
||||
if (*s) {
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_NUMBER;
|
||||
token_error(t, E_BAD_NUMBER);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -353,8 +365,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
PARSENUM(t->val, s);
|
||||
if (*s) {
|
||||
/* Illegal token if followed by non-numeric char */
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_NUMBER;
|
||||
token_error(t, E_BAD_NUMBER);
|
||||
return;
|
||||
}
|
||||
t->type = T_Rep;
|
||||
@@ -366,8 +377,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
PARSENUM(t->val, s);
|
||||
if (*s) {
|
||||
/* Illegal token if followed by non-numeric char */
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_NUMBER;
|
||||
token_error(t, E_BAD_NUMBER);
|
||||
return;
|
||||
}
|
||||
t->type = T_Delta;
|
||||
@@ -379,8 +389,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
PARSENUM(t->val, s);
|
||||
if (*s) {
|
||||
/* Illegal token if followed by non-numeric char */
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_NUMBER;
|
||||
token_error(t, E_BAD_NUMBER);
|
||||
return;
|
||||
}
|
||||
t->type = T_Back;
|
||||
@@ -393,8 +402,7 @@ void FindNumericToken(char const *s, Token *t)
|
||||
PARSENUM(t->val, s);
|
||||
if (*s) {
|
||||
/* Illegal token if followed by non-numeric char */
|
||||
t->type = T_Illegal;
|
||||
t->val = -E_BAD_NUMBER;
|
||||
token_error(t, E_BAD_NUMBER);
|
||||
return;
|
||||
}
|
||||
t->type = T_BackAdj;
|
||||
|
||||
@@ -41,8 +41,7 @@ typedef struct {
|
||||
/* New-style expr_node structure and constants */
|
||||
enum expr_node_type
|
||||
{
|
||||
N_FREE,
|
||||
N_ERROR,
|
||||
N_FREE = 0,
|
||||
N_CONSTANT,
|
||||
N_SHORT_STR,
|
||||
N_LOCAL_VAR,
|
||||
@@ -54,6 +53,7 @@ enum expr_node_type
|
||||
N_SHORT_USER_FUNC,
|
||||
N_USER_FUNC,
|
||||
N_OPERATOR,
|
||||
N_ERROR = 32767,
|
||||
};
|
||||
|
||||
/* Structure for passing in Nargs and out RetVal from functions */
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "protos.h"
|
||||
#include "err.h"
|
||||
|
||||
#define FUNC_HASH_SIZE 32 /* Size of User-defined function hash table */
|
||||
#define FUNC_HASH_SIZE 31 /* Size of User-defined function hash table */
|
||||
|
||||
/* The hash table */
|
||||
static UserFunc *FuncHash[FUNC_HASH_SIZE];
|
||||
@@ -44,17 +44,17 @@ static void FSet (UserFunc *f);
|
||||
/***************************************************************/
|
||||
unsigned int HashVal_nocase(char const *str)
|
||||
{
|
||||
register unsigned int i=0;
|
||||
register unsigned int j=1;
|
||||
register unsigned int len=0;
|
||||
|
||||
while(*str && len < VAR_NAME_LEN) {
|
||||
i += j * (*str);
|
||||
str++;
|
||||
len++;
|
||||
j = 3-j;
|
||||
unsigned int h = 0, high;
|
||||
while(*str) {
|
||||
h = (h << 4) + (unsigned int) *str;
|
||||
str++;
|
||||
high = h & 0xF0000000;
|
||||
if (high) {
|
||||
h ^= (high >> 24);
|
||||
}
|
||||
h &= ~high;
|
||||
}
|
||||
return i;
|
||||
return h;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -401,3 +401,28 @@ UnsetAllUserFuncs(void)
|
||||
FuncHash[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
get_userfunc_hash_stats(int *total, int *maxlen, double *avglen)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
UserFunc *f;
|
||||
|
||||
*maxlen = 0;
|
||||
*total = 0;
|
||||
|
||||
for (i=0; i<FUNC_HASH_SIZE; i++) {
|
||||
len = 0;
|
||||
f = FuncHash[i];
|
||||
while(f) {
|
||||
len++;
|
||||
(*total)++;
|
||||
f = f->next;
|
||||
}
|
||||
if (len > *maxlen) {
|
||||
*maxlen = len;
|
||||
}
|
||||
}
|
||||
*avglen = (double) *total / (double) FUNC_HASH_SIZE;
|
||||
}
|
||||
|
||||
50
src/var.c
50
src/var.c
@@ -28,7 +28,7 @@
|
||||
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
||||
|
||||
/* The variable hash table */
|
||||
#define VAR_HASH_SIZE 64
|
||||
#define VAR_HASH_SIZE 67
|
||||
#define VARIABLE ErrMsg[E_VAR]
|
||||
#define VALUE ErrMsg[E_VAL]
|
||||
#define UNDEF ErrMsg[E_UNDEF]
|
||||
@@ -461,17 +461,17 @@ static int time_sep_func(int do_set, Value *val)
|
||||
/***************************************************************/
|
||||
unsigned int HashVal(char const *str)
|
||||
{
|
||||
register unsigned int i=0;
|
||||
register unsigned int j=1;
|
||||
register unsigned int len=0;
|
||||
|
||||
while(*str && len < VAR_NAME_LEN) {
|
||||
i += j * (unsigned int) UPPER(*str);
|
||||
str++;
|
||||
len++;
|
||||
j = 3-j;
|
||||
unsigned int h = 0, high;
|
||||
while(*str) {
|
||||
h = (h << 4) + (unsigned int) UPPER(*str);
|
||||
str++;
|
||||
high = h & 0xF0000000;
|
||||
if (high) {
|
||||
h ^= (high >> 24);
|
||||
}
|
||||
h &= ~high;
|
||||
}
|
||||
return i;
|
||||
return h;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -934,6 +934,7 @@ static SysVar SysVarArr[] = {
|
||||
{"SortByTime", 0, INT_TYPE, &SortByTime, 0, 0 },
|
||||
{"SubsIndent", 1, INT_TYPE, &SubsIndent, 0, 132 },
|
||||
{"Sunday", 1, STR_TYPE, &DynamicDayName[6], 0, 0 },
|
||||
{"SuppressImplicitWarnings", 1, INT_TYPE, &SuppressImplicitRemWarnings, 0, 1},
|
||||
{"SuppressLRM", 1, INT_TYPE, &SuppressLRM, 0, 1 },
|
||||
{"SysInclude", 0, STR_TYPE, &SysDir, 0, 0 },
|
||||
{"T", 0, SPECIAL_TYPE, trig_date_func, 0, 0 },
|
||||
@@ -1119,7 +1120,7 @@ static void DumpSysVar(char const *name, const SysVar *v)
|
||||
return;
|
||||
}
|
||||
if (name) strcat(buffer, name); else strcat(buffer, v->name);
|
||||
fprintf(ErrFp, "%16s ", buffer);
|
||||
fprintf(ErrFp, "%25s ", buffer);
|
||||
if (v) {
|
||||
if (v->type == CONST_INT_TYPE) {
|
||||
fprintf(ErrFp, "%d\n", v->constval);
|
||||
@@ -1207,3 +1208,28 @@ print_sysvar_tokens(void)
|
||||
printf("$%s\n", SysVarArr[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
get_var_hash_stats(int *total, int *maxlen, double *avglen)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
Var *v;
|
||||
|
||||
*maxlen = 0;
|
||||
*total = 0;
|
||||
|
||||
for (i=0; i<VAR_HASH_SIZE; i++) {
|
||||
len = 0;
|
||||
v = VHashTbl[i];
|
||||
while(v) {
|
||||
len++;
|
||||
(*total)++;
|
||||
v = v->next;
|
||||
}
|
||||
if (len > *maxlen) {
|
||||
*maxlen = len;
|
||||
}
|
||||
}
|
||||
*avglen = (double) *total / (double) VAR_HASH_SIZE;
|
||||
}
|
||||
|
||||
1075
tests/test.cmp
1075
tests/test.cmp
File diff suppressed because it is too large
Load Diff
@@ -450,7 +450,7 @@ set a125 trigduration()
|
||||
|
||||
# Test adding TIME+TIME and DATETIME+TIME
|
||||
set a126 11:00 + 3:00
|
||||
set a127 23:00 + 5:30
|
||||
set a127 '23:00' + 5:30
|
||||
set a128 '2018-02-03@10:00' + 6:45
|
||||
set a129 23:30 + '2019-02-02@16:44'
|
||||
|
||||
@@ -931,6 +931,7 @@ REM MSG %{bad}
|
||||
FSET subst_ampm(a, b, c, d, e, f, g) "wookie"
|
||||
|
||||
REM AT 11:00 MSG %2
|
||||
FUNSET subst_ampm
|
||||
|
||||
# Test FUNSET
|
||||
FSET square(x) x*x
|
||||
@@ -1122,6 +1123,16 @@ set zxk dooby(1)
|
||||
REM 1 Jan 1873 MSG This should fail
|
||||
REM 1873-12-11 MSG Also bad.
|
||||
|
||||
# Test $SuppressImplicitWarnings
|
||||
REM wookie
|
||||
Barf
|
||||
|
||||
set $SuppressImplicitWarnings 1
|
||||
REM wookie
|
||||
Barf
|
||||
|
||||
# Output expression-node stats
|
||||
DEBUG +s
|
||||
# Don't want Remind to queue reminders
|
||||
EXIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user