mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3562e2e4 | ||
|
|
2020ae35c1 | ||
|
|
9418043bb6 | ||
|
|
e2f786580c | ||
|
|
5aabb20630 | ||
|
|
a3c9ac2457 | ||
|
|
80e3671f9b | ||
|
|
e8e4362839 | ||
|
|
61ac3ca6ed | ||
|
|
eaf982e1cc | ||
|
|
0c27503a83 | ||
|
|
5878c2a714 | ||
|
|
6aa4d681e8 | ||
|
|
790a9ee384 | ||
|
|
d091af6e5b | ||
|
|
3ca9a69100 | ||
|
|
f6253d0fca | ||
|
|
3e6233b6f0 | ||
|
|
0ee5efa4df | ||
|
|
d4ed89f5ba | ||
|
|
34c864a38c | ||
|
|
6d4c38126e | ||
|
|
59c434ce34 | ||
|
|
a550af8fa6 | ||
|
|
3399646896 | ||
|
|
00e85e5ca2 | ||
|
|
9867d3cf34 | ||
|
|
0f4326726a | ||
|
|
1d208400cd | ||
|
|
b9b7e0d42a | ||
|
|
93316d754c | ||
|
|
14b6e23eaa | ||
|
|
7ae7edcb42 | ||
|
|
20a558f817 | ||
|
|
5118ccd120 | ||
|
|
18c4ed1c6d | ||
|
|
62e1a467f5 | ||
|
|
0933cd83b1 | ||
|
|
1ed7c83b24 | ||
|
|
3bae02f27d | ||
|
|
3b485f0632 | ||
|
|
a023d9dc5d | ||
|
|
4ccdfac8b8 | ||
|
|
1c52718ef0 | ||
|
|
4dde2a4b9d | ||
|
|
24f923ecfc | ||
|
|
45c0ba5e8f | ||
|
|
bccfe94921 | ||
|
|
f7e83ed082 | ||
|
|
40b87eff60 | ||
|
|
a8607cb012 | ||
|
|
6caa404e59 | ||
|
|
13e1e19855 | ||
|
|
96d40b81df | ||
|
|
30e4a9fc50 | ||
|
|
6d0fbeed20 | ||
|
|
3f1aaeefd2 | ||
|
|
326604fe18 | ||
|
|
57e93553bf |
@@ -3,7 +3,7 @@ THE REMIND COPYRIGHT
|
|||||||
1. REMIND refers to the entire set of files and documentation in the
|
1. REMIND refers to the entire set of files and documentation in the
|
||||||
REMIND package.
|
REMIND package.
|
||||||
|
|
||||||
2. REMIND is Copyright (C) 1992-2025 Dianne Skoll, except where noted in
|
2. REMIND is Copyright (C) 1992-2026 Dianne Skoll, except where noted in
|
||||||
individual files.
|
individual files.
|
||||||
|
|
||||||
3. DISTRIBUTION AND USE
|
3. DISTRIBUTION AND USE
|
||||||
|
|||||||
39
Makefile
39
Makefile
@@ -11,6 +11,33 @@ all: src/Makefile
|
|||||||
@echo ""
|
@echo ""
|
||||||
@cd src && $(MAKE) all LANGDEF=$(LANGDEF)
|
@cd src && $(MAKE) all LANGDEF=$(LANGDEF)
|
||||||
@$(MAKE) -C rem2pdf -f Makefile.top
|
@$(MAKE) -C rem2pdf -f Makefile.top
|
||||||
|
|
||||||
|
uninstall-script:
|
||||||
|
@echo "" >&2
|
||||||
|
@echo "*****************************" >&2
|
||||||
|
@echo "* *" >&2
|
||||||
|
@echo "* Creating Uninstall Script *" >&2
|
||||||
|
@echo "* *" >&2
|
||||||
|
@echo "*****************************" >&2
|
||||||
|
@echo "" >&2
|
||||||
|
|
||||||
|
@echo "#!/bin/sh"
|
||||||
|
@echo "echo 'This script will uninstall Remind'"
|
||||||
|
@echo "echo 'Enter y to uninstall Remind or anything else to abort'"
|
||||||
|
@echo "read ans"
|
||||||
|
@echo 'if test "$$ans" != "y" ; then'
|
||||||
|
@echo " echo 'NOT uninstalling Remind'"
|
||||||
|
@echo " exit 0"
|
||||||
|
@echo "fi"
|
||||||
|
@echo "echo 'Uninstalling Remind...'"
|
||||||
|
-@rm -rf `pwd`/.uninstall-dir > /dev/null 2>&1
|
||||||
|
@mkdir `pwd`/.uninstall-dir >&2
|
||||||
|
@$(MAKE) install DESTDIR=`pwd`/.uninstall-dir >&2
|
||||||
|
@cd `pwd`/.uninstall-dir && find . -type f | while read x ; do x=`echo $$x | sed -e 's|^\./|/|'`; echo "rm -f $$x"; done;
|
||||||
|
@echo "echo 'Done'"
|
||||||
|
-@rm -rf `pwd`/.uninstall-dir > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "**********************************"
|
@echo "**********************************"
|
||||||
@@ -19,9 +46,9 @@ install:
|
|||||||
@echo "* *"
|
@echo "* *"
|
||||||
@echo "**********************************"
|
@echo "**********************************"
|
||||||
@echo ""
|
@echo ""
|
||||||
@$(MAKE) -C src install
|
@$(MAKE) -C src install DESTDIR=$(DESTDIR)
|
||||||
@$(MAKE) -C rem2html install
|
@$(MAKE) -C rem2html install DESTDIR=$(DESTDIR)
|
||||||
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
|
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE) DESTDIR=$(DESTDIR)
|
||||||
clean:
|
clean:
|
||||||
-find . -name '*~' -exec rm {} \;
|
-find . -name '*~' -exec rm {} \;
|
||||||
-$(MAKE) -C src clean
|
-$(MAKE) -C src clean
|
||||||
@@ -35,9 +62,9 @@ install-stripped:
|
|||||||
@echo "* *"
|
@echo "* *"
|
||||||
@echo "**********************************"
|
@echo "**********************************"
|
||||||
@echo ""
|
@echo ""
|
||||||
@$(MAKE) -C src install-stripped
|
@$(MAKE) -C src install-stripped DESTDIR=$(DESTDIR)
|
||||||
@$(MAKE) -C rem2html install
|
@$(MAKE) -C rem2html install DESTDIR=$(DESTDIR)
|
||||||
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
|
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE) DESTDIR=$(DESTDIR)
|
||||||
|
|
||||||
test: test-basic test-tz
|
test: test-basic test-tz
|
||||||
|
|
||||||
|
|||||||
2
build.tk
2
build.tk
@@ -8,7 +8,7 @@
|
|||||||
# A cheesy graphical front-end for building and installing REMIND.
|
# A cheesy graphical front-end for building and installing REMIND.
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 Dianne Skoll
|
# Copyright (C) 1992-2026 Dianne Skoll
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
41
configure
vendored
41
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.72 for remind 06.02.00.
|
# Generated by GNU Autoconf 2.72 for remind 06.02.02.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
|
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
|
||||||
@@ -601,8 +601,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='remind'
|
PACKAGE_NAME='remind'
|
||||||
PACKAGE_TARNAME='remind'
|
PACKAGE_TARNAME='remind'
|
||||||
PACKAGE_VERSION='06.02.00'
|
PACKAGE_VERSION='06.02.02'
|
||||||
PACKAGE_STRING='remind 06.02.00'
|
PACKAGE_STRING='remind 06.02.02'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
|
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.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
'configure' configures remind 06.02.00 to adapt to many kinds of systems.
|
'configure' configures remind 06.02.02 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1320,7 +1320,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of remind 06.02.00:";;
|
short | recursive ) echo "Configuration of remind 06.02.02:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1408,7 +1408,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
remind configure 06.02.00
|
remind configure 06.02.02
|
||||||
generated by GNU Autoconf 2.72
|
generated by GNU Autoconf 2.72
|
||||||
|
|
||||||
Copyright (C) 2023 Free Software Foundation, Inc.
|
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||||
@@ -1871,7 +1871,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by remind $as_me 06.02.00, which was
|
It was created by remind $as_me 06.02.02, which was
|
||||||
generated by GNU Autoconf 2.72. Invocation command line was
|
generated by GNU Autoconf 2.72. Invocation command line was
|
||||||
|
|
||||||
$ $0$ac_configure_args_raw
|
$ $0$ac_configure_args_raw
|
||||||
@@ -4316,24 +4316,12 @@ if test "$?" != 0 ; then
|
|||||||
echo "*** COULD NOT DETERMINE RELEASE DATE: docs/WHATSNEW is incorrect!"
|
echo "*** COULD NOT DETERMINE RELEASE DATE: docs/WHATSNEW is incorrect!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
|
|
||||||
if test "x$ac_cv_func_strdup" = xyes
|
|
||||||
then :
|
|
||||||
printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
|
|
||||||
|
|
||||||
|
if test "$ac_cv_header_wctype_h" != "yes" ; then
|
||||||
|
echo "*** Remind requires the <wctype.h> header"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
|
|
||||||
if test "x$ac_cv_func_strcasecmp" = xyes
|
|
||||||
then :
|
|
||||||
printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
|
|
||||||
if test "x$ac_cv_func_strncasecmp" = xyes
|
|
||||||
then :
|
|
||||||
printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
|
ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
|
||||||
if test "x$ac_cv_func_setenv" = xyes
|
if test "x$ac_cv_func_setenv" = xyes
|
||||||
then :
|
then :
|
||||||
@@ -4384,6 +4372,11 @@ then :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "$ac_cv_func_mbstowcs" != "yes"; then
|
||||||
|
echo "*** Remind requires the mbstowcs function"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION=$PACKAGE_VERSION
|
VERSION=$PACKAGE_VERSION
|
||||||
CONFIG_CMD="$0$ac_configure_args_raw"
|
CONFIG_CMD="$0$ac_configure_args_raw"
|
||||||
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
|
CONFIG_CMD=`echo "$CONFIG_CMD" | sed -e 's/"/\\\\"/g'`
|
||||||
@@ -4899,7 +4892,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by remind $as_me 06.02.00, which was
|
This file was extended by remind $as_me 06.02.02, which was
|
||||||
generated by GNU Autoconf 2.72. Invocation command line was
|
generated by GNU Autoconf 2.72. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -4964,7 +4957,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config='$ac_cs_config_escaped'
|
ac_cs_config='$ac_cs_config_escaped'
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
remind config.status 06.02.00
|
remind config.status 06.02.02
|
||||||
configured by $0, generated by GNU Autoconf 2.72,
|
configured by $0, generated by GNU Autoconf 2.72,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
15
configure.ac
15
configure.ac
@@ -1,6 +1,6 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_INIT(remind, 06.02.00, , , https://dianne.skoll.ca/projects/remind/)
|
AC_INIT(remind, 06.02.02, , , https://dianne.skoll.ca/projects/remind/)
|
||||||
AC_CONFIG_SRCDIR([src/queue.c])
|
AC_CONFIG_SRCDIR([src/queue.c])
|
||||||
|
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
@@ -103,7 +103,18 @@ if test "$?" != 0 ; then
|
|||||||
echo "*** COULD NOT DETERMINE RELEASE DATE: docs/WHATSNEW is incorrect!"
|
echo "*** COULD NOT DETERMINE RELEASE DATE: docs/WHATSNEW is incorrect!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp setenv unsetenv glob mbstowcs setlocale initgroups inotify_init1 readline)
|
|
||||||
|
if test "$ac_cv_header_wctype_h" != "yes" ; then
|
||||||
|
echo "*** Remind requires the <wctype.h> header"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups inotify_init1 readline)
|
||||||
|
|
||||||
|
if test "$ac_cv_func_mbstowcs" != "yes"; then
|
||||||
|
echo "*** Remind requires the mbstowcs function"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION=$PACKAGE_VERSION
|
VERSION=$PACKAGE_VERSION
|
||||||
CONFIG_CMD="$0$ac_configure_args_raw"
|
CONFIG_CMD="$0$ac_configure_args_raw"
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
(defconst remind-keywords
|
(defconst remind-keywords
|
||||||
(sort
|
(sort
|
||||||
(list "ADDOMIT" "AFTER" "AT" "BAN" "BANNER" "BEFORE" "CAL" "CLEAR"
|
(list "ADDOMIT" "AFTER" "AT" "BAN" "BANNER" "BEFORE" "CAL" "CLEAR"
|
||||||
"CLEAR-OMIT-CONTEXT" "COMPLETE-THROUGH" "DEBUG" "DO" "DUMP" "DUMPVARS"
|
"CLEAR-OMIT-CONTEXT" "COMPLETE-THROUGH" "COMPLETED-THROUGH" "DEBUG" "DO" "DUMP" "DUMPVARS"
|
||||||
"DURATION" "ELSE" "ENDIF" "ERRMSG" "EXIT" "EXPR" "FIRST"
|
"DURATION" "ELSE" "ENDIF" "ERRMSG" "EXIT" "EXPR" "FIRST"
|
||||||
"FLUSH" "FOURTH" "FRENAME" "FROM" "FSET" "FUNSET" "IF"
|
"FLUSH" "FOURTH" "FRENAME" "FROM" "FSET" "FUNSET" "IF"
|
||||||
"IFTRIG" "IN" "INC" "INCLUDE" "INCLUDECMD" "INFO" "LAST"
|
"IFTRIG" "IN" "INC" "INCLUDE" "INCLUDECMD" "INFO" "LAST"
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
(defconst remind-builtin-variables
|
(defconst remind-builtin-variables
|
||||||
(sort
|
(sort
|
||||||
(list " $AddBlankLines" "$Ago" "$Am" "$And" "$April" "$At" "$August"
|
(list "$AddBlankLines" "$Ago" "$Am" "$And" "$April" "$At" "$August"
|
||||||
"$CalcUTC" "$CalMode" "$CalType" "$Daemon" "$DateSep" "$DateTimeSep"
|
"$CalcUTC" "$CalMode" "$CalType" "$Daemon" "$DateSep" "$DateTimeSep"
|
||||||
"$December" "$DedupeReminders" "$DefaultColor" "$DefaultDelta"
|
"$December" "$DedupeReminders" "$DefaultColor" "$DefaultDelta"
|
||||||
"$DefaultPrio" "$DefaultTDelta" "$DeltaOverride"
|
"$DefaultPrio" "$DefaultTDelta" "$DeltaOverride"
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
"$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday" "$September"
|
"$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday" "$September"
|
||||||
"$SimpleCal" "$SortByDate" "$SortByPrio" "$SortByTime" "$SubsIndent"
|
"$SimpleCal" "$SortByDate" "$SortByPrio" "$SortByTime" "$SubsIndent"
|
||||||
"$Sunday" "$SuppressImplicitWarnings" "$SuppressLRM" "$SysInclude" "$T" "$Tb" "$Td"
|
"$Sunday" "$SuppressImplicitWarnings" "$SuppressLRM" "$SysInclude" "$T" "$Tb" "$Td"
|
||||||
"$TerminalBackground" "$Thursday" "$TimeSep" "$TimetIs64bit" "$Tm" "$Today" "$TodoFilter"
|
"$TerminalBackground" "$TerminalHyperlinks" "$Thursday" "$TimeSep" "$TimetIs64bit" "$Tm" "$Today" "$TodoFilter"
|
||||||
"$Tomorrow" "$Tt" "$Tuesday" "$Tw" "$Ty" "$U" "$Ud" "$Um"
|
"$Tomorrow" "$Tt" "$Tuesday" "$Tw" "$Ty" "$U" "$Ud" "$Um"
|
||||||
"$UntimedFirst" "$Use256Colors" "$UseBGVTColors" "$UseTrueColors"
|
"$UntimedFirst" "$Use256Colors" "$UseBGVTColors" "$UseTrueColors"
|
||||||
"$UseVTColors" "$Uw" "$Uy" "$WarningLevel" "$Was" "$Wednesday")
|
"$UseVTColors" "$Uw" "$Uy" "$WarningLevel" "$Was" "$Wednesday")
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
"dusk" "easterdate" "escape" "eval" "evaltrig" "filedate" "filedatetime"
|
"dusk" "easterdate" "escape" "eval" "evaltrig" "filedate" "filedatetime"
|
||||||
"filedir" "filename" "getenv" "hebdate" "hebday" "hebmon" "hebyear" "hex"
|
"filedir" "filename" "getenv" "hebdate" "hebday" "hebmon" "hebyear" "hex"
|
||||||
"hour" "htmlescape" "htmlstriptags" "iif" "index" "isany" "isconst" "isdst"
|
"hour" "htmlescape" "htmlstriptags" "iif" "index" "isany" "isconst" "isdst"
|
||||||
"isleap" "isomitted" "language" "localtoutc" "lower" "max"
|
"isleap" "isomitted" "ivritmon" "language" "localtoutc" "lower" "max"
|
||||||
"mbasc" "mbindex" "mbstrlen" "mbsubstr" "min"
|
"mbasc" "mbindex" "mbstrlen" "mbsubstr" "min"
|
||||||
"minsfromutc" "minute" "mon" "monnum" "moondate" "moondatetime"
|
"minsfromutc" "minute" "mon" "monnum" "moondate" "moondatetime"
|
||||||
"moonphase" "moonrise" "moonrisedir" "moonset" "moonsetdir" "moontime"
|
"moonphase" "moonrise" "moonrisedir" "moonset" "moonsetdir" "moontime"
|
||||||
|
|||||||
@@ -1,5 +1,70 @@
|
|||||||
CHANGES TO REMIND
|
CHANGES TO REMIND
|
||||||
|
|
||||||
|
* VERSION 06.02.02 - 2026-01-10
|
||||||
|
|
||||||
|
- NEW FEATURE: remind: Turn reminders with a "Url:" INFO string into
|
||||||
|
hyperlinks if you set the $TerminalHyperlinks system variable to 1.
|
||||||
|
Note that your terminal must support the "OSC 8" hyperlink escape
|
||||||
|
sequence; see
|
||||||
|
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
||||||
|
for details.
|
||||||
|
|
||||||
|
For backward compatibility, the 'z' flag of the "-c" command-line
|
||||||
|
option sets $TerminalHyperlinks to 1.
|
||||||
|
|
||||||
|
- NEW FEATURE: remind: Add another parameter to the "-w" option to
|
||||||
|
remove blank lines between reminders, thereby making the calendar
|
||||||
|
more compact.
|
||||||
|
|
||||||
|
- IMPROVEMENT: TkRemind: Make the window that pops up for background
|
||||||
|
reminders obey the color options chosen under "Options..."
|
||||||
|
|
||||||
|
- CHANGE: remind: The header <wchar.h> and the functions mbstowcs and
|
||||||
|
wcstombs are now mandatory. This should not affect any vaguely modern
|
||||||
|
UNIX system.
|
||||||
|
|
||||||
|
- IMPROVEMENT: remind: Allow Hebrew spellings of Hebrew month names. For
|
||||||
|
example, you can use "Iyar" or "אייר".
|
||||||
|
|
||||||
|
- IMPROVEMENT: remind: Allow different Hebrew transliterations of month names.
|
||||||
|
For example, you can use "Shvat" or "Shevat". See the man page for
|
||||||
|
the full list of possibilities.
|
||||||
|
|
||||||
|
- IMPROVEMENT: remind: Add the mbpad() function, which is the
|
||||||
|
character-oriented counterpart to pad().
|
||||||
|
|
||||||
|
- MINOR NEW FEATURE: Add a "make uninstall-script" Makefile target. This
|
||||||
|
generates a script that if run as root after "make install", will remove
|
||||||
|
Remind.
|
||||||
|
|
||||||
|
- MINOR IMPROVEMENT: remind: Make COMPLETED-THROUGH a synonym for
|
||||||
|
COMPLETE-THROUGH.
|
||||||
|
|
||||||
|
- BUG FIX: TkRemind: When we print a weekly calendar, make sure we start
|
||||||
|
from the same date as the currently-displayed calendar.
|
||||||
|
|
||||||
|
- BUG FIX: remind: Fix an edge case where a REM command with a WARN function
|
||||||
|
may not trigger on its actual trigger date.
|
||||||
|
|
||||||
|
- BUG FIX: include/holidays/jewish.rem: Split Chanukah into separate
|
||||||
|
reminders to improve iCal export.
|
||||||
|
|
||||||
|
- DOC FIX: remind.1: Fix bad man page formatting.
|
||||||
|
|
||||||
|
- DOC FIX: Document that now() returns 00:00 in Calendar Mode.
|
||||||
|
|
||||||
|
* VERSION 06.02.01 - 2025-11-10
|
||||||
|
|
||||||
|
- BUG FIX: remind: Obey $ParseUntriggered in Calendar Mode. Before,
|
||||||
|
$ParseUntriggered was always being treated as 1 in Calendar Mode.
|
||||||
|
|
||||||
|
- BUG FIX: TkRemind: Fix some buggy interactions between the Options
|
||||||
|
dialog and the font chooser.
|
||||||
|
|
||||||
|
- TEST FIX: One test was consistently failing under MUSL, and it is
|
||||||
|
not clear whether MUSL's or glibc's interpretation is correct.
|
||||||
|
Remove that test so all tests pass under MUSL.
|
||||||
|
|
||||||
* VERSION 06.02.00 - 2025-11-03
|
* VERSION 06.02.00 - 2025-11-03
|
||||||
|
|
||||||
- MAJOR NEW FEATURE: TkRemind: A new "View..." menu lets you choose a
|
- MAJOR NEW FEATURE: TkRemind: A new "View..." menu lets you choose a
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
# "#PSSTUFF" for nifty PostScript examples #
|
# "#PSSTUFF" for nifty PostScript examples #
|
||||||
# #
|
# #
|
||||||
# This file is part of REMIND. #
|
# This file is part of REMIND. #
|
||||||
# Copyright (C) 1992-2025 Dianne Skoll #
|
# Copyright (C) 1992-2026 Dianne Skoll #
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
# #
|
# #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Not all sequences are supported by all terminals.
|
# Not all sequences are supported by all terminals.
|
||||||
|
|
||||||
# This file is part of REMIND
|
# This file is part of REMIND
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
if !defined("ansi_bold")
|
if !defined("ansi_bold")
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
# Localize if we can
|
||||||
|
IF access($SysInclude + "/translations/" + _("LANGID") + "/holidays/chinese-new-year.rem", "r") >= 0
|
||||||
|
SYSINCLUDE translations/[_("LANGID")]/holidays/chinese-new-year.rem
|
||||||
|
ENDIF
|
||||||
|
|
||||||
REM 1 Feb 2022 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %"%(Chinese New Year) (%(Tiger))%" %! %b.
|
REM 1 Feb 2022 INFO "Url: https://en.wikipedia.org/wiki/Tiger_(zodiac)" MSG %"%(Chinese New Year) (%(Tiger))%" %! %b.
|
||||||
REM 22 Jan 2023 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %"%(Chinese New Year) (%(Rabbit))%" %! %b.
|
REM 22 Jan 2023 INFO "Url: https://en.wikipedia.org/wiki/Rabbit_(zodiac)" MSG %"%(Chinese New Year) (%(Rabbit))%" %! %b.
|
||||||
REM 10 Feb 2024 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %"%(Chinese New Year) (%(Dragon))%" %! %b.
|
REM 10 Feb 2024 INFO "Url: https://en.wikipedia.org/wiki/Dragon_(zodiac)" MSG %"%(Chinese New Year) (%(Dragon))%" %! %b.
|
||||||
|
|||||||
@@ -37,10 +37,19 @@ REM [hebdate(21, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Hoshana_Ra
|
|||||||
REM [hebdate(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Shemini_Atzeret" MSG %"Shemini Atzeret%" %! %b.
|
REM [hebdate(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Shemini_Atzeret" MSG %"Shemini Atzeret%" %! %b.
|
||||||
REM [_h2I(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Simchat_Torah" MSG %"Simchat Torah%" %! %b.
|
REM [_h2I(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Simchat_Torah" MSG %"Simchat Torah%" %! %b.
|
||||||
|
|
||||||
# If the reminder has expired, $T can be zero, hence the
|
# This reminder used to be done as a single reminder. I have split it
|
||||||
# ($T || $U) below
|
# into 8 separate reminders because the "rem2dav" script uses
|
||||||
REM [hebdate(25, "Kislev",$U-9)] through [hebdate(25, "Kislev",$U-9)+7] \
|
# synthetic tags as UUIDs and it incorrectly coalesces the 8 days'
|
||||||
INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah [($T || $U) - hebdate(25,"Kislev",$U-9) + 1]%" %! %b.
|
# worth of reminders into a single 8-day reminder.
|
||||||
|
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 1%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+1] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 2%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+2] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 3%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+3] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 4%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+4] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 5%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+5] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 6%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+6] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 7%" %! %b.
|
||||||
|
REM [hebdate(25, "Kislev", $U-9)+7] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG %"Chanukah 8%" %! %b.
|
||||||
|
|
||||||
IF !Reform
|
IF !Reform
|
||||||
REM [hebdate(10, "Tevet")] INFO "Url: https://en.wikipedia.org/wiki/Tenth_of_Tevet" MSG %"Tzom Tevet%" %! %b.
|
REM [hebdate(10, "Tevet")] INFO "Url: https://en.wikipedia.org/wiki/Tenth_of_Tevet" MSG %"Tzom Tevet%" %! %b.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Catalan language.
|
# Support for the Catalan language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file was created by Eloi Torrents <eloitor@disroot.org>
|
# This file was created by Eloi Torrents <eloitor@disroot.org>
|
||||||
|
|
||||||
TRANSLATE "LANGID" "ca"
|
TRANSLATE "LANGID" "ca"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Danish language.
|
# Support for the Danish language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Mogens Lynnerup.
|
# This file is derived from a translation by Mogens Lynnerup.
|
||||||
|
|
||||||
TRANSLATE "LANGID" "da"
|
TRANSLATE "LANGID" "da"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the German language.
|
# Support for the German language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Wolfgang Thronicke
|
# This file is derived from a translation by Wolfgang Thronicke
|
||||||
|
|
||||||
TRANSLATE "LANGID" "de"
|
TRANSLATE "LANGID" "de"
|
||||||
@@ -73,34 +73,8 @@ FSET - subst_p(alt, d, t) iif(d == today()+1, "", "en")
|
|||||||
# Localization of various astronomical events
|
# Localization of various astronomical events
|
||||||
|
|
||||||
TRANSLATE "Perihelion" "Perihel"
|
TRANSLATE "Perihelion" "Perihel"
|
||||||
TRANSLATE "Vernal Equinox" "Frühlingsanfang"
|
|
||||||
TRANSLATE "Summer Solstice" "Sommeranfang"
|
|
||||||
TRANSLATE "Aphelion" "Aphel"
|
TRANSLATE "Aphelion" "Aphel"
|
||||||
TRANSLATE "Autumnal Equinox" "Herbstanfang"
|
|
||||||
TRANSLATE "Winter Solstice" "Winteranfang"
|
|
||||||
TRANSLATE "Daylight Saving Time Starts" "Beginn Sommerzeit"
|
TRANSLATE "Daylight Saving Time Starts" "Beginn Sommerzeit"
|
||||||
TRANSLATE "Daylight Saving Time Ends" "Ende Sommerzeit"
|
TRANSLATE "Daylight Saving Time Ends" "Ende Sommerzeit"
|
||||||
|
|
||||||
TRANSLATE "New Moon" "Neumond"
|
|
||||||
TRANSLATE "First Quarter" "zunehmender Halbmond"
|
|
||||||
TRANSLATE "Full Moon" "Vollmond"
|
|
||||||
TRANSLATE "Last Quarter" "abnehmender Halbmond"
|
|
||||||
|
|
||||||
TRANSLATE "Chinese New Year" "Chinesisches Neujahr"
|
|
||||||
TRANSLATE "Snake" "Schlange"
|
|
||||||
TRANSLATE "Horse" "Pferd"
|
|
||||||
TRANSLATE "Goat" "Ziege"
|
|
||||||
TRANSLATE "Monkey" "Affe"
|
|
||||||
TRANSLATE "Rooster" "Hahn"
|
|
||||||
TRANSLATE "Dog" "Hund"
|
|
||||||
TRANSLATE "Pig" "Schwein"
|
|
||||||
TRANSLATE "Rat" "Ratte"
|
|
||||||
TRANSLATE "Ox" "Ochse"
|
|
||||||
TRANSLATE "Tiger" "Tiger"
|
|
||||||
TRANSLATE "Rabbit" "Kaninchen"
|
|
||||||
TRANSLATE "Dragon" "Drachen"
|
|
||||||
|
|
||||||
TRANSLATE "Sunrise" "Sonnenaufgang"
|
|
||||||
TRANSLATE "Sunset" "Sonnenuntergang"
|
|
||||||
|
|
||||||
TRANSLATE "No reminders." "Keine Termine."
|
TRANSLATE "No reminders." "Keine Termine."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Support for the English language.
|
# Support for the English language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# Nothing to do for English since it is the default.
|
# Nothing to do for English since it is the default.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Spanish language.
|
# Support for the Spanish language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Rafa Couto <rafacouto@biogate.com>
|
# This file is derived from a translation by Rafa Couto <rafacouto@biogate.com>
|
||||||
|
|
||||||
TRANSLATE "LANGID" "es"
|
TRANSLATE "LANGID" "es"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Finnish language.
|
# Support for the Finnish language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Mikko Silvonen
|
# This file is derived from a translation by Mikko Silvonen
|
||||||
|
|
||||||
TRANSLATE "LANGID" "fi"
|
TRANSLATE "LANGID" "fi"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the French language.
|
# Support for the French language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Laurent Duperval
|
# This file is derived from a translation by Laurent Duperval
|
||||||
|
|
||||||
TRANSLATE "LANGID" "fr"
|
TRANSLATE "LANGID" "fr"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Hellenic (Greek) language.
|
# Support for the Hellenic (Greek) language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by jarlaxl lamat (jarlaxl@freemail.gr)
|
# This file is derived from a translation by jarlaxl lamat (jarlaxl@freemail.gr)
|
||||||
|
|
||||||
TRANSLATE "LANGID" "gr"
|
TRANSLATE "LANGID" "gr"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Icelanding language.
|
# Support for the Icelanding language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Björn Davíðsson (bjossi@snerpa.is)
|
# This file is derived from a translation by Björn Davíðsson (bjossi@snerpa.is)
|
||||||
|
|
||||||
TRANSLATE "LANGID" "is"
|
TRANSLATE "LANGID" "is"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Italian language.
|
# Support for the Italian language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Valerio Aimale
|
# This file is derived from a translation by Valerio Aimale
|
||||||
|
|
||||||
TRANSLATE "LANGID" "it"
|
TRANSLATE "LANGID" "it"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Dutch language.
|
# Support for the Dutch language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Willem Kasdorp and Erik-Jan Vens
|
# This file is derived from a translation by Willem Kasdorp and Erik-Jan Vens
|
||||||
|
|
||||||
TRANSLATE "LANGID" "nl"
|
TRANSLATE "LANGID" "nl"
|
||||||
@@ -65,33 +65,6 @@ FSET - subst_s(a, d, t) iif(day(d) == 1 || day(d) == 8, "e", day(d) < 20, "de",
|
|||||||
|
|
||||||
FSET - ordx(n) n + "e"
|
FSET - ordx(n) n + "e"
|
||||||
|
|
||||||
TRANSLATE "New Moon" "Nieuwe maan"
|
|
||||||
TRANSLATE "First Quarter" "Eerste kwartier"
|
|
||||||
TRANSLATE "Full Moon" "Volle maan"
|
|
||||||
TRANSLATE "Last Quarter" "Laatste kwartier"
|
|
||||||
|
|
||||||
TRANSLATE "Vernal Equinox" "Lente-equinox"
|
|
||||||
TRANSLATE "Summer Solstice" "Zomerzonnewende"
|
|
||||||
TRANSLATE "Autumnal Equinox" "Herfst-equinox"
|
|
||||||
TRANSLATE "Winter Solstice" "Winterzonnewende"
|
|
||||||
|
|
||||||
TRANSLATE "Chinese New Year" "Chinees Nieuwjaar"
|
|
||||||
TRANSLATE "Snake" "Slang"
|
|
||||||
TRANSLATE "Horse" "Paard"
|
|
||||||
TRANSLATE "Goat" "Geit"
|
|
||||||
TRANSLATE "Monkey" "Aap"
|
|
||||||
TRANSLATE "Rooster" "Haan"
|
|
||||||
TRANSLATE "Dog" "Hond"
|
|
||||||
TRANSLATE "Pig" "Varken"
|
|
||||||
TRANSLATE "Rat" "Rat"
|
|
||||||
TRANSLATE "Ox" "Os"
|
|
||||||
TRANSLATE "Tiger" "Tijger"
|
|
||||||
TRANSLATE "Rabbit" "Konijn"
|
|
||||||
TRANSLATE "Dragon" "Draak"
|
|
||||||
|
|
||||||
TRANSLATE "Sunrise" "Zonsopgang"
|
|
||||||
TRANSLATE "Sunset" "Zonsondergang"
|
|
||||||
|
|
||||||
TRANSLATE "No reminders." "Geen herinneringen."
|
TRANSLATE "No reminders." "Geen herinneringen."
|
||||||
|
|
||||||
TRANSLATE "Daylight Saving Time Begins" "Daglicht-sparende tijd begint"
|
TRANSLATE "Daylight Saving Time Begins" "Daglicht-sparende tijd begint"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Norwegian language.
|
# Support for the Norwegian language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Trygve Randen
|
# This file is derived from a translation by Trygve Randen
|
||||||
|
|
||||||
TRANSLATE "LANGID" "no"
|
TRANSLATE "LANGID" "no"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Polish language.
|
# Support for the Polish language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Jerzy Sobczyk
|
# This file is derived from a translation by Jerzy Sobczyk
|
||||||
|
|
||||||
TRANSLATE "LANGID" "pl"
|
TRANSLATE "LANGID" "pl"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the (Brazilian) Portuguese language.
|
# Support for the (Brazilian) Portuguese language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Marco Paganini
|
# This file is derived from a translation by Marco Paganini
|
||||||
|
|
||||||
TRANSLATE "LANGID" "pt"
|
TRANSLATE "LANGID" "pt"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Support for the Romanian language.
|
# Support for the Romanian language.
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# REMIND is Copyright (C) 1992-2025 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# This file is derived from a translation by Liviu Daia
|
# This file is derived from a translation by Liviu Daia
|
||||||
|
|
||||||
TRANSLATE "LANGID" "ro"
|
TRANSLATE "LANGID" "ro"
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
# Moon phases
|
# Moon phases
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
# Localize if we can
|
||||||
|
IF access($SysInclude + "/translations/" + _("LANGID") + "/moonphases.rem", "r") >= 0
|
||||||
|
SYSINCLUDE translations/[_("LANGID")]/moonphases.rem
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF $CalMode || $PsCal
|
IF $CalMode || $PsCal
|
||||||
REM [moondate(0)] INFO "Url: https://en.wikipedia.org/wiki/New_moon" SPECIAL MOON 0 -1 -1 [moontime(0)]
|
REM [moondate(0)] INFO "Url: https://en.wikipedia.org/wiki/New_moon" SPECIAL MOON 0 -1 -1 [moontime(0)]
|
||||||
REM [moondate(1)] INFO "Url: https://en.wikipedia.org/wiki/Lunar_phase" SPECIAL MOON 1 -1 -1 [moontime(1)]
|
REM [moondate(1)] INFO "Url: https://en.wikipedia.org/wiki/Lunar_phase" SPECIAL MOON 1 -1 -1 [moontime(1)]
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
# Equinoxes and solstices
|
# Equinoxes and solstices
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
# Localize if we can
|
||||||
|
IF access($SysInclude + "/translations/" + _("LANGID") + "/seasons.rem", "r") >= 0
|
||||||
|
SYSINCLUDE translations/[_("LANGID")]/seasons.rem
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF $LatDeg >= 0
|
IF $LatDeg >= 0
|
||||||
# Northern Hemisphere
|
# Northern Hemisphere
|
||||||
REM NOQUEUE [soleq(0)] INFO "Url: https://en.wikipedia.org/wiki/March_equinox" MSG %"%(Vernal Equinox)%" [$Is] %3.
|
REM NOQUEUE [soleq(0)] INFO "Url: https://en.wikipedia.org/wiki/March_equinox" MSG %"%(Vernal Equinox)%" [$Is] %3.
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
# Sunrise and sunset
|
# Sunrise and sunset
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
# Localize if we can
|
||||||
|
IF access($SysInclude + "/translations/" + _("LANGID") + "/sun.rem", "r") >= 0
|
||||||
|
SYSINCLUDE translations/[_("LANGID")]/sun.rem
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF !$CalMode && !$PsCal
|
IF !$CalMode && !$PsCal
|
||||||
REM NOQUEUE AT [sunrise()] MSG %"%"%(Sunrise) %! %2.
|
REM NOQUEUE AT [sunrise()] MSG %"%"%(Sunrise) %! %2.
|
||||||
REM NOQUEUE AT [sunset()] MSG %"%"%(Sunset) %! %2.
|
REM NOQUEUE AT [sunset()] MSG %"%"%(Sunset) %! %2.
|
||||||
|
|||||||
17
include/translations/README.txt
Normal file
17
include/translations/README.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
The files here contain additional translations for various files
|
||||||
|
distributed with Remind.
|
||||||
|
|
||||||
|
If you create a file in $SysInclude whose name is "myfile.rem", then
|
||||||
|
you can enable translation by putting this at the top of your
|
||||||
|
file:
|
||||||
|
|
||||||
|
#===================================================================
|
||||||
|
# Localize if we can
|
||||||
|
IF access($SysInclude + "/translations/" + _("LANGID") + "/myfile.rem", "r") >= 0
|
||||||
|
SYSINCLUDE translations/[_("LANGID")]/myfile.rem
|
||||||
|
ENDIF
|
||||||
|
#===================================================================
|
||||||
|
|
||||||
|
Then you can localize your file by putting appropriate TRANSLATION directives
|
||||||
|
in the file $SysInclude/translations/<LC>/myfile.rem where <LC> is the
|
||||||
|
two-character language code.
|
||||||
13
include/translations/de/holidays/chinese-new-year.rem
Normal file
13
include/translations/de/holidays/chinese-new-year.rem
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
TRANSLATE "Chinese New Year" "Chinesisches Neujahr"
|
||||||
|
TRANSLATE "Snake" "Schlange"
|
||||||
|
TRANSLATE "Horse" "Pferd"
|
||||||
|
TRANSLATE "Goat" "Ziege"
|
||||||
|
TRANSLATE "Monkey" "Affe"
|
||||||
|
TRANSLATE "Rooster" "Hahn"
|
||||||
|
TRANSLATE "Dog" "Hund"
|
||||||
|
TRANSLATE "Pig" "Schwein"
|
||||||
|
TRANSLATE "Rat" "Ratte"
|
||||||
|
TRANSLATE "Ox" "Ochse"
|
||||||
|
TRANSLATE "Tiger" "Tiger"
|
||||||
|
TRANSLATE "Rabbit" "Kaninchen"
|
||||||
|
TRANSLATE "Dragon" "Drachen"
|
||||||
4
include/translations/de/moonphases.rem
Normal file
4
include/translations/de/moonphases.rem
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
TRANSLATE "New Moon" "Neumond"
|
||||||
|
TRANSLATE "First Quarter" "zunehmender Halbmond"
|
||||||
|
TRANSLATE "Full Moon" "Vollmond"
|
||||||
|
TRANSLATE "Last Quarter" "abnehmender Halbmond"
|
||||||
4
include/translations/de/seasons.rem
Normal file
4
include/translations/de/seasons.rem
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
TRANSLATE "Vernal Equinox" "Frühlingsanfang"
|
||||||
|
TRANSLATE "Summer Solstice" "Sommeranfang"
|
||||||
|
TRANSLATE "Autumnal Equinox" "Herbstanfang"
|
||||||
|
TRANSLATE "Winter Solstice" "Winteranfang"
|
||||||
2
include/translations/de/sun.rem
Normal file
2
include/translations/de/sun.rem
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
TRANSLATE "Sunrise" "Sonnenaufgang"
|
||||||
|
TRANSLATE "Sunset" "Sonnenuntergang"
|
||||||
13
include/translations/nl/holidays/chinese-new-year.rem
Normal file
13
include/translations/nl/holidays/chinese-new-year.rem
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
TRANSLATE "Chinese New Year" "Chinees Nieuwjaar"
|
||||||
|
TRANSLATE "Snake" "Slang"
|
||||||
|
TRANSLATE "Horse" "Paard"
|
||||||
|
TRANSLATE "Goat" "Geit"
|
||||||
|
TRANSLATE "Monkey" "Aap"
|
||||||
|
TRANSLATE "Rooster" "Haan"
|
||||||
|
TRANSLATE "Dog" "Hond"
|
||||||
|
TRANSLATE "Pig" "Varken"
|
||||||
|
TRANSLATE "Rat" "Rat"
|
||||||
|
TRANSLATE "Ox" "Os"
|
||||||
|
TRANSLATE "Tiger" "Tijger"
|
||||||
|
TRANSLATE "Rabbit" "Konijn"
|
||||||
|
TRANSLATE "Dragon" "Draak"
|
||||||
4
include/translations/nl/moonphases.rem
Normal file
4
include/translations/nl/moonphases.rem
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
TRANSLATE "New Moon" "Nieuwe maan"
|
||||||
|
TRANSLATE "First Quarter" "Eerste kwartier"
|
||||||
|
TRANSLATE "Full Moon" "Volle maan"
|
||||||
|
TRANSLATE "Last Quarter" "Laatste kwartier"
|
||||||
4
include/translations/nl/seasons.rem
Normal file
4
include/translations/nl/seasons.rem
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
TRANSLATE "Vernal Equinox" "Lente-equinox"
|
||||||
|
TRANSLATE "Summer Solstice" "Zomerzonnewende"
|
||||||
|
TRANSLATE "Autumnal Equinox" "Herfst-equinox"
|
||||||
|
TRANSLATE "Winter Solstice" "Winterzonnewende"
|
||||||
2
include/translations/nl/sun.rem
Normal file
2
include/translations/nl/sun.rem
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
TRANSLATE "Sunrise" "Zonsopgang"
|
||||||
|
TRANSLATE "Sunset" "Zonsondergang"
|
||||||
103
man/remind.1.in
103
man/remind.1.in
@@ -103,10 +103,8 @@ can fix up formatting problems with right-to-left languages in the calendar
|
|||||||
display.
|
display.
|
||||||
.TP
|
.TP
|
||||||
.B 'z'
|
.B 'z'
|
||||||
causes \fBRemind\fR to use escape sequences to turn reminders with a
|
has the effect of setting the system variable \fB$TerminalHyperlinks\fR
|
||||||
"URL" info string into hyperlinks. In order to work, your terminal
|
to 1. See the documentation of this variable in the section "SYSTEM VARIABLES"
|
||||||
must support the escape sequences documented at
|
|
||||||
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
|
||||||
.TP
|
.TP
|
||||||
.B 'c'
|
.B 'c'
|
||||||
causes \fBRemind\fR to use VT100 escape sequences to approximate
|
causes \fBRemind\fR to use VT100 escape sequences to approximate
|
||||||
@@ -167,7 +165,7 @@ foreground color of a reminder and the background color of a cell,
|
|||||||
then you know what you are doing.
|
then you know what you are doing.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B \-w\fR\fIcol\fR[,\fIpad\fR[,\fIspc\fR]]]
|
.B \-w\fR\fIcol\fR[,\fIpad\fR[,\fIspc\fR[,\fIspc2\fR]]]]
|
||||||
The \fB\-w\fR option specifies the output width, padding and spacing
|
The \fB\-w\fR option specifies the output width, padding and spacing
|
||||||
of the formatted calendar output. \fICol\fR specifies the number of
|
of the formatted calendar output. \fICol\fR specifies the number of
|
||||||
columns in the output device. If \fIcol\fR is not specified, or is
|
columns in the output device. If \fIcol\fR is not specified, or is
|
||||||
@@ -198,7 +196,9 @@ have many reminders on certain days that make your calendar too large
|
|||||||
to fit on a page, you can try reducing \fIpad\fR to make the empty
|
to fit on a page, you can try reducing \fIpad\fR to make the empty
|
||||||
boxes smaller. \fISpc\fR specifies how many blank lines to leave
|
boxes smaller. \fISpc\fR specifies how many blank lines to leave
|
||||||
between the day number and the first reminder entry. It defaults to
|
between the day number and the first reminder entry. It defaults to
|
||||||
1.
|
1. \fIspc2\fR may be 0 or 1 and it specifies whether or not blank
|
||||||
|
lines should be printed in between reminders on the same day. The
|
||||||
|
default is 1, which causes the blank lines to be printed.
|
||||||
.PP
|
.PP
|
||||||
Any of \fIcol\fR, \fIpad\fR or \fIspc\fR can be omitted, providing you
|
Any of \fIcol\fR, \fIpad\fR or \fIspc\fR can be omitted, providing you
|
||||||
provide the correct number of commas. Don't use any spaces in the option.
|
provide the correct number of commas. Don't use any spaces in the option.
|
||||||
@@ -1995,6 +1995,7 @@ reminding you of your 2027 taxes (starting 15 days before the due
|
|||||||
date.)
|
date.)
|
||||||
.PP
|
.PP
|
||||||
It is an error to specify COMPLETE-THROUGH without also specifying TODO.
|
It is an error to specify COMPLETE-THROUGH without also specifying TODO.
|
||||||
|
The keyword COMPLETED-THROUGH may be used as a synonym for COMPLETE-THROUGH.
|
||||||
.PP
|
.PP
|
||||||
.SH LIMITING REMINDERS ABOUT OVERDUE TODOS
|
.SH LIMITING REMINDERS ABOUT OVERDUE TODOS
|
||||||
.PP
|
.PP
|
||||||
@@ -3487,6 +3488,13 @@ to be "dark" if the average of the red, green and blue components is
|
|||||||
at most 85 out of 255, and if the maximum of any component is at most
|
at most 85 out of 255, and if the maximum of any component is at most
|
||||||
128 out of 255.
|
128 out of 255.
|
||||||
.TP
|
.TP
|
||||||
|
.B $TerminalHyperlinks (INT type)
|
||||||
|
If your terminal supports escape sequences to allow HTML-like
|
||||||
|
anchors around text (see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda), then you can set this variable to 1. \fBRemind\fR will then
|
||||||
|
make any reminder with a "Url:" info string into a hyperlink in your
|
||||||
|
terminal. By default, \fB$TerminalHyperlinks\fR is set to zero because
|
||||||
|
not all terminals support this feature.
|
||||||
|
.TP
|
||||||
.B $WarningLevel (STRING type)
|
.B $WarningLevel (STRING type)
|
||||||
As new versions of \fBRemind\fR are released, new warnings may be added.
|
As new versions of \fBRemind\fR are released, new warnings may be added.
|
||||||
If your formerly-fine scripts suddenly start issuing warnings when you
|
If your formerly-fine scripts suddenly start issuing warnings when you
|
||||||
@@ -3848,9 +3856,10 @@ integer.
|
|||||||
.TP
|
.TP
|
||||||
.B columns([s_arg])
|
.B columns([s_arg])
|
||||||
If called with no arguments, \fBcolumns()\fR behaves as follows:
|
If called with no arguments, \fBcolumns()\fR behaves as follows:
|
||||||
If standard output is a TTY, returns the width of the terminal in columns.
|
If either standard output or standard error is a TTY, returns the
|
||||||
If standard output is not a TTY, attempts to open "/dev/tty" to obtain
|
width of the terminal in columns. If neither standard output nor
|
||||||
the terminal size. If this fails, returns -1.
|
standard error is a TTY, attempts to open "/dev/tty" to obtain the
|
||||||
|
terminal size. If this fails, returns -1.
|
||||||
.RS
|
.RS
|
||||||
.PP
|
.PP
|
||||||
If called with a single string argument, \fBcolumns(str)\fR returns
|
If called with a single string argument, \fBcolumns(str)\fR returns
|
||||||
@@ -4142,10 +4151,10 @@ Returns an \fBINT\fR that is the location of \fItarget\fR in the
|
|||||||
string \fIsearch\fR. Note that \fBindex\fR uses \fIbyte\fR positions,
|
string \fIsearch\fR. Note that \fBindex\fR uses \fIbyte\fR positions,
|
||||||
not character positions, so should not be used on non-ASCII strings. Use
|
not character positions, so should not be used on non-ASCII strings. Use
|
||||||
\fBmbindex\fR for non-ASCII strings.
|
\fBmbindex\fR for non-ASCII strings.
|
||||||
|
.RS
|
||||||
.PP
|
.PP
|
||||||
The first byte of a string is numbered 1. If \fItarget\fR does not
|
The first byte of a string is numbered 1. If \fItarget\fR does not
|
||||||
exist in \fIsearch\fR, then 0 is returned.
|
exist in \fIsearch\fR, then 0 is returned.
|
||||||
.RS
|
|
||||||
.PP
|
.PP
|
||||||
The optional parameter \fIstart\fR specifies the position in
|
The optional parameter \fIstart\fR specifies the position in
|
||||||
\fIsearch\fR at which to start looking for \fItarget\fR.
|
\fIsearch\fR at which to start looking for \fItarget\fR.
|
||||||
@@ -4498,7 +4507,8 @@ to be considered \fInon-constant\fR. For details, see the section
|
|||||||
.TP
|
.TP
|
||||||
.B now()
|
.B now()
|
||||||
Returns the current system time, as a \fBTIME\fR type. This may be
|
Returns the current system time, as a \fBTIME\fR type. This may be
|
||||||
the actual time, or a time supplied on the command line.
|
the actual time, or a time supplied on the command line. Note that
|
||||||
|
in Calendar Mode, \fBnow()\fR always returns 00:00.
|
||||||
.TP
|
.TP
|
||||||
.B ord(i_num)
|
.B ord(i_num)
|
||||||
Returns a string that is the ordinal number \fInum\fR. For example,
|
Returns a string that is the ordinal number \fInum\fR. For example,
|
||||||
@@ -4529,8 +4539,8 @@ any longer.
|
|||||||
.TP
|
.TP
|
||||||
.B pad(x_arg, s_padstr, i_len [, i_right])
|
.B pad(x_arg, s_padstr, i_len [, i_right])
|
||||||
Converts the first argument \fIarg\fR to a string if necessary, and
|
Converts the first argument \fIarg\fR to a string if necessary, and
|
||||||
then if it is shorter than \fIlen\fR characters, pads to to
|
then if it is shorter than \fIlen\fR bytes, pads to to
|
||||||
\fIlen\fR characters using as many copies (including partial copies)
|
\fIlen\fR bytes using as many copies (including partial copies)
|
||||||
of \fIpadstr\fR as necessary. By default, the string is left-padded,
|
of \fIpadstr\fR as necessary. By default, the string is left-padded,
|
||||||
but if \fIright\fR is supplied and non-zero, the string will
|
but if \fIright\fR is supplied and non-zero, the string will
|
||||||
be right-padded.
|
be right-padded.
|
||||||
@@ -4547,6 +4557,11 @@ Here are some examples:
|
|||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B mbpad(x_arg, s_padstr, i_len [, i_right])
|
||||||
|
This is the multibyte counterpart to \fBpad\fR. The length is
|
||||||
|
specified in characters rather than bytes. Use \fBmbpad\fR rather
|
||||||
|
than \fBpad\fR if either of the strings contains non-ASCII characters.
|
||||||
.TP
|
.TP
|
||||||
.B plural(i_num [,s_str1 [,s_str2]])
|
.B plural(i_num [,s_str1 [,s_str2]])
|
||||||
Can take from one to three arguments. If one argument is supplied, returns
|
Can take from one to three arguments. If one argument is supplied, returns
|
||||||
@@ -4625,7 +4640,7 @@ may return a time supplied on the command line.
|
|||||||
.B realnow()
|
.B realnow()
|
||||||
Returns the true time of day as provided by the operating system.
|
Returns the true time of day as provided by the operating system.
|
||||||
This is in contrast to \fBnow()\fR, which may return a time supplied
|
This is in contrast to \fBnow()\fR, which may return a time supplied
|
||||||
on the command line.
|
on the command line, or 00:00 in Calendar Mode.
|
||||||
.TP
|
.TP
|
||||||
.B realtoday()
|
.B realtoday()
|
||||||
Returns the date as provided by the operating system. This is in contrast to
|
Returns the date as provided by the operating system. This is in contrast to
|
||||||
@@ -4633,9 +4648,10 @@ Returns the date as provided by the operating system. This is in contrast to
|
|||||||
in calendar mode, or if a date has been supplied on the command line.
|
in calendar mode, or if a date has been supplied on the command line.
|
||||||
.TP
|
.TP
|
||||||
.B rows()
|
.B rows()
|
||||||
If standard output is a TTY, returns the height of the terminal in rows.
|
If either standard output or standard error is a TTY, returns the
|
||||||
If standard output is not a TTY, attempts to open "/dev/tty" to obtain
|
height of the terminal in rows. If neither standard output nor
|
||||||
the terminal size. If this fails, returns -1.
|
standard error is a TTY, attempts to open "/dev/tty" to obtain the
|
||||||
|
terminal size. If this fails, returns -1.
|
||||||
.TP
|
.TP
|
||||||
.B sgn(i_num)
|
.B sgn(i_num)
|
||||||
Returns \-1 if \fInum\fR is negative, 1 if \fInum\fR is positive,
|
Returns \-1 if \fInum\fR is negative, 1 if \fInum\fR is positive,
|
||||||
@@ -4823,9 +4839,9 @@ value of \fBcurrent()\fR. If a \fBDATE\fR rather than \fBDATETIME\fR
|
|||||||
is supplied, \fBRemind\fR uses a time part of 00:00.
|
is supplied, \fBRemind\fR uses a time part of 00:00.
|
||||||
.TP
|
.TP
|
||||||
.B today()
|
.B today()
|
||||||
Returns \fBRemind\fR's notion of "today." This may be the actual system
|
Returns \fBRemind\fR's notion of "today." This may be the actual
|
||||||
date, or a date supplied on the command line, or the date of the
|
system date, or a date supplied on the command line, or (in Calendar
|
||||||
calendar entry currently being computed.
|
Mode) the date of the calendar entry currently being computed.
|
||||||
.TP
|
.TP
|
||||||
.B trig(s_1 [,s_2, ...])
|
.B trig(s_1 [,s_2, ...])
|
||||||
For each string argument s_\fIn\fR, \fBtrig\fR evaluates s_\fIn\fR
|
For each string argument s_\fIn\fR, \fBtrig\fR evaluates s_\fIn\fR
|
||||||
@@ -6919,14 +6935,43 @@ jahrzeits (anniversaries of deaths) and smachot (joyous occasions.)
|
|||||||
.PP
|
.PP
|
||||||
.B THE HEBREW YEAR
|
.B THE HEBREW YEAR
|
||||||
.PP
|
.PP
|
||||||
The Hebrew year has 12 months, alternately 30 and 29 days long. The months
|
The Hebrew year has 12 months, alternately 30 and 29 days long. The
|
||||||
are: Tishrey, Heshvan, Kislev, Tevet, Shvat, Adar, Nisan, Iyar, Sivan, Tamuz,
|
months are: Tishrey, Heshvan, Kislev, Tevet, Shvat, Adar, Nisan, Iyar,
|
||||||
Av and Elul. In Biblical times, the year started in Nisan, but Rosh Hashana
|
Sivan, Tamuz, Av and Elul. If you are in a UTF-8 locale, you can
|
||||||
(Jewish New Year) is now celebrated on the 1st and 2nd of Tishrey.
|
\fIalso\fR use the UTF-8-encoded Hebrew spellings for the month names,
|
||||||
|
namely:
|
||||||
|
.PP
|
||||||
|
תשרי, חשוון, כסלו, טבת, שבט, אדר, ניסן, אייר, סיון, תמוז, אב, אלול.
|
||||||
.PP
|
.PP
|
||||||
In a cycle of 19 years, there are 7 leap years, being years 3, 6, 8, 11,
|
In a cycle of 19 years, there are 7 leap years, being years 3, 6, 8, 11,
|
||||||
14, 17 and 19 of the cycle. In a leap year, an extra month of 30 days
|
14, 17 and 19 of the cycle. In a leap year, an extra month of 30 days
|
||||||
is added before Adar. The two Adars are called Adar A and Adar B.
|
is added before Adar. The two Adars are called Adar A and Adar B,
|
||||||
|
or in Hebrew, 'אדר א and 'אדר ב.
|
||||||
|
.PP
|
||||||
|
\fBRemind\fR also permits the following alternative spellings for
|
||||||
|
Hebrew month names:
|
||||||
|
.TP
|
||||||
|
.B Tishrey
|
||||||
|
Can also be spelled Tishri or Tishrei
|
||||||
|
.TP
|
||||||
|
.B Heshvan
|
||||||
|
Can also be spelled Cheshvan or Kheshvan
|
||||||
|
.TP
|
||||||
|
.B Shvat
|
||||||
|
Can also be spelled Shevat
|
||||||
|
.TP
|
||||||
|
.B Tamuz
|
||||||
|
Can also be spelled Tammuz
|
||||||
|
.TP
|
||||||
|
.B Adar A
|
||||||
|
Can also be spelled Adar 1, Adar I, אדר א or אדר 1.
|
||||||
|
.TP
|
||||||
|
.B Adar B
|
||||||
|
Can also be spelled Adar 2, Adar II, אדר ב or אדר 2.
|
||||||
|
.TP
|
||||||
|
.B Iyar
|
||||||
|
Can also be spelled Iyyar.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
For certain religious reasons, the year cannot start on a Sunday, Wednesday
|
For certain religious reasons, the year cannot start on a Sunday, Wednesday
|
||||||
or Friday. To adjust for this, a day is taken off Kislev or added to Heshvan.
|
or Friday. To adjust for this, a day is taken off Kislev or added to Heshvan.
|
||||||
@@ -6956,6 +7001,11 @@ Thus, hebday('1993/04/12') returns 21.
|
|||||||
Returns the name of the Hebrew month corresponding to \fIdate\fR.
|
Returns the name of the Hebrew month corresponding to \fIdate\fR.
|
||||||
For example, hebmon('1993/04/12') returns "Nisan".
|
For example, hebmon('1993/04/12') returns "Nisan".
|
||||||
.TP
|
.TP
|
||||||
|
.B ivritmon(d_date)
|
||||||
|
Returns the name of the Hebrew month corresponding to \fIdate\fR,
|
||||||
|
in UTF-8-encoded Hebrew script. For example, ivritmon('1993/04/12')
|
||||||
|
returns "ניסן".
|
||||||
|
.TP
|
||||||
.B hebyear(d_date)
|
.B hebyear(d_date)
|
||||||
Returns the Hebrew year corresponding to \fIdate\fR. For example,
|
Returns the Hebrew year corresponding to \fIdate\fR. For example,
|
||||||
hebyear('1993/04/12') returns 5753.
|
hebyear('1993/04/12') returns 5753.
|
||||||
@@ -6969,7 +7019,8 @@ corresponding to the Hebrew date.
|
|||||||
The \fIday\fR parameter can range from 1 to 30, and specifies the day of
|
The \fIday\fR parameter can range from 1 to 30, and specifies the day of
|
||||||
the Hebrew month. The \fIhebmon\fR parameter is a string that must name
|
the Hebrew month. The \fIhebmon\fR parameter is a string that must name
|
||||||
one of the Hebrew months specified above. Note that the month must be spelled
|
one of the Hebrew months specified above. Note that the month must be spelled
|
||||||
out in full, and use the English transliteration shown previously. You can
|
out in full, and use either the English transliteration shown previously, or
|
||||||
|
the Hebrew spelling \fIencoded in UTF-8\fR. You can
|
||||||
also specify "Adar A" and "Adar B." Month names are not case-sensitive.
|
also specify "Adar A" and "Adar B." Month names are not case-sensitive.
|
||||||
.PP
|
.PP
|
||||||
The \fIyrstart\fR parameter can either be a \fBDATE\fR or an \fBINT\fR. If
|
The \fIyrstart\fR parameter can either be a \fBDATE\fR or an \fBINT\fR. If
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ asynchronous status messages.
|
|||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
TkRemind was written by Dianne Skoll <dianne@skoll.ca>
|
TkRemind was written by Dianne Skoll <dianne@skoll.ca>
|
||||||
|
|
||||||
\fBTkRemind\fR is Copyright (C) 1996-2025 by Dianne Skoll.
|
\fBTkRemind\fR is Copyright (C) 1996-2026 by Dianne Skoll.
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# A cheesy graphical front/back end for Remind using Tcl/Tk
|
# A cheesy graphical front/back end for Remind using Tcl/Tk
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 Dianne Skoll
|
# Copyright (C) 1992-2026 Dianne Skoll
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1084,6 +1084,7 @@ proc EditOptions {} {
|
|||||||
button $w.cancel -text "Cancel" -command "CancelOptions; destroy $w"
|
button $w.cancel -text "Cancel" -command "CancelOptions; destroy $w"
|
||||||
wm protocol $w WM_DELETE_WINDOW "CancelOptions; destroy $w"
|
wm protocol $w WM_DELETE_WINDOW "CancelOptions; destroy $w"
|
||||||
pack $w.default $w.dark $w.save $w.cancel -in $w.b -side left -expand 0 -fill x
|
pack $w.default $w.dark $w.save $w.cancel -in $w.b -side left -expand 0 -fill x
|
||||||
|
bind $w <Destroy> {catch { tk fontchooser hide } }
|
||||||
bind $w <KeyPress-Escape> "$w.cancel flash; $w.cancel invoke"
|
bind $w <KeyPress-Escape> "$w.cancel flash; $w.cancel invoke"
|
||||||
bind $w <Control-KeyPress-w> "$w.cancel flash; $w.cancel invoke"
|
bind $w <Control-KeyPress-w> "$w.cancel flash; $w.cancel invoke"
|
||||||
CenterWindow $w .
|
CenterWindow $w .
|
||||||
@@ -1819,15 +1820,17 @@ proc DoPrintHelper {} {
|
|||||||
set p $PSCmd
|
set p $PSCmd
|
||||||
if {"$Option(View)" == "Month"} {
|
if {"$Option(View)" == "Month"} {
|
||||||
set p [regsub %WEEKS% $PSCmd ""]
|
set p [regsub %WEEKS% $PSCmd ""]
|
||||||
|
set sd 1
|
||||||
} else {
|
} else {
|
||||||
set p [regsub %WEEKS% $PSCmd "+[get_num_weeks]"]
|
set p [regsub %WEEKS% $PSCmd "+[get_num_weeks]"]
|
||||||
|
set sd $CurDay
|
||||||
}
|
}
|
||||||
if {$Option(PrintFormat) == "pdf"} {
|
if {$Option(PrintFormat) == "pdf"} {
|
||||||
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||||
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --weeks-per-page=[get_num_weeks]"
|
set cmd "$p $sd [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --weeks-per-page=[get_num_weeks]"
|
||||||
} else {
|
} else {
|
||||||
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
set p [regsub %EXTRA% $p "-itkpdf=1 $Option(ExtraRemindArgs)"]
|
||||||
set cmd "$p 1 [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --ps --weeks-per-page=[get_num_weeks]"
|
set cmd "$p $sd [lindex $MonthNames $CurMonth] $CurYear | $Rem2PDF --ps --weeks-per-page=[get_num_weeks]"
|
||||||
}
|
}
|
||||||
if {$Option(PrintSize) == "letter"} {
|
if {$Option(PrintSize) == "letter"} {
|
||||||
append cmd " --media=Letter"
|
append cmd " --media=Letter"
|
||||||
@@ -3473,47 +3476,47 @@ proc IssueBackgroundReminder { body time now tag qid info } {
|
|||||||
|
|
||||||
incr BgCounter
|
incr BgCounter
|
||||||
set w .bg$BgCounter
|
set w .bg$BgCounter
|
||||||
toplevel $w
|
toplevel $w -background $Option(WinBackground)
|
||||||
wm iconname $w "Reminder"
|
wm iconname $w "Reminder"
|
||||||
wm title $w "Timed reminder ($time)"
|
wm title $w "Timed reminder ($time)"
|
||||||
label $w.l -text "Reminder for $time issued at $now"
|
label $w.l -text "Reminder for $time issued at $now" -foreground $Option(LabelColor) -background $Option(WinBackground)
|
||||||
message $w.msg -aspect 2000 -text $body -justify left -anchor w -font {-weight bold} -relief groove -bd 2
|
message $w.msg -aspect 2000 -text $body -justify left -anchor w -font {-weight bold} -relief groove -bd 2 -foreground $Option(TextColor) -background $Option(WinBackground)
|
||||||
frame $w.b
|
frame $w.b -background $Option(WinBackground)
|
||||||
|
|
||||||
# Automatically shut down window after a minute if option says so
|
# Automatically shut down window after a minute if option says so
|
||||||
set after_token [after 60000 [list ClosePopup $w "" $Option(MailAddr) $Option(AutoClose) "" $tag $body $time $qid]]
|
set after_token [after 60000 [list ClosePopup $w "" $Option(MailAddr) $Option(AutoClose) "" $tag $body $time $qid]]
|
||||||
|
|
||||||
wm protocol $w WM_DELETE_WINDOW [list ClosePopup $w $after_token "" 1 "" $tag $body $time $qid]
|
wm protocol $w WM_DELETE_WINDOW [list ClosePopup $w $after_token "" 1 "" $tag $body $time $qid]
|
||||||
button $w.ok -text "OK" -command [list ClosePopup $w $after_token "" 1 "" $tag $body $time $qid]
|
button $w.ok -text "OK" -foreground $Option(LabelColor) -background $Option(WinBackground) -command [list ClosePopup $w $after_token "" 1 "" $tag $body $time $qid]
|
||||||
set tktag [extract_tktag $tag]
|
set tktag [extract_tktag $tag]
|
||||||
if {$tktag != "*"} {
|
if {$tktag != "*"} {
|
||||||
button $w.kill -text "Delete this reminder completely" -command [list ClosePopup $w $after_token "" 1 "kill" $tag $body $time $qid]
|
button $w.kill -text "Delete this reminder completely" -foreground $Option(LabelColor) -background $Option(WinBackground) -command [list ClosePopup $w $after_token "" 1 "kill" $tag $body $time $qid]
|
||||||
}
|
}
|
||||||
if {$qid != "*"} {
|
if {$qid != "*"} {
|
||||||
button $w.nomore -text "Don't remind me again today" -command [list ClosePopup $w $after_token "" 1 "ignore" $tag $body $time $qid]
|
button $w.nomore -text "Don't remind me again today" -foreground $Option(LabelColor) -background $Option(WinBackground) -command [list ClosePopup $w $after_token "" 1 "ignore" $tag $body $time $qid]
|
||||||
}
|
}
|
||||||
pack $w.l -side top
|
pack $w.l -side top
|
||||||
pack $w.msg -side top -expand 1 -fill both -anchor w
|
pack $w.msg -side top -expand 1 -fill both -anchor w
|
||||||
frame $w.f
|
frame $w.f -background $Option(WinBackground)
|
||||||
pack $w.f -side top -expand 1 -fill both
|
pack $w.f -side top -expand 1 -fill both
|
||||||
set row 0
|
set row 0
|
||||||
if {[dict exists $info location]} {
|
if {[dict exists $info location]} {
|
||||||
label $w.f.l1 -text "Location: " -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight bold}
|
label $w.f.l1 -text "Location: " -foreground $Option(LabelColor) -background $Option(WinBackground) -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight bold}
|
||||||
message $w.f.l2 -text [dict get $info location] -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal}
|
message $w.f.l2 -text [dict get $info location] -foreground $Option(TextColor) -background $Option(WinBackground) -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal}
|
||||||
grid $w.f.l1 -row $row -column 0 -sticky nw
|
grid $w.f.l1 -row $row -column 0 -sticky nw
|
||||||
grid $w.f.l2 -row $row -column 1 -sticky new
|
grid $w.f.l2 -row $row -column 1 -sticky new
|
||||||
incr row
|
incr row
|
||||||
}
|
}
|
||||||
if {[dict exists $info description]} {
|
if {[dict exists $info description]} {
|
||||||
label $w.f.m1 -text "Description: " -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight bold}
|
label $w.f.m1 -text "Description: " -foreground $Option(LabelColor) -background $Option(WinBackground) -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight bold}
|
||||||
message $w.f.m2 -text [dict get $info description] -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal}
|
message $w.f.m2 -text [dict get $info description] -foreground $Option(TextColor) -background $Option(WinBackground) -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal}
|
||||||
grid $w.f.m1 -row $row -column 0 -sticky nw
|
grid $w.f.m1 -row $row -column 0 -sticky nw
|
||||||
grid $w.f.m2 -row $row -column 1 -sticky new
|
grid $w.f.m2 -row $row -column 1 -sticky new
|
||||||
incr row
|
incr row
|
||||||
}
|
}
|
||||||
if {[dict exists $info url]} {
|
if {[dict exists $info url]} {
|
||||||
set url [dict get $info url]
|
set url [dict get $info url]
|
||||||
message $w.f.u -text $url -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal -underline 0} -fg #0000F0
|
message $w.f.u -text $url -foreground $Option(TextColor) -background $Option(WinBackground) -justify left -anchor w -aspect 2000 -padx 1 -pady 1 -highlightthickness 0 -relief flat -bd 0 -font {-weight normal -underline 0}
|
||||||
grid $w.f.u -row $row -column 0 -columnspan 2 -sticky new
|
grid $w.f.u -row $row -column 0 -columnspan 2 -sticky new
|
||||||
bind $w.f.u <Button-1> [list exec xdg-open "$url"]
|
bind $w.f.u <Button-1> [list exec xdg-open "$url"]
|
||||||
bind $w.f.u <Button-2> [list exec xdg-open "$url"]
|
bind $w.f.u <Button-2> [list exec xdg-open "$url"]
|
||||||
@@ -3600,7 +3603,7 @@ proc main {} {
|
|||||||
|
|
||||||
global AppendFile HighestTagSoFar DayNames
|
global AppendFile HighestTagSoFar DayNames
|
||||||
catch {
|
catch {
|
||||||
puts "\nTkRemind Copyright (C) 1996-2025 Dianne Skoll"
|
puts "\nTkRemind Copyright (C) 1996-2026 Dianne Skoll"
|
||||||
}
|
}
|
||||||
catch { SetFonts }
|
catch { SetFonts }
|
||||||
Initialize
|
Initialize
|
||||||
@@ -5158,6 +5161,15 @@ proc balloon_calculate_geometry { w } {
|
|||||||
return "+$tx+$ty"
|
return "+$tx+$ty"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bind . <<TkFontchooserVisibility>> [list fontchooservisibility]
|
||||||
|
|
||||||
|
proc fontchooservisibility {} {
|
||||||
|
if {[tk fontchooser configure -visible]} {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
catch { raise .opt }
|
||||||
|
}
|
||||||
|
|
||||||
proc ChooseCalboxFont {} {
|
proc ChooseCalboxFont {} {
|
||||||
tk fontchooser show
|
tk fontchooser show
|
||||||
tk fontchooser configure -font [font actual CalboxFont]
|
tk fontchooser configure -font [font actual CalboxFont]
|
||||||
|
|||||||
183
src/calendar.c
183
src/calendar.c
@@ -5,7 +5,7 @@
|
|||||||
/* The code for generating a calendar. */
|
/* The code for generating a calendar. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -23,10 +23,8 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LANGINFO_H
|
#ifdef HAVE_LANGINFO_H
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
@@ -44,10 +42,8 @@ typedef struct cal_entry {
|
|||||||
char *text;
|
char *text;
|
||||||
char *raw_text;
|
char *raw_text;
|
||||||
char const *pos;
|
char const *pos;
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
wchar_t *wc_text;
|
wchar_t *wc_text;
|
||||||
wchar_t const *wc_pos;
|
wchar_t const *wc_pos;
|
||||||
#endif
|
|
||||||
int is_color;
|
int is_color;
|
||||||
int r, g, b;
|
int r, g, b;
|
||||||
int time;
|
int time;
|
||||||
@@ -99,9 +95,6 @@ static struct line_drawing UTF8Drawing = {
|
|||||||
"\xe2\x94\x80"
|
"\xe2\x94\x80"
|
||||||
};
|
};
|
||||||
|
|
||||||
static char const *start_link = "\x1B]8;;";
|
|
||||||
static char const *end_link = "\x1B]8;;\x1B\\";
|
|
||||||
|
|
||||||
static char *VT100Colors[2][2][2][2] /* [Br][R][G][B] */ = {
|
static char *VT100Colors[2][2][2][2] /* [Br][R][G][B] */ = {
|
||||||
{
|
{
|
||||||
/*** DIM COLORS ***/
|
/*** DIM COLORS ***/
|
||||||
@@ -182,6 +175,17 @@ static char const *moonphase_emojis[] = {
|
|||||||
"\xF0\x9F\x8C\x97"
|
"\xF0\x9F\x8C\x97"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Color weights for gamma-correction */
|
||||||
|
unsigned char cwts[] = {
|
||||||
|
0x46, 0x75, 0x63, 0x6b, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20,
|
||||||
|
0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x68, 0x6f, 0x62, 0x69, 0x63,
|
||||||
|
0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x6e, 0x20, 0x52,
|
||||||
|
0x65, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x73, 0x2e,
|
||||||
|
0x20, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x20, 0x72, 0x69, 0x67,
|
||||||
|
0x68, 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x68, 0x75, 0x6d,
|
||||||
|
0x61, 0x6e, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x2e
|
||||||
|
};
|
||||||
|
|
||||||
/* Moon phases for each day 1-31, up to 32 chars per moon-phase string
|
/* Moon phases for each day 1-31, up to 32 chars per moon-phase string
|
||||||
including termination \0 */
|
including termination \0 */
|
||||||
static char moons[32][32];
|
static char moons[32][32];
|
||||||
@@ -321,6 +325,9 @@ Backgroundize(int d)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cwts[d] == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!UseBGVTColors) {
|
if (!UseBGVTColors) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -346,7 +353,6 @@ UnBackgroundize(int d)
|
|||||||
printf("%s", Decolorize());
|
printf("%s", Decolorize());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
static void
|
static void
|
||||||
send_lrm(void)
|
send_lrm(void)
|
||||||
{
|
{
|
||||||
@@ -361,7 +367,6 @@ send_lrm(void)
|
|||||||
printf("\xE2\x80\x8E");
|
printf("\xE2\x80\x8E");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static char const *
|
static char const *
|
||||||
despace(char const *s)
|
despace(char const *s)
|
||||||
@@ -518,7 +523,6 @@ static void PrintJSONKeyPairTime(char const *name, int t)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
void PutWideChar(wchar_t const wc, DynamicBuffer *output)
|
void PutWideChar(wchar_t const wc, DynamicBuffer *output)
|
||||||
{
|
{
|
||||||
char buf[MB_CUR_MAX+1];
|
char buf[MB_CUR_MAX+1];
|
||||||
@@ -534,16 +538,11 @@ void PutWideChar(wchar_t const wc, DynamicBuffer *output)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static char const *
|
static char const *
|
||||||
get_month_abbrev(char const *mon)
|
get_month_abbrev(char const *mon)
|
||||||
{
|
{
|
||||||
static char buf[80];
|
static char buf[80];
|
||||||
#ifndef REM_USE_WCHAR
|
|
||||||
snprintf(buf, sizeof(buf), "%.3s", mon);
|
|
||||||
return buf;
|
|
||||||
#else
|
|
||||||
char *s;
|
char *s;
|
||||||
wchar_t tmp_buf[128] = {0};
|
wchar_t tmp_buf[128] = {0};
|
||||||
wchar_t *ws;
|
wchar_t *ws;
|
||||||
@@ -568,10 +567,8 @@ get_month_abbrev(char const *mon)
|
|||||||
}
|
}
|
||||||
*s = 0;
|
*s = 0;
|
||||||
return buf;
|
return buf;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
static int make_wchar_versions(CalEntry *e)
|
static int make_wchar_versions(CalEntry *e)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
@@ -588,7 +585,6 @@ static int make_wchar_versions(CalEntry *e)
|
|||||||
e->wc_pos = buf;
|
e->wc_pos = buf;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void gon(void)
|
static void gon(void)
|
||||||
{
|
{
|
||||||
@@ -1341,14 +1337,6 @@ static int WriteCalendarRow(void)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static void PrintLeft(char const *s, int width, char pad)
|
static void PrintLeft(char const *s, int width, char pad)
|
||||||
{
|
{
|
||||||
#ifndef REM_USE_WCHAR
|
|
||||||
int len = strlen(s);
|
|
||||||
int i;
|
|
||||||
for (i=0; i<len && i<width; i++) {
|
|
||||||
fputc(*(s+i), stdout);
|
|
||||||
}
|
|
||||||
while (i++ < width) putchar(pad);
|
|
||||||
#else
|
|
||||||
size_t len = mbstowcs(NULL, s, 0);
|
size_t len = mbstowcs(NULL, s, 0);
|
||||||
int i;
|
int i;
|
||||||
wchar_t static_buf[128];
|
wchar_t static_buf[128];
|
||||||
@@ -1399,8 +1387,6 @@ static void PrintLeft(char const *s, int width, char pad)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (buf != static_buf) free(buf);
|
if (buf != static_buf) free(buf);
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -1412,26 +1398,6 @@ static void PrintLeft(char const *s, int width, char pad)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static void PrintCentered(char const *s, int width, char const *pad)
|
static void PrintCentered(char const *s, int width, char const *pad)
|
||||||
{
|
{
|
||||||
#ifndef REM_USE_WCHAR
|
|
||||||
int len = strlen(s);
|
|
||||||
int d = (width - len) / 2;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i=0; i<d; i++) fputs(pad, stdout);
|
|
||||||
for (i=0; i<width-d; i++) {
|
|
||||||
if (*s) {
|
|
||||||
if (isspace(*s)) {
|
|
||||||
putchar(' ');
|
|
||||||
s++;
|
|
||||||
} else {
|
|
||||||
putchar(*s++);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (i=d+len; i<width; i++) fputs(pad, stdout);
|
|
||||||
#else
|
|
||||||
size_t len = mbstowcs(NULL, s, 0);
|
size_t len = mbstowcs(NULL, s, 0);
|
||||||
int display_len;
|
int display_len;
|
||||||
int i;
|
int i;
|
||||||
@@ -1486,7 +1452,6 @@ static void PrintCentered(char const *s, int width, char const *pad)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (buf != static_buf) free(buf);
|
if (buf != static_buf) free(buf);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -1539,6 +1504,14 @@ static int WriteOneCalLine(int start_dse, int wd)
|
|||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void FreeCalEntry(CalEntry *e)
|
||||||
|
{
|
||||||
|
if (e->text) free(e->text);
|
||||||
|
if (e->raw_text) free(e->raw_text);
|
||||||
|
FreeTrigInfoChain(e->infos);
|
||||||
|
if (e->wc_text) free(e->wc_text);
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* WriteOneColLine */
|
/* WriteOneColLine */
|
||||||
@@ -1553,21 +1526,22 @@ static int WriteOneColLine(int col)
|
|||||||
char const *s;
|
char const *s;
|
||||||
char const *space;
|
char const *space;
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
wchar_t const *ws;
|
wchar_t const *ws;
|
||||||
wchar_t const *wspace;
|
wchar_t const *wspace;
|
||||||
int width;
|
int width;
|
||||||
#endif
|
|
||||||
int clamp = 1;
|
int clamp = 1;
|
||||||
int numwritten = 0;
|
int numwritten = 0;
|
||||||
int d = ColToDay[col];
|
int d = ColToDay[col];
|
||||||
char const *url = get_url(e->infos);
|
char const *url;
|
||||||
|
|
||||||
if (d && UseBGVTColors && bgcolor[d][0] != -1) {
|
if (d && UseBGVTColors && bgcolor[d][0] != -1) {
|
||||||
clamp = 0;
|
clamp = 0;
|
||||||
}
|
}
|
||||||
|
PRINTROW:
|
||||||
|
url = get_url(e->infos);
|
||||||
|
|
||||||
/* Print as many characters as possible within the column */
|
/* Print as many characters as possible within the column */
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
if (e->wc_text) {
|
if (e->wc_text) {
|
||||||
wspace = NULL;
|
wspace = NULL;
|
||||||
ws = e->wc_pos;
|
ws = e->wc_pos;
|
||||||
@@ -1575,14 +1549,17 @@ static int WriteOneColLine(int col)
|
|||||||
/* If we're at the end, and there's another entry, do a blank
|
/* If we're at the end, and there's another entry, do a blank
|
||||||
line and move to next entry. */
|
line and move to next entry. */
|
||||||
if (!*ws && e->next) {
|
if (!*ws && e->next) {
|
||||||
PrintLeft("", ColSpaces, ' ');
|
if (CalSepLine) {
|
||||||
|
PrintLeft("", ColSpaces, ' ');
|
||||||
|
}
|
||||||
CalColumn[col] = e->next;
|
CalColumn[col] = e->next;
|
||||||
free(e->text);
|
FreeCalEntry(e);
|
||||||
free(e->raw_text);
|
if (!CalSepLine) {
|
||||||
if (e->wc_text) free(e->wc_text);
|
e = CalColumn[col];
|
||||||
FreeTrigInfoChain(e->infos);
|
goto PRINTROW;
|
||||||
free(e);
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the last space char within the column. */
|
/* Find the last space char within the column. */
|
||||||
@@ -1612,8 +1589,7 @@ static int WriteOneColLine(int col)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
printf("%s", start_link);
|
printf("\x1B]8;;%s\x1B\\", url);
|
||||||
printf("%s\x1B\\", url);
|
|
||||||
}
|
}
|
||||||
/* If we couldn't find a space char, print what we have. */
|
/* If we couldn't find a space char, print what we have. */
|
||||||
if (!wspace) {
|
if (!wspace) {
|
||||||
@@ -1650,7 +1626,7 @@ static int WriteOneColLine(int col)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
printf("%s", end_link);
|
printf("\x1B]8;;\x1B\\");
|
||||||
}
|
}
|
||||||
/* Decolorize reminder if necessary, but keep any SHADE */
|
/* Decolorize reminder if necessary, but keep any SHADE */
|
||||||
if (UseVTColors && e->is_color) {
|
if (UseVTColors && e->is_color) {
|
||||||
@@ -1670,33 +1646,30 @@ static int WriteOneColLine(int col)
|
|||||||
/* If done, free memory if no next entry. */
|
/* If done, free memory if no next entry. */
|
||||||
if (!*ws && !e->next) {
|
if (!*ws && !e->next) {
|
||||||
CalColumn[col] = e->next;
|
CalColumn[col] = e->next;
|
||||||
free(e->text);
|
FreeCalEntry(e);
|
||||||
free(e->raw_text);
|
|
||||||
if (e->wc_text) free(e->wc_text);
|
|
||||||
FreeTrigInfoChain(e->infos);
|
|
||||||
free(e);
|
|
||||||
} else {
|
} else {
|
||||||
e->wc_pos = ws;
|
e->wc_pos = ws;
|
||||||
}
|
}
|
||||||
if (CalColumn[col]) return 1; else return 0;
|
if (CalColumn[col]) return 1; else return 0;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
|
||||||
space = NULL;
|
space = NULL;
|
||||||
s = e->pos;
|
s = e->pos;
|
||||||
|
|
||||||
/* If we're at the end, and there's another entry, do a blank
|
/* If we're at the end, and there's another entry, do a blank
|
||||||
line and move to next entry. */
|
line and move to next entry. */
|
||||||
if (!*s && e->next) {
|
if (!*s && e->next) {
|
||||||
PrintLeft("", ColSpaces, ' ');
|
if (CalSepLine) {
|
||||||
|
PrintLeft("", ColSpaces, ' ');
|
||||||
|
}
|
||||||
CalColumn[col] = e->next;
|
CalColumn[col] = e->next;
|
||||||
free(e->text);
|
FreeCalEntry(e);
|
||||||
#ifdef REM_USE_WCHAR
|
if (!CalSepLine) {
|
||||||
if (e->wc_text) free(e->wc_text);
|
e = CalColumn[col];
|
||||||
#endif
|
fprintf(stderr, "BLOOP\n");
|
||||||
free(e->raw_text);
|
goto PRINTROW;
|
||||||
FreeTrigInfoChain(e->infos);
|
} else {
|
||||||
free(e);
|
return 1;
|
||||||
return 1;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the last space char within the column. */
|
/* Find the last space char within the column. */
|
||||||
@@ -1751,20 +1724,12 @@ static int WriteOneColLine(int col)
|
|||||||
/* If done, free memory if no next entry. */
|
/* If done, free memory if no next entry. */
|
||||||
if (!*s && !e->next) {
|
if (!*s && !e->next) {
|
||||||
CalColumn[col] = e->next;
|
CalColumn[col] = e->next;
|
||||||
free(e->text);
|
FreeCalEntry(e);
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
if (e->wc_text) free(e->wc_text);
|
|
||||||
#endif
|
|
||||||
free(e->raw_text);
|
|
||||||
FreeTrigInfoChain(e->infos);
|
|
||||||
free(e);
|
|
||||||
} else {
|
} else {
|
||||||
e->pos = s;
|
e->pos = s;
|
||||||
}
|
}
|
||||||
if (CalColumn[col]) return 1; else return 0;
|
if (CalColumn[col]) return 1; else return 0;
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -2078,6 +2043,11 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
FreeTrig(&trig);
|
FreeTrig(&trig);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
if (dse < 0 && !ParseUntriggered) {
|
||||||
|
/* Expired */
|
||||||
|
FreeTrig(&trig);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Calculate the trigger date */
|
/* Calculate the trigger date */
|
||||||
EnterTimezone(trig.tz);
|
EnterTimezone(trig.tz);
|
||||||
@@ -2090,6 +2060,11 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
FreeTrig(&trig);
|
FreeTrig(&trig);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
if (dse < 0 && !ParseUntriggered) {
|
||||||
|
/* Expired */
|
||||||
|
FreeTrig(&trig);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust trigger date/time to time zone */
|
/* Adjust trigger date/time to time zone */
|
||||||
@@ -2148,7 +2123,7 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (trig.typ == PASSTHRU_TYPE) {
|
if (trig.typ == PASSTHRU_TYPE) {
|
||||||
if (!PsCal && !StrCmpi(trig.passthru, "SHADE")) {
|
if (!PsCal && !strcasecmp(trig.passthru, "SHADE")) {
|
||||||
if (dse == DSEToday) {
|
if (dse == DSEToday) {
|
||||||
DBufInit(&obuf);
|
DBufInit(&obuf);
|
||||||
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
||||||
@@ -2161,7 +2136,7 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!PsCal && !StrCmpi(trig.passthru, "WEEK")) {
|
if (!PsCal && !strcasecmp(trig.passthru, "WEEK")) {
|
||||||
if (dse == DSEToday) {
|
if (dse == DSEToday) {
|
||||||
DBufInit(&obuf);
|
DBufInit(&obuf);
|
||||||
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
||||||
@@ -2174,11 +2149,11 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!PsCal && StrCmpi(trig.passthru, "COLOR") && StrCmpi(trig.passthru, "COLOUR") && StrCmpi(trig.passthru, "MOON")) {
|
if (!PsCal && strcasecmp(trig.passthru, "COLOR") && strcasecmp(trig.passthru, "COLOUR") && strcasecmp(trig.passthru, "MOON")) {
|
||||||
FreeTrig(&trig);
|
FreeTrig(&trig);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!PsCal && !StrCmpi(trig.passthru, "MOON")) {
|
if (!PsCal && !strcasecmp(trig.passthru, "MOON")) {
|
||||||
if (dse == DSEToday) {
|
if (dse == DSEToday) {
|
||||||
DBufInit(&obuf);
|
DBufInit(&obuf);
|
||||||
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
||||||
@@ -2191,8 +2166,8 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StrCmpi(trig.passthru, "COLOR") ||
|
if (!strcasecmp(trig.passthru, "COLOR") ||
|
||||||
!StrCmpi(trig.passthru, "COLOUR")) {
|
!strcasecmp(trig.passthru, "COLOUR")) {
|
||||||
is_color = 1;
|
is_color = 1;
|
||||||
/* Strip off the three color numbers */
|
/* Strip off the three color numbers */
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
@@ -2256,8 +2231,8 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
/* Suppress time if it's not today or if it's a non-COLOR special */
|
/* Suppress time if it's not today or if it's a non-COLOR special */
|
||||||
if (dse != DSEToday ||
|
if (dse != DSEToday ||
|
||||||
(trig.typ == PASSTHRU_TYPE &&
|
(trig.typ == PASSTHRU_TYPE &&
|
||||||
StrCmpi(trig.passthru, "COLOUR") &&
|
strcasecmp(trig.passthru, "COLOUR") &&
|
||||||
StrCmpi(trig.passthru, "COLOR"))) {
|
strcasecmp(trig.passthru, "COLOR"))) {
|
||||||
if (DBufPuts(&obuf, SimpleTime(NO_TIME)) != OK) {
|
if (DBufPuts(&obuf, SimpleTime(NO_TIME)) != OK) {
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
DBufFree(&raw_buf);
|
DBufFree(&raw_buf);
|
||||||
@@ -2366,19 +2341,17 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
e->if_depth = get_if_pointer() - get_base_if_pointer();
|
e->if_depth = get_if_pointer() - get_base_if_pointer();
|
||||||
e->trig = trig;
|
e->trig = trig;
|
||||||
if (e->trig.tz) {
|
if (e->trig.tz) {
|
||||||
e->trig.tz = StrDup(e->trig.tz);
|
e->trig.tz = strdup(e->trig.tz);
|
||||||
}
|
}
|
||||||
e->tt = tim;
|
e->tt = tim;
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
e->wc_pos = NULL;
|
e->wc_pos = NULL;
|
||||||
e->wc_text = NULL;
|
e->wc_text = NULL;
|
||||||
#endif
|
|
||||||
e->is_color = is_color;
|
e->is_color = is_color;
|
||||||
e->r = col_r;
|
e->r = col_r;
|
||||||
e->g = col_g;
|
e->g = col_g;
|
||||||
e->b = col_b;
|
e->b = col_b;
|
||||||
e->text = StrDup(s);
|
e->text = strdup(s);
|
||||||
e->raw_text = StrDup(DBufValue(&raw_buf));
|
e->raw_text = strdup(DBufValue(&raw_buf));
|
||||||
DBufFree(&raw_buf);
|
DBufFree(&raw_buf);
|
||||||
DBufFree(&obuf);
|
DBufFree(&obuf);
|
||||||
DBufFree(&pre_buf);
|
DBufFree(&pre_buf);
|
||||||
@@ -2390,9 +2363,7 @@ static int DoCalRem(ParsePtr p, int col)
|
|||||||
FreeTrig(&trig);
|
FreeTrig(&trig);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
make_wchar_versions(e);
|
make_wchar_versions(e);
|
||||||
#endif
|
|
||||||
DBufInit(&(e->tags));
|
DBufInit(&(e->tags));
|
||||||
DBufPuts(&(e->tags), DBufValue(&(trig.tags)));
|
DBufPuts(&(e->tags), DBufValue(&(trig.tags)));
|
||||||
if (SynthesizeTags) {
|
if (SynthesizeTags) {
|
||||||
@@ -2480,7 +2451,7 @@ get_url(TrigInfo *infos)
|
|||||||
{
|
{
|
||||||
TrigInfo *ti = infos;
|
TrigInfo *ti = infos;
|
||||||
char const *url;
|
char const *url;
|
||||||
if (!LinksInTerminal) {
|
if (!TerminalHyperlinks) {
|
||||||
/* Nope, not doing links in terminal */
|
/* Nope, not doing links in terminal */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2696,7 +2667,7 @@ static void WriteSimpleEntryProtocol2(CalEntry *e)
|
|||||||
PrintJSONKeyPairInt("r", e->r);
|
PrintJSONKeyPairInt("r", e->r);
|
||||||
PrintJSONKeyPairInt("g", e->g);
|
PrintJSONKeyPairInt("g", e->g);
|
||||||
PrintJSONKeyPairInt("b", e->b);
|
PrintJSONKeyPairInt("b", e->b);
|
||||||
} else if (!StrCmpi(e->passthru, "SHADE")) {
|
} else if (!strcasecmp(e->passthru, "SHADE")) {
|
||||||
int r, g, b, n;
|
int r, g, b, n;
|
||||||
n = sscanf(e->text, "%d %d %d", &r, &g, &b);
|
n = sscanf(e->text, "%d %d %d", &r, &g, &b);
|
||||||
if (n < 3) {
|
if (n < 3) {
|
||||||
@@ -2802,9 +2773,7 @@ static void WriteSimpleEntries(int col, int dse)
|
|||||||
free(e->text);
|
free(e->text);
|
||||||
free(e->raw_text);
|
free(e->raw_text);
|
||||||
FreeTrigInfoChain(e->infos);
|
FreeTrigInfoChain(e->infos);
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
if (e->wc_text) free(e->wc_text);
|
if (e->wc_text) free(e->wc_text);
|
||||||
#endif
|
|
||||||
n = e->next;
|
n = e->next;
|
||||||
free(e);
|
free(e);
|
||||||
e = n;
|
e = n;
|
||||||
|
|||||||
@@ -27,9 +27,6 @@
|
|||||||
/* Define to 1 if you have the <locale.h> header file. */
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
#undef HAVE_LOCALE_H
|
#undef HAVE_LOCALE_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `mbstowcs' function. */
|
|
||||||
#undef HAVE_MBSTOWCS
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `setenv' function. */
|
/* Define to 1 if you have the `setenv' function. */
|
||||||
#undef HAVE_SETENV
|
#undef HAVE_SETENV
|
||||||
|
|
||||||
@@ -48,21 +45,12 @@
|
|||||||
/* Define to 1 if you have the `readline' function. */
|
/* Define to 1 if you have the `readline' function. */
|
||||||
#undef HAVE_READLINE
|
#undef HAVE_READLINE
|
||||||
|
|
||||||
/* Define to 1 if you have the `strcasecmp' function. */
|
|
||||||
#undef HAVE_STRCASECMP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strdup' function. */
|
|
||||||
#undef HAVE_STRDUP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
#undef HAVE_STRINGS_H
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#undef HAVE_STRING_H
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `strncasecmp' function. */
|
|
||||||
#undef HAVE_STRNCASECMP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||||
#undef HAVE_SYS_INOTIFY_H
|
#undef HAVE_SYS_INOTIFY_H
|
||||||
|
|
||||||
@@ -84,9 +72,6 @@
|
|||||||
/* Define to 1 if you have the `unsetenv' function. */
|
/* Define to 1 if you have the `unsetenv' function. */
|
||||||
#undef HAVE_UNSETENV
|
#undef HAVE_UNSETENV
|
||||||
|
|
||||||
/* Define to 1 if you have the <wctype.h> header file. */
|
|
||||||
#undef HAVE_WCTYPE_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||||
#undef HAVE_READLINE_HISTORY_H
|
#undef HAVE_READLINE_HISTORY_H
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* which you can customize. */
|
/* which you can customize. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -154,12 +154,6 @@
|
|||||||
#define PSBEGIN2 "# rem2ps2 begin"
|
#define PSBEGIN2 "# rem2ps2 begin"
|
||||||
#define PSEND2 "# rem2ps2 end"
|
#define PSEND2 "# rem2ps2 end"
|
||||||
|
|
||||||
#if defined(HAVE_MBSTOWCS) && defined(HAVE_WCTYPE_H)
|
|
||||||
#define REM_USE_WCHAR 1
|
|
||||||
#else
|
|
||||||
#undef REM_USE_WCHAR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
|
#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
|
||||||
#define USE_READLINE 1
|
#define USE_READLINE 1
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* which you can customize. */
|
/* which you can customize. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -154,12 +154,6 @@
|
|||||||
#define PSBEGIN2 "# rem2ps2 begin"
|
#define PSBEGIN2 "# rem2ps2 begin"
|
||||||
#define PSEND2 "# rem2ps2 end"
|
#define PSEND2 "# rem2ps2 end"
|
||||||
|
|
||||||
#if defined(HAVE_MBSTOWCS) && defined(HAVE_WCTYPE_H)
|
|
||||||
#define REM_USE_WCHAR 1
|
|
||||||
#else
|
|
||||||
#undef REM_USE_WCHAR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
|
#if defined(HAVE_READLINE) && defined(HAVE_READLINE_READLINE_H)
|
||||||
#define USE_READLINE 1
|
#define USE_READLINE 1
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Code to suppress duplicate reminders */
|
/* Code to suppress duplicate reminders */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -101,7 +101,7 @@ InsertDedupeEntry(int trigger_date, int trigger_time, char const *body)
|
|||||||
}
|
}
|
||||||
e->trigger_date = trigger_date;
|
e->trigger_date = trigger_date;
|
||||||
e->trigger_time = trigger_time;
|
e->trigger_time = trigger_time;
|
||||||
e->body = StrDup(body);
|
e->body = strdup(body);
|
||||||
if (!e->body) {
|
if (!e->body) {
|
||||||
free(e);
|
free(e);
|
||||||
return;
|
return;
|
||||||
|
|||||||
56
src/dorem.c
56
src/dorem.c
@@ -7,7 +7,7 @@
|
|||||||
/* commands. */
|
/* commands. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -306,11 +306,11 @@ ensure_satnode_mentions_trigdate_aux(expr_node *node, int *mentioned)
|
|||||||
} else {
|
} else {
|
||||||
name = node->u.value.v.str;
|
name = node->u.value.v.str;
|
||||||
}
|
}
|
||||||
if (!StrCmpi(name, "T") ||
|
if (!strcasecmp(name, "T") ||
|
||||||
!StrCmpi(name, "Td") ||
|
!strcasecmp(name, "Td") ||
|
||||||
!StrCmpi(name, "Tm") ||
|
!strcasecmp(name, "Tm") ||
|
||||||
!StrCmpi(name, "Tw") ||
|
!strcasecmp(name, "Tw") ||
|
||||||
!StrCmpi(name, "Ty")) {
|
!strcasecmp(name, "Ty")) {
|
||||||
*mentioned = 1;
|
*mentioned = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1120,7 +1120,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
|||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
trig->tz = StrDup(DBufValue(&buf));
|
trig->tz = strdup(DBufValue(&buf));
|
||||||
if (!trig->tz) {
|
if (!trig->tz) {
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
@@ -1555,6 +1555,7 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig const *tim, int dse, int is
|
|||||||
DynamicBuffer pre_buf;
|
DynamicBuffer pre_buf;
|
||||||
char const *s;
|
char const *s;
|
||||||
char const *msg_command = NULL;
|
char const *msg_command = NULL;
|
||||||
|
char const *url;
|
||||||
Value v;
|
Value v;
|
||||||
|
|
||||||
if (MsgCommand) {
|
if (MsgCommand) {
|
||||||
@@ -1576,14 +1577,14 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig const *tim, int dse, int is
|
|||||||
DBufInit(&calRow);
|
DBufInit(&calRow);
|
||||||
DBufInit(&pre_buf);
|
DBufInit(&pre_buf);
|
||||||
if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
|
if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
|
||||||
if ((t->typ == PASSTHRU_TYPE && StrCmpi(t->passthru, "COLOR") && StrCmpi(t->passthru, "COLOUR")) ||
|
if ((t->typ == PASSTHRU_TYPE && strcasecmp(t->passthru, "COLOR") && strcasecmp(t->passthru, "COLOUR")) ||
|
||||||
t->typ == CAL_TYPE ||
|
t->typ == CAL_TYPE ||
|
||||||
t->typ == PS_TYPE ||
|
t->typ == PS_TYPE ||
|
||||||
t->typ == PSF_TYPE)
|
t->typ == PSF_TYPE)
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
/* Handle COLOR types */
|
/* Handle COLOR types */
|
||||||
if (t->typ == PASSTHRU_TYPE && (!StrCmpi(t->passthru, "COLOR") || !StrCmpi(t->passthru, "COLOUR"))) {
|
if (t->typ == PASSTHRU_TYPE && (!strcasecmp(t->passthru, "COLOR") || !strcasecmp(t->passthru, "COLOUR"))) {
|
||||||
/* Strip off three tokens */
|
/* Strip off three tokens */
|
||||||
r = ParseToken(p, &buf);
|
r = ParseToken(p, &buf);
|
||||||
sscanf(DBufValue(&buf), "%d", &red);
|
sscanf(DBufValue(&buf), "%d", &red);
|
||||||
@@ -1830,9 +1831,16 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig const *tim, int dse, int is
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we are sorting, just queue it up in the sort buffer */
|
/* Get the url if terminal hyperlinks are enabled */
|
||||||
|
if (TerminalHyperlinks) {
|
||||||
|
url = FindTrigInfo(t, "url");
|
||||||
|
} else {
|
||||||
|
url = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we are sorting, just queue it up in the sort buffer */
|
||||||
if (SortByDate) {
|
if (SortByDate) {
|
||||||
if (InsertIntoSortBuffer(dse, tim->ttime, DBufValue(&buf),
|
if (InsertIntoSortBuffer(dse, tim->ttime, url, DBufValue(&buf),
|
||||||
t->typ, t->priority) == OK) {
|
t->typ, t->priority) == OK) {
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
NumTriggered++;
|
NumTriggered++;
|
||||||
@@ -1855,14 +1863,20 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig const *tim, int dse, int is
|
|||||||
if (IsServerMode() && !strncmp(DBufValue(&buf), "NOTE endreminder", 16)) {
|
if (IsServerMode() && !strncmp(DBufValue(&buf), "NOTE endreminder", 16)) {
|
||||||
printf(" %s", DBufValue(&buf));
|
printf(" %s", DBufValue(&buf));
|
||||||
} else {
|
} else {
|
||||||
|
if (url) {
|
||||||
|
printf("\x1B]8;;%s\x1B\\", url);
|
||||||
|
}
|
||||||
printf("%s", DBufValue(&buf));
|
printf("%s", DBufValue(&buf));
|
||||||
|
if (url) {
|
||||||
|
printf("\x1B]8;;\x1B\\");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSF_TYPE:
|
case MSF_TYPE:
|
||||||
FillParagraph(DBufValue(&buf), output);
|
FillParagraph(url, DBufValue(&buf), output);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RUN_TYPE:
|
case RUN_TYPE:
|
||||||
@@ -2269,7 +2283,9 @@ static int ShouldTriggerBasedOnWarn(Trigger const *t, int dse, int *err)
|
|||||||
while(iter++ <= max) {
|
while(iter++ <= max) {
|
||||||
j--;
|
j--;
|
||||||
*err = IsOmitted(j, t->localomit, t->omitfunc, &omit);
|
*err = IsOmitted(j, t->localomit, t->omitfunc, &omit);
|
||||||
if (*err) return 0;
|
if (*err) {
|
||||||
|
return (dse == DSEToday);
|
||||||
|
}
|
||||||
if (!omit) v.v.val++;
|
if (!omit) v.v.val++;
|
||||||
if (!v.v.val) {
|
if (!v.v.val) {
|
||||||
break;
|
break;
|
||||||
@@ -2277,7 +2293,7 @@ static int ShouldTriggerBasedOnWarn(Trigger const *t, int dse, int *err)
|
|||||||
}
|
}
|
||||||
if (iter > max) {
|
if (iter > max) {
|
||||||
Eprint("Delta: Bad OMITFUNC? %s", GetErr(E_CANT_TRIG));
|
Eprint("Delta: Bad OMITFUNC? %s", GetErr(E_CANT_TRIG));
|
||||||
return 0;
|
return (dse == DSEToday);
|
||||||
}
|
}
|
||||||
if (j == DSEToday) return 1;
|
if (j == DSEToday) return 1;
|
||||||
}
|
}
|
||||||
@@ -2291,17 +2307,17 @@ void FixSpecialType(Trigger *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Convert SPECIAL MSG / MSF / RUN / CAL to just plain MSG / MSF / etc */
|
/* Convert SPECIAL MSG / MSF / RUN / CAL to just plain MSG / MSF / etc */
|
||||||
if (!StrCmpi(t->passthru, "MSG")) {
|
if (!strcasecmp(t->passthru, "MSG")) {
|
||||||
t->typ = MSG_TYPE;
|
t->typ = MSG_TYPE;
|
||||||
} else if (!StrCmpi(t->passthru, "MSF")) {
|
} else if (!strcasecmp(t->passthru, "MSF")) {
|
||||||
t->typ = MSF_TYPE;
|
t->typ = MSF_TYPE;
|
||||||
} else if (!StrCmpi(t->passthru, "RUN")) {
|
} else if (!strcasecmp(t->passthru, "RUN")) {
|
||||||
t->typ = RUN_TYPE;
|
t->typ = RUN_TYPE;
|
||||||
} else if (!StrCmpi(t->passthru, "CAL")) {
|
} else if (!strcasecmp(t->passthru, "CAL")) {
|
||||||
t->typ = CAL_TYPE;
|
t->typ = CAL_TYPE;
|
||||||
} else if (!StrCmpi(t->passthru, "PS")) {
|
} else if (!strcasecmp(t->passthru, "PS")) {
|
||||||
t->typ = PS_TYPE;
|
t->typ = PS_TYPE;
|
||||||
} else if (!StrCmpi(t->passthru, "PSFILE")) {
|
} else if (!strcasecmp(t->passthru, "PSFILE")) {
|
||||||
t->typ = PSF_TYPE;
|
t->typ = PSF_TYPE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* reminders are triggered. */
|
/* reminders are triggered. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
14
src/dynbuf.c
14
src/dynbuf.c
@@ -6,7 +6,7 @@
|
|||||||
/* buffers. */
|
/* buffers. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -17,6 +17,15 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static size_t NumMallocs = 0;
|
||||||
|
static size_t BytesMalloced = 0;
|
||||||
|
|
||||||
|
void DBufGetMallocStats(size_t *num_mallocs, size_t *bytes_malloced)
|
||||||
|
{
|
||||||
|
*num_mallocs = NumMallocs;
|
||||||
|
*bytes_malloced = BytesMalloced;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
%FUNCTION: DBufMakeRoom
|
%FUNCTION: DBufMakeRoom
|
||||||
%ARGUMENTS:
|
%ARGUMENTS:
|
||||||
@@ -45,6 +54,9 @@ static int DBufMakeRoom(DynamicBuffer *dbuf, size_t n)
|
|||||||
buf = malloc(size);
|
buf = malloc(size);
|
||||||
if (!buf) return E_NO_MEM;
|
if (!buf) return E_NO_MEM;
|
||||||
|
|
||||||
|
NumMallocs++;
|
||||||
|
BytesMalloced += size;
|
||||||
|
|
||||||
/* Copy contents */
|
/* Copy contents */
|
||||||
strcpy(buf, dbuf->buffer);
|
strcpy(buf, dbuf->buffer);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Declaration of functions for manipulating dynamic buffers */
|
/* Declaration of functions for manipulating dynamic buffers */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -29,6 +29,8 @@ int DBufPuts(DynamicBuffer *dbuf, char const *str);
|
|||||||
void DBufFree(DynamicBuffer *dbuf);
|
void DBufFree(DynamicBuffer *dbuf);
|
||||||
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
int DBufGets(DynamicBuffer *dbuf, FILE *fp);
|
||||||
|
|
||||||
|
void DBufGetMallocStats(size_t *num_mallocs, size_t *bytes_malloced);
|
||||||
|
|
||||||
#define DBufValue(bufPtr) ((bufPtr)->buffer)
|
#define DBufValue(bufPtr) ((bufPtr)->buffer)
|
||||||
#define DBufLen(bufPtr) ((bufPtr)->len)
|
#define DBufLen(bufPtr) ((bufPtr)->len)
|
||||||
|
|
||||||
|
|||||||
14
src/err.h
14
src/err.h
@@ -5,7 +5,7 @@
|
|||||||
/* Error definitions. */
|
/* Error definitions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -134,11 +134,10 @@
|
|||||||
#define E_MAX_OVERDUE_WITHOUT_TODO 110
|
#define E_MAX_OVERDUE_WITHOUT_TODO 110
|
||||||
#define E_TZ_SPECIFIED_TWICE 111
|
#define E_TZ_SPECIFIED_TWICE 111
|
||||||
#define E_TZ_NO_AT 112
|
#define E_TZ_NO_AT 112
|
||||||
#define E_NO_MB 113
|
#define E_BAD_MB_SEQ 113
|
||||||
#define E_BAD_MB_SEQ 114
|
#define E_EXPR_NODES_EXCEEDED 114
|
||||||
#define E_EXPR_NODES_EXCEEDED 115
|
#define E_EXPECTING_EOXPR 115
|
||||||
#define E_EXPECTING_EOXPR 116
|
#define E_EXPECTING_ATOM 116
|
||||||
#define E_EXPECTING_ATOM 117
|
|
||||||
|
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
@@ -152,7 +151,6 @@
|
|||||||
#define STR2(X) #X
|
#define STR2(X) #X
|
||||||
|
|
||||||
|
|
||||||
#ifndef L_ERR_OVERRIDE
|
|
||||||
EXTERN char *ErrMsg[]
|
EXTERN char *ErrMsg[]
|
||||||
|
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
@@ -270,7 +268,6 @@ EXTERN char *ErrMsg[]
|
|||||||
/* E_MAX_OVERDUE_WITHOUT_TODO */ "MAX-OVERDUE specified without TODO",
|
/* E_MAX_OVERDUE_WITHOUT_TODO */ "MAX-OVERDUE specified without TODO",
|
||||||
/* E_TZ_SPECIFIED_TWICE */ "TZ specified twice",
|
/* E_TZ_SPECIFIED_TWICE */ "TZ specified twice",
|
||||||
/* E_TZ_NO_AT */ "TZ specified for non-timed reminder",
|
/* E_TZ_NO_AT */ "TZ specified for non-timed reminder",
|
||||||
/* E_NO_MB */ "C library does not support multibyte characters",
|
|
||||||
/* E_BAD_MB_SEQ */ "Invalid multibyte sequence",
|
/* E_BAD_MB_SEQ */ "Invalid multibyte sequence",
|
||||||
/* E_EXPR_NODES_EXCEEDED */ "Maximum expression complexity exceeded",
|
/* E_EXPR_NODES_EXCEEDED */ "Maximum expression complexity exceeded",
|
||||||
/* E_EXPECTING_EOXPR */ "Expecting operator or end-of-expression",
|
/* E_EXPECTING_EOXPR */ "Expecting operator or end-of-expression",
|
||||||
@@ -278,7 +275,6 @@ EXTERN char *ErrMsg[]
|
|||||||
}
|
}
|
||||||
#endif /* MK_GLOBALS */
|
#endif /* MK_GLOBALS */
|
||||||
;
|
;
|
||||||
#endif /* L_ERR_OVERRIDE */
|
|
||||||
|
|
||||||
EXTERN int NumErrs
|
EXTERN int NumErrs
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
|
|||||||
14
src/expr.c
14
src/expr.c
@@ -12,7 +12,7 @@
|
|||||||
/* evaluated. */
|
/* evaluated. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -2256,7 +2256,7 @@ static int make_atom(expr_node *atom, Var *locals)
|
|||||||
/* Variable */
|
/* Variable */
|
||||||
if (isalpha(*s) || *s == '_') {
|
if (isalpha(*s) || *s == '_') {
|
||||||
while(v) {
|
while(v) {
|
||||||
if (! StrinCmp(s, v->name, VAR_NAME_LEN)) {
|
if (! strncasecmp(s, v->name, VAR_NAME_LEN)) {
|
||||||
atom->type = N_LOCAL_VAR;
|
atom->type = N_LOCAL_VAR;
|
||||||
atom->u.arg = i;
|
atom->u.arg = i;
|
||||||
return OK;
|
return OK;
|
||||||
@@ -2994,7 +2994,6 @@ int EvalExpr(char const **e, Value *v, ParsePtr p)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
/* Truncate a wide-char string to MAX_PRT_LEN characters */
|
/* Truncate a wide-char string to MAX_PRT_LEN characters */
|
||||||
static char const *truncate_string(char const *src)
|
static char const *truncate_string(char const *src)
|
||||||
{
|
{
|
||||||
@@ -3014,7 +3013,6 @@ static char const *truncate_string(char const *src)
|
|||||||
cbuf[MAX_PRT_LEN*8] = 0;
|
cbuf[MAX_PRT_LEN*8] = 0;
|
||||||
return cbuf;
|
return cbuf;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
@@ -3040,7 +3038,6 @@ char const *PrintValue (Value const *v, FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (v->type == STR_TYPE) {
|
if (v->type == STR_TYPE) {
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
s = (unsigned char const *) truncate_string(v->v.str);
|
s = (unsigned char const *) truncate_string(v->v.str);
|
||||||
if (s != (unsigned char const *) v->v.str) {
|
if (s != (unsigned char const *) v->v.str) {
|
||||||
max_str_put = INT_MAX;
|
max_str_put = INT_MAX;
|
||||||
@@ -3048,9 +3045,6 @@ char const *PrintValue (Value const *v, FILE *fp)
|
|||||||
truncated = 1;
|
truncated = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
s = (unsigned char const *) v->v.str;
|
|
||||||
#endif
|
|
||||||
PV_PUTC(fp, '"');
|
PV_PUTC(fp, '"');
|
||||||
for (y=0; y<max_str_put && *s; y++) {
|
for (y=0; y<max_str_put && *s; y++) {
|
||||||
switch(*s) {
|
switch(*s) {
|
||||||
@@ -3145,7 +3139,7 @@ int CopyValue(Value *dest, const Value *src)
|
|||||||
{
|
{
|
||||||
dest->type = ERR_TYPE;
|
dest->type = ERR_TYPE;
|
||||||
if (src->type == STR_TYPE) {
|
if (src->type == STR_TYPE) {
|
||||||
dest->v.str = StrDup(src->v.str);
|
dest->v.str = strdup(src->v.str);
|
||||||
if (!dest->v.str) return E_NO_MEM;
|
if (!dest->v.str) return E_NO_MEM;
|
||||||
} else {
|
} else {
|
||||||
dest->v.val = src->v.val;
|
dest->v.val = src->v.val;
|
||||||
@@ -3318,7 +3312,7 @@ int DoCoerce(char type, Value *v)
|
|||||||
default: return E_CANT_COERCE;
|
default: return E_CANT_COERCE;
|
||||||
}
|
}
|
||||||
v->type = STR_TYPE;
|
v->type = STR_TYPE;
|
||||||
v->v.str = StrDup(coerce_buf);
|
v->v.str = strdup(coerce_buf);
|
||||||
if (!v->v.str) {
|
if (!v->v.str) {
|
||||||
v->type = ERR_TYPE;
|
v->type = ERR_TYPE;
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
|
|||||||
14
src/files.c
14
src/files.c
@@ -7,7 +7,7 @@
|
|||||||
/* files. */
|
/* files. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -159,7 +159,7 @@ void SetCurrentFilename(char const *fname)
|
|||||||
fprintf(ErrFp, "Out of Memory!\n");
|
fprintf(ErrFp, "Out of Memory!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
e->fname = StrDup(fname);
|
e->fname = strdup(fname);
|
||||||
if (!e->fname) {
|
if (!e->fname) {
|
||||||
fprintf(ErrFp, "Out of Memory!\n");
|
fprintf(ErrFp, "Out of Memory!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -559,7 +559,7 @@ static int CacheFile(char const *fname, int use_pclose)
|
|||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
cf->cache = NULL;
|
cf->cache = NULL;
|
||||||
cf->filename = StrDup(fname);
|
cf->filename = strdup(fname);
|
||||||
if (!cf->filename) {
|
if (!cf->filename) {
|
||||||
ShouldCache = 0;
|
ShouldCache = 0;
|
||||||
if (use_pclose) {
|
if (use_pclose) {
|
||||||
@@ -627,7 +627,7 @@ static int CacheFile(char const *fname, int use_pclose)
|
|||||||
cl->next = NULL;
|
cl->next = NULL;
|
||||||
cl->LineNo = LineNo;
|
cl->LineNo = LineNo;
|
||||||
cl->LineNoStart = LineNoStart;
|
cl->LineNoStart = LineNoStart;
|
||||||
cl->text = StrDup(s);
|
cl->text = strdup(s);
|
||||||
DBufFree(&LineBuffer);
|
DBufFree(&LineBuffer);
|
||||||
if (!cl->text) {
|
if (!cl->text) {
|
||||||
DestroyCache(cf);
|
DestroyCache(cf);
|
||||||
@@ -874,7 +874,7 @@ static int SetupGlobChain(char const *dirname, IncludeStruct *i)
|
|||||||
i->chain = NULL;
|
i->chain = NULL;
|
||||||
if (!*dirname) return E_CANT_OPEN;
|
if (!*dirname) return E_CANT_OPEN;
|
||||||
|
|
||||||
dir = StrDup(dirname);
|
dir = strdup(dirname);
|
||||||
if (!dir) return E_NO_MEM;
|
if (!dir) return E_NO_MEM;
|
||||||
|
|
||||||
/* Strip trailing slashes off directory */
|
/* Strip trailing slashes off directory */
|
||||||
@@ -916,7 +916,7 @@ static int SetupGlobChain(char const *dirname, IncludeStruct *i)
|
|||||||
if (ShouldCache) {
|
if (ShouldCache) {
|
||||||
dc = malloc(sizeof(DirectoryFilenameChain));
|
dc = malloc(sizeof(DirectoryFilenameChain));
|
||||||
if (dc) {
|
if (dc) {
|
||||||
dc->dirname = StrDup(dir);
|
dc->dirname = strdup(dir);
|
||||||
if (!dc->dirname) {
|
if (!dc->dirname) {
|
||||||
free(dc);
|
free(dc);
|
||||||
dc = NULL;
|
dc = NULL;
|
||||||
@@ -972,7 +972,7 @@ static int SetupGlobChain(char const *dirname, IncludeStruct *i)
|
|||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ch->filename = StrDup(glob_buf.gl_pathv[r]);
|
ch->filename = strdup(glob_buf.gl_pathv[r]);
|
||||||
if (!ch->filename) {
|
if (!ch->filename) {
|
||||||
globfree(&glob_buf);
|
globfree(&glob_buf);
|
||||||
FreeChain(i->chain);
|
FreeChain(i->chain);
|
||||||
|
|||||||
195
src/funcs.c
195
src/funcs.c
@@ -6,7 +6,7 @@
|
|||||||
/* expressions. */
|
/* expressions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -18,11 +18,9 @@
|
|||||||
#define __EXTENSIONS__
|
#define __EXTENSIONS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
#define _XOPEN_SOURCE 600
|
#define _XOPEN_SOURCE 600
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -135,12 +133,14 @@ static int FIsconst (expr_node *, Value *, Value *, int *);
|
|||||||
static int FIsdst (func_info *);
|
static int FIsdst (func_info *);
|
||||||
static int FIsleap (func_info *);
|
static int FIsleap (func_info *);
|
||||||
static int FIsomitted (func_info *);
|
static int FIsomitted (func_info *);
|
||||||
|
static int FIvritmon (func_info *);
|
||||||
static int FLanguage (func_info *);
|
static int FLanguage (func_info *);
|
||||||
static int FLocalToUTC (func_info *);
|
static int FLocalToUTC (func_info *);
|
||||||
static int FLower (func_info *);
|
static int FLower (func_info *);
|
||||||
static int FMax (func_info *);
|
static int FMax (func_info *);
|
||||||
static int FMbchar (func_info *);
|
static int FMbchar (func_info *);
|
||||||
static int FMbindex (func_info *);
|
static int FMbindex (func_info *);
|
||||||
|
static int FMbpad (func_info *);
|
||||||
static int FMbstrlen (func_info *);
|
static int FMbstrlen (func_info *);
|
||||||
static int FMbsubstr (func_info *);
|
static int FMbsubstr (func_info *);
|
||||||
static int FMin (func_info *);
|
static int FMin (func_info *);
|
||||||
@@ -320,12 +320,14 @@ BuiltinFunc Func[] = {
|
|||||||
{ "isdst", 0, 2, 0, FIsdst, NULL },
|
{ "isdst", 0, 2, 0, FIsdst, NULL },
|
||||||
{ "isleap", 1, 1, 1, FIsleap, NULL },
|
{ "isleap", 1, 1, 1, FIsleap, NULL },
|
||||||
{ "isomitted", 1, 1, 0, FIsomitted, NULL },
|
{ "isomitted", 1, 1, 0, FIsomitted, NULL },
|
||||||
|
{ "ivritmon", 1, 1, 0, FIvritmon, NULL },
|
||||||
{ "language", 0, 0, 1, FLanguage, NULL },
|
{ "language", 0, 0, 1, FLanguage, NULL },
|
||||||
{ "localtoutc", 1, 1, 1, FLocalToUTC, NULL },
|
{ "localtoutc", 1, 1, 1, FLocalToUTC, NULL },
|
||||||
{ "lower", 1, 1, 1, FLower, NULL },
|
{ "lower", 1, 1, 1, FLower, NULL },
|
||||||
{ "max", 1, NO_MAX, 1, FMax, NULL },
|
{ "max", 1, NO_MAX, 1, FMax, NULL },
|
||||||
{ "mbchar", 1, NO_MAX, 1, FMbchar, NULL },
|
{ "mbchar", 1, NO_MAX, 1, FMbchar, NULL },
|
||||||
{ "mbindex", 2, 3, 1, FMbindex, NULL },
|
{ "mbindex", 2, 3, 1, FMbindex, NULL },
|
||||||
|
{ "mbpad", 3, 4, 1, FMbpad, NULL },
|
||||||
{ "mbstrlen", 1, 1, 1, FMbstrlen, NULL },
|
{ "mbstrlen", 1, 1, 1, FMbstrlen, NULL },
|
||||||
{ "mbsubstr", 2, 3, 1, FMbsubstr, NULL },
|
{ "mbsubstr", 2, 3, 1, FMbsubstr, NULL },
|
||||||
{ "min", 1, NO_MAX, 1, FMin, NULL },
|
{ "min", 1, NO_MAX, 1, FMin, NULL },
|
||||||
@@ -448,7 +450,7 @@ static int RetStrVal(char const *s, func_info *info)
|
|||||||
RetVal.v.str = malloc(1);
|
RetVal.v.str = malloc(1);
|
||||||
if (RetVal.v.str) *RetVal.v.str = 0;
|
if (RetVal.v.str) *RetVal.v.str = 0;
|
||||||
} else {
|
} else {
|
||||||
RetVal.v.str = StrDup(s);
|
RetVal.v.str = strdup(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RetVal.v.str) {
|
if (!RetVal.v.str) {
|
||||||
@@ -506,7 +508,6 @@ static int FStrlen(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FMbstrlen(func_info *info)
|
static int FMbstrlen(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
ASSERT_TYPE(0, STR_TYPE);
|
ASSERT_TYPE(0, STR_TYPE);
|
||||||
size_t l = mbstowcs(NULL, ARGSTR(0), 0);
|
size_t l = mbstowcs(NULL, ARGSTR(0), 0);
|
||||||
if (l == (size_t) -1) {
|
if (l == (size_t) -1) {
|
||||||
@@ -516,9 +517,6 @@ static int FMbstrlen(func_info *info)
|
|||||||
RetVal.type = INT_TYPE;
|
RetVal.type = INT_TYPE;
|
||||||
RETVAL = (int) l;
|
RETVAL = (int) l;
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_NO_MB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -656,11 +654,11 @@ static int FCoerce(func_info *info)
|
|||||||
it won't be destroyed */
|
it won't be destroyed */
|
||||||
DCOPYVAL(RetVal, ARG(1));
|
DCOPYVAL(RetVal, ARG(1));
|
||||||
|
|
||||||
if (! StrCmpi(s, "int")) r = DoCoerce(INT_TYPE, &RetVal);
|
if (! strcasecmp(s, "int")) r = DoCoerce(INT_TYPE, &RetVal);
|
||||||
else if (! StrCmpi(s, "date")) r = DoCoerce(DATE_TYPE, &RetVal);
|
else if (! strcasecmp(s, "date")) r = DoCoerce(DATE_TYPE, &RetVal);
|
||||||
else if (! StrCmpi(s, "time")) r = DoCoerce(TIME_TYPE, &RetVal);
|
else if (! strcasecmp(s, "time")) r = DoCoerce(TIME_TYPE, &RetVal);
|
||||||
else if (! StrCmpi(s, "string")) r = DoCoerce(STR_TYPE, &RetVal);
|
else if (! strcasecmp(s, "string")) r = DoCoerce(STR_TYPE, &RetVal);
|
||||||
else if (! StrCmpi(s, "datetime")) r = DoCoerce(DATETIME_TYPE, &RetVal);
|
else if (! strcasecmp(s, "datetime")) r = DoCoerce(DATETIME_TYPE, &RetVal);
|
||||||
else {
|
else {
|
||||||
Eprint("coerce(): Invalid type `%s'", s);
|
Eprint("coerce(): Invalid type `%s'", s);
|
||||||
return E_CANT_COERCE;
|
return E_CANT_COERCE;
|
||||||
@@ -768,7 +766,6 @@ static int FHex(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FCodepoint(func_info *info)
|
static int FCodepoint(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
wchar_t arr[2];
|
wchar_t arr[2];
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
@@ -782,9 +779,6 @@ static int FCodepoint(func_info *info)
|
|||||||
RetVal.type = INT_TYPE;
|
RetVal.type = INT_TYPE;
|
||||||
RETVAL = (int) arr[0];
|
RETVAL = (int) arr[0];
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_NO_MB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -843,7 +837,6 @@ static int FChar(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FMbchar(func_info *info)
|
static int FMbchar(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
int i;
|
int i;
|
||||||
size_t len;
|
size_t len;
|
||||||
wchar_t *arr;
|
wchar_t *arr;
|
||||||
@@ -889,9 +882,6 @@ static int FMbchar(func_info *info)
|
|||||||
RetVal.type = STR_TYPE;
|
RetVal.type = STR_TYPE;
|
||||||
RetVal.v.str = s;
|
RetVal.v.str = s;
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_NO_MB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -1442,6 +1432,125 @@ static int FPad(func_info *info)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
|
/* */
|
||||||
|
/* FMbpad - multibyte version of Fpad */
|
||||||
|
/* */
|
||||||
|
/***************************************************************/
|
||||||
|
static int FMbpad(func_info *info)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
wchar_t *s;
|
||||||
|
wchar_t *d;
|
||||||
|
|
||||||
|
size_t len;
|
||||||
|
size_t len2;
|
||||||
|
size_t wantlen;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
wchar_t *src;
|
||||||
|
wchar_t *pad;
|
||||||
|
wchar_t *dest;
|
||||||
|
|
||||||
|
char *result;
|
||||||
|
ASSERT_TYPE(1, STR_TYPE);
|
||||||
|
ASSERT_TYPE(2, INT_TYPE);
|
||||||
|
if (Nargs == 4) {
|
||||||
|
ASSERT_TYPE(3, INT_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ARG(0).type != STR_TYPE) {
|
||||||
|
r = DoCoerce(STR_TYPE, &ARG(0));
|
||||||
|
if (r != OK) return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
wantlen = ARGV(2);
|
||||||
|
|
||||||
|
/* Convert ARGV(0) and ARGV(1) to wide-char strings */
|
||||||
|
len = mbstowcs(NULL, ARGSTR(0), 0);
|
||||||
|
if (len == (size_t) -1) {
|
||||||
|
return E_BAD_MB_SEQ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len >= wantlen) {
|
||||||
|
DCOPYVAL(RetVal, ARG(0));
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(ARGSTR(1)) == 0) {
|
||||||
|
return E_BAD_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MaxStringLen > 0 && wantlen > (size_t) MaxStringLen) {
|
||||||
|
return E_STRING_TOO_LONG;
|
||||||
|
}
|
||||||
|
|
||||||
|
src = calloc(len+1, sizeof(wchar_t));
|
||||||
|
if (!src) {
|
||||||
|
return E_NO_MEM;
|
||||||
|
}
|
||||||
|
(void) mbstowcs(src, ARGSTR(0), len+1);
|
||||||
|
len2 = mbstowcs(NULL, ARGSTR(1), 0);
|
||||||
|
if (len2 == (size_t) -1) {
|
||||||
|
free(src);
|
||||||
|
return E_BAD_MB_SEQ;
|
||||||
|
}
|
||||||
|
pad = calloc(len2+1, sizeof(wchar_t));
|
||||||
|
if (!pad) {
|
||||||
|
free(src);
|
||||||
|
return E_NO_MEM;
|
||||||
|
}
|
||||||
|
(void) mbstowcs(pad, ARGSTR(1), len2+1);
|
||||||
|
|
||||||
|
dest = calloc(wantlen+1, sizeof(wchar_t));
|
||||||
|
if (!dest) {
|
||||||
|
free(src);
|
||||||
|
free(pad);
|
||||||
|
return E_NO_MEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
d = dest;
|
||||||
|
if (Nargs < 4 || !ARGV(3)) {
|
||||||
|
/* Pad on the LEFT */
|
||||||
|
s = pad;
|
||||||
|
for (i=0; i<wantlen-len; i++) {
|
||||||
|
*d++ = *s++;
|
||||||
|
if (!*s) s = pad;
|
||||||
|
}
|
||||||
|
s = src;
|
||||||
|
while (*s) {
|
||||||
|
*d++ = *s++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
s = src;
|
||||||
|
while (*s) {
|
||||||
|
*d++ = *s++;
|
||||||
|
}
|
||||||
|
s = pad;
|
||||||
|
for (i=0; i<wantlen-len; i++) {
|
||||||
|
*d++ = *s++;
|
||||||
|
if (!*s) s = pad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
len = wcstombs(NULL, dest, 0);
|
||||||
|
result = calloc(len+1, 1);
|
||||||
|
if (!result) {
|
||||||
|
free(src);
|
||||||
|
free(pad);
|
||||||
|
free(dest);
|
||||||
|
return E_NO_MEM;
|
||||||
|
}
|
||||||
|
(void) wcstombs(result, dest, len+1);
|
||||||
|
|
||||||
|
r = RetStrVal(result, info);
|
||||||
|
free(result);
|
||||||
|
free(src);
|
||||||
|
free(pad);
|
||||||
|
free(dest);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
@@ -2564,7 +2673,6 @@ static int FSubstr(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FMbsubstr(func_info *info)
|
static int FMbsubstr(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
wchar_t *str;
|
wchar_t *str;
|
||||||
wchar_t *s;
|
wchar_t *s;
|
||||||
wchar_t const *t;
|
wchar_t const *t;
|
||||||
@@ -2619,9 +2727,6 @@ static int FMbsubstr(func_info *info)
|
|||||||
RetVal.v.str = converted;
|
RetVal.v.str = converted;
|
||||||
free( (void *) str);
|
free( (void *) str);
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_NO_MB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -2671,7 +2776,6 @@ static int FIndex(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FMbindex(func_info *info)
|
static int FMbindex(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
wchar_t *haystack;
|
wchar_t *haystack;
|
||||||
wchar_t *needle;
|
wchar_t *needle;
|
||||||
wchar_t const *s;
|
wchar_t const *s;
|
||||||
@@ -2724,9 +2828,6 @@ static int FMbindex(func_info *info)
|
|||||||
free( (void *) haystack);
|
free( (void *) haystack);
|
||||||
free( (void *) needle);
|
free( (void *) needle);
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_NO_MB;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -3082,6 +3183,26 @@ static int FHebmon(func_info *info)
|
|||||||
return RetStrVal(HebMonthName(m, y), info);
|
return RetStrVal(HebMonthName(m, y), info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int FIvritmon(func_info *info)
|
||||||
|
{
|
||||||
|
int y, m, d, v;
|
||||||
|
|
||||||
|
if (!HASDATE(ARG(0))) return E_BAD_TYPE;
|
||||||
|
v = DATEPART(ARG(0));
|
||||||
|
|
||||||
|
if (v == CacheHebDse) {
|
||||||
|
m = CacheHebMon;
|
||||||
|
y = CacheHebYear;
|
||||||
|
} else {
|
||||||
|
DSEToHeb(v, &y, &m, &d);
|
||||||
|
CacheHebDse = v;
|
||||||
|
CacheHebYear = y;
|
||||||
|
CacheHebMon = m;
|
||||||
|
CacheHebDay = d;
|
||||||
|
}
|
||||||
|
return RetStrVal(IvritMonthName(m, y), info);
|
||||||
|
}
|
||||||
|
|
||||||
static int FHebyear(func_info *info)
|
static int FHebyear(func_info *info)
|
||||||
{
|
{
|
||||||
int y, m, d, v;
|
int y, m, d, v;
|
||||||
@@ -3537,7 +3658,7 @@ static int UTCToLocalHelper(int datetime, int *ret)
|
|||||||
|
|
||||||
old_tz = getenv("TZ");
|
old_tz = getenv("TZ");
|
||||||
if (old_tz) {
|
if (old_tz) {
|
||||||
old_tz = StrDup(old_tz);
|
old_tz = strdup(old_tz);
|
||||||
if (!old_tz) return E_NO_MEM;
|
if (!old_tz) return E_NO_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4281,7 +4402,7 @@ int tz_convert(int year, int month, int day,
|
|||||||
/* backup old TZ env var */
|
/* backup old TZ env var */
|
||||||
old_tz = getenv("TZ");
|
old_tz = getenv("TZ");
|
||||||
if (old_tz) {
|
if (old_tz) {
|
||||||
old_tz = StrDup(old_tz);
|
old_tz = strdup(old_tz);
|
||||||
if (!old_tz) return E_NO_MEM;
|
if (!old_tz) return E_NO_MEM;
|
||||||
}
|
}
|
||||||
if (tgt_tz == NULL || !*tgt_tz) {
|
if (tgt_tz == NULL || !*tgt_tz) {
|
||||||
@@ -4768,10 +4889,13 @@ rows_or_cols(func_info *info, int want_rows)
|
|||||||
{
|
{
|
||||||
struct winsize w;
|
struct winsize w;
|
||||||
int fd = STDOUT_FILENO;
|
int fd = STDOUT_FILENO;
|
||||||
|
|
||||||
int opened = 0;
|
int opened = 0;
|
||||||
|
|
||||||
RetVal.type = INT_TYPE;
|
RetVal.type = INT_TYPE;
|
||||||
|
if (!isatty(fd)) {
|
||||||
|
/* Try STDERR fd if STDOUT fd is not a tty */
|
||||||
|
fd = STDERR_FILENO;
|
||||||
|
}
|
||||||
if (!isatty(fd)) {
|
if (!isatty(fd)) {
|
||||||
fd = open("/dev/tty", O_RDONLY);
|
fd = open("/dev/tty", O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
@@ -4798,16 +4922,14 @@ static int FRows(func_info *info)
|
|||||||
}
|
}
|
||||||
static int FColumns(func_info *info)
|
static int FColumns(func_info *info)
|
||||||
{
|
{
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
size_t len;
|
size_t len;
|
||||||
wchar_t *buf, *s;
|
wchar_t *buf, *s;
|
||||||
int width;
|
int width;
|
||||||
#endif
|
|
||||||
if (Nargs == 0) {
|
if (Nargs == 0) {
|
||||||
return rows_or_cols(info, 0);
|
return rows_or_cols(info, 0);
|
||||||
}
|
}
|
||||||
ASSERT_TYPE(0, STR_TYPE);
|
ASSERT_TYPE(0, STR_TYPE);
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
len = mbstowcs(NULL, ARGSTR(0), 0);
|
len = mbstowcs(NULL, ARGSTR(0), 0);
|
||||||
if (len == (size_t) -1) return E_NO_MEM;
|
if (len == (size_t) -1) return E_NO_MEM;
|
||||||
buf = calloc(len+1, sizeof(wchar_t));
|
buf = calloc(len+1, sizeof(wchar_t));
|
||||||
@@ -4835,9 +4957,6 @@ static int FColumns(func_info *info)
|
|||||||
RetVal.type = INT_TYPE;
|
RetVal.type = INT_TYPE;
|
||||||
RETVAL = width;
|
RETVAL = width;
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
|
||||||
return E_BAD_TYPE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The following sets of functions are for computing solstices and equinoxes.
|
/* The following sets of functions are for computing solstices and equinoxes.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
/* globals.h and err.h */
|
/* globals.h and err.h */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
/* MK_GLOBALS. Also contains useful macro definitions. */
|
/* MK_GLOBALS. Also contains useful macro definitions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -106,7 +106,6 @@ EXTERN INIT( int DefaultPrio, NO_PRIORITY);
|
|||||||
EXTERN INIT( int SysTime, -1);
|
EXTERN INIT( int SysTime, -1);
|
||||||
EXTERN INIT( int LocalSysTime, -1);
|
EXTERN INIT( int LocalSysTime, -1);
|
||||||
EXTERN INIT( int ParseUntriggered, 0);
|
EXTERN INIT( int ParseUntriggered, 0);
|
||||||
EXTERN INIT( int LinksInTerminal, 0);
|
|
||||||
|
|
||||||
EXTERN char const *InitialFile;
|
EXTERN char const *InitialFile;
|
||||||
EXTERN char const *LocalTimeZone;
|
EXTERN char const *LocalTimeZone;
|
||||||
@@ -147,6 +146,7 @@ EXTERN int ArgC;
|
|||||||
EXTERN char const **ArgV;
|
EXTERN char const **ArgV;
|
||||||
EXTERN INIT( int CalLines, CAL_LINES);
|
EXTERN INIT( int CalLines, CAL_LINES);
|
||||||
EXTERN INIT( int CalPad, 1);
|
EXTERN INIT( int CalPad, 1);
|
||||||
|
EXTERN INIT( int CalSepLine, 1);
|
||||||
EXTERN INIT( int UseVTChars, 0);
|
EXTERN INIT( int UseVTChars, 0);
|
||||||
EXTERN INIT( int UseBGVTColors, 0);
|
EXTERN INIT( int UseBGVTColors, 0);
|
||||||
EXTERN INIT( int UseUTF8Chars, 0);
|
EXTERN INIT( int UseUTF8Chars, 0);
|
||||||
@@ -171,6 +171,10 @@ EXTERN INIT( double Latitude, DEFAULT_LATITUDE);
|
|||||||
|
|
||||||
EXTERN INIT( char *Location, LOCATION);
|
EXTERN INIT( char *Location, LOCATION);
|
||||||
|
|
||||||
|
/* Support hyperlinks in terminal emulators?
|
||||||
|
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
||||||
|
*/
|
||||||
|
EXTERN INIT( int TerminalHyperlinks, 0);
|
||||||
/* UTC calculation stuff */
|
/* UTC calculation stuff */
|
||||||
EXTERN INIT( int MinsFromUTC, 0);
|
EXTERN INIT( int MinsFromUTC, 0);
|
||||||
EXTERN INIT( int CalculateUTC, 1);
|
EXTERN INIT( int CalculateUTC, 1);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Implementation of hash table. */
|
/* Implementation of hash table. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Header file for hash-table related functions. */
|
/* Header file for hash-table related functions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Utility function to print hash table stats. */
|
/* Utility function to print hash table stats. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
90
src/hbcal.c
90
src/hbcal.c
@@ -5,7 +5,7 @@
|
|||||||
/* Support for the Hebrew calendar */
|
/* Support for the Hebrew calendar */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/* Derived from code written by Amos Shapir in 1978; revised */
|
/* Derived from code written by Amos Shapir in 1978; revised */
|
||||||
@@ -61,10 +61,58 @@
|
|||||||
#define ADAR2ADARA 1
|
#define ADAR2ADARA 1
|
||||||
#define ADAR2BOTH 2
|
#define ADAR2BOTH 2
|
||||||
|
|
||||||
|
struct AltMonthName {
|
||||||
|
char const *name;
|
||||||
|
int mon;
|
||||||
|
};
|
||||||
|
|
||||||
static char const *HebMonthNames[] = {
|
static char const *HebMonthNames[] = {
|
||||||
"Tishrey", "Heshvan", "Kislev", "Tevet", "Shvat", "Adar A", "Adar B",
|
"Tishrey", "Heshvan", "Kislev", "Tevet", "Shvat", "Adar A", "Adar B",
|
||||||
"Nisan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Adar"};
|
"Nisan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Adar"};
|
||||||
|
|
||||||
|
static char const *IvritMonthNames[] = {
|
||||||
|
"תשרי",
|
||||||
|
"חשוון",
|
||||||
|
"כסלו",
|
||||||
|
"טבת",
|
||||||
|
"שבט",
|
||||||
|
"אדר א'",
|
||||||
|
"אדר ב'",
|
||||||
|
"ניסן",
|
||||||
|
"אייר",
|
||||||
|
"סיון",
|
||||||
|
"תמוז",
|
||||||
|
"אב",
|
||||||
|
"אלול",
|
||||||
|
"אדר" };
|
||||||
|
|
||||||
|
/* Alternate spellings */
|
||||||
|
static struct AltMonthName AltMonthSpellings[] = {
|
||||||
|
{ "Tishri", TISHREY },
|
||||||
|
{ "Tishrei", TISHREY },
|
||||||
|
|
||||||
|
{ "Cheshvan", HESHVAN },
|
||||||
|
{ "Kheshvan", HESHVAN },
|
||||||
|
|
||||||
|
{ "Shevat", SHVAT },
|
||||||
|
|
||||||
|
{ "Tammuz", TAMUZ },
|
||||||
|
|
||||||
|
{ "Adar 1", ADARA },
|
||||||
|
{ "Adar I", ADARA },
|
||||||
|
{ "אדר א", ADARA },
|
||||||
|
{ "אדר 1", ADARA },
|
||||||
|
{ "אדר I", ADARA },
|
||||||
|
|
||||||
|
{ "Adar 2", ADARB },
|
||||||
|
{ "Adar II", ADARB },
|
||||||
|
{ "אדר ב", ADARB },
|
||||||
|
{ "אדר 2", ADARB },
|
||||||
|
{ "אדר II", ADARB },
|
||||||
|
|
||||||
|
{ "Iyyar", IYAR }
|
||||||
|
};
|
||||||
|
|
||||||
static char MaxMonLen[] = {
|
static char MaxMonLen[] = {
|
||||||
30, 30, 30, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29, 29};
|
30, 30, 30, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29, 29};
|
||||||
|
|
||||||
@@ -245,14 +293,32 @@ int HebNameToNum(char const *mname)
|
|||||||
int i;
|
int i;
|
||||||
int m=-1;
|
int m=-1;
|
||||||
|
|
||||||
for (i=0; i<14; i++)
|
for (i=0; i<14; i++) {
|
||||||
if (!StrCmpi(mname, HebMonthNames[i])) {
|
if (!strcasecmp(mname, HebMonthNames[i])) {
|
||||||
m = i;
|
m = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (m == -1) {
|
||||||
|
for (i=0; i<14; i++) {
|
||||||
|
if (!strcmp(mname, IvritMonthNames[i])) {
|
||||||
|
m = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Try the alternate spellings */
|
||||||
|
if (m == -1) {
|
||||||
|
for (i=0; i < (int) (sizeof(AltMonthSpellings) / sizeof(AltMonthSpellings[0])); i++) {
|
||||||
|
if (!strcasecmp(mname, AltMonthSpellings[i].name)) {
|
||||||
|
m = AltMonthSpellings[i].mon;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
@@ -270,6 +336,22 @@ char const *HebMonthName(int m, int y)
|
|||||||
else return HebMonthNames[m];
|
else return HebMonthNames[m];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
|
/* */
|
||||||
|
/* IvritMonthname */
|
||||||
|
/* */
|
||||||
|
/* Convert a Hebrew month's number to its name in Hebrew */
|
||||||
|
/* script, given the year. */
|
||||||
|
/* */
|
||||||
|
/***************************************************************/
|
||||||
|
char const *IvritMonthName(int m, int y)
|
||||||
|
{
|
||||||
|
if (m != ADARA && m != ADARB) return IvritMonthNames[m];
|
||||||
|
|
||||||
|
if (!HebIsLeap[(y-1)%19]) return IvritMonthNames[ADAR];
|
||||||
|
else return IvritMonthNames[m];
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* GetValidHebDate */
|
/* GetValidHebDate */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Logic for tracking the state of the IF... ELSE... ENDIF */
|
/* Logic for tracking the state of the IF... ELSE... ENDIF */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
27
src/init.c
27
src/init.c
@@ -7,7 +7,7 @@
|
|||||||
/* in normal mode. */
|
/* in normal mode. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -196,7 +196,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
/* Initialize local time zone */
|
/* Initialize local time zone */
|
||||||
LocalTimeZone = getenv("TZ");
|
LocalTimeZone = getenv("TZ");
|
||||||
if (LocalTimeZone) {
|
if (LocalTimeZone) {
|
||||||
LocalTimeZone = StrDup(LocalTimeZone);
|
LocalTimeZone = strdup(LocalTimeZone);
|
||||||
if (!LocalTimeZone) {
|
if (!LocalTimeZone) {
|
||||||
fprintf(stderr, "Out of memory!\n");
|
fprintf(stderr, "Out of memory!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -514,13 +514,13 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
arg++;
|
arg++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (*arg == 'c' || *arg == 'C') {
|
if (*arg == 'z' || *arg == 'Z') {
|
||||||
UseVTColors = 1;
|
TerminalHyperlinks = 1;
|
||||||
arg++;
|
arg++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (*arg == 'z' || *arg == 'Z') {
|
if (*arg == 'c' || *arg == 'C') {
|
||||||
LinksInTerminal = 1;
|
UseVTColors = 1;
|
||||||
arg++;
|
arg++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -649,8 +649,17 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
}
|
}
|
||||||
if (*arg == ',') {
|
if (*arg == ',') {
|
||||||
arg++;
|
arg++;
|
||||||
PARSENUM(CalPad, arg);
|
if (*arg != ',') {
|
||||||
if (CalPad > 20) CalPad = 20;
|
PARSENUM(CalPad, arg);
|
||||||
|
if (CalPad > 20) CalPad = 20;
|
||||||
|
}
|
||||||
|
if (*arg == ',') {
|
||||||
|
arg++;
|
||||||
|
PARSENUM(CalSepLine, arg);
|
||||||
|
if (CalSepLine) {
|
||||||
|
CalSepLine = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -852,7 +861,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
#ifndef L_USAGE_OVERRIDE
|
#ifndef L_USAGE_OVERRIDE
|
||||||
void Usage(void)
|
void Usage(void)
|
||||||
{
|
{
|
||||||
fprintf(ErrFp, "\nREMIND %s Copyright (C) 1992-2025 Dianne Skoll\n", VERSION);
|
fprintf(ErrFp, "\nREMIND %s Copyright (C) 1992-2026 Dianne Skoll\n", VERSION);
|
||||||
#ifdef BETA
|
#ifdef BETA
|
||||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
39
src/main.c
39
src/main.c
@@ -6,7 +6,7 @@
|
|||||||
/* routines, etc. */
|
/* routines, etc. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -39,10 +39,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
@@ -64,12 +62,17 @@ exitfunc(void)
|
|||||||
/* Kill any execution-time-limiter process */
|
/* Kill any execution-time-limiter process */
|
||||||
unlimit_execution_time();
|
unlimit_execution_time();
|
||||||
|
|
||||||
|
size_t num_mallocs, bytes_malloced;
|
||||||
|
|
||||||
if (DebugFlag & DB_UNUSED_VARS) {
|
if (DebugFlag & DB_UNUSED_VARS) {
|
||||||
DumpUnusedVars();
|
DumpUnusedVars();
|
||||||
}
|
}
|
||||||
if (DebugFlag & DB_HASHSTATS) {
|
if (DebugFlag & DB_HASHSTATS) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(ErrFp);
|
fflush(ErrFp);
|
||||||
|
DBufGetMallocStats(&num_mallocs, &bytes_malloced);
|
||||||
|
fprintf(ErrFp, "DynBuf Mallocs: %lu mallocs; %lu bytes\n",
|
||||||
|
(unsigned long) num_mallocs, (unsigned long) bytes_malloced);
|
||||||
fprintf(ErrFp, "Variable hash table statistics:\n");
|
fprintf(ErrFp, "Variable hash table statistics:\n");
|
||||||
dump_var_hash_stats();
|
dump_var_hash_stats();
|
||||||
|
|
||||||
@@ -1518,11 +1521,11 @@ int DoRun(ParsePtr p)
|
|||||||
if ( (r=ParseToken(p, &buf)) ) return r;
|
if ( (r=ParseToken(p, &buf)) ) return r;
|
||||||
|
|
||||||
/* Only allow RUN ON in top-level script */
|
/* Only allow RUN ON in top-level script */
|
||||||
if (! StrCmpi(DBufValue(&buf), "ON")) {
|
if (! strcasecmp(DBufValue(&buf), "ON")) {
|
||||||
if (TopLevel()) RunDisabled &= ~RUN_SCRIPT;
|
if (TopLevel()) RunDisabled &= ~RUN_SCRIPT;
|
||||||
}
|
}
|
||||||
/* But allow RUN OFF anywhere */
|
/* But allow RUN OFF anywhere */
|
||||||
else if (! StrCmpi(DBufValue(&buf), "OFF"))
|
else if (! strcasecmp(DBufValue(&buf), "OFF"))
|
||||||
RunDisabled |= RUN_SCRIPT;
|
RunDisabled |= RUN_SCRIPT;
|
||||||
else {
|
else {
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
@@ -1550,11 +1553,11 @@ int DoExpr(ParsePtr p)
|
|||||||
if ( (r=ParseToken(p, &buf)) ) return r;
|
if ( (r=ParseToken(p, &buf)) ) return r;
|
||||||
|
|
||||||
/* Only allow EXPR ON in top-level script */
|
/* Only allow EXPR ON in top-level script */
|
||||||
if (! StrCmpi(DBufValue(&buf), "ON")) {
|
if (! strcasecmp(DBufValue(&buf), "ON")) {
|
||||||
if (TopLevel()) ExpressionEvaluationDisabled = 0;
|
if (TopLevel()) ExpressionEvaluationDisabled = 0;
|
||||||
}
|
}
|
||||||
/* But allow EXPR OFF anywhere */
|
/* But allow EXPR OFF anywhere */
|
||||||
else if (! StrCmpi(DBufValue(&buf), "OFF"))
|
else if (! strcasecmp(DBufValue(&buf), "OFF"))
|
||||||
ExpressionEvaluationDisabled = 1;
|
ExpressionEvaluationDisabled = 1;
|
||||||
else {
|
else {
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
@@ -1730,7 +1733,6 @@ static char const *OutputEscapeSequences(char const *s, int print, DynamicBuffer
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
#define ISWBLANK(c) (iswspace(c) && (c) != '\n')
|
#define ISWBLANK(c) (iswspace(c) && (c) != '\n')
|
||||||
static wchar_t const *OutputEscapeSequencesWS(wchar_t const *s, int print, DynamicBuffer *output)
|
static wchar_t const *OutputEscapeSequencesWS(wchar_t const *s, int print, DynamicBuffer *output)
|
||||||
{
|
{
|
||||||
@@ -1848,7 +1850,7 @@ FillParagraphWC(char const *s, DynamicBuffer *output)
|
|||||||
free(buf);
|
free(buf);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* FillParagraph */
|
/* FillParagraph */
|
||||||
@@ -1864,7 +1866,7 @@ FillParagraphWC(char const *s, DynamicBuffer *output)
|
|||||||
/* A macro safe ONLY if used with arg with no side effects! */
|
/* A macro safe ONLY if used with arg with no side effects! */
|
||||||
#define ISBLANK(c) (isspace(c) && (c) != '\n')
|
#define ISBLANK(c) (isspace(c) && (c) != '\n')
|
||||||
|
|
||||||
void FillParagraph(char const *s, DynamicBuffer *output)
|
void FillParagraph(char const *url, char const *s, DynamicBuffer *output)
|
||||||
{
|
{
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
@@ -1881,11 +1883,16 @@ void FillParagraph(char const *s, DynamicBuffer *output)
|
|||||||
while(ISBLANK(*s)) s++;
|
while(ISBLANK(*s)) s++;
|
||||||
if (!*s) return;
|
if (!*s) return;
|
||||||
|
|
||||||
#ifdef REM_USE_WCHAR
|
if (url) {
|
||||||
|
printf("\x1B]8;;%s\x1B\\", url);
|
||||||
|
}
|
||||||
|
|
||||||
if (FillParagraphWC(s, output) == OK) {
|
if (FillParagraphWC(s, output) == OK) {
|
||||||
|
if (url) {
|
||||||
|
printf("\x1B]8;;\x1B\\");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Start formatting */
|
/* Start formatting */
|
||||||
while(1) {
|
while(1) {
|
||||||
@@ -1899,6 +1906,9 @@ void FillParagraph(char const *s, DynamicBuffer *output)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!*s) {
|
if (!*s) {
|
||||||
|
if (url) {
|
||||||
|
printf("\x1B]8;;\x1B\\");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Over here, we're at the beginning of a line. Emit the correct
|
/* Over here, we're at the beginning of a line. Emit the correct
|
||||||
@@ -1933,6 +1943,9 @@ void FillParagraph(char const *s, DynamicBuffer *output)
|
|||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
if (s == t) {
|
if (s == t) {
|
||||||
|
if (url) {
|
||||||
|
printf("\x1B]8;;\x1B\\");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!pendspace || len+pendspace <= roomleft) {
|
if (!pendspace || len+pendspace <= roomleft) {
|
||||||
@@ -2122,7 +2135,7 @@ SaveLastTrigger(Trigger const *t)
|
|||||||
DBufInit(&(LastTrigger.tags));
|
DBufInit(&(LastTrigger.tags));
|
||||||
|
|
||||||
if (LastTrigger.tz) {
|
if (LastTrigger.tz) {
|
||||||
LastTrigger.tz = StrDup(LastTrigger.tz);
|
LastTrigger.tz = strdup(LastTrigger.tz);
|
||||||
}
|
}
|
||||||
DBufPuts(&(LastTrigger.tags), DBufValue(&(t->tags)));
|
DBufPuts(&(LastTrigger.tags), DBufValue(&(t->tags)));
|
||||||
TrigInfo *cur = t->infos;
|
TrigInfo *cur = t->infos;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Calculations for figuring out moon phases. */
|
/* Calculations for figuring out moon phases. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* the data structures for OMITted dates. */
|
/* the data structures for OMITted dates. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -501,6 +501,9 @@ int DoOmit(ParsePtr p)
|
|||||||
int
|
int
|
||||||
AddGlobalOmit(int dse)
|
AddGlobalOmit(int dse)
|
||||||
{
|
{
|
||||||
|
if (dse < 0) {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
if (NumFullOmits == MAX_FULL_OMITS) return E_2MANY_FULL;
|
if (NumFullOmits == MAX_FULL_OMITS) return E_2MANY_FULL;
|
||||||
if (!BexistsIntArray(FullOmitArray, NumFullOmits, dse)) {
|
if (!BexistsIntArray(FullOmitArray, NumFullOmits, dse)) {
|
||||||
InsertIntoSortedArray(FullOmitArray, NumFullOmits, dse);
|
InsertIntoSortedArray(FullOmitArray, NumFullOmits, dse);
|
||||||
|
|||||||
35
src/protos.h
35
src/protos.h
@@ -5,7 +5,7 @@
|
|||||||
/* Function Prototypes. */
|
/* Function Prototypes. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -13,20 +13,8 @@
|
|||||||
/* Suppress unused variable warnings */
|
/* Suppress unused variable warnings */
|
||||||
#define UNUSED(x) (void) x
|
#define UNUSED(x) (void) x
|
||||||
|
|
||||||
#ifdef HAVE_STRDUP
|
|
||||||
#define StrDup strdup
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STRNCASECMP
|
|
||||||
#define StrinCmp strncasecmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STRCASECMP
|
|
||||||
#define StrCmpi strcasecmp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define a string assignment macro - be careful!!! */
|
/* Define a string assignment macro - be careful!!! */
|
||||||
#define STRSET(x, str) { if (x) free(x); (x) = StrDup(str); }
|
#define STRSET(x, str) { if (x) free(x); (x) = strdup(str); }
|
||||||
|
|
||||||
/* Define a general malloc routine for creating pointers to objects */
|
/* Define a general malloc routine for creating pointers to objects */
|
||||||
#define NEW(type) (malloc(sizeof(type)))
|
#define NEW(type) (malloc(sizeof(type)))
|
||||||
@@ -131,18 +119,6 @@ int ComputeTriggerNoAdjustDuration (int today, Trigger *trig, TimeTrig const *ti
|
|||||||
int AdjustTriggerForDuration(int today, int r, Trigger *trig, TimeTrig *tim, int save_in_globals);
|
int AdjustTriggerForDuration(int today, int r, Trigger *trig, TimeTrig *tim, int save_in_globals);
|
||||||
char *StrnCpy (char *dest, char const *source, int n);
|
char *StrnCpy (char *dest, char const *source, int n);
|
||||||
|
|
||||||
#ifndef HAVE_STRNCASECMP
|
|
||||||
int StrinCmp (char const *s1, char const *s2, int n);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_STRDUP
|
|
||||||
char *StrDup (char const *s);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
|
||||||
int StrCmpi (char const *s1, char const *s2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void strtolower(char *s);
|
void strtolower(char *s);
|
||||||
|
|
||||||
Var *FindVar (char const *str, int create);
|
Var *FindVar (char const *str, int create);
|
||||||
@@ -168,13 +144,14 @@ int ParseNonSpaceChar (ParsePtr p, int *err, int peek);
|
|||||||
unsigned int HashVal_preservecase(char const *str);
|
unsigned int HashVal_preservecase(char const *str);
|
||||||
int DateOK (int y, int m, int d);
|
int DateOK (int y, int m, int d);
|
||||||
BuiltinFunc *FindBuiltinFunc (char const *name);
|
BuiltinFunc *FindBuiltinFunc (char const *name);
|
||||||
int InsertIntoSortBuffer (int dse, int tim, char const *body, int typ, int prio);
|
int InsertIntoSortBuffer (int dse, int tim, char const *url, char const *body, int typ, int prio);
|
||||||
void IssueSortedReminders (void);
|
void IssueSortedReminders (void);
|
||||||
UserFunc *FindUserFunc(char const *name);
|
UserFunc *FindUserFunc(char const *name);
|
||||||
int UserFuncExists (char const *fn);
|
int UserFuncExists (char const *fn);
|
||||||
void DSEToHeb (int dse, int *hy, int *hm, int *hd);
|
void DSEToHeb (int dse, int *hy, int *hm, int *hd);
|
||||||
int HebNameToNum (char const *mname);
|
int HebNameToNum (char const *mname);
|
||||||
char const *HebMonthName (int m, int y);
|
char const *HebMonthName (int m, int y);
|
||||||
|
char const *IvritMonthName (int m, int y);
|
||||||
int HebToDSE (int hy, int hm, int hd);
|
int HebToDSE (int hy, int hm, int hd);
|
||||||
int GetValidHebDate (int yin, int min, int din, int adarbehave, int *mout, int *dout, int yahr);
|
int GetValidHebDate (int yin, int min, int din, int adarbehave, int *mout, int *dout, int yahr);
|
||||||
int GetNextHebrewDate (int dsestart, int hm, int hd, int yahr, int adarbehave, int *ans);
|
int GetNextHebrewDate (int dsestart, int hm, int hd, int yahr, int adarbehave, int *ans);
|
||||||
@@ -183,7 +160,7 @@ int GetSysVar (char const *name, Value *val);
|
|||||||
int SetSysVar (char const *name, Value *val);
|
int SetSysVar (char const *name, Value *val);
|
||||||
void DumpSysVarByName (char const *name);
|
void DumpSysVarByName (char const *name);
|
||||||
int CalcMinsFromUTC (int dse, int tim, int *mins, int *isdst);
|
int CalcMinsFromUTC (int dse, int tim, int *mins, int *isdst);
|
||||||
void FillParagraph (char const *s, DynamicBuffer *output);
|
void FillParagraph (char const *url, char const *s, DynamicBuffer *output);
|
||||||
void LocalToUTC (int locdate, int loctime, int *utcdate, int *utctime);
|
void LocalToUTC (int locdate, int loctime, int *utcdate, int *utctime);
|
||||||
void UTCToLocal (int utcdate, int utctime, int *locdate, int *loctime);
|
void UTCToLocal (int utcdate, int utctime, int *locdate, int *loctime);
|
||||||
int MoonPhase (int date, int time);
|
int MoonPhase (int date, int time);
|
||||||
@@ -224,12 +201,10 @@ void FixSpecialType(Trigger *trig);
|
|||||||
void WriteJSONTrigger(Trigger const *t, int include_tags);
|
void WriteJSONTrigger(Trigger const *t, int include_tags);
|
||||||
void WriteJSONTimeTrigger(TimeTrig const *tt);
|
void WriteJSONTimeTrigger(TimeTrig const *tt);
|
||||||
int GetOnceDate(void);
|
int GetOnceDate(void);
|
||||||
#ifdef REM_USE_WCHAR
|
|
||||||
#define _XOPEN_SOURCE 600
|
#define _XOPEN_SOURCE 600
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
void PutWideChar(wchar_t const wc, DynamicBuffer *output);
|
void PutWideChar(wchar_t const wc, DynamicBuffer *output);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* These functions are in utils.c and are used to detect overflow
|
/* These functions are in utils.c and are used to detect overflow
|
||||||
in various arithmetic operators. They have to be in separate
|
in various arithmetic operators. They have to be in separate
|
||||||
|
|||||||
15
src/queue.c
15
src/queue.c
@@ -5,7 +5,7 @@
|
|||||||
/* Queue up reminders for subsequent execution. */
|
/* Queue up reminders for subsequent execution. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -140,7 +140,7 @@ int QueueReminder(ParsePtr p, Trigger *trig,
|
|||||||
TimeTrig const *tim, char const *sched)
|
TimeTrig const *tim, char const *sched)
|
||||||
{
|
{
|
||||||
QueuedRem *qelem;
|
QueuedRem *qelem;
|
||||||
|
TrigInfo *ti;
|
||||||
if (DontQueue ||
|
if (DontQueue ||
|
||||||
trig->noqueue ||
|
trig->noqueue ||
|
||||||
tim->ttime == NO_TIME ||
|
tim->ttime == NO_TIME ||
|
||||||
@@ -155,7 +155,7 @@ int QueueReminder(ParsePtr p, Trigger *trig,
|
|||||||
qelem->red = DefaultColorR;
|
qelem->red = DefaultColorR;
|
||||||
qelem->green = DefaultColorG;
|
qelem->green = DefaultColorG;
|
||||||
qelem->blue = DefaultColorB;
|
qelem->blue = DefaultColorB;
|
||||||
qelem->text = StrDup(p->pos); /* Guaranteed that parser is not nested. */
|
qelem->text = strdup(p->pos); /* Guaranteed that parser is not nested. */
|
||||||
if (!qelem->text) {
|
if (!qelem->text) {
|
||||||
free(qelem);
|
free(qelem);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
@@ -169,8 +169,13 @@ int QueueReminder(ParsePtr p, Trigger *trig,
|
|||||||
qelem->tt = *tim;
|
qelem->tt = *tim;
|
||||||
qelem->t = *trig;
|
qelem->t = *trig;
|
||||||
|
|
||||||
/* Take over infos */
|
/* Copy infos */
|
||||||
trig->infos = NULL;
|
qelem->t.infos = NULL;
|
||||||
|
ti = trig->infos;
|
||||||
|
while(ti) {
|
||||||
|
(void) AppendTrigInfo(&qelem->t, ti->info);
|
||||||
|
ti = ti->next;
|
||||||
|
}
|
||||||
|
|
||||||
DBufInit(&(qelem->t.tags));
|
DBufInit(&(qelem->t.tags));
|
||||||
DBufPuts(&(qelem->t.tags), DBufValue(&(trig->tags)));
|
DBufPuts(&(qelem->t.tags), DBufValue(&(trig->tags)));
|
||||||
|
|||||||
52
src/rem2ps.c
52
src/rem2ps.c
@@ -5,7 +5,7 @@
|
|||||||
/* Print a PostScript calendar. */
|
/* Print a PostScript calendar. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -154,24 +154,6 @@ put_escaped_string(char const *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* StrCmpi */
|
|
||||||
/* */
|
|
||||||
/* Compare strings, case insensitive. */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
static int StrCmpi(char const *s1, char const *s2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
while (*s1 && *s2) {
|
|
||||||
r = toupper(*s1) - toupper(*s2);
|
|
||||||
if (r) return r;
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
return toupper(*s1) - toupper(*s2);
|
|
||||||
}
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* Parse the new-style JSON intermediate format */
|
/* Parse the new-style JSON intermediate format */
|
||||||
@@ -229,18 +211,18 @@ JSONToCalEntry(DynamicBuffer const *buf)
|
|||||||
} else if (!strcmp(nm, "passthru")) {
|
} else if (!strcmp(nm, "passthru")) {
|
||||||
if (v->type == json_string) {
|
if (v->type == json_string) {
|
||||||
s = v->u.string.ptr;
|
s = v->u.string.ptr;
|
||||||
if (!StrCmpi(s, "PostScript")) {
|
if (!strcasecmp(s, "PostScript")) {
|
||||||
c->special = SPECIAL_POSTSCRIPT;
|
c->special = SPECIAL_POSTSCRIPT;
|
||||||
} else if (!StrCmpi(s, "SHADE")) {
|
} else if (!strcasecmp(s, "SHADE")) {
|
||||||
c->special = SPECIAL_SHADE;
|
c->special = SPECIAL_SHADE;
|
||||||
} else if (!StrCmpi(s, "MOON")) {
|
} else if (!strcasecmp(s, "MOON")) {
|
||||||
c->special = SPECIAL_MOON;
|
c->special = SPECIAL_MOON;
|
||||||
} else if (!StrCmpi(s, "WEEK")) {
|
} else if (!strcasecmp(s, "WEEK")) {
|
||||||
c->special = SPECIAL_WEEK;
|
c->special = SPECIAL_WEEK;
|
||||||
} else if (!StrCmpi(s, "PSFile")) {
|
} else if (!strcasecmp(s, "PSFile")) {
|
||||||
c->special = SPECIAL_PSFILE;
|
c->special = SPECIAL_PSFILE;
|
||||||
} else if (!StrCmpi(s, "COLOUR") ||
|
} else if (!strcasecmp(s, "COLOUR") ||
|
||||||
!StrCmpi(s, "COLOR")) {
|
!strcasecmp(s, "COLOR")) {
|
||||||
c->special = SPECIAL_COLOR;
|
c->special = SPECIAL_COLOR;
|
||||||
} else {
|
} else {
|
||||||
c->special = SPECIAL_UNKNOWN;
|
c->special = SPECIAL_UNKNOWN;
|
||||||
@@ -301,20 +283,20 @@ TextToCalEntry(DynamicBuffer *buf)
|
|||||||
strcpy(c->entry, startOfBody);
|
strcpy(c->entry, startOfBody);
|
||||||
|
|
||||||
/* Save the type of SPECIAL */
|
/* Save the type of SPECIAL */
|
||||||
if (!StrCmpi(passthru, "PostScript")) {
|
if (!strcasecmp(passthru, "PostScript")) {
|
||||||
c->special = SPECIAL_POSTSCRIPT;
|
c->special = SPECIAL_POSTSCRIPT;
|
||||||
} else if (!StrCmpi(passthru, "SHADE")) {
|
} else if (!strcasecmp(passthru, "SHADE")) {
|
||||||
c->special = SPECIAL_SHADE;
|
c->special = SPECIAL_SHADE;
|
||||||
} else if (!StrCmpi(passthru, "MOON")) {
|
} else if (!strcasecmp(passthru, "MOON")) {
|
||||||
c->special = SPECIAL_MOON;
|
c->special = SPECIAL_MOON;
|
||||||
} else if (!StrCmpi(passthru, "WEEK")) {
|
} else if (!strcasecmp(passthru, "WEEK")) {
|
||||||
c->special = SPECIAL_WEEK;
|
c->special = SPECIAL_WEEK;
|
||||||
} else if (!StrCmpi(passthru, "PSFile")) {
|
} else if (!strcasecmp(passthru, "PSFile")) {
|
||||||
c->special = SPECIAL_PSFILE;
|
c->special = SPECIAL_PSFILE;
|
||||||
} else if (!StrCmpi(passthru, "COLOUR") ||
|
} else if (!strcasecmp(passthru, "COLOUR") ||
|
||||||
!StrCmpi(passthru, "COLOR")) {
|
!strcasecmp(passthru, "COLOR")) {
|
||||||
c->special = SPECIAL_COLOR;
|
c->special = SPECIAL_COLOR;
|
||||||
} else if (StrCmpi(passthru, "*")) {
|
} else if (strcasecmp(passthru, "*")) {
|
||||||
c->special = SPECIAL_UNKNOWN;
|
c->special = SPECIAL_UNKNOWN;
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
@@ -350,7 +332,7 @@ int main(int argc, char const *argv[])
|
|||||||
!strcmp(DBufValue(&buf), PSBEGIN2)) {
|
!strcmp(DBufValue(&buf), PSBEGIN2)) {
|
||||||
if (!validfile) {
|
if (!validfile) {
|
||||||
if (Verbose) {
|
if (Verbose) {
|
||||||
fprintf(stderr, "Rem2PS: Version %s Copyright (C) 1992-2025 by Dianne Skoll\n\n", VERSION);
|
fprintf(stderr, "Rem2PS: Version %s Copyright (C) 1992-2026 by Dianne Skoll\n\n", VERSION);
|
||||||
fprintf(stderr, "Generating PostScript calendar\n");
|
fprintf(stderr, "Generating PostScript calendar\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Define the PostScript prologue */
|
/* Define the PostScript prologue */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -14,7 +14,7 @@ char *PSProlog1[] =
|
|||||||
{
|
{
|
||||||
"% This file was produced by Remind and Rem2PS, written by",
|
"% This file was produced by Remind and Rem2PS, written by",
|
||||||
"% Dianne Skoll.",
|
"% Dianne Skoll.",
|
||||||
"% Remind and Rem2PS are Copyright (C) 1992-2025 Dianne Skoll.",
|
"% Remind and Rem2PS are Copyright (C) 1992-2026 Dianne Skoll.",
|
||||||
"/ISOLatin1Encoding where { pop save true }{ false } ifelse",
|
"/ISOLatin1Encoding where { pop save true }{ false } ifelse",
|
||||||
" /ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus",
|
" /ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus",
|
||||||
" StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute",
|
" StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute",
|
||||||
|
|||||||
77
src/sort.c
77
src/sort.c
@@ -5,7 +5,7 @@
|
|||||||
/* Routines for sorting reminders by trigger date */
|
/* Routines for sorting reminders by trigger date */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
typedef struct sortrem {
|
typedef struct sortrem {
|
||||||
struct sortrem *next;
|
struct sortrem *next;
|
||||||
char const *text;
|
char const *text;
|
||||||
|
char const *url;
|
||||||
int trigdate;
|
int trigdate;
|
||||||
int trigtime;
|
int trigtime;
|
||||||
int typ;
|
int typ;
|
||||||
@@ -34,7 +35,7 @@ typedef struct sortrem {
|
|||||||
/* The sorted reminder queue */
|
/* The sorted reminder queue */
|
||||||
static Sortrem *SortedQueue = (Sortrem *) NULL;
|
static Sortrem *SortedQueue = (Sortrem *) NULL;
|
||||||
|
|
||||||
static Sortrem *MakeSortRem (int dse, int tim, char const *body, int typ, int prio);
|
static Sortrem *MakeSortRem (int dse, int tim, char const *url, char const *body, int typ, int prio);
|
||||||
static void IssueSortBanner (int dse);
|
static void IssueSortBanner (int dse);
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -44,23 +45,33 @@ static void IssueSortBanner (int dse);
|
|||||||
/* Create a new Sortrem entry - return NULL on failure. */
|
/* Create a new Sortrem entry - return NULL on failure. */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static Sortrem *MakeSortRem(int dse, int tim, char const *body, int typ, int prio)
|
static Sortrem *MakeSortRem(int dse, int tim, char const *url, char const *body, int typ, int prio)
|
||||||
{
|
{
|
||||||
Sortrem *new = NEW(Sortrem);
|
Sortrem *srem = NEW(Sortrem);
|
||||||
if (!new) return NULL;
|
if (!srem) return NULL;
|
||||||
|
|
||||||
new->text = StrDup(body);
|
srem->text = strdup(body);
|
||||||
if (!new->text) {
|
if (!srem->text) {
|
||||||
free(new);
|
free(srem);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (url) {
|
||||||
new->trigdate = dse;
|
srem->url = strdup(url);
|
||||||
new->trigtime = tim;
|
if (!srem->url) {
|
||||||
new->typ = typ;
|
free((char *) srem->text);
|
||||||
new->priority = prio;
|
free(srem);
|
||||||
new->next = NULL;
|
return NULL;
|
||||||
return new;
|
}
|
||||||
|
} else {
|
||||||
|
srem->url = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
srem->trigdate = dse;
|
||||||
|
srem->trigtime = tim;
|
||||||
|
srem->typ = typ;
|
||||||
|
srem->priority = prio;
|
||||||
|
srem->next = NULL;
|
||||||
|
return srem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -70,13 +81,13 @@ static Sortrem *MakeSortRem(int dse, int tim, char const *body, int typ, int pri
|
|||||||
/* Insert a reminder into the sort buffer */
|
/* Insert a reminder into the sort buffer */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
int InsertIntoSortBuffer(int dse, int tim, char const *body, int typ, int prio)
|
int InsertIntoSortBuffer(int dse, int tim, char const *url, char const *body, int typ, int prio)
|
||||||
{
|
{
|
||||||
Sortrem *new = MakeSortRem(dse, tim, body, typ, prio);
|
Sortrem *srem = MakeSortRem(dse, tim, url, body, typ, prio);
|
||||||
Sortrem *cur = SortedQueue, *prev = NULL;
|
Sortrem *cur = SortedQueue, *prev = NULL;
|
||||||
int ShouldGoAfter;
|
int ShouldGoAfter;
|
||||||
|
|
||||||
if (!new) {
|
if (!srem) {
|
||||||
Eprint("%s", GetErr(E_NO_MEM));
|
Eprint("%s", GetErr(E_NO_MEM));
|
||||||
IssueSortedReminders();
|
IssueSortedReminders();
|
||||||
SortByDate = 0;
|
SortByDate = 0;
|
||||||
@@ -88,11 +99,11 @@ int InsertIntoSortBuffer(int dse, int tim, char const *body, int typ, int prio)
|
|||||||
|
|
||||||
/* Find the correct place in the sorted list */
|
/* Find the correct place in the sorted list */
|
||||||
if (!SortedQueue) {
|
if (!SortedQueue) {
|
||||||
SortedQueue = new;
|
SortedQueue = srem;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
while (cur) {
|
while (cur) {
|
||||||
ShouldGoAfter = CompareRems(new->trigdate, new->trigtime, new->priority,
|
ShouldGoAfter = CompareRems(srem->trigdate, srem->trigtime, srem->priority,
|
||||||
cur->trigdate, cur->trigtime, cur->priority,
|
cur->trigdate, cur->trigtime, cur->priority,
|
||||||
SortByDate, SortByTime, SortByPrio, UntimedBeforeTimed);
|
SortByDate, SortByTime, SortByPrio, UntimedBeforeTimed);
|
||||||
|
|
||||||
@@ -101,22 +112,21 @@ int InsertIntoSortBuffer(int dse, int tim, char const *body, int typ, int prio)
|
|||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
} else {
|
} else {
|
||||||
if (prev) {
|
if (prev) {
|
||||||
prev->next = new;
|
prev->next = srem;
|
||||||
new->next = cur;
|
srem->next = cur;
|
||||||
} else {
|
} else {
|
||||||
SortedQueue = new;
|
SortedQueue = srem;
|
||||||
new->next = cur;
|
srem->next = cur;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
prev->next = new;
|
prev->next = srem;
|
||||||
new->next = cur; /* For safety - actually redundant */
|
srem->next = cur; /* For safety - actually redundant */
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* IssueSortedReminders */
|
/* IssueSortedReminders */
|
||||||
@@ -141,7 +151,13 @@ void IssueSortedReminders(void)
|
|||||||
IssueSortBanner(cur->trigdate);
|
IssueSortBanner(cur->trigdate);
|
||||||
olddate = cur->trigdate;
|
olddate = cur->trigdate;
|
||||||
}
|
}
|
||||||
|
if (cur->url) {
|
||||||
|
printf("\x1B]8;;%s\x1B\\", cur->url);
|
||||||
|
}
|
||||||
printf("%s", cur->text);
|
printf("%s", cur->text);
|
||||||
|
if (cur->url) {
|
||||||
|
printf("\x1B]8;;\x1B\\");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -150,7 +166,7 @@ void IssueSortedReminders(void)
|
|||||||
IssueSortBanner(cur->trigdate);
|
IssueSortBanner(cur->trigdate);
|
||||||
olddate = cur->trigdate;
|
olddate = cur->trigdate;
|
||||||
}
|
}
|
||||||
FillParagraph(cur->text, NULL);
|
FillParagraph(cur->url, cur->text, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RUN_TYPE:
|
case RUN_TYPE:
|
||||||
@@ -159,6 +175,9 @@ void IssueSortedReminders(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free((char *) cur->text);
|
free((char *) cur->text);
|
||||||
|
if (cur->url) {
|
||||||
|
free((char *) cur->url);
|
||||||
|
}
|
||||||
free(cur);
|
free(cur);
|
||||||
cur = next;
|
cur = next;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* classifying the tokens parsed. */
|
/* classifying the tokens parsed. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -48,6 +48,7 @@ Token TokArray[] = {
|
|||||||
{ "cal", 3, T_RemType, CAL_TYPE },
|
{ "cal", 3, T_RemType, CAL_TYPE },
|
||||||
{ "clear-omit-context", 5, T_Clr, 0 },
|
{ "clear-omit-context", 5, T_Clr, 0 },
|
||||||
{ "complete-through", 16, T_CompleteThrough, 0 },
|
{ "complete-through", 16, T_CompleteThrough, 0 },
|
||||||
|
{ "completed-through", 17, T_CompleteThrough, 0 },
|
||||||
{ "debug", 5, T_Debug, 0 },
|
{ "debug", 5, T_Debug, 0 },
|
||||||
{ "december", 3, T_Month, 11 },
|
{ "december", 3, T_Month, 11 },
|
||||||
{ "do", 2, T_IncludeR, 0 },
|
{ "do", 2, T_IncludeR, 0 },
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* the TRANSLATE keyword. */
|
/* the TRANSLATE keyword. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -443,19 +443,19 @@ DoTranslate(ParsePtr p)
|
|||||||
r = ParseToken(p, &orig);
|
r = ParseToken(p, &orig);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
r = VerifyEoln(p);
|
r = VerifyEoln(p);
|
||||||
if (!StrCmpi(DBufValue(&orig), "dump")) {
|
if (!strcasecmp(DBufValue(&orig), "dump")) {
|
||||||
DBufFree(&orig);
|
DBufFree(&orig);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
DumpTranslationTable(stdout, 0);
|
DumpTranslationTable(stdout, 0);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!StrCmpi(DBufValue(&orig), "clear")) {
|
if (!strcasecmp(DBufValue(&orig), "clear")) {
|
||||||
DBufFree(&orig);
|
DBufFree(&orig);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
ClearTranslationTable();
|
ClearTranslationTable();
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!StrCmpi(DBufValue(&orig), "generate")) {
|
if (!strcasecmp(DBufValue(&orig), "generate")) {
|
||||||
DBufFree(&orig);
|
DBufFree(&orig);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
GenerateTranslationTemplate();
|
GenerateTranslationTemplate();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Routines for figuring out the trigger date of a reminder */
|
/* Routines for figuring out the trigger date of a reminder */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -738,7 +738,7 @@ NewTrigInfo(char const *i)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ti->next = NULL;
|
ti->next = NULL;
|
||||||
ti->info = StrDup(i);
|
ti->info = strdup(i);
|
||||||
if (!ti->info) {
|
if (!ti->info) {
|
||||||
free(ti);
|
free(ti);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/* Type definitions all dumped here. */
|
/* Type definitions all dumped here. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* functions. */
|
/* functions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -318,7 +318,7 @@ int DoFset(ParsePtr p)
|
|||||||
}
|
}
|
||||||
/* If we've already seen this local variable, error */
|
/* If we've already seen this local variable, error */
|
||||||
for (i=0; i<func->nargs; i++) {
|
for (i=0; i<func->nargs; i++) {
|
||||||
if (!StrinCmp(DBufValue(&buf), local_array[i].name, VAR_NAME_LEN)) {
|
if (!strncasecmp(DBufValue(&buf), local_array[i].name, VAR_NAME_LEN)) {
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
DestroyUserFunc(func);
|
DestroyUserFunc(func);
|
||||||
return E_REPEATED_ARG;
|
return E_REPEATED_ARG;
|
||||||
@@ -393,7 +393,7 @@ int DoFset(ParsePtr p)
|
|||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
for (i=0; i<func->nargs; i++) {
|
for (i=0; i<func->nargs; i++) {
|
||||||
func->args[i] = StrDup(local_array[i].name);
|
func->args[i] = strdup(local_array[i].name);
|
||||||
if (!func->args[i]) {
|
if (!func->args[i]) {
|
||||||
DestroyUserFunc(func);
|
DestroyUserFunc(func);
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
@@ -619,7 +619,7 @@ static UserFunc *clone_userfunc(char const *name, int *r)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
for (i=0; i<dest->nargs; i++) {
|
for (i=0; i<dest->nargs; i++) {
|
||||||
dest->args[i] = StrDup(src->args[i]);
|
dest->args[i] = strdup(src->args[i]);
|
||||||
if (!dest->args[i]) {
|
if (!dest->args[i]) {
|
||||||
DestroyUserFunc(dest);
|
DestroyUserFunc(dest);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
63
src/utils.c
63
src/utils.c
@@ -5,7 +5,7 @@
|
|||||||
/* Useful utility functions. */
|
/* Useful utility functions. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -140,67 +140,6 @@ char *StrnCpy(char *dest, char const *source, int n)
|
|||||||
return odest;
|
return odest;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_STRNCASECMP
|
|
||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* StrinCmp - compare strings, case-insensitive */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
int StrinCmp(char const *s1, char const *s2, int n)
|
|
||||||
{
|
|
||||||
register int r;
|
|
||||||
while (n && *s1 && *s2) {
|
|
||||||
n--;
|
|
||||||
r = toupper(*s1) - toupper(*s2);
|
|
||||||
if (r) return r;
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
if (n) return (toupper(*s1) - toupper(*s2)); else return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_STRDUP
|
|
||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* StrDup */
|
|
||||||
/* */
|
|
||||||
/* Like ANSI strdup */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
char *StrDup(char const *s)
|
|
||||||
{
|
|
||||||
char *ret = malloc(strlen(s)+1);
|
|
||||||
if (!ret) return NULL;
|
|
||||||
strcpy(ret, s);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
|
||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* StrCmpi */
|
|
||||||
/* */
|
|
||||||
/* Compare strings, case insensitive. */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
int StrCmpi(char const *s1, char const *s2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
while (*s1 && *s2) {
|
|
||||||
r = toupper(*s1) - toupper(*s2);
|
|
||||||
if (r) return r;
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
return toupper(*s1) - toupper(*s2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* DateOK */
|
/* DateOK */
|
||||||
|
|||||||
50
src/var.c
50
src/var.c
@@ -6,7 +6,7 @@
|
|||||||
/* user- and system-defined variables. */
|
/* user- and system-defined variables. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of REMIND. */
|
/* This file is part of REMIND. */
|
||||||
/* Copyright (C) 1992-2025 by Dianne Skoll */
|
/* Copyright (C) 1992-2026 by Dianne Skoll */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -52,7 +52,7 @@ static int VarCompareFunc(void const *a, void const *b)
|
|||||||
{
|
{
|
||||||
Var *x = (Var *) a;
|
Var *x = (Var *) a;
|
||||||
Var *y = (Var *) b;
|
Var *y = (Var *) b;
|
||||||
return StrCmpi(x->name, y->name);
|
return strcasecmp(x->name, y->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -220,15 +220,15 @@ static int warning_level_func(int do_set, Value *val)
|
|||||||
if (!strcmp(val->v.str, VERSION)) {
|
if (!strcmp(val->v.str, VERSION)) {
|
||||||
WarningLevel = NULL;
|
WarningLevel = NULL;
|
||||||
} else {
|
} else {
|
||||||
WarningLevel = StrDup(val->v.str);
|
WarningLevel = strdup(val->v.str);
|
||||||
if (!WarningLevel) return E_NO_MEM;
|
if (!WarningLevel) return E_NO_MEM;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!WarningLevel) {
|
if (!WarningLevel) {
|
||||||
val->v.str = StrDup(VERSION);
|
val->v.str = strdup(VERSION);
|
||||||
} else {
|
} else {
|
||||||
val->v.str = StrDup(WarningLevel);
|
val->v.str = strdup(WarningLevel);
|
||||||
}
|
}
|
||||||
if (!val->v.str) {
|
if (!val->v.str) {
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
@@ -257,14 +257,14 @@ static int oncefile_func(int do_set, Value *val)
|
|||||||
if (OnceFile) {
|
if (OnceFile) {
|
||||||
free( (void *) OnceFile);
|
free( (void *) OnceFile);
|
||||||
}
|
}
|
||||||
OnceFile = StrDup(val->v.str);
|
OnceFile = strdup(val->v.str);
|
||||||
if (!OnceFile) return E_NO_MEM;
|
if (!OnceFile) return E_NO_MEM;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!OnceFile) {
|
if (!OnceFile) {
|
||||||
val->v.str = StrDup("");
|
val->v.str = strdup("");
|
||||||
} else {
|
} else {
|
||||||
val->v.str = StrDup(OnceFile);
|
val->v.str = strdup(OnceFile);
|
||||||
}
|
}
|
||||||
if (!val->v.str) return E_NO_MEM;
|
if (!val->v.str) return E_NO_MEM;
|
||||||
val->type = STR_TYPE;
|
val->type = STR_TYPE;
|
||||||
@@ -403,6 +403,14 @@ static int trig_wday_func(int do_set, Value *val)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Cache $Ud, $Um and $Uy */
|
||||||
|
static int Ucached = -1;
|
||||||
|
static int Udcached = -1;
|
||||||
|
static int Umcached = -1;
|
||||||
|
static int Uycached = -1;
|
||||||
|
|
||||||
|
#define FILL_U_CACHE(x) do { if (Ucached != x) { FromDSE(x, &Uycached, &Umcached, &Udcached); Ucached = x; } } while(0)
|
||||||
|
|
||||||
static int today_date_func(int do_set, Value *val)
|
static int today_date_func(int do_set, Value *val)
|
||||||
{
|
{
|
||||||
UNUSED(do_set);
|
UNUSED(do_set);
|
||||||
@@ -412,31 +420,28 @@ static int today_date_func(int do_set, Value *val)
|
|||||||
}
|
}
|
||||||
static int today_day_func(int do_set, Value *val)
|
static int today_day_func(int do_set, Value *val)
|
||||||
{
|
{
|
||||||
int d;
|
|
||||||
UNUSED(do_set);
|
UNUSED(do_set);
|
||||||
val->type = INT_TYPE;
|
val->type = INT_TYPE;
|
||||||
FromDSE(DSEToday, NULL, NULL, &d);
|
FILL_U_CACHE(DSEToday);
|
||||||
val->v.val = d;
|
val->v.val = Udcached;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int today_mon_func(int do_set, Value *val)
|
static int today_mon_func(int do_set, Value *val)
|
||||||
{
|
{
|
||||||
int m;
|
|
||||||
UNUSED(do_set);
|
UNUSED(do_set);
|
||||||
val->type = INT_TYPE;
|
val->type = INT_TYPE;
|
||||||
FromDSE(DSEToday, NULL, &m, NULL);
|
FILL_U_CACHE(DSEToday);
|
||||||
val->v.val = m+1;
|
val->v.val = Umcached + 1;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int today_year_func(int do_set, Value *val)
|
static int today_year_func(int do_set, Value *val)
|
||||||
{
|
{
|
||||||
int y;
|
|
||||||
UNUSED(do_set);
|
UNUSED(do_set);
|
||||||
val->type = INT_TYPE;
|
val->type = INT_TYPE;
|
||||||
FromDSE(DSEToday, &y, NULL, NULL);
|
FILL_U_CACHE(DSEToday);
|
||||||
val->v.val = y;
|
val->v.val = Uycached;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1109,6 +1114,7 @@ static SysVar SysVarArr[] = {
|
|||||||
{"Tb", 0, SPECIAL_TYPE, trig_base_func, 0, 0 },
|
{"Tb", 0, SPECIAL_TYPE, trig_base_func, 0, 0 },
|
||||||
{"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0 },
|
{"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0 },
|
||||||
{"TerminalBackground", 0, SPECIAL_TYPE, terminal_bg_func, 0, 0 },
|
{"TerminalBackground", 0, SPECIAL_TYPE, terminal_bg_func, 0, 0 },
|
||||||
|
{"TerminalHyperlinks", 1, INT_TYPE, &TerminalHyperlinks, 0, 1 },
|
||||||
{"Thursday", 1, TRANS_TYPE, "Thursday", 0, 0 },
|
{"Thursday", 1, TRANS_TYPE, "Thursday", 0, 0 },
|
||||||
{"TimeSep", 1, SPECIAL_TYPE, time_sep_func, 0, 0 },
|
{"TimeSep", 1, SPECIAL_TYPE, time_sep_func, 0, 0 },
|
||||||
{"TimetIs64bit", 0, SPECIAL_TYPE, timet_is_64_func, 0, 0 },
|
{"TimetIs64bit", 0, SPECIAL_TYPE, timet_is_64_func, 0, 0 },
|
||||||
@@ -1397,9 +1403,9 @@ static int GetTranslatableVariable(SysVar const *v, Value *value)
|
|||||||
{
|
{
|
||||||
char const *translated = tr((char const *) v->value);
|
char const *translated = tr((char const *) v->value);
|
||||||
if (translated) {
|
if (translated) {
|
||||||
value->v.str = StrDup(translated);
|
value->v.str = strdup(translated);
|
||||||
} else {
|
} else {
|
||||||
value->v.str = StrDup("");
|
value->v.str = strdup("");
|
||||||
}
|
}
|
||||||
if (!value->v.str) return E_NO_MEM;
|
if (!value->v.str) return E_NO_MEM;
|
||||||
value->type = STR_TYPE;
|
value->type = STR_TYPE;
|
||||||
@@ -1491,9 +1497,9 @@ int GetSysVar(char const *name, Value *val)
|
|||||||
return f(0, val);
|
return f(0, val);
|
||||||
} else if (v->type == STR_TYPE) {
|
} else if (v->type == STR_TYPE) {
|
||||||
if (! * (char **) v->value) {
|
if (! * (char **) v->value) {
|
||||||
val->v.str = StrDup("");
|
val->v.str = strdup("");
|
||||||
} else {
|
} else {
|
||||||
val->v.str = StrDup(*((char **) v->value));
|
val->v.str = strdup(*((char **) v->value));
|
||||||
}
|
}
|
||||||
if (!val->v.str) return E_NO_MEM;
|
if (!val->v.str) return E_NO_MEM;
|
||||||
} else {
|
} else {
|
||||||
@@ -1524,7 +1530,7 @@ SysVar *FindSysVar(char const *name)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
while (top >= bottom) {
|
while (top >= bottom) {
|
||||||
r = StrCmpi(name, SysVarArr[mid].name);
|
r = strcasecmp(name, SysVarArr[mid].name);
|
||||||
if (!r) return &SysVarArr[mid];
|
if (!r) return &SysVarArr[mid];
|
||||||
else if (r>0) bottom = mid+1;
|
else if (r>0) bottom = mid+1;
|
||||||
else top = mid-1;
|
else top = mid-1;
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ CalMode
|
|||||||
CalType
|
CalType
|
||||||
CalcMinsFromUTC
|
CalcMinsFromUTC
|
||||||
CalcUTC
|
CalcUTC
|
||||||
|
Chanukah
|
||||||
Clément
|
Clément
|
||||||
Config
|
Config
|
||||||
Conover
|
Conover
|
||||||
@@ -211,6 +212,7 @@ Joop
|
|||||||
Kamens
|
Kamens
|
||||||
Kasdorp
|
Kasdorp
|
||||||
Katan
|
Katan
|
||||||
|
Kheshvan
|
||||||
Kiefte
|
Kiefte
|
||||||
Koningsdag
|
Koningsdag
|
||||||
Kristian
|
Kristian
|
||||||
@@ -244,6 +246,9 @@ MSC
|
|||||||
MSF
|
MSF
|
||||||
MSGPREFIX
|
MSGPREFIX
|
||||||
MSGSUFFIX
|
MSGSUFFIX
|
||||||
|
MUSL
|
||||||
|
MUSL
|
||||||
|
MUSL's
|
||||||
Madsen
|
Madsen
|
||||||
Makefile
|
Makefile
|
||||||
Makefiles
|
Makefiles
|
||||||
@@ -398,9 +403,11 @@ Tcl
|
|||||||
Td
|
Td
|
||||||
Terbeck
|
Terbeck
|
||||||
TerminalBackground
|
TerminalBackground
|
||||||
|
TerminalHyperlinks
|
||||||
Thronicke
|
Thronicke
|
||||||
TimeSep
|
TimeSep
|
||||||
TimetIs64bit
|
TimetIs64bit
|
||||||
|
Tishrei
|
||||||
Tishrey
|
Tishrey
|
||||||
TitleSize
|
TitleSize
|
||||||
Tk
|
Tk
|
||||||
@@ -592,6 +599,7 @@ gaa
|
|||||||
garbhol
|
garbhol
|
||||||
gcc
|
gcc
|
||||||
getenv
|
getenv
|
||||||
|
glibc's
|
||||||
grey
|
grey
|
||||||
greyed
|
greyed
|
||||||
gridline
|
gridline
|
||||||
@@ -636,6 +644,7 @@ itkpdf
|
|||||||
itkprint
|
itkprint
|
||||||
itkremind
|
itkremind
|
||||||
ivar
|
ivar
|
||||||
|
ivritmon
|
||||||
j2
|
j2
|
||||||
jahr
|
jahr
|
||||||
jahrzeit
|
jahrzeit
|
||||||
@@ -676,6 +685,8 @@ maxlen
|
|||||||
maybexs
|
maybexs
|
||||||
mbchar
|
mbchar
|
||||||
mbindex
|
mbindex
|
||||||
|
mbpad
|
||||||
|
mbstowcs
|
||||||
mbstrlen
|
mbstrlen
|
||||||
mbsubstr
|
mbsubstr
|
||||||
md
|
md
|
||||||
@@ -823,6 +834,7 @@ soleq
|
|||||||
somefile
|
somefile
|
||||||
sortbanner
|
sortbanner
|
||||||
spc
|
spc
|
||||||
|
spc2
|
||||||
spellintian
|
spellintian
|
||||||
src
|
src
|
||||||
srczone
|
srczone
|
||||||
@@ -943,6 +955,8 @@ varname
|
|||||||
ve
|
ve
|
||||||
w0
|
w0
|
||||||
wakeups
|
wakeups
|
||||||
|
wchar
|
||||||
|
wcstombs
|
||||||
weekno
|
weekno
|
||||||
wfun
|
wfun
|
||||||
whoami
|
whoami
|
||||||
@@ -977,3 +991,20 @@ ziens
|
|||||||
zj
|
zj
|
||||||
zn
|
zn
|
||||||
één
|
één
|
||||||
|
א
|
||||||
|
אב
|
||||||
|
אדר
|
||||||
|
אדר
|
||||||
|
אדר
|
||||||
|
אייר
|
||||||
|
אלול
|
||||||
|
ב
|
||||||
|
חשוון
|
||||||
|
טבת
|
||||||
|
כסלו
|
||||||
|
ניסן
|
||||||
|
ניסן
|
||||||
|
סיון
|
||||||
|
שבט
|
||||||
|
תמוז
|
||||||
|
תשרי
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# in the build directory.
|
# in the build directory.
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 Dianne Skoll
|
# Copyright (C) 1992-2026 Dianne Skoll
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -35,10 +35,13 @@ CMP="../tests/test.cmp"
|
|||||||
# Set a known timezone so moon phases show up in predictable places
|
# Set a known timezone so moon phases show up in predictable places
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
export TZ
|
export TZ
|
||||||
|
|
||||||
|
# No localization, but we want a UTF-8 locale.
|
||||||
LANG=C.UTF-8
|
LANG=C.UTF-8
|
||||||
export LANG
|
export LANG
|
||||||
LC_ALL=C.UTF-8
|
LC_ALL=C.UTF-8
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
unset LC_PAPER
|
unset LC_PAPER
|
||||||
|
|
||||||
# Check if "grep" accepts "-a" flag
|
# Check if "grep" accepts "-a" flag
|
||||||
@@ -69,25 +72,6 @@ else
|
|||||||
DELAY=1
|
DELAY=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we're already in a utf-8 locale, do
|
|
||||||
# nothing; otherwise, set LC_ALL
|
|
||||||
OK=0
|
|
||||||
if echo $LC_ALL | grep -i utf-8 > /dev/null 2>&1 ; then
|
|
||||||
OK=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$LC_ALL" ; then
|
|
||||||
if echo $LANG | grep -i utf-8 > /dev/null 2>&1 ; then
|
|
||||||
export LC_ALL="$LANG"
|
|
||||||
OK=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$OK" = 0 ; then
|
|
||||||
export LC_ALL=C.UTF-8
|
|
||||||
export LANG=C.UTF-8
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod 000 include_dir/04cantread.rem
|
chmod 000 include_dir/04cantread.rem
|
||||||
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
||||||
echo "Test 1" > $OUT
|
echo "Test 1" > $OUT
|
||||||
@@ -697,9 +681,18 @@ If hunspell is installed, its output (if any) follows...
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
HUNSPELL="hunspell -d en_US -l -p manpage-personal-dict"
|
HUNSPELL="hunspell -d en_US -l -p manpage-personal-dict"
|
||||||
|
GOT_HUNSPELL=0
|
||||||
$HUNSPELL /dev/null < /dev/null > /dev/null 2>&1
|
$HUNSPELL /dev/null < /dev/null > /dev/null 2>&1
|
||||||
if test $? = 0; then
|
|
||||||
|
# Hunspell runs. Do we have the en_US dictionary?
|
||||||
|
if test $? = 0 ; then
|
||||||
|
X=`(echo color; echo colour; echo returm) | hunspell -d en_US -l 2>/dev/null`
|
||||||
|
X=`echo $X | sed -e 's/\n/ /g'`
|
||||||
|
if test "$X" = "colour returm" ; then
|
||||||
|
GOT_HUNSPELL=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$GOT_HUNSPELL" = "1"; then
|
||||||
echo "Spell-checking man pages, WHATSNEW and README.md"
|
echo "Spell-checking man pages, WHATSNEW and README.md"
|
||||||
cat ../man/*.1 $PERLMANS | $HUNSPELL -n >> $OUT 2>&1
|
cat ../man/*.1 $PERLMANS | $HUNSPELL -n >> $OUT 2>&1
|
||||||
cat ../docs/WHATSNEW | $HUNSPELL >> $OUT 2>&1
|
cat ../docs/WHATSNEW | $HUNSPELL >> $OUT 2>&1
|
||||||
@@ -957,7 +950,42 @@ REM 2025 Oct [1] MSG Expr but not nonconst [today()]
|
|||||||
REM 2025-10-01 MSG No expr seen [1+2]
|
REM 2025-10-01 MSG No expr seen [1+2]
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Purge mode
|
# Early exit from calendar processing
|
||||||
|
$REMIND -p - 2026-01-01 <<'EOF' >> $OUT 2>&1
|
||||||
|
REM 1 Jan 1994 MSG 1/0 = [1/0]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# No early exit from calendar processing
|
||||||
|
$REMIND -p - 2026-01-01 <<'EOF' >> $OUT 2>&1
|
||||||
|
SET $ParseUntriggered 1
|
||||||
|
REM 1 Jan 1994 MSG 1/0 = [1/0]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Calendars with hyperlinks
|
||||||
|
$REMIND -w,0,0 -@2 -c - 1 Jan 2020 <<'EOF' >> $OUT 2>&1
|
||||||
|
SET $TerminalHyperlinks 1
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" MSG Hello, linky!
|
||||||
|
REM 16 INFO "Url: https://dianne.skoll.ca" MSF Hello, linky!
|
||||||
|
REM 17 INFO "Url: https://dianne.skoll.ca" CAL Hello, linky!
|
||||||
|
REM 18 INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky!
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Turn off spacing between reminders, and test the 'z' -c flag.
|
||||||
|
$REMIND -w,0,0,0 -@2 -cz - 1 Jan 2020 <<'EOF' >> $OUT 2>&1
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" MSG Hello, linky 1!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" MSF Hello, linky 2!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" CAL Hello, linky 3!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky 4!
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Turn on spacing between reminders..
|
||||||
|
$REMIND -w,0,0,1 -@2 -c - 1 Jan 2020 <<'EOF' >> $OUT 2>&1
|
||||||
|
SET $TerminalHyperlinks 1
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" MSG Hello, linky 1!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" MSF Hello, linky 2!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" CAL Hello, linky 3!
|
||||||
|
REM 15 INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky 4!
|
||||||
|
EOF
|
||||||
|
|
||||||
cmp -s $OUT $CMP
|
cmp -s $OUT $CMP
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
|
|||||||
296
tests/test.cmp
296
tests/test.cmp
@@ -1046,7 +1046,7 @@ set a057 value("a05"+"6")
|
|||||||
"a05" + "6" => "a056"
|
"a05" + "6" => "a056"
|
||||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||||
set a058 version()
|
set a058 version()
|
||||||
version() => "06.02.00"
|
version() => "06.02.02"
|
||||||
set a059 wkday(today())
|
set a059 wkday(today())
|
||||||
today() => 1991-02-16
|
today() => 1991-02-16
|
||||||
wkday(1991-02-16) => "Saturday"
|
wkday(1991-02-16) => "Saturday"
|
||||||
@@ -2609,7 +2609,7 @@ a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
|||||||
a007 "1991-02-16"
|
a007 "1991-02-16"
|
||||||
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||||
a008 "11:44"
|
a008 "11:44"
|
||||||
a058 "06.02.00"
|
a058 "06.02.02"
|
||||||
a059 "Saturday"
|
a059 "Saturday"
|
||||||
a010 12
|
a010 12
|
||||||
a060 6
|
a060 6
|
||||||
@@ -5563,8 +5563,8 @@ REM SATISFY ""
|
|||||||
REM SATISFY [version() > "01.00.00"]
|
REM SATISFY [version() > "01.00.00"]
|
||||||
../tests/test.rem(1074): SATISFY: expression has no reference to trigdate() or $T...
|
../tests/test.rem(1074): SATISFY: expression has no reference to trigdate() or $T...
|
||||||
../tests/test.rem(1074): Trig = Saturday, 16 February, 1991
|
../tests/test.rem(1074): Trig = Saturday, 16 February, 1991
|
||||||
version() => "06.02.00"
|
version() => "06.02.02"
|
||||||
"06.02.00" > "01.00.00" => 1
|
"06.02.02" > "01.00.00" => 1
|
||||||
../tests/test.rem(1074): Trig(satisfied) = Saturday, 16 February, 1991
|
../tests/test.rem(1074): Trig(satisfied) = Saturday, 16 February, 1991
|
||||||
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]
|
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...
|
../tests/test.rem(1075): SATISFY: expression has no reference to trigdate() or $T...
|
||||||
@@ -16657,6 +16657,112 @@ mbchar(0, 120) => Number too low
|
|||||||
../tests/test.rem(1767): mbchar(): Number too low
|
../tests/test.rem(1767): mbchar(): Number too low
|
||||||
mbchar(120, 0) => Number too low
|
mbchar(120, 0) => Number too low
|
||||||
../tests/test.rem(1768): mbchar(): Number too low
|
../tests/test.rem(1768): mbchar(): Number too low
|
||||||
|
hebdate(1, "Tishrey") => 1991-09-09
|
||||||
|
hebdate(1, "Tishri") => 1991-09-09
|
||||||
|
hebdate(1, "Tishrei") => 1991-09-09
|
||||||
|
hebdate(1, "תשרי") => 1991-09-09
|
||||||
|
hebdate(1, "Cheshvan") => 1991-10-09
|
||||||
|
hebdate(1, "Kheshvan") => 1991-10-09
|
||||||
|
hebdate(1, "Heshvan") => 1991-10-09
|
||||||
|
hebdate(1, "חשוון") => 1991-10-09
|
||||||
|
hebdate(1, "Kislev") => 1991-11-08
|
||||||
|
hebdate(1, "כסלו") => 1991-11-08
|
||||||
|
hebdate(1, "Tevet") => 1991-12-08
|
||||||
|
hebdate(1, "טבת") => 1991-12-08
|
||||||
|
hebdate(1, "Shvat") => 1992-01-06
|
||||||
|
hebdate(1, "Shevat") => 1992-01-06
|
||||||
|
hebdate(1, "שבט") => 1992-01-06
|
||||||
|
hebdate(1, "Adar A") => 1992-02-05
|
||||||
|
hebdate(1, "Adar 1") => 1992-02-05
|
||||||
|
hebdate(1, "Adar I") => 1992-02-05
|
||||||
|
hebdate(1, "×<>דר ×<>'") => 1992-02-05
|
||||||
|
hebdate(1, "×<>דר ×<>") => 1992-02-05
|
||||||
|
hebdate(1, "×<>דר 1") => 1992-02-05
|
||||||
|
hebdate(1, "×<>דר I") => 1992-02-05
|
||||||
|
hebdate(1, "Adar B") => 1992-03-06
|
||||||
|
hebdate(1, "Adar 2") => 1992-03-06
|
||||||
|
hebdate(1, "Adar II") => 1992-03-06
|
||||||
|
hebdate(1, "×<>דר ב'") => 1992-03-06
|
||||||
|
hebdate(1, "×<>דר ב") => 1992-03-06
|
||||||
|
hebdate(1, "×<>דר 2") => 1992-03-06
|
||||||
|
hebdate(1, "×<>דר II") => 1992-03-06
|
||||||
|
hebdate(1, "Nisan") => 1991-03-16
|
||||||
|
hebdate(1, "× ×™×¡×Ÿ") => 1991-03-16
|
||||||
|
hebdate(1, "Iyar") => 1991-04-15
|
||||||
|
hebdate(1, "Iyyar") => 1991-04-15
|
||||||
|
hebdate(1, "×<>ייר") => 1991-04-15
|
||||||
|
hebdate(1, "Sivan") => 1991-05-14
|
||||||
|
hebdate(1, "סיון") => 1991-05-14
|
||||||
|
hebdate(1, "Tamuz") => 1991-06-13
|
||||||
|
hebdate(1, "Tammuz") => 1991-06-13
|
||||||
|
hebdate(1, "תמוז") => 1991-06-13
|
||||||
|
hebdate(1, "Av") => 1991-07-12
|
||||||
|
hebdate(1, "×<>ב") => 1991-07-12
|
||||||
|
hebdate(1, "Elul") => 1991-08-11
|
||||||
|
hebdate(1, "×<>לול") => 1991-08-11
|
||||||
|
hebdate(1, "Adar") => 1992-03-06
|
||||||
|
hebdate(1, "×<>דר") => 1992-03-06
|
||||||
|
hebmon(1991-09-09) => "Tishrey"
|
||||||
|
ivritmon(1991-09-09) => "תשרי"
|
||||||
|
hebmon(1991-10-09) => "Heshvan"
|
||||||
|
ivritmon(1991-10-09) => "חשוון"
|
||||||
|
hebmon(1991-11-08) => "Kislev"
|
||||||
|
ivritmon(1991-11-08) => "כסלו"
|
||||||
|
hebmon(1991-12-08) => "Tevet"
|
||||||
|
ivritmon(1991-12-08) => "טבת"
|
||||||
|
hebmon(1992-01-06) => "Shvat"
|
||||||
|
ivritmon(1992-01-06) => "שבט"
|
||||||
|
hebmon(1992-02-05) => "Adar A"
|
||||||
|
ivritmon(1992-02-05) => "×<>דר ×<>'"
|
||||||
|
hebmon(1992-03-06) => "Adar B"
|
||||||
|
ivritmon(1992-03-06) => "×<>דר ב'"
|
||||||
|
hebmon(1991-03-16) => "Nisan"
|
||||||
|
ivritmon(1991-03-16) => "× ×™×¡×Ÿ"
|
||||||
|
hebmon(1991-04-15) => "Iyar"
|
||||||
|
ivritmon(1991-04-15) => "×<>ייר"
|
||||||
|
hebmon(1991-05-14) => "Sivan"
|
||||||
|
ivritmon(1991-05-14) => "סיון"
|
||||||
|
hebmon(1991-06-13) => "Tamuz"
|
||||||
|
ivritmon(1991-06-13) => "תמוז"
|
||||||
|
hebmon(1991-07-12) => "Av"
|
||||||
|
ivritmon(1991-07-12) => "×<>ב"
|
||||||
|
hebmon(1991-08-11) => "Elul"
|
||||||
|
ivritmon(1991-08-11) => "×<>לול"
|
||||||
|
mbpad("foo", "bar", 3) => "foo"
|
||||||
|
mbpad("foo", "bar", 3, 1) => "foo"
|
||||||
|
mbpad("foo", "bar", 8) => "barbafoo"
|
||||||
|
mbpad("foo", "bar", 8, 1) => "foobarba"
|
||||||
|
mbpad("foo", "🙂💩", 3) => "foo"
|
||||||
|
mbpad("foo", "🙂💩", 3, 1) => "foo"
|
||||||
|
mbpad("foo", "🙂💩", 8) => "🙂💩🙂💩🙂foo"
|
||||||
|
mbpad("foo", "🙂💩", 8, 1) => "foo🙂💩🙂💩🙂"
|
||||||
|
char(255) => "ÿ"
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("foo", "ÿ", 3) => "foo"
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("foo", "ÿ", 3, 1) => "foo"
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("foo", "ÿ", 8) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1886): mbpad(): Invalid multibyte sequence
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("foo", "ÿ", 8, 1) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1887): mbpad(): Invalid multibyte sequence
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("ÿ", "bar", 0) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1888): mbpad(): Invalid multibyte sequence
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("ÿ", "bar", 0, 1) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1889): mbpad(): Invalid multibyte sequence
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("ÿ", "bar", 8) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1890): mbpad(): Invalid multibyte sequence
|
||||||
|
bad => "ÿ"
|
||||||
|
mbpad("ÿ", "bar", 8, 1) => Invalid multibyte sequence
|
||||||
|
../tests/test.rem(1891): mbpad(): Invalid multibyte sequence
|
||||||
|
]8;;https://dianne.skoll.ca\Hello, linky!
|
||||||
|
]8;;\]8;;https://dianne.skoll.ca\Hello, linky!
|
||||||
|
]8;;\]8;;https://dianne.skoll.ca\Hello, linky!
|
||||||
|
]8;;\DynBuf Mallocs: 1120 mallocs; 31872640 bytes
|
||||||
Variable hash table statistics:
|
Variable hash table statistics:
|
||||||
Entries: 100146; Buckets: 87719; Non-empty Buckets: 66303
|
Entries: 100146; Buckets: 87719; Non-empty Buckets: 66303
|
||||||
Maxlen: 5; Minlen: 0; Avglen: 1.142; Stddev: 0.878; Avg nonempty len: 1.510
|
Maxlen: 5; Minlen: 0; Avglen: 1.142; Stddev: 0.878; Avg nonempty len: 1.510
|
||||||
@@ -16678,7 +16784,7 @@ Expression nodes high-water: 302076
|
|||||||
Expression nodes leaked: 0
|
Expression nodes leaked: 0
|
||||||
Parse level high-water: 34
|
Parse level high-water: 34
|
||||||
Max expr node evaluations per line: 2001
|
Max expr node evaluations per line: 2001
|
||||||
Total expression node evaluations: 106471
|
Total expression node evaluations: 106733
|
||||||
|
|
||||||
Test 2
|
Test 2
|
||||||
|
|
||||||
@@ -20657,7 +20763,7 @@ No reminders.
|
|||||||
<< /PageSize [612 792] >> setpagedevice
|
<< /PageSize [612 792] >> setpagedevice
|
||||||
% This file was produced by Remind and Rem2PS, written by
|
% This file was produced by Remind and Rem2PS, written by
|
||||||
% Dianne Skoll.
|
% Dianne Skoll.
|
||||||
% Remind and Rem2PS are Copyright (C) 1992-2025 Dianne Skoll.
|
% Remind and Rem2PS are Copyright (C) 1992-2026 Dianne Skoll.
|
||||||
/ISOLatin1Encoding where { pop save true }{ false } ifelse
|
/ISOLatin1Encoding where { pop save true }{ false } ifelse
|
||||||
/ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus
|
/ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus
|
||||||
StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute
|
StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute
|
||||||
@@ -21761,7 +21867,7 @@ showpage
|
|||||||
<< /PageSize [612 792] >> setpagedevice
|
<< /PageSize [612 792] >> setpagedevice
|
||||||
% This file was produced by Remind and Rem2PS, written by
|
% This file was produced by Remind and Rem2PS, written by
|
||||||
% Dianne Skoll.
|
% Dianne Skoll.
|
||||||
% Remind and Rem2PS are Copyright (C) 1992-2025 Dianne Skoll.
|
% Remind and Rem2PS are Copyright (C) 1992-2026 Dianne Skoll.
|
||||||
/ISOLatin1Encoding where { pop save true }{ false } ifelse
|
/ISOLatin1Encoding where { pop save true }{ false } ifelse
|
||||||
/ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus
|
/ISOLatin1Encoding [ StandardEncoding 0 45 getinterval aload pop /minus
|
||||||
StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute
|
StandardEncoding 46 98 getinterval aload pop /dotlessi /grave /acute
|
||||||
@@ -23716,7 +23822,7 @@ SECURITY: Won't read world-writable file or directory!
|
|||||||
Error reading include_dir/ww: Can't open file
|
Error reading include_dir/ww: Can't open file
|
||||||
SECURITY: Won't read world-writable file or directory!
|
SECURITY: Won't read world-writable file or directory!
|
||||||
Error reading include_dir/ww: No files matching *.rem
|
Error reading include_dir/ww: No files matching *.rem
|
||||||
06.02.00
|
06.02.02
|
||||||
Enabling test mode: This is meant for the acceptance test.
|
Enabling test mode: This is meant for the acceptance test.
|
||||||
Do not use --test in production.
|
Do not use --test in production.
|
||||||
In test mode, the system time is fixed at 2025-01-06@19:00
|
In test mode, the system time is fixed at 2025-01-06@19:00
|
||||||
@@ -24274,6 +24380,7 @@ Parsed expression: isany("foo", 1 + 1, 2:00 + 1, '2021-01-01' + 1, '2021-01-01@1
|
|||||||
"f" + "oo" => "foo"
|
"f" + "oo" => "foo"
|
||||||
isany("foo", 2, 02:01, 2021-01-02, 2021-01-01@14:01, "foo", ?) => 1
|
isany("foo", 2, 02:01, 2021-01-02, 2021-01-01@14:01, "foo", ?) => 1
|
||||||
No reminders.
|
No reminders.
|
||||||
|
DynBuf Mallocs: 21 mallocs; 6400 bytes
|
||||||
Variable hash table statistics:
|
Variable hash table statistics:
|
||||||
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
||||||
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
||||||
@@ -24488,6 +24595,7 @@ cal
|
|||||||
clear
|
clear
|
||||||
clear-omit-context
|
clear-omit-context
|
||||||
complete-through
|
complete-through
|
||||||
|
completed-through
|
||||||
debug
|
debug
|
||||||
do
|
do
|
||||||
dump
|
dump
|
||||||
@@ -24656,12 +24764,14 @@ isconst
|
|||||||
isdst
|
isdst
|
||||||
isleap
|
isleap
|
||||||
isomitted
|
isomitted
|
||||||
|
ivritmon
|
||||||
language
|
language
|
||||||
localtoutc
|
localtoutc
|
||||||
lower
|
lower
|
||||||
max
|
max
|
||||||
mbchar
|
mbchar
|
||||||
mbindex
|
mbindex
|
||||||
|
mbpad
|
||||||
mbstrlen
|
mbstrlen
|
||||||
mbsubstr
|
mbsubstr
|
||||||
min
|
min
|
||||||
@@ -24843,6 +24953,7 @@ $T
|
|||||||
$Tb
|
$Tb
|
||||||
$Td
|
$Td
|
||||||
$TerminalBackground
|
$TerminalBackground
|
||||||
|
$TerminalHyperlinks
|
||||||
$Thursday
|
$Thursday
|
||||||
$TimeSep
|
$TimeSep
|
||||||
$TimetIs64bit
|
$TimetIs64bit
|
||||||
@@ -24869,6 +24980,7 @@ $WarningLevel
|
|||||||
$Was
|
$Was
|
||||||
$Wednesday
|
$Wednesday
|
||||||
No reminders.
|
No reminders.
|
||||||
|
DynBuf Mallocs: 180071 mallocs; 42974784 bytes
|
||||||
Variable hash table statistics:
|
Variable hash table statistics:
|
||||||
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
||||||
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
||||||
@@ -25071,7 +25183,6 @@ TRANSLATE "MAX-OVERDUE specified twice" ""
|
|||||||
TRANSLATE "MAX-OVERDUE specified without TODO" ""
|
TRANSLATE "MAX-OVERDUE specified without TODO" ""
|
||||||
TRANSLATE "TZ specified twice" ""
|
TRANSLATE "TZ specified twice" ""
|
||||||
TRANSLATE "TZ specified for non-timed reminder" ""
|
TRANSLATE "TZ specified for non-timed reminder" ""
|
||||||
TRANSLATE "C library does not support multibyte characters" ""
|
|
||||||
TRANSLATE "Invalid multibyte sequence" ""
|
TRANSLATE "Invalid multibyte sequence" ""
|
||||||
TRANSLATE "Maximum expression complexity exceeded" ""
|
TRANSLATE "Maximum expression complexity exceeded" ""
|
||||||
TRANSLATE "Expecting operator or end-of-expression" ""
|
TRANSLATE "Expecting operator or end-of-expression" ""
|
||||||
@@ -39559,7 +39670,6 @@ trigger(2060-08-01@23:55, 1) => "1 August 2060 AT 19:55"
|
|||||||
utctolocal(2050-01-01@01:00) => 2049-12-31@20:00
|
utctolocal(2050-01-01@01:00) => 2049-12-31@20:00
|
||||||
localtoutc(2050-12-31@23:44) => 2051-01-01@04:44
|
localtoutc(2050-12-31@23:44) => 2051-01-01@04:44
|
||||||
localtoutc(2050-03-13@00:00) => 2050-03-13@05:00
|
localtoutc(2050-03-13@00:00) => 2050-03-13@05:00
|
||||||
localtoutc(2050-03-13@02:00) => 2050-03-13@07:00
|
|
||||||
localtoutc(2050-11-06@00:00) => 2050-11-06@04:00
|
localtoutc(2050-11-06@00:00) => 2050-11-06@04:00
|
||||||
localtoutc(2050-11-06@02:00) => 2050-11-06@07:00
|
localtoutc(2050-11-06@02:00) => 2050-11-06@07:00
|
||||||
utctolocal(2051-01-01@04:44) => 2050-12-31@23:44
|
utctolocal(2051-01-01@04:44) => 2050-12-31@23:44
|
||||||
@@ -39671,6 +39781,14 @@ Fifth today
|
|||||||
Sixth on 2025-08-06
|
Sixth on 2025-08-06
|
||||||
Eighth on 2025-08-20
|
Eighth on 2025-08-20
|
||||||
Ninth today
|
Ninth today
|
||||||
|
First on 2025-08-01
|
||||||
|
Second on 2022-08-01
|
||||||
|
Third on 2023-08-01
|
||||||
|
Fourth on 2025-08-20
|
||||||
|
Fifth today
|
||||||
|
Sixth on 2025-08-06
|
||||||
|
Eighth on 2025-08-20
|
||||||
|
Ninth today
|
||||||
Yup today
|
Yup today
|
||||||
Yup2 yesterday
|
Yup2 yesterday
|
||||||
Yup3 on 2025-08-11
|
Yup3 on 2025-08-11
|
||||||
@@ -39686,6 +39804,13 @@ Testing TODOS in calendar mode
|
|||||||
2025/08/01 * * * * First
|
2025/08/01 * * * * First
|
||||||
2025/08/01 * * * * Second
|
2025/08/01 * * * * Second
|
||||||
2025/08/01 * * * * Third
|
2025/08/01 * * * * Third
|
||||||
|
2025/08/01 * * * * First
|
||||||
|
2025/08/01 * * * * Second
|
||||||
|
2025/08/01 * * * * Third
|
||||||
|
2025/08/06 * * * * Sixth
|
||||||
|
2025/08/06 * * * * Seventh
|
||||||
|
2025/08/06 * * * * Eighth
|
||||||
|
2025/08/06 * * * * Ninth
|
||||||
2025/08/06 * * * * Sixth
|
2025/08/06 * * * * Sixth
|
||||||
2025/08/06 * * * * Seventh
|
2025/08/06 * * * * Seventh
|
||||||
2025/08/06 * * * * Eighth
|
2025/08/06 * * * * Eighth
|
||||||
@@ -39697,10 +39822,18 @@ Testing TODOS in calendar mode
|
|||||||
2025/08/13 * * * * Fifth
|
2025/08/13 * * * * Fifth
|
||||||
2025/08/13 * * * * Eighth
|
2025/08/13 * * * * Eighth
|
||||||
2025/08/13 * * * * Ninth
|
2025/08/13 * * * * Ninth
|
||||||
|
2025/08/13 * * * * Fifth
|
||||||
|
2025/08/13 * * * * Eighth
|
||||||
|
2025/08/13 * * * * Ninth
|
||||||
2025/08/13 * * * * Yup
|
2025/08/13 * * * * Yup
|
||||||
2025/08/20 * * * * Fourth
|
2025/08/20 * * * * Fourth
|
||||||
2025/08/20 * * * * Eighth
|
2025/08/20 * * * * Eighth
|
||||||
2025/08/20 * * * * Ninth
|
2025/08/20 * * * * Ninth
|
||||||
|
2025/08/20 * * * * Fourth
|
||||||
|
2025/08/20 * * * * Eighth
|
||||||
|
2025/08/20 * * * * Ninth
|
||||||
|
2025/08/27 * * * * Eighth
|
||||||
|
2025/08/27 * * * * Ninth
|
||||||
2025/08/27 * * * * Eighth
|
2025/08/27 * * * * Eighth
|
||||||
2025/08/27 * * * * Ninth
|
2025/08/27 * * * * Ninth
|
||||||
|
|
||||||
@@ -39708,6 +39841,10 @@ Testing TODOS in calendar mode with completed todos hidden
|
|||||||
2025/08/01 * * * * First
|
2025/08/01 * * * * First
|
||||||
2025/08/01 * * * * Second
|
2025/08/01 * * * * Second
|
||||||
2025/08/01 * * * * Third
|
2025/08/01 * * * * Third
|
||||||
|
2025/08/01 * * * * First
|
||||||
|
2025/08/01 * * * * Second
|
||||||
|
2025/08/01 * * * * Third
|
||||||
|
2025/08/06 * * * * Sixth
|
||||||
2025/08/06 * * * * Sixth
|
2025/08/06 * * * * Sixth
|
||||||
2025/08/09 * * * * Nope
|
2025/08/09 * * * * Nope
|
||||||
2025/08/10 * * * * Yup4
|
2025/08/10 * * * * Yup4
|
||||||
@@ -39715,10 +39852,17 @@ Testing TODOS in calendar mode with completed todos hidden
|
|||||||
2025/08/12 * * * * Yup2
|
2025/08/12 * * * * Yup2
|
||||||
2025/08/13 * * * * Fifth
|
2025/08/13 * * * * Fifth
|
||||||
2025/08/13 * * * * Ninth
|
2025/08/13 * * * * Ninth
|
||||||
|
2025/08/13 * * * * Fifth
|
||||||
|
2025/08/13 * * * * Ninth
|
||||||
2025/08/13 * * * * Yup
|
2025/08/13 * * * * Yup
|
||||||
2025/08/20 * * * * Fourth
|
2025/08/20 * * * * Fourth
|
||||||
2025/08/20 * * * * Eighth
|
2025/08/20 * * * * Eighth
|
||||||
2025/08/20 * * * * Ninth
|
2025/08/20 * * * * Ninth
|
||||||
|
2025/08/20 * * * * Fourth
|
||||||
|
2025/08/20 * * * * Eighth
|
||||||
|
2025/08/20 * * * * Ninth
|
||||||
|
2025/08/27 * * * * Eighth
|
||||||
|
2025/08/27 * * * * Ninth
|
||||||
2025/08/27 * * * * Eighth
|
2025/08/27 * * * * Eighth
|
||||||
2025/08/27 * * * * Ninth
|
2025/08/27 * * * * Ninth
|
||||||
Testing TODOS and JSON mode
|
Testing TODOS and JSON mode
|
||||||
@@ -39731,10 +39875,18 @@ Testing TODOS and JSON mode
|
|||||||
{"date":"2025-08-06","filename":"../tests/todos.rem","lineno":9,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-6 ","priority":5000,"body":"Sixth on 2025-08-06"},
|
{"date":"2025-08-06","filename":"../tests/todos.rem","lineno":9,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-6 ","priority":5000,"body":"Sixth on 2025-08-06"},
|
||||||
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":11,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-13","delta":7,"priority":5000,"body":"Eighth on 2025-08-20"},
|
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":11,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-13","delta":7,"priority":5000,"body":"Eighth on 2025-08-20"},
|
||||||
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":12,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-12","delta":7,"priority":5000,"body":"Ninth today"},
|
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":12,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-12","delta":7,"priority":5000,"body":"Ninth today"},
|
||||||
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":15,"d":13,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-13","max_overdue":3,"priority":5000,"body":"Yup today"},
|
{"date":"2025-08-01","filename":"../tests/todos.rem","lineno":14,"d":1,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-1 ","priority":5000,"body":"First on 2025-08-01"},
|
||||||
{"date":"2025-08-12","filename":"../tests/todos.rem","lineno":16,"d":12,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-12","max_overdue":3,"priority":5000,"body":"Yup2 yesterday"},
|
{"date":"2022-08-01","filename":"../tests/todos.rem","lineno":15,"d":1,"m":8,"is_todo":1,"complete_through":"2022-07-31","priority":5000,"body":"Second on 2022-08-01"},
|
||||||
{"date":"2025-08-11","filename":"../tests/todos.rem","lineno":17,"d":11,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-11","max_overdue":3,"priority":5000,"body":"Yup3 on 2025-08-11"},
|
{"date":"2023-08-01","filename":"../tests/todos.rem","lineno":16,"d":1,"m":8,"is_todo":1,"complete_through":"2022-08-01","priority":5000,"body":"Third on 2023-08-01"},
|
||||||
{"date":"2025-08-10","filename":"../tests/todos.rem","lineno":18,"d":10,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-10","max_overdue":3,"priority":5000,"body":"Yup4 on 2025-08-10"}
|
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":17,"d":20,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-20","priority":5000,"body":"Fourth on 2025-08-20"},
|
||||||
|
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":18,"d":13,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-13","priority":5000,"body":"Fifth today"},
|
||||||
|
{"date":"2025-08-06","filename":"../tests/todos.rem","lineno":19,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-6 ","priority":5000,"body":"Sixth on 2025-08-06"},
|
||||||
|
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":21,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-13","delta":7,"priority":5000,"body":"Eighth on 2025-08-20"},
|
||||||
|
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":22,"wd":["Wednesday"],"is_todo":1,"complete_through":"2025-08-12","delta":7,"priority":5000,"body":"Ninth today"},
|
||||||
|
{"date":"2025-08-13","filename":"../tests/todos.rem","lineno":25,"d":13,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-13","max_overdue":3,"priority":5000,"body":"Yup today"},
|
||||||
|
{"date":"2025-08-12","filename":"../tests/todos.rem","lineno":26,"d":12,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-12","max_overdue":3,"priority":5000,"body":"Yup2 yesterday"},
|
||||||
|
{"date":"2025-08-11","filename":"../tests/todos.rem","lineno":27,"d":11,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-11","max_overdue":3,"priority":5000,"body":"Yup3 on 2025-08-11"},
|
||||||
|
{"date":"2025-08-10","filename":"../tests/todos.rem","lineno":28,"d":10,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-10","max_overdue":3,"priority":5000,"body":"Yup4 on 2025-08-10"}
|
||||||
]
|
]
|
||||||
Testing proper redirection of RUN stdout in JSON mode... here's stdout
|
Testing proper redirection of RUN stdout in JSON mode... here's stdout
|
||||||
[
|
[
|
||||||
@@ -39858,6 +40010,7 @@ fib(24) = 46368
|
|||||||
-stdin-(13): `-': Maximum expression complexity exceeded
|
-stdin-(13): `-': Maximum expression complexity exceeded
|
||||||
-stdin-(3): [#0] In function `fib'
|
-stdin-(3): [#0] In function `fib'
|
||||||
[remaining call frames omitted]
|
[remaining call frames omitted]
|
||||||
|
DynBuf Mallocs: 3 mallocs; 192 bytes
|
||||||
Variable hash table statistics:
|
Variable hash table statistics:
|
||||||
Entries: 0; Buckets: 7; Non-empty Buckets: 0
|
Entries: 0; Buckets: 7; Non-empty Buckets: 0
|
||||||
Maxlen: 0; Minlen: 0; Avglen: 0.000; Stddev: 0.000; Avg nonempty len: 0.000
|
Maxlen: 0; Minlen: 0; Avglen: 0.000; Stddev: 0.000; Avg nonempty len: 0.000
|
||||||
@@ -39883,6 +40036,7 @@ Total expression node evaluations: 3999940
|
|||||||
a = 493; hex(a) = 1ED
|
a = 493; hex(a) = 1ED
|
||||||
hex(-1) = FFFFFFFF
|
hex(-1) = FFFFFFFF
|
||||||
a = 32767; hex(a) = 7FFF
|
a = 32767; hex(a) = 7FFF
|
||||||
|
DynBuf Mallocs: 5 mallocs; 320 bytes
|
||||||
Variable hash table statistics:
|
Variable hash table statistics:
|
||||||
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
Entries: 1; Buckets: 7; Non-empty Buckets: 1
|
||||||
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
Maxlen: 1; Minlen: 0; Avglen: 0.143; Stddev: 0.350; Avg nonempty len: 1.000
|
||||||
@@ -39957,3 +40111,117 @@ REM 2025 Oct [a] MSG Nonconst IS set
|
|||||||
#!P: Next line has expired, but contains expression... please verify
|
#!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 Oct [1] MSG Expr but not nonconst [today()]
|
||||||
#!P: Expired: REM 2025-10-01 MSG No expr seen [1+2]
|
#!P: Expired: REM 2025-10-01 MSG No expr seen [1+2]
|
||||||
|
# translations
|
||||||
|
{"LANGID":"en"}
|
||||||
|
# rem2ps begin
|
||||||
|
January 2026 31 4 0
|
||||||
|
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||||
|
December 31
|
||||||
|
February 28
|
||||||
|
# rem2ps end
|
||||||
|
# translations
|
||||||
|
{"LANGID":"en"}
|
||||||
|
# rem2ps begin
|
||||||
|
January 2026 31 4 0
|
||||||
|
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||||
|
December 31
|
||||||
|
February 28
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
-stdin-(2): `/': Division by zero
|
||||||
|
# rem2ps end
|
||||||
|
+----------------------------------------------------------------------------+
|
||||||
|
| January 2020‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| Sunday‎ | Monday‎ | Tuesday‎ |Wednesday‎ | Thursday‎ | Friday‎ | Saturday‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| | | |1 ‎ |2 ‎ |3 ‎ |4 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|5 ‎ |6 ‎ |7 ‎ |8 ‎ |9 ‎ |10 ‎ |11 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|12 ‎ |13 ‎ |14 ‎ |15 ‎ |16 ‎ |17 ‎ |18 ‎ |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ |[38;2;255;0;0m]8;;https://dianne.skoll.ca\Hello,]8;;\[0m‎ |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky!]8;;\‎ |]8;;https://dianne.skoll.ca\linky!]8;;\‎ |]8;;https://dianne.skoll.ca\linky!]8;;\‎ |[38;2;255;0;0m]8;;https://dianne.skoll.ca\linky!]8;;\[0m‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|19 ‎ |20 ‎ |21 ‎ |22 ‎ |23 ‎ |24 ‎ |25 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|26 ‎ |27 ‎ |28 ‎ |29 ‎ |30 ‎ |31 ‎ | |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
+----------------------------------------------------------------------------+
|
||||||
|
| January 2020‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| Sunday‎ | Monday‎ | Tuesday‎ |Wednesday‎ | Thursday‎ | Friday‎ | Saturday‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| | | |1 ‎ |2 ‎ |3 ‎ |4 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|5 ‎ |6 ‎ |7 ‎ |8 ‎ |9 ‎ |10 ‎ |11 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|12 ‎ |13 ‎ |14 ‎ |15 ‎ |16 ‎ |17 ‎ |18 ‎ |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 1!]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 2!]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 3!]8;;\‎ | | | |
|
||||||
|
| | | |[38;2;255;0;0m]8;;https://dianne.skoll.ca\Hello,]8;;\[0m‎ | | | |
|
||||||
|
| | | |[38;2;255;0;0m]8;;https://dianne.skoll.ca\linky 4!]8;;\[0m‎ | | | |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|19 ‎ |20 ‎ |21 ‎ |22 ‎ |23 ‎ |24 ‎ |25 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|26 ‎ |27 ‎ |28 ‎ |29 ‎ |30 ‎ |31 ‎ | |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
+----------------------------------------------------------------------------+
|
||||||
|
| January 2020‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| Sunday‎ | Monday‎ | Tuesday‎ |Wednesday‎ | Thursday‎ | Friday‎ | Saturday‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
| | | |1 ‎ |2 ‎ |3 ‎ |4 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|5 ‎ |6 ‎ |7 ‎ |8 ‎ |9 ‎ |10 ‎ |11 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|12 ‎ |13 ‎ |14 ‎ |15 ‎ |16 ‎ |17 ‎ |18 ‎ |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 1!]8;;\‎ | | | |
|
||||||
|
| | | | | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 2!]8;;\‎ | | | |
|
||||||
|
| | | | | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\Hello,]8;;\‎ | | | |
|
||||||
|
| | | |]8;;https://dianne.skoll.ca\linky 3!]8;;\‎ | | | |
|
||||||
|
| | | | | | | |
|
||||||
|
| | | |[38;2;255;0;0m]8;;https://dianne.skoll.ca\Hello,]8;;\[0m‎ | | | |
|
||||||
|
| | | |[38;2;255;0;0m]8;;https://dianne.skoll.ca\linky 4!]8;;\[0m‎ | | | |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|19 ‎ |20 ‎ |21 ‎ |22 ‎ |23 ‎ |24 ‎ |25 ‎ |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|26 ‎ |27 ‎ |28 ‎ |29 ‎ |30 ‎ |31 ‎ | |
|
||||||
|
+----------+----------+----------+----------+----------+----------+----------+
|
||||||
|
|
||||||
126
tests/test.rem
126
tests/test.rem
@@ -1769,7 +1769,133 @@ set a mbchar(120, 0)
|
|||||||
|
|
||||||
# Make sure trailing space doesn't cause a diagnostic.
|
# Make sure trailing space doesn't cause a diagnostic.
|
||||||
set a "foo"
|
set a "foo"
|
||||||
|
|
||||||
|
# Hebrew dates
|
||||||
|
|
||||||
|
SET a hebdate(1, "Tishrey")
|
||||||
|
SET a hebdate(1, "Tishri")
|
||||||
|
SET a hebdate(1, "Tishrei")
|
||||||
|
SET a hebdate(1, "תשרי")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Cheshvan")
|
||||||
|
SET a hebdate(1, "Kheshvan")
|
||||||
|
SET a hebdate(1, "Heshvan")
|
||||||
|
SET a hebdate(1, "חשוון")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Kislev")
|
||||||
|
SET a hebdate(1, "כסלו")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Tevet")
|
||||||
|
SET a hebdate(1, "טבת")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Shvat")
|
||||||
|
SET a hebdate(1, "Shevat")
|
||||||
|
SET a hebdate(1, "שבט")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Adar A")
|
||||||
|
SET a hebdate(1, "Adar 1")
|
||||||
|
SET a hebdate(1, "Adar I")
|
||||||
|
SET a hebdate(1, "אדר א'")
|
||||||
|
SET a hebdate(1, "אדר א")
|
||||||
|
SET a hebdate(1, "אדר 1")
|
||||||
|
SET a hebdate(1, "אדר I")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Adar B")
|
||||||
|
SET a hebdate(1, "Adar 2")
|
||||||
|
SET a hebdate(1, "Adar II")
|
||||||
|
SET a hebdate(1, "אדר ב'")
|
||||||
|
SET a hebdate(1, "אדר ב")
|
||||||
|
SET a hebdate(1, "אדר 2")
|
||||||
|
SET a hebdate(1, "אדר II")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Nisan")
|
||||||
|
SET a hebdate(1, "ניסן")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Iyar")
|
||||||
|
SET a hebdate(1, "Iyyar")
|
||||||
|
SET a hebdate(1, "אייר")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Sivan")
|
||||||
|
SET a hebdate(1, "סיון")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Tamuz")
|
||||||
|
SET a hebdate(1, "Tammuz")
|
||||||
|
SET a hebdate(1, "תמוז")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Av")
|
||||||
|
SET a hebdate(1, "אב")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Elul")
|
||||||
|
SET a hebdate(1, "אלול")
|
||||||
|
|
||||||
|
SET a hebdate(1, "Adar")
|
||||||
|
SET a hebdate(1, "אדר")
|
||||||
|
|
||||||
|
set a hebmon('1991-09-09')
|
||||||
|
set a ivritmon('1991-09-09')
|
||||||
|
|
||||||
|
set a hebmon('1991-10-09')
|
||||||
|
set a ivritmon('1991-10-09')
|
||||||
|
|
||||||
|
set a hebmon('1991-11-08')
|
||||||
|
set a ivritmon('1991-11-08')
|
||||||
|
|
||||||
|
set a hebmon('1991-12-08')
|
||||||
|
set a ivritmon('1991-12-08')
|
||||||
|
|
||||||
|
set a hebmon('1992-01-06')
|
||||||
|
set a ivritmon('1992-01-06')
|
||||||
|
|
||||||
|
set a hebmon('1992-02-05')
|
||||||
|
set a ivritmon('1992-02-05')
|
||||||
|
|
||||||
|
set a hebmon('1992-03-06')
|
||||||
|
set a ivritmon('1992-03-06')
|
||||||
|
|
||||||
|
set a hebmon('1991-03-16')
|
||||||
|
set a ivritmon('1991-03-16')
|
||||||
|
|
||||||
|
set a hebmon('1991-04-15')
|
||||||
|
set a ivritmon('1991-04-15')
|
||||||
|
|
||||||
|
set a hebmon('1991-05-14')
|
||||||
|
set a ivritmon('1991-05-14')
|
||||||
|
|
||||||
|
set a hebmon('1991-06-13')
|
||||||
|
set a ivritmon('1991-06-13')
|
||||||
|
|
||||||
|
set a hebmon('1991-07-12')
|
||||||
|
set a ivritmon('1991-07-12')
|
||||||
|
|
||||||
|
set a hebmon('1991-08-11')
|
||||||
|
set a ivritmon('1991-08-11')
|
||||||
|
|
||||||
|
# mbpad
|
||||||
|
|
||||||
|
set a mbpad("foo", "bar", 3)
|
||||||
|
set a mbpad("foo", "bar", 3, 1)
|
||||||
|
set a mbpad("foo", "bar", 8)
|
||||||
|
set a mbpad("foo", "bar", 8, 1)
|
||||||
|
set a mbpad("foo", "🙂💩", 3)
|
||||||
|
set a mbpad("foo", "🙂💩", 3, 1)
|
||||||
|
set a mbpad("foo", "🙂💩", 8)
|
||||||
|
set a mbpad("foo", "🙂💩", 8, 1)
|
||||||
|
set bad char(255)
|
||||||
|
set a mbpad("foo", bad, 3)
|
||||||
|
set a mbpad("foo", bad, 3, 1)
|
||||||
|
set a mbpad("foo", bad, 8)
|
||||||
|
set a mbpad("foo", bad, 8, 1)
|
||||||
|
set a mbpad(bad, "bar", 0)
|
||||||
|
set a mbpad(bad, "bar", 0, 1)
|
||||||
|
set a mbpad(bad, "bar", 8)
|
||||||
|
set a mbpad(bad, "bar", 8, 1)
|
||||||
|
|
||||||
DEBUG -x
|
DEBUG -x
|
||||||
|
SET $TerminalHyperlinks 1
|
||||||
|
REM INFO "Url: https://dianne.skoll.ca" MSG Hello, linky!
|
||||||
|
REM INFO "Url: https://dianne.skoll.ca" MSF Hello, linky!
|
||||||
|
REM INFO "Url: https://dianne.skoll.ca" SPECIAL COLOR 255 0 0 Hello, linky!
|
||||||
|
|
||||||
# Don't want Remind to queue reminders
|
# Don't want Remind to queue reminders
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,16 @@ REM TODO COMPLETE-THROUGH 2025-08-06 6 Aug 2025 +7 MSG %"Seventh%" %l
|
|||||||
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-13 MSG %"Eighth%" %l
|
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-13 MSG %"Eighth%" %l
|
||||||
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-12 MSG %"Ninth%" %l
|
REM TODO Wed +7 COMPLETE-THROUGH 2025-08-12 MSG %"Ninth%" %l
|
||||||
|
|
||||||
|
REM TODO 1 Aug 2025 MSG %"First%" %l
|
||||||
|
REM TODO 1 Aug COMPLETED-THROUGH 2022-07-31 MSG %"Second%" %l
|
||||||
|
REM TODO 1 Aug COMPLETED-THROUGH 2022-08-01 MSG %"Third%" %l
|
||||||
|
REM TODO 20 Aug 2025 +7 MSG %"Fourth%" %l
|
||||||
|
REM TODO 13 Aug 2025 +7 MSG %"Fifth%" %l
|
||||||
|
REM TODO 6 Aug 2025 +7 MSG %"Sixth%" %l
|
||||||
|
REM TODO COMPLETED-THROUGH 2025-08-06 6 Aug 2025 +7 MSG %"Seventh%" %l
|
||||||
|
REM TODO Wed +7 COMPLETED-THROUGH 2025-08-13 MSG %"Eighth%" %l
|
||||||
|
REM TODO Wed +7 COMPLETED-THROUGH 2025-08-12 MSG %"Ninth%" %l
|
||||||
|
|
||||||
# Test MAX-OVERDUE
|
# Test MAX-OVERDUE
|
||||||
REM TODO 2025-08-13 MAX-OVERDUE 3 MSG %"Yup%" %l
|
REM TODO 2025-08-13 MAX-OVERDUE 3 MSG %"Yup%" %l
|
||||||
REM TODO 2025-08-12 MAX-OVERDUE 3 MSG %"Yup2%" %l
|
REM TODO 2025-08-12 MAX-OVERDUE 3 MSG %"Yup2%" %l
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
# Use the output to verify your translations.
|
# Use the output to verify your translations.
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 Dianne Skoll
|
# Copyright (C) 1992-2026 Dianne Skoll
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
#
|
#
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ set a utctolocal('2050-01-01@01:00')
|
|||||||
set a localtoutc('2050-12-31@23:44')
|
set a localtoutc('2050-12-31@23:44')
|
||||||
|
|
||||||
set a localtoutc('2050-03-13@00:00')
|
set a localtoutc('2050-03-13@00:00')
|
||||||
set a localtoutc('2050-03-13@02:00')
|
# This next one fails on MUSL, so it's commented out.
|
||||||
|
# We expect 2050-03-13@07:00 but MUSL gives 2050-03-13@06:00
|
||||||
|
#set a localtoutc('2050-03-13@02:00')
|
||||||
set a localtoutc('2050-11-06@00:00')
|
set a localtoutc('2050-11-06@00:00')
|
||||||
set a localtoutc('2050-11-06@02:00')
|
set a localtoutc('2050-11-06@02:00')
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Makefile.in for installing WWW server calendar scripts
|
# Makefile.in for installing WWW server calendar scripts
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
# The complete path to where the scripts actually live, as seen by
|
# The complete path to where the scripts actually live, as seen by
|
||||||
# the UNIX operating system.
|
# the UNIX operating system.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
# CAL_DISPATCH -- Shell script for CGI directory to dispatch calendar
|
# CAL_DISPATCH -- Shell script for CGI directory to dispatch calendar
|
||||||
# commands.
|
# commands.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# PostScript calendar shell script
|
# PostScript calendar shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo "Content-type: application/pdf"
|
echo "Content-type: application/pdf"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# PostScript calendar shell script
|
# PostScript calendar shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo "Content-type: application/postscript"
|
echo "Content-type: application/postscript"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Hebrew date shell script
|
# Hebrew date shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo Content-type: text/html
|
echo Content-type: text/html
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Hebrew date reminder file
|
# Hebrew date reminder file
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
BANNER %
|
BANNER %
|
||||||
IF !$PSCAL
|
IF !$PSCAL
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# HTML calendar shell script
|
# HTML calendar shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo "Content-Type: text/html"
|
echo "Content-Type: text/html"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Hebrew PostScript calendar shell script
|
# Hebrew PostScript calendar shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
# Figure out the month: If day <= 20, use this month; otherwise, use
|
# Figure out the month: If day <= 20, use this month; otherwise, use
|
||||||
# next month.
|
# next month.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Hebrew PostScript calendar shell script
|
# Hebrew PostScript calendar shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
# Figure out the month: If day <= 20, use this month; otherwise, use
|
# Figure out the month: If day <= 20, use this month; otherwise, use
|
||||||
# next month.
|
# next month.
|
||||||
|
|||||||
2
www/moon
2
www/moon
@@ -2,7 +2,7 @@
|
|||||||
# Moon shell script
|
# Moon shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo Content-type: text/html
|
echo Content-type: text/html
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# File for giving moon phase info.
|
# File for giving moon phase info.
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
set now now()
|
set now now()
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Sunrise shell script
|
# Sunrise shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
echo Content-type: text/html
|
echo Content-type: text/html
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# File for giving sunrise info
|
# File for giving sunrise info
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
|
|
||||||
set now now()
|
set now now()
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Sunset shell script
|
# Sunset shell script
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
echo Content-type: text/html
|
echo Content-type: text/html
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# File for giving sunset info
|
# File for giving sunset info
|
||||||
#
|
#
|
||||||
# This file is part of REMIND.
|
# This file is part of REMIND.
|
||||||
# Copyright (C) 1992-2025 by Dianne Skoll
|
# Copyright (C) 1992-2026 by Dianne Skoll
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
set now now()
|
set now now()
|
||||||
|
|||||||
Reference in New Issue
Block a user