mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-18 23:38:40 +02:00
Compare commits
3 Commits
af8b4e6df1
...
4e7cfc20ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e7cfc20ce | ||
|
|
0c9a35a584 | ||
|
|
5e333f6162 |
@@ -117,7 +117,8 @@
|
|||||||
"NOQUEUE" "OMIT" "OMITFUNC" "ONCE" "POP" "POP-OMIT-CONTEXT" "PRESERVE"
|
"NOQUEUE" "OMIT" "OMITFUNC" "ONCE" "POP" "POP-OMIT-CONTEXT" "PRESERVE"
|
||||||
"PRIORITY" "PS" "PSFILE" "PUSH" "PUSH-OMIT-CONTEXT" "REM" "RUN"
|
"PRIORITY" "PS" "PSFILE" "PUSH" "PUSH-OMIT-CONTEXT" "REM" "RUN"
|
||||||
"SATISFY" "SCAN" "SCANFROM" "SCHED" "SECOND" "SET" "SKIP" "SPECIAL"
|
"SATISFY" "SCAN" "SCANFROM" "SCHED" "SECOND" "SET" "SKIP" "SPECIAL"
|
||||||
"TAG" "THIRD" "THROUGH" "TRANSLATE" "TRANS" "UNSET" "UNTIL" "WARN")
|
"SYSINCLUDE" "TAG" "THIRD" "THROUGH" "TRANSLATE" "TRANS" "UNSET"
|
||||||
|
"UNTIL" "WARN")
|
||||||
#'(lambda (a b) (> (length a) (length b)))))
|
#'(lambda (a b) (> (length a) (length b)))))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,14 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
- MINOR FEATURE: Add standard include/sun.rem file for sunrise/sunset.
|
- MINOR FEATURE: Add standard include/sun.rem file for sunrise/sunset.
|
||||||
|
|
||||||
|
- MINOR FEATURE: The SYSINCLUDE command has been added. The command:
|
||||||
|
|
||||||
|
SYSINCLUDE foo/bar.rem
|
||||||
|
|
||||||
|
is equivalent to:
|
||||||
|
|
||||||
|
INCLUDE [$SysInclude]/foo/bar.rem
|
||||||
|
|
||||||
- IMPROVEMENT: remind: Refuse to open subdirectories named "*.rem"
|
- IMPROVEMENT: remind: Refuse to open subdirectories named "*.rem"
|
||||||
under a top-level directory rather than trying and failing with a
|
under a top-level directory rather than trying and failing with a
|
||||||
confusing error.
|
confusing error.
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ advance warning of holidays:
|
|||||||
FSET msgsuffix(x) char(8) + dosubst(" is %b.%", $T)
|
FSET msgsuffix(x) char(8) + dosubst(" is %b.%", $T)
|
||||||
|
|
||||||
# Include your holiday files here...
|
# Include your holiday files here...
|
||||||
INCLUDE [$SysInclude]/holidays/us.rem
|
SYSINCLUDE holidays/us.rem
|
||||||
INCLUDE [$SysInclude]/holidays/us/ny.rem
|
SYSINCLUDE holidays/us/ny.rem
|
||||||
|
|
||||||
# Restore old version of msgsuffix and $DefaultDelta
|
# Restore old version of msgsuffix and $DefaultDelta
|
||||||
FRENAME saved_msgsuffix msgsuffix
|
FRENAME saved_msgsuffix msgsuffix
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ if !defined("__autolang__")
|
|||||||
|
|
||||||
IF autolang != ""
|
IF autolang != ""
|
||||||
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 5)) + ".rem", "r") == 0
|
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 5)) + ".rem", "r") == 0
|
||||||
INCLUDE [$SysInclude]/lang/[lower(substr(autolang, 1, 5))].rem
|
SYSINCLUDE lang/[lower(substr(autolang, 1, 5))].rem
|
||||||
ELSE
|
ELSE
|
||||||
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 2)) + ".rem", "r") == 0
|
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 2)) + ".rem", "r") == 0
|
||||||
INCLUDE [$SysInclude]/lang/[lower(substr(autolang, 1, 2))].rem
|
SYSINCLUDE lang/[lower(substr(autolang, 1, 2))].rem
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -1924,7 +1924,7 @@ the first day of the month. The local \fBOMIT\fR keyword causes the
|
|||||||
Finally, the \fBAFTER\fR keyword will keep moving the reminder forward
|
Finally, the \fBAFTER\fR keyword will keep moving the reminder forward
|
||||||
until it has passed any holidays specified with global \fBOMIT\fR
|
until it has passed any holidays specified with global \fBOMIT\fR
|
||||||
commands.
|
commands.
|
||||||
.SH THE DO AND INCLUDE COMMANDS
|
.SH THE DO, INCLUDE AND SYSINCLUDE COMMANDS
|
||||||
.PP
|
.PP
|
||||||
\fBRemind\fR allows you to include other files in your reminder script,
|
\fBRemind\fR allows you to include other files in your reminder script,
|
||||||
similar to the C preprocessor #include directive. For example, your
|
similar to the C preprocessor #include directive. For example, your
|
||||||
@@ -1981,6 +1981,11 @@ symbolic link itself, \fBDO\fR will fail. \fBRemind\fR does \fInot\fR
|
|||||||
resolve the real path of symbolic links, so you should avoid using
|
resolve the real path of symbolic links, so you should avoid using
|
||||||
symbolic links to files.
|
symbolic links to files.
|
||||||
.PP
|
.PP
|
||||||
|
The \fBSYSINCLUDE\fR command is similar to \fBDO\fR, but it looks for
|
||||||
|
relative pathnames under the system directory containing standard reminder
|
||||||
|
scripts. For thie version of \fBRemind\fR, the system directory is
|
||||||
|
"@prefix@/share/remind".
|
||||||
|
.PP
|
||||||
.SH THE RUN COMMAND
|
.SH THE RUN COMMAND
|
||||||
.PP
|
.PP
|
||||||
If you include other files in your reminder script, you may not always
|
If you include other files in your reminder script, you may not always
|
||||||
@@ -5804,14 +5809,14 @@ To use a language pack (in this example, de.rem), simply place this at
|
|||||||
the top of your reminders file:
|
the top of your reminders file:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
INCLUDE [$SysInclude]/lang/de.rem
|
SYSINCLUDE lang/de.rem
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
If you want \fBRemind\fR to try to find the language pack appropriate
|
If you want \fBRemind\fR to try to find the language pack appropriate
|
||||||
for your locale settings, use:
|
for your locale settings, use:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
INCLUDE [$SysInclude]/lang/auto.rem
|
SYSINCLUDE lang/auto.rem
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
You are encouraged to study the language packs to see how to translate
|
You are encouraged to study the language packs to see how to translate
|
||||||
|
|||||||
@@ -1708,6 +1708,7 @@ static void GenerateCalEntries(int col)
|
|||||||
case T_EndIf: r=DoEndif(&p); break;
|
case T_EndIf: r=DoEndif(&p); break;
|
||||||
|
|
||||||
case T_Include:
|
case T_Include:
|
||||||
|
case T_IncludeSys:
|
||||||
case T_IncludeR: r=DoInclude(&p, tok.type); break;
|
case T_IncludeR: r=DoInclude(&p, tok.type); break;
|
||||||
|
|
||||||
case T_IncludeCmd: r=DoIncludeCmd(&p); break;
|
case T_IncludeCmd: r=DoIncludeCmd(&p); break;
|
||||||
|
|||||||
11
src/files.c
11
src/files.c
@@ -612,13 +612,22 @@ int DoInclude(ParsePtr p, enum TokTypes tok)
|
|||||||
e = VerifyEoln(p);
|
e = VerifyEoln(p);
|
||||||
if (e) Eprint("%s", GetErr(e));
|
if (e) Eprint("%s", GetErr(e));
|
||||||
|
|
||||||
if (tok == T_IncludeR && *(DBufValue(&buf)) != '/') {
|
if ((tok == T_IncludeR || tok == T_IncludeSys) &&
|
||||||
|
*(DBufValue(&buf)) != '/') {
|
||||||
/* Relative include: Include relative to dir
|
/* Relative include: Include relative to dir
|
||||||
containing current file */
|
containing current file */
|
||||||
|
if (tok == T_IncludeR) {
|
||||||
if (DBufPuts(&path, FileName) != OK) {
|
if (DBufPuts(&path, FileName) != OK) {
|
||||||
r = E_NO_MEM;
|
r = E_NO_MEM;
|
||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (DBufPuts(&path, SysDir) != OK ||
|
||||||
|
DBufPutc(&path, '/') != OK) {
|
||||||
|
r = E_NO_MEM;
|
||||||
|
goto bailout;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (DBufLen(&path) == 0) {
|
if (DBufLen(&path) == 0) {
|
||||||
s = DBufValue(&buf);
|
s = DBufValue(&buf);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ static void DoReminders(void)
|
|||||||
case T_EndIf: r=DoEndif(&p); break;
|
case T_EndIf: r=DoEndif(&p); break;
|
||||||
case T_Include:
|
case T_Include:
|
||||||
case T_IncludeR:
|
case T_IncludeR:
|
||||||
|
case T_IncludeSys:
|
||||||
/* In purge mode, include closes file, so we
|
/* In purge mode, include closes file, so we
|
||||||
need to echo it here! */
|
need to echo it here! */
|
||||||
if (PurgeMode) {
|
if (PurgeMode) {
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ Token TokArray[] = {
|
|||||||
{ "skip", 4, T_Skip, SKIP_SKIP },
|
{ "skip", 4, T_Skip, SKIP_SKIP },
|
||||||
{ "special", 7, T_RemType, PASSTHRU_TYPE },
|
{ "special", 7, T_RemType, PASSTHRU_TYPE },
|
||||||
{ "sunday", 3, T_WkDay, 6 },
|
{ "sunday", 3, T_WkDay, 6 },
|
||||||
|
{ "sysinclude", 10, T_IncludeSys, 0 },
|
||||||
{ "tag", 3, T_Tag, 0 },
|
{ "tag", 3, T_Tag, 0 },
|
||||||
{ "third", 5, T_Ordinal, 2 },
|
{ "third", 5, T_Ordinal, 2 },
|
||||||
{ "through", 7, T_Through, 0 },
|
{ "through", 7, T_Through, 0 },
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ enum TokTypes
|
|||||||
T_Date, T_DateTime, T_Day, T_Debug, T_Delta, T_Dumpvars, T_Duration,
|
T_Date, T_DateTime, T_Day, T_Debug, T_Delta, T_Dumpvars, T_Duration,
|
||||||
T_Else, T_Empty, T_EndIf, T_ErrMsg, T_Exit, T_Expr,
|
T_Else, T_Empty, T_EndIf, T_ErrMsg, T_Exit, T_Expr,
|
||||||
T_Flush, T_Frename, T_Fset, T_Funset, T_If, T_IfTrig, T_In,
|
T_Flush, T_Frename, T_Fset, T_Funset, T_If, T_IfTrig, T_In,
|
||||||
T_Include, T_IncludeCmd, T_IncludeR, T_LastBack, T_LongTime,
|
T_Include, T_IncludeCmd, T_IncludeR, T_IncludeSys, T_LastBack, T_LongTime,
|
||||||
T_MaybeUncomputable, T_Month, T_NoQueue, T_Number, T_Omit, T_OmitFunc,
|
T_MaybeUncomputable, T_Month, T_NoQueue, T_Number, T_Omit, T_OmitFunc,
|
||||||
T_Once, T_Ordinal, T_Pop, T_Preserve, T_Priority, T_Push,T_Rem,
|
T_Once, T_Ordinal, T_Pop, T_Preserve, T_Priority, T_Push,T_Rem,
|
||||||
T_RemType, T_Rep, T_Scanfrom, T_Sched, T_Set, T_Skip, T_Tag, T_Through,
|
T_RemType, T_Rep, T_Scanfrom, T_Sched, T_Set, T_Skip, T_Tag, T_Through,
|
||||||
|
|||||||
@@ -23942,6 +23942,7 @@ second
|
|||||||
set
|
set
|
||||||
skip
|
skip
|
||||||
special
|
special
|
||||||
|
sysinclude
|
||||||
tag
|
tag
|
||||||
third
|
third
|
||||||
through
|
through
|
||||||
|
|||||||
Reference in New Issue
Block a user