mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 14:28:40 +02:00
Compare commits
88 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d59fe832fd | ||
|
|
88ebdf275e | ||
|
|
a7a6f8b5f0 | ||
|
|
3e248c069e | ||
|
|
65cca1fd8f | ||
|
|
5a889043ba | ||
|
|
6d1fcdf246 | ||
|
|
3476b965ef | ||
|
|
0bba2dc3b3 | ||
|
|
e5c27f19f5 | ||
|
|
f9aa53433e | ||
|
|
5323245529 | ||
|
|
deb12ac7cd | ||
|
|
a1488d93ad | ||
|
|
65add3d32e | ||
|
|
8d6f5efa7b | ||
|
|
eb996a8146 | ||
|
|
1cd6205cdd | ||
|
|
6d9ccc1522 | ||
|
|
0268020579 | ||
|
|
5803d1dd7e | ||
|
|
5dfce21af6 | ||
|
|
8ddb956f9a | ||
|
|
32421815cd | ||
|
|
dbe3bc13fa | ||
|
|
c68c716585 | ||
|
|
7a1a5abc0f | ||
|
|
53a1318306 | ||
|
|
78fecf28c4 | ||
|
|
6081d29b11 | ||
|
|
e0a5125ee0 | ||
|
|
c3f790a99b | ||
|
|
3eb507451e | ||
|
|
e9e0368418 | ||
|
|
759ae1ab80 | ||
|
|
e8602824a0 | ||
|
|
62301a88cc | ||
|
|
6b163092c7 | ||
|
|
f8ac99d22e | ||
|
|
4b7870f6b1 | ||
|
|
e11b899f7e | ||
|
|
8e4987eeba | ||
|
|
aa56d27aea | ||
|
|
b3278cd9d5 | ||
|
|
09814eac68 | ||
|
|
0e8889441d | ||
|
|
d9503bd14d | ||
|
|
a5c18f8825 | ||
|
|
f7fc9f57bd | ||
|
|
6931c81716 | ||
|
|
2eb80c4ba1 | ||
|
|
f5dbba3864 | ||
|
|
3fc57fb76e | ||
|
|
ff9d27a6ca | ||
|
|
e82767f821 | ||
|
|
772daaa877 | ||
|
|
941cb0f63e | ||
|
|
15960f7e4a | ||
|
|
f05ef363fc | ||
|
|
a22b0b8daf | ||
|
|
382ff47369 | ||
|
|
cab749b651 | ||
|
|
2dc5a7776d | ||
|
|
2723875a18 | ||
|
|
81a186607b | ||
|
|
5534bf8272 | ||
|
|
f726b09fc6 | ||
|
|
f07a6d1bed | ||
|
|
a0a362c418 | ||
|
|
0b45bc818b | ||
|
|
b6ad32749b | ||
|
|
ec36fc8cf8 | ||
|
|
2afb71b233 | ||
|
|
4bf9abc791 | ||
|
|
51d895dbb1 | ||
|
|
517251dd05 | ||
|
|
834741f91b | ||
|
|
19b33bb9bc | ||
|
|
1acb343cf3 | ||
|
|
b5b00468cc | ||
|
|
5042621073 | ||
|
|
e2152b1e82 | ||
|
|
4adfc4b20e | ||
|
|
6a4a1ab2d5 | ||
|
|
a19b79951e | ||
|
|
21f5462657 | ||
|
|
b3f03e3e0c | ||
|
|
593d367eaa |
@@ -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:
|
||||
|
||||
|
||||
109
configure
vendored
109
configure
vendored
@@ -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.04.
|
||||
# Generated by GNU Autoconf 2.72 for remind 06.01.08.
|
||||
#
|
||||
#
|
||||
# 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.04'
|
||||
PACKAGE_STRING='remind 06.01.04'
|
||||
PACKAGE_VERSION='06.01.08'
|
||||
PACKAGE_STRING='remind 06.01.08'
|
||||
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.04 to adapt to many kinds of systems.
|
||||
'configure' configures remind 06.01.08 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.04:";;
|
||||
short | recursive ) echo "Configuration of remind 06.01.08:";;
|
||||
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.04
|
||||
remind configure 06.01.08
|
||||
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.04, which was
|
||||
It was created by remind $as_me 06.01.08, 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,70 @@ 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
|
||||
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="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||
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; }
|
||||
CFLAGS="$CFLAGS -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="$CFLAGS -Wall -Wextra -Wstrict-prototypes -flto=auto"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -4848,7 +4895,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.04, which was
|
||||
This file was extended by remind $as_me 06.01.08, which was
|
||||
generated by GNU Autoconf 2.72. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -4913,7 +4960,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.04
|
||||
remind config.status 06.01.08
|
||||
configured by $0, generated by GNU Autoconf 2.72,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
50
configure.ac
50
configure.ac
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(remind, 06.01.04, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_INIT(remind, 06.01.08, , , 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,38 @@ 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
|
||||
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="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([whether $CC supports -ffat-lto-object])
|
||||
CFLAGS="$CFLAGS -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="$CFLAGS -Wall -Wextra -Wstrict-prototypes -flto=auto"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
329
docs/WHATSNEW
329
docs/WHATSNEW
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -160,7 +159,7 @@ Helvetica-BoldOblique.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-s\fR[\fBthed\fR] \fIsize\fR
|
||||
Set the size (in points) of the text for the the calendar title,
|
||||
Set the size (in points) of the text for the calendar title,
|
||||
day-of-week headings, the calendar entries, and the day numbers,
|
||||
respectively. \fISize\fR must be a decimal number. The default sizes
|
||||
are equivalent to specifying:
|
||||
@@ -205,7 +204,7 @@ illustrated with examples:
|
||||
.fi
|
||||
.PP
|
||||
That example creates a blank calendar for the entire year of 1994, and
|
||||
sends it the the printer named "laser."
|
||||
sends it to the printer named "laser."
|
||||
.PP
|
||||
.nf
|
||||
remind \-p ~/.reminders | rem2ps \-l \-sd 18 > cal.ps
|
||||
@@ -581,7 +580,7 @@ If an AT clause was present, this key contains the event start time in
|
||||
the format \fIYYYY-MM-DD\fRT\fIHH:MM\fR in the \fIsystem default time zone\fR.
|
||||
.TP
|
||||
.B eventstart_in_tz \fIdt\fR
|
||||
If a TZ clause was present, this key containes the event start time in
|
||||
If a TZ clause was present, this key contains the event start time in
|
||||
the format \fIYYYY-MM-DD\fRT\fIHH:MM\fR in the \fItime zone specified
|
||||
by TZ\fR.
|
||||
.TP
|
||||
|
||||
@@ -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
|
||||
@@ -514,7 +513,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 +1358,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
|
||||
@@ -1789,7 +1788,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 +2045,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 +2132,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
|
||||
@@ -2264,9 +2263,20 @@ adjusted to Thursday, 14 May 2026 at 06:59 UTC because of the
|
||||
time zone adjustment.
|
||||
.PP
|
||||
If you use an invalid time zone name after the \fBTZ\fR keyword,
|
||||
results are undefined. Unfortunately, \fBRemind\fR cannot diagnose
|
||||
this error becase the C library \fBtzset()\fR function has no
|
||||
error return.
|
||||
results are undefined. As mentioned previously, time zone names
|
||||
\fIare\fR case-sensitive; America/Toronto is valid, but
|
||||
america/toronto is not.
|
||||
.PP
|
||||
If you are on a system that stores time zone data in
|
||||
/usr/share/zoneinfo, then \fBRemind\fR will attempt to validate the
|
||||
time zone name and will warn you if it appears to be invalid. If you
|
||||
want to specify a time zone that lacks a file under
|
||||
/usr/share/zoneinfo anyway, and want to suppress the warning, prefix
|
||||
the time zone name with "!". For example:
|
||||
.PP
|
||||
.nf
|
||||
REM Thursday AT 14:45 TZ !EST+5EDT,M3.2.0/2,M11.1.0/2 MSG Old TZ format
|
||||
.fi
|
||||
.PP
|
||||
In a reminder with the \fBTZ\fR keyword, OMIT dates are evaluated in
|
||||
the specified time zone. Here's an example: Suppose the local time zone
|
||||
@@ -3420,7 +3430,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
|
||||
@@ -4725,7 +4735,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.
|
||||
@@ -5074,6 +5084,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")
|
||||
@@ -5083,6 +5094,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
|
||||
@@ -5296,8 +5313,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:
|
||||
@@ -5584,8 +5600,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
|
||||
@@ -6442,7 +6456,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
|
||||
|
||||
@@ -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,9 +53,10 @@ 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
|
||||
@@ -76,7 +76,7 @@ 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
|
||||
@@ -110,7 +110,7 @@ The seventh control specifies what \fBRemind\fR should do if a reminder
|
||||
falls on a holiday or weekend.
|
||||
|
||||
Enter the body of the reminder into the \fBSummary:\fR text entry. If
|
||||
you want, you can enter a location, a URL, and and longer description
|
||||
you want, you can enter a location, a URL, and a longer description
|
||||
in the \fBLocation:\fR, \fBURL:\fR and \fBDescription:\fR boxes. If
|
||||
you enter anything here, they will be added as \fBINFO\fR items to the
|
||||
reminder.
|
||||
@@ -168,6 +168,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 cut-and-paste the command into a shell prompt and
|
||||
adjust as needed if you want to use any \fBrem2pdf\fR or \fBrem2ps\fR
|
||||
options that are not directly supported by \fBTkRemind\fR.
|
||||
|
||||
.SH EDITING REMINDERS
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ my $settings = {
|
||||
entry_font => 'Sans',
|
||||
small_cal_font => 'Sans',
|
||||
|
||||
title_url => '',
|
||||
title_size => 14,
|
||||
header_size => 12,
|
||||
daynum_size => 14,
|
||||
@@ -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,28 @@ 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
|
||||
Specify the size of the day number font in 1/72ndths of an inch. The
|
||||
default is 14.
|
||||
|
||||
=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 +545,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 +622,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:
|
||||
|
||||
@@ -476,6 +476,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 +529,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 +547,7 @@ sub render
|
||||
$cr->stroke();
|
||||
}
|
||||
|
||||
$cr->restore;
|
||||
if ($settings->{verbose}) {
|
||||
print STDERR "rem2pdf: Rendered " . $self->{monthname} . ' ' . $self->{year} . "\n";
|
||||
}
|
||||
@@ -542,6 +555,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
|
||||
@@ -638,7 +663,7 @@ sub draw_day
|
||||
$cr->set_source_rgb($shade->{r} / 255,
|
||||
$shade->{g} / 255,
|
||||
$shade->{b} / 255);
|
||||
$cr->rectangle($x1, $y1, $x2 - $x1, $y2 - $y1);
|
||||
$cr->rectangle($x1, $y1, $x2 - $x1, $y2 - $y1 + $settings->{border_size});
|
||||
$cr->fill();
|
||||
$cr->restore;
|
||||
}
|
||||
@@ -655,6 +680,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 +690,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 +766,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 +792,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 +804,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 +889,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 +911,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 +929,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();
|
||||
@@ -1055,6 +1119,16 @@ 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;
|
||||
# Set up bounding box
|
||||
@@ -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();
|
||||
@@ -1232,6 +1308,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 +1333,7 @@ sub draw_lines
|
||||
$cr->line_to($x, $self->{bounding_box}[3]);
|
||||
$cr->stroke();
|
||||
}
|
||||
$cr->restore;
|
||||
}
|
||||
|
||||
sub create_from_hash
|
||||
|
||||
@@ -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 + $settings->{border_size} - $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};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -252,6 +252,8 @@ set Rem2PDF "rem2pdf"
|
||||
# Check if we have Rem2PDF
|
||||
set HaveRem2PDF 0
|
||||
|
||||
set InModalDialog 0
|
||||
|
||||
set a [exec sh -c "$Rem2PDF < /dev/null 2>&1 || true"]
|
||||
|
||||
if {[string match "rem2pdf:*" "$a"]} {
|
||||
@@ -753,6 +755,8 @@ proc CreateCalWindow { dayNames } {
|
||||
balloon_add_help .b.queue "See the queue of pending reminders (debugging purposes only)"
|
||||
button .b.quit -text {Quit} -command {Quit} -bd 0 -foreground $Option(LabelColor) -background $Option(WinBackground) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
balloon_add_help .b.quit "Quit TkRemind"
|
||||
button .b.help -text {Help} -command [list ShowManPage tkremind 1 1] -bd 0 -foreground $Option(LabelColor) -background $Option(WinBackground) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
balloon_add_help .b.help "Show TkRemind manual"
|
||||
label .b.status -text "" -width 25 -relief flat -bd 0 -foreground $Option(LabelColor) -background $Option(WinBackground) -highlightthickness 0
|
||||
bind .b.status <ButtonPress-1> [list ShowTodaysReminders 1 ""]
|
||||
bind .b.status <ButtonPress-3> [list ShowTodaysReminders 1 ""]
|
||||
@@ -761,7 +765,7 @@ proc CreateCalWindow { dayNames } {
|
||||
balloon_add_help .b.nqueued "See the queue of pending reminders (debugging purposes only)"
|
||||
bind .b.nqueued <ButtonPress-1> [list DoQueue]
|
||||
bind .b.nqueued <ButtonPress-3> [list DoQueue]
|
||||
pack .b.prev .b.this .b.next .b.goto .b.print .b.options .b.queue .b.quit -side left -fill both -padx 1
|
||||
pack .b.prev .b.this .b.next .b.goto .b.print .b.options .b.queue .b.quit .b.help -side left -fill both -padx 1
|
||||
pack .b.status -side left -fill both -expand 1 -padx 1
|
||||
pack .b.nqueued -side left -fill both -padx 1
|
||||
pack .b -side bottom -fill x -expand 0 -pady 1
|
||||
@@ -1046,6 +1050,7 @@ proc SaveOptions { w } {
|
||||
.b.print configure -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||
.b.queue configure -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||
.b.quit configure -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||
.b.help configure -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||
.b.options configure -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||
. configure -background $Option(LineColor)
|
||||
.h configure -background $Option(LineColor)
|
||||
@@ -1408,11 +1413,25 @@ proc Status { stuff } {
|
||||
# None
|
||||
#---------------------------------------------------------------------------
|
||||
proc DoPrint {} {
|
||||
global InModalDialog
|
||||
if { $InModalDialog } {
|
||||
return 0
|
||||
}
|
||||
set InModalDialog 1
|
||||
catch { DoPrintHelper } err more
|
||||
puts $err
|
||||
puts $more
|
||||
set InModalDialog 0
|
||||
}
|
||||
|
||||
proc DoPrintHelper {} {
|
||||
global Rem2PS Rem2PDF HaveRem2PDF PSCmd Option PrintStatus RemindErrors
|
||||
global CurMonth CurYear MonthNames
|
||||
|
||||
catch {destroy .p}
|
||||
toplevel .p
|
||||
bind .p <ButtonPress-1> [list raise .p]
|
||||
|
||||
wm title .p "TkRemind Print..."
|
||||
wm iconname .p "Print..."
|
||||
frame .p.f1 -relief sunken -bd 2
|
||||
@@ -1459,8 +1478,10 @@ proc DoPrint {} {
|
||||
checkbutton .p.calendars -text "Print small calendars" -variable Option(PrintSmallCalendars)
|
||||
|
||||
button .p.print -text "Print" -command {set PrintStatus print}
|
||||
button .p.showcmd -text "Show Command" -command { set PrintStatus showcmd }
|
||||
button .p.cancel -text "Cancel" -command {set PrintStatus cancel}
|
||||
|
||||
wm protocol .p WM_DELETE_WINDOW { .p.cancel flash; .p.cancel invoke }
|
||||
if {$HaveRem2PDF} {
|
||||
pack .p.f1 .p.ff .p.f2 .p.f2a .p.f3 .p.f3a \
|
||||
-side top -fill both -expand 1 -anchor w
|
||||
@@ -1482,7 +1503,7 @@ proc DoPrint {} {
|
||||
pack .p.size .p.letter .p.a4 -in .p.f2 -side top -fill none -expand 0 -anchor w
|
||||
pack .p.margin .p.24pt .p.36pt .p.48pt -in .p.f2a -side top -anchor w -fill none -expand 0
|
||||
pack .p.orient .p.landscape .p.portrait -in .p.f3 -side top -fill none -expand 0 -anchor w
|
||||
pack .p.print .p.cancel -in .p.f4 -side left -fill none -expand 0
|
||||
pack .p.print .p.showcmd .p.cancel -in .p.f4 -side left -fill none -expand 0
|
||||
|
||||
bind .p <KeyPress-Escape> ".p.cancel flash; .p.cancel invoke"
|
||||
bind .p <KeyPress-Return> ".p.print flash; .p.print invoke"
|
||||
@@ -1597,12 +1618,34 @@ proc DoPrint {} {
|
||||
}
|
||||
|
||||
append cmd " $fname"
|
||||
Status "Printing..."
|
||||
if {[catch {exec /bin/sh "-c" $cmd} err]} {
|
||||
set RemindErrors [unique_lines $err]
|
||||
set_button_to_errors
|
||||
if {$PrintStatus == "showcmd"} {
|
||||
puts "SHOWING COMMAND"
|
||||
catch { destroy .pc }
|
||||
toplevel .pc -background $Option(WinBackground)
|
||||
text .pc.t -width 80 -height 10 -font TkFixedFont -foreground $Option(TextColor) -background $Option(BackgroundColor) -yscrollcommand ".pc.sb set" -wrap word
|
||||
scrollbar .pc.sb -orient vertical -command ".pc.t yview"
|
||||
button .pc.ok -text "OK" -command "destroy .pc" -foreground $Option(LabelColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
grid .pc.t -row 0 -column 0 -sticky nsew
|
||||
grid .pc.sb -row 0 -column 1 -sticky ns
|
||||
grid .pc.ok -row 1 -column 0 -sticky w
|
||||
grid columnconfigure .pc 0 -weight 1
|
||||
grid columnconfigure .pc 1 -weight 0
|
||||
grid rowconfigure .pc 0 -weight 1
|
||||
grid rowconfigure .pc 1 -weight 0
|
||||
CenterWindow .pc .
|
||||
.pc.t insert end "Command for printing calendar follows; cut-and-paste and adjust as needed:\n\n"
|
||||
.pc.t insert end $cmd
|
||||
.pc.t configure -state disabled
|
||||
wm deiconify .pc
|
||||
puts "DONE SHOWING COMMAND"
|
||||
} else {
|
||||
Status "Printing..."
|
||||
if {[catch {exec /bin/sh "-c" $cmd} err]} {
|
||||
set RemindErrors [unique_lines $err]
|
||||
set_button_to_errors
|
||||
}
|
||||
DisplayTime
|
||||
}
|
||||
DisplayTime
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1610,7 +1653,14 @@ proc DoPrint {} {
|
||||
# Arguments: none
|
||||
#---------------------------------------------------------------------------
|
||||
proc PrintFileBrowse {} {
|
||||
set ans [BrowseForFile .filebrowse "Print to file..." "Ok" 0 "*.ps"]
|
||||
global Option
|
||||
if { $Option(PrintFormat) == "pdf" } {
|
||||
set pattern "*.pdf"
|
||||
} else {
|
||||
set pattern "*.ps"
|
||||
}
|
||||
|
||||
set ans [BrowseForFile .filebrowse "Print to file..." "Ok" 0 $pattern]
|
||||
if {$ans != ""} {
|
||||
.p.filename delete 0 end
|
||||
.p.filename insert end $ans
|
||||
@@ -1747,6 +1797,14 @@ proc complete_through_today { w } {
|
||||
#---------------------------------------------------------------------------
|
||||
proc CreateModifyDialog {w day firstDay args} {
|
||||
|
||||
bind $w <Destroy> {
|
||||
global InModalDialog ModifyDialogResult
|
||||
set InModalDialog 0
|
||||
set ModifyDialogResult -2
|
||||
}
|
||||
|
||||
wm protocol $w WM_DELETE_WINDOW { .mod.but1 flash; .mod.but1 invoke }
|
||||
|
||||
# Set up: Year, Month, Day, WeekdayName
|
||||
global CurYear CurMonth EnglishDayNames MonthNames OptionType SkipType
|
||||
global ModifyDialogResult TwentyFourHourMode DateOfEventBeingEdited
|
||||
@@ -2216,7 +2274,17 @@ proc CreateYearMenu {w {every 1}} {
|
||||
# d -- which day to modify
|
||||
# firstDay -- first weekday in month (0-6)
|
||||
#---------------------------------------------------------------------------
|
||||
proc ModifyDay {d firstDay} {
|
||||
proc ModifyDay { d firstDay} {
|
||||
global InModalDialog
|
||||
if { $InModalDialog } {
|
||||
return
|
||||
}
|
||||
set InModalDialog 1
|
||||
catch { ModifyDayHelper $d $firstDay }
|
||||
set InModalDialog 0
|
||||
}
|
||||
|
||||
proc ModifyDayHelper {d firstDay} {
|
||||
global ModifyDialogResult AppendFile HighestTagSoFar
|
||||
catch {destroy .mod}
|
||||
toplevel .mod
|
||||
@@ -2226,15 +2294,18 @@ proc ModifyDay {d firstDay} {
|
||||
tkwait visibility .mod
|
||||
set oldFocus [focus]
|
||||
toggle_complete_through .mod
|
||||
bind .mod <ButtonPress-1> [list raise .mod]
|
||||
while {1} {
|
||||
grab .mod
|
||||
raise .mod
|
||||
focus .mod.entry
|
||||
catch {
|
||||
grab .mod
|
||||
raise .mod
|
||||
focus .mod.entry
|
||||
}
|
||||
set ModifyDialogResult -1
|
||||
tkwait variable ModifyDialogResult
|
||||
if {$ModifyDialogResult == 1} {
|
||||
if {$ModifyDialogResult == 1 || $ModifyDialogResult == -2 || ![winfo exists .mod]} {
|
||||
catch {focus $oldFocus}
|
||||
destroy .mod
|
||||
catch { destroy .mod }
|
||||
return 0
|
||||
}
|
||||
set problem [catch {set rem [CreateReminder .mod]} err]
|
||||
@@ -2244,9 +2315,10 @@ proc ModifyDay {d firstDay} {
|
||||
} else {
|
||||
if {$ModifyDialogResult == 3} {
|
||||
set rem [EditReminder $rem Cancel "Add reminder"]
|
||||
if {$ModifyDialogResult == 1} {
|
||||
if {$ModifyDialogResult == 1 || $ModifyDialogResult == -2} {
|
||||
continue
|
||||
}
|
||||
set ModifyDialogResult 2
|
||||
}
|
||||
set opts [RemindDialogToOptions .mod]
|
||||
catch {focus $oldFocus}
|
||||
@@ -2613,6 +2685,10 @@ proc EditReminder {rem args} {
|
||||
text .edit.t -width 80 -height 5 -relief sunken
|
||||
.edit.t insert end $rem
|
||||
frame .edit.f
|
||||
bind .edit <Destroy> {
|
||||
global ModifyDialogResult
|
||||
set ModifyDialogResult -2
|
||||
}
|
||||
set n 0
|
||||
foreach but $args {
|
||||
incr n
|
||||
@@ -2622,16 +2698,28 @@ proc EditReminder {rem args} {
|
||||
pack .edit.t -side top -fill both -expand 1
|
||||
pack .edit.f -side top -fill x -expand 1
|
||||
bind .edit <KeyPress-Escape> ".edit.but1 flash; .edit.but1 invoke"
|
||||
wm protocol .edit WM_DELETE_WINDOW { .edit.but1 flash; .edit.but1 invoke }
|
||||
set ModifyDialogResult 0
|
||||
CenterWindow .edit .
|
||||
bind .edit <ButtonPress-1> {
|
||||
catch { raise .mod }
|
||||
raise .edit
|
||||
}
|
||||
tkwait visibility .edit
|
||||
set oldFocus [focus]
|
||||
focus .edit.t
|
||||
grab .edit
|
||||
tkwait variable ModifyDialogResult
|
||||
catch {focus $oldFocus}
|
||||
if {$ModifyDialogResult == -2 || ![winfo exists .edit]} {
|
||||
catch {destroy .edit}
|
||||
return ""
|
||||
}
|
||||
set rem [.edit.t get 1.0 end]
|
||||
catch {destroy .edit}
|
||||
catch {
|
||||
bind .edit <Destroy> ""
|
||||
destroy .edit
|
||||
}
|
||||
return $rem
|
||||
}
|
||||
|
||||
@@ -2722,6 +2810,7 @@ proc BrowseForFile {w title {oktext "OK"} {showdots 0} {filter "*"}} {
|
||||
# Fill in the box and wait for status to change
|
||||
BrowseForFileRead $w [pwd]
|
||||
|
||||
bind $w <ButtonPress-1> "catch { raise .p } ; raise $w"
|
||||
bind $w <KeyPress-Escape> "$w.cancel flash; $w.cancel invoke"
|
||||
bind $w.list <Button-1> "$w.entry delete 0 end; $w.entry insert 0 \[selection get\]"
|
||||
bind $w.list <Double-Button-1> "$w.ok flash; $w.ok invoke"
|
||||
@@ -2732,6 +2821,7 @@ proc BrowseForFile {w title {oktext "OK"} {showdots 0} {filter "*"}} {
|
||||
bind $w.entry <KeyPress-space> "ExpandFile $w"
|
||||
bindtags $w.entry "Entry $w.entry $w all"
|
||||
|
||||
wm protocol $w WM_DELETE_WINDOW "$w.cancel flash; $w.cancel invoke"
|
||||
bindtags $w.list "Listbox $w.list $w all"
|
||||
CenterWindow $w .
|
||||
set oldFocus [focus]
|
||||
@@ -2927,7 +3017,7 @@ proc ShowQueue { queue } {
|
||||
wm iconname $w "Queue Dbg"
|
||||
text $w.t -fg black -bg white -width 80 -height 30 -wrap word -yscrollcommand "$w.sb set" -foreground $Option(TextColor) -background $Option(BackgroundColor) -font CalBoxFont
|
||||
scrollbar $w.sb -orient vertical -command "$w.text yview"
|
||||
button $w.ok -text "OK" -command "destroy $w" -foreground $Option(TextColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
button $w.ok -text "OK" -command "destroy $w" -foreground $Option(LabelColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
grid $w.t -row 0 -column 0 -sticky nsew
|
||||
grid $w.sb -row 0 -column 1 -sticky ns
|
||||
grid $w.ok -row 1 -column 0 -sticky w
|
||||
@@ -3884,6 +3974,16 @@ proc details_popup { pairs } {
|
||||
# Opens a dialog box to edit the current editable reminder
|
||||
#***********************************************************************
|
||||
proc EditTaggedReminder { w } {
|
||||
global InModalDialog
|
||||
if { $InModalDialog } {
|
||||
return
|
||||
}
|
||||
set InModalDialog 1
|
||||
catch { EditTaggedReminderHelper $w }
|
||||
set InModalDialog 0
|
||||
}
|
||||
|
||||
proc EditTaggedReminderHelper { w } {
|
||||
global ModifyDialogResult
|
||||
set tag [GetCurrentReminder $w]
|
||||
if {$tag == ""} {
|
||||
@@ -3902,6 +4002,7 @@ proc EditTaggedReminder { w } {
|
||||
return
|
||||
}
|
||||
|
||||
catch {destroy .mod}
|
||||
toplevel .mod
|
||||
CreateModifyDialog .mod 1 0 "Cancel" "Replace reminder" "Delete reminder" "Preview reminder"
|
||||
wm title .mod "TkRemind Edit Reminder..."
|
||||
@@ -3910,15 +4011,18 @@ proc EditTaggedReminder { w } {
|
||||
toggle_complete_through .mod
|
||||
tkwait visibility .mod
|
||||
set oldFocus [focus]
|
||||
bind .mod <ButtonPress-1> [list raise .mod]
|
||||
while {1} {
|
||||
raise .mod
|
||||
grab .mod
|
||||
focus .mod.entry
|
||||
catch {
|
||||
grab .mod
|
||||
raise .mod
|
||||
focus .mod.entry
|
||||
}
|
||||
set ModifyDialogResult -1
|
||||
tkwait variable ModifyDialogResult
|
||||
if {$ModifyDialogResult == 1} {
|
||||
if {$ModifyDialogResult == 1 || $ModifyDialogResult == -2 || ![winfo exists .mod]} {
|
||||
catch {focus $oldFocus}
|
||||
destroy .mod
|
||||
catch { destroy .mod }
|
||||
return 0
|
||||
}
|
||||
set problem [catch {set rem [CreateReminder .mod]} err]
|
||||
@@ -3928,13 +4032,13 @@ proc EditTaggedReminder { w } {
|
||||
}
|
||||
if {$ModifyDialogResult == 4} {
|
||||
set rem [EditReminder $rem "Cancel" "Replace reminder"]
|
||||
if {$ModifyDialogResult == 1} {
|
||||
if {$ModifyDialogResult == 1 || $ModifyDialogResult == -2} {
|
||||
continue
|
||||
}
|
||||
set ModifyDialogResult 2
|
||||
}
|
||||
set opts [RemindDialogToOptions .mod]
|
||||
catch {focus $oldFocus}
|
||||
destroy .mod
|
||||
set problem [catch {
|
||||
if {$ModifyDialogResult == 2} {
|
||||
ReplaceTaggedReminder $tag $rem $opts
|
||||
@@ -3942,6 +4046,7 @@ proc EditTaggedReminder { w } {
|
||||
DeleteTaggedReminder $tag
|
||||
}
|
||||
} err]
|
||||
catch { destroy .mod }
|
||||
if {$problem} {
|
||||
show_error $err
|
||||
return 1
|
||||
@@ -4365,7 +4470,7 @@ proc ShowTodaysReminders { force date } {
|
||||
wm iconname $w "Reminders"
|
||||
text $w.text -width 80 -height 20 -wrap word -yscrollcommand "$w.sb set" -foreground $Option(TextColor) -background $Option(BackgroundColor) -font CalboxFont -spacing1 3
|
||||
scrollbar $w.sb -orient vertical -command "$w.text yview"
|
||||
button $w.ok -text "OK" -command "destroy $w" -foreground $Option(TextColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
button $w.ok -text "OK" -command "destroy $w" -foreground $Option(LabelColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
|
||||
grid $w.text -row 0 -column 0 -sticky nsew
|
||||
grid $w.sb -row 0 -column 1 -sticky ns
|
||||
@@ -4876,6 +4981,205 @@ proc set_button_to_errors {} {
|
||||
.b.queue configure -text {Errors...} -command {ShowErrors} -bg #FF5555 -fg black
|
||||
}
|
||||
|
||||
proc ShowManPage { cmd jump destroy } {
|
||||
global Option env
|
||||
set w ".man"
|
||||
if { $destroy != 0 } {
|
||||
catch { destroy $w }
|
||||
set l [luminance $Option(WinBackground)]
|
||||
if {$l < 20000} {
|
||||
set link_color "#8888FF"
|
||||
} else {
|
||||
set link_color "#0000DD"
|
||||
}
|
||||
|
||||
toplevel $w -background $Option(WinBackground)
|
||||
text $w.t -width 84 -height 30 -wrap none -yscrollcommand "$w.sb set" -foreground $Option(TextColor) -background $Option(BackgroundColor) -font CalBoxFont
|
||||
$w.t tag configure bold -font {-weight bold}
|
||||
$w.t tag configure italic -font {-slant italic}
|
||||
$w.t tag configure underline -underline 1
|
||||
catch {
|
||||
$w.t tag configure underline -underlinefg $link_color
|
||||
}
|
||||
scrollbar $w.sb -orient vertical -command "$w.t yview"
|
||||
button $w.ok -text OK -command [list destroy $w] -foreground $Option(LabelColor) -background $Option(BackgroundColor) -highlightthickness 1 -highlightcolor $Option(LineColor) -highlightbackground $Option(WinBackground)
|
||||
grid $w.t -row 0 -column 0 -sticky nsew
|
||||
grid $w.sb -row 0 -column 1 -sticky ns
|
||||
grid $w.ok -row 1 -column 0 -stick w
|
||||
grid columnconfigure $w 0 -weight 1
|
||||
grid columnconfigure $w 1 -weight 0
|
||||
grid rowconfigure $w 0 -weight 1
|
||||
grid rowconfigure $w 1 -weight 0
|
||||
|
||||
$w.t tag configure man -foreground $link_color
|
||||
$w.t tag configure url -foreground $link_color
|
||||
# Not supported on old Tk versions
|
||||
catch {
|
||||
$w.t tag configure man -underlinefg $link_color
|
||||
$w.t tag configure url -underlinefg $link_color
|
||||
}
|
||||
$w.t tag bind man <ButtonPress-1> [list NavigateToManPage $w.t]
|
||||
$w.t tag bind man <Enter> [list ManEnter $w.t]
|
||||
$w.t tag bind man <Leave> [list ManLeave $w.t]
|
||||
$w.t tag bind man <Motion> [list ManMove $w.t]
|
||||
$w.t tag bind url <ButtonPress-1> [list ManURL $w.t]
|
||||
$w.t tag bind url <Enter> [list URLEnter $w.t]
|
||||
$w.t tag bind url <Leave> [list URLLeave $w.t]
|
||||
$w.t tag bind url <Motion> [list URLMove $w.t]
|
||||
} else {
|
||||
$w.t configure -state normal
|
||||
$w.t delete 1.0 end
|
||||
}
|
||||
set env(COLUMNS) 80
|
||||
set env(MANWIDTH) 80
|
||||
set env(MAN_KEEP_FORMATTING) 1
|
||||
set taglist {}
|
||||
set seealso 0
|
||||
if {[catch {
|
||||
set fp [open "|man $cmd" "r+"]
|
||||
while {[gets $fp line] >= 0} {
|
||||
# Some systems render bold as "X bs X" and underline as "_ bs X"
|
||||
# Convert them to our bold and italic indicators
|
||||
set line [regsub -all {((_\b.)+)} $line "\033\[3m\\0\033\[23m" ]
|
||||
set line [regsub -all {(_\b)} $line "" ]
|
||||
set line [regsub -all {((.\b.)+)} $line "\033\[1m\\0\033\[22m" ]
|
||||
set line [regsub -all {(.\b)} $line "" ]
|
||||
if {$jump != 0} {
|
||||
if {[regexp -- {THE.*CALENDAR.*WINDOW} $line]} {
|
||||
$w.t yview moveto 1
|
||||
}
|
||||
}
|
||||
if {[regexp -- {SEE.*ALSO} $line]} {
|
||||
set seealso 1
|
||||
} else {
|
||||
if {$seealso != 0} {
|
||||
set seealso 0
|
||||
lappend taglist man
|
||||
} else {
|
||||
set idx [lsearch -exact $taglist "man"]
|
||||
set taglist [lreplace $taglist $idx $idx]
|
||||
}
|
||||
}
|
||||
set old_taglist $taglist
|
||||
|
||||
$w.t insert end " ";
|
||||
set indexes [regexp -indices -inline -all -- {\e\[[0-9]+m} $line]
|
||||
if {[llength $indexes] > 0} {
|
||||
set out 0
|
||||
foreach i $indexes {
|
||||
set first [lindex $i 0]
|
||||
set last [lindex $i 1]
|
||||
set esc_seq [string range $line [expr $first+2] [expr $last-1]]
|
||||
switch -- $esc_seq {
|
||||
"0" {
|
||||
set idx [lsearch -exact $taglist "bold"]
|
||||
set taglist [lreplace $taglist $idx $idx]
|
||||
set idx [lsearch -exact $taglist "italic"]
|
||||
set taglist [lreplace $taglist $idx $idx]
|
||||
}
|
||||
"1" {
|
||||
lappend taglist "bold"
|
||||
}
|
||||
"3" {
|
||||
lappend taglist "italic"
|
||||
}
|
||||
"22" {
|
||||
set idx [lsearch -exact $taglist "bold"]
|
||||
set taglist [lreplace $taglist $idx $idx]
|
||||
}
|
||||
"23" {
|
||||
set idx [lsearch -exact $taglist "italic"]
|
||||
set taglist [lreplace $taglist $idx $idx]
|
||||
}
|
||||
}
|
||||
if { $first > $out } {
|
||||
ManAddLine $w.t [string range $line $out [expr $first-1]] $old_taglist
|
||||
}
|
||||
set old_taglist $taglist
|
||||
set out [expr $last+1]
|
||||
}
|
||||
if {$out < [string length $line]} {
|
||||
ManAddLine $w.t [string range $line $out end] $taglist
|
||||
}
|
||||
} else {
|
||||
ManAddLine $w.t $line $taglist
|
||||
}
|
||||
$w.t insert end "\n";
|
||||
}
|
||||
close $fp
|
||||
} err]} {
|
||||
$w.t insert end "Could not display TkRemind manual page: $err"
|
||||
}
|
||||
$w.t configure -state disabled
|
||||
if { $destroy } {
|
||||
CenterWindow $w .
|
||||
raise $w
|
||||
}
|
||||
wm title $w "$cmd Manual Page"
|
||||
focus $w.t
|
||||
}
|
||||
|
||||
proc ManAddLine { t text tags } {
|
||||
if {[lsearch -exact $tags man] >= 0} {
|
||||
$t insert end $text $tags
|
||||
return
|
||||
}
|
||||
if {[regexp -nocase -- {(.*)(https?://[-.a-z0-9_/]+)(.*)} $text m first url last]} {
|
||||
set t2 tags
|
||||
lappend t2 url
|
||||
$t insert end $first $tags
|
||||
$t insert end $url $t2
|
||||
$t insert end $last $tags
|
||||
return
|
||||
}
|
||||
$t insert end $text $tags
|
||||
}
|
||||
|
||||
proc URLEnter { t } {
|
||||
catch {
|
||||
$t configure -cursor arrow
|
||||
set r [$t tag prevrange url current]
|
||||
$t tag add underline [lindex $r 0] [lindex $r 1]
|
||||
}
|
||||
}
|
||||
proc URLLeave { t } {
|
||||
$t configure -cursor xterm
|
||||
$t tag remove underline 1.0 end
|
||||
}
|
||||
|
||||
proc URLMove { t } {
|
||||
URLLeave $t
|
||||
URLEnter $t
|
||||
}
|
||||
|
||||
proc ManURL { t } {
|
||||
catch {
|
||||
set r [$t tag prevrange url current]
|
||||
set url [$t get [lindex $r 0] [lindex $r 1]]
|
||||
exec xdg-open "$url?tkr=1"
|
||||
}
|
||||
}
|
||||
|
||||
proc ManEnter { t } {
|
||||
$t configure -cursor arrow
|
||||
$t tag add underline [list current wordstart] [list current wordend]
|
||||
}
|
||||
proc ManLeave { t } {
|
||||
$t configure -cursor xterm
|
||||
$t tag remove underline 1.0 end
|
||||
}
|
||||
|
||||
proc ManMove { t } {
|
||||
ManLeave $t
|
||||
ManEnter $t
|
||||
}
|
||||
|
||||
proc NavigateToManPage { t } {
|
||||
set text [$t get [list current wordstart] [list current wordend]]
|
||||
if {[regexp -nocase -- {[a-z0-9_]+} $text man]} {
|
||||
ShowManPage $man 0 0
|
||||
}
|
||||
}
|
||||
proc ShowErrors {} {
|
||||
global RemindErrors Option
|
||||
set w ".errors"
|
||||
@@ -4921,4 +5225,9 @@ proc DoneShowingErrors {} {
|
||||
destroy .errors
|
||||
}
|
||||
|
||||
proc luminance { color } {
|
||||
set rgb [winfo rgb . $color]
|
||||
return 0.299 * [lindex $rgb 0] + 0.587 * [lindex $rgb 1] + 0.114 * [lindex $rgb 2]
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
@@ -1870,7 +1870,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);
|
||||
@@ -2078,7 +2080,7 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
}
|
||||
|
||||
/* 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 +2111,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");
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
39
src/dorem.c
39
src/dorem.c
@@ -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),
|
||||
@@ -143,6 +143,7 @@ void EnterTimezone(char const *tz)
|
||||
CurYear = tm.tm_year + 1900;
|
||||
|
||||
DSEToday = DSE(CurYear, CurMon, CurDay);
|
||||
|
||||
/* Adjust DSEToday back by a day if midnight in our time zone requires it */
|
||||
if (SysTime < LocalSysTime) {
|
||||
DSEToday--;
|
||||
@@ -533,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) {
|
||||
@@ -545,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");
|
||||
@@ -631,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) {
|
||||
@@ -832,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) {
|
||||
@@ -1096,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;
|
||||
|
||||
@@ -1200,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;
|
||||
@@ -1236,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"));
|
||||
@@ -1264,6 +1274,20 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
||||
check_trigger_function(trig->warn, "WARN");
|
||||
check_trigger_function(trig->omitfunc, "OMITFUNC");
|
||||
}
|
||||
|
||||
/* Check that TZ looks plausible */
|
||||
if (trig->tz && (*trig->tz != '!')) {
|
||||
warn_if_timezone_bad(trig->tz);
|
||||
}
|
||||
|
||||
/* Remove leading ! from TZ spec */
|
||||
if (trig->tz && *trig->tz == '!') {
|
||||
char *stz = (char *) trig->tz;
|
||||
while (*stz) {
|
||||
*stz = *(stz+1);
|
||||
stz++;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1482,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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
37
src/funcs.c
37
src/funcs.c
@@ -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,10 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TERMIOS_H
|
||||
#include <sys/termios.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -1506,6 +1515,7 @@ static int FIsconst(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
PUT(PrintValue(ans, NULL));
|
||||
OUT();
|
||||
}
|
||||
DestroyValue(junk);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -2767,6 +2777,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 +2793,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 +4333,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 +4347,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 +4634,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 +4749,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;
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TERMIOS_H
|
||||
#include <sys/termios.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "globals.h"
|
||||
#include "protos.h"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -300,7 +300,9 @@ 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);
|
||||
void warn_if_timezone_bad(char const *tz);
|
||||
|
||||
|
||||
@@ -621,11 +621,15 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig const *tim
|
||||
if (trig->tz) {
|
||||
TimeTrig copy = *tim;
|
||||
int new_result;
|
||||
int force_retry = 0;
|
||||
ExitTimezone(trig->tz);
|
||||
new_result = AdjustTriggerForTimeZone(trig, result, ©);
|
||||
new_result = AdjustTriggerForTimeZone(trig, result, ©, 0);
|
||||
if (trig->scanfrom == NO_SCANFROM && new_result < DSEToday) {
|
||||
force_retry = 1;
|
||||
}
|
||||
EnterTimezone(trig->tz);
|
||||
if (result + duration_days >= today &&
|
||||
new_result + duration_days < today) {
|
||||
if (force_retry ||
|
||||
(result + duration_days >= today &&new_result + duration_days < today)) {
|
||||
/* If we are not making progress, then give up: It's expired */
|
||||
if (nextstart <= save_nextstart) {
|
||||
trig->expired = 1;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
55
src/utils.c
55
src/utils.c
@@ -28,10 +28,31 @@ static char const DontEscapeMe[] =
|
||||
#include <ctype.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "globals.h"
|
||||
#include "protos.h"
|
||||
|
||||
static int HaveZoneinfoDir = -1;
|
||||
|
||||
#define ZONE_DIR "/usr/share/zoneinfo"
|
||||
static int have_zoneinfo_dir(void)
|
||||
{
|
||||
struct stat sb;
|
||||
if (HaveZoneinfoDir < 0) {
|
||||
if (stat(ZONE_DIR, &sb) < 0) {
|
||||
HaveZoneinfoDir = 0;
|
||||
} else if ((sb.st_mode & S_IFMT) != S_IFDIR) {
|
||||
HaveZoneinfoDir = 0;
|
||||
} else {
|
||||
HaveZoneinfoDir = 1;
|
||||
}
|
||||
}
|
||||
return HaveZoneinfoDir;
|
||||
}
|
||||
|
||||
/* Call this instead of system() so if called ignores return code,
|
||||
we don't get a compiler warning. Also redirect stdin to /dev/null */
|
||||
int system1(char const *cmd)
|
||||
@@ -378,3 +399,37 @@ warning_level(char const *which)
|
||||
if (!WarningLevel) return 1;
|
||||
return strcmp(WarningLevel, which) >= 0;
|
||||
}
|
||||
|
||||
void
|
||||
warn_if_timezone_bad(char const *tz)
|
||||
{
|
||||
DynamicBuffer zfile;
|
||||
struct stat sb;
|
||||
int r;
|
||||
|
||||
if (!tz) {
|
||||
return;
|
||||
}
|
||||
if (!*tz) {
|
||||
return;
|
||||
}
|
||||
if (*tz == '!') {
|
||||
return;
|
||||
}
|
||||
if (!have_zoneinfo_dir()) {
|
||||
return;
|
||||
}
|
||||
DBufInit(&zfile);
|
||||
DBufPuts(&zfile, ZONE_DIR);
|
||||
DBufPuts(&zfile, "/");
|
||||
DBufPuts(&zfile, tz);
|
||||
r = stat(DBufValue(&zfile), &sb);
|
||||
DBufFree(&zfile);
|
||||
if (r < 0) {
|
||||
if (warning_level("06.01.05")) {
|
||||
Wprint(tr("No time zone file found for TZ `%s'... is it valid?"),
|
||||
tz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
976
tests/manpage-personal-dict
Normal file
976
tests/manpage-personal-dict
Normal file
@@ -0,0 +1,976 @@
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -31,9 +31,17 @@ REMIND="../src/remind --flush -q"
|
||||
OUT="../tests/test.out"
|
||||
CMP="../tests/test.cmp"
|
||||
# Set a known timezone so moon phases show up in predictable places
|
||||
TZ=Universal
|
||||
TZ=UTC
|
||||
export TZ
|
||||
|
||||
# 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
|
||||
if test $? = 0; then
|
||||
@@ -78,7 +86,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
|
||||
@@ -638,7 +646,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 +662,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 +726,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 +858,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 +930,28 @@ 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
|
||||
|
||||
# Purge mode
|
||||
|
||||
cmp -s $OUT $CMP
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Remind: Acceptance tests ${GRN}PASSED${NRM}"
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
export LC_ALL=C.UTF-8
|
||||
export LANG=C.UTF-8
|
||||
|
||||
DIR=`dirname $0`
|
||||
cd $DIR
|
||||
if test $? != 0 ; then
|
||||
@@ -37,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
|
||||
@@ -143,9 +146,9 @@ TZ=America/Los_Angeles $REMIND - 2026-01-01 <<'EOF' >> $OUT 2>&1
|
||||
BANNER %
|
||||
SET $AddBlankLines 0
|
||||
|
||||
REM AT 13:33 TZ America/Los_Angeles TZ Universal MSG Whatsup? %*l %3.
|
||||
REM AT 13:33 TZ America/Los_Angeles TZ UTC MSG Whatsup? %*l %3.
|
||||
REM AT 13:33 TZ "" TZ America/Los_Angeles MSG Whatsup? %*l %3.
|
||||
REM TZ Universal MSG Borked
|
||||
REM TZ UTC MSG Borked
|
||||
EOF
|
||||
|
||||
TZ=America/Toronto $REMIND -dx - 2025-09-01@01:00 <<'EOF' >> $OUT 2>&1
|
||||
@@ -190,6 +193,68 @@ TZ=America/Toronto $REMIND -s - 2025-10-01 <<'EOF' >> $OUT 2>&1
|
||||
REM Wednesday AT 14:00 TZ Australia/Sydney MSG 2PM Sydney
|
||||
EOF
|
||||
|
||||
echo "" >> $OUT
|
||||
# Every day and a SATISFY reminder
|
||||
TZ=America/Toronto $REMIND -s - 2025-10-01 <<'EOF' >> $OUT 2>&1
|
||||
REM AT 04:44 TZ America/Los_Angeles MSG 04:44 every day in L.A.
|
||||
REM 2 AT 05:00 TZ America/Los_Angeles MSG 05:00 on 2nd in L.A.
|
||||
REM Wed AT 06:00 TZ America/Los_Angeles MSG 06:00 on Wed in L.A.
|
||||
REM Wed AT 23:00 TZ America/Los_Angeles MSG 23:00 on Wed in L.A.
|
||||
REM AT 09:00 TZ America/Los_Angeles SATISFY [!($Td % 3)] MSG 09:00 every third day in L.A.
|
||||
REM AT 22:00 TZ America/Los_Angeles SATISFY [!($Td % 3)] MSG 22:00 every third day in L.A.
|
||||
EOF
|
||||
|
||||
echo "" >> $OUT
|
||||
# And the inverse
|
||||
TZ=America/Los_Angeles $REMIND -s - 2025-10-01 <<'EOF' >> $OUT 2>&1
|
||||
REM AT 04:44 TZ America/Toronto MSG 04:44 every day in T.O.
|
||||
REM 2 AT 05:00 TZ America/Toronto MSG 05:00 on 2nd in T.O.
|
||||
REM Wed AT 06:00 TZ America/Toronto MSG 06:00 on Wed in T.O.
|
||||
REM Wed AT 01:00 TZ America/Toronto MSG 01:00 on Wed in T.O.
|
||||
REM AT 09:00 TZ America/Toronto SATISFY [!($Td % 3)] MSG 09:00 every third day in T.O.
|
||||
REM AT 02:00 TZ America/Toronto SATISFY [!($Td % 3)] MSG 02:00 every third day in T.O.
|
||||
EOF
|
||||
|
||||
# Semi-exhaustive checking...
|
||||
OFFSETS="-12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12"
|
||||
cat <<'EOF' >> $OUT
|
||||
|
||||
NOTE NOTE NOTE: The notation UTC+n denotes a time zone n hours
|
||||
WEST of UTC, and UTC-n denotes a time zone n hours EAST of
|
||||
UTC... the opposite of what you might think. The zone
|
||||
UTC+1 is two hours EARLIER than UTC-1.
|
||||
|
||||
EOF
|
||||
|
||||
for src in $OFFSETS; do
|
||||
srczone="UTC$src"
|
||||
for dst in $OFFSETS ; do
|
||||
dstzone="UTC$dst"
|
||||
(echo 'BANNER %'; echo "REM AT 00:00 TZ !$dstzone MSG 00:00 at $dstzone in [getenv(\"TZ\")] is %3, %r %m; diff=[(\$Tt-00:00)/60]") | TZ=$srczone $REMIND '-i$addblanklines=0' - 2025-10-09@12:00 >> $OUT 2>&1
|
||||
done
|
||||
done
|
||||
for src in $OFFSETS; do
|
||||
srczone="UTC$src"
|
||||
for dst in $OFFSETS ; do
|
||||
dstzone="UTC$dst"
|
||||
(echo 'BANNER %'; echo "REM AT 12:00 TZ !$dstzone MSG 12:00 at $dstzone in [getenv(\"TZ\")] is %3, %r %m; diff=[(\$Tt-12:00)/60]") | TZ=$srczone $REMIND '-i$addblanklines=0' - 2025-10-09@12:00 >> $OUT 2>&1
|
||||
done
|
||||
done
|
||||
for src in $OFFSETS; do
|
||||
srczone="UTC$src"
|
||||
for dst in $OFFSETS ; do
|
||||
dstzone="UTC$dst"
|
||||
(echo 'BANNER %'; echo "REM 11 ++10 AT 00:00 TZ !$dstzone MSG 00:00 on 11th at $dstzone in [getenv(\"TZ\")] is %3, %r %m; diff=[(trigdatetime()-'2025-10-11@00:00')/60]") | TZ=$srczone $REMIND '-i$addblanklines=0' - 2025-10-09@12:00 >> $OUT 2>&1
|
||||
done
|
||||
done
|
||||
for src in $OFFSETS; do
|
||||
srczone="UTC$src"
|
||||
for dst in $OFFSETS ; do
|
||||
dstzone="UTC$dst"
|
||||
(echo 'BANNER %'; echo "REM 11 ++10 AT 12:00 TZ !$dstzone MSG 12:00 on 11th at $dstzone in [getenv(\"TZ\")] is %3, %r %m; diff=[(trigdatetime()-'2025-10-11@12:00')/60]") | TZ=$srczone $REMIND '-i$addblanklines=0' - 2025-10-09@12:00 >> $OUT 2>&1
|
||||
done
|
||||
done
|
||||
|
||||
cmp -s $OUT $CMP
|
||||
if [ "$?" = "0" ] ; then
|
||||
echo "Remind: Time zone tests ${GRN}PASSED${NRM}"
|
||||
|
||||
@@ -1046,7 +1046,7 @@ set a057 value("a05"+"6")
|
||||
"a05" + "6" => "a056"
|
||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
set a058 version()
|
||||
version() => "06.01.04"
|
||||
version() => "06.01.08"
|
||||
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.04"
|
||||
a058 "06.01.08"
|
||||
a059 "Saturday"
|
||||
a010 12
|
||||
a060 6
|
||||
@@ -5562,8 +5562,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.04"
|
||||
"06.01.04" > "01.00.00" => 1
|
||||
version() => "06.01.08"
|
||||
"06.01.08" > "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...
|
||||
@@ -23707,7 +23707,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.04
|
||||
06.01.08
|
||||
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
|
||||
@@ -24458,6 +24458,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
|
||||
@@ -25088,6 +25095,7 @@ TRANSLATE "Invalid translation: Both original and translated must have the same
|
||||
TRANSLATE "Missing REM type; assuming MSG" ""
|
||||
TRANSLATE "No Adar A in %d" ""
|
||||
TRANSLATE "No substition function `%s' defined" ""
|
||||
TRANSLATE "No time zone file found for TZ `%s'... is it valid?" ""
|
||||
TRANSLATE "Non-constant built-in function `%s' makes expression non-constant" ""
|
||||
TRANSLATE "Non-constant expression converted to constant by `const' built-in function" ""
|
||||
TRANSLATE "Nonexistence of global variable `%s' makes value() non-constant" ""
|
||||
@@ -39917,3 +39925,22 @@ 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]
|
||||
|
||||
2640
tests/tz.cmp
2640
tests/tz.cmp
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user