Compare commits

...

153 Commits

Author SHA1 Message Date
Dianne Skoll
a8607cb012 Add some terms to hunspell dictionary. 2025-11-10 12:15:34 -05:00
Dianne Skoll
6caa404e59 Prep for 06.02.01 release. 2025-11-10 12:14:28 -05:00
Dianne Skoll
13e1e19855 Add some tests; make tess pass on MUSL. 2025-11-10 12:08:58 -05:00
Dianne Skoll
96d40b81df Make early exit contingent upon ParseUntriggered. 2025-11-10 12:02:47 -05:00
Dianne Skoll
30e4a9fc50 Catch possible error 2025-11-06 21:42:57 -05:00
Dianne Skoll
6d0fbeed20 Hide font chooser if we kill .opts 2025-11-06 21:40:58 -05:00
Dianne Skoll
3f1aaeefd2 Raise .opts when font chooser is dismissed. 2025-11-06 21:39:42 -05:00
Dianne Skoll
326604fe18 Free trigger resources if we exit early because of expired reminder. 2025-11-04 17:07:09 -05:00
Dianne Skoll
57e93553bf Exit early if a reminder has expired. 2025-11-04 17:05:02 -05:00
Dianne Skoll
a5aa5d901b Prevent test failures. 2025-11-03 10:33:10 -05:00
Dianne Skoll
1e0d43b63c Tweak WHATSNEW. 2025-11-03 10:16:37 -05:00
Dianne Skoll
188efaebba Update test file. 2025-11-03 10:14:15 -05:00
Dianne Skoll
b701dc575f Prep for 06.02.00 release. 2025-11-03 10:13:16 -05:00
Dianne Skoll
c9ae1c82f0 Make all weekly boxes the same height. 2025-11-02 21:44:31 -05:00
Dianne Skoll
13cea56cce Draw moon phases left-aligned on weekly calendars. 2025-11-02 21:32:36 -05:00
Dianne Skoll
6661f32faf In weekly calendars, draw moon phases smaller and in days without moon
phases, don't leave a big gap at the top.
2025-11-02 21:28:44 -05:00
Dianne Skoll
f6ab660c5e Correct positioning of WEEK special. 2025-11-02 21:18:17 -05:00
Dianne Skoll
523cfb7bf5 Document common INFO strings. 2025-11-02 20:15:30 -05:00
Dianne Skoll
82a4ba777d Update WHATSNEW 2025-11-02 14:07:43 -05:00
Dianne Skoll
8f02868486 Refactor code. 2025-11-02 14:00:59 -05:00
Dianne Skoll
12d8e8e948 Add support for turning reminders with "URL" info strings into hyperlinks if your terminal supports it.
Use the "z" flag with -c.
2025-11-02 13:29:41 -05:00
Dianne Skoll
f5f364507b Add not about Jochen Sprickerhof's work on test-rem. 2025-11-02 12:33:36 -05:00
Dianne Skoll
d514389c39 Sort the dictionary. :) 2025-11-02 12:31:44 -05:00
Dianne Skoll
52c615ff61 Revert warning if BANNER is used after a banner has already been issued.
https://dianne.skoll.ca/pipermail/remind-fans/2025/005268.html
2025-11-02 12:21:12 -05:00
Dianne Skoll
7d3e6b3a72 Warn if we see a BANNER command when the banner has already been issued. 2025-11-02 11:28:48 -05:00
Dianne Skoll
c4e5190ec2 Add missing key bindings. 2025-11-02 10:59:39 -05:00
Dianne Skoll
f197f5ef9d Document keyboard shortcuts 2025-11-02 10:55:58 -05:00
Dianne Skoll
153cbfe276 A bunch more key bindings. 2025-11-02 10:52:39 -05:00
Dianne Skoll
2d9bea444b Add a bunch more key bindings. 2025-11-02 10:48:40 -05:00
Dianne Skoll
2ae8e51bec Style fix. 2025-11-02 09:43:13 -05:00
Dianne Skoll
05d1608081 Update man page. 2025-11-02 09:32:52 -05:00
Dianne Skoll
d093e8dea3 Make "Esc" close agenda-mode window. 2025-11-02 09:31:21 -05:00
Dianne Skoll
f9fac22bbf Bind "KeyPress-t" to ShowTodaysReminders. 2025-11-02 09:28:16 -05:00
Dianne Skoll
9ecbfbb314 Make details popup work again. 2025-11-02 09:25:29 -05:00
Dianne Skoll
612f3e7f16 Make sure .balloonhelp doesn't exist if we try to create it. 2025-11-02 09:20:07 -05:00
Dianne Skoll
d22f9979a5 Make sure .balloonhelp doesn't exist if we try to create it. 2025-11-02 09:16:23 -05:00
Dianne Skoll
291f648d2e Update WHATSNEW 2025-11-02 09:00:07 -05:00
Dianne Skoll
351088fd4b Proper key names. 2025-11-02 08:49:11 -05:00
Dianne Skoll
ed57f62911 Add navigation to the Agenda Mode window. 2025-11-02 08:48:16 -05:00
Dianne Skoll
53dcce6a91 Use a macro instead of repeating myself. 2025-11-01 21:15:24 -04:00
Dianne Skoll
d12d327e35 Include ')' in non-illegal char set. 2025-11-01 21:09:19 -04:00
Dianne Skoll
a2f760fb91 Better diagnostics for errors like: SET a 3 * * 4 2025-11-01 21:07:39 -04:00
Dianne Skoll
4a9b4ff6e4 Show errors in weekly view too; use fixd-width font for error window. 2025-11-01 20:10:22 -04:00
Dianne Skoll
ce6061a29b Add test for bug fixed in commit 878a5d9bed 2025-11-01 20:00:14 -04:00
Dianne Skoll
878a5d9bed Avoid spurious parse error if there's trailing space after the end of an expression. 2025-11-01 19:58:46 -04:00
Dianne Skoll
d1b55bae8d Add keyboard shortcuts to change view. 2025-11-01 18:46:51 -04:00
Dianne Skoll
c13817015f Allow editing and the subsequent running of (possibly edited) print command. 2025-11-01 15:46:46 -04:00
Dianne Skoll
bf74ad1eb7 Reword error message. 2025-11-01 13:07:38 -04:00
Dianne Skoll
f2eb06c752 Refresh view on date rollover. 2025-11-01 00:01:34 -04:00
Dianne Skoll
8172acf102 Tidy up print dialog to get rid of rem2ps artifacts. 2025-10-31 17:00:29 -04:00
Dianne Skoll
949e00219d Update man page to remove references to rem2ps 2025-10-31 16:54:36 -04:00
Dianne Skoll
1fd19b89e2 Remove support for rem2ps - we use rem2pdf to print. 2025-10-31 16:51:59 -04:00
Dianne Skoll
22d6c0583a Make PANGO @x,y positioning consistent between monthly and weekly calendars. 2025-10-31 16:40:07 -04:00
Dianne Skoll
12fac555b6 When printing, print the same view as what we're viewing. 2025-10-31 16:10:53 -04:00
Dianne Skoll
085b781114 Prevent segfault. 2025-10-31 12:51:05 -04:00
Dianne Skoll
c9d7fbf479 Trim reminders so we don't inadvertantly think they've been changed. 2025-10-31 12:45:42 -04:00
Dianne Skoll
42f868db07 Prep for 06.01.09 release. 2025-10-31 11:02:16 -04:00
Dianne Skoll
2996275ec4 Update man page 2025-10-31 10:56:30 -04:00
Dianne Skoll
5586198a0e Save the view in Options so if you switch views, it is remembered. 2025-10-31 10:52:29 -04:00
Dianne Skoll
d17c48e751 Implement 1-, 2- and 4-week displays in addition to monthly. 2025-10-30 22:00:28 -04:00
Dianne Skoll
e08a6370ef Proper error propagation. 2025-10-30 20:24:23 -04:00
Dianne Skoll
7a319466cf Fix error output 2025-10-30 18:00:34 -04:00
Dianne Skoll
4158ad5977 More work towards supporting weekly calendars. 2025-10-30 17:17:11 -04:00
Dianne Skoll
9b07eed26f More work towards supporting weekly calendars. 2025-10-30 16:37:02 -04:00
Dianne Skoll
05ead8c40d More helpful errors when parsing expressions. 2025-10-30 14:30:29 -04:00
Dianne Skoll
35e222967c More work on supporting weekly calendar views. 2025-10-30 13:03:40 -04:00
Dianne Skoll
83ca07d34f Start laying the groundwork for supporting weekly views in tkremind. 2025-10-30 12:25:57 -04:00
Dianne Skoll
36f4bb852b Avoid warnings on FreeBSD. 2025-10-29 13:46:41 -04:00
Dianne Skoll
9642303d05 Proper test for link-time optimizations. 2025-10-29 13:44:55 -04:00
Dianne Skoll
a6144baff7 Add -Werror so we don't enable -ffat-lto-objects on FreeBSD. 2025-10-29 13:41:34 -04:00
Dianne Skoll
17985c59c3 Bind the KP_* variations of Home, Left, Right, Prior and Next.
Start adding support for window properties.
2025-10-29 13:35:21 -04:00
Dianne Skoll
719295ccd7 Update man page to reflect new reality of hand-edited reminders. 2025-10-29 12:33:23 -04:00
Dianne Skoll
3d74389713 Remove dead code; if a reminder is hand-edited, make it non-modifiable via TkRemind. 2025-10-29 12:29:24 -04:00
Dianne Skoll
80c7244d64 Merge branch 'test_support_env' into 'master'
test-rem: support for $REMIND_CMD and $REM2PS

See merge request dskoll/remind!10
2025-10-28 09:39:24 -04:00
Jochen Sprickerhof
db27be1469 test-rem: support for $REMIND_CMD and $REM2PS 2025-10-28 09:39:24 -04:00
Dianne Skoll
d59fe832fd Update version number. 2025-10-27 10:24:11 -04:00
Dianne Skoll
88ebdf275e Avoid test failure. 2025-10-27 10:23:38 -04:00
Dianne Skoll
a7a6f8b5f0 Prep for 06.01.08 release. 2025-10-27 10:22:29 -04:00
Dianne Skoll
3e248c069e Change button color. 2025-10-26 16:46:14 -04:00
Dianne Skoll
65cca1fd8f Remove useless test. 2025-10-25 12:45:59 -04:00
Dianne Skoll
5a889043ba Remove misleading wording. 2025-10-25 12:42:58 -04:00
Dianne Skoll
6d1fcdf246 Change button color. 2025-10-25 11:04:52 -04:00
Dianne Skoll
3476b965ef Add "Show Command" option to Print dialog. 2025-10-24 16:31:27 -04:00
Dianne Skoll
0bba2dc3b3 Fix modal file browser. 2025-10-24 10:27:48 -04:00
Dianne Skoll
e5c27f19f5 Handle window raising better. 2025-10-24 08:52:59 -04:00
Dianne Skoll
f9aa53433e Raise .edit on button press. 2025-10-24 08:51:06 -04:00
Dianne Skoll
5323245529 Use wm protocol WM_DELETE_WINDOW on the .edit modal as well. 2025-10-24 08:49:14 -04:00
Dianne Skoll
deb12ac7cd Fix all modal dialogs. 2025-10-24 08:12:20 -04:00
Dianne Skoll
a1488d93ad Finally fix all the race conditions. 2025-10-23 22:00:06 -04:00
Dianne Skoll
65add3d32e Reset EditingReminder to 0 if edit window is destroyed. 2025-10-23 21:23:39 -04:00
Dianne Skoll
8d6f5efa7b Fix race conditions seen on slow computers if you double-click a day number or tagged reminder. 2025-10-23 17:54:40 -04:00
Dianne Skoll
eb996a8146 Avoid error if you click too fast on a tagged reminder. 2025-10-23 17:12:18 -04:00
Dianne Skoll
1cd6205cdd Make TkRemind work on dumb systems that use "poor-man's" bold and italic. 2025-10-23 12:08:02 -04:00
Dianne Skoll
6d9ccc1522 Make bold and italic work on stupid systems. 2025-10-23 11:49:58 -04:00
Dianne Skoll
0268020579 Bump version to 06.01.07 2025-10-23 11:23:10 -04:00
Dianne Skoll
5803d1dd7e Update changelog 2025-10-23 11:22:40 -04:00
Dianne Skoll
5dfce21af6 Add ?tkr=1 2025-10-23 11:18:37 -04:00
Dianne Skoll
8ddb956f9a Change cursor inside links 2025-10-22 23:36:58 -04:00
Dianne Skoll
32421815cd Make the version numbers in WHATSNEW match the ones in Remind. 2025-10-22 22:51:00 -04:00
Dianne Skoll
dbe3bc13fa Make links blue. 2025-10-22 16:48:05 -04:00
Dianne Skoll
c68c716585 Make URLs in man pages clickable. 2025-10-22 16:09:30 -04:00
Dianne Skoll
7a1a5abc0f Give the window an appropriate title. 2025-10-22 13:05:14 -04:00
Dianne Skoll
53a1318306 Tweak man pages to remove "4th Berkeley Distribution" 2025-10-22 12:59:23 -04:00
Dianne Skoll
78fecf28c4 More info 2025-10-22 12:40:20 -04:00
Dianne Skoll
6081d29b11 Reduce flicker. 2025-10-22 12:33:51 -04:00
Dianne Skoll
e0a5125ee0 Set focus to man page window so PgUp, etc work as expected. 2025-10-22 12:30:50 -04:00
Dianne Skoll
c3f790a99b Allow for browsing of other man pages in the "SEE ALSO" section. 2025-10-22 12:27:15 -04:00
Dianne Skoll
3eb507451e Nicely format the man page. 2025-10-22 11:33:20 -04:00
Dianne Skoll
e9e0368418 six => seven 2025-10-22 10:28:49 -04:00
Dianne Skoll
759ae1ab80 Add a "help" button that shows TkRemind's man page, positioned to a useful place. 2025-10-22 10:25:42 -04:00
Dianne Skoll
e8602824a0 Add helpful message. 2025-10-22 09:47:57 -04:00
Dianne Skoll
62301a88cc We don't use _chan any more. 2025-10-20 14:17:52 -04:00
Dianne Skoll
6b163092c7 Check spelling of Perl man pages too. 2025-10-20 13:55:33 -04:00
Dianne Skoll
f8ac99d22e Tighten up display 2025-10-20 13:43:04 -04:00
Dianne Skoll
4b7870f6b1 Fix docs/WHATSNEW 2025-10-20 12:11:09 -04:00
Dianne Skoll
e11b899f7e Prep for 06.01.06 release 2025-10-20 11:51:30 -04:00
Dianne Skoll
8e4987eeba Don't enable LTO on Solaris. 2025-10-20 11:40:18 -04:00
Dianne Skoll
aa56d27aea Better checking for -flto flags. 2025-10-20 11:32:25 -04:00
Dianne Skoll
b3278cd9d5 Adjust order of items in man page. 2025-10-20 11:16:38 -04:00
Dianne Skoll
09814eac68 Add --title-url=URL option to rem2pdf. 2025-10-20 11:12:25 -04:00
Dianne Skoll
0e8889441d Defensive programming... check bounds. 2025-10-19 21:29:29 -04:00
Dianne Skoll
d9503bd14d Default --bg-color to no color at all (transparent). 2025-10-19 20:34:14 -04:00
Dianne Skoll
a5c18f8825 Fix positioning of week number and PANGO @... reminders. 2025-10-19 18:43:59 -04:00
Dianne Skoll
f7fc9f57bd Fix punctuation. 2025-10-19 18:24:06 -04:00
Dianne Skoll
6931c81716 Document the new rem2pdf color options. 2025-10-19 18:22:45 -04:00
Dianne Skoll
2eb80c4ba1 Add new color command-line options to rem2pdf. Also make "SHADE" fill the entire rectangle.
New color options are:

--line-color=RRGGBB     Set line color
--title-color=RRGGBB    Set title color
--header-color=RRGGBB   Set header color
--daynum-color=RRGGBB   Set day number color
--smallcal-color=RRGGBB Set small calendar color
--bg-color=RRGGBB       Set background color
2025-10-19 18:16:27 -04:00
Dianne Skoll
f5dbba3864 Use our StrDup function. 2025-10-18 14:23:14 -04:00
Dianne Skoll
3fc57fb76e Don't leak variables. 2025-10-18 11:31:36 -04:00
Dianne Skoll
ff9d27a6ca Fix a few potential memory leaks. 2025-10-18 11:26:40 -04:00
Dianne Skoll
e82767f821 Guard definition of __EXTENSIONS__ so it happens only on Sun boxes. 2025-10-18 10:54:10 -04:00
Dianne Skoll
772daaa877 Don't pass "grep" the -a flag if it's not supported. 2025-10-14 14:02:06 -04:00
Dianne Skoll
941cb0f63e Make it compile on OpenIndiana. 2025-10-14 13:57:39 -04:00
Dianne Skoll
15960f7e4a Try to get it to compile on openindiana 2025-10-14 13:42:22 -04:00
Dianne Skoll
f05ef363fc Use built-in nonconst() function instead of contortions to get a nonconst value. 2025-10-13 11:05:58 -04:00
Dianne Skoll
a22b0b8daf Silence cppcheck warning. 2025-10-12 22:49:16 -04:00
Dianne Skoll
382ff47369 NL translation 2025-10-12 21:25:18 -04:00
Dianne Skoll
cab749b651 Look for sys/termios.h - needed for TIOCGWINSZ on some systtems. 2025-10-12 20:43:41 -04:00
Dianne Skoll
2dc5a7776d Use cp /dev/null instead of echo -n "" to truncate output file. 2025-10-12 14:13:32 -04:00
Dianne Skoll
2723875a18 Only check the trigger portion of a REM for expressions in purge mode, not body. 2025-10-12 13:38:47 -04:00
Dianne Skoll
81a186607b Add test for improved nonconst-expr tracking. 2025-10-12 11:25:55 -04:00
Dianne Skoll
5534bf8272 Don't set nonconst_expr on a reminder if the non-constant expression is only in the *BODY* of the reminder.
Only set it if it affects the trigger specification.
2025-10-12 11:22:13 -04:00
Dianne Skoll
f726b09fc6 Suppress some spurious debugging output when we use "-dt" with a TZ reminder. 2025-10-11 11:56:48 -04:00
Dianne Skoll
f07a6d1bed Add a warning_level guard. 2025-10-10 16:41:43 -04:00
Dianne Skoll
a0a362c418 Explicitly use en_US dictionary for spell-checking. 2025-10-09 18:35:17 -04:00
Dianne Skoll
0b45bc818b More spell-checking. 2025-10-09 18:31:30 -04:00
Dianne Skoll
b6ad32749b A tad more verbosity. 2025-10-09 18:24:24 -04:00
Dianne Skoll
ec36fc8cf8 Also spellcheck README.md. 2025-10-09 18:18:06 -04:00
Dianne Skoll
2afb71b233 If "hunspell" is installed, spell-check WHATSNEW and man pages. 2025-10-09 18:14:36 -04:00
Dianne Skoll
4bf9abc791 Fix spelling errors. 2025-10-09 18:14:30 -04:00
Dianne Skoll
51d895dbb1 If "spellintian" is installed, run it against the man pages. 2025-10-09 17:38:36 -04:00
Dianne Skoll
517251dd05 Document that tzconvert() attempts to validate time zone names. 2025-10-09 12:45:12 -04:00
Dianne Skoll
834741f91b Don't warn if timezone "" is specified. 2025-10-09 12:45:01 -04:00
Dianne Skoll
19b33bb9bc Make "tzconvert" warn about bad time zones. 2025-10-09 12:40:42 -04:00
38 changed files with 3167 additions and 772 deletions

View File

@@ -2,7 +2,7 @@
Remind is a full-featured calendar/alarm program. Copying policy is
in the file "COPYRIGHT" included with the source; Remind is licensed under
the GNU General Public License, Vesion 2.
the GNU General Public License, Version 2.
## Prerequisites:

113
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for remind 06.01.05.
# Generated by GNU Autoconf 2.72 for remind 06.02.01.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -601,8 +601,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='remind'
PACKAGE_TARNAME='remind'
PACKAGE_VERSION='06.01.05'
PACKAGE_STRING='remind 06.01.05'
PACKAGE_VERSION='06.02.01'
PACKAGE_STRING='remind 06.02.01'
PACKAGE_BUGREPORT=''
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
@@ -1258,7 +1258,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 06.01.05 to adapt to many kinds of systems.
'configure' configures remind 06.02.01 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1320,7 +1320,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of remind 06.01.05:";;
short | recursive ) echo "Configuration of remind 06.02.01:";;
esac
cat <<\_ACEOF
@@ -1408,7 +1408,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
remind configure 06.01.05
remind configure 06.02.01
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1871,7 +1871,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 06.01.05, which was
It was created by remind $as_me 06.02.01, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2477,6 +2477,7 @@ as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
as_fn_append ac_header_c_list " sys/termios.h sys_termios_h HAVE_SYS_TERMIOS_H"
as_fn_append ac_header_c_list " readline/readline.h readline_readline_h HAVE_READLINE_READLINE_H"
as_fn_append ac_header_c_list " readline/history.h readline_history_h HAVE_READLINE_HISTORY_H"
@@ -2659,6 +2660,12 @@ cat <<'EOF'
EOF
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers src/config.h"
@@ -4028,6 +4035,7 @@ fi
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -4217,31 +4225,74 @@ printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
U="`uname -s`"
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# LTO fails on Solaris for some reason
if test "$U" != "SunOS" -a "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
f=-flto=auto
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
printf %s "checking whether $CC supports $f... " >&6; }
if $CC -Werror -E $f - < /dev/null > /dev/null 2>&1 ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
CFLAGS="$CFLAGS $f"
f=-ffat-lto-objects
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $f" >&5
printf %s "checking whether $CC supports $f... " >&6; }
if $CC -Werror -E $f - < /dev/null > /dev/null 2>&1 ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
CFLAGS="$CFLAGS $f"
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -flto=auto"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto=auto" >&5
printf %s "checking whether $CC supports -flto=auto... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int x = 1;
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lto=yes
else case e in #(
e) lto=no
;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lto" >&5
printf "%s\n" "$lto" >&6; }
if test "x$lto" != "xyes" ; then
CFLAGS="$OLDCFLAGS"
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ffat-lto-object" >&5
printf %s "checking whether $CC supports -ffat-lto-object... " >&6; }
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -ffat-lto-objects"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int x = 1;
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lto=yes
else case e in #(
e) lto=no
;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lto" >&5
printf "%s\n" "$lto" >&6; }
if test "x$lto" != "xyes" ; then
CFLAGS="$OLDCFLAGS"
else
CFLAGS="$OLDCFLAGS -ffat-lto-objects"
fi
fi
fi
@@ -4848,7 +4899,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 06.01.05, which was
This file was extended by remind $as_me 06.02.01, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4913,7 +4964,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 06.01.05
remind config.status 06.02.01
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

View File

@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(remind, 06.01.05, , , https://dianne.skoll.ca/projects/remind/)
AC_INIT(remind, 06.02.01, , , https://dianne.skoll.ca/projects/remind/)
AC_CONFIG_SRCDIR([src/queue.c])
cat <<'EOF'
@@ -13,6 +13,7 @@ cat <<'EOF'
EOF
AC_LANG([C])
AC_CONFIG_HEADERS([src/config.h])
AC_ARG_ENABLE(perl-build-artifacts,
@@ -31,7 +32,7 @@ AC_PATH_PROG([PERL], [perl])
dnl Checks for libraries.
AC_CHECK_LIB(m, sqrt)
AC_CHECK_LIB(readline, readline)
AC_CHECK_HEADERS_ONCE([sys/time.h stdint.h readline/readline.h readline/history.h])
AC_CHECK_HEADERS_ONCE([sys/time.h sys/termios.h stdint.h readline/readline.h readline/history.h])
dnl Integer sizes
AC_CHECK_SIZEOF(unsigned int)
@@ -43,25 +44,42 @@ AC_CHECK_HEADERS(strings.h sys/types.h glob.h wctype.h locale.h langinfo.h sys/i
dnl Checks for typedefs, structures, and compiler characteristics.
AC_STRUCT_TM
U="`uname -s`"
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# LTO fails on Solaris for some reason
if test "$U" != "SunOS" -a "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
f=-flto=auto
AC_MSG_CHECKING([whether $CC supports $f])
if $CC -Werror -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])
if $CC -Werror -E $f - < /dev/null > /dev/null 2>&1 ; then
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS $f"
else
AC_MSG_RESULT([no])
fi
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -flto=auto"
AC_MSG_CHECKING([whether $CC supports -flto=auto])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[int x = 1;]],
[[]])],
[lto=yes],
[lto=no]
)
AC_MSG_RESULT([$lto])
if test "x$lto" != "xyes" ; then
CFLAGS="$OLDCFLAGS"
else
AC_MSG_RESULT([no])
AC_MSG_CHECKING([whether $CC supports -ffat-lto-object])
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -ffat-lto-objects"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[int x = 1;]],
[[]])],
[lto=yes],
[lto=no]
)
AC_MSG_RESULT([$lto])
if test "x$lto" != "xyes" ; then
CFLAGS="$OLDCFLAGS"
else
CFLAGS="$OLDCFLAGS -ffat-lto-objects"
fi
fi
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# Save variables and functions that we will mess with
PUSH-VARS InIsrael IncludeIsraeliHolidays Reform IncludeOmer IncludeOmerCal SunCal
PUSH-FUNCS _chan _h2 _h2I _YZ _PastSat _BackTwoSat
PUSH-VARS InIsrael IncludeIsraeliHolidays Reform IncludeOmer IncludeOmerCal SunCal ostart yz
PUSH-FUNCS _h2 _h2I _YZ _PastSat _BackTwoSat
SET InIsrael value("InIsrael", 0)
SET IncludeIsraeliHolidays value("IncludeIsraeliHolidays", 1)

View File

@@ -1,5 +1,4 @@
.TH REM 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
.UC 4
.TH REM 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
.SH NAME
rem \- Invoke Remind with a default filename
.SH SYNOPSIS

View File

@@ -1,5 +1,4 @@
.TH REM2PS 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
.UC 4
.TH REM2PS 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
.SH NAME
rem2ps \- draw a PostScript calendar from Remind output
.SH SYNOPSIS

View File

@@ -1,5 +1,4 @@
.TH REMIND 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
.UC 4
.TH REMIND 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
.SH NAME
remind \- a sophisticated reminder service
.SH SYNOPSIS
@@ -103,6 +102,12 @@ flag also enables the use of the UNICODE "left-to-right" mark that
can fix up formatting problems with right-to-left languages in the calendar
display.
.TP
.B 'z'
causes \fBRemind\fR to use escape sequences to turn reminders with a
"URL" info string into hyperlinks. In order to work, your terminal
must support the escape sequences documented at
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
.TP
.B 'c'
causes \fBRemind\fR to use VT100 escape sequences to approximate
SPECIAL COLOR reminders. Note that this flag is kept for
@@ -514,7 +519,7 @@ your reminders will be triggered in the future. Similarly, you can
supply a \fItime\fR to set \fBRemind\fR's notion of "now" to a
particular time. Supplying a \fItime\fR on the command line also
implicitly enables the \fB\-q\fR option and disables the \fB\-z\fR
option. The \fItime\fR may be specified in 24-hour format (eg, 13:20)
option. The \fItime\fR may be specified in 24-hour format (e.g., 13:20)
or common "AM/PM" format (1:20pm).
.PP
If you would rather specify the date more succinctly, you can supply
@@ -1359,7 +1364,7 @@ background, and activates timed reminders when the system time reached
the specified time. Note that if you use the \fBNOQUEUE\fR modifier
in the \fBREM\fR command, then this queuing and background activation
is \fInot\fR performed. \fBNOQUEUE\fR is useful if you want a time
to be associated with a reminder (eg, in the calendar) but are not
to be associated with a reminder (e.g., in the calendar) but are not
interested in a popup reminder happening at the specified time.
.PP
@@ -1486,6 +1491,15 @@ and description of a reminder like this:
MSG Engineering meeting
.fi
.PP
While back-ends can choose which INFO strings to support, all back-ends
should endeavor to support three standard ones: \fBLocation:\fR,
\fBDescription:\fR and \fBUrl:\fR. TkRemind supports all three of these,
turning reminders with a \fBUrl:\fR INFO string into hyper-links, and
popping up information windows for the \fBLocation:\fR and \fBDescription:\fR
INFO strings. \fBLocation:\fR and \fBUrl:\fR are self-explanatory;
\fBDescription:\fR is meant for a longer, more in-depth description
of the reminder than the summary that is normally displayed.
.PP
The \fBDURATION\fR keyword makes sense only for timed reminders; it
specifies the duration of an event. For example, if you have a
90-minute meeting starting at 1:00pm, you could use any of the following:
@@ -1789,7 +1803,7 @@ or \fB\-ppp\fR option.
use \fBrem2pdf\fR instead.
.TP
.B o
The "simple calendar" formats (ie, \fBremind\fR's \fB\-s\fR, \fB\-n\fR and
The "simple calendar" formats (i.e., \fBremind\fR's \fB\-s\fR, \fB\-n\fR and
\fB\-p\fR options) convert newlines to spaces.
.PP
All calendar back-ends collapse multiple spaces to a single space and
@@ -2046,7 +2060,7 @@ for the month of August and need to water plants every Wednesday:
.PP
Running that command on 13 Aug yields: "Plants 7 days ago." because you
have not told \fBRemind\fR that you completed the first watering. If you finish
your duties and add a COMMPLETE-THROUGH date of 2025-08-27, then \fBRemind\fR
your duties and add a COMPLETE-THROUGH date of 2025-08-27, then \fBRemind\fR
never reminds you of that task in the future.
.PP
In Purge Mode, \fBRemind\fR will not purge TODOs unless they have been marked
@@ -2133,7 +2147,7 @@ For example, the following sequences are equivalent:
.fi
.PP
Note that \fBRemind\fR has a compiled-in limit to the number of full
OMITs. If you omit a range of \fIN\fR fully-specified (ie, year
OMITs. If you omit a range of \fIN\fR fully-specified (i.e., year
included) days, then \fIN\fR full OMITs are used up. Trying to omit a
very large range may result in the error "Too many full OMITs"
.PP
@@ -3431,7 +3445,7 @@ problems. See also the section "MACHINES WITH A 32-BIT TIME_T TYPE"
.B $TodoFilter (read-only)
If 0, then both events and TODOs are being output. If 1, then the
\fB\-\-only-todos\fR command-line option was supplied. If 2, then
the \fB\-\-only-events\fR command-line option was spplied.
the \fB\-\-only-events\fR command-line option was supplied.
.TP
.B $UntimedFirst (read-only)
Set to 1 if the \fB\-g\fR option is used with a fourth sort character
@@ -4736,7 +4750,7 @@ to use \fBsoleq()\fR.
Returns a string representing where Remind's standard output is going.
The return values are one of the following: "TTY" if standard-output
is a terminal, "BLOCKDEV" if it is a block device (very unlikely),
"CHARDEV" if it is a character device (eg, /dev/null), "DIR" if it
"CHARDEV" if it is a character device (e.g., /dev/null), "DIR" if it
is a directory (very unlikely), "PIPE" if it is a pipe or FIFO,
"SYMLINK" if it is a symlink (very unlikely), "SOCKET" if it is a
socket, or "UNKNOWN" if it could not be determined.
@@ -5085,6 +5099,7 @@ If \fBdstzone\fR is omitted or is the empty string, the default system
time zone is used as the destination zone. The return value is a
DATETIME. Time zone names are system-dependent; consult your
operating system for legal values. Here is an example:
.RS
.PP
.nf
tzconvert('2007-07-08@01:14', "Canada/Eastern", "Canada/Pacific")
@@ -5094,6 +5109,12 @@ operating system for legal values. Here is an example:
2007-07-07@22:14
.fi
.PP
If your system includes the directory /usr/share/zoneinfo, \fBRemind\fR
will warn you if you use an invalid time zone name for \fBsrczone\fR or
\fBdstzone\fR. To suppress these warnings, add a "!" to the beginning
of the time zone name.
.RE
.PP
.TP
.B upper(s_string)
Returns a \fBSTRING\fR with all lower-case characters in \fIstring\fR
@@ -5307,8 +5328,7 @@ expressions are evaluated only once, not recursively. Thus, writing:
.fi
.PP
causes \fBRemind\fR to read the token "[a+b]". It does not interpret
this as a pasted-in expression. In fact, the only way to get a literal
left-bracket into a reminder is to use ["["].
this as a pasted-in expression.
.PP
You can use expression pasting almost anywhere. However, there are a few
exceptions:
@@ -5595,8 +5615,6 @@ following example:
# FSET -f(x) 2*x
.fi
.PP
to define a function and suppress any "redefined function" warning.
.PP
.SH SAVING AND RESTORING FUNCTIONS
.PP
Occasionally, it is useful to redefine a function for a specific block of
@@ -6453,7 +6471,7 @@ the trigger. For example:
REM 1992-01-01 MSG This will be purged after Jan 1 1992
REM [nonconst('1992-01-01')] MSG This will never be purged
REM Wed UNTIL 1993-12-31 MSG THis will be purged after 1993
REM Wed UNTIL 1993-12-31 MSG This will be purged after 1993
REM Wed UNTIL [nonconst('1993-12-31')] MSG Never purged
.fi
.PP

View File

@@ -1,5 +1,4 @@
.TH TKREMIND 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
.UC 4
.TH TKREMIND 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
.SH NAME
tkremind \- graphical front-end to Remind calendar program
.SH SYNOPSIS
@@ -54,29 +53,47 @@ directory before starting \fBTkRemind\fR.
When you start \fBTkRemind\fR, it displays a calendar for the current
month, with today's date highlighted. Reminders are filled into each
box on the calendar. If a box contains many reminders, you can scroll
it up and down by dragging mouse button 2 in the box. Note that there
is no specific indication of an over-full box; you'll just have to
notice that the box appears completely full.
it up and down by dragging mouse button 2 in the box or by using the
scroll wheel (if your mouse has one.) Note that there is no specific
indication of an over-full box; you'll just have to notice that the
box appears completely full.
.SH NAVIGATING
To change to the previous or next month, click the \fB<\-\fR
or \fB\->\fR button, respectively. You can also use the left/right arrow
keys or PageUp/PageDown to navigate.
keys or \fBPgUp\fR/\fBPgDn\fR to navigate.
To change back to the current month, click \fBToday\fR or press the
Home key. To go to a specific month, click \fBGo To Date...\fR. This
pops up a dialog box which allows you to select a month and enter a
year. Once you've done this, click \fBGo\fR to go to the date, or
\fBCancel\fR to cancel.
\fBHome\fR key. To go to a specific month, click \fBGo To Date...\fR
or press \fBg\fR. This pops up a dialog box which allows you to
select a month and enter a year. Once you've done this, click
\fBGo\fR to go to the date, or \fBCancel\fR to cancel. Note also that
all pop-up windows in \fBTkRemind\fR can be dismissed by pressing
\fBEsc\fR or \fBControl-w\fR.
To exit \fBTkRemind\fR, click \fBQuit\fR.
To exit \fBTkRemind\fR, click \fBQuit\fR or press \fBControl-q\fR..
.SH CHANGING THE VIEW
By default, \fBTkRemind\fR shows the calendar for an entire month.
The \fBView...\fR menu lets you pick from the following choices: Display
an entire month, or display one, two or four weeks' worth of reminders.
If you change the view, \fBTkRemind\fR remembers the change and that
view becomes the default view next time you start \fBTkRemind\fR
In the monthly view, the Next and Previous navigation buttons and keyboard
shortcuts move by one month. In all other views, they move by one week.
This is true even for views that display multiple weeks.
You can press the keys \fB1\fR, \fB2\fR, \fB4\fR or \fBm\fR over the
main calendar window to change the view to one week, two weeks, four weeks
or one month, respectively.
.SH ADDING REMINDERS
To add a reminder, click button 1 in any day number in the calendar.
The \fBAdd Reminder...\fR dialog will pop up, with values preselected for
the day you clicked.
The dialog has six basic groups of controls. The first three lines
The dialog has seven basic groups of controls. The first three lines
select one of three types of reminders. Choose the type of reminder
with the radio buttons, and choose the values of the days, months, and
years by selecting values from pull-down menus. The pull-down menus
@@ -127,23 +144,37 @@ reminder you entered using the \fBAdd Reminder...\fR dialog. You can
edit the reminder, thereby gaining access to advanced features of
\fBRemind\fR. You can also use it simply to play around and discover
\fBRemind\fR's idioms for expressing different types of reminders.
.PP
\fBNOTE\fR: If you hand-edit a reminder, then that reminder will
\fInot\fR be editable in TkRemind's graphical reminder dialog any more.
You will have to hand-edit it to change it.
.SH SEEING A SINGLE DAY'S REMINDERS
Right-click on any day number in the calendar to pop up a window with
that day's reminders in Agenda Mode. You can left- or right-click the
current date and time indicator at the bottom of the window to see today's
reminders in Agenda Mode.
current date and time indicator at the bottom of the calendar window
to see today's reminders in Agenda Mode. You can also press \fBt\fR
over the main calendar window to see today's reminders in Agenda Mode.
In the Agenda Mode display, hovering over a reminder will show ancillary
information such as a Location, URL or Description. Clicking on a reminder
will open an editor on the REM command that created the reminder.
will open an editor on the REM command that created the reminder. You can
also navigate in the Agenda Mode window one day at a time using the
forward and back arrow buttons or left/right arrow keys or \fBPgUp\fR/\fBPgDn\fR.
You can get back to today by clicking \fBToday\fR or pressing the
\fBHome\fR key.
You can dismiss the Agenda Mode window by clicking \fBOK\fR or pressing
the \fBEsc\fR key.
.SH PRINTING
To print the current month's calendar, click \fBPrint...\fR on the
main calendar window. This brings up the print dialog. Printing
either produces a PostScript file or sends PostScript to a UNIX command.
(If you have \fBrem2pdf\fR installed, you can choose to produce
PDF output rather than PostScript.)
main calendar window or press \fBp\fR or \fBControl-p\fR. This brings
up the print dialog. Printing either produces a PostScript or PDF
file, or sends PostScript or PDF to a UNIX command.
Note that you must have \fBrem2pdf\fR installed in order to be
able to print.
Select the print destination by choosing either \fBTo file:\fR or
\fBTo command:\fR in the print dialog. Press \fBBrowse...\fR to bring
@@ -160,7 +191,7 @@ the directory.
Select the appropriate paper size and orientation. Activate
\fBFill page\fR if you want the calendar to fill the page. This should
be the normal case unless you have many reminders in a particular
day. (See the \fBRem2PS\fR or \fBrem2pdf\fR documentation.)
day. (See the \fBrem2pdf\fR documentation.)
Finally, click \fBPrint\fR to print or \fBCancel\fR to cancel. Note
that during printing, \fBRemind\fR is called with the
@@ -168,6 +199,12 @@ that during printing, \fBRemind\fR is called with the
option. If you are producing PDF output, then the option \fB-itkpdf=1\fR
is also supplied to \fBRemind\fR.
If you click on \fBShow Command\fR rather than \fBPrint\fR, then
\fBTkRemind\fR won't actually print anything. Instead, it will pop
up a text window with the command that it \fIwould have used\fR to print
the calendar. You can adjust the command as needed and then click \fBRun\fR
to run the modified command. This lets you specify \fBrem2pdf\fR options
that are not directly supported by \fBTkRemind\fR.
.SH EDITING REMINDERS
@@ -181,13 +218,11 @@ reminder entirely by selecting \fBDelete reminder\fR. The remaining
buttons, \fBPreview reminder\fR and \fBCancel\fR operate identically
to the dialog in "ADDING REMINDERS."
Note that if you edit a reminder (using \fBPreview reminder\fR),
any edits you made are \fInot\fR retained in the dialog box. You
should not attempt to edit such reminders; you have to retype them
in the \fBPreview reminder\fR dialog.
If the reminder was not created with \fBTkRemind\fR, you can't edit
it with \fBTkRemind\fR.
Note that if you have hand-edited a reminder (using \fBPreview
reminder\fR), or if the reminder was hand-created in the first place,
then clicking on it will \fInot\fR pop up the TkRemind
reminder-editing dialog. Instead, TkRemind will start up a text
editor (if you have configured one) so you can hand-edit the reminder.
.SH USING A TEXT EDITOR
@@ -230,7 +265,8 @@ option of "turning off" the reminder for the rest of the day.
.SH OPTIONS
The final button on the calendar window, \fBOptions\fR, lets you configure
certain aspects of \fBTkRemind\fR. The configuration options are:
certain aspects of \fBTkRemind\fR. You can also pop up the options
window by pressing \fBo\fR. The configuration options are:
.TP
.B Start up Iconified
@@ -323,22 +359,6 @@ press \fBApply Options\fR to put them into effect, \fBSave Options\fR
to put them into effect and save them in $HOME/.config/tkremindrc, or
\fBCancel\fR to cancel any changes you made.
.SH KEYBOARD SHORTCUTS
\fBTkRemind\fR's main window includes the following keyboard shortcuts:
.TP
.B Ctrl-Q
Quit
.TP
.B Left Arrow
Previous Month
.TP
.B Right Arrow
Next Month
.TP
.B Home
Today
.SH IMMEDIATE UPDATES
If you are running \fBTkRemind\fR on Linux and \fBRemind\fR has been
@@ -553,5 +573,5 @@ $HOME/.config/tkremindrc -- \fBTkRemind\fR saved options.
.SH HOME PAGE
https://dianne.skoll.ca/projects/remind/
.SH SEE ALSO
\fBremind\fR, \fBrem2ps\fR, \fBrem2pdf\fR, \fBrem2html\fR
\fBremind\fR, \fBrem2pdf\fR, \fBrem2html\fR

View File

@@ -5,7 +5,7 @@ use ExtUtils::MakeMaker;
sub manifypods {
my ($self,%attribs) = @_;
my $result = $self->SUPER::manifypods(%attribs);
$result =~ s/^(POD2MAN_EXE\s*=\s*)(.+)$/$1$2 --center 'VERSION @VERSION@' --date '@RELEASE_DATE@'/m;
$result =~ s/^(POD2MAN_EXE\s*=\s*)(.+)$/$1$2 --center 'VERSION @VERSION@' --date '@RELEASE_DATE@' --release Remind/m;
return $result;
}
}

View File

@@ -48,9 +48,10 @@ my $settings = {
entry_font => 'Sans',
small_cal_font => 'Sans',
title_url => '',
title_size => 14,
header_size => 12,
daynum_size => 14,
daynum_size => -1,
entry_size => 8,
border_size => 4,
@@ -65,6 +66,12 @@ my $settings = {
eps => 0,
verbose => 0,
line_color => '000000',
title_color => '000000',
header_color => '000000',
daynum_color => '000000',
smallcal_color => '000000',
bg_color => '',
weeks_per_page => 1,
};
@@ -110,6 +117,13 @@ Options:
--margin-bottom=S Specify bottom margin size in 1/72nds of an inch
--margin-left=S Specify left margin size in 1/72nds of an inch
--margin-right=S Specify right margin size in 1/72nds of an inch
--line-color=RRGGBB Set line color
--title-color=RRGGBB Set title color
--header-color=RRGGBB Set header color
--daynum-color=RRGGBB Set day number color
--smallcal-color=RRGGBB Set small calendar color
--bg-color=RRGGBB Set background color
--title-url=URL Link calendar title to URL
--verbose, -v Print progress messages
--help Display this help
EOF
@@ -130,6 +144,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
'wrap|y' => \$settings->{wrap_calendar},
'height|h=i' => \$settings->{height},
'title-font=s' => \$settings->{title_font},
'title-url=s' => \$settings->{title_url},
'header-font=s' => \$settings->{header_font},
'daynum-font=s' => \$settings->{daynum_font},
'entry-font=s' => \$settings->{entry_font},
@@ -145,6 +160,12 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
'margin-left=f' => \$settings->{margin_left},
'margin-right=f' => \$settings->{margin_right},
'verbose|v' => \$settings->{verbose},
'line-color=s' => \$settings->{line_color},
'bg-color=s' => \$settings->{bg_color},
'title-color=s' => \$settings->{title_color},
'header-color=s' => \$settings->{header_color},
'daynum-color=s' => \$settings->{daynum_color},
'smallcal-color=s' => \$settings->{smallcal_color},
'help' => \$help
);
if (!$ret) {
@@ -157,6 +178,28 @@ if ($help) {
exit(0);
}
my $bad = 0;
foreach my $setting (qw(bg_color line_color title_color header_color daynum_color smallcal_color)) {
my $c = $settings->{$setting};
if ($setting eq 'bg_color' && $c eq '') {
$settings->{bg_color} = [-1, -1, -1];
next;
}
my $color = Remind::PDF->get_rgb($c);
if (!defined($color)) {
my $s = $setting;
$s =~ s/_/-/g;
print STDERR "Invalid color value `$c' for option --$s\n";
$bad = 1;
} else {
$settings->{$setting} = $color;
}
}
if ($bad) {
exit(1);
}
if ($settings->{weeks_per_page} < 1) {
$settings->{weeks_per_page} = 1;}
elsif ($settings->{weeks_per_page} > 4) {
@@ -208,7 +251,8 @@ if ($settings->{eps}) {
# Don't read from a terminal
if (-t STDIN) { ## no critic
print STDERR "I can't read data from a terminal. Please run like this:\n";
print STDERR " remind -pp [options] filename | $me [options] > out.pdf\n";
print STDERR " remind -pp [options] filename | $me [options] > out.pdf\n\n";
print STDERR "For help, run: $me --help\n";
exit(1);
}
@@ -441,7 +485,7 @@ The default media size will be marked with an asterisk.
=item --width=I<n>, -wI<n>, --height=I<m>, -hI<m>
Rather than specifying a named media size, directly specify the width
and height of the output in 1/72ths of an inch. You must specify both
and height of the output in 1/72ndths of an inch. You must specify both
width and height for the options to be respected.
=item --title-font=I<font>
@@ -471,28 +515,30 @@ calendars. The default is Sans.
=item --title-size=I<n>
Specify the size of the title font in 1/72ths of an inch. The default
Specify the size of the title font in 1/72ndths of an inch. The default
is 14. This size, and indeed all following sizes, may be specified as
floating-point numbers.
=item --header-size=I<n>
Specify the size of the header font in 1/72ths of an inch. The default is 14.
Specify the size of the header font in 1/72ndths of an inch. The default is 14.
=item --daynum-size=I<n>
Specify the size of the day number font in 1/72ths of an inch. The
default is 14.
Specify the size of the day number font in 1/72ndths of an inch. The
default is 14 for monthly calendars or 10 for weekly calendars. (Weekly
calendars don't have day numbers in the calendar boxes, but this setting
is used to scale the size of moon phase indicators.)
=item --entry-size=I<n>
Specify the size of the calendar entry font in 1/72ths of an inch.
Specify the size of the calendar entry font in 1/72ndths of an inch.
The default is 8.
=item --border-size=I<n>
Specify the size of the blank border between the contents of a calendar
box and the centre of the lines surrounding it, in 1/72ths of an inch.
box and the centre of the lines surrounding it, in 1/72ndths of an inch.
The default is 4.
=item --line-thickness=I<n>
@@ -501,24 +547,61 @@ Specify the thickness of the lines drawn on the calendar. The default is 1.
=item --margin-top=I<n>
The size of the margin at the top of the page in 1/72ths of an inch.
The size of the margin at the top of the page in 1/72ndths of an inch.
The default is 36.
=item --margin-bottom=I<n>
The size of the margin at the bottom of the page in 1/72ths of an inch.
The size of the margin at the bottom of the page in 1/72ndths of an inch.
The default is 36.
=item --margin-left=I<n>
The size of the margin at the left of the page in 1/72ths of an inch.
The size of the margin at the left of the page in 1/72ndths of an inch.
The default is 36.
=item --margin-right=I<n>
The size of the margin at the right of the page in 1/72ths of an inch.
The size of the margin at the right of the page in 1/72ndths of an inch.
The default is 36.
=item --line-color=RGB
The color of the calendar grid lines. For this option and all
following color options, the color may be specified as either 3 or 6
hex digits, specifying the R, G and B components respectively. For
example, FFFFFF is white, FF0000 is a saturated red, and so on. If
you supply 3 hex digits, then they are effectively doubled, so that
(for example) 5AF is expanded to 55AAFF.
=item --title-color=RGB
The color of the calendar title at the top of the page.
=item --header-color=RGB
The color of the weekday names in the header row.
=item --daynum-color=RGB
The color of the day numbers (and the moon phases, if any.)
=item --smallcal-color=RGB
The color of the small monthly calendars, if any.
=item --bg-color=RGB
The color of the page background.
Note that all colors default to black (000) except for the
page background, which defaults to no color at all (ie, transparent).
=item --title-url=URL
Make the calendar title a link to URL. Note that no syntax checking is
done on the URL; it's up to you to make sure it is valid.
=item --wrap, -y
Modify the calendar so that if it would normally require 6 rows to print,
@@ -541,7 +624,7 @@ is rendered.
=head1 USAGE
To use B<rem2df>, pipe the output of B<remind> with one of the
To use B<rem2pdf>, pipe the output of B<remind> with one of the
B<-p>, B<-pp> or B<-ppp> options into B<rem2pdf>. The PDF output
will be sent to standard output. So for example, to print a 12-month
calendar for the year 2030, use:
@@ -602,7 +685,10 @@ of the right side of the calendar box.
A positive I<y> value positions the top edge of the text I<y> points
below the top of the calendar box, while a negative I<y> value
positions the bottom edge of the text I<y> points above the bottom of
the calendar box.
the calendar box. Note that the coordinates are relative to the center
of the lines that delineate the boxes; you should use an I<x> value
whose absolute value is at least 2 and a I<y> value whose absolute
value is at least 4 to avoid colliding with the lines.
If you use absolutely-positioned text, it's up to you to make sure it
doesn't overlap other text; B<rem2pdf> takes no special precautions to
@@ -611,7 +697,7 @@ prevent this.
As an example, this places Sunrise and Sunset times at the bottom left
of each calendar box:
REM SPECIAL PANGO @1,-1 <span size="4800"><i>Rise [sunrise($U)] Set [sunset($U)]</i></span>
REM SPECIAL PANGO @2,-4 <span size="4800"><i>Rise [sunrise($U)] Set [sunset($U)]</i></span>
(Note that Pango expresses font sizes in 1024's of a point, so a size of
4800 works out to about 4.6 points.)

View File

@@ -468,6 +468,9 @@ sub render
{
my ($self, $cr, $settings, $index, $total) = @_;
if ($settings->{daynum_size} < 0) {
$settings->{daynum_size} = 14;
}
if ($settings->{svg} || $settings->{eps}) {
if ($index > 1) {
if ($index == 2) {
@@ -476,6 +479,14 @@ sub render
return;
}
}
my ($r, $g, $b) = @{$settings->{bg_color}};
if ($r >= 0 && $g >= 0 && $b >= 0) {
$cr->save;
$self->set_cr_color($cr, $settings->{bg_color});
$cr->rectangle(0, 0, $settings->{width}, $settings->{height});
$cr->fill();
$cr->restore;
}
$self->setup_daymap($settings);
$self->{horiz_lines} = [];
$cr->set_line_cap('square');
@@ -521,6 +532,10 @@ sub render
print STDERR "WARNING: overfull calendar box\n";
}
# The vertical lines
# Set the color
$cr->save;
$self->set_cr_color($cr, $settings->{line_color});
my $cell = ($settings->{width} - $settings->{margin_left} - $settings->{margin_right}) / 7;
for (my $i=0; $i<=7; $i++) {
$cr->move_to($settings->{margin_left} + $i * $cell, $top_line);
@@ -535,6 +550,7 @@ sub render
$cr->stroke();
}
$cr->restore;
if ($settings->{verbose}) {
print STDERR "rem2pdf: Rendered " . $self->{monthname} . ' ' . $self->{year} . "\n";
}
@@ -542,6 +558,18 @@ sub render
$cr->show_page();
}
sub set_cr_color {
my ($self, $cr, $color_array) = @_;
my ($r, $g, $b) = @$color_array;
if ($r < 0 || $g < 0 || $b < 0 ||
$r > 255 || $g > 255 || $b > 255) {
return;
}
$cr->set_source_rgb($r / 255,
$g / 255,
$b / 255);
}
=head2 draw_row($cr, $settings, $so_far, $row, $start_day, $start_col)
Draw a single row in the calendar. C<$cr> is a Cairo drawing context
@@ -603,7 +631,7 @@ sub col_box_coordinates
$settings->{margin_left} + $cell * $col,
$so_far,
$settings->{margin_left} + $cell * ($col + 1),
$so_far + $height + $settings->{border_size},
$so_far + $height + 2* $settings->{border_size},
);
}
@@ -655,6 +683,7 @@ sub draw_day
# Don't actually draw if we're just previewing to get the cell height
if ($height) {
$cr->save;
$self->set_cr_color($cr, $settings->{daynum_color});
if ($settings->{numbers_on_left}) {
$cr->move_to($x1 + $settings->{border_size}, $so_far + $settings->{border_size});
} else {
@@ -664,7 +693,7 @@ sub draw_day
$cr->restore();
}
$so_far += $h + 2 * $settings->{border_size};
$so_far += $h + $settings->{border_size};
my $entry_height = 0;
my $done = 0;
foreach my $entry (@{$self->{entries}->[$day]}) {
@@ -740,6 +769,7 @@ sub draw_daynames
my ($wid, $h) = $layout->get_pixel_size();
$cr->save;
$self->set_cr_color($cr, $settings->{header_color});
$cr->move_to($settings->{margin_left} + $i * $cell + $cell/2 - $wid/2, $so_far);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -765,6 +795,8 @@ sub draw_title
my ($self, $cr, $settings) = @_;
my $title = $self->{monthname} . ' ' . $self->{year};
my $url = $settings->{title_url} // '';
# set_page_label not available in older versions of Cairo
eval { $cr->get_target()->set_page_label($title); };
my $layout = Pango::Cairo::create_layout($cr);
@@ -775,12 +807,44 @@ sub draw_title
my ($w, $h) = $layout->get_pixel_size();
$cr->save();
$self->set_cr_color($cr, $settings->{title_color});
$cr->move_to($settings->{width}/2 - $w/2, $settings->{margin_top});
if ($url ne '') {
$cr->tag_begin(Cairo::TAG_LINK, "uri='$url'");
}
Pango::Cairo::show_layout($cr, $layout);
if ($url ne '') {
$cr->tag_end(Cairo::TAG_LINK);
}
$cr->restore();
return $h + $settings->{margin_top} + $settings->{border_size};
}
=head2 get_rgb($color)
Parses a 3- or 6-hex-digit color value and returns [red, green, blue]. If
color could not be parsed, returns undef
=cut
sub get_rgb
{
my ($self, $color) = @_;
my ($r, $g, $b);
if ($color =~ /^([0-9a-f])([0-9a-f])([0-9a-f])$/i) {
$r = hex($1);
$g = hex($2);
$b = hex($3);
$r = $r * 16 + $r;
$g = $g * 16 + $g;
$b = $b * 16 + $b;
return [$r, $g, $b];
} elsif ($color =~ /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) {
return [hex($1), hex($2), hex($3)];
}
return undef;
}
=head2 draw_small_calendar($cr, $x, $y, $width, $height, $settings, $month, $days, $start_wkday)
Draw a small calendar on the Cairo context C<$cr>. The top left-hand
@@ -828,6 +892,7 @@ sub draw_small_calendar
$layout->set_text(Encode::decode('UTF-8', $month));
my ($mw, $mh) = $layout->get_pixel_size();
$cr->save();
$self->set_cr_color($cr, $settings->{smallcal_color});
$cr->move_to($x + $width/2 - $mw/2, $y);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -849,6 +914,7 @@ sub draw_small_calendar
$layout->set_font_description($desc);
$layout->set_text($l);
$cr->save();
$self->set_cr_color($cr, $settings->{smallcal_color});
$cr->move_to($x + $col*$wid, $y);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -866,6 +932,7 @@ sub draw_small_calendar
}
$layout->set_text($dt);
$cr->save();
$self->set_cr_color($cr, $settings->{smallcal_color});
$cr->move_to($x + $col*$wid, $y);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -1047,6 +1114,9 @@ Remind::PDF::Weekly - render a weekly calendar
sub render
{
my ($self, $cr, $settings, $index, $total) = @_;
if ($settings->{daynum_size} < 0) {
$settings->{daynum_size} = 10;
}
if ($settings->{svg} || $settings->{eps}) {
if ($index > $settings->{weeks_per_page}) {
if ($index == $settings->{weeks_per_page}+1) {
@@ -1055,8 +1125,18 @@ sub render
return;
}
}
if ((($index-1) % $settings->{weeks_per_page}) == 0) {
my ($r, $g, $b) = @{$settings->{bg_color}};
if ($r >= 0 && $g >= 0 && $b >= 0) {
$cr->save;
$self->set_cr_color($cr, $settings->{bg_color});
$cr->rectangle(0, 0, $settings->{width}, $settings->{height});
$cr->fill();
$cr->restore;
}
}
$settings->{numbers_on_left} = 1;
$settings->{numbers_on_left} = 0;
# Set up bounding box
if ($settings->{weeks_per_page} == 1) {
$self->{bounding_box} = [
@@ -1065,22 +1145,16 @@ sub render
$settings->{width} - $settings->{margin_right},
$settings->{height} - $settings->{margin_bottom}]
} else {
my $gap = $settings->{margin_top} * 0.5;
my $total_height = $settings->{height} - $settings->{margin_top} - $settings->{margin_bottom};
my $week_height = $total_height / $settings->{weeks_per_page};
my $top_offset = (($index-1) % $settings->{weeks_per_page}) * $week_height;
my $week_height = ($total_height - $gap * ($settings->{weeks_per_page}-1)) / $settings->{weeks_per_page};
my $top_offset = ((($index-1) % $settings->{weeks_per_page}) * $week_height) + (($index-1) % $settings->{weeks_per_page}) * $gap;
my $bot_offset = $top_offset + $week_height;
$self->{bounding_box} =
$self->{bounding_box} = [
$settings->{margin_left},
$settings->{margin_top} + $top_offset,
$settings->{width} - $settings->{margin_right},
$settings->{margin_top} + $bot_offset];
if ($index != 1) {
$self->{bounding_box}[1] += 0.25 * $settings->{margin_top};
}
if ($index != $settings->{weeks_per_page}) {
$self->{bounding_box}[3] -= 0.25 * $settings->{margin_top};
}
$self->{bounding_box} = [
$settings->{margin_left},
$settings->{margin_top} + $top_offset,
$settings->{width} - $settings->{margin_right},
$settings->{margin_top} + $bot_offset];
}
$self->draw_headings($cr, $settings);
for (my $i=0; $i<7; $i++) {
@@ -1117,6 +1191,7 @@ sub draw_headings
my ($wid, $h) = $layout->get_pixel_size();
$cr->save;
$self->set_cr_color($cr, $settings->{header_color});
$cr->move_to($settings->{margin_left} + $i * $cell + $cell/2 - $wid/2, $self->{bounding_box}[1]);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -1132,6 +1207,7 @@ sub draw_headings
my ($wid2, $h2) = $layout->get_pixel_size();
$cr->save;
$self->set_cr_color($cr, $settings->{header_color});
$cr->move_to($settings->{margin_left} + $i * $cell + $cell/2 - $wid2/2, $self->{bounding_box}[1] + $h);
Pango::Cairo::show_layout($cr, $layout);
$cr->restore();
@@ -1186,7 +1262,13 @@ sub draw_entries
$layout->set_font_description($desc);
my ($wid, $h) = $layout->get_pixel_size();
my $so_far = $box->[1] + $h + $settings->{border_size};
my $so_far = $box->[1] + $settings->{border_size};
foreach my $entry (@{$self->{entries}->[$i]}) {
if ($entry->isa('Remind::PDF::Entry::moon')) {
$so_far = $box->[1] + $h + $settings->{border_size};
last;
}
}
my $box_height = $box->[3] - $box->[1];
my $done = 0;
@@ -1232,6 +1314,8 @@ sub draw_lines
{
my ($self, $cr, $settings) = @_;
$cr->save;
$self->set_cr_color($cr, $settings->{line_color});
# Top horizonal line
$cr->move_to($self->{bounding_box}[0], $self->{bounding_box}[1]);
$cr->line_to($self->{bounding_box}[2], $self->{bounding_box}[1]);
@@ -1255,6 +1339,7 @@ sub draw_lines
$cr->line_to($x, $self->{bounding_box}[3]);
$cr->stroke();
}
$cr->restore;
}
sub create_from_hash

View File

@@ -151,7 +151,8 @@ sub render
my ($wid, $h) = $layout->get_pixel_size();
$cr->save();
$cr->move_to($x2 - $settings->{border_size}/4 - $wid, $y2 - $settings->{border_size}/4 - $h);
Remind::PDF->set_cr_color($cr, $settings->{daynum_color});
$cr->move_to($x2 - $settings->{border_size}/2 - $wid, $y2 - $h);
my $url;
if ($self->{info} && $self->{info}->{url}) {
$url = $self->{info}->{url};
@@ -234,12 +235,13 @@ sub render
if ($url) {
$cr->tag_begin(Cairo::TAG_LINK, "uri='$url'");
}
$self->draw_moon($xc, $yc, $cr);
$self->draw_moon($xc, $yc, $cr, $settings);
if ($url) {
$cr->tag_end(Cairo::TAG_LINK);
}
if ($layout) {
$cr->save();
Remind::PDF->set_cr_color($cr, $settings->{daynum_color});
$cr->move_to ($xc + ($self->{size}/2) + $settings->{border_size},
$yc + ($self->{size}/2) - $self->{fontsize} );
if ($url) {
@@ -255,8 +257,9 @@ sub render
sub draw_moon
{
my ($self, $xc, $yc, $cr) = @_;
my ($self, $xc, $yc, $cr, $settings) = @_;
$cr->save();
Remind::PDF->set_cr_color($cr, $settings->{daynum_color});
$cr->new_path();
$cr->arc($xc, $yc, $self->{size}/2, 0, 2*3.1415926535);
if ($self->{phase} == 0) {
@@ -351,7 +354,7 @@ sub render
$x = $x1 + $self->{atx};
}
if ($self->{aty} < 0) {
$y = $y2 + $self->{aty} - $h;
$y = $y2 + $self->{aty} - $h + $settings->{border_size};
} else {
$y = $y1 + $self->{aty};
}

View File

@@ -6,10 +6,11 @@ Icon=tkremind
Terminal=false
Name=tkremind
Comment=TkRemind Calendar Program
Comment[nl]=TkRemind Kalender Programma
Categories=Office;Calendar;
Keywords=Calendar;remind;
Keywords[ca]=Calendari;remind;
Keywords[de]=Kalender;remind;
Keywords[en_GB]=Calendar;remind;
Keywords[es]=Calendario;remind;
Keywords[nl]=Kalender;remind;

File diff suppressed because it is too large Load Diff

View File

@@ -99,6 +99,9 @@ static struct line_drawing UTF8Drawing = {
"\xe2\x94\x80"
};
static char const *start_link = "\x1B]8;;";
static char const *end_link = "\x1B]8;;\x1B\\";
static char *VT100Colors[2][2][2][2] /* [Br][R][G][B] */ = {
{
/*** DIM COLORS ***/
@@ -301,6 +304,7 @@ static void WriteTopCalLine (void);
static void WriteBottomCalLine (void);
static void WriteIntermediateCalLine (void);
static void WriteCalDays (void);
static char const *get_url(TrigInfo *infos);
static int
DayOf(int dse)
@@ -1557,6 +1561,8 @@ static int WriteOneColLine(int col)
int clamp = 1;
int numwritten = 0;
int d = ColToDay[col];
char const *url = get_url(e->infos);
if (d && UseBGVTColors && bgcolor[d][0] != -1) {
clamp = 0;
}
@@ -1605,6 +1611,10 @@ static int WriteOneColLine(int col)
ColorizeEntry(e, clamp);
}
if (url) {
printf("%s", start_link);
printf("%s\x1B\\", url);
}
/* If we couldn't find a space char, print what we have. */
if (!wspace) {
for (ws = e->wc_pos; numwritten < ColSpaces; ws++) {
@@ -1639,6 +1649,9 @@ static int WriteOneColLine(int col)
}
}
if (url) {
printf("%s", end_link);
}
/* Decolorize reminder if necessary, but keep any SHADE */
if (UseVTColors && e->is_color) {
printf("%s", Decolorize());
@@ -1870,7 +1883,9 @@ static void GenerateCalEntries(int col)
default:
if (!SuppressImplicitRemWarnings) {
Wprint("Unrecognized command; interpreting as REM");
if (warning_level("05.00.03")) {
Wprint(tr("Unrecognized command; interpreting as REM"));
}
WarnedAboutImplicit = 1;
}
CreateParser(CurLine, &p);
@@ -2063,6 +2078,11 @@ static int DoCalRem(ParsePtr p, int col)
FreeTrig(&trig);
return OK;
}
if (dse < 0 && !ParseUntriggered) {
/* Expired */
FreeTrig(&trig);
return OK;
}
} else {
/* Calculate the trigger date */
EnterTimezone(trig.tz);
@@ -2075,10 +2095,15 @@ static int DoCalRem(ParsePtr p, int col)
FreeTrig(&trig);
return r;
}
if (dse < 0 && !ParseUntriggered) {
/* Expired */
FreeTrig(&trig);
return OK;
}
}
/* Adjust trigger date/time to time zone */
dse = AdjustTriggerForTimeZone(&trig, dse, &tim);
dse = AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
/* Add to global OMITs if so indicated */
if (trig.addomit) {
@@ -2109,7 +2134,7 @@ static int DoCalRem(ParsePtr p, int col)
}
/* Save nonconst_expr flag */
nonconst_expr = p->nonconst_expr;
nonconst_expr = trig.nonconst_expr;
/* Convert PS and PSF to PASSTHRU */
if (trig.typ == PS_TYPE) {
strcpy(trig.passthru, "PostScript");
@@ -2460,6 +2485,34 @@ void WriteJSONTimeTrigger(TimeTrig const *tt)
}
}
static char const *
get_url(TrigInfo *infos)
{
TrigInfo *ti = infos;
char const *url;
if (!LinksInTerminal) {
/* Nope, not doing links in terminal */
return NULL;
}
while (ti) {
char const *colon = strchr(ti->info, ':');
if (!colon) {
ti = ti->next;
continue;
}
if (!strncasecmp(ti->info, "url", colon-ti->info)) {
url = colon+1;
while (*url && isspace(*url)) {
url++;
}
if (!*url) return NULL;
return url;
}
ti = ti->next;
}
return NULL;
}
void
WriteJSONInfoChain(TrigInfo *ti)
{

View File

@@ -66,6 +66,9 @@
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/termios.h> header file. */
#undef HAVE_SYS_TERMIOS_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

View File

@@ -101,7 +101,7 @@ InsertDedupeEntry(int trigger_date, int trigger_time, char const *body)
}
e->trigger_date = trigger_date;
e->trigger_time = trigger_time;
e->body = strdup(body);
e->body = StrDup(body);
if (!e->body) {
free(e);
return;

View File

@@ -35,7 +35,7 @@ static int ComputeTrigDuration(TimeTrig const *t);
static int CalledEnterTimezone = 0;
int AdjustTriggerForTimeZone(Trigger *trig, int dse, TimeTrig *tim)
int AdjustTriggerForTimeZone(Trigger *trig, int dse, TimeTrig *tim, int debug_ok)
{
int y, m, d, hour, minute;
int r;
@@ -59,7 +59,7 @@ int AdjustTriggerForTimeZone(Trigger *trig, int dse, TimeTrig *tim)
/* Adjust eventstart also */
trig->eventstart = dse * MINUTES_PER_DAY + tim->ttime;
SaveAllTriggerInfo(trig, tim, dse, tim->ttime, 1);
if (DebugFlag & DB_PRTTRIG) {
if (debug_ok && (DebugFlag & DB_PRTTRIG)) {
fprintf(ErrFp, "%s(%s): Trig(tz_adj %s) = %s, %d %s, %d AT %02d:%02d",
GetCurrentFilename(), line_range(LineNoStart, LineNo), trig->tz,
get_day_name(dse % 7), tm.tm_mday, get_month_name(tm.tm_mon),
@@ -534,7 +534,7 @@ int DoRem(ParsePtr p)
}
/* Adjust trigger date/time to time zone */
dse = AdjustTriggerForTimeZone(&trig, dse, &tim);
dse = AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
/* Add to global OMITs if so indicated */
if (trig.addomit) {
@@ -546,8 +546,8 @@ int DoRem(ParsePtr p)
}
if (PurgeMode) {
if (trig.expired || (!trig.is_todo && dse < DSEToday)) {
if (p->expr_happened) {
if (p->nonconst_expr) {
if (trig.expr_happened) {
if (trig.nonconst_expr) {
if (!Hush) {
PurgeEchoLine("%s\n", "#!P: Next line may have expired, but contains non-constant expression");
PurgeEchoLine("%s\n", "#!P: or a relative SCANFROM clause");
@@ -632,7 +632,7 @@ int DoRem(ParsePtr p)
PrintJSONKeyPairInt("time_in_tz", tim.ttime_orig);
}
}
if (p->nonconst_expr) {
if (trig.nonconst_expr) {
PrintJSONKeyPairInt("nonconst_expr", 1);
}
if (if_depth) {
@@ -833,6 +833,8 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
trig->adj_for_last = 0;
trig->infos = NULL;
trig->tz = NULL;
trig->nonconst_expr = 0;
trig->expr_happened = 0;
int parsing = 1;
while(parsing) {
@@ -1097,6 +1099,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
s->expr_happened = 1;
nonconst_debug(s->nonconst_expr, tr("OMITFUNC counts as a non-constant expression"));
s->nonconst_expr = 1;
trig->nonconst_expr = 1;
DBufFree(&buf);
break;
@@ -1201,6 +1204,12 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
}
}
if (s->nonconst_expr) {
trig->nonconst_expr = 1;
}
if (s->expr_happened) {
trig->expr_happened = 1;
}
if (trig->need_wkday && trig->wd == NO_WD) {
Eprint("Weekday name(s) required");
return E_PARSE_ERR;
@@ -1237,7 +1246,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
}
}
if (!s->nonconst_expr) {
if (!trig->nonconst_expr) {
if (trig->y != NO_YR && trig->m != NO_MON && trig->d != NO_DAY && trig->until != NO_UNTIL) {
if (DSE(trig->y, trig->m, trig->d) > trig->until) {
Wprint(tr("Warning: UNTIL/THROUGH date earlier than start date"));
@@ -1273,10 +1282,10 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
/* Remove leading ! from TZ spec */
if (trig->tz && *trig->tz == '!') {
char *s = (char *) trig->tz;
while (*s) {
*s = *(s+1);
s++;
char *stz = (char *) trig->tz;
while (*stz) {
*stz = *(stz+1);
stz++;
}
}
return OK;
@@ -1497,6 +1506,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
s->expr_happened = 1;
nonconst_debug(s->nonconst_expr, tr("Relative SCANFROM counts as a non-constant expression"));
s->nonconst_expr = 1;
t->nonconst_expr = 1;
return OK;
default:

View File

@@ -137,6 +137,9 @@
#define E_NO_MB 113
#define E_BAD_MB_SEQ 114
#define E_EXPR_NODES_EXCEEDED 115
#define E_EXPECTING_EOXPR 116
#define E_EXPECTING_ATOM 117
#ifdef MK_GLOBALS
#undef EXTERN
#define EXTERN
@@ -270,6 +273,8 @@ EXTERN char *ErrMsg[]
/* E_NO_MB */ "C library does not support multibyte characters",
/* E_BAD_MB_SEQ */ "Invalid multibyte sequence",
/* E_EXPR_NODES_EXCEEDED */ "Maximum expression complexity exceeded",
/* E_EXPECTING_EOXPR */ "Expecting operator or end-of-expression",
/* E_EXPECTING_ATOM */ "Expecting constant, variable, function call or (expression)",
}
#endif /* MK_GLOBALS */
;

View File

@@ -170,6 +170,8 @@ static expr_node *expr_node_free_list = NULL;
/* Maximum parse level before we bail (to avoid SEGV from filling stack)*/
#define MAX_PARSE_LEVEL 2000
/* Legal punctuation characters in an expression */
#define LEGAL_CHARS "+-*/%&|=<>!)"
static int parse_level_high_water = 0;
#define CHECK_PARSE_LEVEL() do { if (level > parse_level_high_water) { parse_level_high_water = level; if (level > MAX_PARSE_LEVEL) { *r = E_OP_STK_OVER; return NULL; } } } while(0)
@@ -2228,9 +2230,15 @@ static int set_constant_value(expr_node *atom)
atom->u.value.v.val = val;
return OK;
}
atom->u.value.type = ERR_TYPE;
Eprint("`%s': %s", DBufValue(&ExprBuf), GetErr(E_ILLEGAL_CHAR));
return E_ILLEGAL_CHAR;
if (strchr(LEGAL_CHARS, *s) != NULL) {
r = E_EXPECTING_ATOM;
} else {
r = E_ILLEGAL_CHAR;
}
Eprint("`%s': %s", DBufValue(&ExprBuf), GetErr(r));
return r;
}
/***************************************************************/
@@ -2346,8 +2354,13 @@ static expr_node *parse_atom(char const **e, int *r, Var *locals, int level)
*s != '$' &&
*s != '"' &&
*s != '\'') {
Eprint("%s `%c'", GetErr(E_ILLEGAL_CHAR), *s);
*r = E_ILLEGAL_CHAR;
if (strchr(LEGAL_CHARS, *s) != NULL) {
*r = E_EXPECTING_ATOM;
Eprint("%s", GetErr(*r));
} else {
*r = E_ILLEGAL_CHAR;
Eprint("%s `%c'", GetErr(*r), *s);
}
return NULL;
}
@@ -2759,9 +2772,24 @@ expr_node *parse_expression(char const **e, int *r, Var *locals)
print_expr_tree(node, ErrFp);
fprintf(ErrFp, "\n");
}
if (**e && (**e != ']')) {
orig = o2;
}
while (**e && isempty(**e)) {
(*e)++;
}
if (**e && (**e != ']')) {
if (DebugFlag & DB_PARSE_EXPR) {
fprintf(ErrFp, " Unparsed: %s\n", *e);
}
if (*r == OK) {
*r = E_EXPECTING_EOXPR;
}
}
if (*r != OK) {
if (node) {
free_expr_tree(node);
node = NULL;
}
}
if (!SuppressErrorOutputInCatch) {
if (*r == E_EXPECT_COMMA ||
@@ -2771,9 +2799,11 @@ expr_node *parse_expression(char const **e, int *r, Var *locals)
*r == E_2FEW_ARGS ||
*r == E_PARSE_ERR ||
*r == E_EOLN ||
*r == E_EXPECTING_EOXPR ||
*r == E_BAD_NUMBER ||
*r == E_BAD_DATE ||
*r == E_BAD_TIME ||
*r == E_EXPECTING_ATOM ||
*r == E_ILLEGAL_CHAR) {
end_of_expr = find_end_of_expr(orig);
while (**e && isempty(**e)) {

View File

@@ -159,7 +159,7 @@ void SetCurrentFilename(char const *fname)
fprintf(ErrFp, "Out of Memory!\n");
exit(1);
}
e->fname = strdup(fname);
e->fname = StrDup(fname);
if (!e->fname) {
fprintf(ErrFp, "Out of Memory!\n");
exit(1);
@@ -225,8 +225,9 @@ static void OpenPurgeFile(char const *fname, char const *mode)
if (!PurgeFP) {
fprintf(ErrFp, tr("Cannot open `%s' for writing: %s"), DBufValue(&fname_buf), strerror(errno));
fprintf(ErrFp, "\n");
} else {
set_cloexec(fileno(PurgeFP));
}
set_cloexec(fileno(PurgeFP));
DBufFree(&fname_buf);
}

View File

@@ -13,6 +13,11 @@
#include "version.h"
#include "config.h"
/* Required on OpenIndiana / Solaris */
#ifdef __sun
#define __EXTENSIONS__
#endif
#ifdef REM_USE_WCHAR
#define _XOPEN_SOURCE 600
#include <wctype.h>
@@ -28,6 +33,12 @@
#include <strings.h>
#endif
#ifdef HAVE_SYS_TERMIOS_H
#ifdef __sun
#include <sys/termios.h>
#endif
#endif
#include <ctype.h>
#include <math.h>
#include <sys/ioctl.h>
@@ -1506,6 +1517,7 @@ static int FIsconst(expr_node *node, Value *locals, Value *ans, int *nonconst)
PUT(PrintValue(ans, NULL));
OUT();
}
DestroyValue(junk);
return OK;
}
@@ -2767,6 +2779,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
}
if (truthy(&v)) {
DestroyValue(v);
r = evaluate_expr_node(cur->sibling, locals, ans, nonconst);
if (r == OK && DBGX) {
PUT(", ");
@@ -2782,6 +2795,8 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
}
DBG(DBufFree(&DebugBuf));
return r;
} else {
DestroyValue(v);
}
DBG(PUT(", ?"));
cur = cur->sibling->sibling;
@@ -4320,6 +4335,7 @@ static int FTzconvert(func_info *info)
{
int year, month, day, hour, minute, r;
int dse, tim;
char const *src_tz, *tgt_tz;
struct tm tm;
if (ARG(0).type != DATETIME_TYPE ||
@@ -4333,11 +4349,26 @@ static int FTzconvert(func_info *info)
minute = r % 60;
if (Nargs == 2) {
src_tz = ARGSTR(1);
warn_if_timezone_bad(src_tz);
if (*src_tz == '!') {
src_tz++;
}
r = tz_convert(year, month, day, hour, minute,
ARGSTR(1), NULL, &tm);
src_tz, NULL, &tm);
} else {
src_tz = ARGSTR(1);
warn_if_timezone_bad(src_tz);
if (*src_tz == '!') {
src_tz++;
}
tgt_tz = ARGSTR(2);
warn_if_timezone_bad(tgt_tz);
if (*tgt_tz == '!') {
tgt_tz++;
}
r = tz_convert(year, month, day, hour, minute,
ARGSTR(1), ARGSTR(2), &tm);
src_tz, tgt_tz, &tm);
}
if (r == -1) return E_CANT_CONVERT_TZ;
@@ -4605,7 +4636,7 @@ FEvalTrig(func_info *info)
RetVal.type = DATE_TYPE;
RETVAL = dse;
} else {
dse = AdjustTriggerForTimeZone(&trig, dse, &tim);
dse = AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
RetVal.type = DATETIME_TYPE;
RETVAL = (MINUTES_PER_DAY * dse) + tim.ttime;
}
@@ -4720,7 +4751,7 @@ FTrig(func_info *info)
FreeTrig(&trig);
continue;
}
dse = AdjustTriggerForTimeZone(&trig, dse, &tim);
dse = AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
if (ShouldTriggerReminder(&trig, &tim, dse, &r)) {
LastTrig = dse;
RETVAL = dse;

View File

@@ -106,6 +106,7 @@ EXTERN INIT( int DefaultPrio, NO_PRIORITY);
EXTERN INIT( int SysTime, -1);
EXTERN INIT( int LocalSysTime, -1);
EXTERN INIT( int ParseUntriggered, 0);
EXTERN INIT( int LinksInTerminal, 0);
EXTERN char const *InitialFile;
EXTERN char const *LocalTimeZone;

View File

@@ -35,6 +35,13 @@
#include <grp.h>
#endif
#ifdef HAVE_SYS_TERMIOS_H
#ifdef __sun
#include <sys/termios.h>
#endif
#endif
#include "types.h"
#include "globals.h"
#include "protos.h"
@@ -512,6 +519,11 @@ void InitRemind(int argc, char const *argv[])
arg++;
continue;
}
if (*arg == 'z' || *arg == 'Z') {
LinksInTerminal = 1;
arg++;
continue;
}
break;
}
if (weeks) {

View File

@@ -1307,7 +1307,7 @@ int DoIfTrig(ParsePtr p)
push_if(0, 0);
} else {
if (dse >= 0) {
dse = AdjustTriggerForTimeZone(&trig, dse, &tim);
dse = AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
}
if (ShouldTriggerReminder(&trig, &tim, dse, &err)) {
push_if(1, 0);

View File

@@ -501,6 +501,9 @@ int DoOmit(ParsePtr p)
int
AddGlobalOmit(int dse)
{
if (dse < 0) {
return OK;
}
if (NumFullOmits == MAX_FULL_OMITS) return E_2MANY_FULL;
if (!BexistsIntArray(FullOmitArray, NumFullOmits, dse)) {
InsertIntoSortedArray(FullOmitArray, NumFullOmits, dse);

View File

@@ -300,7 +300,7 @@ int system_to_stderr(char const *cmd);
int system1(char const *cmd);
int tz_set_tz (char const *tz);
int tz_convert(int year, int month, int day, int hour, int minute, char const *src_tz, char const *tgt_tz, struct tm *tm);
int AdjustTriggerForTimeZone(Trigger *trig, int dse, TimeTrig *tim);
int AdjustTriggerForTimeZone(Trigger *trig, int dse, TimeTrig *tim, int debug_ok);
void EnterTimezone(char const *tz);
void ExitTimezone(char const *tz);
int warning_level(char const *which);

View File

@@ -623,7 +623,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig const *tim
int new_result;
int force_retry = 0;
ExitTimezone(trig->tz);
new_result = AdjustTriggerForTimeZone(trig, result, &copy);
new_result = AdjustTriggerForTimeZone(trig, result, &copy, 0);
if (trig->scanfrom == NO_SCANFROM && new_result < DSEToday) {
force_retry = 1;
}

View File

@@ -143,10 +143,13 @@ typedef struct {
int eventstart; /* Original event start (datetime) */
int eventstart_orig; /* Original event start in TZ (datetime) */
int eventduration; /* Original event duration (minutes) */
int maybe_uncomputable; /* Suppress "can't compute trigger" warnings */
int addomit; /* Add trigger date to global OMITs */
int noqueue; /* Don't queue even if timed */
int max_overdue; /* Stop warning if TODO is too far overdue */
unsigned char addomit; /* Add trigger date to global OMITs */
unsigned char maybe_uncomputable; /* Suppress "can't compute trigger" warnings */
unsigned char nonconst_expr; /* Non-constant expression encountered */
unsigned char expr_happened;
char sched[VAR_NAME_LEN+1]; /* Scheduling function */
char warn[VAR_NAME_LEN+1]; /* Warning function */
char omitfunc[VAR_NAME_LEN+1]; /* OMITFUNC function */

View File

@@ -410,6 +410,9 @@ warn_if_timezone_bad(char const *tz)
if (!tz) {
return;
}
if (!*tz) {
return;
}
if (*tz == '!') {
return;
}

983
tests/manpage-personal-dict Normal file
View File

@@ -0,0 +1,983 @@
00PM
00am
00pm
00test
0SNgvsDvx7M
0m
0x
0x1F
0xFE12
0xfe00
10x14
12string7
13ths
15am
1GB
1p
1pm
20am
20pm
22AM
2GB
2PM
2s
30PM
34am
3pm
3string34
45am
45pm
55AAFF
591test
59pm
5AF
5EDT
5v
72ndths
A3
A4
A5
ADDOMIT
AddBlankLines
Afoo
Aimale
Alberani
AmigaDOS
ApR
Aq
Args
B'Av
B4
B5
BLOCKDEV
Badros
Bazzanini
Bech
Benedetto
Bevrijdingsdag
Bj
Björn
Bloois
BoldOblique
Borland
BoxHeight
BoxWidth
Budler
Buitléir
Bœsch
C99
CDE's
CFLAGS
CHARDEV
CIx
CIy
CLOEXEC
COLOUR
CONTEXTs
CPAN
CPP's
CalMode
CalType
CalcMinsFromUTC
CalcUTC
Clément
Config
Conover
Cottel
Couto
Ctrl
D'oh
DATETIME
DATETIMEs
DATEs
DBufPutc
DOH
DOSes
DOTREMINDERS
DSE
DUMPVARS
DURATIONs
Daia
DateSep
DateTimeSep
Davide
Daví
Davíðsson
DaySize
DedupeReminders
DefaultColor
DefaultDelta
DefaultPrio
DefaultTDelta
Deiconify
DeltaOffset
DeltaOverride
Dershowitz
DestroyValue
Doggett
Doh
DontFork
DontQueue
DontTrigAts
Dosubst
Dov
Duperval
EF
ENDIF
EOF
ERRMSG
ESC
EXPR
Eee
Eerste
Eloi
Emanuele
EndSent
EndSentIg
EntrySize
Esc
Example2
Expr
ExpressionTimeLimit
FF0000
FFF
FFFFFF
FIFOs
FRENAME
FSET
FSETting
FUNCS
FUNSET
Feldstern
FindToken
FirstIndent
Flagson
Fname
FoldYear
FormWidth
FreeBSD
Fromnow
GPL
Gedalia
Getopt
GhostView
Gurman
HANKERSON
HEBCAL
HH
HTMLCLASS
Ha'atzmaut
HaShoah
Hankerson
HashPJW
HashVal
Hashana
Hazikaron
HeadSize
Helvetica
HideCompletedTodos
Hoeltig
Hohl
Hplu
Hurray
HushMode
IFTRIG
IFs
IIF
INCLUDECMD
INCLUDEd
INCLUDed
INTs
IRIX
ISOLATIN1
Iconified
IgnoreOnce
Img
InBoxHeight
InfDelta
IntMax
IntMin
Ip
JAHRZEITS
JSON
JSONMode
JSONQUEUE
JeiEl
Jens
Jerzy
Jin
Jochen
Joop
Kamens
Kasdorp
Katan
Kiefte
Koningsdag
Kristian
LANGID
LDFLAGS
LGBTQ
LLM
LOGNAME
LRM
Laatste
Labour
Lastday
Lastworkday
LatDeg
LatMin
LatSec
LineWidth
Liviu
LocalToUTC
LongDec
LongDeg
LongMin
LongSec
Lynnerup
M11
M3
MD5
MMam
MMpm
MSC
MSF
MSGPREFIX
MSGSUFFIX
MUSL
MUSL
MUSL's
Madsen
Makefile
Makefiles
Marczykowski
Marek
Marinus
MaxFullOmits
MaxLateMinutes
MaxPartialOmits
MaxSatIter
MaxStringLen
MaxX
MaxY
MaybeXS
McGlothlen
Meeus
Mikko
MinX
MinY
MinsFromUTC
Mogens
Moontime
Mplu
Msg
Möller
NOQUEUE
Nachum
Neuhauser
NextMode
Niels
Nieuwe
Noto
Num
NumFullOmits
NumPartialOmits
NumQueued
NumTrig
Nx
OMF
OMITFUNC
OMITs
OMITted
OS2
OSC
OnceFile
OpenIndiana
Oskiewicz
PANGO
PNG
POSIX
PPP
PSCal
PSFILE
PSFile
PageBoundingBox
PageDown
PageUp
Pango
ParseUntriggered
Paulo
Pelzl
PgDn
PgUp
Philipp
Pinard
Plaser
PostScript
PreCal
PrefixLineNo
Puskas
QDOS
README
REM2PS
RGB
Rafa
Rahman
Randen
Readline
Reingold
Reißig
Rem2HTML
Rem2PDF
Rem2PS
Remind's
Rhys
Rickel
Rosh
Ruderich
RunOff
SAS
SATISFied
SCANFROM
SCANFROMs
SCHED
SEGV's
SGI
SIGCONT
SIGINT
SMSQ
SMTP
SORTBANNER
SPDX
SPECIALs
SVG
SYMLINK
SYSINCLUDE
SYSV
Sadinoff
Sanderson
Schleusener
Schmitt
Schwarz
Shapir
Shvat
Siegel
Silvonen
Silvonen's
SimpleCal
SimpleCalendar
Sipe
Skoll
Slusallek
Sobczyk
Solaris
SortByDate
SortByPrio
SortByTime
Sparc
Spc
Speeded
Sprickerhof
Strassfeld
SubsIndent
Sunview
SuppressImplicitWarnings
SuppressLRM
SysInclude
TAGs
TKREMIND
TKTAG
TODO
TODOS
TODOs
TRIGVALID
TTY
TZ
Ta'anit
Tamkin
Tamuz
Tavis
Tcl
Td
Terbeck
TerminalBackground
Thronicke
TimeSep
TimetIs64bit
Tishrey
TitleSize
Tk
TkRemind
TodoFilter
Torre
Tru64
Trygve
Tt
Tw
Tzom
UNCOMPUTABLE
UNIXes
USNO
UTCToLocal
UTF
Ud
UntimedFirst
Use256Colors
UseBGVTColors
UseTrueColors
UseVTColors
Uw
Uy
VT00
VT100
Valerio
Vens
Volle
WHATSNEW
WarningLevel
Wehr
Werschulz
Wextra
Willem
Willmann
XTerm
XY
YECH
YYYY
Yaffe
Yellin
Yom
Ziemer
Zoltan
acknowledgement
adawn
adusk
afOo
aflag
america
amiga
ampm
ansi
ansicolor
ansitext
ap
aq
aq1993
arg
arg1
arg2
argN
args
argv
asc
astro
atime
autoconf
autoreconf
b1
backend
backends
backslashed
backurl
barbarbafoo
baseyr
behaviour
bg
c12
c3
cairo
calprefix
calsuffix
caltype
catcherr
ccl
centimetres
centre
cgi
charset
chinese
clc
cm2rem
cm2trem
cmd
cmd1
cmd2
cn
codepoint
config
const
cppcheck
cron
csh
css
da
date1
date2
datepart
datetime
datetimes
day1
day2
daymap
dayname
daynames
daynum
daysinmon
daysinmonnth
daysinnextmonth
daysinprevmonth
daystart
defs
dev
devel
dfs
dh
dialogs
difftime
doesn
dosubst
doublequote
dq
dqi
dqis
ds
dstzone
dt
dur
dx
easterdate
edur
eergisteren
eg
emacs
emxomf
encodings
endian
endif
envvar
eps
estart
eval
evaltrig
eventduration
eventstart
execed
executables
expr
favour
fcntl
fd
feb
ffat
fg
fgrep
filedate
filedatetime
filedir
fileinfo
findfont
finnish
firstquarter
firstwkday
fixups
flagsoff
flagson
fname
fontsize
forwurl
fri
fset
ftshe
fullmoon
func
funcs
gaa
garbhol
gcc
getenv
glibc's
grey
greyed
gridline
gridlines
groff
gvim
hashref
hasn
hdate
hebdate
hebday
hebmon
hebyear
hm
hostname
html
htmlescape
htmlstriptags
hunspell
i1
i2
iCal
ical2rem
iconified
iconv
idq
ie
ifdef
ifelse
ifoo
iif
imgbase
initgroups
inotify
inotifywait
isany
isconst
isdst
isleap
isomitted
itkpdf
itkprint
itkremind
ivar
j2
jahr
jahrzeit
jahrzeits
jan
jewish
json
kall
kcmd1
kcommand
keym
kwartier
kxmessage
lastquarter
latin1
leapyear
leapyears
len
lgbtq
libcairo
libjson
libpango
libreadline
lineno
linux
listbox
localomit
localtoutc
lpr
lrtb
lt
lto
luni
lz
maan
makefile
maxlen
maybexs
mbchar
mbindex
mbstrlen
mbsubstr
md
memcpy
messageBox
metacharacters
minsfromutc
mktime
mmedia
mojibake
monday
mondayfirst
monnum
month1
month2
monthname
moondate
moondatetime
moonphase
moonphases
moonrisedir
moonsetdir
moonsize
moontime
moontool
moveable
moveto
mr
msg
msgprefix
msgsuffix
mul
multibyte
multitrig
mydate
mydelta
mydir
myfunc1
mylang
myprolog
myreminders
myscript
nF
nHello
nbar
nd
ndawn
ndusk
newdate
newmoon
nextmonthname
nextmonthyear
nl
nnn
nohup
nonconst
nonomitted
noreminders
nostripped
nostyle
notesize
noto
nqueued
nroff
num
ok
oktober
ol
oldstyle
ons
ordx
orthodoxeaster
os2
ostype
otherfunc
overmorgen
p12
packlist
padstr
pango
passthru
patchlevel
pathnames
pdf
perl
perllocal
pn
png
pngs
popen
pp12
pp3
ppp
pre
preprocessor
prev
prevmonthname
prevmonthyear
printf
prio
psmoon
psshade
qid
queueing
quux
rF
rawbody
readline
realcurrent
realnow
realtoday
rem2html
rem2pdf
rem2pdf's
rem2ps
rem2ps2
remind's
rescan
rgb
rn
ro
romanian
rwx
sa
saturday
scalefont
scanfrom
sched
se
segfaulting
setenv
setfont
setgray
setpagedevice
sfun
sgn
shalem
shar
shellescape
shextvlfqnu
shouldn
smachot
smallcal
soleq
somefile
sortbanner
spc
spellintian
src
srczone
sson
stderr
stdin
stdout
sthd
str1
str2
strcasecmp
strdup
stringwidth
strlen
strncasecmp
stylesheet
subprocess
subst
substr
sudo
sundAy
svg
symlink
sys
sysnotify
t1
t2
tThere
tableonly
tcl
tcllib
tdelta
test1
test2
th
thed
thirdfunc
thisyear
thu
timegm
timelocal
timepart
tk
tkpng
tkremind
tkreminders
tkremindrc
tm
todo
todos
tokenizer
toronto
tq
trep
trepeat
trig1
trig2
trigN
trigback
trigbase
trigcompletethrough
trigdate
trigdatetime
trigdelta
trigduration
trigeventduration
trigeventstart
trigeventstarttz
trigfrom
triggerable
triginfo
trigistodo
trigmaxoverdue
trigpriority
trigrep
trigscanfrom
trigtags
trigtime
trigtimedelta
trigtimerep
trigtimetz
trigtz
triguntil
trigvalid
troff
tshed
tt
ttime
tty
tue
txt
typeof
tz
tzconvert
ubitux
ui
uid
unbuffered
undef
undefine
underlinefg
uniq
unsets
untimed
untriggerable
untriggered
uppper
url
userid
utcflag
utctolocal
utf
utf8
utils
uwhatever
v5
varname
ve
w0
wakeups
weekno
wfun
whoami
wkday
wkdaynum
wkstart
wn
www
x00
x1
x2
xAB
xdg
xinitrc
xless
xmessage
xsiz
xsiz1
y1
y2
year1
year2
yeardiff
yrstart
ysiz
ysiz1
yy
yyyy
z0
zapf
ziens
zj
zn
één

View File

@@ -27,12 +27,27 @@ if test `id -u` = 0 ; then
exit 1
fi
REMIND="../src/remind --flush -q"
REMIND_CMD=${REMIND_CMD:-../src/remind}
REM2PS=${REM2PS:-../src/rem2ps}
REMIND="$REMIND_CMD --flush -q"
OUT="../tests/test.out"
CMP="../tests/test.cmp"
# Set a known timezone so moon phases show up in predictable places
TZ=UTC
export TZ
LANG=C.UTF-8
export LANG
LC_ALL=C.UTF-8
export LC_ALL
unset LC_PAPER
# Check if "grep" accepts "-a" flag
echo TEST | grep -a TEST > /dev/null 2>&1
if test $? = 0 ; then
GREP_A="-a"
else
GREP_A=""
fi
# Colorize output iff stdout is a tty
stty <&1 > /dev/null 2>&1
@@ -78,7 +93,7 @@ TEST_GETENV="foo bar baz" ; export TEST_GETENV
echo "Test 1" > $OUT
echo "" >> $OUT
echo "Running main tests"
$REMIND -e -dxte ../tests/test.rem 16 feb 1991 12:13 2>&1 | grep -v -a 'TimetIs64bit' >> $OUT 2>&1
$REMIND -e -dxte ../tests/test.rem 16 feb 1991 12:13 2>&1 | grep -v $GREP_A 'TimetIs64bit' >> $OUT 2>&1
echo "" >> $OUT
echo "Test 2" >> $OUT
echo "" >> $OUT
@@ -181,8 +196,8 @@ rm -f ../tests/purge_dir/*.rem.purged >> $OUT 2>&1
$REMIND ../tests/runtest.rem >> $OUT 2>&1
$REMIND -p ../tests/shade.rem 1 August 2009 | ../src/rem2ps -e -l -c3 >> $OUT 2>&1
$REMIND -pp ../tests/shade.rem 1 August 2009 | ../src/rem2ps -e -l -c3 >> $OUT 2>&1
$REMIND -p ../tests/shade.rem 1 August 2009 | "$REM2PS" -e -l -c3 >> $OUT 2>&1
$REMIND -pp ../tests/shade.rem 1 August 2009 | "$REM2PS" -e -l -c3 >> $OUT 2>&1
TZ=America/Toronto $REMIND ../tests/sunmoon.rem 1 Jan 2011 >> $OUT 2>&1
@@ -499,8 +514,8 @@ $REMIND --version >> $OUT 2>&1
# Test queueing. Because eventstart depends on the actual system
# date, we use the --test flag to fake the date and time.
# We can't use $REMIND here because it includes the -q flag.
echo JSONQUEUE | ../src/remind --flush --test -z0 ../tests/queue1.rem >> $OUT 2>&1
echo QUEUE | ../src/remind --flush --test -zj ../tests/queue1.rem >> $OUT 2>&1
echo JSONQUEUE | "$REMIND_CMD" --flush --test -z0 ../tests/queue1.rem >> $OUT 2>&1
echo QUEUE | "$REMIND_CMD" --flush --test -zj ../tests/queue1.rem >> $OUT 2>&1
# Test for leap year bug that was fixed
$REMIND -dte - 28 Feb 2024 <<'EOF' >> $OUT 2>&1
@@ -638,7 +653,7 @@ $REMIND -c ../tests/dedupe.rem 1 November 2023 >> $OUT 2>&1
$REMIND -q ../tests/dedupe.rem 8 November 2023 >> $OUT 2>&1
# Remove references to SysInclude, which is build-specific
grep -F -v -a '$SysInclude' < $OUT > $OUT.1 && mv -f $OUT.1 $OUT
grep -F -v $GREP_A '$SysInclude' < $OUT > $OUT.1 && mv -f $OUT.1 $OUT
# If "man" accepts the --warnings flag, test all the man pages.
RUNMAN=0
@@ -654,6 +669,49 @@ for i in ../man/*.1 ; do
fi
done
if test -d ../rem2pdf/blib ; then
PERLMANS=`find ../rem2pdf/blib -name '*.1p' -o -name '*.3pm'`
else
PERLMANS=""
fi
# If we have "spellintian", run it against man pages
cat <<'EOF' >> $OUT
If spellintian is installed, its output (if any) follows...
EOF
spellintian /dev/null < /dev/null > /dev/null 2>&1
if test $? = 0 ; then
echo "Linting man pages"
# we grep out some false-positives from rem2ps
spellintian --picky $PERLMANS ../man/*.1 2>&1 | grep -v -F 'MinX MinX (duplicate word)' | grep -v -F 'MinY MinY (duplicate word)' | grep -v -F 'show show (duplicate word)' >> $OUT 2>&1
fi
# If we have "hunspell", run it against man pages
cat <<'EOF' >> $OUT
If hunspell is installed, its output (if any) follows...
EOF
HUNSPELL="hunspell -d en_US -l -p manpage-personal-dict"
$HUNSPELL /dev/null < /dev/null > /dev/null 2>&1
if test $? = 0; then
echo "Spell-checking man pages, WHATSNEW and README.md"
cat ../man/*.1 $PERLMANS | $HUNSPELL -n >> $OUT 2>&1
cat ../docs/WHATSNEW | $HUNSPELL >> $OUT 2>&1
cat ../README.md | $HUNSPELL >> $OUT 2>&1
# If we have pod2man, check rem2pdf and rem2html man pages too
pod2man < ../rem2html/rem2html.in > /dev/null 2>&1
if test $? = 0 ; then
pod2man < ../rem2html/rem2html.in | $HUNSPELL -n >> $OUT 2>&1
fi
fi
echo "" >> $OUT
# Test --print-tokens long option
$REMIND --print-tokens < /dev/null >> $OUT 2>&1
@@ -675,7 +733,7 @@ EOF
# Make sure stupidly-long translations of "am" and "pm" can't cause a
# segmentation fault
$REMIND -c - 1 Feb 2024 <<'EOF' >> $OUT 2>&1
$REMIND -c - 1 Feb 2024 <<'EOF' >> $OUT 2>&1
TRANS "am" "alsdkjalksdj alksjd alksdj alksjd laksjd laksjd laksjd laksjd laksjd laksjd laksjd laksjd lkasjd laksjd laksjd lkajs dlkajs dlkasj dlkasjd lkajsd lkajs dlkasjd lkasj dlkajsd lkasjd lkasjd laksjd laksjd laksjd alskdj alskdj alksdj alksdj alskdj alksdj aslkdj"
TRANS "pm" "oiwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwjwwwwwwwwwwwwwwwjwpqoejkpqwojepqowjepqojwepqowjepqowjepqowjepqowjepqowjepqowjepqojwepqowjepqowjepqowjepqowjepqowjeqpweoj"
@@ -807,7 +865,7 @@ $REMIND --json ../tests/json-redirect.rem 1 Jan 2025 > /dev/null 2>> $OUT
# Test %: substitution sequence in all the languages
for i in ../include/lang/??.rem ; do
$REMIND "-ii=\"$i\"" -p - 2025-08-13 <<'EOF' 2>&1 | grep -a 2025/ >> $OUT
$REMIND "-ii=\"$i\"" -p - 2025-08-13 <<'EOF' 2>&1 | grep $GREP_A 2025/ >> $OUT
DO [i]
REM TODO 2025-08-13 MSG %(LANGID) Task1%:
REM TODO 2025-08-13 COMPLETE-THROUGH 2025-08-12 MSG %(LANGID) Task2%:
@@ -879,6 +937,37 @@ EOF
# For this one, we need to force an error so we make sure the error is
# reported in -stdin- and not cat|
(echo 'INCLUDECMD cat'; sleep $DELAY; echo 'set a 1/0') | $REMIND - 2025-10-01 >> $OUT 2>&1
$REMIND --json - 2025-10-01 <<'EOF' >> $OUT 2>&1
# Nonconst-expr in trigger
set a nonconst(1)
REM 2025-10-01 MSG Nonconst NOT set [today()]
REM 2025 Oct [a] MSG Nonconst IS set [today()]
REM 2025 Oct [a] MSG Nonconst IS set
EOF
$REMIND -j - 2025-12-31 <<'EOF' >> $OUT 2>&1
# Nonconst-expr in trigger
set $ParseUntriggered 1
set a nonconst(1)
REM 2025-10-01 MSG Nonconst NOT set [today()]
REM 2025 Oct [a] MSG Nonconst IS set [today()]
REM 2025 Oct [a] MSG Nonconst IS set
REM 2025 Oct [1] MSG Expr but not nonconst [today()]
REM 2025-10-01 MSG No expr seen [1+2]
EOF
# Early exit from calendar processing
$REMIND -p - 2026-01-01 <<'EOF' >> $OUT 2>&1
REM 1 Jan 1994 MSG 1/0 = [1/0]
EOF
# No early exit from calendar processing
$REMIND -p - 2026-01-01 <<'EOF' >> $OUT 2>&1
SET $ParseUntriggered 1
REM 1 Jan 1994 MSG 1/0 = [1/0]
EOF
cmp -s $OUT $CMP
if [ "$?" = "0" ]; then
echo "Remind: Acceptance tests ${GRN}PASSED${NRM}"

View File

@@ -40,7 +40,7 @@ OUT=../tests/tz.out
CMP=../tests/tz.cmp
echo "Running timezone tests"
echo -n "" > $OUT 2>&1
cp /dev/null $OUT
TZ=Europe/Amsterdam $REMIND - 2025-09-03@14:00 <<'EOF' >> $OUT 2>&1
SET $AddBlankLines=0

View File

@@ -1046,7 +1046,7 @@ set a057 value("a05"+"6")
"a05" + "6" => "a056"
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
set a058 version()
version() => "06.01.05"
version() => "06.02.01"
set a059 wkday(today())
today() => 1991-02-16
wkday(1991-02-16) => "Saturday"
@@ -2609,7 +2609,7 @@ a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
a007 "1991-02-16"
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
a008 "11:44"
a058 "06.01.05"
a058 "06.02.01"
a059 "Saturday"
a010 12
a060 6
@@ -5040,8 +5040,9 @@ set a 7 * "Cabbage! "
# Should result in errors
set pqxya 1+2)
1 + 2 => 3
../tests/test.rem(1014): Expecting end-of-line
1+2)
^-- here
../tests/test.rem(1014): Expecting operator or end-of-expression
# Should result in an error
REM Tue OMIT 2024-01-01 MSG Wookie
@@ -5562,8 +5563,8 @@ REM SATISFY ""
REM SATISFY [version() > "01.00.00"]
../tests/test.rem(1074): SATISFY: expression has no reference to trigdate() or $T...
../tests/test.rem(1074): Trig = Saturday, 16 February, 1991
version() => "06.01.05"
"06.01.05" > "01.00.00" => 1
version() => "06.02.01"
"06.02.01" > "01.00.00" => 1
../tests/test.rem(1074): Trig(satisfied) = Saturday, 16 February, 1991
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]
../tests/test.rem(1075): SATISFY: expression has no reference to trigdate() or $T...
@@ -16426,9 +16427,14 @@ eval("1/0") => 1 / 0 => Division by zero
../tests/test.rem(1590): `/': Division by zero
Division by zero
set a eval("1 / / 2")
eval("1 / / 2") => ../tests/test.rem(1591): Illegal character `/'
eval("1 / / 2") => ../tests/test.rem(1591): Expecting constant, variable, function call or (expression)
1 / / 2
^-- here
Expecting constant, variable, function call or (expression)
set a eval("1 / # 2")
eval("1 / # 2") => ../tests/test.rem(1592): Illegal character `#'
1 / # 2
^-- here
Illegal character
set a catch(eval("1 +"), 33)
eval("1 +") => Unexpected end of line
@@ -16438,7 +16444,10 @@ eval("1/0") => 1 / 0 => Division by zero
Division by zero
catch(*Division by zero*, 34) => 34
set a catch(eval("1 / / 2"), 35)
eval("1 / / 2") => Illegal character
eval("1 / / 2") => Expecting constant, variable, function call or (expression)
catch(*Expecting constant, variable, function call or (expression)*, 35) => 35
set a catch(eval("1 / # 2"), 35)
eval("1 / # 2") => Illegal character
catch(*Illegal character*, 35) => 35
# Ensure RUN is disabled in eval
@@ -16446,7 +16455,7 @@ set a shell("echo foo")
shell("echo foo") => "foo"
set a eval("shell(\"echo foo\")")
eval("shell(\"echo foo\")") => shell("echo foo") => RUN disabled
../tests/test.rem(1598): shell(): RUN disabled
../tests/test.rem(1600): shell(): RUN disabled
RUN disabled
set a shell("echo foo")
shell("echo foo") => "foo"
@@ -16459,8 +16468,8 @@ Leaving UserFN i() => "foo"
set a eval("i()")
eval("i()") => Entering UserFN i()
shell("echo foo") => RUN disabled
../tests/test.rem(1603): shell(): RUN disabled
../tests/test.rem(1601): [#0] In function `i'
../tests/test.rem(1605): shell(): RUN disabled
../tests/test.rem(1603): [#0] In function `i'
Leaving UserFN i() => RUN disabled
RUN disabled
set a i()
@@ -16473,19 +16482,19 @@ set b eval(a)
a => "eval(\"1\")+ shell(\"ls\")"
eval("eval(\"1\")+ shell(\"ls\")") => eval("1") => 1
shell("ls") => RUN disabled
../tests/test.rem(1607): shell(): RUN disabled
../tests/test.rem(1609): shell(): RUN disabled
RUN disabled
# "value" should use lazy evaluation
set a value(4:33)
value(04:33) => Type mismatch
../tests/test.rem(1610): Type mismatch
../tests/test.rem(1612): Type mismatch
set a value('2020-01-01', 42)
value(2020-01-01, ?) => Type mismatch
../tests/test.rem(1611): Type mismatch
../tests/test.rem(1613): Type mismatch
set a value("nosuchvar")
value("nosuchvar") => Undefined variable
../tests/test.rem(1612): Undefined variable
../tests/test.rem(1614): Undefined variable
set a value("nosuchvar", 42)
value("nosuchvar", 42) => 42
set a value("a", 42)
@@ -16495,11 +16504,11 @@ value("a") => 42
DEBUG -x
DEBUG -e
../tests/test.rem(1622): eval(): Too many recursive function calls
../tests/test.rem(1624): eval(): Too many recursive function calls
Base: 1991-02-09
Base: 1991-02-09
../tests/test.rem(1630): Expired
../tests/test.rem(1631): Expired
../tests/test.rem(1632): Expired
../tests/test.rem(1633): Expired
trigvalid = 1; trigdate = 1991-01-14
trigvalid = 0; trigdate = 0
daysinmon(2, 2000) => 29
@@ -16511,36 +16520,36 @@ daysinmon("Feb", 2001) => 28
daysinmon("March", 2000) => 31
daysinmon("March", 2001) => 31
daysinmon("Cabbage", 2001) => Invalid month name
../tests/test.rem(1658): daysinmon(): Invalid month name
../tests/test.rem(1660): daysinmon(): Invalid month name
daysinmon(2000-02-14) => 29
daysinmon(2001-02-14) => 28
daysinmon(2000-04-14) => 30
daysinmon(2001-04-14) => 30
date(2020, "April", 15) => 2020-04-15
date(2020, "Carrot", 12) => Invalid month name
../tests/test.rem(1666): date(): Invalid month name
../tests/test.rem(1668): date(): Invalid month name
datetime(2020, "April", 13, 04:44) => 2020-04-13@04:44
datetime(2020, "April", 13, 4, 44) => 2020-04-13@04:44
datetime(2020, "Lettuce", 13, 04:44) => Invalid month name
../tests/test.rem(1669): datetime(): Invalid month name
../tests/test.rem(1671): datetime(): Invalid month name
datetime(2020, "Lettuce", 13, 4, 44) => Invalid month name
../tests/test.rem(1670): datetime(): Invalid month name
../tests/test.rem(1672): datetime(): Invalid month name
wkdaynum("Tue") => 2
wkdaynum("Wednesday") => 3
wkdaynum("telephone") => Invalid weekday name
../tests/test.rem(1674): wkdaynum(): Invalid weekday name
../tests/test.rem(1685): Cannot modify system variable: `$NumTrig'
../tests/test.rem(1686): POP-VARS without matching PUSH-VARS
../tests/test.rem(1676): wkdaynum(): Invalid weekday name
../tests/test.rem(1687): Cannot modify system variable: `$NumTrig'
../tests/test.rem(1688): POP-VARS without matching PUSH-VARS
FUNSET a
FSET b(x, y) x*y
FSET c() 33
set a a(2)
../tests/test.rem(1695): Undefined function: `a'
../tests/test.rem(1697): Undefined function: `a'
set a b(2)
b(?) => Not enough arguments
../tests/test.rem(1696): b(): Not enough arguments
../tests/test.rem(1698): b(): Not enough arguments
set a b(2, 3)
Entering UserFN b(2, 3)
x => 2
@@ -16562,7 +16571,7 @@ Entering UserFN a(2)
Leaving UserFN a(2) => 42
set a b(2)
b(?) => Not enough arguments
../tests/test.rem(1707): b(): Not enough arguments
../tests/test.rem(1709): b(): Not enough arguments
set a b(2, 3)
Entering UserFN b(2, 3)
x => 2
@@ -16577,10 +16586,10 @@ Leaving UserFN c() => 66
POP-FUNCS
set a a(2)
../tests/test.rem(1713): Undefined function: `a'
../tests/test.rem(1715): Undefined function: `a'
set a b(2)
b(?) => Not enough arguments
../tests/test.rem(1714): b(): Not enough arguments
../tests/test.rem(1716): b(): Not enough arguments
set a b(2, 3)
Entering UserFN b(2, 3)
x => 2
@@ -16595,7 +16604,7 @@ DEBUG -xe
Overridden: subst_colon subst_bang subst_question subst_at subst_hash
bad => "ÿ"
mbstrlen("ÿ") => Invalid multibyte sequence
../tests/test.rem(1734): mbstrlen(): Invalid multibyte sequence
../tests/test.rem(1736): mbstrlen(): Invalid multibyte sequence
bad => "ÿ"
strlen("ÿ") => 1
faces => "ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
@@ -16609,7 +16618,7 @@ index("🙂🙂🙂🙂🙂xyzçççéfoo", "ç") => 24
bad => "ÿ"
bad => "ÿ"
mbindex("ÿ", "ÿ") => Invalid multibyte sequence
../tests/test.rem(1742): mbindex(): Invalid multibyte sequence
../tests/test.rem(1744): mbindex(): Invalid multibyte sequence
faces => "ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
mbindex("ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo", "ç", 11) => 11
faces => "ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
@@ -16628,10 +16637,10 @@ faces => "🙂🙂🙂🙂🙂xyzçççéfoo"
mbsubstr("ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo", 2, 9) => "ðŸ™ðŸ™ðŸ™ðŸ™xyzç"
bad => "ÿ"
mbsubstr("ÿ", 1) => Invalid multibyte sequence
../tests/test.rem(1754): mbsubstr(): Invalid multibyte sequence
../tests/test.rem(1756): mbsubstr(): Invalid multibyte sequence
bad => "ÿ"
mbsubstr("ÿ", 1, 20) => Invalid multibyte sequence
../tests/test.rem(1755): mbsubstr(): Invalid multibyte sequence
../tests/test.rem(1757): mbsubstr(): Invalid multibyte sequence
faces => "ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
substr("ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo", 2) => "Ÿ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
faces => "ðŸ™ðŸ™ðŸ™ðŸ™ðŸ™xyzçççéfoo"
@@ -16641,13 +16650,13 @@ codepoint("🙂🙂🙂🙂🙂xyzçççéfoo") => 128578
mbchar(128578, 162, 122) => "ðŸ™Â¢z"
bad => "ÿ"
codepoint("ÿ") => Invalid multibyte sequence
../tests/test.rem(1762): codepoint(): Invalid multibyte sequence
../tests/test.rem(1764): codepoint(): Invalid multibyte sequence
codepoint("") => 0
mbchar(0) => ""
mbchar(0, 120) => Number too low
../tests/test.rem(1765): mbchar(): Number too low
../tests/test.rem(1767): mbchar(): Number too low
mbchar(120, 0) => Number too low
../tests/test.rem(1766): mbchar(): Number too low
../tests/test.rem(1768): mbchar(): Number too low
Variable hash table statistics:
Entries: 100146; Buckets: 87719; Non-empty Buckets: 66303
Maxlen: 5; Minlen: 0; Avglen: 1.142; Stddev: 0.878; Avg nonempty len: 1.510
@@ -16669,7 +16678,7 @@ Expression nodes high-water: 302076
Expression nodes leaked: 0
Parse level high-water: 34
Max expr node evaluations per line: 2001
Total expression node evaluations: 106467
Total expression node evaluations: 106471
Test 2
@@ -23707,7 +23716,7 @@ SECURITY: Won't read world-writable file or directory!
Error reading include_dir/ww: Can't open file
SECURITY: Won't read world-writable file or directory!
Error reading include_dir/ww: No files matching *.rem
06.01.05
06.02.01
Enabling test mode: This is meant for the acceptance test.
Do not use --test in production.
In test mode, the system time is fixed at 2025-01-06@19:00
@@ -23905,7 +23914,9 @@ Parsed expression: 1||1
Parsed expression: 2
=> 2
Unparsed: , 3
../tests/expr.rem(15): Expecting end-of-line
2, 3
^-- here
../tests/expr.rem(15): Expecting operator or end-of-expression
Parsed expression: iif(0, "foo", 0, "bar", 1, "blech", 0, "quux", 1, "borhy", "wacka")
=> (Iif 0 "foo" 0 "bar" 1 "blech" 0 "quux" 1 "borhy" "wacka")
iif(0, ?, 0, ?, 1, "blech", ?, ?, ?, ?, ?) => "blech"
@@ -23923,7 +23934,7 @@ max(6, 9, 50) => 50
Parsed expression: max(1,
=> Error: Illegal character
Unparsed: ,1)
,1)
max(1,,1)
^-- here
Parsed expression: 5%0
=> (% 5 0)
@@ -24284,7 +24295,7 @@ Expression nodes high-water: 499
Expression nodes leaked: 0
Parse level high-water: 2001
Max expr node evaluations per line: 499
Total expression node evaluations: 632
Total expression node evaluations: 631
-stdin-(14): Unmatched PUSH-OMIT-CONTEXT at -stdin-(7)
-stdin-(14): Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT
No reminders.
@@ -24458,6 +24469,13 @@ Checking ../man/rem.1...
Checking ../man/rem2ps.1...
Checking ../man/remind.1...
Checking ../man/tkremind.1...
If spellintian is installed, its output (if any) follows...
If hunspell is installed, its output (if any) follows...
# Remind Tokens
addomit
@@ -25056,6 +25074,8 @@ TRANSLATE "TZ specified for non-timed reminder" ""
TRANSLATE "C library does not support multibyte characters" ""
TRANSLATE "Invalid multibyte sequence" ""
TRANSLATE "Maximum expression complexity exceeded" ""
TRANSLATE "Expecting operator or end-of-expression" ""
TRANSLATE "Expecting constant, variable, function call or (expression)" ""
# Other Messages
TRANSLATE "%s function `%s' defined at %s(%s) does not use its argument" ""
@@ -39539,7 +39559,6 @@ trigger(2060-08-01@23:55, 1) => "1 August 2060 AT 19:55"
utctolocal(2050-01-01@01:00) => 2049-12-31@20:00
localtoutc(2050-12-31@23:44) => 2051-01-01@04:44
localtoutc(2050-03-13@00:00) => 2050-03-13@05:00
localtoutc(2050-03-13@02:00) => 2050-03-13@07:00
localtoutc(2050-11-06@00:00) => 2050-11-06@04:00
localtoutc(2050-11-06@02:00) => 2050-11-06@07:00
utctolocal(2051-01-01@04:44) => 2050-12-31@23:44
@@ -39918,3 +39937,69 @@ devnull test b
-stdin-(2): `/': Division by zero
No reminders.
[
{"banner":"Reminders for Wednesday, 1st October, 2025:"},
{"date":"2025-10-01","filename":"-stdin-","lineno":3,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst NOT set 2025-10-01"},
{"date":"2025-10-01","filename":"-stdin-","lineno":4,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst IS set 2025-10-01"},
{"date":"2025-10-01","filename":"-stdin-","lineno":5,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst IS set"}
]
# Nonconst-expr in trigger
set $ParseUntriggered 1
set a nonconst(1)
#!P: Expired: REM 2025-10-01 MSG Nonconst NOT set [today()]
#!P: Next line may have expired, but contains non-constant expression
#!P: or a relative SCANFROM clause
REM 2025 Oct [a] MSG Nonconst IS set [today()]
#!P: Next line may have expired, but contains non-constant expression
#!P: or a relative SCANFROM clause
REM 2025 Oct [a] MSG Nonconst IS set
#!P: Next line has expired, but contains expression... please verify
#!P: Expired: REM 2025 Oct [1] MSG Expr but not nonconst [today()]
#!P: Expired: REM 2025-10-01 MSG No expr seen [1+2]
# translations
{"LANGID":"en"}
# rem2ps begin
January 2026 31 4 0
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
December 31
February 28
# rem2ps end
# translations
{"LANGID":"en"}
# rem2ps begin
January 2026 31 4 0
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
December 31
February 28
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
-stdin-(2): `/': Division by zero
# rem2ps end

View File

@@ -1589,9 +1589,11 @@ dump -c a
set a eval("1 +")
set a eval("1/0")
set a eval("1 / / 2")
set a eval("1 / # 2")
set a catch(eval("1 +"), 33)
set a catch(eval("1/0"), 34)
set a catch(eval("1 / / 2"), 35)
set a catch(eval("1 / # 2"), 35)
# Ensure RUN is disabled in eval
set a shell("echo foo")
@@ -1765,6 +1767,8 @@ set a mbchar(0)
set a mbchar(0, 120)
set a mbchar(120, 0)
# Make sure trailing space doesn't cause a diagnostic.
set a "foo"
DEBUG -x
# Don't want Remind to queue reminders
EXIT

View File

@@ -54,26 +54,18 @@ evaltrig("Wednesday at 23:00 TZ Europe/Amsterdam") => 2025-09-03@17:00
evaltrig("Wednesday at 23:00 TZ America/Los_Angele"...) => 2025-09-04@02:00
evaltrig("Wednesday TZ Europe/Amsterdam") => TZ specified for non-timed reminder
-stdin-(11): evaltrig(): TZ specified for non-timed reminder
trig("Mon at 00:00 TZ Australia/Sydney", "Tue at 00:00 TZ America/Toronto", "Wed at 00:00 TZ Europe/Amsterdam", "Thu at 00:00 TZ America/Los_Angeles", "Fri at 00:00 TZ Australia/Sydney", "Sat at 00:00 TZ Australia/Sydney", "Sun at 00:00 TZ Australia/Sydney", "at 14:42") => -stdin-(14:21): Trig(tz_adj Australia/Sydney) = Sunday, 31 August, 2025 AT 10:00
trig("Mon at 00:00 TZ Australia/Sydney", "Tue at 00:00 TZ America/Toronto", "Wed at 00:00 TZ Europe/Amsterdam", "Thu at 00:00 TZ America/Los_Angeles", "Fri at 00:00 TZ Australia/Sydney", "Sat at 00:00 TZ Australia/Sydney", "Sun at 00:00 TZ Australia/Sydney", "at 14:42") => -stdin-(14:21): Trig = Monday, 8 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Sunday, 7 September, 2025 AT 10:00
-stdin-(14:21): Trig = Monday, 8 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Sunday, 7 September, 2025 AT 10:00
-stdin-(14:21): Trig(tz_adj America/Toronto) = Tuesday, 2 September, 2025 AT 00:00
-stdin-(14:21): Trig = Tuesday, 2 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj America/Toronto) = Tuesday, 2 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Europe/Amsterdam) = Tuesday, 2 September, 2025 AT 18:00
-stdin-(14:21): Trig = Wednesday, 3 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Europe/Amsterdam) = Tuesday, 2 September, 2025 AT 18:00
-stdin-(14:21): Trig(tz_adj America/Los_Angeles) = Thursday, 4 September, 2025 AT 03:00
-stdin-(14:21): Trig = Thursday, 4 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj America/Los_Angeles) = Thursday, 4 September, 2025 AT 03:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Thursday, 4 September, 2025 AT 10:00
-stdin-(14:21): Trig = Friday, 5 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Thursday, 4 September, 2025 AT 10:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Friday, 5 September, 2025 AT 10:00
-stdin-(14:21): Trig = Saturday, 6 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Friday, 5 September, 2025 AT 10:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Saturday, 6 September, 2025 AT 10:00
-stdin-(14:21): Trig = Sunday, 7 September, 2025 AT 00:00
-stdin-(14:21): Trig(tz_adj Australia/Sydney) = Saturday, 6 September, 2025 AT 10:00
-stdin-(14:21): Trig = Monday, 1 September, 2025 AT 14:42

View File

@@ -26,7 +26,9 @@ set a utctolocal('2050-01-01@01:00')
set a localtoutc('2050-12-31@23:44')
set a localtoutc('2050-03-13@00:00')
set a localtoutc('2050-03-13@02:00')
# This next one fails on MUSL, so it's commented out.
# We expect 2050-03-13@07:00 but MUSL gives 2050-03-13@06:00
#set a localtoutc('2050-03-13@02:00')
set a localtoutc('2050-11-06@00:00')
set a localtoutc('2050-11-06@02:00')