mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Compare commits
9 Commits
04.00.00-B
...
04.00.00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e16179bfa | ||
|
|
a7c1bc81b2 | ||
|
|
5f5ec8ef19 | ||
|
|
712ff56792 | ||
|
|
99af1f964c | ||
|
|
de5d1347e5 | ||
|
|
5e07fbde6d | ||
|
|
c523c7f3b3 | ||
|
|
6b3c6b0ec7 |
@@ -1,6 +1,6 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* VERSION 4.0 Patch 0 - 2022-??-??
|
||||
* VERSION 4.0 Patch 0 - 2022-04-04
|
||||
|
||||
- MAJOR NEW FEATURE: remind: Remind output can effectively be
|
||||
translated into other languages at run-time. A number of system
|
||||
@@ -30,6 +30,11 @@ CHANGES TO REMIND
|
||||
This causes Remind *not* to remove the %"...%" marker sequence from
|
||||
remind bodies.
|
||||
|
||||
- BUG FIX: rem2pdf: Make rem2pdf respect the --prefix ./configure flag.
|
||||
Loosely based on patch by Jonathan Kamens.
|
||||
|
||||
- BUG FIX: tkremind: Fix the "-m" flag, which was broken in 03.04.00.
|
||||
|
||||
- BUG FIX: Fix the overflow-detection functions so they work with link-time
|
||||
optimization. The previous versions would be optimized away.
|
||||
|
||||
|
||||
49
man/remind.1
49
man/remind.1
@@ -563,6 +563,7 @@ The trigger date for a specific run is simply the current system date.
|
||||
present. The reminder is triggered on the specified day of each month.
|
||||
The trigger date for a particular run is the closest such day to the
|
||||
current system date. For example:
|
||||
.PP
|
||||
.nf
|
||||
REM 1 MSG First of every month.
|
||||
REM 31 MSG 31st of every month that has 31 days.
|
||||
@@ -572,6 +573,7 @@ current system date. For example:
|
||||
.I month
|
||||
present. The reminder is triggered every day of the specified month.
|
||||
Example:
|
||||
.PP
|
||||
.nf
|
||||
REM Feb MSG Every day in February
|
||||
.fi
|
||||
@@ -581,6 +583,7 @@ Example:
|
||||
and
|
||||
.I month
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM 6 Jan MSG Every 6th of January
|
||||
REM Feb 29 MSG Every 29th of February
|
||||
@@ -589,6 +592,7 @@ present. Examples:
|
||||
5. Only
|
||||
.I year
|
||||
present. Example:
|
||||
.PP
|
||||
.nf
|
||||
REM 1991 MSG Every day in 1991
|
||||
.fi
|
||||
@@ -598,6 +602,7 @@ present. Example:
|
||||
and
|
||||
.I day
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM 1 1990 MSG 1st of every month in 1990
|
||||
REM 1992 23 MSG 23rd of every month in 1992
|
||||
@@ -608,6 +613,7 @@ present. Examples:
|
||||
and
|
||||
.I month
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Feb 1991 MSG Every day in Feb 1991
|
||||
REM 1992 September MSG Every day in Sept 1992
|
||||
@@ -618,6 +624,7 @@ present. Examples:
|
||||
and
|
||||
.I day
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM 8 Jan 1991 MSG 8th January 1991.
|
||||
REM 1992 March 9 MSG 9th March 1992.
|
||||
@@ -626,6 +633,7 @@ present. Examples:
|
||||
9.
|
||||
.I weekday
|
||||
only. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Sat MSG Every Saturday
|
||||
REM Mon Tue Wed Thu Fri MSG Every working day
|
||||
@@ -637,6 +645,7 @@ only. Examples:
|
||||
and
|
||||
.I day
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Sat 1 MSG First Saturday of every month
|
||||
REM Mon Tue Wed Thu Fri 15 \\
|
||||
@@ -648,6 +657,7 @@ present. Examples:
|
||||
and
|
||||
.I month
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Mon March MSG Every Monday in March
|
||||
REM Mon Tue Wed Thu Fri Feb MSG Every working day in February
|
||||
@@ -658,6 +668,7 @@ present. Examples:
|
||||
and
|
||||
.I day
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Mon 1 March MSG First Monday in March
|
||||
REM Sat Sun 15 July MSG First Sat or Sun on or after 15 July
|
||||
@@ -668,6 +679,7 @@ present. Examples:
|
||||
and
|
||||
.I year
|
||||
present. Example:
|
||||
.PP
|
||||
.nf
|
||||
REM Sat Sun 1991 MSG Every Saturday and Sunday in 1991
|
||||
.fi
|
||||
@@ -677,6 +689,7 @@ present. Example:
|
||||
and
|
||||
.I year
|
||||
present. Examples:
|
||||
.PP
|
||||
.nf
|
||||
REM Mon 15 1990 MSG 1st Mon after 15th of every month in 1990
|
||||
REM Mon Tue Wed Thu Fri 1 1990 \\
|
||||
@@ -688,6 +701,7 @@ present. Examples:
|
||||
and
|
||||
.I year
|
||||
present. Example:
|
||||
.PP
|
||||
.nf
|
||||
REM Mon Wed 1991 Feb MSG Every Mon and Wed in Feb 1991.
|
||||
.fi
|
||||
@@ -697,6 +711,7 @@ present. Example:
|
||||
and
|
||||
.I year
|
||||
present. Example:
|
||||
.PP
|
||||
.nf
|
||||
REM Mon Tue Wed Thu Fri 28 Oct 1990 \\
|
||||
MSG 1st working day on or after 28 October 1990.
|
||||
@@ -2323,6 +2338,7 @@ the decimal point must be a period (".").
|
||||
.PP
|
||||
For example, the coordinates of the Statue of Liberty in New York City
|
||||
are approximately set by:
|
||||
.PP
|
||||
.nf
|
||||
SET $Latitude "40.68933"
|
||||
SET $Longitude "-74.04454"
|
||||
@@ -3048,6 +3064,7 @@ be right-padded.
|
||||
.RS
|
||||
.PP
|
||||
Here are some examples:
|
||||
.PP
|
||||
.nf
|
||||
pad(3, "0", 2) --> "03"
|
||||
pad(465, "0", 2) --> "465"
|
||||
@@ -3266,6 +3283,7 @@ non-zero trigger date.
|
||||
\fBIFTRIG\fR. For example, if you have meetings every Monday in
|
||||
June and July, and you want warnings 3 days in advance, you
|
||||
could use:
|
||||
.PP
|
||||
.nf
|
||||
REM [trig("Mon Jun +3", "Mon July +3")] +3 MSG Meeting %b
|
||||
.fi
|
||||
@@ -4782,13 +4800,14 @@ reminder and \fItime\fR which is the trigger time.
|
||||
.TP
|
||||
.B subst_Nx(alt, date, time)
|
||||
Again, this is a \fIfamily\fR of functions. It is similar to the
|
||||
\fBsubst_x\fR family except it is only called if \fIdate\fR is two or
|
||||
\fBsubst_N\fR family except it is only called if \fIdate\fR is two or
|
||||
more days away from \fItoday()\fR. This is useful if you don't want to
|
||||
override the "today" or "tomorrow" output for most substitution sequences.
|
||||
.PP
|
||||
Here's an example of how you might customize your substitution filter.
|
||||
Suppose you want to change the "%b" sequence to substitute "the day
|
||||
after tomorrow" for an event two days from now. You could do this:
|
||||
.PP
|
||||
.nf
|
||||
FSET subst_bx(a,d,t) iif(d==today()+2, "the day after tomorrow", \
|
||||
"in " + (d-today()) + " days' time")
|
||||
@@ -4799,6 +4818,7 @@ after tomorrow" for an event two days from now. You could do this:
|
||||
.fi
|
||||
.PP
|
||||
The output of this script is:
|
||||
.PP
|
||||
.nf
|
||||
Event 1 is in 3 days' time
|
||||
Event 2 is the day after tomorrow
|
||||
@@ -4811,6 +4831,15 @@ time", and note also that the "tomorrow" and "today" events used the
|
||||
normal substitution---\fBsubst_bx\fR is not called for trigger days of
|
||||
today or tomorrow.
|
||||
.PP
|
||||
As a special case, if a \fBsubst_Nx\fB or \fBsubst_N\fR function
|
||||
returns the integer zero, then the normal substitution mechanism is
|
||||
used. Therefore, the previous example could have been written more simply
|
||||
as:
|
||||
.PP
|
||||
.nf
|
||||
FSET subst_bx(a,d,t) iif(d==today()+2, "the day after tomorrow", 0)
|
||||
.fi
|
||||
.PP
|
||||
.SH LANGUAGE PACKS
|
||||
.PP
|
||||
\fBRemind\fR ships with a number of language packs, which are simply reminder
|
||||
@@ -4823,12 +4852,14 @@ pl.rem (Polish), pt.rem (Portuguese) and ro.rem (Romanian).
|
||||
.PP
|
||||
To use a language pack (in this example, de.rem), simply place this at
|
||||
the top of your reminders file:
|
||||
.PP
|
||||
.nf
|
||||
INCLUDE [$SysInclude]/lang/de.rem
|
||||
.fi
|
||||
.PP
|
||||
If you want \fBRemind\fR to try to find the language pack appropriate
|
||||
for your locale settings, use:
|
||||
.PP
|
||||
.nf
|
||||
INCLUDE [$SysInclude]/lang/auto.rem
|
||||
.fi
|
||||
@@ -5043,10 +5074,12 @@ should attempt to support. They are currently supported by
|
||||
.PP
|
||||
The \fBSHADE\fR special replaces the \fBpsshade()\fR function.
|
||||
Use it like this:
|
||||
.PP
|
||||
.nf
|
||||
REM Sat Sun SPECIAL SHADE 128
|
||||
REM Mon SPECIAL SHADE 255 0 0
|
||||
.fi
|
||||
.PP
|
||||
The \fBSHADE\fR keyword is followed by either one or three numbers,
|
||||
from 0 to 255. If one number is supplied, it is interpreted as
|
||||
a grey-scale value from black (0) to white (255). If three numbers
|
||||
@@ -5057,14 +5090,17 @@ in calendars produced by \fBRem2PS\fR, \fBtkremind\fR and \fBrem2html\fR.)
|
||||
.PP
|
||||
The \fBMOON\fR special replaces the \fBpsmoon()\fR function. Use it
|
||||
like this:
|
||||
.PP
|
||||
.nf
|
||||
REM [moondate(0)] SPECIAL MOON 0
|
||||
REM [moondate(1)] SPECIAL MOON 1
|
||||
REM [moondate(2)] SPECIAL MOON 2
|
||||
REM [moondate(3)] SPECIAL MOON 3
|
||||
.fi
|
||||
.PP
|
||||
These draw little moons on the various calendars. The complete syntax
|
||||
of the \fBMOON\fR special is as follows:
|
||||
.PP
|
||||
.nf
|
||||
... SPECIAL MOON phase moonsize fontsize msg
|
||||
.fi
|
||||
@@ -5085,12 +5121,12 @@ and \fIfontsize\fR; the other backends use fixed sizes.
|
||||
.PP
|
||||
The \fBCOLOR\fR special lets you place colored reminders in the
|
||||
calendar. Use it like this:
|
||||
|
||||
.PP
|
||||
.nf
|
||||
REM ... SPECIAL COLOR 255 0 0 This is a bright red reminder
|
||||
REM ... SPECIAL COLOR 0 128 0 This is a dark green reminder
|
||||
.fi
|
||||
|
||||
.PP
|
||||
You can spell COLOR either the American way ("COLOR") or the British
|
||||
way ("COLOUR"). This manual will use the American way.
|
||||
|
||||
@@ -5111,11 +5147,11 @@ number in the calendar. For example, this would number each Monday
|
||||
with the ISO 8601 week number. The week number is shown like this:
|
||||
"(W\fIn\fR)" in this example, but you can put whatever text you like
|
||||
after the WEEK keyword.
|
||||
|
||||
.PP
|
||||
.nf
|
||||
REM Monday SPECIAL WEEK (W[weekno()])
|
||||
.fi
|
||||
|
||||
.PP
|
||||
.SH MISCELLANEOUS
|
||||
.PP
|
||||
.B COMMAND ABBREVIATIONS
|
||||
@@ -5373,9 +5409,6 @@ are not implemented as read-only system variables.
|
||||
.PP
|
||||
Hebrew dates in \fBRemind\fR change at midnight instead of sunset.
|
||||
.PP
|
||||
Language should be selectable at run-time, not compile-time. Don't
|
||||
expect this to happen soon!
|
||||
.PP
|
||||
\fBRemind\fR has some built-in limits (for example, number of global
|
||||
\fBOMIT\fRs.)
|
||||
.PP
|
||||
|
||||
@@ -33,10 +33,16 @@ install:
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) "INSTALL_BASE=$(INSTALL_BASE)" && exit 0; \
|
||||
elif test "$(prefix)" = "/usr" ; then \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) INSTALLDIRS=vendor && exit 0; \
|
||||
else \
|
||||
elif test "$(prefix)" = "/usr/local" ; then \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) && exit 0; \
|
||||
else \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) "INSTALL_BASE=$(prefix)" && exit 0; \
|
||||
fi; \
|
||||
exit 1;
|
||||
|
||||
Makefile: Makefile.PL
|
||||
$(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(INSTALL_BASE) || true
|
||||
if test "$(prefix)" != "/usr" -a "$(prefix)" != "/usr/local" -a "$(INSTALL_BASE)" = "" ; then \
|
||||
$(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(prefix) || true;\
|
||||
else \
|
||||
$(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(INSTALL_BASE) || true;\
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!@PERL@
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '@prefix@/lib/perl5';
|
||||
|
||||
use Encode;
|
||||
use Cairo;
|
||||
|
||||
@@ -285,7 +285,7 @@ sub read_one_month_pp
|
||||
Given a hashref C<$hash> consisting of one entry parsed
|
||||
from the "remind -p" stream and a C<$specials_accepted> hash,
|
||||
return 1 if we should include this entry in the calendar or
|
||||
0 if mot.
|
||||
0 if not.
|
||||
|
||||
=cut
|
||||
sub accept_special
|
||||
|
||||
@@ -457,6 +457,7 @@ proc CreateCalFrame { w dayNames } {
|
||||
# Figure out reasonable height for text frames
|
||||
global SetFontsWorked
|
||||
global Option
|
||||
global MondayFirst
|
||||
set h [winfo screenheight .]
|
||||
if {$h <= 480} {
|
||||
if {$SetFontsWorked} {
|
||||
@@ -470,7 +471,6 @@ proc CreateCalFrame { w dayNames } {
|
||||
set h 5
|
||||
}
|
||||
|
||||
global MondayFirst
|
||||
frame $w -background $Option(LineColor)
|
||||
for {set i 0} {$i < 7} {incr i} {
|
||||
if {$MondayFirst} {
|
||||
@@ -1010,7 +1010,7 @@ proc ConfigureCalWindow { month year firstDay numDays } {
|
||||
proc FillCalWindow {} {
|
||||
set FileName ""
|
||||
set LineNo 0
|
||||
global DayNames CurYear CurMonth MonthNames CommandLine Option TagToObj RemindErrors
|
||||
global DayNames CurYear CurMonth MonthNames CommandLine Option TagToObj RemindErrors MondayFirst
|
||||
|
||||
array unset TagToObj
|
||||
|
||||
@@ -1049,7 +1049,12 @@ proc FillCalWindow {} {
|
||||
|
||||
# Update the day names in the calendar window
|
||||
for {set i 0} {$i < 7} {incr i} {
|
||||
.cal.day$i configure -text [lindex $DayNames $i]
|
||||
if {$MondayFirst} {
|
||||
set index [expr ($i+1)%7]
|
||||
} else {
|
||||
set index $i
|
||||
}
|
||||
.cal.day$i configure -text [lindex $DayNames $index]
|
||||
}
|
||||
set offset [CalEntryOffset $firstWkday]
|
||||
|
||||
|
||||
@@ -229,14 +229,17 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
|
||||
expr = (char const *) s;
|
||||
r = EvalExpr(&expr, &v, NULL);
|
||||
if (r == OK) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
if (DBufPuts(dbuf, v.v.str) != OK) {
|
||||
DestroyValue(v);
|
||||
return E_NO_MEM;
|
||||
if (v.type != INT_TYPE || v.v.val != 0) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
if (DBufPuts(dbuf, v.v.str) != OK) {
|
||||
DestroyValue(v);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
}
|
||||
DestroyValue(v);
|
||||
continue;
|
||||
}
|
||||
DestroyValue(v);
|
||||
continue;
|
||||
} else {
|
||||
Eprint("%s", ErrMsg[r]);
|
||||
}
|
||||
@@ -301,14 +304,17 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul,
|
||||
expr = (char const *) s;
|
||||
r = EvalExpr(&expr, &v, NULL);
|
||||
if (r == OK) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
if (DBufPuts(dbuf, v.v.str) != OK) {
|
||||
DestroyValue(v);
|
||||
return E_NO_MEM;
|
||||
if (v.type != INT_TYPE || v.v.val != 0) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
if (DBufPuts(dbuf, v.v.str) != OK) {
|
||||
DestroyValue(v);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
}
|
||||
DestroyValue(v);
|
||||
continue;
|
||||
}
|
||||
DestroyValue(v);
|
||||
continue;
|
||||
} else {
|
||||
Eprint("%s", ErrMsg[r]);
|
||||
}
|
||||
|
||||
10
src/expr.c
10
src/expr.c
@@ -84,10 +84,12 @@ Operator UnOp[] = {
|
||||
|
||||
extern BuiltinFunc Func[];
|
||||
|
||||
Operator OpStack[OP_STACK_SIZE];
|
||||
Value ValStack[VAL_STACK_SIZE];
|
||||
int OpStackPtr = 0;
|
||||
int ValStackPtr = 0;
|
||||
static Operator OpStack[OP_STACK_SIZE];
|
||||
static int OpStackPtr = 0;
|
||||
|
||||
/* ValStack can't be static - needed by funcs.c */
|
||||
Value ValStack[VAL_STACK_SIZE];
|
||||
int ValStackPtr = 0;
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
|
||||
@@ -17,7 +17,7 @@ HTMLDIR = /var/www/remind
|
||||
# Where you stick images and CSS files, as seen by UNIX
|
||||
IMAGEDIR = /var/www/remind/resources
|
||||
|
||||
# Where images and CSS fiels are, as seen by web browers
|
||||
# Where images and CSS files are, as seen by web browsers
|
||||
IMAGEBASE = /remind/resources
|
||||
|
||||
# Set by configure - don't touch.
|
||||
|
||||
Reference in New Issue
Block a user