mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 22:38:37 +02:00
Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
845c41c867 | ||
|
|
bf83ce6c98 | ||
|
|
861d268448 | ||
|
|
02cf32c739 | ||
|
|
1f960039a1 | ||
|
|
dcf55e0fba | ||
|
|
aa8f5a9731 | ||
|
|
de03d0c02a | ||
|
|
3e6e3b6a34 | ||
|
|
bf48e31335 | ||
|
|
77c0beffb3 | ||
|
|
9a724d7618 | ||
|
|
1c20f54edb | ||
|
|
52b36d4503 | ||
|
|
0a82eadea6 | ||
|
|
0cd4fe67d1 | ||
|
|
9c31004b62 | ||
|
|
3431833be2 | ||
|
|
a98a4b9f72 | ||
|
|
4aaba4da88 | ||
|
|
98e37d8c54 | ||
|
|
4335aac7b2 | ||
|
|
695a2a3c2d | ||
|
|
47aa542d4f | ||
|
|
5b4d1ae264 | ||
|
|
721ccb9af9 | ||
|
|
ab1a6c412a | ||
|
|
c3a555942b | ||
|
|
0d15977875 | ||
|
|
0a7e6ee219 | ||
|
|
baf049662f | ||
|
|
fd5d9a479d | ||
|
|
01d3081f19 | ||
|
|
7841077fc6 | ||
|
|
2003c7a703 | ||
|
|
4a603ce60d | ||
|
|
caad7f5aa3 | ||
|
|
ea2312c0b2 | ||
|
|
c0c49be0b5 | ||
|
|
c0594811bf | ||
|
|
b7e13845b6 | ||
|
|
94b340305c | ||
|
|
f477757ac0 | ||
|
|
a8017c6fc7 | ||
|
|
aad746bca3 | ||
|
|
953ff8c49e | ||
|
|
b5258b1eb5 | ||
|
|
82733e817b | ||
|
|
86e94009a4 | ||
|
|
04ea056820 | ||
|
|
d6ee16cc13 | ||
|
|
ead660fe41 | ||
|
|
58e5ae15b0 | ||
|
|
85a8a4b016 | ||
|
|
c43eaec274 | ||
|
|
13fd54b990 | ||
|
|
a48b2ec02e |
19
README.md
19
README.md
@@ -95,16 +95,9 @@ though I suspect it's entirely or almost entirely human-written.
|
||||
2. No AI-generated patches or other sorts of contributions to Remind
|
||||
will be accepted.
|
||||
|
||||
3. Remind's source code may not be used to train an AI model,
|
||||
including an LLM model, unless all of the output of said model is
|
||||
released under the GNU General Public License, version 2. If you use
|
||||
any of Remind's source code to train your model, then anything that
|
||||
the model produces is a derived product of Remind and must be licensed
|
||||
under the same terms as Remind.
|
||||
|
||||
---
|
||||
|
||||
Contact info: dianne@skoll.ca
|
||||
|
||||
Home page: [https://dianne.skoll.ca/projects/remind/](https://dianne.skoll.ca/projects/remind/)
|
||||
|
||||
3. It is not yet settled whether, if you train an AI model on this
|
||||
source code, the resulting model, and/or any outputs it produces, are
|
||||
derivative works of the code. But if they are, and do not fall under
|
||||
"fair use" or equivalent in your jurisdiction, then as with any other
|
||||
derivative work you may only distribute them under the terms of the
|
||||
GNU General Public License, version 2.
|
||||
40
april-fools-announcements/2026-april-fool-announcement.txt
Normal file
40
april-fools-announcements/2026-april-fool-announcement.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
Hi, all,
|
||||
|
||||
As you know, Remind has been around for a long time---over 36 years.
|
||||
It's written in C, and I think it's high time to rewrite it in a
|
||||
memory-safe language. After all, one CVE in 36 years is simply
|
||||
unacceptable.
|
||||
|
||||
I was looking at writing it in Rust, but decided that Rust isn't quite
|
||||
mature enough yet. So I decided to do it in FORTAN-77. I chose
|
||||
FORTRAN-77 over the more obvious choice of COBOL because I studied
|
||||
engineering and not business.
|
||||
|
||||
The rewrite will have the following implications:
|
||||
|
||||
o Remind will henceforth be known as REMIND.
|
||||
|
||||
o Sadly, I have to drop UTF-8 support. Your choices are ASCII or
|
||||
EBCDIC.
|
||||
|
||||
o All statements must begin in column 7. That means you might need to
|
||||
edit your existing scripts to add 6 spaces at the beginning of the
|
||||
line.
|
||||
|
||||
o Variables whose names begin with "I" through "N" can only hold INTs.
|
||||
|
||||
o I will be setting up a store on my web site to sell punched cards.
|
||||
(Yes; those will be needed to run REMIND.)
|
||||
|
||||
Now, I confess I haven't programmed in FORTRAN-77 in several decades,
|
||||
so I plan on using AI to assist me. After all, it has been trained on
|
||||
the mountains of open-source FORTRAN-77 code on the Internet.
|
||||
|
||||
I anticipate the rewrite will take about 9 years. You can use this
|
||||
reminder to alert yourself to when it's ready:
|
||||
|
||||
REM 1 APRIL 2035 MSG REMIND IN FORTRAN-77 READY. STOP.
|
||||
|
||||
Regards,
|
||||
|
||||
Dianne.
|
||||
18
configure
vendored
18
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.72 for remind 06.02.02.
|
||||
# Generated by GNU Autoconf 2.72 for remind 06.02.05.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
|
||||
@@ -601,8 +601,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='remind'
|
||||
PACKAGE_TARNAME='remind'
|
||||
PACKAGE_VERSION='06.02.02'
|
||||
PACKAGE_STRING='remind 06.02.02'
|
||||
PACKAGE_VERSION='06.02.05'
|
||||
PACKAGE_STRING='remind 06.02.05'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL='https://dianne.skoll.ca/projects/remind/'
|
||||
|
||||
@@ -1258,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
'configure' configures remind 06.02.02 to adapt to many kinds of systems.
|
||||
'configure' configures remind 06.02.05 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1320,7 +1320,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of remind 06.02.02:";;
|
||||
short | recursive ) echo "Configuration of remind 06.02.05:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1408,7 +1408,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
remind configure 06.02.02
|
||||
remind configure 06.02.05
|
||||
generated by GNU Autoconf 2.72
|
||||
|
||||
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||
@@ -1871,7 +1871,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by remind $as_me 06.02.02, which was
|
||||
It was created by remind $as_me 06.02.05, which was
|
||||
generated by GNU Autoconf 2.72. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -4892,7 +4892,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by remind $as_me 06.02.02, which was
|
||||
This file was extended by remind $as_me 06.02.05, which was
|
||||
generated by GNU Autoconf 2.72. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -4957,7 +4957,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
remind config.status 06.02.02
|
||||
remind config.status 06.02.05
|
||||
configured by $0, generated by GNU Autoconf 2.72,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(remind, 06.02.02, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_INIT(remind, 06.02.05, , , https://dianne.skoll.ca/projects/remind/)
|
||||
AC_CONFIG_SRCDIR([src/queue.c])
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
@@ -106,7 +106,8 @@
|
||||
"Syntax table for `remind-conf-mode'.")
|
||||
|
||||
;;; keyword sets
|
||||
|
||||
;;; MOON, WEEK, SHADE, COLOR and COLOUR are not really keywords,
|
||||
;;; but they are widely-supported SPECIALS, so I add them here.
|
||||
(defconst remind-keywords
|
||||
(sort
|
||||
(list "ADDOMIT" "AFTER" "AT" "BAN" "BANNER" "BEFORE" "CAL" "CLEAR"
|
||||
@@ -120,7 +121,8 @@
|
||||
"PSFILE" "PUSH" "PUSH-FUNCS" "PUSH-VARS" "PUSH-OMIT-CONTEXT" "REM" "RETURN"
|
||||
"RUN" "SATISFY" "SCAN" "SCANFROM" "SCHED" "SECOND" "SET"
|
||||
"SKIP" "SPECIAL" "SYSINCLUDE" "TAG" "THIRD" "THROUGH" "TODO"
|
||||
"TRANSLATE" "TRANS" "TZ" "UNSET" "UNTIL" "WARN")
|
||||
"TRANSLATE" "TRANS" "TZ" "UNSET" "UNTIL" "WARN"
|
||||
"MOON" "WEEK" "SHADE" "COLOR" "COLOUR")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
|
||||
@@ -145,7 +147,7 @@
|
||||
"$May" "$MinsFromUTC" "$Minute" "$Monday" "$Mplu" "$NextMode"
|
||||
"$November" "$Now" "$NumFullOmits" "$NumPartialOmits" "$NumQueued"
|
||||
"$NumTrig" "$October" "$On" "$OnceFile" "$ParseUntriggered" "$Pm"
|
||||
"$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday" "$September"
|
||||
"$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday" "$September" "$Shaded"
|
||||
"$SimpleCal" "$SortByDate" "$SortByPrio" "$SortByTime" "$SubsIndent"
|
||||
"$Sunday" "$SuppressImplicitWarnings" "$SuppressLRM" "$SysInclude" "$T" "$Tb" "$Td"
|
||||
"$TerminalBackground" "$TerminalHyperlinks" "$Thursday" "$TimeSep" "$TimetIs64bit" "$Tm" "$Today" "$TodoFilter"
|
||||
@@ -165,26 +167,151 @@
|
||||
|
||||
(defconst remind-builtin-functions
|
||||
(sort
|
||||
(list "_" "abs" "access" "adawn" "adusk" "ampm" "ansicolor" "args" "asc"
|
||||
"baseyr" "catch" "catcherr" "char" "choose" "codepoint" "coerce" "columns" "const" "current" "date"
|
||||
"datepart" "datetime" "dawn" "day" "daysinmon" "defined" "dosubst"
|
||||
"dusk" "easterdate" "escape" "eval" "evaltrig" "filedate" "filedatetime"
|
||||
"filedir" "filename" "getenv" "hebdate" "hebday" "hebmon" "hebyear" "hex"
|
||||
"hour" "htmlescape" "htmlstriptags" "iif" "index" "isany" "isconst" "isdst"
|
||||
"isleap" "isomitted" "ivritmon" "language" "localtoutc" "lower" "max"
|
||||
"mbasc" "mbindex" "mbstrlen" "mbsubstr" "min"
|
||||
"minsfromutc" "minute" "mon" "monnum" "moondate" "moondatetime"
|
||||
"moonphase" "moonrise" "moonrisedir" "moonset" "moonsetdir" "moontime"
|
||||
"multitrig" "ndawn" "ndusk" "nonconst" "nonomitted" "now" "ord" "orthodoxeaster"
|
||||
"ostype" "pad" "plural" "psmoon" "psshade" "realcurrent" "realnow"
|
||||
"realtoday" "rows" "sgn" "shell" "shellescape" "slide" "soleq"
|
||||
"stdout" "strlen" "substr" "sunrise" "sunset" "time" "timepart"
|
||||
"timezone" "today" "trig" "trigback" "trigbase" "trigcompletethrough" "trigdate" "trigdatetime"
|
||||
"trigdelta" "trigduration" "trigeventduration" "trigeventstart" "trigeventstarttz"
|
||||
"trigfrom" "trigger" "triginfo" "trigistodo" "trigmaxoverdue" "trigpriority" "trigrep"
|
||||
"trigscanfrom" "trigtags" "trigtime" "trigtimedelta" "trigtimerep" "trigtimetz" "trigtz"
|
||||
"triguntil" "trigvalid" "typeof" "tzconvert" "upper" "utctolocal"
|
||||
"value" "version" "weekno" "wkday" "wkdaynum" "year"
|
||||
(list
|
||||
"_"
|
||||
"abs"
|
||||
"access"
|
||||
"adawn"
|
||||
"adusk"
|
||||
"ampm"
|
||||
"ansicolor"
|
||||
"args"
|
||||
"asc"
|
||||
"baseyr"
|
||||
"catch"
|
||||
"catcherr"
|
||||
"char"
|
||||
"choose"
|
||||
"codepoint"
|
||||
"coerce"
|
||||
"columns"
|
||||
"const"
|
||||
"current"
|
||||
"date"
|
||||
"datepart"
|
||||
"datetime"
|
||||
"dawn"
|
||||
"day"
|
||||
"daysinmon"
|
||||
"defined"
|
||||
"dosubst"
|
||||
"dusk"
|
||||
"easterdate"
|
||||
"escape"
|
||||
"eval"
|
||||
"evaltrig"
|
||||
"filedate"
|
||||
"filedatetime"
|
||||
"filedir"
|
||||
"filename"
|
||||
"getenv"
|
||||
"hebdate"
|
||||
"hebday"
|
||||
"hebmon"
|
||||
"hebyear"
|
||||
"hex"
|
||||
"hour"
|
||||
"htmlescape"
|
||||
"htmlstriptags"
|
||||
"iif"
|
||||
"index"
|
||||
"isany"
|
||||
"isconst"
|
||||
"isdst"
|
||||
"isleap"
|
||||
"isomitted"
|
||||
"ivritmon"
|
||||
"language"
|
||||
"localtoutc"
|
||||
"lower"
|
||||
"max"
|
||||
"mbasc"
|
||||
"mbindex"
|
||||
"mblower"
|
||||
"mbstrlen"
|
||||
"mbsubstr"
|
||||
"mbupper"
|
||||
"min"
|
||||
"minsfromutc"
|
||||
"minute"
|
||||
"mon"
|
||||
"monnum"
|
||||
"moondate"
|
||||
"moondatetime"
|
||||
"moonphase"
|
||||
"moonrise"
|
||||
"moonrisedir"
|
||||
"moonset"
|
||||
"moonsetdir"
|
||||
"moontime"
|
||||
"multitrig"
|
||||
"ndawn"
|
||||
"ndusk"
|
||||
"nonconst"
|
||||
"nonomitted"
|
||||
"now"
|
||||
"ord"
|
||||
"orthodoxeaster"
|
||||
"ostype"
|
||||
"pad"
|
||||
"plural"
|
||||
"psmoon"
|
||||
"psshade"
|
||||
"realcurrent"
|
||||
"realnow"
|
||||
"realtoday"
|
||||
"rows"
|
||||
"sgn"
|
||||
"shell"
|
||||
"shellescape"
|
||||
"slide"
|
||||
"soleq"
|
||||
"stdout"
|
||||
"strlen"
|
||||
"substr"
|
||||
"sunrise"
|
||||
"sunset"
|
||||
"time"
|
||||
"timepart"
|
||||
"timezone"
|
||||
"today"
|
||||
"trig"
|
||||
"trigback"
|
||||
"trigbase"
|
||||
"trigcompletethrough"
|
||||
"trigdate"
|
||||
"trigdatetime"
|
||||
"trigdelta"
|
||||
"trigduration"
|
||||
"trigeventduration"
|
||||
"trigeventstart"
|
||||
"trigeventstarttz"
|
||||
"trigfrom"
|
||||
"trigger"
|
||||
"triginfo"
|
||||
"trigistodo"
|
||||
"trigmaxoverdue"
|
||||
"trigpriority"
|
||||
"trigrep"
|
||||
"trigscanfrom"
|
||||
"trigtags"
|
||||
"trigtime"
|
||||
"trigtimedelta"
|
||||
"trigtimerep"
|
||||
"trigtimetz"
|
||||
"trigtz"
|
||||
"triguntil"
|
||||
"trigvalid"
|
||||
"typeof"
|
||||
"tzconvert"
|
||||
"upper"
|
||||
"utctolocal"
|
||||
"value"
|
||||
"version"
|
||||
"weekno"
|
||||
"wkday"
|
||||
"wkdaynum"
|
||||
"year"
|
||||
)
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
|
||||
@@ -1,5 +1,78 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* VERSION 06.02.05 - 2026-03-02
|
||||
|
||||
- NEW FEATURE: rem2pdf: Add --avoid-overfull option. This makes the
|
||||
font size in a calendar box with many reminders smaller in an effort
|
||||
to fit everything neatly into the box.
|
||||
|
||||
- NEW FEATURE: rem2pdf: Add --entry-spacing option. This lets you
|
||||
adjust the spacing between entries in a calendar box. It defaults
|
||||
to one-half of the --border-size option. NOTE: In previous
|
||||
releases, --entry-spacing defaulted to the SAME size as
|
||||
--border-size, so unless you supply an --entry-spacing value to set
|
||||
it back, the PDF calendars produced by this version of rem2pdf will
|
||||
be slightly more compact than previous versions.
|
||||
|
||||
- DOCUMENTATION UPDATE: Clarify rules around use of Remind source code
|
||||
for training AI models.
|
||||
|
||||
- FIX: include/holidays/nz.rem: Fix spelling of "Auckland" and add
|
||||
Matariki. Fixes courtesy of Bart Joy.
|
||||
|
||||
* VERSION 06.02.04 - 2026-02-15
|
||||
|
||||
- IMPROVEMENT: remind: Add the mblower and mbupper functions, which are
|
||||
multibyte counterparts to lower and upper.
|
||||
|
||||
- MINOR NEW FEATURE: remind: Add the $Shaded system variable that counts
|
||||
how many times a "SPECIAL SHADE" reminder has triggered. See the
|
||||
man page for an example of how this can be useful.
|
||||
|
||||
- MINOR IMPROVEMENT: Make all programs that ship with Remind (remind,
|
||||
rem2ps, rem2pdf, rem2html and tkremind) accept a --version long option.
|
||||
|
||||
- CHANGE: remind: Remind used to warn if the POP-OMIT-CONTEXT, POP-VARS
|
||||
or POP-FUNCS command corresponding to the relevant PUSH command was
|
||||
in a different file than the PUSH command. But there are valid use
|
||||
cases for this, so Remind no longer emits the warning unless you use
|
||||
the "-dp" debugging flag.
|
||||
|
||||
* VERSION 06.02.03 - 2026-02-05
|
||||
|
||||
- NEW FEATURE: rem2html: Add a new --yaag option to produce a calendar
|
||||
in the "year-at-a-glance" format. This format features a table with
|
||||
an entire month in each row. Thanks to Robert Black for suggesting
|
||||
this and for helping out with the CSS.
|
||||
|
||||
- CHANGE: remind: If standard output is a TTY, then default
|
||||
$TerminalHyperlinks to 1
|
||||
|
||||
- CHANGE: remind: Increase the default value of $MaxSatIter from 1000
|
||||
to 10000, reflecting the higher speed of the new expression
|
||||
evaluation engine as well as the speed of modern CPUs.
|
||||
|
||||
- UPDATE: examples/remind.vim: Update the URL to point to maintained
|
||||
version.
|
||||
|
||||
- IMPROVEMENT: include/sun.rem: Add Wikipedia links for sunrise/sunset
|
||||
|
||||
- IMPROVEMENT: Add MOON, SHADE, WEEK, COLOR and COLOUR to the Emacs
|
||||
syntax highlighting keyword list.
|
||||
|
||||
- IMPROVEMENT: If an invalid value is assigned to a system variable,
|
||||
issue the error "Invalid value for system variable" rather than
|
||||
"Type mismatch"
|
||||
|
||||
- DOC FIX: Fix typo in man page
|
||||
|
||||
- BUG FIX: rem2html: Eliminate "use of uninitialized variable"
|
||||
warning.
|
||||
|
||||
- BUG FIX: remind: The "trigbase" JSON key in "remind -pp" output had
|
||||
an incorrectly-formatted value. This has been fixed; thanks to
|
||||
Georg Simon for reporting this bug.
|
||||
|
||||
* VERSION 06.02.02 - 2026-01-10
|
||||
|
||||
- NEW FEATURE: remind: Turn reminders with a "Url:" INFO string into
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Davide Alberani <da@erlug.linux.it>
|
||||
" Last Change: 02 Nov 2015 + 13 Mar 2022 by Dianne Skoll <dianne@skoll.ca>
|
||||
" Version: 0.7+dianne1
|
||||
" URL: http://ismito.it/vim/syntax/remind.vim
|
||||
" URL: https://github.com/alberanid/vim-config/blob/master/syntax/remind.vim
|
||||
"
|
||||
" remind is a sophisticated reminder service
|
||||
" you can download remind from:
|
||||
|
||||
@@ -105,22 +105,22 @@ IF !Reform
|
||||
ENDIF
|
||||
|
||||
IF IncludeOmer || IncludeOmerCal
|
||||
SET ostart HEBDATE(16, "Nisan", TODAY()-50)
|
||||
IF ostart <= TODAY() && (TODAY() - ostart < 49)
|
||||
SET odays TODAY()-ostart+1
|
||||
SET ostart HEBDATE(16, "Nisan", $U-50)
|
||||
IF ostart <= $U && ($U - ostart < 49)
|
||||
SET odays $U-ostart+1
|
||||
IF IncludeOmer
|
||||
IF odays < 7
|
||||
REM MSG %"%"Today is the [ORD(odays)] day of the Omer.
|
||||
REM [$U] MSG %"%"Today is the [ORD(odays)] day of the Omer.
|
||||
ELSE
|
||||
IF !(odays % 7)
|
||||
REM MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
|
||||
REM [$U] MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
|
||||
ELSE
|
||||
REM MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer.
|
||||
REM [$U] MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer.
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF IncludeOmerCal
|
||||
REM CAL [ORD(odays)] of Omer
|
||||
REM [$U] CAL [ORD(odays)] of Omer
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -34,3 +34,36 @@ REM 27 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 0] MSG %"Christm
|
||||
REM 27 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 6] MSG %"Christmas Day (observed)%" %! %b.
|
||||
REM 28 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 0] MSG %"Boxing Day (observed)%" %! %b.
|
||||
REM 28 December ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-2) == 6] MSG %"Boxing Day (observed)%" %! %b.
|
||||
|
||||
# Matariki. Source:
|
||||
# https://www.legislation.govt.nz/act/public/2022/0014/23.0/LMS557893.html#LMS557893
|
||||
OMIT 2022-06-24 MSG Matariki
|
||||
OMIT 2023-07-14 MSG Matariki
|
||||
OMIT 2024-06-28 MSG Matariki
|
||||
OMIT 2025-06-20 MSG Matariki
|
||||
OMIT 2026-07-10 MSG Matariki
|
||||
OMIT 2027-06-25 MSG Matariki
|
||||
OMIT 2028-07-14 MSG Matariki
|
||||
OMIT 2029-07-06 MSG Matariki
|
||||
OMIT 2030-06-21 MSG Matariki
|
||||
OMIT 2031-07-11 MSG Matariki
|
||||
OMIT 2032-07-02 MSG Matariki
|
||||
OMIT 2033-06-24 MSG Matariki
|
||||
OMIT 2034-07-07 MSG Matariki
|
||||
OMIT 2035-06-29 MSG Matariki
|
||||
OMIT 2036-07-18 MSG Matariki
|
||||
OMIT 2037-07-10 MSG Matariki
|
||||
OMIT 2038-06-25 MSG Matariki
|
||||
OMIT 2039-07-15 MSG Matariki
|
||||
OMIT 2040-07-06 MSG Matariki
|
||||
OMIT 2041-07-19 MSG Matariki
|
||||
OMIT 2042-07-11 MSG Matariki
|
||||
OMIT 2043-07-03 MSG Matariki
|
||||
OMIT 2044-06-24 MSG Matariki
|
||||
OMIT 2045-07-07 MSG Matariki
|
||||
OMIT 2046-06-29 MSG Matariki
|
||||
OMIT 2047-07-19 MSG Matariki
|
||||
OMIT 2048-07-03 MSG Matariki
|
||||
OMIT 2049-06-25 MSG Matariki
|
||||
OMIT 2050-07-15 MSG Matariki
|
||||
OMIT 2051-06-30 MSG Matariki
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
# If you want the national holidays as well, you must
|
||||
# also SYSINCLUDE holidays/nz.rem
|
||||
|
||||
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Aukland Anniversary Day%" %! %b.
|
||||
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Auckland Anniversary Day%" %! %b.
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
# If you want the national holidays as well, you must
|
||||
# also SYSINCLUDE holidays/nz.rem
|
||||
|
||||
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Aukland Anniversary Day%" %! %b.
|
||||
REM Monday 26 January ADDOMIT SCANFROM -28 MSG %"Auckland Anniversary Day%" %! %b.
|
||||
|
||||
@@ -33,7 +33,7 @@ TRANSLATE "are" "són"
|
||||
TRANSLATE "were" "eren"
|
||||
TRANSLATE "done" "completada"
|
||||
|
||||
FSET - subst_bx(a,d,t) iif(d==today()+2, "demà passat", d >= today(), "d'aquí " + (d-today()) + " dies", "fa " + (today()-d) + " dies")
|
||||
FSET - subst_bx(a,d,t) iif(d==$U+2, "demà passat", d >= $U, "d'aquí " + (d-$U) + " dies", "fa " + ($U-d) + " dies")
|
||||
|
||||
# 1 d'abril vs 1 de maig.
|
||||
FSET - subst_sx(a,d,t) iif(isany(substr(mon(d), 1, 1), "a", "o") , "d'", "de")
|
||||
|
||||
@@ -58,12 +58,12 @@ FSET - subst_ampm(h) iif(h<5, " om natten", h < 12, " om formiddagen", h < 18, "
|
||||
FSET - subst_ordinal(d) "."
|
||||
FSET - ordx(n) n + "."
|
||||
|
||||
FSET - subst_p(alt, d, t) iif(d==today()+1, "", "e")
|
||||
FSET - subst_p(alt, d, t) iif(d==$U+1, "", "e")
|
||||
FSET - zeropad(s, len) pad(s, "0", len)
|
||||
FSET - subst_a_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET - subst_ax(alt, d, t) iif(alt, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "om " + (d-today()) + " dage", "for " + (today()-d) + " dage siden")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "om " + (d-$U) + " dage", "for " + ($U-d) + " dage siden")
|
||||
|
||||
FSET - subst_ex(alt, d, t) "den " + zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
FSET - subst_fx(alt, d, t) "den " + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
|
||||
@@ -61,14 +61,14 @@ FSET - ordx(n) n + "."
|
||||
FSET - subst_a_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET - subst_ax(alt, d, t) iif(alt, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "in " + (d-today()) + " Tagen", "vor " + (today()-d) + " Tagen")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "in " + (d-$U) + " Tagen", "vor " + ($U-d) + " Tagen")
|
||||
|
||||
FSET - subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
|
||||
FSET - subst_gx(alt, d, t) iif(alt, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
|
||||
FSET - subst_ux(alt, d, t) subst_ax(alt, d, t)
|
||||
FSET - subst_vx(alt, d, t) subst_gx(alt, d, t)
|
||||
FSET - subst_p(alt, d, t) iif(d == today()+1, "", "en")
|
||||
FSET - subst_p(alt, d, t) iif(d == $U+1, "", "en")
|
||||
|
||||
# Localization of various astronomical events
|
||||
|
||||
|
||||
@@ -52,4 +52,4 @@ SET $And "y"
|
||||
SET $Hplu "s"
|
||||
SET $Mplu "s"
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "dentro de " + (d-today()) + " días", "hace " + (today()-d) + " dias")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "dentro de " + (d-$U) + " días", "hace " + ($U-d) + " dias")
|
||||
|
||||
@@ -62,7 +62,7 @@ FSET - ordx(d) d + subst_ordinal(d)
|
||||
FSET - subst_a_alt(d, o, p) wkday(d) + o + " " + day(d) + ". " + mon(d) + p + " " + year(d)
|
||||
FSET - subst_ax(a, d, t) iif(a, subst_a_alt(d, "", ""), subst_a_alt(d, $On, "ta"))
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), (d-today()) + " päivän kuluttua", (today()-d) + " päivää sitten")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, (d-$U) + " päivän kuluttua", ($U-d) + " päivää sitten")
|
||||
FSET - subst_cx(a, d, t) iif(a, wkday(d), wkday(d) + $On)
|
||||
|
||||
FSET - subst_ex(a, d, t) zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
@@ -81,7 +81,7 @@ FSET - subst_k_alt(d, o) wkday(d) + o + " " + mon(d) + "n " + day(d) + subst_ord
|
||||
FSET - subst_kx(a, d, t) iif(a, subst_k_alt(d, ""), subst_k_alt(d, $On))
|
||||
|
||||
FSET - subst_lx(a, d, t) zeropad(year(d), 4) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2)
|
||||
FSET - subst_p(a, d, t) iif(d==today()+1, "", "ä")
|
||||
FSET - subst_p(a, d, t) iif(d==$U+1, "", "ä")
|
||||
FSET - subst_qx(a, d, t) "n"
|
||||
|
||||
FSET - subst_u_alt(d, o, p) wkday(d) + o + " " + day(d) + subst_ordinal(day(d)) + " " + mon(d) + p + " " + year(d)
|
||||
|
||||
@@ -63,7 +63,7 @@ FSET - subst_1(alt, date, time) iif(time == now(), "maintenant", \
|
||||
time > now(), "dans " + subst_tdiff((time-now())/60, (time-now())%60), \
|
||||
"il y a " + subst_tdiff ((now()-time)/60, (now()-time)%60))
|
||||
|
||||
FSET - subst_bx(alt, date, time) iif(date >= today(), "dans " + (date-today()) + " jours", "il y a " + (today()-date) + " jours")
|
||||
FSET - subst_bx(alt, date, time) iif(date >= $U, "dans " + (date-$U) + " jours", "il y a " + ($U-date) + " jours")
|
||||
FSET - subst_j_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + ", " + year(date)
|
||||
FSET - subst_jx(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_alt(date))
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ SET $And "και"
|
||||
SET $Hplu ""
|
||||
SET $Mplu ""
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "σε " + (d - today()) + " ημέρες", "πριν από " + (today()-d) + " ημέρες")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "σε " + (d - $U) + " ημέρες", "πριν από " + ($U-d) + " ημέρες")
|
||||
FSET - subst_ordinal(d) "."
|
||||
FSET - ordx(d) d + "."
|
||||
FSET - subst_a_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
|
||||
@@ -54,5 +54,5 @@ SET $And "og"
|
||||
SET $Hplu "ir"
|
||||
SET $Mplu "r"
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "eftir " + (d - today()) + " daga", "fyrir " + (today()-d) + " dögum")
|
||||
FSET - subst_p(a, d, t) iif(d == today()+1, "", "a")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "eftir " + (d - $U) + " daga", "fyrir " + ($U-d) + " dögum")
|
||||
FSET - subst_p(a, d, t) iif(d == $U+1, "", "a")
|
||||
|
||||
@@ -53,9 +53,9 @@ SET $And "e"
|
||||
SET $Hplu "a"
|
||||
SET $Mplu "i"
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "fra " + (d-today()) + " giorni", (today()-d) + " giorni fa")
|
||||
FSET - subst_p(a, d, t) iif(d==today()+1, "o", "i")
|
||||
FSET - subst_q(a, d, t) iif(d==today()+1, "a", "e")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "fra " + (d-$U) + " giorni", ($U-d) + " giorni fa")
|
||||
FSET - subst_p(a, d, t) iif(d==$U+1, "o", "i")
|
||||
FSET - subst_q(a, d, t) iif(d==$U+1, "a", "e")
|
||||
|
||||
FSET - subst_ax(a, d, t) wkday(d) + ", " + day(d) + " " + mon(d) + " " + year(d)
|
||||
FSET - subst_jx(a, d, t) subst_ax(a, d, t)
|
||||
|
||||
@@ -59,7 +59,7 @@ FSET - subst_1b(hdiff, mdiff) iif(hdiff==0, subst_minutes(mdiff), mdiff==0, subs
|
||||
FSET - subst_minutes(m) iif(m==1, "1 minuut", m + " minuten")
|
||||
FSET - subst_hours(h) iif(h==1, "1 uur", h + " uren")
|
||||
|
||||
FSET - subst_bx(a, d, t) iif (d == today()+2, "overmorgen", d+2 == today(), "eergisteren", d >= today(), "over " + (d-today()) + " dagen", (today()-d) + " dagen geleden")
|
||||
FSET - subst_bx(a, d, t) iif (d == $U+2, "overmorgen", d+2 == $U, "eergisteren", d >= $U, "over " + (d-$U) + " dagen", ($U-d) + " dagen geleden")
|
||||
|
||||
FSET - subst_s(a, d, t) iif(day(d) == 1 || day(d) == 8, "e", day(d) < 20, "de", "te")
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ SET $And "og"
|
||||
SET $Hplu "r"
|
||||
SET $Mplu "er"
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "om " + (d-today()) + " dager", "for " + (today()-d) + " dager siden")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "om " + (d-$U) + " dager", "for " + ($U-d) + " dager siden")
|
||||
FSET - subst_ordinal(d) "."
|
||||
FSET - ordx(n) n + "."
|
||||
|
||||
@@ -63,4 +63,4 @@ FSET - subst_gx(a, d, t) iif(a, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
FSET - subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
|
||||
FSET - subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET - subst_vx(a, d, t) subst_gx(a, d, t)
|
||||
FSET - subst_p(a, d, t) iif(d==today()+1, "", "er")
|
||||
FSET - subst_p(a, d, t) iif(d==$U+1, "", "er")
|
||||
|
||||
@@ -58,7 +58,7 @@ FSET - subst_ordinal(d) ""
|
||||
|
||||
FSET - subst_a_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET - subst_ax(a, d, t) iif(a, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "za " + (d-today()) + " dni", (today()-d) + " dni temu")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "za " + (d-$U) + " dni", ($U-d) + " dni temu")
|
||||
FSET - subst_g_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d)
|
||||
FSET - subst_gx(a, d, t) iif(a, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
FSET - subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
|
||||
@@ -58,7 +58,7 @@ FSET - subst_ordinal(d) ""
|
||||
FSET - subst_on_wd(d) iif(wkdaynum(d) == 1 || wkdaynum(d) == 2, "no", "na")
|
||||
|
||||
FSET - subst_a_alt(d) wkday(d) + ", " + day(d) + " de " + mon(d) + " de " + year(d)
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "em " + (d-today()) + " dias", "há " + (today()-d) + " dias")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "em " + (d-$U) + " dias", "há " + ($U-d) + " dias")
|
||||
FSET - subst_c_alt(d) wkday(d)
|
||||
FSET - subst_g_alt(d) wkday(d) + ", " + day(d) + " " + mon(d)
|
||||
FSET - subst_ax(a, d, t) iif(a, subst_a_alt(d), subst_on_wd(d) + " " + subst_a_alt(d))
|
||||
|
||||
@@ -53,7 +53,7 @@ SET $Mplu "e"
|
||||
SET $Hplu "e"
|
||||
SET $And "şi"
|
||||
|
||||
FSET - subst_bx(a, d, t) iif(d >= today(), "peste " + (d-today()) + " zile", "acume " + (today()-d) + " zile")
|
||||
FSET - subst_bx(a, d, t) iif(d >= $U, "peste " + (d-$U) + " zile", "acume " + ($U-d) + " zile")
|
||||
|
||||
FSET - subst_ampm(h) iif(h<4, " noaptea", h<12, " dimineaţa", h<18, " după-amiaza", " seara")
|
||||
FSET - subst_ordinal(d) ""
|
||||
@@ -65,7 +65,7 @@ FSET - subst_jx(a, d, t) wkday(d) + ", " + mon(d) + " " + day(d) + ", " + year(d
|
||||
FSET - subst_kx(a, d, t) wkday(d) + ", " + mon(d) + " " + day(d)
|
||||
FSET - subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET - subst_vx(a, d, t) subst_gx(a, d, t)
|
||||
FSET - subst_p(a, d, t) iif(d==today()+1, "", "le")
|
||||
FSET - subst_p(a, d, t) iif(d==$U+1, "", "le")
|
||||
|
||||
FSET - subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst_1helper(now()-t, "acum "), subst_1helper(t-now(), "peste "))
|
||||
FSET - subst_1helper(diff, when) when + iif(diff%60==0, subst_1h(diff/60), diff/60==0, subst_1m(diff%60), subst_1h(diff/60) + " " + $And + " " + subst_1m(diff%60))
|
||||
|
||||
@@ -7,6 +7,6 @@ IF access($SysInclude + "/translations/" + _("LANGID") + "/sun.rem", "r") >= 0
|
||||
ENDIF
|
||||
|
||||
IF !$CalMode && !$PsCal
|
||||
REM NOQUEUE AT [sunrise()] MSG %"%"%(Sunrise) %! %2.
|
||||
REM NOQUEUE AT [sunset()] MSG %"%"%(Sunset) %! %2.
|
||||
REM INFO "Url: https://en.wikipedia.org/wiki/Sunrise" NOQUEUE AT [sunrise()] MSG %"%"%(Sunrise) %! %2.
|
||||
REM INFO "Url: https://en.wikipedia.org/wiki/Sunset" NOQUEUE AT [sunset()] MSG %"%"%(Sunset) %! %2.
|
||||
ENDIF
|
||||
|
||||
@@ -21,6 +21,9 @@ render characters outside the ASCII character set, see
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print the version of \fBrem2ps\fR and exit.
|
||||
.TP
|
||||
.B \-v
|
||||
Be more verbose. This causes \fBrem2ps\fR to print progress messages
|
||||
to the standard error stream. Normally, it is silent.
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
.TH REMIND 1 "@RELEASE_DATE@" "Remind" "VERSION @VERSION@"
|
||||
.SH NAME
|
||||
remind \- a sophisticated reminder service
|
||||
.SH THE BOOK OF REMIND
|
||||
This man page is a good \fIreference\fR for Remind. However, if you
|
||||
are a novice wishing to \fIlearn\fR Remind, I suggest downloading
|
||||
"The Book of Remind" from the Remind home page at https://dianne.skoll.ca/projects/remind/
|
||||
.SH SYNOPSIS
|
||||
.B remind [\fIoptions\fR] \fIfilename\fR [\fIdate\fR] [\fI*rep\fR] [\fItime\fR]
|
||||
.SH DESCRIPTION
|
||||
@@ -349,6 +353,10 @@ Echo lines when displaying error messages
|
||||
.B f
|
||||
Trace the reading of reminder files
|
||||
.TP
|
||||
.B p
|
||||
Issue warnings if a POP-OMIT-CONTEXT, POP-VARS or POP-FUNCS matches
|
||||
a corresponding PUSH that is in a different file.
|
||||
.TP
|
||||
.B s
|
||||
Trace expression parsing and display the internal expression node
|
||||
tree. This is unlikely to be useful unless you are working on
|
||||
@@ -507,10 +515,12 @@ In other words, \fB\-i\fIvar\fR is exactly the same as \fB\-i\fIvar\fR\fB=\fR0.
|
||||
Allows you to define a function on the command line.
|
||||
.PP
|
||||
If you supply a \fIdate\fR on the command line, it must consist of
|
||||
\fIday month year\fR, where \fIday\fR is the day of the month,
|
||||
[\fIday\fR] \fImonth\fR [\fIyear\fR], where \fIday\fR is the day of the month,
|
||||
\fImonth\fR is at least the first three letters of the English name
|
||||
of the month, and \fIyear\fR is a year (all 4 digits) from 1990 to
|
||||
about 2075. You can leave out the \fIday\fR, which then defaults to 1.
|
||||
If you leave out the year, then it defaults to the current year. You
|
||||
cannot leave out the \fImonth\fR.
|
||||
.PP
|
||||
If you do supply a \fIdate\fR on the command line, then \fBRemind\fR
|
||||
uses it, rather than the actual system date, as its notion of "today."
|
||||
@@ -1360,7 +1370,7 @@ minutes. That is, 13:39 and 13.39 are equivalent.
|
||||
for a timed reminder is the same as the current system date, the
|
||||
reminder is queued for later activation. When \fBRemind\fR has
|
||||
finished processing the reminder file, it puts itself in the
|
||||
background, and activates timed reminders when the system time reached
|
||||
background, and activates timed reminders when the system time reaches
|
||||
the specified time. Note that if you use the \fBNOQUEUE\fR modifier
|
||||
in the \fBREM\fR command, then this queuing and background activation
|
||||
is \fInot\fR performed. \fBNOQUEUE\fR is useful if you want a time
|
||||
@@ -2588,16 +2598,13 @@ a sequence of more than one byte. For example, in a UTF-8 environment,
|
||||
the string "🙂" contains one character but four bytes. And the string
|
||||
"één" contains three characters but five bytes.
|
||||
.PP
|
||||
\fBRemind\fR has a set of functions
|
||||
that work on \fIbytes\fR, namely \fBindex\fR, \fBstrlen\fR and \fBsubstr\fR.
|
||||
These are not safe to use on multi-byte strings; instead use
|
||||
\fBmbindex\fR, \fBmbstrlen\fR and \fBmbsubstr\fR. If you know \fIfor sure\fR
|
||||
that a string contains only single-byte characters, then the byte-oriented
|
||||
versions may be used and are faster than the multi-byte versions.
|
||||
.PP
|
||||
Some ancient or embedded systems may lack the C library functions needed
|
||||
to deal with multi-byte strings. In that case, the \fBmb\fIxxx\fR functions
|
||||
all return an error.
|
||||
\fBRemind\fR has a set of functions that work on \fIbytes\fR, namely
|
||||
\fBindex\fR, \fBstrlen\fR and \fBsubstr\fR, and several more. These
|
||||
are not safe to use on multi-byte strings; instead use \fBmbindex\fR,
|
||||
\fBmbstrlen\fR and \fBmbsubstr\fR, and the \fBmb\fR variants of the
|
||||
others. If you know \fIfor sure\fR that a string contains only
|
||||
single-byte characters, then the byte-oriented versions may be used
|
||||
and are faster than the multi-byte versions.
|
||||
.RE
|
||||
.TP
|
||||
.B TIME
|
||||
@@ -2638,7 +2645,7 @@ The following examples illustrate constants in \fBRemind\fR expressions:
|
||||
12, 36, \-10, 0, 1209, 0x1F, 0xfe00 (the last two demonstrate the use of hexadecimal constants)
|
||||
.TP
|
||||
.B STRING constants
|
||||
"Hello there", "This is a test", "\\nHello\\tThere", ""
|
||||
"Hello there", "This is a test", "\\nHello\\tThere", "", "π is Cool! 🙂"
|
||||
.PP
|
||||
.RS
|
||||
Note that the empty string is represented by "". \fBRemind\fR supports
|
||||
@@ -3259,7 +3266,7 @@ near the beginning of the file and not change it after that.
|
||||
.TP
|
||||
.B $MaxSatIter
|
||||
The maximum number of iterations for the \fBSATISFY\fR clause
|
||||
(described later.) Must be at least 10.
|
||||
(described later.) Must be at least 10. The default value is 10,000.
|
||||
.TP
|
||||
.B $MaxStringLen
|
||||
A limit on the longest string that \fBRemind\fR will allow you
|
||||
@@ -3361,6 +3368,30 @@ If non-zero, then the \fB\-p\fR option was supplied on the command line.
|
||||
.B $RunOff (read-only)
|
||||
If non-zero, the \fBRUN\fR directives are disabled.
|
||||
.TP
|
||||
.B $Shaded (read-only)
|
||||
Returns the number of times a \fBSHADE\fR special reminder has triggered.
|
||||
\fIThis variable is set only in calendar mode, not agenda mode\fR. You
|
||||
can use this variable to avoid shading a calendar day that has already
|
||||
been shaded.
|
||||
.RS
|
||||
.PP
|
||||
For example, suppose you want to shade all calendar boxes yellow
|
||||
\fIif\fR any reminders have triggered on that day. But if a box has
|
||||
been explicitly shaded, you don't want to overwrite that shading.
|
||||
You could use something like this:
|
||||
.PP
|
||||
.nf
|
||||
SET n $NumTrig
|
||||
# Do all your reminders here...
|
||||
|
||||
# If anything has triggered and the box is
|
||||
# not already shaded, then shade it yellow
|
||||
IF $NumTrig > n && !$Shaded
|
||||
REM SPECIAL SHADE 255 255 128
|
||||
ENDIF
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
.B $SimpleCal (read-only)
|
||||
Set to a non-zero value if \fIeither\fR of the \fB\-p\fR or \fB\-s\fR
|
||||
command-line options was supplied.
|
||||
@@ -3492,8 +3523,8 @@ at most 85 out of 255, and if the maximum of any component is at most
|
||||
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.
|
||||
terminal. By default, \fB$TerminalHyperlinks\fR is set to 1 if \fBRemind\fR's
|
||||
standard output is a terminal, or to 0 if it is not.
|
||||
.TP
|
||||
.B $WarningLevel (STRING type)
|
||||
As new versions of \fBRemind\fR are released, new warnings may be added.
|
||||
@@ -4223,8 +4254,15 @@ Given a \fBDATETIME\fR object interpreted in the local time zone, return
|
||||
a \fBDATETIME\fR object that expresses the same time in UTC.
|
||||
.TP
|
||||
.B lower(s_string)
|
||||
Returns a \fBSTRING\fR with all upper-case bytes in \fIstring\fR
|
||||
converted to lower-case. \fBNote:\fR This function works correctly
|
||||
only for ASCII strings. If you are using Unicode characters outside
|
||||
the ASCII set, use \fBmblower\fR instead.
|
||||
.TP
|
||||
.B mblower(s_string)
|
||||
Returns a \fBSTRING\fR with all upper-case characters in \fIstring\fR
|
||||
converted to lower-case.
|
||||
converted to lower-case. This function works correctly on any
|
||||
Unicode string.
|
||||
.TP
|
||||
.B max(x_arg1 [,x_arg2...)
|
||||
Can take any number of arguments, and returns the maximum. The arguments
|
||||
@@ -5133,8 +5171,15 @@ of the time zone name.
|
||||
.PP
|
||||
.TP
|
||||
.B upper(s_string)
|
||||
Returns a \fBSTRING\fR with all lower-case bytes in \fIstring\fR
|
||||
converted to upper-case. \fBNote:\fR This function works correctly
|
||||
only for ASCII strings. If you are using Unicode characters outside
|
||||
the ASCII set, use \fBmbupper\fR instead.
|
||||
.TP
|
||||
.B mbupper(s_string)
|
||||
Returns a \fBSTRING\fR with all lower-case characters in \fIstring\fR
|
||||
converted to upper-case.
|
||||
converted to upper-case. This function works correctly on any
|
||||
Unicode string.
|
||||
.TP
|
||||
.B utctolocal(q_datetime)
|
||||
Given a \fBDATETIME\fR object interpreted in UTC, return a
|
||||
|
||||
@@ -18,10 +18,12 @@ binary. If you are using Tcl/Tk 8.5, you may also need either the Img
|
||||
or the tkpng extension to handle PNG images.
|
||||
|
||||
.SH COMMAND-LINE OPTIONS
|
||||
\fBTkRemind\fR itself has no command-line options. However, it passes
|
||||
any command-line argument starting with \fB\-\fR to \fBRemind\fR as an
|
||||
option. In addition, \fBTkRemind\fR will respect the \fB\-m\fR and
|
||||
\fB\-b1\fR options and adjust its appearance accordingly.
|
||||
\fBTkRemind\fR itself has only one command-line option:
|
||||
\fB\-\-version\fR, which makes it print the version of \fBTkRemind\fR
|
||||
and exit. Any other command-line argument starting with \fB\-\fR to
|
||||
\fBRemind\fR as an option. In addition, \fBTkRemind\fR will respect
|
||||
the \fB\-m\fR and \fB\-b1\fR options and adjust its appearance
|
||||
accordingly.
|
||||
.PP
|
||||
\fIRead_file\fR is the file from which \fBTkRemind\fR reads reminders.
|
||||
It is in standard \fBRemind\fR format. \fIWrite_file\fR is the file
|
||||
@@ -193,6 +195,12 @@ Select the appropriate paper size and orientation. Activate
|
||||
be the normal case unless you have many reminders in a particular
|
||||
day. (See the \fBrem2pdf\fR documentation.)
|
||||
|
||||
If you activate \fBAvoid over-full boxes\fR, then \fBTkRemind\fR
|
||||
will pass the \fB\-\-avoid\-overfull\fR option to \fBrem2pdf\fR. This
|
||||
will make it try to fit many reminders into a calendar box by shrinking
|
||||
the font. This option, if activated, also automatically activates
|
||||
\fBFill page\fR.
|
||||
|
||||
Finally, click \fBPrint\fR to print or \fBCancel\fR to cancel. Note
|
||||
that during printing, \fBRemind\fR is called with the
|
||||
\fB-itkremind=1\fR option and also an additional \fB-itkprint=1\fR
|
||||
|
||||
@@ -96,6 +96,14 @@ without any E<lt>htmlE<gt> or E<lt>bodyE<gt> tags.
|
||||
Use I<title> as the content between E<lt>titleE<gt> and E<lt>/titleE<gt>
|
||||
tags.
|
||||
|
||||
=item --yaag
|
||||
|
||||
Instead of making 7-column tables for each month, show each month
|
||||
as a I<single> table row of 38 columns. This is the so-called
|
||||
"year-at-a-glance" format. You must use the "-ppp" option to
|
||||
C<remind> or the --yaag option will be ignored. And this format
|
||||
works best if you create a calendar for an entire year (so, starting
|
||||
in January and using "-ppp12" to get 12 months' worth of reminders.)
|
||||
|
||||
=item --prologue I<html_text>
|
||||
|
||||
@@ -188,6 +196,7 @@ Options:
|
||||
--title string What to put in <title>...</title> tags
|
||||
--prologue html_text Text to insert at the top of the body
|
||||
--epilogue html_text Text to insert at the end of the body
|
||||
--yaag Output one month per row for year-at-a-glance format
|
||||
EOM
|
||||
exit($exit_status);
|
||||
}
|
||||
@@ -218,6 +227,7 @@ sub parse_options
|
||||
"man",
|
||||
"utf8",
|
||||
"pngs",
|
||||
"yaag",
|
||||
"version",
|
||||
"stylesheet=s",
|
||||
"nostyle",
|
||||
@@ -316,6 +326,10 @@ sub parse_input
|
||||
if ($_ eq '[') {
|
||||
return parse_input_ppp();
|
||||
}
|
||||
if ($Options{yaag}) {
|
||||
$Options{yaag} = 0;
|
||||
print STDERR "Ignoring option --yaag: You must use remind -ppp for this option\n";
|
||||
}
|
||||
if (/# translations/) {
|
||||
slurp_translations();
|
||||
next;
|
||||
@@ -472,6 +486,10 @@ sub parse_input_ppp
|
||||
}
|
||||
if (exists($array->[0]{caltype}) &&
|
||||
$array->[0]{caltype} eq 'weekly') {
|
||||
if ($Options{yaag}) {
|
||||
$Options{yaag} = 0;
|
||||
print STDERR "Ignoring option --yaag for a weekly calendar\n";
|
||||
}
|
||||
emit_ppp_calendars($array, 'weekly');
|
||||
} else {
|
||||
emit_ppp_calendars($array, 'monthly');
|
||||
@@ -488,11 +506,51 @@ sub parse_input_ppp
|
||||
}
|
||||
}
|
||||
|
||||
sub print_yaag_weekday_row
|
||||
{
|
||||
my ($cal) = @_;
|
||||
print "<tr class=\"rem-yaag-weekday-row\">";
|
||||
print "<th class=\"rem-yaag-empty-header\"> </th>";
|
||||
my $ex;
|
||||
for (my $i=0; $i<37; $i++) {
|
||||
my $day;
|
||||
if ($cal->{mondayfirst}) {
|
||||
$day = $cal->{daynames}->[($i+1) % 7];
|
||||
} else {
|
||||
$day = $cal->{daynames}->[$i % 7];
|
||||
}
|
||||
if (($i % 7) == 6) {
|
||||
$ex = " rem-yaag-end-of-week";
|
||||
} else {
|
||||
$ex = "";
|
||||
}
|
||||
print "<th class=\"rem-yaag-weekday-header$ex\">$day</th>";
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
sub emit_ppp_calendars
|
||||
{
|
||||
my ($array, $type) = @_;
|
||||
my $prev_year = 0;
|
||||
my $done_one = 0;
|
||||
foreach my $cal (@$array) {
|
||||
if ($Options{yaag}) {
|
||||
if ($cal->{year} != $prev_year) {
|
||||
$prev_year = $cal->{year};
|
||||
if ($done_one) {
|
||||
print "</table>\n";
|
||||
}
|
||||
print "<span class=\"year_heading\">$prev_year</span>\n";
|
||||
print "<table class=\"rem-yaag\">\n";
|
||||
print_yaag_weekday_row($cal);
|
||||
}
|
||||
}
|
||||
emit_one_ppp_calendar($cal, $type);
|
||||
$done_one = 1;
|
||||
}
|
||||
if ($done_one) {
|
||||
print "</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,42 +824,79 @@ sub output_calendar
|
||||
|
||||
# Start the table
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
print '<table width="100%" border="1" cellspacing=\"0\"><caption>' .
|
||||
$Month . ' ' . $Year . '</caption>' . "\n";
|
||||
print '<tr>';
|
||||
$class = ' width="14%"';
|
||||
} else {
|
||||
if ($type eq 'monthly') {
|
||||
print '<table class="rem-cal"><caption class="rem-cal-caption">' .
|
||||
$Month . ' ' . $Year . '</caption>' . "\n";
|
||||
if (!$Options{yaag}) {
|
||||
if ($Options{nostyle}) {
|
||||
print '<table width="100%" border="1" cellspacing="0">';
|
||||
if ($type eq 'monthly') {
|
||||
print "<caption>$Month $Year </caption>";
|
||||
}
|
||||
print "\n<tr>";
|
||||
$class = ' width="14%"';
|
||||
} else {
|
||||
print '<table class="rem-cal">' . "\n";
|
||||
if ($type eq 'monthly') {
|
||||
print '<table class="rem-cal"><caption class="rem-cal-caption">' .
|
||||
$Month . ' ' . $Year . '</caption>' . "\n";
|
||||
} else {
|
||||
print '<table class="rem-cal">' . "\n";
|
||||
}
|
||||
print '<tr class="rem-cal-hdr-row">';
|
||||
$class = ' class="rem-cal-hdr"';
|
||||
}
|
||||
print '<tr class="rem-cal-hdr-row">';
|
||||
$class = ' class="rem-cal-hdr"';
|
||||
}
|
||||
if ($type eq 'monthly') {
|
||||
if (!$Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
if ($type eq 'monthly') {
|
||||
if (!$Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
}
|
||||
for (my $i=1; $i<7; $i++) {
|
||||
print "<th$class>" . $Daynames[$i] . '</th>';
|
||||
}
|
||||
if ($Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
}
|
||||
} else {
|
||||
for (my $i=0; $i<7; $i++) {
|
||||
my $inf = $date_info->[$i];
|
||||
print "<th$class>" . $inf->{dayname} . "<br>" .
|
||||
$inf->{day} . ' ' .
|
||||
$inf->{month} . ' ' .
|
||||
$inf->{year} . '</th>';
|
||||
}
|
||||
}
|
||||
for (my $i=1; $i<7; $i++) {
|
||||
print "<th$class>" . $Daynames[$i] . '</th>';
|
||||
}
|
||||
if ($Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
}
|
||||
} else {
|
||||
for (my $i=0; $i<7; $i++) {
|
||||
my $inf = $date_info->[$i];
|
||||
print "<th$class>" . $inf->{dayname} . "<br>" .
|
||||
$inf->{day} . ' ' .
|
||||
$inf->{month} . ' ' .
|
||||
$inf->{year} . '</th>';
|
||||
}
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
print "</tr>\n";
|
||||
} else {
|
||||
# For year-at-a-glance calendar, it's just a row
|
||||
print '<tr class="rem-yaag-cal-row">';
|
||||
print '<th class="rem-yaag-cal-hdr">' . $Month . "</th>\n";
|
||||
|
||||
my $cells_drawn = 0;
|
||||
# Print the blank ones
|
||||
for (my $i=0; $i<$first_col; $i++) {
|
||||
print "<td class=\"rem-yaag-cal-blank\"> </td>";
|
||||
$cells_drawn++;
|
||||
}
|
||||
|
||||
# All the entries
|
||||
for (my $day=1; $day <= $Numdays; $day++) {
|
||||
if (($cells_drawn % 7) == 6) {
|
||||
draw_day_cell($day, 1, $type, ' rem-yaag-end-of-week');
|
||||
} else {
|
||||
draw_day_cell($day, 1, $type);
|
||||
}
|
||||
$cells_drawn++;
|
||||
}
|
||||
|
||||
# And fill in the remaining ones
|
||||
while ($cells_drawn < 37) {
|
||||
if (($cells_drawn % 7) == 6) {
|
||||
print "<td class=\"rem-yaag-cal-blank rem-yaag-end-of-week\"> </td>";
|
||||
} else {
|
||||
print "<td class=\"rem-yaag-cal-blank\"> </td>";
|
||||
}
|
||||
$cells_drawn++;
|
||||
}
|
||||
print "</tr>\n";
|
||||
return;
|
||||
}
|
||||
# Start the calendar rows
|
||||
my $col = 0;
|
||||
if ($Options{nostyle}) {
|
||||
@@ -895,9 +990,10 @@ sub output_calendar
|
||||
|
||||
sub draw_day_cell
|
||||
{
|
||||
my($day, $number_of_rows, $type) = @_;
|
||||
my($day, $number_of_rows, $type, $extra_class) = @_;
|
||||
my $shade = $shades->[$day];
|
||||
my $week = '';
|
||||
$extra_class = '' unless defined($extra_class);
|
||||
if (exists($weeks->{$day})) {
|
||||
if ($weeks->{$day}->{url}) {
|
||||
$week = ' <a href="' . $weeks->{$day}->{url} . '">' . escape_html($weeks->{$day}->{body}) . '</a>';
|
||||
@@ -905,19 +1001,22 @@ sub draw_day_cell
|
||||
$week = ' ' . escape_html($weeks->{$day}->{body});
|
||||
}
|
||||
}
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
$class = $classes->[$day] || '';
|
||||
} else {
|
||||
$class = $classes->[$day] || "rem-cell rem-cell-$number_of_rows-rows";
|
||||
my $class = $classes->[$day] || '';
|
||||
if (!$Options{nostyle}) {
|
||||
$class .= ' ' if $class ne '';
|
||||
if ($Options{yaag}) {
|
||||
$class .= "rem-yaag-cell"
|
||||
} else {
|
||||
$class .= "rem-cell rem-cell-$number_of_rows-rows";
|
||||
}
|
||||
}
|
||||
if ($shade) {
|
||||
$shade = " style=\"background: $shade;\"";
|
||||
} else {
|
||||
$shade = "";
|
||||
}
|
||||
if ($class ne '') {
|
||||
print "<td class=\"$class\"$shade>\n";
|
||||
if ($class ne '' || $extra_class ne '') {
|
||||
print "<td class=\"$class$extra_class\"$shade>\n";
|
||||
} else {
|
||||
print "<td valign=\"top\" $shade>\n";
|
||||
}
|
||||
@@ -982,7 +1081,11 @@ sub draw_day_cell
|
||||
print "<div style=\"float: right\">$day$week</div>\n";
|
||||
print "<p> </p>\n";
|
||||
} else {
|
||||
print "<div class=\"rem-daynumber\">$day$week</div>\n";
|
||||
if ($Options{yaag}) {
|
||||
print "<div class=\"rem-yaag-daynumber\">$day$week</div>\n";
|
||||
} else {
|
||||
print "<div class=\"rem-daynumber\">$day$week</div>\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($Options{nostyle}) {
|
||||
@@ -1016,7 +1119,7 @@ if ($Options{help}) {
|
||||
system("perldoc $0");
|
||||
exit(0);
|
||||
} elsif ($Options{version}) {
|
||||
print "rem2html version $rem2html_version.\n";
|
||||
print "rem2html version $rem2html_version\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -1048,6 +1151,11 @@ table.rem-cal {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
span.year_heading {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 28pt;
|
||||
}
|
||||
|
||||
table.rem-sc-table {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
@@ -1073,14 +1181,6 @@ td.rem-empty, td.rem-cell, td.rem-small-calendar {
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.rem-today {
|
||||
width: 14%;
|
||||
height: 7em;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #EE3333;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.rem-cal {
|
||||
width: 100%;
|
||||
@@ -1116,5 +1216,84 @@ td.rem-sc-empty-cell, td.rem-sc-cell {
|
||||
caption.rem-sc-caption {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
table.rem-yaag {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 8pt;
|
||||
table-layout: fixed;
|
||||
cellspacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td.rem-yaag-cell {
|
||||
height: 7em;
|
||||
border-style: solid;
|
||||
border-color: #adadad;
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th.rem-yaag-weekday-header {
|
||||
font-weight: 100;
|
||||
font-size: 9pt;
|
||||
padding: 6px 0 0 6px;
|
||||
text-align:left;
|
||||
border-style: solid;
|
||||
border-color: #adadad;
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td.rem-yaag-cal-blank {
|
||||
height: 7em;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #adadad;
|
||||
background-color: #d5d6d5;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td.rem-yaag-end-of-week {
|
||||
border-right-width: 3;
|
||||
}
|
||||
|
||||
th.rem-yaag-end-of-week {
|
||||
border-right-width: 3;
|
||||
}
|
||||
|
||||
th.rem-yaag-cal-hdr {
|
||||
text-align: right;
|
||||
padding-top: 8px;
|
||||
padding-right: 5px;
|
||||
font-weight: 100;
|
||||
font-size: 9pt;
|
||||
border-style: solid;
|
||||
border-color: #adadad;
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.rem-yaag-daynumber {
|
||||
float: right;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
tr.rem-yaag-cal-row:nth-child(3n+1) {
|
||||
border-bottom: 3px solid #000;
|
||||
}
|
||||
|
||||
.rem-yaag-weekday-row .rem-yaag-empty-header {
|
||||
height: 20pt;
|
||||
width: 70px !important;
|
||||
}
|
||||
|
||||
td.rem-today {
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #EE3333;
|
||||
}
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ my $media_to_size = {
|
||||
};
|
||||
|
||||
my $help = 0;
|
||||
my $version = 0;
|
||||
|
||||
my $settings = {
|
||||
landscape => 0,
|
||||
@@ -41,7 +42,7 @@ my $settings = {
|
||||
media => 'Letter',
|
||||
width => 0,
|
||||
height => 0,
|
||||
|
||||
avoid_overfull_boxes => 0,
|
||||
title_font => 'Sans',
|
||||
header_font => 'Sans',
|
||||
daynum_font => 'Sans Bold Oblique',
|
||||
@@ -55,6 +56,7 @@ my $settings = {
|
||||
entry_size => 8,
|
||||
|
||||
border_size => 4,
|
||||
entry_spacing => -1,
|
||||
line_thickness => 1,
|
||||
|
||||
margin_top => 36,
|
||||
@@ -95,6 +97,7 @@ Options:
|
||||
--ps Output PostScript instead of PDF
|
||||
--eps Output encapsulated PostScript instead of PDF
|
||||
-cN Synonym for --small-calendars=N
|
||||
--avoid-overfull Shrink font size to avoid over-full boxes. Implies -e
|
||||
--left-numbers, -x Print day numbers on the left (monthly calendars only)
|
||||
--fill-page, -e Fill the entire page (monthly calendars only)
|
||||
--media=MEDIA, -mMEDIA Size for specified media
|
||||
@@ -111,6 +114,7 @@ Options:
|
||||
--header-size=S Specify size of font for weekday names
|
||||
--daynum-size=S Specify size of font for day numbers
|
||||
--entry-size=S Specify size of font for calendar entries
|
||||
--entry-spacing=S Specify extra spacing between calendar entries
|
||||
--border-size=S Specify size of gaps between items in 1/72nds of an inch
|
||||
--line-thickness=S Specify line thickness in 1/72nds of an inch
|
||||
--margin-top=S Specify top margin size in 1/72nds of an inch
|
||||
@@ -126,6 +130,7 @@ Options:
|
||||
--title-url=URL Link calendar title to URL
|
||||
--verbose, -v Print progress messages
|
||||
--help Display this help
|
||||
--version Print version and exit
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -137,6 +142,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
|
||||
'svg' => \$settings->{svg},
|
||||
'ps' => \$settings->{ps},
|
||||
'eps' => \$settings->{eps},
|
||||
'avoid-overfull' => \$settings->{avoid_overfull_boxes},
|
||||
'fill-page|e' => \$settings->{fill_entire_page},
|
||||
'weeks-per-page|p=i' => \$settings->{weeks_per_page},
|
||||
'media|m=s' => \$settings->{media},
|
||||
@@ -153,6 +159,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
|
||||
'header-size=f' => \$settings->{header_size},
|
||||
'daynum-size=f' => \$settings->{daynum_size},
|
||||
'entry-size=f' => \$settings->{entry_size},
|
||||
'entry-spacing=f' => \$settings->{entry_spacing},
|
||||
'border-size=f' => \$settings->{border_size},
|
||||
'line-thickness=f' => \$settings->{line_thickness},
|
||||
'margin-top=f' => \$settings->{margin_top},
|
||||
@@ -166,6 +173,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape},
|
||||
'header-color=s' => \$settings->{header_color},
|
||||
'daynum-color=s' => \$settings->{daynum_color},
|
||||
'smallcal-color=s' => \$settings->{smallcal_color},
|
||||
'version' => \$version,
|
||||
'help' => \$help
|
||||
);
|
||||
if (!$ret) {
|
||||
@@ -178,6 +186,20 @@ if ($help) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($version) {
|
||||
print "rem2pdf version $VERSION\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($settings->{entry_spacing} < 0) {
|
||||
$settings->{entry_spacing} = 0.5 * $settings->{border_size};
|
||||
}
|
||||
|
||||
|
||||
if ($settings->{avoid_overfull_boxes}) {
|
||||
$settings->{fill_entire_page} = 1;
|
||||
}
|
||||
|
||||
my $bad = 0;
|
||||
foreach my $setting (qw(bg_color line_color title_color header_color daynum_color smallcal_color)) {
|
||||
my $c = $settings->{$setting};
|
||||
@@ -280,6 +302,9 @@ if ($settings->{svg}) {
|
||||
$settings->{width}, $settings->{height});
|
||||
}
|
||||
|
||||
# Save original entry size
|
||||
$settings->{original_entry_size} = $settings->{entry_size};
|
||||
|
||||
# set_metadata not available in older versions of Cairo
|
||||
eval { $surface->set_metadata('title', 'Calendar'); };
|
||||
eval { $surface->set_metadata('author', 'Remind (https://dianne.skoll.ca/projects/remind/)'); };
|
||||
@@ -473,6 +498,12 @@ the default top-right.
|
||||
|
||||
Make the calendar fill the available space on the page.
|
||||
|
||||
=item --avoid-overfull
|
||||
|
||||
If a calendar box is going to overflow, try to make the entries fit by
|
||||
decreasing the font size. Using the --avoid-overfull option automatically
|
||||
enables the --fill-page option.
|
||||
|
||||
=item --media=I<media>, -mI<media>
|
||||
|
||||
Specify the paper size (Letter, A4, etc.) For a list of valid media sizes,
|
||||
@@ -541,6 +572,12 @@ Specify the size of the blank border between the contents of a calendar
|
||||
box and the centre of the lines surrounding it, in 1/72ndths of an inch.
|
||||
The default is 4.
|
||||
|
||||
=item --entry-spacing=I<n>
|
||||
|
||||
Specify the amount of extra space, in 1/72ndths of an inch, to leave
|
||||
between calendar entries in a given calendar box. The default is
|
||||
one-half of the --border-size value.
|
||||
|
||||
=item --line-thickness=I<n>
|
||||
|
||||
Specify the thickness of the lines drawn on the calendar. The default is 1.
|
||||
@@ -620,6 +657,14 @@ to print per page; it is an integer that can range from 1 to 4.
|
||||
Print (on STDERR) the name of the month and year for each month that
|
||||
is rendered.
|
||||
|
||||
=item --version
|
||||
|
||||
Print the version of rem2pdf and exit.
|
||||
|
||||
=item --help
|
||||
|
||||
Print a brief summary of rem2pdf usage.
|
||||
|
||||
=back
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
@@ -608,7 +608,28 @@ sub draw_row
|
||||
for (my $col=0; $col<7; $col++) {
|
||||
my $day = $self->{daymap}->[$row]->[$col];
|
||||
next if ($day < 1);
|
||||
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
|
||||
if ($settings->{avoid_overfull_boxes}) {
|
||||
my $old_entry_size = $settings->{entry_size};
|
||||
my $old_spacing = $settings->{entry_spacing};
|
||||
my $drawn = 0;
|
||||
while ($settings->{entry_size} >= 2.0) {
|
||||
my $h = $self->draw_day($cr, $settings, $so_far, $day, $col, 0);
|
||||
if ($h <= $height) {
|
||||
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
|
||||
$drawn = 1;
|
||||
last;
|
||||
}
|
||||
$settings->{entry_size} -= 0.125;
|
||||
$settings->{entry_spacing} = $old_spacing * $settings->{entry_size} / $old_entry_size;
|
||||
}
|
||||
if (!$drawn) {
|
||||
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
|
||||
}
|
||||
$settings->{entry_size} = $old_entry_size;
|
||||
$settings->{entry_spacing} = $old_spacing;
|
||||
} else {
|
||||
$self->draw_day($cr, $settings, $so_far, $day, $col, $height);
|
||||
}
|
||||
}
|
||||
|
||||
return $so_far + $height + $settings->{border_size} * 2;
|
||||
@@ -717,8 +738,8 @@ sub draw_day
|
||||
next;
|
||||
}
|
||||
if ($done) {
|
||||
$so_far += $settings->{border_size};
|
||||
$entry_height += $settings->{border_size};
|
||||
$so_far += $settings->{entry_spacing};
|
||||
$entry_height += $settings->{entry_spacing};
|
||||
}
|
||||
$done = 1;
|
||||
my $h2 = $entry->render($self, $cr, $settings, $so_far, $day, $col, $height);
|
||||
|
||||
@@ -146,7 +146,7 @@ sub render
|
||||
my $layout = Pango::Cairo::create_layout($cr);
|
||||
|
||||
$layout->set_text(Encode::decode('UTF-8', $self->{body}));
|
||||
my $desc = Pango::FontDescription->from_string($settings->{entry_font} . ' ' . int(0.75 * $settings->{entry_size}) . 'px');
|
||||
my $desc = Pango::FontDescription->from_string($settings->{entry_font} . ' ' . int(0.75 * $settings->{original_entry_size}) . 'px');
|
||||
$layout->set_font_description($desc);
|
||||
my ($wid, $h) = $layout->get_pixel_size();
|
||||
|
||||
@@ -197,7 +197,7 @@ sub render
|
||||
my $layout;
|
||||
my $bodywidth = 0;
|
||||
if ($self->{fontsize} <= 0) {
|
||||
$self->{fontsize} = $settings->{entry_size};
|
||||
$self->{fontsize} = $settings->{original_entry_size};
|
||||
}
|
||||
if ($self->{size} <= 0) {
|
||||
$self->{size} = $settings->{daynum_size};
|
||||
|
||||
@@ -342,6 +342,9 @@ set Option(PrintOrient) landscape
|
||||
set OptDescr(PrintFill) "(0/1) If 1, fill entire page when printing"
|
||||
set Option(PrintFill) 1
|
||||
|
||||
set OptDescr(PrintAvoidOverfull) "(0/1) If 1, avoid over-full calendar boxes if possible"
|
||||
set Option(PrintAvoidOverfull) 0
|
||||
|
||||
set OptDescr(WrapCal) "(0/1) If 1, make printed calendars occupy at most 5 rows"
|
||||
set Option(WrapCal) 0
|
||||
|
||||
@@ -442,6 +445,10 @@ proc Initialize {} {
|
||||
set PSCmd "$Remind -itkremind=1 -itkprint=1 -pp%WEEKS% -l %EXTRA%"
|
||||
set i 0
|
||||
while {$i < $argc} {
|
||||
if {"[lindex $argv $i]" == "--version"} {
|
||||
puts "tkremind version @VERSION@"
|
||||
exit 0
|
||||
}
|
||||
if {[regexp -- {-[bgxim].*} [lindex $argv $i]]} {
|
||||
append CommandLine " [lindex $argv $i]"
|
||||
append PSCmd " [lindex $argv $i]"
|
||||
@@ -1754,7 +1761,8 @@ proc DoPrintHelper {} {
|
||||
radiobutton .p.landscape -text "Landscape" -variable Option(PrintOrient) -value landscape
|
||||
radiobutton .p.portrait -text "Portrait" -variable Option(PrintOrient) -value portrait
|
||||
|
||||
checkbutton .p.fill -text "Fill page" -variable Option(PrintFill)
|
||||
checkbutton .p.fill -text "Fill page" -variable Option(PrintFill) -command PrintFillButtonPressed
|
||||
checkbutton .p.avoid -text "Avoid over-full boxes" -variable Option(PrintAvoidOverfull) -command PrintAvoidOverfullButtonPressed
|
||||
checkbutton .p.wrap -text "Use at most 5 rows" -variable Option(WrapCal)
|
||||
checkbutton .p.right -text "Day numbers at top-right" -variable Option(PrintDaysRight)
|
||||
checkbutton .p.calendars -text "Print small calendars" -variable Option(PrintSmallCalendars)
|
||||
@@ -1766,7 +1774,7 @@ proc DoPrintHelper {} {
|
||||
wm protocol .p WM_DELETE_WINDOW { .p.cancel flash; .p.cancel invoke }
|
||||
pack .p.f1 .p.ff .p.f2 .p.f2a .p.f3 .p.f3a \
|
||||
-side top -fill both -expand 1 -anchor w
|
||||
pack .p.fill .p.wrap .p.right .p.calendars -in .p.f3a \
|
||||
pack .p.fill .p.avoid .p.wrap .p.right .p.calendars -in .p.f3a \
|
||||
-side top -anchor w -fill none -expand 0
|
||||
pack .p.f4 -side top -fill both -expand 1 -anchor w
|
||||
pack .p.f11 .p.f12 -in .p.f1 -side top -fill none -expand 0 -anchor w
|
||||
@@ -1857,6 +1865,9 @@ proc DoPrintHelper {} {
|
||||
append cmd " -e"
|
||||
}
|
||||
|
||||
if {$Option(PrintAvoidOverfull)} {
|
||||
append cmd " --avoid-overfull"
|
||||
}
|
||||
if {!$Option(PrintDaysRight)} {
|
||||
append cmd " -x"
|
||||
}
|
||||
@@ -1879,6 +1890,19 @@ proc DoPrintHelper {} {
|
||||
}
|
||||
}
|
||||
|
||||
proc PrintFillButtonPressed {} {
|
||||
global Option
|
||||
if { ! $Option(PrintFill) && $Option(PrintAvoidOverfull) } {
|
||||
set Option(PrintAvoidOverfull) 0
|
||||
}
|
||||
}
|
||||
|
||||
proc PrintAvoidOverfullButtonPressed {} {
|
||||
global Option
|
||||
if { ! $Option(PrintFill) && $Option(PrintAvoidOverfull) } {
|
||||
set Option(PrintFill) 1
|
||||
}
|
||||
}
|
||||
proc ShowPrintCommand { cmd } {
|
||||
global Option
|
||||
catch { destroy .pc }
|
||||
@@ -3602,11 +3626,11 @@ proc main {} {
|
||||
font create BoldFont {*}[font actual TkDefaultFont] -weight bold
|
||||
|
||||
global AppendFile HighestTagSoFar DayNames
|
||||
catch { SetFonts }
|
||||
Initialize
|
||||
catch {
|
||||
puts "\nTkRemind Copyright (C) 1996-2026 Dianne Skoll"
|
||||
}
|
||||
catch { SetFonts }
|
||||
Initialize
|
||||
|
||||
# If no $ConfigFile file, create an empty one
|
||||
if {![file exists $ConfigFile]} {
|
||||
|
||||
@@ -80,6 +80,8 @@ install: all
|
||||
$(INSTALL_DATA) $$man $(DESTDIR)$(mandir)/man1 || exit 1; \
|
||||
done
|
||||
-mkdir -p $(DESTDIR)$(datarootdir)/remind || true
|
||||
# Avoid problems with symlinks under holidays/
|
||||
-rm -rf $(DESTDIR)$(datarootdir)/remind/holidays > /dev/null 2>&1 || true
|
||||
cp -R ../include/* $(DESTDIR)$(datarootdir)/remind
|
||||
chmod -R a+rX $(DESTDIR)$(datarootdir)/remind
|
||||
-mkdir -p $(DESTDIR)$(prefix)/share/pixmaps
|
||||
|
||||
@@ -2123,8 +2123,9 @@ static int DoCalRem(ParsePtr p, int col)
|
||||
}
|
||||
}
|
||||
if (trig.typ == PASSTHRU_TYPE) {
|
||||
if (!PsCal && !strcasecmp(trig.passthru, "SHADE")) {
|
||||
if (dse == DSEToday) {
|
||||
if (!strcasecmp(trig.passthru, "SHADE") && dse == DSEToday) {
|
||||
Shaded++;
|
||||
if (!PsCal) {
|
||||
DBufInit(&obuf);
|
||||
r = DoSubst(p, &obuf, &trig, &tim, dse, CAL_MODE);
|
||||
if (r) {
|
||||
@@ -2549,7 +2550,7 @@ void WriteJSONTrigger(Trigger const *t, int include_tags)
|
||||
PrintJSONKeyPairInt("rep", t->rep);
|
||||
}
|
||||
if (t->d != NO_DAY && t->m != NO_MON && t->y != NO_YR) {
|
||||
printf("\"trigbase\":\"%04d-%02d-%-2d\",",
|
||||
printf("\"trigbase\":\"%04d-%02d-%02d\",",
|
||||
t->y, t->m+1, t->d);
|
||||
}
|
||||
/* Local omit is an array of days from 0=monday to 6=sunday.
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
#define E_EXPR_NODES_EXCEEDED 114
|
||||
#define E_EXPECTING_EOXPR 115
|
||||
#define E_EXPECTING_ATOM 116
|
||||
#define E_BAD_VAL_FOR_SYSVAR 117
|
||||
|
||||
#ifdef MK_GLOBALS
|
||||
#undef EXTERN
|
||||
@@ -272,6 +273,7 @@ EXTERN char *ErrMsg[]
|
||||
/* E_EXPR_NODES_EXCEEDED */ "Maximum expression complexity exceeded",
|
||||
/* E_EXPECTING_EOXPR */ "Expecting operator or end-of-expression",
|
||||
/* E_EXPECTING_ATOM */ "Expecting constant, variable, function call or (expression)",
|
||||
/* E_BAD_VAL_FOR_SYSVAR */ "Invalid value for system variable",
|
||||
}
|
||||
#endif /* MK_GLOBALS */
|
||||
;
|
||||
|
||||
94
src/expr.c
94
src/expr.c
@@ -242,6 +242,31 @@ find_end_of_expr(char const *s)
|
||||
return e;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* node_str - get string associated with a node */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static char const *
|
||||
node_str(expr_node const *node)
|
||||
{
|
||||
switch(node->type) {
|
||||
case N_VARIABLE:
|
||||
case N_SYSVAR:
|
||||
case N_USER_FUNC:
|
||||
return node->u.value.v.str;
|
||||
|
||||
case N_SHORT_VAR:
|
||||
case N_SHORT_SYSVAR:
|
||||
case N_SHORT_USER_FUNC:
|
||||
case N_SHORT_STR:
|
||||
return node->u.name;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* alloc_expr_node - allocate an expr_node object */
|
||||
@@ -418,11 +443,7 @@ get_var(expr_node *node, Value *ans, int *nonconst)
|
||||
Var *v;
|
||||
char const *str;
|
||||
|
||||
if (node->type == N_SHORT_VAR) {
|
||||
str = node->u.name;
|
||||
} else {
|
||||
str = node->u.value.v.str;
|
||||
}
|
||||
str = node_str(node);
|
||||
v = FindVar(str, 0);
|
||||
if (!v) {
|
||||
Eprint("%s: `%s'", GetErr(E_NOSUCH_VAR), str);
|
||||
@@ -448,11 +469,7 @@ get_var(expr_node *node, Value *ans, int *nonconst)
|
||||
static int
|
||||
get_sysvar(expr_node const *node, Value *ans)
|
||||
{
|
||||
if (node->type == N_SHORT_SYSVAR) {
|
||||
return GetSysVar(node->u.name, ans);
|
||||
} else {
|
||||
return GetSysVar(node->u.value.v.str, ans);
|
||||
}
|
||||
return GetSysVar(node_str(node), ans);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -619,13 +636,9 @@ eval_builtin(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
static void
|
||||
debug_enter_userfunc(expr_node *node, Value *locals, int nargs)
|
||||
{
|
||||
char const *fname;
|
||||
int i;
|
||||
if (node->type == N_SHORT_USER_FUNC) {
|
||||
fname = node->u.name;
|
||||
} else {
|
||||
fname = node->u.value.v.str;
|
||||
}
|
||||
char const *fname = node_str(node);
|
||||
|
||||
fprintf(ErrFp, "%s %s(", GetErr(E_ENTER_FUN), fname);
|
||||
for (i=0; i<nargs; i++) {
|
||||
if (i) fprintf(ErrFp, ", ");
|
||||
@@ -645,13 +658,9 @@ debug_enter_userfunc(expr_node *node, Value *locals, int nargs)
|
||||
static void
|
||||
debug_exit_userfunc(expr_node *node, Value const *ans, int r, Value *locals, int nargs)
|
||||
{
|
||||
char const *fname;
|
||||
char const *fname = node_str(node);
|
||||
int i;
|
||||
if (node->type == N_SHORT_USER_FUNC) {
|
||||
fname = node->u.name;
|
||||
} else {
|
||||
fname = node->u.value.v.str;
|
||||
}
|
||||
|
||||
fprintf(ErrFp, "%s %s(", GetErr(E_LEAVE_FUN), fname);
|
||||
for (i=0; i<nargs; i++) {
|
||||
if (i) fprintf(ErrFp, ", ");
|
||||
@@ -702,12 +711,7 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
Value stack_locals[STACK_ARGS_MAX];
|
||||
|
||||
/* Get the function name */
|
||||
char const *fname;
|
||||
if (node->type == N_SHORT_USER_FUNC) {
|
||||
fname = node->u.name;
|
||||
} else {
|
||||
fname = node->u.value.v.str;
|
||||
}
|
||||
char const *fname = node_str(node);
|
||||
|
||||
/* Find the function */
|
||||
f = FindUserFunc(fname);
|
||||
@@ -913,13 +917,9 @@ evaluate_expr_node(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
return CopyValue(ans, &(node->u.value));
|
||||
|
||||
case N_SHORT_VAR:
|
||||
r = get_var(node, ans, nonconst);
|
||||
DBG(debug_evaluation(ans, r, "%s", node->u.name));
|
||||
return r;
|
||||
|
||||
case N_VARIABLE:
|
||||
r = get_var(node, ans, nonconst);
|
||||
DBG(debug_evaluation(ans, r, "%s", node->u.value.v.str));
|
||||
DBG(debug_evaluation(ans, r, "%s", node_str(node)));
|
||||
return r;
|
||||
|
||||
case N_LOCAL_VAR:
|
||||
@@ -929,19 +929,12 @@ evaluate_expr_node(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
return r;
|
||||
|
||||
case N_SHORT_SYSVAR:
|
||||
/* System var? Return it and note non-constant expression */
|
||||
nonconst_debug(*nonconst, tr("System variable `$%s' makes expression non-constant"), node->u.name);
|
||||
*nonconst = 1;
|
||||
r = get_sysvar(node, ans);
|
||||
DBG(debug_evaluation(ans, r, "$%s", node->u.name));
|
||||
return r;
|
||||
|
||||
case N_SYSVAR:
|
||||
/* System var? Return it and note non-constant expression */
|
||||
nonconst_debug(*nonconst, tr("System variable `$%s' makes expression non-constant"), node->u.value.v.str);
|
||||
nonconst_debug(*nonconst, tr("System variable `$%s' makes expression non-constant"), node_str(node));
|
||||
*nonconst = 1;
|
||||
r = get_sysvar(node, ans);
|
||||
DBG(debug_evaluation(ans, r, "$%s", node->u.value.v.str));
|
||||
DBG(debug_evaluation(ans, r, "$%s", node_str(node)));
|
||||
return r;
|
||||
|
||||
case N_BUILTIN_FUNC:
|
||||
@@ -952,8 +945,8 @@ evaluate_expr_node(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
}
|
||||
return eval_builtin(node, locals, ans, nonconst);
|
||||
|
||||
case N_USER_FUNC:
|
||||
case N_SHORT_USER_FUNC:
|
||||
case N_USER_FUNC:
|
||||
/* User-defined function? Evaluate it */
|
||||
return eval_userfunc(node, locals, ans, nonconst);
|
||||
|
||||
@@ -2869,16 +2862,12 @@ static void print_expr_tree(expr_node *node, FILE *fp)
|
||||
fprintf(fp, "\"%s\"", node->u.name);
|
||||
return;
|
||||
case N_SHORT_VAR:
|
||||
fprintf(fp, "%s", node->u.name);
|
||||
return;
|
||||
case N_VARIABLE:
|
||||
fprintf(fp, "%s", node->u.value.v.str);
|
||||
fprintf(fp, "%s", node_str(node));
|
||||
return;
|
||||
case N_SHORT_SYSVAR:
|
||||
fprintf(fp, "$%s", node->u.name);
|
||||
return;
|
||||
case N_SYSVAR:
|
||||
fprintf(fp, "$%s", node->u.value.v.str);
|
||||
fprintf(fp, "$%s", node_str(node));
|
||||
return;
|
||||
case N_LOCAL_VAR:
|
||||
fprintf(fp, "arg[%d]", node->u.arg);
|
||||
@@ -2892,13 +2881,8 @@ static void print_expr_tree(expr_node *node, FILE *fp)
|
||||
fprintf(fp, ")");
|
||||
return;
|
||||
case N_SHORT_USER_FUNC:
|
||||
fprintf(fp, "(%s", node->u.name);
|
||||
if (node->child) fprintf(fp, " ");
|
||||
print_kids(node, fp);
|
||||
fprintf(fp, ")");
|
||||
return;
|
||||
case N_USER_FUNC:
|
||||
fprintf(fp, "(%s", node->u.value.v.str);
|
||||
fprintf(fp, "(%s", node_str(node));
|
||||
if (node->child) fprintf(fp, " ");
|
||||
print_kids(node, fp);
|
||||
fprintf(fp, ")");
|
||||
|
||||
57
src/funcs.c
57
src/funcs.c
@@ -140,9 +140,11 @@ static int FLower (func_info *);
|
||||
static int FMax (func_info *);
|
||||
static int FMbchar (func_info *);
|
||||
static int FMbindex (func_info *);
|
||||
static int FMblower (func_info *);
|
||||
static int FMbpad (func_info *);
|
||||
static int FMbstrlen (func_info *);
|
||||
static int FMbsubstr (func_info *);
|
||||
static int FMbupper (func_info *);
|
||||
static int FMin (func_info *);
|
||||
static int FMinsfromutc (func_info *);
|
||||
static int FMinute (func_info *);
|
||||
@@ -327,9 +329,11 @@ BuiltinFunc Func[] = {
|
||||
{ "max", 1, NO_MAX, 1, FMax, NULL },
|
||||
{ "mbchar", 1, NO_MAX, 1, FMbchar, NULL },
|
||||
{ "mbindex", 2, 3, 1, FMbindex, NULL },
|
||||
{ "mblower", 1, 1, 1, FMblower, NULL },
|
||||
{ "mbpad", 3, 4, 1, FMbpad, NULL },
|
||||
{ "mbstrlen", 1, 1, 1, FMbstrlen, NULL },
|
||||
{ "mbsubstr", 2, 3, 1, FMbsubstr, NULL },
|
||||
{ "mbupper", 1, 1, 1, FMbupper, NULL },
|
||||
{ "min", 1, NO_MAX, 1, FMin, NULL },
|
||||
{ "minsfromutc", 0, 2, 0, FMinsfromutc, NULL },
|
||||
{ "minute", 1, 1, 1, FMinute, NULL },
|
||||
@@ -4723,6 +4727,7 @@ FEvalTrig(func_info *info)
|
||||
return r;
|
||||
}
|
||||
if (trig.tz != NULL && tim.ttime == NO_TIME) {
|
||||
DestroyParser(&p);
|
||||
FreeTrig(&trig);
|
||||
return E_TZ_NO_AT;
|
||||
}
|
||||
@@ -4749,7 +4754,10 @@ FEvalTrig(func_info *info)
|
||||
dse = -1;
|
||||
}
|
||||
DestroyParser(&p);
|
||||
if (r) return r;
|
||||
if (r) {
|
||||
FreeTrig(&trig);
|
||||
return r;
|
||||
}
|
||||
if (dse < 0) {
|
||||
RetVal.type = INT_TYPE;
|
||||
RETVAL = dse;
|
||||
@@ -5173,3 +5181,50 @@ print_builtinfunc_tokens(void)
|
||||
printf("%s\n", Func[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
static int mbupper_lower(func_info *info, int upper)
|
||||
{
|
||||
wchar_t *ws;
|
||||
char *s;
|
||||
size_t i, len;
|
||||
int r;
|
||||
ASSERT_TYPE(0, STR_TYPE);
|
||||
len = mbstowcs(NULL, ARGSTR(0), 0);
|
||||
if (len == (size_t) -1) {
|
||||
return E_BAD_MB_SEQ;
|
||||
}
|
||||
ws = calloc(len+1, sizeof(wchar_t));
|
||||
if (!ws) {
|
||||
return E_NO_MEM;
|
||||
}
|
||||
(void) mbstowcs(ws, ARGSTR(0), len+1);
|
||||
for (i=0; i<len; i++) {
|
||||
if (upper) {
|
||||
ws[i] = towupper(ws[i]);
|
||||
} else {
|
||||
ws[i] = towlower(ws[i]);
|
||||
}
|
||||
}
|
||||
len = wcstombs(NULL, ws, 0);
|
||||
s = calloc(len+1, 1);
|
||||
if (!s) {
|
||||
free(ws);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
(void) wcstombs(s, ws, len+1);
|
||||
r = RetStrVal(s, info);
|
||||
free(s);
|
||||
free(ws);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int FMblower(func_info *info)
|
||||
{
|
||||
return mbupper_lower(info, 0);
|
||||
}
|
||||
|
||||
static int FMbupper(func_info *info)
|
||||
{
|
||||
return mbupper_lower(info, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ EXTERN INIT( int DefaultPrio, NO_PRIORITY);
|
||||
EXTERN INIT( int SysTime, -1);
|
||||
EXTERN INIT( int LocalSysTime, -1);
|
||||
EXTERN INIT( int ParseUntriggered, 0);
|
||||
EXTERN INIT( int Shaded, 0);
|
||||
|
||||
EXTERN char const *InitialFile;
|
||||
EXTERN char const *LocalTimeZone;
|
||||
@@ -127,7 +128,7 @@ EXTERN INIT( int DefaultColorB, -1);
|
||||
EXTERN INIT( int DefaultColorG, -1);
|
||||
EXTERN INIT( int SynthesizeTags, 0);
|
||||
EXTERN INIT( int ScFormat, SC_AMPM);
|
||||
EXTERN INIT( int MaxSatIter, 1000);
|
||||
EXTERN INIT( int MaxSatIter, 10000);
|
||||
EXTERN INIT( int MaxStringLen, MAX_STR_LEN);
|
||||
EXTERN INIT( int UseStdin, 0);
|
||||
EXTERN INIT( int PurgeMode, 0);
|
||||
@@ -174,7 +175,7 @@ EXTERN INIT( char *Location, LOCATION);
|
||||
/* Support hyperlinks in terminal emulators?
|
||||
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
|
||||
*/
|
||||
EXTERN INIT( int TerminalHyperlinks, 0);
|
||||
EXTERN INIT( int TerminalHyperlinks, -1);
|
||||
/* UTC calculation stuff */
|
||||
EXTERN INIT( int MinsFromUTC, 0);
|
||||
EXTERN INIT( int CalculateUTC, 1);
|
||||
|
||||
113
src/init.c
113
src/init.c
@@ -54,6 +54,8 @@ static int tty_init(int fd);
|
||||
static void tty_raw(int fd);
|
||||
static void tty_reset(int fd);
|
||||
|
||||
static int GetInitDateFromTrigger(char const *s, int *y, int *m, int *d, int *systime);
|
||||
|
||||
static void ProcessLongOption(char const *arg);
|
||||
/***************************************************************
|
||||
*
|
||||
@@ -183,6 +185,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
int x;
|
||||
int dse;
|
||||
int ttyfd;
|
||||
int r;
|
||||
|
||||
/* Make sure remind is not installed set-uid or set-gid */
|
||||
if (getgid() != getegid() ||
|
||||
@@ -668,6 +671,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
case 'D':
|
||||
while (*arg) {
|
||||
switch(*arg++) {
|
||||
case 'p': case 'P': DebugFlag |= DB_PUSHPOP; break;
|
||||
case 's': case 'S': DebugFlag |= DB_PARSE_EXPR; break;
|
||||
case 'h': case 'H': DebugFlag |= DB_HASHSTATS; break;
|
||||
case 'e': case 'E': DebugFlag |= DB_ECHO_LINE; break;
|
||||
@@ -739,10 +743,28 @@ void InitRemind(int argc, char const *argv[])
|
||||
if (i < argc) {
|
||||
while (i < argc) {
|
||||
arg = argv[i++];
|
||||
/* If it begins with '@' then it's a trigger spec */
|
||||
if (*arg == '@') {
|
||||
if (m != NO_MON || d != NO_DAY || y != NO_YR || dse != NO_DATE) {
|
||||
Usage();
|
||||
}
|
||||
r = GetInitDateFromTrigger(arg+1, &y, &m, &d, &SysTime);
|
||||
if (r == OK) {
|
||||
if (SysTime != -1) {
|
||||
DontQueue = 1;
|
||||
Daemon = 0;
|
||||
LocalSysTime = SysTime;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "Could not evaluate command-line trigger: %s\n", GetErr(r));
|
||||
Usage();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
FindToken(arg, &tok);
|
||||
switch (tok.type) {
|
||||
case T_Time:
|
||||
if (SysTime != -1L) Usage();
|
||||
if (SysTime != -1) Usage();
|
||||
else {
|
||||
SysTime = (long) tok.val * 60L;
|
||||
LocalSysTime = SysTime;
|
||||
@@ -752,7 +774,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
break;
|
||||
|
||||
case T_DateTime:
|
||||
if (SysTime != -1L) Usage();
|
||||
if (SysTime != -1) Usage();
|
||||
if (m != NO_MON || d != NO_DAY || y != NO_YR || dse != NO_DATE) Usage();
|
||||
SysTime = (tok.val % MINUTES_PER_DAY) * 60;
|
||||
LocalSysTime = SysTime;
|
||||
@@ -805,16 +827,13 @@ void InitRemind(int argc, char const *argv[])
|
||||
if (dse != NO_DATE) {
|
||||
FromDSE(dse, &y, &m, &d);
|
||||
}
|
||||
/* Must supply date in the form: day, mon, yr OR mon, yr */
|
||||
/* Must supply date in the form: day, mon, yr OR mon, yr */
|
||||
if (m != NO_MON || y != NO_YR || d != NO_DAY) {
|
||||
if (m == NO_MON || y == NO_YR) {
|
||||
if (rep == NO_REP) Usage();
|
||||
else if (m != NO_MON || y != NO_YR) Usage();
|
||||
else {
|
||||
m = CurMon;
|
||||
y = CurYear;
|
||||
if (d == NO_DAY) d = CurDay;
|
||||
}
|
||||
if (y == NO_YR) {
|
||||
y = CurYear;
|
||||
}
|
||||
if (m == NO_MON) {
|
||||
Usage();
|
||||
}
|
||||
if (d == NO_DAY) d=1;
|
||||
if (d > DaysInMonth(m, y)) {
|
||||
@@ -849,6 +868,15 @@ void InitRemind(int argc, char const *argv[])
|
||||
(void) CalcMinsFromUTC(DSEToday, MinutesPastMidnight(0),
|
||||
&MinsFromUTC, NULL);
|
||||
}
|
||||
|
||||
/* If stdout is a tty, enable terminal hyperlinks by default */
|
||||
if (TerminalHyperlinks == -1) {
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
TerminalHyperlinks = 1;
|
||||
} else {
|
||||
TerminalHyperlinks = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
@@ -1391,3 +1419,66 @@ GetTerminalBackground(void)
|
||||
}
|
||||
return TerminalBackground;
|
||||
}
|
||||
|
||||
static int
|
||||
GetInitDateFromTrigger(char const *s, int *y, int *m, int *d, int *systime)
|
||||
{
|
||||
Parser p;
|
||||
Trigger trig;
|
||||
TimeTrig tim;
|
||||
int dse;
|
||||
int r;
|
||||
|
||||
CreateParser(s, &p);
|
||||
r = ParseRem(&p, &trig, &tim);
|
||||
if (r) {
|
||||
DestroyParser(&p);
|
||||
return r;
|
||||
}
|
||||
if (trig.tz != NULL && tim.ttime == NO_TIME) {
|
||||
DestroyParser(&p);
|
||||
FreeTrig(&trig);
|
||||
return E_TZ_NO_AT;
|
||||
}
|
||||
if (trig.typ == SAT_TYPE) {
|
||||
EnterTimezone(trig.tz);
|
||||
r=DoSatRemind(&trig, &tim, &p);
|
||||
ExitTimezone(trig.tz);
|
||||
if (r) {
|
||||
DestroyParser(&p);
|
||||
FreeTrig(&trig);
|
||||
return r;
|
||||
}
|
||||
dse = LastTriggerDate;
|
||||
} else if (trig.typ == NO_TYPE) {
|
||||
EnterTimezone(trig.tz);
|
||||
dse = ComputeTrigger(get_scanfrom(&trig), &trig, &tim, &r, 0);
|
||||
ExitTimezone(trig.tz);
|
||||
} else {
|
||||
DestroyParser(&p);
|
||||
FreeTrig(&trig);
|
||||
return E_PARSE_ERR;
|
||||
}
|
||||
|
||||
DestroyParser(&p);
|
||||
if (r) {
|
||||
FreeTrig(&trig);
|
||||
return r;
|
||||
}
|
||||
if (dse < 0) {
|
||||
FreeTrig(&trig);
|
||||
return E_CANT_TRIG;
|
||||
}
|
||||
if (dse >= 0) {
|
||||
if (tim.ttime != NO_TIME) {
|
||||
if (*systime != -1) {
|
||||
Usage();
|
||||
}
|
||||
dse=AdjustTriggerForTimeZone(&trig, dse, &tim, 1);
|
||||
*systime = tim.ttime * 60;
|
||||
}
|
||||
FromDSE(dse, y, m, d);
|
||||
}
|
||||
FreeTrig(&trig);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -295,6 +295,7 @@ PerIterationInit(void)
|
||||
DefaultColorG = -1;
|
||||
DefaultColorB = -1;
|
||||
NumTriggered = 0;
|
||||
Shaded = 0;
|
||||
JSONLinesEmitted = 0;
|
||||
ClearLastTriggers();
|
||||
ClearDedupeTable();
|
||||
@@ -1388,6 +1389,12 @@ static int DoDebug(ParsePtr p)
|
||||
val = 0;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
case 'P':
|
||||
if (val) DebugFlag |= DB_PUSHPOP;
|
||||
else DebugFlag &= ~DB_PUSHPOP;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
if (val) DebugFlag |= DB_ECHO_LINE;
|
||||
|
||||
@@ -176,8 +176,10 @@ int PopOmitContext(ParsePtr p)
|
||||
/* Remove the context from the stack */
|
||||
SavedOmitContexts = c->next;
|
||||
|
||||
if (c->filename && fname && strcmp(c->filename, fname)) {
|
||||
Wprint(tr("POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d"), fname, LineNo, c->filename, c->lineno);
|
||||
if (DebugFlag & DB_PUSHPOP) {
|
||||
if (c->filename && fname && strcmp(c->filename, fname)) {
|
||||
Wprint(tr("POP-OMIT-CONTEXT at %s:%d matches PUSH-OMIT-CONTEXT in different file: %s:%d"), fname, LineNo, c->filename, c->lineno);
|
||||
}
|
||||
}
|
||||
/* Free memory used by the saved context */
|
||||
if (c->partsave) free(c->partsave);
|
||||
|
||||
@@ -985,6 +985,14 @@ static void Init(int argc, char const *argv[])
|
||||
|
||||
case 'e': FillPage = 1; break;
|
||||
|
||||
case '-':
|
||||
if (!strcmp(s, "version")) {
|
||||
printf("rem2ps version %s\n", VERSION);
|
||||
exit(0);
|
||||
}
|
||||
Usage("Unrecognized option");
|
||||
break;
|
||||
|
||||
default: Usage("Unrecognized option");
|
||||
}
|
||||
}
|
||||
@@ -1016,6 +1024,7 @@ void Usage(char const *s)
|
||||
fprintf(stderr, "-e Make calendar fill entire page\n");
|
||||
fprintf(stderr, "-x Put day numbers on left instead of right\n");
|
||||
fprintf(stderr, "-o[lrtb] marg Specify left, right, top and bottom margins\n");
|
||||
fprintf(stderr, "--version Print the version of rem2ps and exit\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
25
src/types.h
25
src/types.h
@@ -221,18 +221,19 @@ typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||
#define NO_MAX 127
|
||||
|
||||
/* DEFINES for debugging flags */
|
||||
#define DB_PRTLINE 0x001
|
||||
#define DB_PRTEXPR 0x002
|
||||
#define DB_PRTTRIG 0x004
|
||||
#define DB_DUMP_VARS 0x008
|
||||
#define DB_ECHO_LINE 0x010
|
||||
#define DB_TRACE_FILES 0x020
|
||||
#define DB_PARSE_EXPR 0x040
|
||||
#define DB_HASHSTATS 0x080
|
||||
#define DB_TRANSLATE 0x100
|
||||
#define DB_NONCONST 0x200
|
||||
#define DB_UNUSED_VARS 0x400
|
||||
#define DB_SWITCH_ZONE 0x800
|
||||
#define DB_PRTLINE 0x0001
|
||||
#define DB_PRTEXPR 0x0002
|
||||
#define DB_PRTTRIG 0x0004
|
||||
#define DB_DUMP_VARS 0x0008
|
||||
#define DB_ECHO_LINE 0x0010
|
||||
#define DB_TRACE_FILES 0x0020
|
||||
#define DB_PARSE_EXPR 0x0040
|
||||
#define DB_HASHSTATS 0x0080
|
||||
#define DB_TRANSLATE 0x0100
|
||||
#define DB_NONCONST 0x0200
|
||||
#define DB_UNUSED_VARS 0x0400
|
||||
#define DB_SWITCH_ZONE 0x0800
|
||||
#define DB_PUSHPOP 0x1000
|
||||
|
||||
/* Enumeration of the tokens */
|
||||
enum TokTypes
|
||||
|
||||
@@ -744,8 +744,10 @@ int PopUserFuncs(ParsePtr p)
|
||||
return E_POPF_NO_PUSH;
|
||||
}
|
||||
UserFuncStack = UserFuncStack->next;
|
||||
if (strcmp(pf->filename, GetCurrentFilename())) {
|
||||
Wprint(tr("POP-FUNCS at %s:%d matches PUSH-FUNCS in different file: %s:%d"), GetCurrentFilename(), LineNo, pf->filename, pf->lineno);
|
||||
if (DebugFlag & DB_PUSHPOP) {
|
||||
if (strcmp(pf->filename, GetCurrentFilename())) {
|
||||
Wprint(tr("POP-FUNCS at %s:%d matches PUSH-FUNCS in different file: %s:%d"), GetCurrentFilename(), LineNo, pf->filename, pf->lineno);
|
||||
}
|
||||
}
|
||||
for (i=0; i<pf->num_funcs; i++) {
|
||||
UserFunc *clone = pf->funcs[i];
|
||||
|
||||
17
src/var.c
17
src/var.c
@@ -172,7 +172,7 @@ static int latitude_longitude_func(int do_set, Value *val, double *var, double m
|
||||
} else {
|
||||
if (val->type != STR_TYPE) return E_BAD_TYPE;
|
||||
x = strtod_in_c_locale(val->v.str, &endptr);
|
||||
if (*endptr) return E_BAD_TYPE;
|
||||
if (*endptr) return E_BAD_VAL_FOR_SYSVAR;
|
||||
}
|
||||
if (x < min) return E_2LOW;
|
||||
if (x > max) return E_2HIGH;
|
||||
@@ -466,7 +466,7 @@ static int datetime_sep_func(int do_set, Value *val)
|
||||
if (val->type != STR_TYPE) return E_BAD_TYPE;
|
||||
if (strcmp(val->v.str, "T") &&
|
||||
strcmp(val->v.str, "@")) {
|
||||
return E_BAD_TYPE;
|
||||
return E_BAD_VAL_FOR_SYSVAR;
|
||||
}
|
||||
DateTimeSep = val->v.str[0];
|
||||
return OK;
|
||||
@@ -512,7 +512,7 @@ static int default_color_func(int do_set, Value *val)
|
||||
}
|
||||
if (val->type != STR_TYPE) return E_BAD_TYPE;
|
||||
if (sscanf(val->v.str, "%d %d %d", &col_r, &col_g, &col_b) != 3) {
|
||||
return E_BAD_TYPE;
|
||||
return E_BAD_VAL_FOR_SYSVAR;
|
||||
}
|
||||
/* They either all have to be -1, or all between 0 and 255 */
|
||||
if (col_r == -1 && col_g == -1 && col_b == -1) {
|
||||
@@ -547,7 +547,7 @@ static int date_sep_func(int do_set, Value *val)
|
||||
if (val->type != STR_TYPE) return E_BAD_TYPE;
|
||||
if (strcmp(val->v.str, "/") &&
|
||||
strcmp(val->v.str, "-")) {
|
||||
return E_BAD_TYPE;
|
||||
return E_BAD_VAL_FOR_SYSVAR;
|
||||
}
|
||||
DateSep = val->v.str[0];
|
||||
return OK;
|
||||
@@ -566,7 +566,7 @@ static int time_sep_func(int do_set, Value *val)
|
||||
if (val->type != STR_TYPE) return E_BAD_TYPE;
|
||||
if (strcmp(val->v.str, ":") &&
|
||||
strcmp(val->v.str, ".")) {
|
||||
return E_BAD_TYPE;
|
||||
return E_BAD_VAL_FOR_SYSVAR;
|
||||
}
|
||||
TimeSep = val->v.str[0];
|
||||
return OK;
|
||||
@@ -1101,6 +1101,7 @@ static SysVar SysVarArr[] = {
|
||||
{"RunOff", 0, INT_TYPE, &RunDisabled, 0, 0 },
|
||||
{"Saturday", 1, TRANS_TYPE, "Saturday", 0, 0 },
|
||||
{"September", 1, TRANS_TYPE, "September", 0, 0 },
|
||||
{"Shaded" , 0, INT_TYPE, &Shaded, 0, 0 },
|
||||
{"SimpleCal", 0, INT_TYPE, &DoSimpleCalendar, 0, 0 },
|
||||
{"SortByDate", 0, INT_TYPE, &SortByDate, 0, 0 },
|
||||
{"SortByPrio", 0, INT_TYPE, &SortByPrio, 0, 0 },
|
||||
@@ -1343,8 +1344,10 @@ PopVars(ParsePtr p)
|
||||
return E_POPV_NO_PUSH;
|
||||
}
|
||||
VarStack = VarStack->next;
|
||||
if (strcmp(pv->filename, GetCurrentFilename())) {
|
||||
Wprint(tr("POP-VARS at %s:%d matches PUSH-VARS in different file: %s:%d"), GetCurrentFilename(), LineNo, pv->filename, pv->lineno);
|
||||
if (DebugFlag & DB_PUSHPOP) {
|
||||
if (strcmp(pv->filename, GetCurrentFilename())) {
|
||||
Wprint(tr("POP-VARS at %s:%d matches PUSH-VARS in different file: %s:%d"), GetCurrentFilename(), LineNo, pv->filename, pv->lineno);
|
||||
}
|
||||
}
|
||||
|
||||
/* Pop the sysvars */
|
||||
|
||||
@@ -76,6 +76,7 @@ COLOUR
|
||||
CONTEXTs
|
||||
CPAN
|
||||
CPP's
|
||||
CPUs
|
||||
CalMode
|
||||
CalType
|
||||
CalcMinsFromUTC
|
||||
@@ -160,6 +161,7 @@ FreeBSD
|
||||
Fromnow
|
||||
GPL
|
||||
Gedalia
|
||||
Georg
|
||||
Getopt
|
||||
GhostView
|
||||
Gurman
|
||||
@@ -255,6 +257,7 @@ Makefiles
|
||||
Marczykowski
|
||||
Marek
|
||||
Marinus
|
||||
Matariki
|
||||
MaxFullOmits
|
||||
MaxLateMinutes
|
||||
MaxPartialOmits
|
||||
@@ -541,6 +544,7 @@ difftime
|
||||
doesn
|
||||
dosubst
|
||||
doublequote
|
||||
dp
|
||||
dq
|
||||
dqi
|
||||
dqis
|
||||
@@ -685,10 +689,12 @@ maxlen
|
||||
maybexs
|
||||
mbchar
|
||||
mbindex
|
||||
mblower
|
||||
mbpad
|
||||
mbstowcs
|
||||
mbstrlen
|
||||
mbsubstr
|
||||
mbupper
|
||||
md
|
||||
memcpy
|
||||
messageBox
|
||||
@@ -752,6 +758,7 @@ noto
|
||||
nqueued
|
||||
nroff
|
||||
num
|
||||
nz
|
||||
ok
|
||||
oktober
|
||||
ol
|
||||
@@ -780,6 +787,7 @@ popen
|
||||
pp12
|
||||
pp3
|
||||
ppp
|
||||
ppp12
|
||||
pre
|
||||
preprocessor
|
||||
prev
|
||||
@@ -977,6 +985,7 @@ xsiz
|
||||
xsiz1
|
||||
y1
|
||||
y2
|
||||
yaag
|
||||
year1
|
||||
year2
|
||||
yeardiff
|
||||
@@ -991,6 +1000,7 @@ ziens
|
||||
zj
|
||||
zn
|
||||
één
|
||||
π
|
||||
א
|
||||
אב
|
||||
אדר
|
||||
|
||||
15
tests/shaded.rem
Normal file
15
tests/shaded.rem
Normal file
@@ -0,0 +1,15 @@
|
||||
REM Wed SPECIAL SHADE 255 0 0
|
||||
IF !$Shaded
|
||||
REM 15 SPECIAL SHADE 0 255 0
|
||||
ENDIF
|
||||
IF !$Shaded
|
||||
REM SATISFY [$Td % 4 == 0] SPECIAL SHADE 0 0 255
|
||||
ENDIF
|
||||
|
||||
IF !$Shaded
|
||||
REM Sunday SPECIAL SHADE 0 255 255
|
||||
ENDIF
|
||||
|
||||
IF !$Shaded
|
||||
REM SPECIAL SHADE 255 255 0
|
||||
ENDIF
|
||||
4
tests/test-pushpop1.rem
Normal file
4
tests/test-pushpop1.rem
Normal file
@@ -0,0 +1,4 @@
|
||||
PUSH-OMIT-CONTEXT
|
||||
PUSH-FUNCS a b c
|
||||
PUSH-VARS a b c
|
||||
DO test-pushpop2.rem
|
||||
4
tests/test-pushpop2.rem
Normal file
4
tests/test-pushpop2.rem
Normal file
@@ -0,0 +1,4 @@
|
||||
POP-VARS
|
||||
POP-FUNCS
|
||||
POP-OMIT-CONTEXT
|
||||
|
||||
@@ -455,8 +455,8 @@ $REMIND -c ../tests/test-addomit.rem 1 Sep 2021 >> $OUT
|
||||
$REMIND -cu ../tests/utf-8.rem 1 Nov 2019 >> $OUT
|
||||
$REMIND -cu '-i$SuppressLRM=1' ../tests/utf-8.rem 1 Nov 2019 >> $OUT
|
||||
|
||||
TZ=America/Toronto $REMIND -dxe ../tests/tz.rem >> $OUT 2>&1
|
||||
TZ=Europe/Berlin $REMIND -dxe ../tests/tz.rem >> $OUT 2>&1
|
||||
TZ=America/Toronto $REMIND -dxe ../tests/tz.rem 2026-02-01 >> $OUT 2>&1
|
||||
TZ=Europe/Berlin $REMIND -dxe ../tests/tz.rem 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
$REMIND ../tests/soleq.rem 1 April 2044 >> $OUT 2>&1
|
||||
|
||||
@@ -479,18 +479,18 @@ echo "REM May 22 +10 MSG Bar %b" | $REMIND -tz - 2023-05-21 >> $OUT 2>&1
|
||||
rm -rf include_dir/ww
|
||||
touch include_dir/ww
|
||||
chmod 0666 include_dir/ww
|
||||
$REMIND include_dir/ww >> $OUT 2>&1
|
||||
$REMIND include_dir/ww 2026-02-01 >> $OUT 2>&1
|
||||
rm -rf include_dir/ww
|
||||
|
||||
# World-writable directory
|
||||
mkdir -p include_dir/ww
|
||||
touch include_dir/ww/0.rem
|
||||
chmod 0777 include_dir/ww
|
||||
$REMIND include_dir/ww >> $OUT 2>&1
|
||||
$REMIND include_dir/ww 2026-02-01 >> $OUT 2>&1
|
||||
rm -rf include_dir/ww
|
||||
|
||||
# This segfaulted in 04.02.03
|
||||
$REMIND -h '-imsgprefix(x)="foo"' /dev/null >> $OUT 2>&1
|
||||
$REMIND -h '-imsgprefix(x)="foo"' /dev/null 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
# Test --version long option
|
||||
$REMIND --version >> $OUT 2>&1
|
||||
@@ -585,19 +585,19 @@ EOF
|
||||
|
||||
(echo 'BANNER %'; echo 'REM 29 MSG No bug') | $REMIND -dt - 29 Feb 2024 >> $OUT 2>&1
|
||||
|
||||
$REMIND -ifoo - <<'EOF' >> $OUT 2>&1
|
||||
$REMIND -ifoo - 2026-02-01 <<'EOF' >> $OUT 2>&1
|
||||
BANNER %
|
||||
DUMP
|
||||
EOF
|
||||
|
||||
$REMIND '-i$AddBlankLines' - <<'EOF' >> $OUT 2>&1
|
||||
$REMIND '-i$AddBlankLines' - 2026-02-01 <<'EOF' >> $OUT 2>&1
|
||||
BANNER %
|
||||
DUMP $AddBlankLines
|
||||
EOF
|
||||
|
||||
$REMIND ../tests/expr.rem >> $OUT 2>&1
|
||||
$REMIND ../tests/expr.rem 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
$REMIND - <<'EOF' >> $OUT 2>&1
|
||||
$REMIND - 2026-02-01 <<'EOF' >> $OUT 2>&1
|
||||
PUSH
|
||||
POP
|
||||
PUSH
|
||||
@@ -709,7 +709,7 @@ echo "" >> $OUT
|
||||
$REMIND --print-tokens < /dev/null >> $OUT 2>&1
|
||||
|
||||
# Torture test #2
|
||||
$REMIND ../tests/torture2.rem >> $OUT 2>&1
|
||||
$REMIND ../tests/torture2.rem 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
# Expression error-reporting
|
||||
$REMIND -de - 1 Feb 2024 <<'EOF' >> $OUT 2>&1
|
||||
@@ -810,10 +810,10 @@ REM Wed MSG Wookie
|
||||
EOF
|
||||
|
||||
# Test year-folding
|
||||
TZ=America/Toronto $REMIND -dx ../tests/yearfold.rem >> $OUT 2>&1
|
||||
TZ=America/Toronto $REMIND -dx ../tests/yearfold.rem 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
# Test unused-variable debugging
|
||||
$REMIND -du - <<'EOF' >> $OUT 2>&1
|
||||
$REMIND -du - 2026-02-01 <<'EOF' >> $OUT 2>&1
|
||||
set a 1
|
||||
set b a*2
|
||||
set c "What"
|
||||
@@ -987,6 +987,13 @@ 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
|
||||
|
||||
# Test the $Shaded system variable
|
||||
$REMIND -pp ../tests/shaded.rem 2026-02-01 >> $OUT 2>&1
|
||||
|
||||
# Test the push/pop warnings
|
||||
$REMIND ../tests/test-pushpop1.rem 2026-01-01 >> $OUT 2>&1
|
||||
$REMIND -dp ../tests/test-pushpop1.rem 2026-01-01 >> $OUT 2>&1
|
||||
|
||||
cmp -s $OUT $CMP
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Remind: Acceptance tests ${GRN}PASSED${NRM}"
|
||||
|
||||
@@ -1046,7 +1046,7 @@ set a057 value("a05"+"6")
|
||||
"a05" + "6" => "a056"
|
||||
value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
set a058 version()
|
||||
version() => "06.02.02"
|
||||
version() => "06.02.05"
|
||||
set a059 wkday(today())
|
||||
today() => 1991-02-16
|
||||
wkday(1991-02-16) => "Saturday"
|
||||
@@ -2609,7 +2609,7 @@ a056 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
a007 "1991-02-16"
|
||||
a057 "SDFJHSDF KSJDFH KJSDFH KSJDFH"
|
||||
a008 "11:44"
|
||||
a058 "06.02.02"
|
||||
a058 "06.02.05"
|
||||
a059 "Saturday"
|
||||
a010 12
|
||||
a060 6
|
||||
@@ -5563,8 +5563,8 @@ REM SATISFY ""
|
||||
REM SATISFY [version() > "01.00.00"]
|
||||
../tests/test.rem(1074): SATISFY: expression has no reference to trigdate() or $T...
|
||||
../tests/test.rem(1074): Trig = Saturday, 16 February, 1991
|
||||
version() => "06.02.02"
|
||||
"06.02.02" > "01.00.00" => 1
|
||||
version() => "06.02.05"
|
||||
"06.02.05" > "01.00.00" => 1
|
||||
../tests/test.rem(1074): Trig(satisfied) = Saturday, 16 February, 1991
|
||||
REM SATISFY [max(x, max(x, 1, 2, 3), 4, 5, 6) * 5]
|
||||
../tests/test.rem(1075): SATISFY: expression has no reference to trigdate() or $T...
|
||||
@@ -16762,7 +16762,16 @@ mbpad("
|
||||
]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
|
||||
]8;;\../tests/test.rem(1900): Invalid value for system variable
|
||||
../tests/test.rem(1901): Invalid value for system variable
|
||||
../tests/test.rem(1902): Invalid value for system variable
|
||||
../tests/test.rem(1903): Invalid value for system variable
|
||||
../tests/test.rem(1904): Invalid value for system variable
|
||||
mbupper("öÖçÇéôñÑÉÊ") => "ÖÖÇÇÉÔÑÑÉÊ"
|
||||
mblower("öÖçÇéôñÑÉÊ") => "ööççéôññéê"
|
||||
upper("öÖçÇéôñÑÉÊ") => "öÖçÇéôñÑÉÊ"
|
||||
lower("öÖçÇéôñÑÉÊ") => "öÖçÇéôñÑÉÊ"
|
||||
DynBuf Mallocs: 1132 mallocs; 31873408 bytes
|
||||
Variable hash table statistics:
|
||||
Entries: 100146; Buckets: 87719; Non-empty Buckets: 66303
|
||||
Maxlen: 5; Minlen: 0; Avglen: 1.142; Stddev: 0.878; Avg nonempty len: 1.510
|
||||
@@ -16784,7 +16793,7 @@ Expression nodes high-water: 302076
|
||||
Expression nodes leaked: 0
|
||||
Parse level high-water: 34
|
||||
Max expr node evaluations per line: 2001
|
||||
Total expression node evaluations: 106733
|
||||
Total expression node evaluations: 106746
|
||||
|
||||
Test 2
|
||||
|
||||
@@ -23822,7 +23831,7 @@ SECURITY: Won't read world-writable file or directory!
|
||||
Error reading include_dir/ww: Can't open file
|
||||
SECURITY: Won't read world-writable file or directory!
|
||||
Error reading include_dir/ww: No files matching *.rem
|
||||
06.02.02
|
||||
06.02.05
|
||||
Enabling test mode: This is meant for the acceptance test.
|
||||
Do not use --test in production.
|
||||
In test mode, the system time is fixed at 2025-01-06@19:00
|
||||
@@ -24771,9 +24780,11 @@ lower
|
||||
max
|
||||
mbchar
|
||||
mbindex
|
||||
mblower
|
||||
mbpad
|
||||
mbstrlen
|
||||
mbsubstr
|
||||
mbupper
|
||||
min
|
||||
minsfromutc
|
||||
minute
|
||||
@@ -24940,6 +24951,7 @@ $PSCal
|
||||
$RunOff
|
||||
$Saturday
|
||||
$September
|
||||
$Shaded
|
||||
$SimpleCal
|
||||
$SortByDate
|
||||
$SortByPrio
|
||||
@@ -25187,6 +25199,7 @@ TRANSLATE "Invalid multibyte sequence" ""
|
||||
TRANSLATE "Maximum expression complexity exceeded" ""
|
||||
TRANSLATE "Expecting operator or end-of-expression" ""
|
||||
TRANSLATE "Expecting constant, variable, function call or (expression)" ""
|
||||
TRANSLATE "Invalid value for system variable" ""
|
||||
|
||||
# Other Messages
|
||||
TRANSLATE "%s function `%s' defined at %s(%s) does not use its argument" ""
|
||||
@@ -39867,20 +39880,20 @@ Testing TODOS in calendar mode with completed todos hidden
|
||||
2025/08/27 * * * * Ninth
|
||||
Testing TODOS and JSON mode
|
||||
[
|
||||
{"date":"2025-08-01","filename":"../tests/todos.rem","lineno":4,"d":1,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-1 ","priority":5000,"body":"First on 2025-08-01"},
|
||||
{"date":"2025-08-01","filename":"../tests/todos.rem","lineno":4,"d":1,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-01","priority":5000,"body":"First on 2025-08-01"},
|
||||
{"date":"2022-08-01","filename":"../tests/todos.rem","lineno":5,"d":1,"m":8,"is_todo":1,"complete_through":"2022-07-31","priority":5000,"body":"Second on 2022-08-01"},
|
||||
{"date":"2023-08-01","filename":"../tests/todos.rem","lineno":6,"d":1,"m":8,"is_todo":1,"complete_through":"2022-08-01","priority":5000,"body":"Third on 2023-08-01"},
|
||||
{"date":"2025-08-20","filename":"../tests/todos.rem","lineno":7,"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":8,"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":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-06","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-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-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-01","filename":"../tests/todos.rem","lineno":14,"d":1,"m":8,"y":2025,"is_todo":1,"trigbase":"2025-08-01","priority":5000,"body":"First on 2025-08-01"},
|
||||
{"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":"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-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-06","filename":"../tests/todos.rem","lineno":19,"d":6,"m":8,"y":2025,"is_todo":1,"delta":7,"trigbase":"2025-08-06","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"},
|
||||
@@ -40094,9 +40107,9 @@ devnull test b
|
||||
No reminders.
|
||||
[
|
||||
{"banner":"Reminders for Wednesday, 1st October, 2025:"},
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":3,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst NOT set 2025-10-01"},
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":4,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst IS set 2025-10-01"},
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":5,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-1 ","priority":5000,"body":"Nonconst IS set"}
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":3,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-01","priority":5000,"body":"Nonconst NOT set 2025-10-01"},
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":4,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-01","priority":5000,"body":"Nonconst IS set 2025-10-01"},
|
||||
{"date":"2025-10-01","filename":"-stdin-","lineno":5,"nonconst_expr":1,"d":1,"m":10,"y":2025,"is_todo":0,"trigbase":"2025-10-01","priority":5000,"body":"Nonconst IS set"}
|
||||
]
|
||||
# Nonconst-expr in trigger
|
||||
set $ParseUntriggered 1
|
||||
@@ -40224,4 +40237,44 @@ February 28
|
||||
+----------+----------+----------+----------+----------+----------+----------+
|
||||
|26 |27 |28 |29 |30 |31 | |
|
||||
+----------+----------+----------+----------+----------+----------+----------+
|
||||
|
||||
# translations
|
||||
{"LANGID":"en"}
|
||||
# rem2ps2 begin
|
||||
February 2026 28 0 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
January 31
|
||||
March 31
|
||||
{"date":"2026-02-01","filename":"../tests/shaded.rem","lineno":10,"passthru":"SHADE","wd":["Sunday"],"is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":255,"b":255,"body":"0 255 255"}
|
||||
{"date":"2026-02-02","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-03","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-04","filename":"../tests/shaded.rem","lineno":1,"passthru":"SHADE","wd":["Wednesday"],"is_todo":0,"priority":5000,"r":255,"g":0,"b":0,"body":"255 0 0"}
|
||||
{"date":"2026-02-05","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-06","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-07","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-08","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
{"date":"2026-02-09","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-10","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-11","filename":"../tests/shaded.rem","lineno":1,"passthru":"SHADE","wd":["Wednesday"],"is_todo":0,"priority":5000,"r":255,"g":0,"b":0,"body":"255 0 0"}
|
||||
{"date":"2026-02-12","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
{"date":"2026-02-13","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-14","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-15","filename":"../tests/shaded.rem","lineno":3,"passthru":"SHADE","d":15,"is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":255,"b":0,"body":"0 255 0"}
|
||||
{"date":"2026-02-16","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
{"date":"2026-02-17","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-18","filename":"../tests/shaded.rem","lineno":1,"passthru":"SHADE","wd":["Wednesday"],"is_todo":0,"priority":5000,"r":255,"g":0,"b":0,"body":"255 0 0"}
|
||||
{"date":"2026-02-19","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-20","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
{"date":"2026-02-21","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-22","filename":"../tests/shaded.rem","lineno":10,"passthru":"SHADE","wd":["Sunday"],"is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":255,"b":255,"body":"0 255 255"}
|
||||
{"date":"2026-02-23","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-24","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
{"date":"2026-02-25","filename":"../tests/shaded.rem","lineno":1,"passthru":"SHADE","wd":["Wednesday"],"is_todo":0,"priority":5000,"r":255,"g":0,"b":0,"body":"255 0 0"}
|
||||
{"date":"2026-02-26","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-27","filename":"../tests/shaded.rem","lineno":14,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":255,"g":255,"b":0,"body":"255 255 0"}
|
||||
{"date":"2026-02-28","filename":"../tests/shaded.rem","lineno":6,"passthru":"SHADE","is_todo":0,"priority":5000,"if_depth":1,"r":0,"g":0,"b":255,"body":"0 0 255"}
|
||||
# rem2ps2 end
|
||||
No reminders.
|
||||
../tests/test-pushpop2.rem(1): POP-VARS at ../tests/test-pushpop2.rem:1 matches PUSH-VARS in different file: ../tests/test-pushpop1.rem:3
|
||||
../tests/test-pushpop2.rem(2): POP-FUNCS at ../tests/test-pushpop2.rem:2 matches PUSH-FUNCS in different file: ../tests/test-pushpop1.rem:2
|
||||
../tests/test-pushpop2.rem(3): POP-OMIT-CONTEXT at ../tests/test-pushpop2.rem:3 matches PUSH-OMIT-CONTEXT in different file: ../tests/test-pushpop1.rem:1
|
||||
No reminders.
|
||||
|
||||
@@ -1896,6 +1896,21 @@ 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!
|
||||
|
||||
# Bad values for system variables
|
||||
SET $Latitude "Cabbage"
|
||||
SET $Longitude "Carrots"
|
||||
SET $TimeSep "FOO"
|
||||
SET $DateSep "BAR"
|
||||
SET $DefaultColor "My oh my, what lovely eyes!"
|
||||
|
||||
# mbupper and mblower
|
||||
DEBUG +x
|
||||
SET a mbupper("öÖçÇéôñÑÉÊ")
|
||||
SET a mblower("öÖçÇéôñÑÉÊ")
|
||||
SET a upper("öÖçÇéôñÑÉÊ")
|
||||
SET a lower("öÖçÇéôñÑÉÊ")
|
||||
DEBUG -x
|
||||
|
||||
# Don't want Remind to queue reminders
|
||||
EXIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user