mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-20 16:22:59 +02:00
Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e7cfc20ce | |||
| 0c9a35a584 | |||
| 5e333f6162 | |||
| af8b4e6df1 | |||
| 3fa798523a | |||
| 53001f9fbc | |||
| 9cd76eae84 | |||
| c8295b6251 | |||
| 3c95245407 | |||
| 3362c7226c | |||
| 356b562d75 | |||
| 6eebcdc39d | |||
| 5a80d63060 | |||
| c7ca1b4baa | |||
| dc89a6fba9 | |||
| f83fec5563 | |||
| 9c38161430 | |||
| 68f5fe1d10 | |||
| bc7c57e53b | |||
| 88aacb3905 | |||
| a894076bfc | |||
| 82e068fcca | |||
| a119d97539 | |||
| 01afb63a3d | |||
| 54fccabdfe | |||
| ba4d44664f | |||
| d76c5499b5 | |||
| 84e8244e48 | |||
| 92a6115a5c | |||
| b98e336e9e | |||
| ffcd21446e | |||
| af9ca68d99 | |||
| 71db7168a1 | |||
| 54f284c43f | |||
| 0ab93f2dea | |||
| 3d97f87bcd | |||
| dcfa6d8ef8 | |||
| 52dd5332f4 | |||
| 7b5fafe1ab | |||
| 929af71a10 | |||
| abf7c74ff2 | |||
| 5b9d9a67b2 | |||
| 16ca2ade23 | |||
| d3e6c81a3a | |||
| 13ae49d3cd | |||
| 78adc9f61d | |||
| a622d4fad4 | |||
| 6c0e7b4ff5 | |||
| 28e0599380 | |||
| 87445f639c | |||
| af6e159eaa | |||
| bffa28e258 | |||
| 1781f84d84 | |||
| ed6e65182e | |||
| f5cc0ec686 | |||
| a2c818f96c | |||
| 0bbbaaf3d9 | |||
| 1c81d4cae3 | |||
| 56c684087b | |||
| 9500a929ea | |||
| 585d45e4a1 | |||
| 67d1d1366d | |||
| f4018892e8 | |||
| ffd309f89d | |||
| 286babc1bf | |||
| cc3c0040e9 | |||
| b33a1ee98b | |||
| 99706741bb | |||
| df73a74503 | |||
| c747ebebb4 | |||
| 6b412062c2 | |||
| 27b688f82c | |||
| 4c314ff81c | |||
| d2955ec733 | |||
| 480216db9e | |||
| 9dbb0de7e6 | |||
| 9f9ae77895 | |||
| d9796e72e5 |
@@ -40,7 +40,6 @@ proc SetConfigDefaults {} {
|
|||||||
set Config(TIMESEP) ":"
|
set Config(TIMESEP) ":"
|
||||||
set Config(NORTHERN_HEMISPHERE) 1
|
set Config(NORTHERN_HEMISPHERE) 1
|
||||||
set Config(WESTERN_HEMISPHERE) 1
|
set Config(WESTERN_HEMISPHERE) 1
|
||||||
set Config(LANGUAGE) "English"
|
|
||||||
set Config(INST_DIR) "/usr/local/bin"
|
set Config(INST_DIR) "/usr/local/bin"
|
||||||
set Config(MAN_DIR) "/usr/local/share/man"
|
set Config(MAN_DIR) "/usr/local/share/man"
|
||||||
}
|
}
|
||||||
@@ -242,32 +241,6 @@ proc CreateOptionsDialog { w } {
|
|||||||
|
|
||||||
grid configure $w.timelabel -row 2 -column 0 -sticky e
|
grid configure $w.timelabel -row 2 -column 0 -sticky e
|
||||||
grid configure $w.time -row 2 -column 1 -sticky nsew
|
grid configure $w.time -row 2 -column 1 -sticky nsew
|
||||||
|
|
||||||
label $w.langlabel -text "Language: "
|
|
||||||
menubutton $w.lang -text $Config(LANGUAGE) -indicatoron 1 -relief raised \
|
|
||||||
-menu $w.lang.menu
|
|
||||||
menu $w.lang.menu -tearoff 0
|
|
||||||
foreach lang {
|
|
||||||
"Brazilian Portuguese"
|
|
||||||
"Danish"
|
|
||||||
"Dutch"
|
|
||||||
"English"
|
|
||||||
"Finnish"
|
|
||||||
"French"
|
|
||||||
"German"
|
|
||||||
"Italian"
|
|
||||||
"Norwegian"
|
|
||||||
"Polish"
|
|
||||||
"Romanian"
|
|
||||||
"Spanish"
|
|
||||||
"Icelandic"
|
|
||||||
} {
|
|
||||||
$w.lang.menu add command -label $lang -command [list $w.lang configure -text $lang]
|
|
||||||
}
|
|
||||||
|
|
||||||
grid configure $w.langlabel -row 3 -column 0 -sticky e
|
|
||||||
grid configure $w.lang -row 3 -column 1 -sticky nsew
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
@@ -491,32 +464,16 @@ proc CreateCustomH {} {
|
|||||||
# %RETURNS:
|
# %RETURNS:
|
||||||
# Nothing
|
# Nothing
|
||||||
# %DESCRIPTION:
|
# %DESCRIPTION:
|
||||||
# Runs "make" with appropriate language definitions
|
# Runs "make"
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
proc CallMake {} {
|
proc CallMake {} {
|
||||||
global Options
|
global Options
|
||||||
set lang [$Options.lang cget -text]
|
|
||||||
switch -- $lang {
|
|
||||||
"German" { set lang GERMAN }
|
|
||||||
"Dutch" { set lang DUTCH }
|
|
||||||
"Finnish" { set lang FINNISH }
|
|
||||||
"French" { set lang FRENCH }
|
|
||||||
"Norwegian" { set lang NORWEGIAN }
|
|
||||||
"Danish" { set lang DANISH }
|
|
||||||
"Polish" { set lang POLISH }
|
|
||||||
"Brazilian Portuguese" { set lang BRAZPORT }
|
|
||||||
"Italian" { set lang ITALIAN }
|
|
||||||
"Romanian" { set lang ROMANIAN }
|
|
||||||
"Spanish" { set lang SPANISH }
|
|
||||||
"Icelandic" { set lang ICELANDIC }
|
|
||||||
default { set lang ENGLISH }
|
|
||||||
}
|
|
||||||
set nproc 0
|
set nproc 0
|
||||||
catch { set nproc [exec nproc] }
|
catch { set nproc [exec nproc] }
|
||||||
if { $nproc != 0 } {
|
if { $nproc != 0 } {
|
||||||
RunCommand "make -j $nproc \"LANGDEF=-DLANG=$lang\""
|
RunCommand "make -j $nproc"
|
||||||
} else {
|
} else {
|
||||||
RunCommand "make \"LANGDEF=-DLANG=$lang\""
|
RunCommand "make"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -786,7 +743,6 @@ proc SetConfigFromRemind {} {
|
|||||||
QueryRemind $rem LOCATION {$Location}
|
QueryRemind $rem LOCATION {$Location}
|
||||||
QueryRemind $rem DATESEP {$DateSep}
|
QueryRemind $rem DATESEP {$DateSep}
|
||||||
QueryRemind $rem TIMESEP {$TimeSep}
|
QueryRemind $rem TIMESEP {$TimeSep}
|
||||||
QueryRemind $rem LANGUAGE {language()}
|
|
||||||
|
|
||||||
set $Config(LAT_MIN) [expr abs($Config(LAT_MIN))]
|
set $Config(LAT_MIN) [expr abs($Config(LAT_MIN))]
|
||||||
set $Config(LAT_SEC) [expr abs($Config(LAT_SEC))]
|
set $Config(LAT_SEC) [expr abs($Config(LAT_SEC))]
|
||||||
|
|||||||
@@ -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)))))
|
||||||
|
|
||||||
|
|
||||||
@@ -188,21 +189,21 @@
|
|||||||
(defvar remind-conf-command-face 'remind-conf-command-face
|
(defvar remind-conf-command-face 'remind-conf-command-face
|
||||||
"Remind commands.")
|
"Remind commands.")
|
||||||
(defface remind-conf-command-face
|
(defface remind-conf-command-face
|
||||||
'((t :foreground "SeaGreen4" :bold t))
|
'((t :foreground "#FF8080"))
|
||||||
"Font Lock mode face used to highlight commands."
|
"Font Lock mode face used to highlight commands."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
(defvar remind-conf-keyword-face 'remind-conf-keyword-face
|
(defvar remind-conf-keyword-face 'remind-conf-keyword-face
|
||||||
"Remind keywords.")
|
"Remind keywords.")
|
||||||
(defface remind-conf-keyword-face
|
(defface remind-conf-keyword-face
|
||||||
'((t :foreground "blue violet"))
|
'((t :foreground "#FFFF80"))
|
||||||
"Font Lock mode face used to highlight keywords."
|
"Font Lock mode face used to highlight keywords."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
(defvar remind-conf-substitutes-face 'remind-conf-substitutes-face
|
(defvar remind-conf-substitutes-face 'remind-conf-substitutes-face
|
||||||
"Remind substitutes.")
|
"Remind substitutes.")
|
||||||
(defface remind-conf-substitutes-face
|
(defface remind-conf-substitutes-face
|
||||||
'((t :foreground "blue2"))
|
'((t :foreground "#8080FF"))
|
||||||
"Font Lock mode face used to highlight substitutes."
|
"Font Lock mode face used to highlight substitutes."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@
|
|||||||
(defvar remind-conf-variable-face 'remind-conf-variable-face
|
(defvar remind-conf-variable-face 'remind-conf-variable-face
|
||||||
"Remind variable.")
|
"Remind variable.")
|
||||||
(defface remind-conf-variable-face
|
(defface remind-conf-variable-face
|
||||||
'((t :foreground "DeepPink2" :bold t))
|
'((t :foreground "#FF8080" :bold t))
|
||||||
"Font Lock mode face used to highlight commands."
|
"Font Lock mode face used to highlight commands."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
@@ -237,14 +238,14 @@
|
|||||||
(defvar remind-comment-face 'remind-comment-face
|
(defvar remind-comment-face 'remind-comment-face
|
||||||
"Remind comments.")
|
"Remind comments.")
|
||||||
(defface remind-comment-face
|
(defface remind-comment-face
|
||||||
'((t :foreground "brown"))
|
'((t :foreground "#FF7F24"))
|
||||||
"Font-lock face for highlighting comments."
|
"Font-lock face for highlighting comments."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
(defvar remind-string-face 'remind-string-face
|
(defvar remind-string-face 'remind-string-face
|
||||||
"Remind strings.")
|
"Remind strings.")
|
||||||
(defface remind-string-face
|
(defface remind-string-face
|
||||||
'((t :foreground "tomato"))
|
'((t :foreground "#FF7FE0"))
|
||||||
"Font lock mode face used to highlight strings."
|
"Font lock mode face used to highlight strings."
|
||||||
:group 'remind-conf)
|
:group 'remind-conf)
|
||||||
|
|
||||||
@@ -296,11 +297,11 @@
|
|||||||
(defconst remind-conf-font-lock-keywords-1
|
(defconst remind-conf-font-lock-keywords-1
|
||||||
(list
|
(list
|
||||||
'("^\s*[\;\#].*$" . remind-comment-face)
|
'("^\s*[\;\#].*$" . remind-comment-face)
|
||||||
|
'("\"[^\"]*\"" . remind-string-face)
|
||||||
'(remind-keywords-matcher . remind-conf-keyword-face)
|
'(remind-keywords-matcher . remind-conf-keyword-face)
|
||||||
'("%[\"_]" . font-lock-warning-face)
|
'("%[\"_]" . font-lock-warning-face)
|
||||||
'("\\(%[a-mops-w]\\)" . remind-conf-substitutes-face)
|
'("\\(%[a-z]\\)" . remind-conf-substitutes-face)
|
||||||
'("\"[^\"]*\"" . remind-string-face))
|
"Minimal font-locking for `remind-conf-mode'."))
|
||||||
"Minimal font-locking for `remind-conf-mode'.")
|
|
||||||
|
|
||||||
(defconst remind-conf-font-lock-keywords-2
|
(defconst remind-conf-font-lock-keywords-2
|
||||||
(append remind-conf-font-lock-keywords-1
|
(append remind-conf-font-lock-keywords-1
|
||||||
|
|||||||
+28
-4
@@ -2,19 +2,43 @@ CHANGES TO REMIND
|
|||||||
|
|
||||||
* VERSION 5.2 Patch 0 - ????-??=??
|
* VERSION 5.2 Patch 0 - ????-??=??
|
||||||
|
|
||||||
- MAJOR NEW FEATURE: remind: Add the TRANSLATE command and the _()
|
- MAJOR NEW FEATURE: remind: Add the TRANSLATE command, the _()
|
||||||
built-in function. This allows you to localize your reminder files
|
built-in function and the %(...) substitution sequence. These allow
|
||||||
more easily.
|
you to localize your reminder files more easily.
|
||||||
|
|
||||||
|
- MAJOR CHANGE: remind: Remind used to support compile-time localization
|
||||||
|
into different languages (French, English, etc.) That compile-time
|
||||||
|
support has been removed and all localization is now done at run-time.
|
||||||
|
|
||||||
|
- NEW FEATURE: remind: In JSON daemon mode (-zj), the front-end can
|
||||||
|
request translation table entries from the Remind daemon, allowing the
|
||||||
|
front-end to localize messages.
|
||||||
|
|
||||||
- UPDATE: Update national holidays following update to upstream Python
|
- UPDATE: Update national holidays following update to upstream Python
|
||||||
library.
|
library.
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
- IMPROVEMENT: contrib/remind-conf-mode: Fix a few bugs and choose colors
|
||||||
|
that are easier on the eyes.
|
||||||
|
|
||||||
- IMPROVEMENT: remind: Remind used to have three completely separate
|
- IMPROVEMENT: remind: Remind used to have three completely separate
|
||||||
hash table implementations. Replace them all with one piece of code.
|
hash table implementations. They have all been replaced with a single
|
||||||
|
implementation; this new implementation adapts the hash table size based
|
||||||
|
on the number of entries and is dramatically faster than the old code
|
||||||
|
when there are a large number of entries.
|
||||||
|
|
||||||
- MINOR FIXES: remind: Fix typos in comments; use memcpy to copy OMIT
|
- MINOR FIXES: remind: Fix typos in comments; use memcpy to copy OMIT
|
||||||
contexts internally.
|
contexts internally.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
REM 1 Feb 2022 MSG [_("Chinese New Year")] ([_("Tiger")])
|
REM 1 Feb 2022 MSG %(Chinese New Year) (%(Tiger))
|
||||||
REM 22 Jan 2023 MSG [_("Chinese New Year")] ([_("Rabbit")])
|
REM 22 Jan 2023 MSG %(Chinese New Year) (%(Rabbit))
|
||||||
REM 10 Feb 2024 MSG [_("Chinese New Year")] ([_("Dragon")])
|
REM 10 Feb 2024 MSG %(Chinese New Year) (%(Dragon))
|
||||||
REM 29 Jan 2025 MSG [_("Chinese New Year")] ([_("Snake")])
|
REM 29 Jan 2025 MSG %(Chinese New Year) (%(Snake))
|
||||||
REM 17 Feb 2026 MSG [_("Chinese New Year")] ([_("Horse")])
|
REM 17 Feb 2026 MSG %(Chinese New Year) (%(Horse))
|
||||||
REM 6 Feb 2027 MSG [_("Chinese New Year")] ([_("Goat")])
|
REM 6 Feb 2027 MSG %(Chinese New Year) (%(Goat))
|
||||||
REM 26 Jan 2028 MSG [_("Chinese New Year")] ([_("Monkey")])
|
REM 26 Jan 2028 MSG %(Chinese New Year) (%(Monkey))
|
||||||
REM 13 Feb 2029 MSG [_("Chinese New Year")] ([_("Rooster")])
|
REM 13 Feb 2029 MSG %(Chinese New Year) (%(Rooster))
|
||||||
REM 3 Feb 2030 MSG [_("Chinese New Year")] ([_("Dog")])
|
REM 3 Feb 2030 MSG %(Chinese New Year) (%(Dog))
|
||||||
REM 23 Jan 2031 MSG [_("Chinese New Year")] ([_("Pig")])
|
REM 23 Jan 2031 MSG %(Chinese New Year) (%(Pig))
|
||||||
REM 11 Feb 2032 MSG [_("Chinese New Year")] ([_("Rat")])
|
REM 11 Feb 2032 MSG %(Chinese New Year) (%(Rat))
|
||||||
REM 31 Jan 2033 MSG [_("Chinese New Year")] ([_("Ox")])
|
REM 31 Jan 2033 MSG %(Chinese New Year) (%(Ox))
|
||||||
REM 19 Feb 2034 MSG [_("Chinese New Year")] ([_("Tiger")])
|
REM 19 Feb 2034 MSG %(Chinese New Year) (%(Tiger))
|
||||||
REM 8 Feb 2035 MSG [_("Chinese New Year")] ([_("Rabbit")])
|
REM 8 Feb 2035 MSG %(Chinese New Year) (%(Rabbit))
|
||||||
REM 28 Jan 2036 MSG [_("Chinese New Year")] ([_("Dragon")])
|
REM 28 Jan 2036 MSG %(Chinese New Year) (%(Dragon))
|
||||||
REM 15 Feb 2037 MSG [_("Chinese New Year")] ([_("Snake")])
|
REM 15 Feb 2037 MSG %(Chinese New Year) (%(Snake))
|
||||||
REM 4 Feb 2038 MSG [_("Chinese New Year")] ([_("Horse")])
|
REM 4 Feb 2038 MSG %(Chinese New Year) (%(Horse))
|
||||||
REM 24 Jan 2039 MSG [_("Chinese New Year")] ([_("Goat")])
|
REM 24 Jan 2039 MSG %(Chinese New Year) (%(Goat))
|
||||||
REM 12 Feb 2040 MSG [_("Chinese New Year")] ([_("Monkey")])
|
REM 12 Feb 2040 MSG %(Chinese New Year) (%(Monkey))
|
||||||
REM 1 Feb 2041 MSG [_("Chinese New Year")] ([_("Rooster")])
|
REM 1 Feb 2041 MSG %(Chinese New Year) (%(Rooster))
|
||||||
REM 22 Jan 2042 MSG [_("Chinese New Year")] ([_("Dog")])
|
REM 22 Jan 2042 MSG %(Chinese New Year) (%(Dog))
|
||||||
REM 10 Feb 2043 MSG [_("Chinese New Year")] ([_("Pig")])
|
REM 10 Feb 2043 MSG %(Chinese New Year) (%(Pig))
|
||||||
REM 30 Jan 2044 MSG [_("Chinese New Year")] ([_("Rat")])
|
REM 30 Jan 2044 MSG %(Chinese New Year) (%(Rat))
|
||||||
REM 17 Feb 2045 MSG [_("Chinese New Year")] ([_("Ox")])
|
REM 17 Feb 2045 MSG %(Chinese New Year) (%(Ox))
|
||||||
REM 6 Feb 2046 MSG [_("Chinese New Year")] ([_("Tiger")])
|
REM 6 Feb 2046 MSG %(Chinese New Year) (%(Tiger))
|
||||||
REM 26 Jan 2047 MSG [_("Chinese New Year")] ([_("Rabbit")])
|
REM 26 Jan 2047 MSG %(Chinese New Year) (%(Rabbit))
|
||||||
REM 14 Feb 2048 MSG [_("Chinese New Year")] ([_("Dragon")])
|
REM 14 Feb 2048 MSG %(Chinese New Year) (%(Dragon))
|
||||||
REM 2 Feb 2049 MSG [_("Chinese New Year")] ([_("Snake")])
|
REM 2 Feb 2049 MSG %(Chinese New Year) (%(Snake))
|
||||||
REM 23 Jan 2050 MSG [_("Chinese New Year")] ([_("Horse")])
|
REM 23 Jan 2050 MSG %(Chinese New Year) (%(Horse))
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file was created by Eloi Torrents <eloitor@disroot.org>
|
# This file was created by Eloi Torrents <eloitor@disroot.org>
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "ca"
|
||||||
|
|
||||||
SET $Monday "dilluns"
|
SET $Monday "dilluns"
|
||||||
SET $Tuesday "dimarts"
|
SET $Tuesday "dimarts"
|
||||||
SET $Wednesday "dimecres"
|
SET $Wednesday "dimecres"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Mogens Lynnerup.
|
# This file is derived from a translation by Mogens Lynnerup.
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "da"
|
||||||
|
|
||||||
SET $Sunday "Søndag"
|
SET $Sunday "Søndag"
|
||||||
SET $Monday "Mandag"
|
SET $Monday "Mandag"
|
||||||
SET $Tuesday "Tirsdag"
|
SET $Tuesday "Tirsdag"
|
||||||
|
|||||||
+30
-21
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Wolfgang Thronicke
|
# This file is derived from a translation by Wolfgang Thronicke
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "de"
|
||||||
|
|
||||||
# Day names
|
# Day names
|
||||||
SET $Sunday "Sonntag"
|
SET $Sunday "Sonntag"
|
||||||
SET $Monday "Montag"
|
SET $Monday "Montag"
|
||||||
@@ -64,28 +66,35 @@ FSET subst_p(alt, d, t) iif(d == today()+1, "", "en")
|
|||||||
|
|
||||||
# Localization of various astronomical events
|
# Localization of various astronomical events
|
||||||
|
|
||||||
# Perihelion
|
TRANSLATE "Perihelion" "Perihel"
|
||||||
SET earthseasons_Perihelion_str "Perihel"
|
TRANSLATE "Vernal Equinox" "Frühlingsanfang"
|
||||||
|
TRANSLATE "Summer Solstice" "Sommeranfang"
|
||||||
|
TRANSLATE "Aphelion" "Aphel"
|
||||||
|
TRANSLATE "Autumnal Equinox" "Herbstanfang"
|
||||||
|
TRANSLATE "Winter Solstice" "Winteranfang"
|
||||||
|
TRANSLATE "Daylight Saving Time Starts" "Beginn Sommerzeit"
|
||||||
|
TRANSLATE "Daylight Saving Time Ends" "Ende Sommerzeit"
|
||||||
|
|
||||||
# Vernal equinox
|
TRANSLATE "New Moon" "Neumond"
|
||||||
SET earthseasons_EquinoxMar_str "Frühlingsanfang"
|
TRANSLATE "First Quarter" "zunehmender Halbmond"
|
||||||
|
TRANSLATE "Full Moon" "Vollmond"
|
||||||
|
TRANSLATE "Last Quarter" "abnehmender Halbmond"
|
||||||
|
|
||||||
# Summer solstice
|
TRANSLATE "Chinese New Year" "Chinesisches Neujahr"
|
||||||
SET earthseasons_SolsticeJun_str "Sommeranfang"
|
TRANSLATE "Snake" "Schlange"
|
||||||
|
TRANSLATE "Horse" "Pferd"
|
||||||
|
TRANSLATE "Goat" "Ziege"
|
||||||
|
TRANSLATE "Monkey" "Affe"
|
||||||
|
TRANSLATE "Rooster" "Hahn"
|
||||||
|
TRANSLATE "Dog" "Hund"
|
||||||
|
TRANSLATE "Pig" "Schwein"
|
||||||
|
TRANSLATE "Rat" "Ratte"
|
||||||
|
TRANSLATE "Ox" "Ochse"
|
||||||
|
TRANSLATE "Tiger" "Tiger"
|
||||||
|
TRANSLATE "Rabbit" "Kaninchen"
|
||||||
|
TRANSLATE "Dragon" "Drachen"
|
||||||
|
|
||||||
# Aphelion
|
TRANSLATE "Sunrise" "Sonnenaufgang"
|
||||||
SET earthseasons_Aphelion_str "Aphel"
|
TRANSLATE "Sunset" "Sonnenuntergang"
|
||||||
|
|
||||||
# Autumnal Equinox
|
TRANSLATE "No reminders." "Keine Termine."
|
||||||
SET earthseasons_EquinoxSep_str "Herbstanfang"
|
|
||||||
|
|
||||||
# Winter Solstice
|
|
||||||
SET earthseasons_SolsticeDec_str "Winteranfang"
|
|
||||||
|
|
||||||
# Daylight saving time starts
|
|
||||||
SET daylightST_starts_str "Beginn Sommerzeit"
|
|
||||||
|
|
||||||
# Daylight saving time ends
|
|
||||||
SET daylightST_ends_str "Ende Sommerzeit"
|
|
||||||
|
|
||||||
PRESERVE earthseasons_Perihelion_str earthseasons_EquinoxMar_str earthseasons_SolsticeJun_str earthseasons_Aphelion_str earthseasons_EquinoxSep_str earthseasons_SolsticeDec_str daylightST_starts_str daylightST_ends_str
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Rafa Couto <rafacouto@biogate.com>
|
# This file is derived from a translation by Rafa Couto <rafacouto@biogate.com>
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "es"
|
||||||
|
|
||||||
SET $Sunday "Domingo"
|
SET $Sunday "Domingo"
|
||||||
SET $Monday "Lunes"
|
SET $Monday "Lunes"
|
||||||
SET $Tuesday "Martes"
|
SET $Tuesday "Martes"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Mikko Silvonen
|
# This file is derived from a translation by Mikko Silvonen
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "fi"
|
||||||
|
|
||||||
SET $Sunday "sunnuntai"
|
SET $Sunday "sunnuntai"
|
||||||
SET $Monday "maanantai"
|
SET $Monday "maanantai"
|
||||||
SET $Tuesday "tiistai"
|
SET $Tuesday "tiistai"
|
||||||
@@ -92,3 +94,103 @@ FSET subst_hour_past(h) iif(h==0, "", h + " " + $Hour + iif(h==1, " ", $Hplu + "
|
|||||||
FSET subst_min_past(m) iif(m==0, "", m + " " + $Minute + iif(m==1, " ", $Mplu + " "))
|
FSET subst_min_past(m) iif(m==0, "", m + " " + $Minute + iif(m==1, " ", $Mplu + " "))
|
||||||
FSET subst_hour_future(h) iif(h==0, "", h + " tunnin ")
|
FSET subst_hour_future(h) iif(h==0, "", h + " tunnin ")
|
||||||
FSET subst_min_future(m) iif(m==0, "", m + " minuutin ")
|
FSET subst_min_future(m) iif(m==0, "", m + " minuutin ")
|
||||||
|
|
||||||
|
TRANSLATE "Missing ']'" "Puuttuva ']'"
|
||||||
|
TRANSLATE "Missing quote" "Puuttuva lainausmerkki"
|
||||||
|
TRANSLATE "Expression too complex" "Liian monimutkainen lauseke"
|
||||||
|
TRANSLATE "Missing ')'" "Puuttuva ')'"
|
||||||
|
TRANSLATE "Undefined function" "Määrittelemätön funktio"
|
||||||
|
TRANSLATE "Illegal character" "Virheellinen merkki"
|
||||||
|
TRANSLATE "Expecting binary operator" "Kaksipaikkainen operaattori puuttuu"
|
||||||
|
TRANSLATE "Out of memory" "Muisti loppui"
|
||||||
|
TRANSLATE "Ill-formed number" "Virheellinen luku"
|
||||||
|
TRANSLATE "Can't coerce" "Tyyppimuunnos ei onnistu"
|
||||||
|
TRANSLATE "Type mismatch" "Virheellinen tyyppi"
|
||||||
|
TRANSLATE "Date overflow" "Liian suuri päiväys"
|
||||||
|
TRANSLATE "Division by zero" "Jako nollalla"
|
||||||
|
TRANSLATE "Undefined variable" "Määrittelemätön funktio"
|
||||||
|
TRANSLATE "Unexpected end of line" "Odottamaton rivin loppu"
|
||||||
|
TRANSLATE "Unexpected end of file" "Odottamaton tiedoston loppu"
|
||||||
|
TRANSLATE "I/O error" "Syöttö- tai tulostusvirhe"
|
||||||
|
TRANSLATE "Internal error" "Sisäinen virhe"
|
||||||
|
TRANSLATE "Bad date specification" "Virheellinen päiväys"
|
||||||
|
TRANSLATE "Not enough arguments" "Liian vähän argumentteja"
|
||||||
|
TRANSLATE "Too many arguments" "Liian paljon argumentteja"
|
||||||
|
TRANSLATE "Ill-formed time" "Virheellinen aika"
|
||||||
|
TRANSLATE "Number too high" "Liian suuri luku"
|
||||||
|
TRANSLATE "Number too low" "Liian pieni luku"
|
||||||
|
TRANSLATE "Can't open file" "Tiedoston avaus ei onnistu"
|
||||||
|
TRANSLATE "INCLUDE nested too deeply (max. 9)" "Liian monta sisäkkäistä INCLUDEa"
|
||||||
|
TRANSLATE "Parse error" "Jäsennysvirhe"
|
||||||
|
TRANSLATE "Can't compute trigger" "Laukaisuhetken laskenta ei onnistu"
|
||||||
|
TRANSLATE "Too many nested IFs" "Liian monta sisäkkäistä IF-lausetta"
|
||||||
|
TRANSLATE "ELSE with no matching IF" "ELSE ilman IF-lausetta"
|
||||||
|
TRANSLATE "ENDIF with no matching IF" "ENDIF ilman IF-lausetta"
|
||||||
|
TRANSLATE "Can't OMIT every weekday" "Kaikkia viikonpäiviä ei voi jättää pois"
|
||||||
|
TRANSLATE "Extraneous token(s) on line" "Ylimääräisiä merkkejä rivillä"
|
||||||
|
TRANSLATE "POP-OMIT-CONTEXT without matching PUSH-OMIT-CONTEXT" "POP-OMIT-CONTEXT ilman PUSH-OMIT-CONTEXTia"
|
||||||
|
TRANSLATE "RUN disabled" "RUN-lauseen käyttö estetty"
|
||||||
|
TRANSLATE "Domain error" "Arvoaluevirhe"
|
||||||
|
TRANSLATE "Invalid identifier" "Virheellinen tunniste"
|
||||||
|
TRANSLATE "Too many recursive function calls" "Liian monta rekursiivista toimintopuhelua"
|
||||||
|
TRANSLATE "Cannot modify system variable" "Järjestelmämuuttujan muuttaminen ei onnistu"
|
||||||
|
TRANSLATE "C library function can't represent date/time" "C-kirjastofunktio ei pysty esittämään päiväystä tai aikaa"
|
||||||
|
TRANSLATE "Attempt to redefine built-in function" "Sisäisen funktion määritelmää yritettiin muuttaa"
|
||||||
|
TRANSLATE "Can't nest function definition in expression" "Lausekkeessa ei voi olla sisäkkäisiä funktiomääritelmiä"
|
||||||
|
TRANSLATE "Must fully specify date to use repeat factor" "Päiväyksen täytyy olla täydellinen toistokertoimessa"
|
||||||
|
TRANSLATE "Year specified twice" "Vuosi annettu kahdesti"
|
||||||
|
TRANSLATE "Month specified twice" "Kuukausi annettu kahdesti"
|
||||||
|
TRANSLATE "Day specified twice" "Päivä annettu kahdesti"
|
||||||
|
TRANSLATE "Unknown token" "Tuntematon sana tai merkki"
|
||||||
|
TRANSLATE "Must specify month in OMIT command" "OMIT-komennossa on annettava kuukausi"
|
||||||
|
TRANSLATE "Too many full OMITs (max. 1000)" "Liian monta täydellistä OMIT-komentoa"
|
||||||
|
TRANSLATE "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT" "Varoitus: PUSH-OMIT-CONTEXT ilman POP-OMIT-CONTEXTia"
|
||||||
|
TRANSLATE "Error reading" "Virhe tiedoston luvussa"
|
||||||
|
TRANSLATE "Expecting end-of-line" "Pilkku puuttuu"
|
||||||
|
TRANSLATE "Invalid Hebrew date" "Virheellinen juutalainen päiväys"
|
||||||
|
TRANSLATE "iif(): odd number of arguments required" "IIF vaatii parittoman määrän argumentteja"
|
||||||
|
TRANSLATE "Warning: Missing ENDIF" "Varoitus: puuttuva ENDIF"
|
||||||
|
TRANSLATE "Expecting comma" "Pilkku puuttuu"
|
||||||
|
TRANSLATE "Weekday specified twice" "Viikonpäivä annettu kahdesti"
|
||||||
|
TRANSLATE "Only use one of BEFORE, AFTER or SKIP" "Käytä vain yhtä komennoista BEFORE, AFTER ja SKIP"
|
||||||
|
TRANSLATE "Can't nest MSG, MSF, RUN, etc. in expression" "Sisäkkäisiä MSG-, MSF- ja RUN-lauseita ei voi käyttää lausekkeessa"
|
||||||
|
TRANSLATE "Repeat value specified twice" "Toistokerroin annettu kahdesti"
|
||||||
|
TRANSLATE "Delta value specified twice" "Delta-arvo annettu kahdesti"
|
||||||
|
TRANSLATE "Back value specified twice" "Peruutusarvo annettu kahdesti"
|
||||||
|
TRANSLATE "ONCE keyword used twice. (Hah.)" "ONCE-avainsanaa käytetty kahdesti. (Hah.)"
|
||||||
|
TRANSLATE "Expecting time after AT" "AT-sanan perästä puuttuu aika"
|
||||||
|
TRANSLATE "THROUGH/UNTIL keyword used twice" "THROUGH/UNTIL-sanaa käytetty kahdesti"
|
||||||
|
TRANSLATE "Incomplete date specification" "Epätäydellinen päiväys"
|
||||||
|
TRANSLATE "FROM/SCANFROM keyword used twice" "FROM/SCANFROM-sanaa käytetty kahdesti"
|
||||||
|
TRANSLATE "Variable" "Muuttuja"
|
||||||
|
TRANSLATE "Value" "Arvo"
|
||||||
|
TRANSLATE "*UNDEFINED*" "*MÄÄRITTELEMÄTÖN*"
|
||||||
|
TRANSLATE "Entering UserFN" "Siirrytään funktioon"
|
||||||
|
TRANSLATE "Leaving UserFN" "Poistutaan funktiosta"
|
||||||
|
TRANSLATE "Expired" "Vanhentunut"
|
||||||
|
TRANSLATE "fork() failed - can't do queued reminders" "fork() epäonnistui - jonomuistutukset eivät toimi"
|
||||||
|
TRANSLATE "Can't access file" "Tiedoston avaus ei onnistu"
|
||||||
|
TRANSLATE "Illegal system date: Year is less than %d\n" "Virheellinen järjestelmäpäiväys: vuosi on vähemmän kuin %d\n"
|
||||||
|
TRANSLATE "Unknown debug flag '%c'\n" "Tuntematon virheenetsintätarkenne '%c'\n"
|
||||||
|
TRANSLATE "Unknown option '%c'\n" "Tuntematon tarkenne '%c'\n"
|
||||||
|
TRANSLATE "Unknown user '%s'\n" "Tuntematon käyttäjä '%s'\n"
|
||||||
|
TRANSLATE "Could not change gid to %d\n" "Ryhmänumeron vaihto %d:ksi ei onnistunut\n"
|
||||||
|
TRANSLATE "Could not change uid to %d\n" "Käyttäjänumeron vaihto %d:ksi ei onnistunut\n"
|
||||||
|
TRANSLATE "Out of memory for environment\n" "Muisti ei riitä ympäristölle\n"
|
||||||
|
TRANSLATE "Missing '=' sign" "Puuttuva '='-merkki"
|
||||||
|
TRANSLATE "Missing variable name" "Puuttuva muuttujanimi"
|
||||||
|
TRANSLATE "Missing expression" "Puuttuva lauseke"
|
||||||
|
TRANSLATE "Remind: '-i' option: %s\n" "Remind: tarkenne '-i': %s\n"
|
||||||
|
TRANSLATE "No reminders." "Ei viestejä."
|
||||||
|
TRANSLATE "%d reminder(s) queued for later today.\n" "%d viesti(ä) tämän päivän jonossa.\n"
|
||||||
|
TRANSLATE "Expecting number" "Numero puuttuu"
|
||||||
|
TRANSLATE "Undefined WARN function" "Virheellinen funktio WARN-lausekkeessa"
|
||||||
|
TRANSLATE "Can't convert between time zones" "Aikavyöhykkeiden välillä ei voi muuntaa"
|
||||||
|
TRANSLATE "No files matching *.rem" "Ei tiedostoja, jotka vastaavat *.rem"
|
||||||
|
TRANSLATE "String too long" "Merkkijono liian kauan"
|
||||||
|
TRANSLATE "Time specified twice" "Aika määritetty kahdesti"
|
||||||
|
TRANSLATE "Cannot specify DURATION without specifying AT" "Ei voi määrittää DURATION määrittelemättä AT"
|
||||||
|
TRANSLATE "Expecting weekday name" "Odotettu viikonpäivän nimi"
|
||||||
|
TRANSLATE "Duplicate argument name" "Päällekkäinen argumentin nimi"
|
||||||
|
TRANSLATE "Expression evaluation is disabled" "Lausekkeiden arviointi on poistettu käytöstä"
|
||||||
|
TRANSLATE "Time limit for expression evaluation exceeded" "Ilmaisun arvioinnin aikaraja ylitti"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Laurent Duperval
|
# This file is derived from a translation by Laurent Duperval
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "fr"
|
||||||
|
|
||||||
SET $Sunday "dimanche"
|
SET $Sunday "dimanche"
|
||||||
SET $Monday "lundi"
|
SET $Monday "lundi"
|
||||||
SET $Tuesday "mardi"
|
SET $Tuesday "mardi"
|
||||||
@@ -60,3 +62,101 @@ FSET subst_jx(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_a
|
|||||||
|
|
||||||
FSET subst_k_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date)
|
FSET subst_k_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date)
|
||||||
FSET subst_kx(alt, date, time) iif(alt, subst_k_alt(date), $On + " " + subst_k_alt(date))
|
FSET subst_kx(alt, date, time) iif(alt, subst_k_alt(date), $On + " " + subst_k_alt(date))
|
||||||
|
|
||||||
|
TRANSLATE "Missing ']'" "']' manquant"
|
||||||
|
TRANSLATE "Missing quote" "Apostrophe manquant"
|
||||||
|
TRANSLATE "Expression too complex" "Expression trop complexe"
|
||||||
|
TRANSLATE "Missing ')'" "')' manquante"
|
||||||
|
TRANSLATE "Undefined function" "Fonction non-définie"
|
||||||
|
TRANSLATE "Illegal character" "Caractère illégal"
|
||||||
|
TRANSLATE "Expecting binary operator" "Opérateur binaire attendu"
|
||||||
|
TRANSLATE "Out of memory" "Manque de mémoire"
|
||||||
|
TRANSLATE "Ill-formed number" "Nombre mal formé"
|
||||||
|
TRANSLATE "Can't coerce" "Impossible de convertir"
|
||||||
|
TRANSLATE "Type mismatch" "Types non-équivalents"
|
||||||
|
TRANSLATE "Date overflow" "Débordement de date"
|
||||||
|
TRANSLATE "Division by zero" "Division par zéro"
|
||||||
|
TRANSLATE "Undefined variable" "Variable non définie"
|
||||||
|
TRANSLATE "Unexpected end of line" "Fin de ligne non attendue"
|
||||||
|
TRANSLATE "Unexpected end of file" "Fin de fichier non attendue"
|
||||||
|
TRANSLATE "I/O error" "Erreur I/O"
|
||||||
|
TRANSLATE "Internal error" "Erreur interne"
|
||||||
|
TRANSLATE "Bad date specification" "Mauvaise date spécifiée"
|
||||||
|
TRANSLATE "Not enough arguments" "Pas assez d'arguments"
|
||||||
|
TRANSLATE "Too many arguments" "Trop d'arguments"
|
||||||
|
TRANSLATE "Ill-formed time" "Heure mal formée"
|
||||||
|
TRANSLATE "Number too high" "Nombre trop élevé"
|
||||||
|
TRANSLATE "Number too low" "Nombre trop bas"
|
||||||
|
TRANSLATE "Can't open file" "Impossible d'ouvrir le fichier"
|
||||||
|
TRANSLATE "INCLUDE nested too deeply (max. 9)" "Trop d'INCLUDE imbriqués"
|
||||||
|
TRANSLATE "Parse error" "Erreur d'analyse"
|
||||||
|
TRANSLATE "Can't compute trigger" "Impossible de calculer le déclenchement"
|
||||||
|
TRANSLATE "Too many nested IFs" "Trop de IF imbriqués"
|
||||||
|
TRANSLATE "ELSE with no matching IF" "ELSE sans IF correspondant"
|
||||||
|
TRANSLATE "ENDIF with no matching IF" "ENDIF sans IF correspondant"
|
||||||
|
TRANSLATE "Can't OMIT every weekday" "Impossible d'omettre (OMIT) tous les jours"
|
||||||
|
TRANSLATE "Extraneous token(s) on line" "Elément(s) étranger(s) sur la ligne"
|
||||||
|
TRANSLATE "POP-OMIT-CONTEXT without matching PUSH-OMIT-CONTEXT" "POP-OMIT-CONTEXT sans PUSH-OMIT-CONTEXT correspondant"
|
||||||
|
TRANSLATE "RUN disabled" "RUN déactivé"
|
||||||
|
TRANSLATE "Domain error" "Erreur de domaine"
|
||||||
|
TRANSLATE "Invalid identifier" "Identificateur invalide"
|
||||||
|
TRANSLATE "Too many recursive function calls" "Trop d'appels de fonctions récursives"
|
||||||
|
TRANSLATE "Cannot modify system variable" "Impossible de modifier une variable système"
|
||||||
|
TRANSLATE "C library function can't represent date/time" "Fonction de la librairie C ne peut représenter la date/l'heure"
|
||||||
|
TRANSLATE "Attempt to redefine built-in function" "Tentative de redéfinition d'une fonction intrinsèque"
|
||||||
|
TRANSLATE "Can't nest function definition in expression" "Impossible d'imbriquer une définition de fonction dans une expression"
|
||||||
|
TRANSLATE "Must fully specify date to use repeat factor" "Pour utiliser le facteur de répétition la date doit être spécifiée au complet"
|
||||||
|
TRANSLATE "Year specified twice" "Année spécifiée deux fois"
|
||||||
|
TRANSLATE "Month specified twice" "Mois spécifié deux fois"
|
||||||
|
TRANSLATE "Day specified twice" "Jour spécifié deux fois"
|
||||||
|
TRANSLATE "Unknown token" "Elément inconnu"
|
||||||
|
TRANSLATE "Must specify month in OMIT command" "Mois doit être spécifiés dans commande OMIT"
|
||||||
|
TRANSLATE "Too many full OMITs (max. 1000)" "Trop de OMITs complets"
|
||||||
|
TRANSLATE "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT" "Attention: PUSH-OMIT-CONTEXT sans POP-OMIT-CONTEXT correspondant"
|
||||||
|
TRANSLATE "Error reading" "Erreur à la lecture du fichier"
|
||||||
|
TRANSLATE "Expecting end-of-line" "Fin de ligne attendue"
|
||||||
|
TRANSLATE "Invalid Hebrew date" "Date hébreuse invalide"
|
||||||
|
TRANSLATE "iif(): odd number of arguments required" "IIF demande nombre d'arguments impair"
|
||||||
|
TRANSLATE "Warning: Missing ENDIF" "Attention: ENDIF manquant"
|
||||||
|
TRANSLATE "Expecting comma" "Virgule attendue"
|
||||||
|
TRANSLATE "Weekday specified twice" "Jour de la semaine spécifié deux fois"
|
||||||
|
TRANSLATE "Only use one of BEFORE, AFTER or SKIP" "Utiliser un seul parmi BEFORE, AFTER ou SKIP"
|
||||||
|
TRANSLATE "Can't nest MSG, MSF, RUN, etc. in expression" "Impossible d'imbriquer MSG, MSF, RUN, etc. dans une expression"
|
||||||
|
TRANSLATE "Repeat value specified twice" "Valeur de répétition spécifiée deux fois"
|
||||||
|
TRANSLATE "Delta value specified twice" "Valeur delta spécifiée deux fois"
|
||||||
|
TRANSLATE "Back value specified twice" "Valeur de retour spécifiée deux fois"
|
||||||
|
TRANSLATE "ONCE keyword used twice. (Hah.)" "Mot-clé ONCE utilisé deux fois. (Hah.)"
|
||||||
|
TRANSLATE "Expecting time after AT" "Heure attendue après AT"
|
||||||
|
TRANSLATE "THROUGH/UNTIL keyword used twice" "Mot-clé THROUGH/UNTIL utilisé deux fois"
|
||||||
|
TRANSLATE "Incomplete date specification" "Spécification de date incomplète"
|
||||||
|
TRANSLATE "FROM/SCANFROM keyword used twice" "Mot-clé FROM/SCANFROM utilisé deux fois"
|
||||||
|
TRANSLATE "Variable" "Variable"
|
||||||
|
TRANSLATE "Value" "Valeur"
|
||||||
|
TRANSLATE "*UNDEFINED*" "*NON-DEFINI*"
|
||||||
|
TRANSLATE "Entering UserFN" "Entrée dans UserFN"
|
||||||
|
TRANSLATE "Leaving UserFN" "Sortie de UserFN"
|
||||||
|
TRANSLATE "Expired" "Expiré"
|
||||||
|
TRANSLATE "fork() failed - can't do queued reminders" "fork() échoué - impossible de faire les appels en queue"
|
||||||
|
TRANSLATE "Can't access file" "Impossible d'accéder au fichier"
|
||||||
|
TRANSLATE "Illegal system date: Year is less than %d\n" "Date système illégale: Année est inférieure à %d\n"
|
||||||
|
TRANSLATE "Unknown debug flag '%c'\n" "Option de déverminage inconnue '%c'\n"
|
||||||
|
TRANSLATE "Unknown option '%c'\n" "Option inconnue '%c'\n"
|
||||||
|
TRANSLATE "Unknown user '%s'\n" "Usager inconnu '%s'\n"
|
||||||
|
TRANSLATE "Could not change gid to %d\n" "Impossible de changer gid pour %d\n"
|
||||||
|
TRANSLATE "Could not change uid to %d\n" "Impossible de changer uid pour %d\n"
|
||||||
|
TRANSLATE "Out of memory for environment\n" "Manque de mémoire pour environnement\n"
|
||||||
|
TRANSLATE "Missing '=' sign" "Signe '=' manquant"
|
||||||
|
TRANSLATE "Missing variable name" "Nom de variable absent"
|
||||||
|
TRANSLATE "Missing expression" "Expression absente"
|
||||||
|
TRANSLATE "%d reminder(s) queued for later today.\n" "%d rappel(s) en file pour aujourd'hui.\n"
|
||||||
|
TRANSLATE "Expecting number" "Nombre attendu"
|
||||||
|
TRANSLATE "Undefined WARN function" "Fonction illégale après WARN"
|
||||||
|
TRANSLATE "Can't convert between time zones" "Impossible de convertir entre les fuseaux horaires"
|
||||||
|
TRANSLATE "No files matching *.rem" "Aucun fichier correspondant à *.rem"
|
||||||
|
TRANSLATE "String too long" "Chaîne trop longue"
|
||||||
|
TRANSLATE "Time specified twice" "Heure spécifiée deux fois"
|
||||||
|
TRANSLATE "Cannot specify DURATION without specifying AT" "Impossible de spécifier DURATION sans spécifier AT"
|
||||||
|
TRANSLATE "Expecting weekday name" "Nom du jour de la semaine attendu"
|
||||||
|
TRANSLATE "Duplicate argument name" "Nom de l'argument en double"
|
||||||
|
TRANSLATE "Expression evaluation is disabled" "L'évaluation de l'expression est désactivée"
|
||||||
|
TRANSLATE "Time limit for expression evaluation exceeded" "Délai d'évaluation de l'expression dépassé"
|
||||||
|
|||||||
+10
-27
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by jarlaxl lamat (jarlaxl@freemail.gr)
|
# This file is derived from a translation by jarlaxl lamat (jarlaxl@freemail.gr)
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "gr"
|
||||||
|
|
||||||
SET $Sunday "Κυριακή"
|
SET $Sunday "Κυριακή"
|
||||||
SET $Monday "Δευτέρα"
|
SET $Monday "Δευτέρα"
|
||||||
SET $Tuesday "Τρίτη"
|
SET $Tuesday "Τρίτη"
|
||||||
@@ -56,30 +58,11 @@ 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_ux(alt, d, t) subst_ax(alt, d, t)
|
||||||
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
|
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
|
||||||
|
|
||||||
# Localization of various astronomical events
|
TRANSLATE "Perihelion" "Περιήλιον"
|
||||||
|
TRANSLATE "Vernal Equinox" "Εαρινή ισημερία"
|
||||||
# Perihelion
|
TRANSLATE "Summer Solstice" "Θερινό ηλιοστάσιο"
|
||||||
SET earthseasons_Perihelion_str "Περιήλιον"
|
TRANSLATE "Aphelion" "Αφήλιον"
|
||||||
|
TRANSLATE "Autumnal Equinox" "Φθινοπωρινή ισημερία"
|
||||||
# Vernal equinox
|
TRANSLATE "Winter Solstice" "Χειμερινό ηλιοστάσιο"
|
||||||
SET earthseasons_EquinoxMar_str "Εαρινή ισημερία"
|
TRANSLATE "Daylight Saving Time Starts" "Έναρξη θέρους"
|
||||||
|
TRANSLATE "Daylight Saving Time Ends" "Τέλος θέρους"
|
||||||
# Summer solstice
|
|
||||||
SET earthseasons_SolsticeJun_str "Θερινό ηλιοστάσιο"
|
|
||||||
|
|
||||||
# Aphelion
|
|
||||||
SET earthseasons_Aphelion_str "Αφήλιον"
|
|
||||||
|
|
||||||
# Autumnal Equinox
|
|
||||||
SET earthseasons_EquinoxSep_str "Φθινοπωρινή ισημερία"
|
|
||||||
|
|
||||||
# Winter Solstice
|
|
||||||
SET earthseasons_SolsticeDec_str "Χειμερινό ηλιοστάσιο"
|
|
||||||
|
|
||||||
# Daylight saving time starts
|
|
||||||
SET daylightST_starts_str "Έναρξη θέρους"
|
|
||||||
|
|
||||||
# Daylight saving time ends
|
|
||||||
SET daylightST_ends_str "Τέλος θέρους"
|
|
||||||
|
|
||||||
PRESERVE earthseasons_Perihelion_str earthseasons_EquinoxMar_str earthseasons_SolsticeJun_str earthseasons_Aphelion_str earthseasons_EquinoxSep_str earthseasons_SolsticeDec_str daylightST_starts_str daylightST_ends_str
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Björn Davíðsson (bjossi@snerpa.is)
|
# This file is derived from a translation by Björn Davíðsson (bjossi@snerpa.is)
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "is"
|
||||||
|
|
||||||
SET $Sunday "sunnudagur"
|
SET $Sunday "sunnudagur"
|
||||||
SET $Monday "mánudagur"
|
SET $Monday "mánudagur"
|
||||||
SET $Tuesday "þriðjudagur"
|
SET $Tuesday "þriðjudagur"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Valerio Aimale
|
# This file is derived from a translation by Valerio Aimale
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "it"
|
||||||
|
|
||||||
SET $Sunday "Domenica"
|
SET $Sunday "Domenica"
|
||||||
SET $Monday "Lunedì"
|
SET $Monday "Lunedì"
|
||||||
SET $Tuesday "Martedì"
|
SET $Tuesday "Martedì"
|
||||||
|
|||||||
+15
-4
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Willem Kasdorp and Erik-Jan Vens
|
# This file is derived from a translation by Willem Kasdorp and Erik-Jan Vens
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "nl"
|
||||||
|
|
||||||
SET $Sunday "zondag"
|
SET $Sunday "zondag"
|
||||||
SET $Monday "maandag"
|
SET $Monday "maandag"
|
||||||
SET $Tuesday "dinsdag"
|
SET $Tuesday "dinsdag"
|
||||||
@@ -27,7 +29,7 @@ SET $December "december"
|
|||||||
SET $Today "vandaag"
|
SET $Today "vandaag"
|
||||||
SET $Tomorrow "morgen"
|
SET $Tomorrow "morgen"
|
||||||
|
|
||||||
BANNER Herinneringen voor %w, %d%s %m, %y%o:
|
BANNER Herinneringen voor %w, %d %m, %y%o:
|
||||||
|
|
||||||
SET $Am "am"
|
SET $Am "am"
|
||||||
SET $Pm "pm"
|
SET $Pm "pm"
|
||||||
@@ -55,15 +57,16 @@ FSET subst_hours(h) iif(h==1, "1 uur", h + " uren")
|
|||||||
|
|
||||||
FSET subst_bx(a, d, t) "over " + (d-today()) + " dagen"
|
FSET subst_bx(a, d, t) "over " + (d-today()) + " dagen"
|
||||||
|
|
||||||
|
FSET subst_s(a, d, t) iif(day(d) == 1 || day(d) == 8, "e", day(d) < 20, "de", "te")
|
||||||
TRANSLATE "New Moon" "Nieuwe maan"
|
TRANSLATE "New Moon" "Nieuwe maan"
|
||||||
TRANSLATE "First Quarter" "Eerste kwartier"
|
TRANSLATE "First Quarter" "Eerste kwartier"
|
||||||
TRANSLATE "Full Moon" "Volle maan"
|
TRANSLATE "Full Moon" "Volle maan"
|
||||||
TRANSLATE "Last Quarter" "Laatste kwartier"
|
TRANSLATE "Last Quarter" "Laatste kwartier"
|
||||||
|
|
||||||
TRANSLATE "Vernal Equiniox" "Lente-equinox"
|
TRANSLATE "Vernal Equinox" "Lente-equinox"
|
||||||
TRANSLATE "Summer Solstice" "Zomerzonnewend"
|
TRANSLATE "Summer Solstice" "Zomerzonnewende"
|
||||||
TRANSLATE "Autumnal Equinox" "Herfst-equinox"
|
TRANSLATE "Autumnal Equinox" "Herfst-equinox"
|
||||||
TRANSLATE "Winter Solstice" "Winterzonnewend"
|
TRANSLATE "Winter Solstice" "Winterzonnewende"
|
||||||
|
|
||||||
TRANSLATE "Chinese New Year" "Chinees Nieuwjaar"
|
TRANSLATE "Chinese New Year" "Chinees Nieuwjaar"
|
||||||
TRANSLATE "Snake" "Slang"
|
TRANSLATE "Snake" "Slang"
|
||||||
@@ -75,3 +78,11 @@ TRANSLATE "Dog" "Hond"
|
|||||||
TRANSLATE "Pig" "Varken"
|
TRANSLATE "Pig" "Varken"
|
||||||
TRANSLATE "Rat" "Rat"
|
TRANSLATE "Rat" "Rat"
|
||||||
TRANSLATE "Ox" "Os"
|
TRANSLATE "Ox" "Os"
|
||||||
|
TRANSLATE "Tiger" "Tijger"
|
||||||
|
TRANSLATE "Rabbit" "Konijn"
|
||||||
|
TRANSLATE "Dragon" "Draak"
|
||||||
|
|
||||||
|
TRANSLATE "Sunrise" "Zonsopgang"
|
||||||
|
TRANSLATE "Sunset" "Zonsondergang"
|
||||||
|
|
||||||
|
TRANSLATE "No reminders." "Geen herinneringen."
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Trygve Randen
|
# This file is derived from a translation by Trygve Randen
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "no"
|
||||||
|
|
||||||
SET $Sunday "Søndag"
|
SET $Sunday "Søndag"
|
||||||
SET $Monday "Mandag"
|
SET $Monday "Mandag"
|
||||||
SET $Tuesday "Tirsdag"
|
SET $Tuesday "Tirsdag"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Jerzy Sobczyk
|
# This file is derived from a translation by Jerzy Sobczyk
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "pl"
|
||||||
|
|
||||||
SET $Sunday "Niedziela"
|
SET $Sunday "Niedziela"
|
||||||
SET $Monday "Poniedziałek"
|
SET $Monday "Poniedziałek"
|
||||||
SET $Tuesday "Wtorek"
|
SET $Tuesday "Wtorek"
|
||||||
@@ -67,3 +69,104 @@ FSET subst_1past(diff) iif(diff/60==0, subst_1min(diff%60), diff%60==0, subst_1h
|
|||||||
|
|
||||||
FSET subst_1min(m) m + " " + $Minute + subst_pl_plu(m)
|
FSET subst_1min(m) m + " " + $Minute + subst_pl_plu(m)
|
||||||
FSET subst_1h(h) h + " " + $Hour + subst_pl_plu(h)
|
FSET subst_1h(h) h + " " + $Hour + subst_pl_plu(h)
|
||||||
|
|
||||||
|
TRANSLATE "Ok" "OK"
|
||||||
|
TRANSLATE "Missing ']'" "Brakujący ']'"
|
||||||
|
TRANSLATE "Missing quote" "Brakujący nawias"
|
||||||
|
TRANSLATE "Expression too complex" "Zbyt skomplikowane wyrażenie"
|
||||||
|
TRANSLATE "Missing ')'" "Brakujący ')'"
|
||||||
|
TRANSLATE "Undefined function" "Nie zdefiniowana funkcja"
|
||||||
|
TRANSLATE "Illegal character" "Nielegalny znak"
|
||||||
|
TRANSLATE "Expecting binary operator" "Spodziewany operator binarny"
|
||||||
|
TRANSLATE "Out of memory" "Brak pamięci"
|
||||||
|
TRANSLATE "Ill-formed number" "Niepoprawny numer"
|
||||||
|
TRANSLATE "Can't coerce" "Niemożliwa konwersja"
|
||||||
|
TRANSLATE "Type mismatch" "Błąd typu"
|
||||||
|
TRANSLATE "Date overflow" "Nadmiar daty"
|
||||||
|
TRANSLATE "Division by zero" "Dzielenie przez zero"
|
||||||
|
TRANSLATE "Undefined variable" "Niezdefiniowana zmienna"
|
||||||
|
TRANSLATE "Unexpected end of line" "Niespodziewany koniec linii"
|
||||||
|
TRANSLATE "Unexpected end of file" "Niespodziewany koniec pliku"
|
||||||
|
TRANSLATE "I/O error" "Błąd wejscia/wyjscia"
|
||||||
|
TRANSLATE "Internal error" "Błąd wewnętrzny"
|
||||||
|
TRANSLATE "Bad date specification" "Zła specyfikacja daty"
|
||||||
|
TRANSLATE "Not enough arguments" "Za mało argumentów"
|
||||||
|
TRANSLATE "Too many arguments" "Za dużo argumentów"
|
||||||
|
TRANSLATE "Ill-formed time" "Nieprawidłowy czas"
|
||||||
|
TRANSLATE "Number too high" "Liczba za duża"
|
||||||
|
TRANSLATE "Number too low" "Liczba za mała"
|
||||||
|
TRANSLATE "Can't open file" "Nie mogę otworzyć pliku"
|
||||||
|
TRANSLATE "INCLUDE nested too deeply (max. 9)" "Zbyt zagnieżdżone INCLUDE"
|
||||||
|
TRANSLATE "Parse error" "Błąd składniowy"
|
||||||
|
TRANSLATE "Can't compute trigger" "Nie mogę obliczyć przypomnienia"
|
||||||
|
TRANSLATE "Too many nested IFs" "Zbyt zagnieżdżone IF"
|
||||||
|
TRANSLATE "ELSE with no matching IF" "ELSE bez IF do pary"
|
||||||
|
TRANSLATE "ENDIF with no matching IF" "ENDIF bez IF do pary"
|
||||||
|
TRANSLATE "Can't OMIT every weekday" "Nie mogę ominąć (OMIT) wszystkich dni"
|
||||||
|
TRANSLATE "Extraneous token(s) on line" "Niespodziewany wyraz w lini"
|
||||||
|
TRANSLATE "POP-OMIT-CONTEXT without matching PUSH-OMIT-CONTEXT" "POP-OMIT-CONTEXT bez PUSH-OMIT-CONTEXT"
|
||||||
|
TRANSLATE "RUN disabled" "Komenda RUN zablokowana"
|
||||||
|
TRANSLATE "Domain error" "Błąd dziedziny"
|
||||||
|
TRANSLATE "Invalid identifier" "Niepoprawny identyfikator"
|
||||||
|
TRANSLATE "Too many recursive function calls" "Wykryto rekursywne wywołanie funkcji"
|
||||||
|
TRANSLATE "Cannot modify system variable" "Nie mogę zmienić zmiennej systemowej"
|
||||||
|
TRANSLATE "C library function can't represent date/time" "Funkcja biblioteki C nie może reprezentowac daty/czasu"
|
||||||
|
TRANSLATE "Attempt to redefine built-in function" "Próba redefinicji funkcji wbudowanej"
|
||||||
|
TRANSLATE "Can't nest function definition in expression" "Nie wolno zagnieżdżać definicji funkcji w wyrażeniu"
|
||||||
|
TRANSLATE "Must fully specify date to use repeat factor" "Aby użyc powtórzenia trzeba w pełni wyspecyfikować datę"
|
||||||
|
TRANSLATE "Year specified twice" "Rok podany dwókrotnie"
|
||||||
|
TRANSLATE "Month specified twice" "Miesiąc podany dwókrotnie"
|
||||||
|
TRANSLATE "Day specified twice" "Dzień podany dwókrotnie"
|
||||||
|
TRANSLATE "Unknown token" "Nieznane słowo"
|
||||||
|
TRANSLATE "Must specify month in OMIT command" "W komendzie OMIT trzeba podać miesiąc"
|
||||||
|
TRANSLATE "Too many full OMITs (max. 1000)" "Za dużo pełnych komend OMIT"
|
||||||
|
TRANSLATE "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT" "Ostrzeżenie: PUSH-OMIT-CONTEXT bez POP-OMIT-CONTEXT"
|
||||||
|
TRANSLATE "Error reading" "Błąd odczytu pliku"
|
||||||
|
TRANSLATE "Expecting end-of-line" "Oczekiwany koniec linii"
|
||||||
|
TRANSLATE "Invalid Hebrew date" "Błędna data hebrajska"
|
||||||
|
TRANSLATE "iif(): odd number of arguments required" "IIF wymaga nieparzystej liczby argumentów"
|
||||||
|
TRANSLATE "Warning: Missing ENDIF" "Ostrzeżenie: Brakujacy ENDIF"
|
||||||
|
TRANSLATE "Expecting comma" "Oczekiwany przecinek"
|
||||||
|
TRANSLATE "Weekday specified twice" "Dzień tygodnia podany dwókrotnie"
|
||||||
|
TRANSLATE "Only use one of BEFORE, AFTER or SKIP" "Dozwolone tylko jedno z: BEFORE, AFTER i SKIP"
|
||||||
|
TRANSLATE "Can't nest MSG, MSF, RUN, etc. in expression" "Nie można zagnieżdżać MSG, MSF, RUN, itp. w wyrażeniu"
|
||||||
|
TRANSLATE "Repeat value specified twice" "Wartość powtorzenia podana dwókrotnie"
|
||||||
|
TRANSLATE "Delta value specified twice" "Wartość różnicy podana dwókrotnie"
|
||||||
|
TRANSLATE "Back value specified twice" "Wartość cofnięcia podana dwókrotnie"
|
||||||
|
TRANSLATE "ONCE keyword used twice. (Hah.)" "Słowo ONCE użyte dwókrotnie."
|
||||||
|
TRANSLATE "Expecting time after AT" "Po AT oczekiwany jest czas"
|
||||||
|
TRANSLATE "THROUGH/UNTIL keyword used twice" "Słowo THROUGH/UNTIL użyte dwókrotnie"
|
||||||
|
TRANSLATE "Incomplete date specification" "Niekompletna specyfikacja daty"
|
||||||
|
TRANSLATE "FROM/SCANFROM keyword used twice" "Słowo FROM/SCANFROM użyte dwókrotnie"
|
||||||
|
TRANSLATE "Variable" "Zmienna"
|
||||||
|
TRANSLATE "Value" "Wartość"
|
||||||
|
TRANSLATE "*UNDEFINED*" "*NIE ZDEFINIOWANE*"
|
||||||
|
TRANSLATE "Entering UserFN" "Początek UserFN"
|
||||||
|
TRANSLATE "Leaving UserFN" "Koniec UserFN"
|
||||||
|
TRANSLATE "Expired" "Przemineło"
|
||||||
|
TRANSLATE "fork() failed - can't do queued reminders" "Niepowodzenie w funkcji fork() - nie mogę kolejkować przypomnień"
|
||||||
|
TRANSLATE "Can't access file" "Nie ma dostępu do pliku"
|
||||||
|
TRANSLATE "Illegal system date: Year is less than %d\n" "Błędna data systemowa: Rok mniejszy niż %d\n"
|
||||||
|
TRANSLATE "Unknown debug flag '%c'\n" "Nieznana flaga odpluskwiania '%c'\n"
|
||||||
|
TRANSLATE "Unknown option '%c'\n" "Nieznana opcja '%c'\n"
|
||||||
|
TRANSLATE "Unknown user '%s'\n" "Nieznany użytkownik '%s'\n"
|
||||||
|
TRANSLATE "Could not change gid to %d\n" "Nie mogę zmienić gid na %d\n"
|
||||||
|
TRANSLATE "Could not change uid to %d\n" "Nie mogę zmienić uid na %d\n"
|
||||||
|
TRANSLATE "Out of memory for environment\n" "Brak pamięci na zmienne środowiska\n"
|
||||||
|
TRANSLATE "Missing '=' sign" "Brak znaku '='"
|
||||||
|
TRANSLATE "Missing variable name" "Brak nazwy zmiennej"
|
||||||
|
TRANSLATE "Missing expression" "Brak wyrażenia"
|
||||||
|
TRANSLATE "Remind: '-i' option: %s\n" "Remind: '-i' option: %s\n"
|
||||||
|
TRANSLATE "No reminders." "Brak przypomnień."
|
||||||
|
TRANSLATE "%d reminder(s) queued for later today.\n" "%d Przypomnienia zakolejkowane na później.\n"
|
||||||
|
TRANSLATE "Expecting number" "Spodziewana liczba"
|
||||||
|
TRANSLATE "Undefined WARN function" "Nielegalna funkcja w klauzuli WARN:"
|
||||||
|
TRANSLATE "Can't convert between time zones" "Nie można konwertować między strefami czasowymi"
|
||||||
|
TRANSLATE "No files matching *.rem" "Brak dopasowania plików *.rem"
|
||||||
|
TRANSLATE "String too long" "Ciąg za długo:"
|
||||||
|
TRANSLATE "Time specified twice" "Czas określony dwukrotnie:"
|
||||||
|
TRANSLATE "Cannot specify DURATION without specifying AT" "Nie można określić DURATION bez AT"
|
||||||
|
TRANSLATE "Expecting weekday name" "Oczekiwana nazwa dnia tygodnia"
|
||||||
|
TRANSLATE "Duplicate argument name" "Zduplikowana nazwa argumentu"
|
||||||
|
TRANSLATE "Expression evaluation is disabled" "Ocena wyrażeń jest wyłączona"
|
||||||
|
TRANSLATE "Time limit for expression evaluation exceeded" "Przekroczono limit czasu na ocenę wyrażenia"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Marco Paganini
|
# This file is derived from a translation by Marco Paganini
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "pt"
|
||||||
|
|
||||||
SET $Sunday "domingo"
|
SET $Sunday "domingo"
|
||||||
SET $Monday "segunda"
|
SET $Monday "segunda"
|
||||||
SET $Tuesday "terça"
|
SET $Tuesday "terça"
|
||||||
@@ -67,3 +69,103 @@ FSET subst_1(a, d, t) iif(t==now(), $Now, t>now(), "em " + subst_1help(t-now()),
|
|||||||
FSET subst_1help(diff) iif(diff/60==0, subst_mplu(diff%60), diff%60==0, subst_hplu(diff/60), subst_hplu(diff/60) + " " + $And + " " + subst_mplu(diff%60))
|
FSET subst_1help(diff) iif(diff/60==0, subst_mplu(diff%60), diff%60==0, subst_hplu(diff/60), subst_hplu(diff/60) + " " + $And + " " + subst_mplu(diff%60))
|
||||||
FSET subst_mplu(m) iif(m==1, "1 " + $Minute, m + " " + $Minute + $Mplu)
|
FSET subst_mplu(m) iif(m==1, "1 " + $Minute, m + " " + $Minute + $Mplu)
|
||||||
FSET subst_hplu(h) iif(h==1, "1 " + $Hour, h + " " + $Hour + $Hplu)
|
FSET subst_hplu(h) iif(h==1, "1 " + $Hour, h + " " + $Hour + $Hplu)
|
||||||
|
|
||||||
|
TRANSLATE "Missing ']'" "Falta um ']'"
|
||||||
|
TRANSLATE "Missing quote" "Falta uma aspa"
|
||||||
|
TRANSLATE "Expression too complex" "Expressao muito complexa"
|
||||||
|
TRANSLATE "Missing ')'" "Falta um ')'"
|
||||||
|
TRANSLATE "Undefined function" "Funcao nao definida"
|
||||||
|
TRANSLATE "Illegal character" "Caracter ilegal"
|
||||||
|
TRANSLATE "Expecting binary operator" "Esperando operador binario"
|
||||||
|
TRANSLATE "Out of memory" "Sem memoria"
|
||||||
|
TRANSLATE "Ill-formed number" "Numero mal-formado"
|
||||||
|
TRANSLATE "Can't coerce" "Nao consigo fazer 'coerce'"
|
||||||
|
TRANSLATE "Type mismatch" "Type mismatch"
|
||||||
|
TRANSLATE "Date overflow" "Overflow na data"
|
||||||
|
TRANSLATE "Division by zero" "Divisao por zero"
|
||||||
|
TRANSLATE "Undefined variable" "Variavel nao definida"
|
||||||
|
TRANSLATE "Unexpected end of line" "Fim da linha nao esperado"
|
||||||
|
TRANSLATE "Unexpected end of file" "Fim de arquivo nao esperado"
|
||||||
|
TRANSLATE "I/O error" "Erro de I/O"
|
||||||
|
TRANSLATE "Internal error" "Erro interno"
|
||||||
|
TRANSLATE "Bad date specification" "Especificacao de data invalida"
|
||||||
|
TRANSLATE "Not enough arguments" "Argumentos insuficientes"
|
||||||
|
TRANSLATE "Too many arguments" "Argumentos em excesso"
|
||||||
|
TRANSLATE "Ill-formed time" "Hora mal-formada"
|
||||||
|
TRANSLATE "Number too high" "Numero muito grande"
|
||||||
|
TRANSLATE "Number too low" "Numero muito pequeno"
|
||||||
|
TRANSLATE "Can't open file" "Nao consigo abrir o arquivo"
|
||||||
|
TRANSLATE "INCLUDE nested too deeply (max. 9)" "Ninho de INCLUDEs muito profundo"
|
||||||
|
TRANSLATE "Parse error" "Erro de parsing"
|
||||||
|
TRANSLATE "Can't compute trigger" "Nao consigo computar o 'trigger'"
|
||||||
|
TRANSLATE "Too many nested IFs" "Muitos IFs aninhados"
|
||||||
|
TRANSLATE "ELSE with no matching IF" "ELSE sem o IF correspondente"
|
||||||
|
TRANSLATE "ENDIF with no matching IF" "ENDIF sem o IF correspondente"
|
||||||
|
TRANSLATE "Can't OMIT every weekday" "Nao se pode usar OMIT para todos os dias da semana"
|
||||||
|
TRANSLATE "Extraneous token(s) on line" "Token nao reconhecido na linha"
|
||||||
|
TRANSLATE "POP-OMIT-CONTEXT without matching PUSH-OMIT-CONTEXT" "POP-OMIT-CONTEXT sem PUSH-OMIT-CONTEXT correspondente"
|
||||||
|
TRANSLATE "RUN disabled" "RUN desabilitado"
|
||||||
|
TRANSLATE "Domain error" "Erro de dominio"
|
||||||
|
TRANSLATE "Invalid identifier" "Identificados invalido"
|
||||||
|
TRANSLATE "Too many recursive function calls" "Muitas chamadas de função recursiva"
|
||||||
|
TRANSLATE "Cannot modify system variable" "Nao posso modificar variavel de sistema"
|
||||||
|
TRANSLATE "C library function can't represent date/time" "Funcao da biblioteca C nao pode representar data/hora"
|
||||||
|
TRANSLATE "Attempt to redefine built-in function" "Tentativa de redefinir funcao interna"
|
||||||
|
TRANSLATE "Can't nest function definition in expression" "Nao e' possivel aninhar definicao de funcao em expressao"
|
||||||
|
TRANSLATE "Must fully specify date to use repeat factor" "Data deve ser completamente especificada para usar o fator de REPEAT"
|
||||||
|
TRANSLATE "Year specified twice" "Ano especificado duas vezes"
|
||||||
|
TRANSLATE "Month specified twice" "Mes especificado duas vezes"
|
||||||
|
TRANSLATE "Day specified twice" "Dia especificado duas vezes"
|
||||||
|
TRANSLATE "Unknown token" "Token desconhecido"
|
||||||
|
TRANSLATE "Must specify month in OMIT command" "O mes deve ser especificados no comando OMIT"
|
||||||
|
TRANSLATE "Too many full OMITs (max. 1000)" "Muitos OMITs full"
|
||||||
|
TRANSLATE "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT" "Aviso: PUSH-OMIT-CONTEXT sem POP-OMIT-CONTEXT correspondente"
|
||||||
|
TRANSLATE "Error reading" "Erro na leitura do arquivo"
|
||||||
|
TRANSLATE "Expecting end-of-line" "Aguardando fim do arquivo"
|
||||||
|
TRANSLATE "Invalid Hebrew date" "Data hebraica invalida"
|
||||||
|
TRANSLATE "iif(): odd number of arguments required" "IIF necessita de numero impar de argumentos"
|
||||||
|
TRANSLATE "Warning: Missing ENDIF" "Warning: ENDIF faltando"
|
||||||
|
TRANSLATE "Expecting comma" "Esperando virgula"
|
||||||
|
TRANSLATE "Weekday specified twice" "Dia da semana especificado duas vezes"
|
||||||
|
TRANSLATE "Only use one of BEFORE, AFTER or SKIP" "Use apenas um de BEFORE, AFTER ou SKIP"
|
||||||
|
TRANSLATE "Can't nest MSG, MSF, RUN, etc. in expression" "Nao e possivel aninhar MSG, MSF, RUN, etc. em expressoes"
|
||||||
|
TRANSLATE "Repeat value specified twice" "Valor de Repeat especificado duas vezes"
|
||||||
|
TRANSLATE "Delta value specified twice" "Valor de Delta especificado duas vezes"
|
||||||
|
TRANSLATE "Back value specified twice" "Valor de Back especificado duas vezes"
|
||||||
|
TRANSLATE "ONCE keyword used twice. (Hah.)" "ONCE usado duas vezes (Eheheh)"
|
||||||
|
TRANSLATE "Expecting time after AT" "Esperando hora apos AT"
|
||||||
|
TRANSLATE "THROUGH/UNTIL keyword used twice" "Keyword THROUGH/UNTIL usada duas vezes"
|
||||||
|
TRANSLATE "Incomplete date specification" "Especificacao de data incompleta"
|
||||||
|
TRANSLATE "FROM/SCANFROM keyword used twice" "Keyword FROM/SCANFROM usada duas vezes"
|
||||||
|
TRANSLATE "Variable" "Variavel"
|
||||||
|
TRANSLATE "Value" "Valor"
|
||||||
|
TRANSLATE "*UNDEFINED*" "*INDEFINIDO*"
|
||||||
|
TRANSLATE "Entering UserFN" "Entrando UserFN"
|
||||||
|
TRANSLATE "Leaving UserFN" "Saindo UserFN"
|
||||||
|
TRANSLATE "Expired" "Expirou"
|
||||||
|
TRANSLATE "fork() failed - can't do queued reminders" "fork() falhou - Nao posso processar compromissos na fila"
|
||||||
|
TRANSLATE "Can't access file" "Nao consigo acessar o arquivo"
|
||||||
|
TRANSLATE "Illegal system date: Year is less than %d\n" "Data do sistema ilegal: Ano e menor que %d\n"
|
||||||
|
TRANSLATE "Unknown debug flag '%c'\n" "Flag de debug desconhecido '%c'\n"
|
||||||
|
TRANSLATE "Unknown option '%c'\n" "Opcao desconhecida '%c'\n"
|
||||||
|
TRANSLATE "Unknown user '%s'\n" "Usuario desconhecido '%s'\n"
|
||||||
|
TRANSLATE "Could not change gid to %d\n" "Nao consigo mudar gid para %d\n"
|
||||||
|
TRANSLATE "Could not change uid to %d\n" "Nao consigo mudar uid para %d\n"
|
||||||
|
TRANSLATE "Out of memory for environment\n" "Sem memoria para o environment\n"
|
||||||
|
TRANSLATE "Missing '=' sign" "Falta o sinal de '='"
|
||||||
|
TRANSLATE "Missing variable name" "Falta o nome da variavel"
|
||||||
|
TRANSLATE "Missing expression" "Falta a expressao"
|
||||||
|
TRANSLATE "Remind: '-i' option: %s\n" "Remind: '-i' opcao: %s\n"
|
||||||
|
TRANSLATE "No reminders." "Sem compromissos."
|
||||||
|
TRANSLATE "%d reminder(s) queued for later today.\n" "%d compromisso(s) colocados na fila para mais tarde.\n"
|
||||||
|
TRANSLATE "Expecting number" "Esperando numero"
|
||||||
|
TRANSLATE "Undefined WARN function" "Funcao ilegal na clausula WARN"
|
||||||
|
TRANSLATE "Can't convert between time zones" "Não consigo converter entre fusos horários"
|
||||||
|
TRANSLATE "No files matching *.rem" "Nenhum arquivo correspondente *.rem"
|
||||||
|
TRANSLATE "String too long" "String muito longa"
|
||||||
|
TRANSLATE "Time specified twice" "Tempo especificado duas vezes"
|
||||||
|
TRANSLATE "Cannot specify DURATION without specifying AT" "Não é possível especificar DURATION sem especificar AT"
|
||||||
|
TRANSLATE "Expecting weekday name" "Esperando nome do dia da semana"
|
||||||
|
TRANSLATE "Duplicate argument name" "Nome de argumento duplicado"
|
||||||
|
TRANSLATE "Expression evaluation is disabled" "A avaliação da expressão está desabilitada"
|
||||||
|
TRANSLATE "Time limit for expression evaluation exceeded" "Limite de tempo para avaliação de expressão excedido"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
# REMIND is Copyright (C) 1992-2024 by Dianne Skoll
|
||||||
# This file is derived from a translation by Liviu Daia
|
# This file is derived from a translation by Liviu Daia
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "ro"
|
||||||
|
|
||||||
SET $Sunday "Duminică"
|
SET $Sunday "Duminică"
|
||||||
SET $Monday "Luni"
|
SET $Monday "Luni"
|
||||||
SET $Tuesday "Marți"
|
SET $Tuesday "Marți"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ IF $CalMode || $PsCal
|
|||||||
REM [moondate(2)] SPECIAL MOON 2 -1 -1 [moontime(2)]
|
REM [moondate(2)] SPECIAL MOON 2 -1 -1 [moontime(2)]
|
||||||
REM [moondate(3)] SPECIAL MOON 3 -1 -1 [moontime(3)]
|
REM [moondate(3)] SPECIAL MOON 3 -1 -1 [moontime(3)]
|
||||||
ELSE
|
ELSE
|
||||||
REM NOQUEUE [moondatetime(0)] MSG [_("New Moon")] (%2)
|
REM NOQUEUE [moondatetime(0)] MSG %(New Moon) (%2)
|
||||||
REM NOQUEUE [moondatetime(1)] MSG [_("First Quarter")] (%2)
|
REM NOQUEUE [moondatetime(1)] MSG %(First Quarter) (%2)
|
||||||
REM NOQUEUE [moondatetime(2)] MSG [_("Full Moon")] (%2)
|
REM NOQUEUE [moondatetime(2)] MSG %(Full Moon) (%2)
|
||||||
REM NOQUEUE [moondatetime(3)] MSG [_("Last Quarter")] (%2)
|
REM NOQUEUE [moondatetime(3)] MSG %(Last Quarter) (%2)
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
+8
-8
@@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
IF $LatDeg >= 0
|
IF $LatDeg >= 0
|
||||||
# Northern Hemisphere
|
# Northern Hemisphere
|
||||||
REM NOQUEUE [soleq(0)] MSG %"[_("Vernal Equinox")]%" [$Is] %3.
|
REM NOQUEUE [soleq(0)] MSG %"%(Vernal Equinox)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(1)] MSG %"[_("Summer Solstice")]%" [$Is] %3.
|
REM NOQUEUE [soleq(1)] MSG %"%(Summer Solstice)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(2)] MSG %"[_("Autumnal Equinox")]%" [$Is] %3.
|
REM NOQUEUE [soleq(2)] MSG %"%(Autumnal Equinox)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(3)] MSG %"[_("Winter Solstice")]%" [$Is] %3.
|
REM NOQUEUE [soleq(3)] MSG %"%(Winter Solstice)%" [$Is] %3.
|
||||||
ELSE
|
ELSE
|
||||||
# Southern Hemisphere
|
# Southern Hemisphere
|
||||||
REM NOQUEUE [soleq(0)] MSG %"[_("Autumnal Equinox")]%" [$Is] %3.
|
REM NOQUEUE [soleq(0)] MSG %"%(Autumnal Equinox)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(1)] MSG %"[_("Winter Solstice")]%" [$Is] %3.
|
REM NOQUEUE [soleq(1)] MSG %"%(Winter Solstice)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(2)] MSG %"[_("Vernal Equinox")]%" [$Is] %3.
|
REM NOQUEUE [soleq(2)] MSG %"%(Vernal Equinox)%" [$Is] %3.
|
||||||
REM NOQUEUE [soleq(3)] MSG %"[_("Summer Solstice")]%" [$Is] %3.
|
REM NOQUEUE [soleq(3)] MSG %"%(Summer Solstice)%" [$Is] %3.
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Sunrise and sunset
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
IF !$CalMode && !$PsCal
|
||||||
|
REM NOQUEUE AT [sunrise()] MSG %"%"%(Sunrise) %! %2.
|
||||||
|
REM NOQUEUE AT [sunset()] MSG %"%"%(Sunset) %! %2.
|
||||||
|
ENDIF
|
||||||
@@ -336,6 +336,18 @@ older format contains enough information for them to work properly.
|
|||||||
.PP
|
.PP
|
||||||
\fBRemind \-p\fR sends the following lines to standard output.
|
\fBRemind \-p\fR sends the following lines to standard output.
|
||||||
The information is designed to be easily parsed by back-end programs:
|
The information is designed to be easily parsed by back-end programs:
|
||||||
|
.TP
|
||||||
|
.B # translations
|
||||||
|
This line signifies that the next line will be the translation table.
|
||||||
|
The line following \fB# translations\fR is a JSON object (on a single
|
||||||
|
line) containing all of the entries of the translation table. Back-ends that
|
||||||
|
are not interested in the translation table can simply read and discard
|
||||||
|
the next line.
|
||||||
|
.RS
|
||||||
|
If \fBRemind\fR sends data for multiple months, then only the first month
|
||||||
|
will include the translation table.
|
||||||
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B # rem2ps begin
|
.B # rem2ps begin
|
||||||
This line signifies the start of calendar data. Back-ends can search
|
This line signifies the start of calendar data. Back-ends can search
|
||||||
@@ -435,6 +447,16 @@ each reminder as a one-off event.
|
|||||||
.PP
|
.PP
|
||||||
The lines emitted by \fBremind \-pp\fR are as follows:
|
The lines emitted by \fBremind \-pp\fR are as follows:
|
||||||
.TP
|
.TP
|
||||||
|
.B # translations
|
||||||
|
This line signifies that the next line will be the translation table.
|
||||||
|
The line following \fB# translations\fR is a JSON object (on a single
|
||||||
|
line) containing all of the entries of the translation table. Back-ends that
|
||||||
|
are not interested in the translation table can simply read and discard
|
||||||
|
.RS
|
||||||
|
If \fBRemind\fR sends data for multiple months, then only the first month
|
||||||
|
will include the translation table.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
.B # rem2ps2 begin
|
.B # rem2ps2 begin
|
||||||
This line signifies the start of calendar data. Back-ends can search
|
This line signifies the start of calendar data. Back-ends can search
|
||||||
for it to verify they are being fed correct information. Note the
|
for it to verify they are being fed correct information. Note the
|
||||||
@@ -664,6 +686,10 @@ The number of days in the following month.
|
|||||||
The year of the following month. (The same as \fByear\fR unless the
|
The year of the following month. (The same as \fByear\fR unless the
|
||||||
current month is December.)
|
current month is December.)
|
||||||
.TP
|
.TP
|
||||||
|
.B translations \fR{\fIobject\fR}
|
||||||
|
A complete dump of the Remind translation table. In output for multiple
|
||||||
|
months, the translation table is included only with the first month.
|
||||||
|
.TP
|
||||||
.B entries \fR[\fIarray\fR]
|
.B entries \fR[\fIarray\fR]
|
||||||
The \fBentries\fR key consists of an array of calendar entries; each
|
The \fBentries\fR key consists of an array of calendar entries; each
|
||||||
entry is a JSON object that has the same format as described in the
|
entry is a JSON object that has the same format as described in the
|
||||||
|
|||||||
+155
-82
@@ -469,6 +469,20 @@ case-sensitive:
|
|||||||
The \fB\-\-version\fR option causes \fBRemind\fR to print its version number
|
The \fB\-\-version\fR option causes \fBRemind\fR to print its version number
|
||||||
to standard output and then exit.
|
to standard output and then exit.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-print-errs
|
||||||
|
The \fB\-\-print-errs\fR option causes \fBRemind\fR to print all possible
|
||||||
|
error messages to standard output and then exit. The messages are printed
|
||||||
|
in a format suitable for the first argument of a TRANSLATE command. If
|
||||||
|
you TRANSLATE the error messages, then \fBRemind\fR will use the translated
|
||||||
|
versions when outputting error and warning messages.
|
||||||
|
.RS
|
||||||
|
.PP
|
||||||
|
Note that if an untranslated message contains printf-style formatting
|
||||||
|
sequences like "%s" or "%d", then the translated message \fImust\fR
|
||||||
|
contain the same sequences in the same order, or \fBRemind\fR will
|
||||||
|
ignore it and use the original untranslated message.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
.B \-\-print-config-cmd
|
.B \-\-print-config-cmd
|
||||||
This option causes \fBRemind\fR to print the exact \fB./configure\fR
|
This option causes \fBRemind\fR to print the exact \fB./configure\fR
|
||||||
command that was used when \fBRemind\fR was built. You can use this
|
command that was used when \fBRemind\fR was built. You can use this
|
||||||
@@ -1598,6 +1612,10 @@ is replaced with "\fIyear\fR", the year of the trigger date.
|
|||||||
.B %z
|
.B %z
|
||||||
is replaced with "\fIyy\fR", the last two digits of the year.
|
is replaced with "\fIyy\fR", the last two digits of the year.
|
||||||
.TP
|
.TP
|
||||||
|
.B %(\fIany_text\fR\fB)
|
||||||
|
is replaced with the lookup of \fIany_text\fR in the translation table.
|
||||||
|
It is the equivalent of [_("any_text")] but is more convenient to type.
|
||||||
|
.TP
|
||||||
.B %_
|
.B %_
|
||||||
(percent-underscore) is replaced with a newline. You can use this to
|
(percent-underscore) is replaced with a newline. You can use this to
|
||||||
achieve multi-line reminders. Note that calendar back-ends vary in
|
achieve multi-line reminders. Note that calendar back-ends vary in
|
||||||
@@ -1906,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
|
||||||
@@ -1963,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
|
||||||
@@ -3032,6 +3055,25 @@ For example, consider this sequence:
|
|||||||
After those two lines have been executed, the variable \fBa\fR will be
|
After those two lines have been executed, the variable \fBa\fR will be
|
||||||
set to "Tot ziens". See the section THE TRANSLATION TABLE for more
|
set to "Tot ziens". See the section THE TRANSLATION TABLE for more
|
||||||
information.
|
information.
|
||||||
|
.PP
|
||||||
|
In the body of a reminder, the substitution sequence
|
||||||
|
\fB%(\fItext\fR\fB)\fR is (almost) the equivalent of
|
||||||
|
\fB[_("\fItext\fR\fB")]\fR. Therefore, the following reminders are
|
||||||
|
almost equivalent:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
|
||||||
|
REM MSG %(Goodbye)
|
||||||
|
REM MSG [_("Goodbye")]
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
The only difference is that if _("Goodbye") contains a \fB%\fR sign,
|
||||||
|
then that result will be run through the substitution filter, whereas
|
||||||
|
in the first reminder, it will not. That is because the second
|
||||||
|
\fBREM\fR command performs expression pasting followed by a
|
||||||
|
substitution filter pass, while the first one performs the translation
|
||||||
|
as part of the substitution filter (and does not make a second
|
||||||
|
substitution filter pass.)
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.B abs(i_num)
|
.B abs(i_num)
|
||||||
@@ -3490,12 +3532,13 @@ date part is used.) Note that any local \fBOMIT\fR or \fBOMITFUNC\fR
|
|||||||
clauses are \fInot\fR taken into account by this function.
|
clauses are \fInot\fR taken into account by this function.
|
||||||
.TP
|
.TP
|
||||||
.B language()
|
.B language()
|
||||||
Returns a \fBSTRING\fR naming the language supported by \fBRemind\fR.
|
Returns a \fBSTRING\fR naming the compiled-in language supported by
|
||||||
(See "SUPPORT FOR OTHER LANGUAGES") By default, \fBRemind\fR is compiled
|
\fBRemind\fR. Remind used to support compiled-in support for other
|
||||||
to support English messages, so this function returns "English". For
|
languages, but now all localization is done at run-time. As such,
|
||||||
other languages, this function will return the English name of the
|
this function always returnes "English". However, the expression
|
||||||
language (e.g. "German") Note that \fBlanguage()\fR is not available
|
\fB_("LANGID")\fR returns the two-character ISO 639 language code
|
||||||
in versions of \fBRemind\fR prior to 03.00.02.
|
of any language pack in effect, assuming the language pack author has
|
||||||
|
written the localization correctly!
|
||||||
.TP
|
.TP
|
||||||
.B localtoutc(q_datetime)
|
.B localtoutc(q_datetime)
|
||||||
Given a \fBDATETIME\fR object interpreted in the local time zone, return
|
Given a \fBDATETIME\fR object interpreted in the local time zone, return
|
||||||
@@ -3985,7 +4028,10 @@ output is not going to a TTY.
|
|||||||
.TP
|
.TP
|
||||||
.B strlen(s_str)
|
.B strlen(s_str)
|
||||||
Returns the length of \fIstr\fR. If the length of \fIstr\fR is too large
|
Returns the length of \fIstr\fR. If the length of \fIstr\fR is too large
|
||||||
to represent as an integer, emits a "Number too high" error.
|
to represent as an integer, emits a "Number too high" error. Note that
|
||||||
|
\fBstrlen\fR returns the number of \fIbytes\fR in the string, not the
|
||||||
|
number of \fIcharacters\fR. These numbers are the same for ASCII strings,
|
||||||
|
but may be different for UTF-8 strings.
|
||||||
.TP
|
.TP
|
||||||
.B substr(s_str, i_start [,i_end])
|
.B substr(s_str, i_start [,i_end])
|
||||||
Returns a \fBSTRING\fR consisting of all characters in \fIstr\fR from
|
Returns a \fBSTRING\fR consisting of all characters in \fIstr\fR from
|
||||||
@@ -5222,55 +5268,6 @@ You can also define a function on the command line by using:
|
|||||||
\fB\-i\fR\fIfunc\fR(\fIargs\fR)=\fIdefinition\fR
|
\fB\-i\fR\fIfunc\fR(\fIargs\fR)=\fIdefinition\fR
|
||||||
.PP
|
.PP
|
||||||
Be sure to protect special characters from shell interpretation.
|
Be sure to protect special characters from shell interpretation.
|
||||||
.SH THE TRANSLATION TABLE
|
|
||||||
.PP
|
|
||||||
To assist with localizing reminder files, \fBRemind\fR maintains a
|
|
||||||
table of translations. This is simple a lookup table that maps one
|
|
||||||
string (the original string) to a new string (the translated string.)
|
|
||||||
When \fBRemind\fR starts executing, the translation table is empty.
|
|
||||||
.PP
|
|
||||||
To add a message to the translation table, use the \fBTRANSLATE\fR
|
|
||||||
command (which may be abbreviated to \fBTRANS\fR.) The \fBTRANSLATE\fR
|
|
||||||
command must be followed by two quoted strings, separated from each
|
|
||||||
other and from the command by whitespace. For example, a Dutch
|
|
||||||
language file might contain something like this:
|
|
||||||
.PP
|
|
||||||
.nf
|
|
||||||
TRANSLATE "New Moon" "Nieuwe maan"
|
|
||||||
TRANSLATE "First Quarter" "Eerste kwartier"
|
|
||||||
TRANSLATE "Full Moon" "Volle maan"
|
|
||||||
TRANSLATE "Last Quarter" "Laatste kwartier"
|
|
||||||
.fi
|
|
||||||
.PP
|
|
||||||
To actually use the translation table, make use of the \fB_\fR built-in
|
|
||||||
function, as follows:
|
|
||||||
.PP
|
|
||||||
.nf
|
|
||||||
REM NOQUEUE [moondatetime(0)] MSG [_("New Moon")] (%2)
|
|
||||||
REM NOQUEUE [moondatetime(1)] MSG [_("First Quarter")] (%2)
|
|
||||||
REM NOQUEUE [moondatetime(2)] MSG [_("Full Moon")] (%2)
|
|
||||||
REM NOQUEUE [moondatetime(3)] MSG [_("Last Quarter")] (%2)
|
|
||||||
.fi
|
|
||||||
.PP
|
|
||||||
By using \fBTRANSLATE\fR and \fB_\fR judiciously, you can make your
|
|
||||||
reminder files easy to translate.
|
|
||||||
.PP
|
|
||||||
\fBTRANSLATE\fR has three additional forms: If it is followed
|
|
||||||
by \fIone\fR quoted string instead of two, then \fBRemind\fR deletes the
|
|
||||||
translation table entry for that string. If it is followed by
|
|
||||||
the keyword \fBDUMP\fR, then \fBRemind\fR dumps all translation table entries
|
|
||||||
to standard output. And if it is followed by \fBCLEAR\fR, then
|
|
||||||
\fBRemind\fR deletes all of the translation table entries.
|
|
||||||
.PP
|
|
||||||
Note that if you \fBSET\fR various translation-related system
|
|
||||||
variables such as \fB$Monday\fR, \fB$December\fR, \fB$Ago\fR, etc,
|
|
||||||
then \fBRemind\fR \fIalso\fR makes a corresponding translation
|
|
||||||
table entry automatically. This is done for all of the translation-related
|
|
||||||
system variables \fIexcept for\fR \fB$Hplu\fR and \fB$Mplu\fR.
|
|
||||||
.PP
|
|
||||||
The converse does not apply; creating a translation table entry for
|
|
||||||
"December" does not automatically set \fB$December\fR.
|
|
||||||
|
|
||||||
.SH MORE ABOUT POSTSCRIPT
|
.SH MORE ABOUT POSTSCRIPT
|
||||||
.PP
|
.PP
|
||||||
The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
|
The \fBPS\fR and \fBPSFILE\fR reminders pass PostScript code directly
|
||||||
@@ -5588,22 +5585,13 @@ error messages. For an example of this, define the following:
|
|||||||
.PP
|
.PP
|
||||||
.SH COMPILE-TIME SUPPORT FOR OTHER LANGUAGES
|
.SH COMPILE-TIME SUPPORT FOR OTHER LANGUAGES
|
||||||
.PP
|
.PP
|
||||||
Your version of \fBRemind\fR may have been compiled to support a
|
Remind used to support compile-time localization to other languages,
|
||||||
language other than English. This support may or may not be complete -
|
but no longer does. All localization is now done at run-time.
|
||||||
for example, all error and usage messages may still be in English.
|
|
||||||
However, at a minimum, non-English versions of \fBRemind\fR will
|
|
||||||
output names of months and weekdays in the selected language. Also,
|
|
||||||
the substitution mechanism will substitute constructs suitable for the
|
|
||||||
selected language rather than for English.
|
|
||||||
.PP
|
|
||||||
Note that a non-English version of \fBRemind\fR will accept \fIonly\fR
|
|
||||||
English names of weekdays and months in a reminder script.
|
|
||||||
.PP
|
.PP
|
||||||
.SH RUN-TIME SUPPORT FOR OTHER LANGUAGES
|
.SH RUN-TIME SUPPORT FOR OTHER LANGUAGES
|
||||||
.PP
|
.PP
|
||||||
\fBRemind\fR has run-time support for other languages, and it is
|
\fBRemind\fR has run-time support for other languages, and
|
||||||
expected that compile-time support will be deprecated in favour of
|
compile-time support has been removed in favour of run-time support.
|
||||||
run-time support.
|
|
||||||
.PP
|
.PP
|
||||||
A number of system variables let you translate various phrases
|
A number of system variables let you translate various phrases
|
||||||
to other languages. These system variables are:
|
to other languages. These system variables are:
|
||||||
@@ -5721,6 +5709,92 @@ If you use a \fB%{name}\fR sequence and the function \fBsubst_\fIname\fR is
|
|||||||
not defined or returns an error, then \fB%{name}\fR is replaced with the
|
not defined or returns an error, then \fB%{name}\fR is replaced with the
|
||||||
empty string.
|
empty string.
|
||||||
.PP
|
.PP
|
||||||
|
.SH THE TRANSLATION TABLE
|
||||||
|
.PP
|
||||||
|
To assist with localizing reminder files, \fBRemind\fR maintains a
|
||||||
|
table of translations. This is simple a lookup table that maps one
|
||||||
|
string (the original string) to a new string (the translated string.)
|
||||||
|
When \fBRemind\fR starts executing, the translation table is empty.
|
||||||
|
.PP
|
||||||
|
To add a message to the translation table, use the \fBTRANSLATE\fR
|
||||||
|
command (which may be abbreviated to \fBTRANS\fR.) The \fBTRANSLATE\fR
|
||||||
|
command must be followed by two quoted strings, separated from each
|
||||||
|
other and from the command by whitespace. For example, a Dutch
|
||||||
|
language file might contain something like this:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
TRANSLATE "New Moon" "Nieuwe maan"
|
||||||
|
TRANSLATE "First Quarter" "Eerste kwartier"
|
||||||
|
TRANSLATE "Full Moon" "Volle maan"
|
||||||
|
TRANSLATE "Last Quarter" "Laatste kwartier"
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
To actually use the translation table, make use of the \fB_\fR built-in
|
||||||
|
function, as follows:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
REM NOQUEUE [moondatetime(0)] MSG [_("New Moon")] (%2)
|
||||||
|
REM NOQUEUE [moondatetime(1)] MSG [_("First Quarter")] (%2)
|
||||||
|
REM NOQUEUE [moondatetime(2)] MSG [_("Full Moon")] (%2)
|
||||||
|
REM NOQUEUE [moondatetime(3)] MSG [_("Last Quarter")] (%2)
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
By using \fBTRANSLATE\fR and \fB_\fR judiciously, you can make your
|
||||||
|
reminder files easy to translate.
|
||||||
|
.PP
|
||||||
|
\fBTRANSLATE\fR has three additional forms: If it is followed
|
||||||
|
by \fIone\fR quoted string instead of two, then \fBRemind\fR deletes the
|
||||||
|
translation table entry for that string. If it is followed by
|
||||||
|
the keyword \fBDUMP\fR, then \fBRemind\fR dumps all translation table entries
|
||||||
|
to standard output. And if it is followed by \fBCLEAR\fR, then
|
||||||
|
\fBRemind\fR deletes all of the translation table entries.
|
||||||
|
.PP
|
||||||
|
Note that if you \fBSET\fR various translation-related system
|
||||||
|
variables such as \fB$Monday\fR, \fB$December\fR, \fB$Ago\fR, etc,
|
||||||
|
then \fBRemind\fR \fIalso\fR makes a corresponding translation
|
||||||
|
table entry automatically. This is done for all of the translation-related
|
||||||
|
system variables \fIexcept for\fR \fB$Hplu\fR and \fB$Mplu\fR.
|
||||||
|
.PP
|
||||||
|
The converse applies too; creating a translation table for
|
||||||
|
"December" automatically sets \fB$December\fR. And if you invoke
|
||||||
|
\fBTRANSLATE CLEAR\fR, then all translation-related system variables
|
||||||
|
are set to their default values as well.
|
||||||
|
.PP
|
||||||
|
The translation table always contains a special entry \fBLANGID\fR whose
|
||||||
|
default value is \fBen\fR. Translators are encouraged to add a \fBLANGID\fR
|
||||||
|
entry in their language files; the value should be the two-characters
|
||||||
|
ISO 639 language code.
|
||||||
|
.PP
|
||||||
|
For example, if you write a translation file for the Dutch language,
|
||||||
|
add this line:
|
||||||
|
.PP
|
||||||
|
.nf
|
||||||
|
TRANSLATE "LANGID" "nl"
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
Scripts can use \fB_("LANGID")\fR to query the translation language that is
|
||||||
|
in effect.
|
||||||
|
.PP
|
||||||
|
The \fB_()\fR function uses the following procedure to obtain the translation
|
||||||
|
for a string:
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
1
|
||||||
|
Look for an exact match. If found, return.
|
||||||
|
.TP
|
||||||
|
2
|
||||||
|
If the original string had an upper-case letter, search for the
|
||||||
|
all-lower-case equivalent. If found, make the first letter of the
|
||||||
|
result upper-case and return.
|
||||||
|
.TP
|
||||||
|
3
|
||||||
|
If the original string started with a lower-case letter, search
|
||||||
|
for an equivalent whose first letter is upper-case and the rest lower-case.
|
||||||
|
If found, make the first letter of the result lower-case and return.
|
||||||
|
.TP
|
||||||
|
4
|
||||||
|
No translation was found. Return the original string.
|
||||||
|
.RE
|
||||||
.SH LANGUAGE PACKS
|
.SH LANGUAGE PACKS
|
||||||
.PP
|
.PP
|
||||||
\fBRemind\fR ships with a number of language packs, which are simply reminder
|
\fBRemind\fR ships with a number of language packs, which are simply reminder
|
||||||
@@ -5735,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
|
||||||
@@ -6254,16 +6328,15 @@ Do not hard-code the above directory in your reminder files. Instead,
|
|||||||
use the value of the $SysInclude system variable.
|
use the value of the $SysInclude system variable.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
Dianne Skoll <dianne@skoll.ca> wrote \fBRemind\fR. The moon code
|
Dianne Skoll <dianne@skoll.ca> wrote \fBRemind\fR. The moon code was
|
||||||
was copied largely unmodified from "moontool" by John Walker. The
|
copied largely unmodified from "moontool" by John Walker. The sunrise
|
||||||
sunrise and sunset functions use ideas from programs by Michael
|
and sunset functions use ideas from programs by Michael Schwartz and
|
||||||
Schwartz and Marc T. Kaufman. The Hebrew calendar support was taken
|
Marc T. Kaufman. The Hebrew calendar support was taken from "hdate"
|
||||||
from "hdate" by Amos Shapir. OS/2 support was done by Darrel
|
by Amos Shapir. OS/2 support was done by Darrel Hankerson, Russ
|
||||||
Hankerson, Russ Herman, and Norman Walsh. The supported
|
Herman, and Norman Walsh. The supported languages and their
|
||||||
languages and their translators are listed below. Languages marked
|
translators are listed below. Languages marked "complete" support
|
||||||
"complete" support error messages and usage instructions in that
|
error messages in that language; all others only support the
|
||||||
language; all others only support the substitution filter mechanism
|
substitution filter mechanism and month/day names.
|
||||||
and month/day names.
|
|
||||||
.PP
|
.PP
|
||||||
\fBGerman\fR --
|
\fBGerman\fR --
|
||||||
Wolfgang Thronicke
|
Wolfgang Thronicke
|
||||||
|
|||||||
@@ -413,6 +413,39 @@ like this:
|
|||||||
The value of the \fBqueue\fR key is an array of JSON objects, each
|
The value of the \fBqueue\fR key is an array of JSON objects, each
|
||||||
representing a queued reminder.
|
representing a queued reminder.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
TRANSLATE Any string goes here
|
||||||
|
Returns the translation of "Any string goes here" according to \fBRemind\fR's
|
||||||
|
translation table. Note that there must be exactly one space after
|
||||||
|
TRANSLATE and before the string you wish to translate. The JSON object
|
||||||
|
that results from "TRANSLATE New Moon" might look like this:
|
||||||
|
.nf
|
||||||
|
|
||||||
|
{"response":"translate","translation":{"New Moon":"Nieuwe maan"},"command":"TRANSLATE"}
|
||||||
|
|
||||||
|
.fi
|
||||||
|
As you see, the value of the \fBtranslation\fR key is an object whose
|
||||||
|
key is the original text and value is the translated text. A
|
||||||
|
front-end can use TRANSLATE do its own localization; for example,
|
||||||
|
TkRemind uses it to localize the moon phase popup window for the
|
||||||
|
SPECIAL MOON display.
|
||||||
|
.RS
|
||||||
|
.PP
|
||||||
|
If the argument to TRANSLATE is not in the translation table, then
|
||||||
|
\fBRemind\fR \fIwill not issue any response at all\fR to the TRANSLATE command.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
TRANSLATE_DUMP
|
||||||
|
Returns the contents of the translation table. The JSON object looks
|
||||||
|
like this:
|
||||||
|
.nf
|
||||||
|
|
||||||
|
{"response":"translate_dump","table":{...},"command":"TRANSLATE_DUMP"}
|
||||||
|
|
||||||
|
.fi
|
||||||
|
The value of the \fBtable\fR key is a dictionary of original-to-translated
|
||||||
|
strings.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
DEL \fIqid\fR
|
DEL \fIqid\fR
|
||||||
Delete the reminder with queue-id \fIqid\fR from the queue.
|
Delete the reminder with queue-id \fIqid\fR from the queue.
|
||||||
|
|||||||
+37
-6
@@ -10,6 +10,8 @@ use Encode;
|
|||||||
|
|
||||||
my %Options;
|
my %Options;
|
||||||
|
|
||||||
|
my $Translations = {};
|
||||||
|
|
||||||
my $rem2html_version = '@VERSION@';
|
my $rem2html_version = '@VERSION@';
|
||||||
|
|
||||||
my($days, $shades, $moons, $classes, $Month, $Year, $Numdays, $Firstwkday, $Mondayfirst, $weeks,
|
my($days, $shades, $moons, $classes, $Month, $Year, $Numdays, $Firstwkday, $Mondayfirst, $weeks,
|
||||||
@@ -265,6 +267,31 @@ sub end_output
|
|||||||
print("</body>\n</html>\n");
|
print("</body>\n</html>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub slurp_translations
|
||||||
|
{
|
||||||
|
my $line;
|
||||||
|
|
||||||
|
$line = <STDIN>;
|
||||||
|
chomp $line;
|
||||||
|
eval {
|
||||||
|
if ($Options{utf8}) {
|
||||||
|
$Translations = decode_json(encode('UTF-8', $line, Encode::FB_DEFAULT));
|
||||||
|
} else {
|
||||||
|
$Translations = decode_json($line);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
$Translations = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub t
|
||||||
|
{
|
||||||
|
my ($str) = @_;
|
||||||
|
return $Translations->{$str} if exists($Translations->{$str});
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
sub parse_input
|
sub parse_input
|
||||||
{
|
{
|
||||||
undef $days;
|
undef $days;
|
||||||
@@ -275,8 +302,12 @@ sub parse_input
|
|||||||
|
|
||||||
my $found_data = 0;
|
my $found_data = 0;
|
||||||
while(<STDIN>) {
|
while(<STDIN>) {
|
||||||
chomp;
|
chomp;
|
||||||
last if /^\# rem2ps2? begin$/;
|
if (/# translations/) {
|
||||||
|
slurp_translations();
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
last if /^\# rem2ps2? begin$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $line;
|
my $line;
|
||||||
@@ -659,7 +690,7 @@ sub draw_day_cell
|
|||||||
} else {
|
} else {
|
||||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAC6SURBVDiNpdNNbsIwFATgL0HKolchHKBX6yFaBOEyoPYUabvOIVKJRaCL2JX5TRNGGvnJ8ozGz89cYoElPvET+BX2yivn/1Bggw5HHMKa1h2qcPZC/JEIhvh+brIZIY6sorhMYo9hh3KGFzzfa84NZNjDt9OG/ZcH1BlaPE1IAG0+URhxzNGESKPFaHJs9Q0Ziww7HnvGeXSrJhis0jiFfjwnj3I0WRv+TKtr4hQl3lDrZ6QN9Wt654hfWfGDmBpUwDkAAAAASUVORK5CYII=';
|
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAC6SURBVDiNpdNNbsIwFATgL0HKolchHKBX6yFaBOEyoPYUabvOIVKJRaCL2JX5TRNGGvnJ8ozGz89cYoElPvET+BX2yivn/1Bggw5HHMKa1h2qcPZC/JEIhvh+brIZIY6sorhMYo9hh3KGFzzfa84NZNjDt9OG/ZcH1BlaPE1IAG0+URhxzNGESKPFaHJs9Q0Ziww7HnvGeXSrJhis0jiFfjwnj3I0WRv+TKtr4hQl3lDrZ6QN9Wt654hfWfGDmBpUwDkAAAAASUVORK5CYII=';
|
||||||
}
|
}
|
||||||
$title = 'New Moon';
|
$title = escape_html(t('New Moon'));
|
||||||
$alt = 'new';
|
$alt = 'new';
|
||||||
} elsif ($phase == 1) {
|
} elsif ($phase == 1) {
|
||||||
if ($Options{pngs}) {
|
if ($Options{pngs}) {
|
||||||
@@ -667,7 +698,7 @@ sub draw_day_cell
|
|||||||
} else {
|
} else {
|
||||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADfSURBVDiNndM9TsNAFATgzy5yjZSAE85JBygETgENUPF3iBCitHAFQkcIhZ/Ryn9gRlrZmp2Z3ef3TBOHOMULPrDBMrhpi/4HI5xjix2+4nmJRbx/Yh7ahvkpRPVV4QDXwT3UQy46zGkAZDgK/iytefvHgCrkJsqZUH6cLnNbABSxd5Jhhf1IbkMXv8Qux7hH1Ic1xvk/jBWy6gavumvtwx7ectwZXkKh7MA95XgObeOtpI2U4zl0kGbpxgiPvwQUcXLrKFchc82f6Ur0PK49azOnmOI4TBu84zm4SV38DeIVYkrYJyNbAAAAAElFTkSuQmCC';
|
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADfSURBVDiNndM9TsNAFATgzy5yjZSAE85JBygETgENUPF3iBCitHAFQkcIhZ/Ryn9gRlrZmp2Z3ef3TBOHOMULPrDBMrhpi/4HI5xjix2+4nmJRbx/Yh7ahvkpRPVV4QDXwT3UQy46zGkAZDgK/iytefvHgCrkJsqZUH6cLnNbABSxd5Jhhf1IbkMXv8Qux7hH1Ic1xvk/jBWy6gavumvtwx7ectwZXkKh7MA95XgObeOtpI2U4zl0kGbpxgiPvwQUcXLrKFchc82f6Ur0PK49azOnmOI4TBu84zm4SV38DeIVYkrYJyNbAAAAAElFTkSuQmCC';
|
||||||
}
|
}
|
||||||
$title = 'First Quarter';
|
$title = escape_html(t('First Quarter'));
|
||||||
$alt = '1st';
|
$alt = '1st';
|
||||||
} elsif ($phase == 2) {
|
} elsif ($phase == 2) {
|
||||||
if ($Options{pngs}) {
|
if ($Options{pngs}) {
|
||||||
@@ -676,7 +707,7 @@ sub draw_day_cell
|
|||||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADlSURBVDiNrdNBUsJAEAXQlyw4hq4hwWPqTixET6ELkZ16CcAq7oFLqXExjaYgQVNlV/Viev7/6XT/4TjGuME7PiLXUatb8N8xwB12SFjiIXIZtU/MAntEfgvQE4YtHxhiHpjXQ5H7uLhEcaLLAleBvd0Xx9Ha/BdyU+Q5OBV5OKmj7a4YBWdSyNPe4aKHAHkzqcQZNj3JgnNexqE8heyIAulffuFF3kTfIVbBVeu/xoXGGsn2TLJJ/mqkafNiINszySYZdbS90GHlvcgsWktY4TFy7ecxTdvIzahxHQLbyFXUqkPwF2ASRNYgB/PXAAAAAElFTkSuQmCC';
|
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADlSURBVDiNrdNBUsJAEAXQlyw4hq4hwWPqTixET6ELkZ16CcAq7oFLqXExjaYgQVNlV/Viev7/6XT/4TjGuME7PiLXUatb8N8xwB12SFjiIXIZtU/MAntEfgvQE4YtHxhiHpjXQ5H7uLhEcaLLAleBvd0Xx9Ha/BdyU+Q5OBV5OKmj7a4YBWdSyNPe4aKHAHkzqcQZNj3JgnNexqE8heyIAulffuFF3kTfIVbBVeu/xoXGGsn2TLJJ/mqkafNiINszySYZdbS90GHlvcgsWktY4TFy7ecxTdvIzahxHQLbyFXUqkPwF2ASRNYgB/PXAAAAAElFTkSuQmCC';
|
||||||
}
|
}
|
||||||
$alt = 'full';
|
$alt = 'full';
|
||||||
$title = 'Full Moon';
|
$title = escape_html(t('Full Moon'));
|
||||||
} else {
|
} else {
|
||||||
if ($Options{pngs}) {
|
if ($Options{pngs}) {
|
||||||
$img = smoosh($Options{imgbase}, 'lastquarter.png');
|
$img = smoosh($Options{imgbase}, 'lastquarter.png');
|
||||||
@@ -684,7 +715,7 @@ sub draw_day_cell
|
|||||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADmSURBVDiNndMxTsNAEIXhzy5yCyQ6FAgcE7oQheQWUAAl5BIkREoZrgB0GFNkHBl7bURGsryaee/3jHeXdpxjghU+8InXyI0S+n0MMEeBEi+4jfV3vAvMQtsyL0J0j2GtViaeRRMyj8IlsgY8BSijE2Kur/hy09wHKMJrEolhwtwHKDHOsI4OLnoAXfl1jiNsOkR9keE4P8D4q4scbzg5xIxtjie709f1E7siC+9+Gx/8fxvPKtEsklcJSBdgWhcN8ByFR5z+AWgd5QpyE+OUWOJO+zJNU+Z6jHAdgHe7K73CuD5zFT9nCmRDIssCaAAAAABJRU5ErkJggg==';
|
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADmSURBVDiNndMxTsNAEIXhzy5yCyQ6FAgcE7oQheQWUAAl5BIkREoZrgB0GFNkHBl7bURGsryaee/3jHeXdpxjghU+8InXyI0S+n0MMEeBEi+4jfV3vAvMQtsyL0J0j2GtViaeRRMyj8IlsgY8BSijE2Kur/hy09wHKMJrEolhwtwHKDHOsI4OLnoAXfl1jiNsOkR9keE4P8D4q4scbzg5xIxtjie709f1E7siC+9+Gx/8fxvPKtEsklcJSBdgWhcN8ByFR5z+AWgd5QpyE+OUWOJO+zJNU+Z6jHAdgHe7K73CuD5zFT9nCmRDIssCaAAAAABJRU5ErkJggg==';
|
||||||
}
|
}
|
||||||
$alt = 'last';
|
$alt = 'last';
|
||||||
$title = 'Last Quarter';
|
$title = escape_html(t('Last Quarter'));
|
||||||
}
|
}
|
||||||
if ($Options{nostyle}) {
|
if ($Options{nostyle}) {
|
||||||
print("<div style=\"float: left\"><img border=\"0\" width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
print("<div style=\"float: left\"><img border=\"0\" width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||||
|
|||||||
+59
-8
@@ -30,6 +30,8 @@ catch {
|
|||||||
set Hostname [exec hostname]
|
set Hostname [exec hostname]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set Translations [dict create]
|
||||||
|
|
||||||
global env
|
global env
|
||||||
set HOME $env(HOME)
|
set HOME $env(HOME)
|
||||||
|
|
||||||
@@ -696,6 +698,21 @@ proc DoQueue {} {
|
|||||||
flush $DaemonFile
|
flush $DaemonFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc DoTranslate {} {
|
||||||
|
global DaemonFile
|
||||||
|
global Translations
|
||||||
|
|
||||||
|
# Clear out any existing translations
|
||||||
|
set Translations [dict create]
|
||||||
|
|
||||||
|
# Get just the translations we can use
|
||||||
|
puts $DaemonFile "TRANSLATE New Moon"
|
||||||
|
puts $DaemonFile "TRANSLATE Full Moon"
|
||||||
|
puts $DaemonFile "TRANSLATE First Quarter"
|
||||||
|
puts $DaemonFile "TRANSLATE Last Quarter"
|
||||||
|
flush $DaemonFile
|
||||||
|
}
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# CreateCalWindow -- create the calendar window.
|
# CreateCalWindow -- create the calendar window.
|
||||||
# Arguments:
|
# Arguments:
|
||||||
@@ -703,6 +720,7 @@ proc DoQueue {} {
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
proc CreateCalWindow { dayNames } {
|
proc CreateCalWindow { dayNames } {
|
||||||
global Option
|
global Option
|
||||||
|
|
||||||
frame .h -background $Option(LineColor)
|
frame .h -background $Option(LineColor)
|
||||||
label .h.title -text "" -justify center -pady 2 -bd 0 -relief flat -font HeadingFont -background $Option(WinBackground) -foreground $Option(LabelColor)
|
label .h.title -text "" -justify center -pady 2 -bd 0 -relief flat -font HeadingFont -background $Option(WinBackground) -foreground $Option(LabelColor)
|
||||||
pack .h.title -side top -fill x -pady 1 -padx 1
|
pack .h.title -side top -fill x -pady 1 -padx 1
|
||||||
@@ -2702,7 +2720,8 @@ proc StartBackgroundRemindDaemon {} {
|
|||||||
} else {
|
} else {
|
||||||
fileevent $DaemonFile readable "DaemonReadable $DaemonFile"
|
fileevent $DaemonFile readable "DaemonReadable $DaemonFile"
|
||||||
puts $DaemonFile "STATUS"
|
puts $DaemonFile "STATUS"
|
||||||
flush $DaemonFile
|
DoTranslate
|
||||||
|
ScheduleUpdateForChanges
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2826,6 +2845,33 @@ proc sort_q { a b } {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# AddTranslation
|
||||||
|
# Arguments:
|
||||||
|
# obj - a dictionary of the form old:new
|
||||||
|
# Returns:
|
||||||
|
# nothing
|
||||||
|
# Description:
|
||||||
|
# Updates the Translations dict object
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
proc AddTranslation { obj } {
|
||||||
|
global Translations
|
||||||
|
set Translations [dict merge $Translations $obj]
|
||||||
|
ScheduleUpdateForChanges
|
||||||
|
}
|
||||||
|
|
||||||
|
proc t { str } {
|
||||||
|
global Translations
|
||||||
|
set trans ""
|
||||||
|
catch {
|
||||||
|
set trans [dict get $Translations $str]
|
||||||
|
}
|
||||||
|
if {"$trans" == ""} {
|
||||||
|
return $str
|
||||||
|
}
|
||||||
|
return $trans
|
||||||
|
}
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# DaemonReadable
|
# DaemonReadable
|
||||||
# Arguments:
|
# Arguments:
|
||||||
@@ -2851,6 +2897,9 @@ proc DaemonReadable { file } {
|
|||||||
}
|
}
|
||||||
set response [dict get $obj response]
|
set response [dict get $obj response]
|
||||||
switch -- $response {
|
switch -- $response {
|
||||||
|
"translate" {
|
||||||
|
AddTranslation [dict get $obj translation]
|
||||||
|
}
|
||||||
"queued" {
|
"queued" {
|
||||||
set n [dict get $obj nqueued]
|
set n [dict get $obj nqueued]
|
||||||
if {$n == 1} {
|
if {$n == 1} {
|
||||||
@@ -2888,7 +2937,9 @@ proc DaemonReadable { file } {
|
|||||||
if {[dict exists $obj command]} {
|
if {[dict exists $obj command]} {
|
||||||
set cmd [dict get $obj command]
|
set cmd [dict get $obj command]
|
||||||
if {"$cmd" == "inotify"} {
|
if {"$cmd" == "inotify"} {
|
||||||
FillCalWindow
|
# Update our translations if file has changed
|
||||||
|
DoTranslate
|
||||||
|
ScheduleUpdateForChanges
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
puts $file "STATUS"
|
puts $file "STATUS"
|
||||||
@@ -3617,14 +3668,14 @@ proc UpdateForChanges {} {
|
|||||||
RestartBackgroundRemindDaemon
|
RestartBackgroundRemindDaemon
|
||||||
}
|
}
|
||||||
|
|
||||||
# Schedule an update for 100ms in the future.
|
# Schedule an update for 250ms in the future.
|
||||||
# That way, if we get a rapid succession of
|
# That way, if we get a rapid succession of
|
||||||
# change notifications, we (probably) only
|
# change notifications, we (probably) only
|
||||||
# end up doing one call to UpdateForChanges
|
# end up doing one call to UpdateForChanges
|
||||||
proc ScheduleUpdateForChanges {} {
|
proc ScheduleUpdateForChanges {} {
|
||||||
global TimerUpdateForChanges
|
global TimerUpdateForChanges
|
||||||
catch { after cancel $TimerUpdateForChanges }
|
catch { after cancel $TimerUpdateForChanges }
|
||||||
set TimerUpdateForChanges [after 100 UpdateForChanges]
|
set TimerUpdateForChanges [after 250 UpdateForChanges]
|
||||||
}
|
}
|
||||||
|
|
||||||
#***********************************************************************
|
#***********************************************************************
|
||||||
@@ -3929,27 +3980,27 @@ proc CreateMoonWindows {} {
|
|||||||
foreach win {.moon_new .moon_new2 } {
|
foreach win {.moon_new .moon_new2 } {
|
||||||
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
||||||
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
||||||
balloon_add_help $win "New Moon"
|
balloon_add_help $win [t "New Moon"]
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach win {.moon_first .moon_first2 } {
|
foreach win {.moon_first .moon_first2 } {
|
||||||
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
||||||
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
||||||
$win create arc $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -start 90 -extent 180 -outline {}
|
$win create arc $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -start 90 -extent 180 -outline {}
|
||||||
balloon_add_help $win "First Quarter"
|
balloon_add_help $win [t "First Quarter"]
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach win {.moon_full .moon_full2 } {
|
foreach win {.moon_full .moon_full2 } {
|
||||||
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
||||||
$win create oval $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -width 1
|
$win create oval $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -width 1
|
||||||
balloon_add_help $win "Full Moon"
|
balloon_add_help $win [t "Full Moon"]
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach win {.moon_last .moon_last2 } {
|
foreach win {.moon_last .moon_last2 } {
|
||||||
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
canvas $win -background $Option(BackgroundColor) -width $wid -height $wid -borderwidth 0 -highlightthickness 0
|
||||||
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
$win create oval $extra $extra $w $w -outline $Option(TextColor) -width 1
|
||||||
$win create arc $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -start 270 -extent 180 -outline {}
|
$win create arc $extra $extra $w $w -outline $Option(TextColor) -fill $Option(TextColor) -start 270 -extent 180 -outline {}
|
||||||
balloon_add_help $win "Last Quarter"
|
balloon_add_help $win [t "Last Quarter"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -32,7 +32,7 @@ REMINDSRCS= calendar.c dedupe.c dynbuf.c dorem.c dosubst.c expr.c \
|
|||||||
sort.c token.c trans.c trigger.c userfns.c utils.c var.c
|
sort.c token.c trans.c trigger.c userfns.c utils.c var.c
|
||||||
|
|
||||||
REMINDHDRS=config.h custom.h dynbuf.h err.h globals.h hashtab.h \
|
REMINDHDRS=config.h custom.h dynbuf.h err.h globals.h hashtab.h \
|
||||||
lang.h md5.h protos.h rem2ps.h types.h version.h
|
md5.h protos.h rem2ps.h types.h version.h
|
||||||
REMINDOBJS= $(REMINDSRCS:.c=.o)
|
REMINDOBJS= $(REMINDSRCS:.c=.o)
|
||||||
|
|
||||||
all: remind rem2ps
|
all: remind rem2ps
|
||||||
@@ -41,7 +41,7 @@ test: all
|
|||||||
@sh ../tests/test-rem
|
@sh ../tests/test-rem
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@CC@ -c @CPPFLAGS@ @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -DSYSDIR=$(datarootdir)/remind -I. -I$(srcdir) $<
|
@CC@ -c @CPPFLAGS@ @CFLAGS@ @DEFS@ $(CEXTRA) -DSYSDIR=$(datarootdir)/remind -I. -I$(srcdir) $<
|
||||||
|
|
||||||
$(REMINDOBJS): $(REMINDHDRS)
|
$(REMINDOBJS): $(REMINDHDRS)
|
||||||
|
|
||||||
|
|||||||
+36
-13
@@ -32,7 +32,6 @@
|
|||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lang.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
@@ -966,6 +965,18 @@ static void DoCalendarOneWeek(int nleft)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SendTranslationTable(int pslevel)
|
||||||
|
{
|
||||||
|
if (pslevel < PSCAL_LEVEL3) {
|
||||||
|
printf("# translations\n");
|
||||||
|
}
|
||||||
|
DumpTranslationTable(stdout, 1);
|
||||||
|
if (pslevel < PSCAL_LEVEL3) {
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* DoSimpleCalendarOneMonth */
|
/* DoSimpleCalendarOneMonth */
|
||||||
@@ -985,14 +996,25 @@ static void DoSimpleCalendarOneMonth(void)
|
|||||||
if (PsCal) {
|
if (PsCal) {
|
||||||
FromDSE(DSEToday, &y, &m, &d);
|
FromDSE(DSEToday, &y, &m, &d);
|
||||||
if (PsCal == PSCAL_LEVEL1) {
|
if (PsCal == PSCAL_LEVEL1) {
|
||||||
|
if (!DidAMonth) {
|
||||||
|
SendTranslationTable(PsCal);
|
||||||
|
}
|
||||||
printf("%s\n", PSBEGIN);
|
printf("%s\n", PSBEGIN);
|
||||||
} else if (PsCal == PSCAL_LEVEL2) {
|
} else if (PsCal == PSCAL_LEVEL2) {
|
||||||
|
if (!DidAMonth) {
|
||||||
|
SendTranslationTable(PsCal);
|
||||||
|
}
|
||||||
printf("%s\n", PSBEGIN2);
|
printf("%s\n", PSBEGIN2);
|
||||||
} else {
|
} else {
|
||||||
if (DidAMonth) {
|
if (DidAMonth) {
|
||||||
printf(",\n");
|
printf(",\n");
|
||||||
}
|
}
|
||||||
printf("{\n");
|
printf("{\n");
|
||||||
|
if (!DidAMonth) {
|
||||||
|
printf("\"translations\":");
|
||||||
|
SendTranslationTable(PsCal);
|
||||||
|
printf(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (PsCal < PSCAL_LEVEL3) {
|
if (PsCal < PSCAL_LEVEL3) {
|
||||||
printf("%s %d %d %d %d\n",
|
printf("%s %d %d %d %d\n",
|
||||||
@@ -1250,7 +1272,7 @@ static void PrintLeft(char const *s, int width, char pad)
|
|||||||
buf = calloc(len+1, sizeof(wchar_t));
|
buf = calloc(len+1, sizeof(wchar_t));
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
/* Uh-oh... cannot recover */
|
/* Uh-oh... cannot recover */
|
||||||
fprintf(stderr, "%s\n", ErrMsg[E_NO_MEM]);
|
fprintf(stderr, "%s\n", GetErr(E_NO_MEM));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1335,7 +1357,7 @@ static void PrintCentered(char const *s, int width, char *pad)
|
|||||||
buf = calloc(len+1, sizeof(wchar_t));
|
buf = calloc(len+1, sizeof(wchar_t));
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
/* Uh-oh... cannot recover */
|
/* Uh-oh... cannot recover */
|
||||||
fprintf(stderr, "%s\n", ErrMsg[E_NO_MEM]);
|
fprintf(stderr, "%s\n", GetErr(E_NO_MEM));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1645,7 +1667,7 @@ static void GenerateCalEntries(int col)
|
|||||||
|
|
||||||
r=IncludeFile(InitialFile);
|
r=IncludeFile(InitialFile);
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, "%s %s: %s\n", ErrMsg[E_ERR_READING], InitialFile, ErrMsg[r]);
|
fprintf(ErrFp, "%s %s: %s\n", GetErr(E_ERR_READING), InitialFile, GetErr(r));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1653,7 +1675,7 @@ static void GenerateCalEntries(int col)
|
|||||||
r = ReadLine();
|
r = ReadLine();
|
||||||
if (r == E_EOF) return;
|
if (r == E_EOF) return;
|
||||||
if (r) {
|
if (r) {
|
||||||
Eprint("%s: %s", ErrMsg[E_ERR_READING], ErrMsg[r]);
|
Eprint("%s: %s", GetErr(E_ERR_READING), GetErr(r));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
s = FindInitialToken(&tok, CurLine);
|
s = FindInitialToken(&tok, CurLine);
|
||||||
@@ -1686,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;
|
||||||
@@ -1734,7 +1757,7 @@ static void GenerateCalEntries(int col)
|
|||||||
r=DoCalRem(&p, col);
|
r=DoCalRem(&p, col);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (r && (!Hush || r != E_RUN_DISABLED)) Eprint("%s", ErrMsg[r]);
|
if (r && (!Hush || r != E_RUN_DISABLED)) Eprint("%s", GetErr(r));
|
||||||
|
|
||||||
/* Destroy the parser - free up resources it may be tying up */
|
/* Destroy the parser - free up resources it may be tying up */
|
||||||
DestroyParser(&p);
|
DestroyParser(&p);
|
||||||
@@ -2298,7 +2321,7 @@ void WriteJSONTrigger(Trigger const *t, int include_tags, int today)
|
|||||||
printf(",");
|
printf(",");
|
||||||
}
|
}
|
||||||
done = 1;
|
done = 1;
|
||||||
printf("\"%s\"", EnglishDayName[i]);
|
printf("\"%s\"", DayName[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("],");
|
printf("],");
|
||||||
@@ -2333,7 +2356,7 @@ void WriteJSONTrigger(Trigger const *t, int include_tags, int today)
|
|||||||
printf(",");
|
printf(",");
|
||||||
}
|
}
|
||||||
done = 1;
|
done = 1;
|
||||||
printf("\"%s\"", EnglishDayName[i]);
|
printf("\"%s\"", DayName[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("],");
|
printf("],");
|
||||||
@@ -2684,14 +2707,14 @@ CalendarTime(int tim, int duration)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (h >= 12) {
|
if (h >= 12) {
|
||||||
ampm1 = DynamicPm;
|
ampm1 = tr("pm");
|
||||||
} else {
|
} else {
|
||||||
ampm1 = DynamicAm;
|
ampm1 = tr("am");
|
||||||
}
|
}
|
||||||
if (h2 >= 12) {
|
if (h2 >= 12) {
|
||||||
ampm2 = DynamicPm;
|
ampm2 = tr("pm");
|
||||||
} else {
|
} else {
|
||||||
ampm2 = DynamicAm;
|
ampm2 = tr("am");
|
||||||
}
|
}
|
||||||
if (!days) {
|
if (!days) {
|
||||||
if (!strcmp(ampm1, ampm2)) {
|
if (!strcmp(ampm1, ampm2)) {
|
||||||
@@ -2738,7 +2761,7 @@ char const *SimpleTime(int tim)
|
|||||||
if (h == 0) hh=12;
|
if (h == 0) hh=12;
|
||||||
else if (h > 12) hh=h-12;
|
else if (h > 12) hh=h-12;
|
||||||
else hh=h;
|
else hh=h;
|
||||||
sprintf(buf, "%d%c%02d%s ", hh, TimeSep, min, (h>=12) ? DynamicPm : DynamicAm);
|
sprintf(buf, "%d%c%02d%s ", hh, TimeSep, min, (h>=12) ? tr("pm") : tr("am"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
my $language_map = {
|
|
||||||
en => 'ENGLISH',
|
|
||||||
de => 'GERMAN',
|
|
||||||
nl => 'DUTCH',
|
|
||||||
fi => 'FINNISH',
|
|
||||||
fr => 'FRENCH',
|
|
||||||
'no' => 'NORWEGIAN',
|
|
||||||
da => 'DANISH',
|
|
||||||
pl => 'POLISH',
|
|
||||||
is => 'ICELANDIC',
|
|
||||||
pt => 'BRAZPORT',
|
|
||||||
it => 'ITALIAN',
|
|
||||||
ro => 'ROMANIAN',
|
|
||||||
es => 'SPANISH',
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!$ARGV[0]) {
|
|
||||||
print STDERR "Usage: $0 lang_code\n";
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $lang = $ARGV[0];
|
|
||||||
my $rc = 0;
|
|
||||||
if ($lang eq 'all') {
|
|
||||||
foreach my $l (sort(keys(%$language_map))) {
|
|
||||||
if (check($l)) {
|
|
||||||
$rc = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$rc = check($lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
exit($rc);
|
|
||||||
|
|
||||||
sub check
|
|
||||||
{
|
|
||||||
my ($lang) = @_;
|
|
||||||
if (!exists($language_map->{$lang})) {
|
|
||||||
print STDERR "$lang is not a valid language.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $flag = $language_map->{$lang};
|
|
||||||
print STDERR "Testing for: $lang - $flag.\n";
|
|
||||||
my_sys("make clean > /dev/null 2>&1") && die("make clean failed");
|
|
||||||
my_sys("make -j18 all LANGDEF=-DLANG=$flag > /dev/null 2>&1") && die("make all failed");
|
|
||||||
my_sys("./remind -q -r ../tests/tstlang.rem 2022-03-23 11:44 > test-$lang-compiled.out 2>&1");
|
|
||||||
|
|
||||||
my_sys("make clean > /dev/null 2>&1") && die("make clean failed");
|
|
||||||
my_sys("make -j18 all > /dev/null 2>&1") && die("make all failed");
|
|
||||||
my_sys("./remind -q -r -ii=\\\"../include/lang/$lang.rem\\\" ../tests/tstlang.rem 2022-03-23 11:44 > test-$lang-runtime.out 2>&1");
|
|
||||||
|
|
||||||
my $rc = my_sys("cmp test-$lang-compiled.out test-$lang-runtime.out > /dev/null 2>&1");
|
|
||||||
if ($rc == 0) {
|
|
||||||
print STDERR "Congrats! Compiled and runtime language output matches for $lang.\n";
|
|
||||||
} else {
|
|
||||||
print STDERR "Whoops. Compiled and runtime language output differs for $lang.\n"
|
|
||||||
}
|
|
||||||
return $rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
|
|
||||||
sub my_sys
|
|
||||||
{
|
|
||||||
#print STDERR "Running: " . join(' ', @_) . "\n";
|
|
||||||
return system(@_);
|
|
||||||
}
|
|
||||||
+2
-2
@@ -22,8 +22,8 @@
|
|||||||
/* The default values are initially set to the city hall in Ottawa, */
|
/* The default values are initially set to the city hall in Ottawa, */
|
||||||
/* Ontario, Canada. */
|
/* Ontario, Canada. */
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
#define DEFAULT_LATITUDE 45.420556
|
#define DEFAULT_LATITUDE 45.42055555555555
|
||||||
#define DEFAULT_LONGITUDE -75.689722
|
#define DEFAULT_LONGITUDE -75.68944444444445
|
||||||
#define LOCATION "Ottawa"
|
#define LOCATION "Ottawa"
|
||||||
|
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
|
|||||||
+30
-30
@@ -284,7 +284,7 @@ int DoRem(ParsePtr p)
|
|||||||
dse = ComputeTrigger(trig.scanfrom, &trig, &tim, &r, 1);
|
dse = ComputeTrigger(trig.scanfrom, &trig, &tim, &r, 1);
|
||||||
if (r) {
|
if (r) {
|
||||||
if (PurgeMode) {
|
if (PurgeMode) {
|
||||||
PurgeEchoLine("%s: %s\n", "#!P! Problem calculating trigger date", ErrMsg[r]);
|
PurgeEchoLine("%s: %s\n", "#!P! Problem calculating trigger date", GetErr(r));
|
||||||
PurgeEchoLine("%s\n", CurLine);
|
PurgeEchoLine("%s\n", CurLine);
|
||||||
}
|
}
|
||||||
if (r == E_CANT_TRIG && trig.maybe_uncomputable) {
|
if (r == E_CANT_TRIG && trig.maybe_uncomputable) {
|
||||||
@@ -698,7 +698,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (tok.type == T_Illegal && tok.val < 0) {
|
if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(-tok.val), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return -tok.val;
|
return -tok.val;
|
||||||
}
|
}
|
||||||
@@ -808,7 +808,7 @@ static int ParseTimeTrig(ParsePtr s, TimeTrig *tim)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (tok.type == T_Illegal && tok.val < 0) {
|
if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(-tok.val), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return -tok.val;
|
return -tok.val;
|
||||||
}
|
}
|
||||||
@@ -887,7 +887,7 @@ static int ParseUntil(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Year:
|
case T_Year:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (y != NO_YR) {
|
if (y != NO_YR) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_YR_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_YR_TWICE));
|
||||||
return E_YR_TWICE;
|
return E_YR_TWICE;
|
||||||
}
|
}
|
||||||
y = tok.val;
|
y = tok.val;
|
||||||
@@ -896,7 +896,7 @@ static int ParseUntil(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Month:
|
case T_Month:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (m != NO_MON) {
|
if (m != NO_MON) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_MON_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_MON_TWICE));
|
||||||
return E_MON_TWICE;
|
return E_MON_TWICE;
|
||||||
}
|
}
|
||||||
m = tok.val;
|
m = tok.val;
|
||||||
@@ -905,7 +905,7 @@ static int ParseUntil(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Day:
|
case T_Day:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (d != NO_DAY) {
|
if (d != NO_DAY) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_DAY_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_DAY_TWICE));
|
||||||
return E_DAY_TWICE;
|
return E_DAY_TWICE;
|
||||||
}
|
}
|
||||||
d = tok.val;
|
d = tok.val;
|
||||||
@@ -914,15 +914,15 @@ static int ParseUntil(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Date:
|
case T_Date:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (y != NO_YR) {
|
if (y != NO_YR) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_YR_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_YR_TWICE));
|
||||||
return E_YR_TWICE;
|
return E_YR_TWICE;
|
||||||
}
|
}
|
||||||
if (m != NO_MON) {
|
if (m != NO_MON) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_MON_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_MON_TWICE));
|
||||||
return E_MON_TWICE;
|
return E_MON_TWICE;
|
||||||
}
|
}
|
||||||
if (d != NO_DAY) {
|
if (d != NO_DAY) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_DAY_TWICE]);
|
Eprint("%s: %s", which, GetErr(E_DAY_TWICE));
|
||||||
return E_DAY_TWICE;
|
return E_DAY_TWICE;
|
||||||
}
|
}
|
||||||
FromDSE(tok.val, &y, &m, &d);
|
FromDSE(tok.val, &y, &m, &d);
|
||||||
@@ -930,12 +930,12 @@ static int ParseUntil(ParsePtr s, Trigger *t, int type)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (tok.type == T_Illegal && tok.val < 0) {
|
if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(-tok.val), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return -tok.val;
|
return -tok.val;
|
||||||
}
|
}
|
||||||
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
||||||
Eprint("%s: %s", which, ErrMsg[E_INCOMPLETE]);
|
Eprint("%s: %s", which, GetErr(E_INCOMPLETE));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return E_INCOMPLETE;
|
return E_INCOMPLETE;
|
||||||
}
|
}
|
||||||
@@ -984,7 +984,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Year:
|
case T_Year:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (y != NO_YR) {
|
if (y != NO_YR) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_YR_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_YR_TWICE));
|
||||||
return E_YR_TWICE;
|
return E_YR_TWICE;
|
||||||
}
|
}
|
||||||
y = tok.val;
|
y = tok.val;
|
||||||
@@ -993,7 +993,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Month:
|
case T_Month:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (m != NO_MON) {
|
if (m != NO_MON) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_MON_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_MON_TWICE));
|
||||||
return E_MON_TWICE;
|
return E_MON_TWICE;
|
||||||
}
|
}
|
||||||
m = tok.val;
|
m = tok.val;
|
||||||
@@ -1002,7 +1002,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Day:
|
case T_Day:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (d != NO_DAY) {
|
if (d != NO_DAY) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_DAY_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_DAY_TWICE));
|
||||||
return E_DAY_TWICE;
|
return E_DAY_TWICE;
|
||||||
}
|
}
|
||||||
d = tok.val;
|
d = tok.val;
|
||||||
@@ -1011,15 +1011,15 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Date:
|
case T_Date:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (y != NO_YR) {
|
if (y != NO_YR) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_YR_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_YR_TWICE));
|
||||||
return E_YR_TWICE;
|
return E_YR_TWICE;
|
||||||
}
|
}
|
||||||
if (m != NO_MON) {
|
if (m != NO_MON) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_MON_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_MON_TWICE));
|
||||||
return E_MON_TWICE;
|
return E_MON_TWICE;
|
||||||
}
|
}
|
||||||
if (d != NO_DAY) {
|
if (d != NO_DAY) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_DAY_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_DAY_TWICE));
|
||||||
return E_DAY_TWICE;
|
return E_DAY_TWICE;
|
||||||
}
|
}
|
||||||
FromDSE(tok.val, &y, &m, &d);
|
FromDSE(tok.val, &y, &m, &d);
|
||||||
@@ -1028,19 +1028,19 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
case T_Back:
|
case T_Back:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (type != SCANFROM_TYPE) {
|
if (type != SCANFROM_TYPE) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_INCOMPLETE]);
|
Eprint("%s: %s", word, GetErr(E_INCOMPLETE));
|
||||||
return E_INCOMPLETE;
|
return E_INCOMPLETE;
|
||||||
}
|
}
|
||||||
if (y != NO_YR) {
|
if (y != NO_YR) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_YR_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_YR_TWICE));
|
||||||
return E_YR_TWICE;
|
return E_YR_TWICE;
|
||||||
}
|
}
|
||||||
if (m != NO_MON) {
|
if (m != NO_MON) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_MON_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_MON_TWICE));
|
||||||
return E_MON_TWICE;
|
return E_MON_TWICE;
|
||||||
}
|
}
|
||||||
if (d != NO_DAY) {
|
if (d != NO_DAY) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_DAY_TWICE]);
|
Eprint("%s: %s", word, GetErr(E_DAY_TWICE));
|
||||||
return E_DAY_TWICE;
|
return E_DAY_TWICE;
|
||||||
}
|
}
|
||||||
if (tok.val < 0) {
|
if (tok.val < 0) {
|
||||||
@@ -1054,12 +1054,12 @@ static int ParseScanFrom(ParsePtr s, Trigger *t, int type)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (tok.type == T_Illegal && tok.val < 0) {
|
if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(-tok.val), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return -tok.val;
|
return -tok.val;
|
||||||
}
|
}
|
||||||
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
||||||
Eprint("%s: %s", word, ErrMsg[E_INCOMPLETE]);
|
Eprint("%s: %s", word, GetErr(E_INCOMPLETE));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return E_INCOMPLETE;
|
return E_INCOMPLETE;
|
||||||
}
|
}
|
||||||
@@ -1471,7 +1471,7 @@ int ShouldTriggerReminder(Trigger *t, TimeTrig *tim, int dse, int *err)
|
|||||||
}
|
}
|
||||||
if (iter > max) {
|
if (iter > max) {
|
||||||
*err = E_CANT_TRIG;
|
*err = E_CANT_TRIG;
|
||||||
Eprint("Delta: Bad OMITFUNC? %s", ErrMsg[E_CANT_TRIG]);
|
Eprint("Delta: Bad OMITFUNC? %s", GetErr(E_CANT_TRIG));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1690,7 +1690,7 @@ static int ShouldTriggerBasedOnWarn(Trigger *t, int dse, int *err)
|
|||||||
|
|
||||||
/* If no proper function exists, barf... */
|
/* If no proper function exists, barf... */
|
||||||
if (UserFuncExists(t->warn) != 1) {
|
if (UserFuncExists(t->warn) != 1) {
|
||||||
Eprint("%s: `%s'", ErrMsg[M_BAD_WARN_FUNC], t->warn);
|
Eprint("%s: `%s'", GetErr(M_BAD_WARN_FUNC), t->warn);
|
||||||
return (dse == DSEToday);
|
return (dse == DSEToday);
|
||||||
}
|
}
|
||||||
for (i=1; ; i++) {
|
for (i=1; ; i++) {
|
||||||
@@ -1698,14 +1698,14 @@ static int ShouldTriggerBasedOnWarn(Trigger *t, int dse, int *err)
|
|||||||
s = buffer;
|
s = buffer;
|
||||||
r = EvalExpr(&s, &v, NULL);
|
r = EvalExpr(&s, &v, NULL);
|
||||||
if (r) {
|
if (r) {
|
||||||
Eprint("%s: `%s': %s", ErrMsg[M_BAD_WARN_FUNC],
|
Eprint("%s: `%s': %s", GetErr(M_BAD_WARN_FUNC),
|
||||||
t->warn, ErrMsg[r]);
|
t->warn, GetErr(r));
|
||||||
return (dse == DSEToday);
|
return (dse == DSEToday);
|
||||||
}
|
}
|
||||||
if (v.type != INT_TYPE) {
|
if (v.type != INT_TYPE) {
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
Eprint("%s: `%s': %s", ErrMsg[M_BAD_WARN_FUNC],
|
Eprint("%s: `%s': %s", GetErr(M_BAD_WARN_FUNC),
|
||||||
t->warn, ErrMsg[E_BAD_TYPE]);
|
t->warn, GetErr(E_BAD_TYPE));
|
||||||
return (dse == DSEToday);
|
return (dse == DSEToday);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1735,7 +1735,7 @@ static int ShouldTriggerBasedOnWarn(Trigger *t, int dse, int *err)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iter > max) {
|
if (iter > max) {
|
||||||
Eprint("Delta: Bad OMITFUNC? %s", ErrMsg[E_CANT_TRIG]);
|
Eprint("Delta: Bad OMITFUNC? %s", GetErr(E_CANT_TRIG));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (j == DSEToday) return 1;
|
if (j == DSEToday) return 1;
|
||||||
|
|||||||
+157
-330
@@ -93,26 +93,14 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
mdiff = adiff % 60;
|
mdiff = adiff % 60;
|
||||||
hdiff = adiff / 60;
|
hdiff = adiff / 60;
|
||||||
|
|
||||||
#ifdef L_MPLU_OVER
|
|
||||||
L_MPLU_OVER
|
|
||||||
#else /* L_MPLU_OVER */
|
|
||||||
mplu = (mdiff == 1 ? "" : DynamicMplu);
|
mplu = (mdiff == 1 ? "" : DynamicMplu);
|
||||||
#endif /* L_MPLU_OVER */
|
|
||||||
|
|
||||||
#ifdef L_HPLU_OVER
|
|
||||||
L_HPLU_OVER
|
|
||||||
#else /* L_HPLU_OVER */
|
|
||||||
hplu = (hdiff == 1 ? "" : DynamicHplu);
|
hplu = (hdiff == 1 ? "" : DynamicHplu);
|
||||||
#endif /* L_HPLU_OVER */
|
|
||||||
|
|
||||||
when = (tdiff < 0) ? DynamicAgo : DynamicFromnow;
|
when = (tdiff < 0) ? tr("ago") : tr("from now");
|
||||||
|
|
||||||
h = tim / 60;
|
h = tim / 60;
|
||||||
min = tim % 60;
|
min = tim % 60;
|
||||||
|
|
||||||
#ifdef L_AMPM_OVERRIDE
|
|
||||||
L_AMPM_OVERRIDE (pm, h)
|
|
||||||
#else
|
|
||||||
r = -1;
|
r = -1;
|
||||||
func = FindUserFunc("subst_ampm");
|
func = FindUserFunc("subst_ampm");
|
||||||
if (func && check_subst_args(func, 1)) {
|
if (func && check_subst_args(func, 1)) {
|
||||||
@@ -128,21 +116,18 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
}
|
}
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
pm = (h < 12) ? DynamicAm : DynamicPm;
|
pm = (h < 12) ? tr("am") : tr("pm");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
hh = (h == 12) ? 12 : h % 12;
|
hh = (h == 12) ? 12 : h % 12;
|
||||||
|
|
||||||
ch = curtime / 60;
|
ch = curtime / 60;
|
||||||
cmin = curtime % 60;
|
cmin = curtime % 60;
|
||||||
|
|
||||||
#ifdef L_AMPM_OVERRIDE
|
|
||||||
L_AMPM_OVERRIDE (cpm, ch)
|
|
||||||
#else
|
|
||||||
r = -1;
|
r = -1;
|
||||||
func = FindUserFunc("subst_ampm");
|
func = FindUserFunc("subst_ampm");
|
||||||
if (func && check_subst_args(func, 1)) {
|
if (func && check_subst_args(func, 1)) {
|
||||||
@@ -158,18 +143,14 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
}
|
}
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
cpm = (h < 12) ? DynamicAm : DynamicPm;
|
cpm = (h < 12) ? tr("am") : tr("pm");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
chh = (ch == 12) ? 12 : ch % 12;
|
chh = (ch == 12) ? 12 : ch % 12;
|
||||||
|
|
||||||
#ifdef L_ORDINAL_OVERRIDE
|
|
||||||
L_ORDINAL_OVERRIDE;
|
|
||||||
#else
|
|
||||||
func = FindUserFunc("subst_ordinal");
|
func = FindUserFunc("subst_ordinal");
|
||||||
if (func && check_subst_args(func, 1)) {
|
if (func && check_subst_args(func, 1)) {
|
||||||
snprintf(s, sizeof(s), "subst_ordinal(%d)", d);
|
snprintf(s, sizeof(s), "subst_ordinal(%d)", d);
|
||||||
@@ -184,7 +165,7 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
}
|
}
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
@@ -202,7 +183,6 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
default: plu = "th"; break;
|
default: plu = "th"; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
c = ParseChar(p, &err, 0);
|
c = ParseChar(p, &err, 0);
|
||||||
@@ -235,6 +215,36 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
if (!c) {
|
if (!c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (c == '(') {
|
||||||
|
DynamicBuffer orig;
|
||||||
|
DynamicBuffer translated;
|
||||||
|
DBufInit(&orig);
|
||||||
|
DBufInit(&translated);
|
||||||
|
while(1) {
|
||||||
|
c = ParseChar(p, &err, 0);
|
||||||
|
if (err) {
|
||||||
|
DBufFree(&orig);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
if (!c || c == ')') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DBufPutc(&orig, c);
|
||||||
|
}
|
||||||
|
if (!c) {
|
||||||
|
Wprint("Warning: Unterminated %%(...) substitution sequence");
|
||||||
|
}
|
||||||
|
err = OK;
|
||||||
|
if (GetTranslatedStringTryingVariants(DBufValue(&orig), &translated)) {
|
||||||
|
err = DBufPuts(dbuf, DBufValue(&translated));
|
||||||
|
} else {
|
||||||
|
err = DBufPuts(dbuf, DBufValue(&orig));
|
||||||
|
}
|
||||||
|
DBufFree(&orig);
|
||||||
|
DBufFree(&translated);
|
||||||
|
if (err) return err;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (c == '*') {
|
if (c == '*') {
|
||||||
altmode = c;
|
altmode = c;
|
||||||
c = ParseChar(p, &err, 0);
|
c = ParseChar(p, &err, 0);
|
||||||
@@ -312,52 +322,26 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
}
|
}
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diff <= 1) {
|
if (diff <= 1) {
|
||||||
switch(UPPER(c)) {
|
switch(UPPER(c)) {
|
||||||
#ifndef L_NOTOMORROW_A
|
|
||||||
case 'A':
|
case 'A':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_B
|
|
||||||
case 'B':
|
case 'B':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_C
|
|
||||||
case 'C':
|
case 'C':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_E
|
|
||||||
case 'E':
|
case 'E':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_F
|
|
||||||
case 'F':
|
case 'F':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_G
|
|
||||||
case 'G':
|
case 'G':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_H
|
|
||||||
case 'H':
|
case 'H':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_I
|
|
||||||
case 'I':
|
case 'I':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_J
|
|
||||||
case 'J':
|
case 'J':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_K
|
|
||||||
case 'K':
|
case 'K':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_L
|
|
||||||
case 'L':
|
case 'L':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_U
|
|
||||||
case 'U':
|
case 'U':
|
||||||
#endif
|
|
||||||
#ifndef L_NOTOMORROW_V
|
|
||||||
case 'V':
|
case 'V':
|
||||||
#endif
|
snprintf(s, sizeof(s), "%s", (diff ? tr("tomorrow") : tr("today")));
|
||||||
snprintf(s, sizeof(s), "%s", (diff ? DynamicTomorrow: DynamicToday));
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
@@ -388,436 +372,279 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
}
|
}
|
||||||
DestroyValue(v);
|
DestroyValue(v);
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(UPPER(c)) {
|
switch(UPPER(c)) {
|
||||||
case 'A':
|
case 'A':
|
||||||
#ifdef L_A_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_A_OVER
|
snprintf(s, sizeof(s), "%s, %d %s, %d", get_day_name(dse%7), d,
|
||||||
#else
|
get_month_name(m), y);
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%s, %d %s, %d", get_day_name(dse%7), d,
|
snprintf(s, sizeof(s), "%s %s, %d %s, %d", tr("on"), get_day_name(dse%7), d,
|
||||||
get_month_name(m), y);
|
get_month_name(m), y);
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %s, %d %s, %d", DynamicOn, get_day_name(dse%7), d,
|
|
||||||
get_month_name(m), y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'B':
|
case 'B':
|
||||||
#ifdef L_B_OVER
|
snprintf(s, sizeof(s), "in %d days' time", diff);
|
||||||
L_B_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), L_INXDAYS, diff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
#ifdef L_C_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_C_OVER
|
snprintf(s, sizeof(s), "%s", get_day_name(dse%7));
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %s", tr("on"), get_day_name(dse%7));
|
||||||
snprintf(s, sizeof(s), "%s", get_day_name(dse%7));
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %s", DynamicOn, get_day_name(dse%7));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'D':
|
case 'D':
|
||||||
#ifdef L_D_OVER
|
snprintf(s, sizeof(s), "%d", d);
|
||||||
L_D_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", d);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'E':
|
case 'E':
|
||||||
#ifdef L_E_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_E_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d%c%04d", d, DateSep,
|
||||||
#else
|
m+1, DateSep, y);
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d%c%04d", d, DateSep,
|
snprintf(s, sizeof(s), "%s %02d%c%02d%c%04d", tr("on"), d, DateSep,
|
||||||
m+1, DateSep, y);
|
m+1, DateSep, y);
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %02d%c%02d%c%04d", DynamicOn, d, DateSep,
|
|
||||||
m+1, DateSep, y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
#ifdef L_F_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_F_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d%c%04d", m+1, DateSep, d, DateSep, y);
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %02d%c%02d%c%04d", tr("on"), m+1, DateSep, d, DateSep, y);
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d%c%04d", m+1, DateSep, d, DateSep, y);
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %02d%c%02d%c%04d", DynamicOn, m+1, DateSep, d, DateSep, y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
#ifdef L_G_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_G_OVER
|
snprintf(s, sizeof(s), "%s, %d %s", get_day_name(dse%7), d, get_month_name(m));
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %s, %d %s", tr("on"), get_day_name(dse%7), d, get_month_name(m));
|
||||||
snprintf(s, sizeof(s), "%s, %d %s", get_day_name(dse%7), d, get_month_name(m));
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %s, %d %s", DynamicOn, get_day_name(dse%7), d, get_month_name(m));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
#ifdef L_H_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_H_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d", d, DateSep, m+1);
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %02d%c%02d", tr("on"), d, DateSep, m+1);
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d", d, DateSep, m+1);
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %02d%c%02d", DynamicOn, d, DateSep, m+1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'I':
|
case 'I':
|
||||||
#ifdef L_I_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_I_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d", m+1, DateSep, d);
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %02d%c%02d", tr("on"), m+1, DateSep, d);
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d", m+1, DateSep, d);
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %02d%c%02d", DynamicOn, m+1, DateSep, d);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'J':
|
case 'J':
|
||||||
#ifdef L_J_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_J_OVER
|
snprintf(s, sizeof(s), "%s, %s %d%s, %d", get_day_name(dse%7),
|
||||||
#else
|
get_month_name(m), d, plu, y);
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%s, %s %d%s, %d", get_day_name(dse%7),
|
snprintf(s, sizeof(s), "%s %s, %s %d%s, %d", tr("on"), get_day_name(dse%7),
|
||||||
get_month_name(m), d, plu, y);
|
get_month_name(m), d, plu, y);
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %s, %s %d%s, %d", DynamicOn, get_day_name(dse%7),
|
|
||||||
get_month_name(m), d, plu, y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'K':
|
case 'K':
|
||||||
#ifdef L_K_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_K_OVER
|
snprintf(s, sizeof(s), "%s, %s %d%s", get_day_name(dse%7),
|
||||||
#else
|
get_month_name(m), d, plu);
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%s, %s %d%s", get_day_name(dse%7),
|
snprintf(s, sizeof(s), "%s %s, %s %d%s", tr("on"), get_day_name(dse%7),
|
||||||
get_month_name(m), d, plu);
|
get_month_name(m), d, plu);
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %s, %s %d%s", DynamicOn, get_day_name(dse%7),
|
|
||||||
get_month_name(m), d, plu);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
#ifdef L_L_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_L_OVER
|
snprintf(s, sizeof(s), "%04d%c%02d%c%02d", y, DateSep, m+1, DateSep, d);
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
snprintf(s, sizeof(s), "%s %04d%c%02d%c%02d", tr("on"), y, DateSep, m+1, DateSep, d);
|
||||||
snprintf(s, sizeof(s), "%04d%c%02d%c%02d", y, DateSep, m+1, DateSep, d);
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %04d%c%02d%c%02d", DynamicOn, y, DateSep, m+1, DateSep, d);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'M':
|
case 'M':
|
||||||
#ifdef L_M_OVER
|
snprintf(s, sizeof(s), "%s", get_month_name(m));
|
||||||
L_M_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", get_month_name(m));
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'N':
|
case 'N':
|
||||||
#ifdef L_N_OVER
|
snprintf(s, sizeof(s), "%d", m+1);
|
||||||
L_N_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", m+1);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'O':
|
case 'O':
|
||||||
#ifdef L_O_OVER
|
if (RealToday == DSEToday) snprintf(s, sizeof(s), " (%s)", tr("today"));
|
||||||
L_O_OVER
|
else *s = 0;
|
||||||
#else
|
|
||||||
if (RealToday == DSEToday) snprintf(s, sizeof(s), " (%s)", DynamicToday);
|
|
||||||
else *s = 0;
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
#ifdef L_P_OVER
|
snprintf(s, sizeof(s), "%s", (diff == 1 ? "" : "s"));
|
||||||
L_P_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", (diff == 1 ? "" : L_PLURAL));
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Q':
|
case 'Q':
|
||||||
#ifdef L_Q_OVER
|
snprintf(s, sizeof(s), "%s", (diff == 1 ? "'s" : "s'"));
|
||||||
L_Q_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", (diff == 1 ? "'s" : "s'"));
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'R':
|
case 'R':
|
||||||
#ifdef L_R_OVER
|
snprintf(s, sizeof(s), "%02d", d);
|
||||||
L_R_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%02d", d);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
#ifdef L_S_OVER
|
snprintf(s, sizeof(s), "%s", plu);
|
||||||
L_S_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", plu);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
#ifdef L_T_OVER
|
snprintf(s, sizeof(s), "%02d", m+1);
|
||||||
L_T_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%02d", m+1);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'U':
|
case 'U':
|
||||||
#ifdef L_U_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_U_OVER
|
snprintf(s, sizeof(s), "%s, %d%s %s, %d", get_day_name(dse%7), d,
|
||||||
#else
|
plu, get_month_name(m), y);
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%s, %d%s %s, %d", get_day_name(dse%7), d,
|
snprintf(s, sizeof(s), "%s %s, %d%s %s, %d", tr("on"), get_day_name(dse%7), d,
|
||||||
plu, get_month_name(m), y);
|
plu, get_month_name(m), y);
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %s, %d%s %s, %d", DynamicOn, get_day_name(dse%7), d,
|
|
||||||
plu, get_month_name(m), y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
#ifdef L_V_OVER
|
if (altmode == '*' || !strcmp(tr("on"), "")) {
|
||||||
L_V_OVER
|
snprintf(s, sizeof(s), "%s, %d%s %s", get_day_name(dse%7), d, plu,
|
||||||
#else
|
get_month_name(m));
|
||||||
if (altmode == '*' || !strcmp(DynamicOn, "")) {
|
} else {
|
||||||
snprintf(s, sizeof(s), "%s, %d%s %s", get_day_name(dse%7), d, plu,
|
snprintf(s, sizeof(s), "%s %s, %d%s %s", tr("on"), get_day_name(dse%7), d, plu,
|
||||||
get_month_name(m));
|
get_month_name(m));
|
||||||
} else {
|
}
|
||||||
snprintf(s, sizeof(s), "%s %s, %d%s %s", DynamicOn, get_day_name(dse%7), d, plu,
|
|
||||||
get_month_name(m));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'W':
|
case 'W':
|
||||||
#ifdef L_W_OVER
|
snprintf(s, sizeof(s), "%s", get_day_name(dse%7));
|
||||||
L_W_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", get_day_name(dse%7));
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'X':
|
case 'X':
|
||||||
#ifdef L_X_OVER
|
snprintf(s, sizeof(s), "%d", diff);
|
||||||
L_X_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", diff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Y':
|
case 'Y':
|
||||||
#ifdef L_Y_OVER
|
snprintf(s, sizeof(s), "%d", y);
|
||||||
L_Y_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", y);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Z':
|
case 'Z':
|
||||||
#ifdef L_Z_OVER
|
snprintf(s, sizeof(s), "%d", y % 100);
|
||||||
L_Z_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", y % 100);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '1':
|
case '1':
|
||||||
#ifdef L_1_OVER
|
if (tdiff == 0)
|
||||||
L_1_OVER
|
snprintf(s, sizeof(s), "%s", tr("now"));
|
||||||
#else
|
else if (hdiff == 0)
|
||||||
if (tdiff == 0)
|
snprintf(s, sizeof(s), "%d %s%s %s", mdiff, tr("minute"), mplu, when);
|
||||||
snprintf(s, sizeof(s), "%s", DynamicNow);
|
else if (mdiff == 0)
|
||||||
else if (hdiff == 0)
|
snprintf(s, sizeof(s), "%d %s%s %s", hdiff, tr("hour"), hplu, when);
|
||||||
snprintf(s, sizeof(s), "%d %s%s %s", mdiff, DynamicMinute, mplu, when);
|
else
|
||||||
else if (mdiff == 0)
|
snprintf(s, sizeof(s), "%d %s%s %s %d %s%s %s", hdiff, tr("hour"), hplu,
|
||||||
snprintf(s, sizeof(s), "%d %s%s %s", hdiff, DynamicHour, hplu, when);
|
tr("and"), mdiff, tr("minute"), mplu, when);
|
||||||
else
|
|
||||||
snprintf(s, sizeof(s), "%d %s%s %s %d %s%s %s", hdiff, DynamicHour, hplu,
|
|
||||||
DynamicAnd, mdiff, DynamicMinute, mplu, when);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '2':
|
case '2':
|
||||||
#ifdef L_2_OVER
|
if (altmode == '*') {
|
||||||
L_2_OVER
|
snprintf(s, sizeof(s), "%d%c%02d%s", hh, TimeSep, min, pm);
|
||||||
#else
|
} else {
|
||||||
if (altmode == '*') {
|
snprintf(s, sizeof(s), "%s %d%c%02d%s", tr("at"), hh, TimeSep, min, pm);
|
||||||
snprintf(s, sizeof(s), "%d%c%02d%s", hh, TimeSep, min, pm);
|
}
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %d%c%02d%s", DynamicAt, hh, TimeSep, min, pm);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '3':
|
case '3':
|
||||||
#ifdef L_3_OVER
|
if (altmode == '*') {
|
||||||
L_3_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d", h, TimeSep, min);
|
||||||
#else
|
} else {
|
||||||
|
snprintf(s, sizeof(s), "%s %02d%c%02d", tr("at"), h, TimeSep, min);
|
||||||
if (altmode == '*') {
|
}
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d", h, TimeSep, min);
|
|
||||||
} else {
|
|
||||||
snprintf(s, sizeof(s), "%s %02d%c%02d", DynamicAt, h, TimeSep, min);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '4':
|
case '4':
|
||||||
#ifdef L_4_OVER
|
snprintf(s, sizeof(s), "%d", tdiff);
|
||||||
L_4_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", tdiff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '5':
|
case '5':
|
||||||
#ifdef L_5_OVER
|
snprintf(s, sizeof(s), "%d", adiff);
|
||||||
L_5_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", adiff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '6':
|
case '6':
|
||||||
#ifdef L_6_OVER
|
snprintf(s, sizeof(s), "%s", when);
|
||||||
L_6_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", when);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '7':
|
case '7':
|
||||||
#ifdef L_7_OVER
|
snprintf(s, sizeof(s), "%d", hdiff);
|
||||||
L_7_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", hdiff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '8':
|
case '8':
|
||||||
#ifdef L_8_OVER
|
snprintf(s, sizeof(s), "%d", mdiff);
|
||||||
L_8_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d", mdiff);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '9':
|
case '9':
|
||||||
#ifdef L_9_OVER
|
snprintf(s, sizeof(s), "%s", mplu);
|
||||||
L_9_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", mplu);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '0':
|
case '0':
|
||||||
#ifdef L_0_OVER
|
snprintf(s, sizeof(s), "%s", hplu);
|
||||||
L_0_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", hplu);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '!':
|
case '!':
|
||||||
#ifdef L_BANG_OVER
|
snprintf(s, sizeof(s), "%s", (tdiff >= 0 ? tr("is") : tr("was")));
|
||||||
L_BANG_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%s", (tdiff >= 0 ? DynamicIs : DynamicWas));
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '@':
|
case '@':
|
||||||
#ifdef L_AT_OVER
|
snprintf(s, sizeof(s), "%d%c%02d%s", chh, TimeSep, cmin, cpm);
|
||||||
L_AT_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%d%c%02d%s", chh, TimeSep, cmin, cpm);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '#':
|
case '#':
|
||||||
#ifdef L_HASH_OVER
|
snprintf(s, sizeof(s), "%02d%c%02d", ch, TimeSep, cmin);
|
||||||
L_HASH_OVER
|
|
||||||
#else
|
|
||||||
snprintf(s, sizeof(s), "%02d%c%02d", ch, TimeSep, cmin);
|
|
||||||
#endif
|
|
||||||
SHIP_OUT(s);
|
SHIP_OUT(s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -914,7 +741,7 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int dse,
|
|||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
int DoSubstFromString(char const *source, DynamicBuffer *dbuf,
|
int DoSubstFromString(char const *source, DynamicBuffer *dbuf,
|
||||||
int dse, int tim)
|
int dse, int tim)
|
||||||
{
|
{
|
||||||
Trigger tempTrig;
|
Trigger tempTrig;
|
||||||
TimeTrig tempTime;
|
TimeTrig tempTime;
|
||||||
|
|||||||
@@ -13,31 +13,35 @@
|
|||||||
/* Note that not all of the "errors" are really errors - some are just
|
/* Note that not all of the "errors" are really errors - some are just
|
||||||
messages for information purposes. Constants beginning with M_ should
|
messages for information purposes. Constants beginning with M_ should
|
||||||
never be returned as error indicators - they should only be used to
|
never be returned as error indicators - they should only be used to
|
||||||
index the ErrMsg array. */
|
index the ErrMsg array.
|
||||||
|
|
||||||
|
Some #defines are commented out; these are former error codes that are
|
||||||
|
no longer used. They are left as placeholders because renumbering
|
||||||
|
everything wouild be too tedious */
|
||||||
|
|
||||||
#define OK 0
|
#define OK 0
|
||||||
#define E_MISS_END 1
|
#define E_MISS_END 1
|
||||||
#define E_MISS_QUOTE 2
|
#define E_MISS_QUOTE 2
|
||||||
#define E_OP_STK_OVER 3
|
#define E_OP_STK_OVER 3
|
||||||
#define E_VA_STK_OVER 4
|
/* #define E_VA_STK_OVER 4 */
|
||||||
#define E_MISS_RIGHT_PAREN 5
|
#define E_MISS_RIGHT_PAREN 5
|
||||||
#define E_UNDEF_FUNC 6
|
#define E_UNDEF_FUNC 6
|
||||||
#define E_ILLEGAL_CHAR 7
|
#define E_ILLEGAL_CHAR 7
|
||||||
#define E_EXPECTING_BINOP 8
|
/* #define E_EXPECTING_BINOP 8 */
|
||||||
#define E_NO_MEM 9
|
#define E_NO_MEM 9
|
||||||
#define E_BAD_NUMBER 10
|
#define E_BAD_NUMBER 10
|
||||||
#define E_OP_STK_UNDER 11
|
/* #define E_OP_STK_UNDER 11 */
|
||||||
#define E_VA_STK_UNDER 12
|
/* #define E_VA_STK_UNDER 12 */
|
||||||
#define E_CANT_COERCE 13
|
#define E_CANT_COERCE 13
|
||||||
#define E_BAD_TYPE 14
|
#define E_BAD_TYPE 14
|
||||||
#define E_DATE_OVER 15
|
#define E_DATE_OVER 15
|
||||||
#define E_STACK_ERR 16
|
/* #define E_STACK_ERR 16 */
|
||||||
#define E_DIV_ZERO 17
|
#define E_DIV_ZERO 17
|
||||||
#define E_NOSUCH_VAR 18
|
#define E_NOSUCH_VAR 18
|
||||||
#define E_EOLN 19
|
#define E_EOLN 19
|
||||||
#define E_EOF 20
|
#define E_EOF 20
|
||||||
#define E_IO_ERR 21
|
#define E_IO_ERR 21
|
||||||
#define E_LINE_2_LONG 22
|
/* #define E_LINE_2_LONG 22 */
|
||||||
#define E_SWERR 23
|
#define E_SWERR 23
|
||||||
#define E_BAD_DATE 24
|
#define E_BAD_DATE 24
|
||||||
#define E_2FEW_ARGS 25
|
#define E_2FEW_ARGS 25
|
||||||
@@ -72,7 +76,7 @@
|
|||||||
#define E_DAY_TWICE 52
|
#define E_DAY_TWICE 52
|
||||||
#define E_UNKNOWN_TOKEN 53
|
#define E_UNKNOWN_TOKEN 53
|
||||||
#define E_SPEC_MON 54
|
#define E_SPEC_MON 54
|
||||||
#define E_2MANY_PART 55
|
/* #define E_2MANY_PART 55 */
|
||||||
#define E_2MANY_FULL 56
|
#define E_2MANY_FULL 56
|
||||||
#define E_PUSH_NOPOP 57
|
#define E_PUSH_NOPOP 57
|
||||||
#define E_ERR_READING 58
|
#define E_ERR_READING 58
|
||||||
@@ -110,7 +114,7 @@
|
|||||||
#define E_MISS_EQ 90
|
#define E_MISS_EQ 90
|
||||||
#define E_MISS_VAR 91
|
#define E_MISS_VAR 91
|
||||||
#define E_MISS_EXPR 92
|
#define E_MISS_EXPR 92
|
||||||
#define M_CANTSET_ACCESS 93
|
/* #define M_CANTSET_ACCESS 93 */
|
||||||
#define M_I_OPTION 94
|
#define M_I_OPTION 94
|
||||||
#define E_NOREMINDERS 95
|
#define E_NOREMINDERS 95
|
||||||
#define M_QUEUED 96
|
#define M_QUEUED 96
|
||||||
@@ -147,25 +151,25 @@ EXTERN char *ErrMsg[]
|
|||||||
/* E_MISS_END */ "Missing ']'",
|
/* E_MISS_END */ "Missing ']'",
|
||||||
/* E_MISS_QUOTE */ "Missing quote",
|
/* E_MISS_QUOTE */ "Missing quote",
|
||||||
/* E_OP_STK_OVER */ "Expression too complex",
|
/* E_OP_STK_OVER */ "Expression too complex",
|
||||||
/* E_VA_STK_OVER */ "Expression too complex - too many operands",
|
/* E_VA_STK_OVER */ "",
|
||||||
/* E_MISS_RIGHT_PAREN */ "Missing ')'",
|
/* E_MISS_RIGHT_PAREN */ "Missing ')'",
|
||||||
/* E_UNDEF_FUNC */ "Undefined function",
|
/* E_UNDEF_FUNC */ "Undefined function",
|
||||||
/* E_ILLEGAL_CHAR */ "Illegal character",
|
/* E_ILLEGAL_CHAR */ "Illegal character",
|
||||||
/* E_EXPECTING_BINOP */ "Expecting binary operator",
|
/* E_EXPECTING_BINOP */ "Expecting binary operator",
|
||||||
/* E_NO_MEM */ "Out of memory",
|
/* E_NO_MEM */ "Out of memory",
|
||||||
/* E_BAD_NUMBER */ "Ill-formed number",
|
/* E_BAD_NUMBER */ "Ill-formed number",
|
||||||
/* E_OP_STK_UNDER */ "Op stack underflow - internal error",
|
/* E_OP_STK_UNDER */ "",
|
||||||
/* E_VA_STK_UNDER */ "Va stack underflow - internal error",
|
/* E_VA_STK_UNDER */ "",
|
||||||
/* E_CANT_COERCE */ "Can't coerce",
|
/* E_CANT_COERCE */ "Can't coerce",
|
||||||
/* E_BAD_TYPE */ "Type mismatch",
|
/* E_BAD_TYPE */ "Type mismatch",
|
||||||
/* E_DATE_OVER */ "Date overflow",
|
/* E_DATE_OVER */ "Date overflow",
|
||||||
/* E_STACK_ERR */ "Stack error - internal error",
|
/* E_STACK_ERR */ "",
|
||||||
/* E_DIV_ZERO */ "Division by zero",
|
/* E_DIV_ZERO */ "Division by zero",
|
||||||
/* E_NOSUCH_VAR */ "Undefined variable",
|
/* E_NOSUCH_VAR */ "Undefined variable",
|
||||||
/* E_EOLN */ "Unexpected end of line",
|
/* E_EOLN */ "Unexpected end of line",
|
||||||
/* E_EOF */ "Unexpected end of file",
|
/* E_EOF */ "Unexpected end of file",
|
||||||
/* E_IO_ERR */ "I/O error",
|
/* E_IO_ERR */ "I/O error",
|
||||||
/* E_LINE_2_LONG */ "Line too long",
|
/* E_LINE_2_LONG */ "",
|
||||||
/* E_SWERR */ "Internal error",
|
/* E_SWERR */ "Internal error",
|
||||||
/* E_BAD_DATE */ "Bad date specification",
|
/* E_BAD_DATE */ "Bad date specification",
|
||||||
/* E_2FEW_ARGS */ "Not enough arguments",
|
/* E_2FEW_ARGS */ "Not enough arguments",
|
||||||
@@ -198,7 +202,7 @@ EXTERN char *ErrMsg[]
|
|||||||
/* E_DAY_TWICE */ "Day specified twice",
|
/* E_DAY_TWICE */ "Day specified twice",
|
||||||
/* E_UNKNOWN_TOKEN */ "Unknown token",
|
/* E_UNKNOWN_TOKEN */ "Unknown token",
|
||||||
/* E_SPEC_MON */ "Must specify month in OMIT command",
|
/* E_SPEC_MON */ "Must specify month in OMIT command",
|
||||||
/* E_2MANY_PART */ "Too many partial OMITs (max. " STR(MAX_PARTIAL_OMITS) ")",
|
/* E_2MANY_PART */ "",
|
||||||
/* E_2MANY_FULL */ "Too many full OMITs (max. " STR(MAX_FULL_OMITS) ")",
|
/* E_2MANY_FULL */ "Too many full OMITs (max. " STR(MAX_FULL_OMITS) ")",
|
||||||
/* E_PUSH_NOPOP */ "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT",
|
/* E_PUSH_NOPOP */ "Warning: PUSH-OMIT-CONTEXT without matching POP-OMIT-CONTEXT",
|
||||||
/* E_ERR_READING */ "Error reading",
|
/* E_ERR_READING */ "Error reading",
|
||||||
@@ -236,7 +240,7 @@ EXTERN char *ErrMsg[]
|
|||||||
/* E_MISS_EQ */ "Missing '=' sign",
|
/* E_MISS_EQ */ "Missing '=' sign",
|
||||||
/* E_MISS_VAR */ "Missing variable name",
|
/* E_MISS_VAR */ "Missing variable name",
|
||||||
/* E_MISS_EXPR */ "Missing expression",
|
/* E_MISS_EXPR */ "Missing expression",
|
||||||
/* M_CANTSET_ACCESS */ "Can't reset access date of %s\n",
|
/* M_CANTSET_ACCESS */ "",
|
||||||
/* M_I_OPTION */ "Remind: '-i' option: %s\n",
|
/* M_I_OPTION */ "Remind: '-i' option: %s\n",
|
||||||
/* E_NOREMINDERS */ "No reminders.",
|
/* E_NOREMINDERS */ "No reminders.",
|
||||||
/* M_QUEUED */ "%d reminder(s) queued for later today.\n",
|
/* M_QUEUED */ "%d reminder(s) queued for later today.\n",
|
||||||
@@ -255,3 +259,9 @@ EXTERN char *ErrMsg[]
|
|||||||
#endif /* MK_GLOBALS */
|
#endif /* MK_GLOBALS */
|
||||||
;
|
;
|
||||||
#endif /* L_ERR_OVERRIDE */
|
#endif /* L_ERR_OVERRIDE */
|
||||||
|
|
||||||
|
EXTERN int NumErrs
|
||||||
|
#ifdef MK_GLOBALS
|
||||||
|
= sizeof(ErrMsg) / sizeof(ErrMsg[0])
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|||||||
+36
-36
@@ -282,7 +282,7 @@ debug_evaluation(Value *ans, int r, char const *fmt, ...)
|
|||||||
vfprintf(ErrFp, fmt, argptr);
|
vfprintf(ErrFp, fmt, argptr);
|
||||||
fprintf(ErrFp, " => ");
|
fprintf(ErrFp, " => ");
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
fprintf(ErrFp, "%s\n", ErrMsg[r]);
|
fprintf(ErrFp, "%s\n", GetErr(r));
|
||||||
} else {
|
} else {
|
||||||
PrintValue(ans, ErrFp);
|
PrintValue(ans, ErrFp);
|
||||||
fprintf(ErrFp, "\n");
|
fprintf(ErrFp, "\n");
|
||||||
@@ -321,7 +321,7 @@ debug_evaluation_binop(Value *ans, int r, Value *v1, Value *v2, char const *fmt,
|
|||||||
}
|
}
|
||||||
fprintf(ErrFp, " => ");
|
fprintf(ErrFp, " => ");
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
fprintf(ErrFp, "%s\n", ErrMsg[r]);
|
fprintf(ErrFp, "%s\n", GetErr(r));
|
||||||
} else {
|
} else {
|
||||||
PrintValue(ans, ErrFp);
|
PrintValue(ans, ErrFp);
|
||||||
fprintf(ErrFp, "\n");
|
fprintf(ErrFp, "\n");
|
||||||
@@ -353,7 +353,7 @@ debug_evaluation_unop(Value *ans, int r, Value *v1, char const *fmt, ...)
|
|||||||
}
|
}
|
||||||
fprintf(ErrFp, " => ");
|
fprintf(ErrFp, " => ");
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
fprintf(ErrFp, "%s\n", ErrMsg[r]);
|
fprintf(ErrFp, "%s\n", GetErr(r));
|
||||||
} else {
|
} else {
|
||||||
PrintValue(ans, ErrFp);
|
PrintValue(ans, ErrFp);
|
||||||
fprintf(ErrFp, "\n");
|
fprintf(ErrFp, "\n");
|
||||||
@@ -426,11 +426,11 @@ eval_builtin(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
|
|
||||||
/* Check that we have the right number of argumens */
|
/* Check that we have the right number of argumens */
|
||||||
if (node->num_kids < f->minargs) {
|
if (node->num_kids < f->minargs) {
|
||||||
Eprint("%s(): %s", f->name, ErrMsg[E_2FEW_ARGS]);
|
Eprint("%s(): %s", f->name, GetErr(E_2FEW_ARGS));
|
||||||
return E_2FEW_ARGS;
|
return E_2FEW_ARGS;
|
||||||
}
|
}
|
||||||
if (node->num_kids > f->maxargs && f->maxargs != NO_MAX) {
|
if (node->num_kids > f->maxargs && f->maxargs != NO_MAX) {
|
||||||
Eprint("%s(): %s", f->name, ErrMsg[E_2MANY_ARGS]);
|
Eprint("%s(): %s", f->name, GetErr(E_2MANY_ARGS));
|
||||||
return E_2MANY_ARGS;
|
return E_2MANY_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,14 +506,14 @@ eval_builtin(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
/* Debug */
|
/* Debug */
|
||||||
if (DebugFlag & DB_PRTEXPR) {
|
if (DebugFlag & DB_PRTEXPR) {
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[r]);
|
fprintf(ErrFp, "%s", GetErr(r));
|
||||||
} else {
|
} else {
|
||||||
PrintValue(ans, ErrFp);
|
PrintValue(ans, ErrFp);
|
||||||
}
|
}
|
||||||
fprintf(ErrFp, "\n");
|
fprintf(ErrFp, "\n");
|
||||||
}
|
}
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
Eprint("%s(): %s", f->name, ErrMsg[r]);
|
Eprint("%s(): %s", f->name, GetErr(r));
|
||||||
}
|
}
|
||||||
/* Clean up */
|
/* Clean up */
|
||||||
if (info.args) {
|
if (info.args) {
|
||||||
@@ -546,7 +546,7 @@ debug_enter_userfunc(expr_node *node, Value *locals, int nargs)
|
|||||||
} else {
|
} else {
|
||||||
fname = node->u.value.v.str;
|
fname = node->u.value.v.str;
|
||||||
}
|
}
|
||||||
fprintf(ErrFp, "%s %s(", ErrMsg[E_ENTER_FUN], fname);
|
fprintf(ErrFp, "%s %s(", GetErr(E_ENTER_FUN), fname);
|
||||||
for (i=0; i<nargs; i++) {
|
for (i=0; i<nargs; i++) {
|
||||||
if (i) fprintf(ErrFp, ", ");
|
if (i) fprintf(ErrFp, ", ");
|
||||||
PrintValue(&(locals[i]), ErrFp);
|
PrintValue(&(locals[i]), ErrFp);
|
||||||
@@ -572,7 +572,7 @@ debug_exit_userfunc(expr_node *node, Value *ans, int r, Value *locals, int nargs
|
|||||||
} else {
|
} else {
|
||||||
fname = node->u.value.v.str;
|
fname = node->u.value.v.str;
|
||||||
}
|
}
|
||||||
fprintf(ErrFp, "%s %s(", ErrMsg[E_LEAVE_FUN], fname);
|
fprintf(ErrFp, "%s %s(", GetErr(E_LEAVE_FUN), fname);
|
||||||
for (i=0; i<nargs; i++) {
|
for (i=0; i<nargs; i++) {
|
||||||
if (i) fprintf(ErrFp, ", ");
|
if (i) fprintf(ErrFp, ", ");
|
||||||
PrintValue(&(locals[i]), ErrFp);
|
PrintValue(&(locals[i]), ErrFp);
|
||||||
@@ -581,7 +581,7 @@ debug_exit_userfunc(expr_node *node, Value *ans, int r, Value *locals, int nargs
|
|||||||
if (r == OK) {
|
if (r == OK) {
|
||||||
PrintValue(ans, ErrFp);
|
PrintValue(ans, ErrFp);
|
||||||
} else {
|
} else {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[r]);
|
fprintf(ErrFp, "%s", GetErr(r));
|
||||||
}
|
}
|
||||||
fprintf(ErrFp, "\n");
|
fprintf(ErrFp, "\n");
|
||||||
}
|
}
|
||||||
@@ -621,19 +621,19 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
|
|
||||||
/* Bail if function does not exist */
|
/* Bail if function does not exist */
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_UNDEF_FUNC], fname);
|
Eprint("%s: `%s'", GetErr(E_UNDEF_FUNC), fname);
|
||||||
return E_UNDEF_FUNC;
|
return E_UNDEF_FUNC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure we have the right number of arguments */
|
/* Make sure we have the right number of arguments */
|
||||||
if (node->num_kids < f->nargs) {
|
if (node->num_kids < f->nargs) {
|
||||||
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, ErrMsg[E_2FEW_ARGS]));
|
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, GetErr(E_2FEW_ARGS)));
|
||||||
Eprint("%s(): %s", f->name, ErrMsg[E_2FEW_ARGS]);
|
Eprint("%s(): %s", f->name, GetErr(E_2FEW_ARGS));
|
||||||
return E_2FEW_ARGS;
|
return E_2FEW_ARGS;
|
||||||
}
|
}
|
||||||
if (node->num_kids > f->nargs) {
|
if (node->num_kids > f->nargs) {
|
||||||
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, ErrMsg[E_2MANY_ARGS]));
|
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, GetErr(E_2MANY_ARGS)));
|
||||||
Eprint("%s(): %s", f->name, ErrMsg[E_2MANY_ARGS]);
|
Eprint("%s(): %s", f->name, GetErr(E_2MANY_ARGS));
|
||||||
return E_2MANY_ARGS;
|
return E_2MANY_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,7 +643,7 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
/* Too many args to fit on stack; put on heap */
|
/* Too many args to fit on stack; put on heap */
|
||||||
new_locals = malloc(node->num_kids * sizeof(Value));
|
new_locals = malloc(node->num_kids * sizeof(Value));
|
||||||
if (!new_locals) {
|
if (!new_locals) {
|
||||||
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, ErrMsg[E_NO_MEM]));
|
DBG(fprintf(ErrFp, "%s(...) => %s\n", fname, GetErr(E_NO_MEM)));
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -694,7 +694,7 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
|
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
/* We print the error here in order to get the call stack trace */
|
/* We print the error here in order to get the call stack trace */
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pushed == OK) pop_call();
|
if (pushed == OK) pop_call();
|
||||||
@@ -850,7 +850,7 @@ evaluate_expr_node(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
/* Operator? Evaluate it */
|
/* Operator? Evaluate it */
|
||||||
r = node->u.operator_func(node, locals, ans, nonconst);
|
r = node->u.operator_func(node, locals, ans, nonconst);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
Eprint("`%s': %s", get_operator_name(node), ErrMsg[r]);
|
Eprint("`%s': %s", get_operator_name(node), GetErr(r));
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -1541,7 +1541,7 @@ static int parse_expr_token(DynamicBuffer *buf, char const **in)
|
|||||||
}
|
}
|
||||||
(*in)++;
|
(*in)++;
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s `%c' (did you mean `%c%c'?)", ErrMsg[E_PARSE_ERR], c, c, c);
|
Eprint("%s `%c' (did you mean `%c%c'?)", GetErr(E_PARSE_ERR), c, c, c);
|
||||||
return E_PARSE_ERR;
|
return E_PARSE_ERR;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
@@ -1633,10 +1633,10 @@ static int parse_expr_token(DynamicBuffer *buf, char const **in)
|
|||||||
|
|
||||||
if (!ISID(c) && c != '$') {
|
if (!ISID(c) && c != '$') {
|
||||||
if (!c) {
|
if (!c) {
|
||||||
Eprint("%s", ErrMsg[E_EOLN]);
|
Eprint("%s", GetErr(E_EOLN));
|
||||||
return E_EOLN;
|
return E_EOLN;
|
||||||
}
|
}
|
||||||
Eprint("%s `%c'", ErrMsg[E_ILLEGAL_CHAR], c);
|
Eprint("%s `%c'", GetErr(E_ILLEGAL_CHAR), c);
|
||||||
return E_ILLEGAL_CHAR;
|
return E_ILLEGAL_CHAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1831,7 +1831,7 @@ static expr_node * parse_function_call(char const **e, int *r, Var *locals, int
|
|||||||
return free_expr_tree(node);
|
return free_expr_tree(node);
|
||||||
}
|
}
|
||||||
if (TOKEN_IS(")")) {
|
if (TOKEN_IS(")")) {
|
||||||
Eprint("%s `)'", ErrMsg[E_PARSE_ERR]);
|
Eprint("%s `)'", GetErr(E_PARSE_ERR));
|
||||||
*r = E_PARSE_ERR;
|
*r = E_PARSE_ERR;
|
||||||
return free_expr_tree(node);
|
return free_expr_tree(node);
|
||||||
}
|
}
|
||||||
@@ -1859,7 +1859,7 @@ static expr_node * parse_function_call(char const **e, int *r, Var *locals, int
|
|||||||
if (*r != OK) {
|
if (*r != OK) {
|
||||||
if (node->type == N_BUILTIN_FUNC) {
|
if (node->type == N_BUILTIN_FUNC) {
|
||||||
f = node->u.builtin_func;
|
f = node->u.builtin_func;
|
||||||
Eprint("%s: %s", f->name, ErrMsg[*r]);
|
Eprint("%s: %s", f->name, GetErr(*r));
|
||||||
}
|
}
|
||||||
return free_expr_tree(node);
|
return free_expr_tree(node);
|
||||||
}
|
}
|
||||||
@@ -1881,7 +1881,7 @@ static int set_constant_value(expr_node *atom)
|
|||||||
atom->type = N_CONSTANT;
|
atom->type = N_CONSTANT;
|
||||||
|
|
||||||
if (!*s) {
|
if (!*s) {
|
||||||
Eprint("%s", ErrMsg[E_EOLN]);
|
Eprint("%s", GetErr(E_EOLN));
|
||||||
return E_EOLN;
|
return E_EOLN;
|
||||||
}
|
}
|
||||||
ampm = 0;
|
ampm = 0;
|
||||||
@@ -1905,15 +1905,15 @@ static int set_constant_value(expr_node *atom)
|
|||||||
} else if (*s == '\'') { /* It's a literal date */
|
} else if (*s == '\'') { /* It's a literal date */
|
||||||
s++;
|
s++;
|
||||||
if ((r=ParseLiteralDateOrTime(&s, &dse, &tim)) != 0) {
|
if ((r=ParseLiteralDateOrTime(&s, &dse, &tim)) != 0) {
|
||||||
Eprint("%s: %s", ErrMsg[r], DBufValue(&ExprBuf));
|
Eprint("%s: %s", GetErr(r), DBufValue(&ExprBuf));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
if (*s != '\'') {
|
if (*s != '\'') {
|
||||||
if (dse != NO_DATE) {
|
if (dse != NO_DATE) {
|
||||||
Eprint("%s: %s", ErrMsg[E_BAD_DATE], DBufValue(&ExprBuf));
|
Eprint("%s: %s", GetErr(E_BAD_DATE), DBufValue(&ExprBuf));
|
||||||
return E_BAD_DATE;
|
return E_BAD_DATE;
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s: %s", ErrMsg[E_BAD_TIME], DBufValue(&ExprBuf));
|
Eprint("%s: %s", GetErr(E_BAD_TIME), DBufValue(&ExprBuf));
|
||||||
return E_BAD_TIME;
|
return E_BAD_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1944,7 +1944,7 @@ static int set_constant_value(expr_node *atom)
|
|||||||
if (*s == ':' || *s == '.' || *s == TimeSep) { /* Must be a literal time */
|
if (*s == ':' || *s == '.' || *s == TimeSep) { /* Must be a literal time */
|
||||||
s++;
|
s++;
|
||||||
if (!isdigit(*s)) {
|
if (!isdigit(*s)) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_BAD_TIME], DBufValue(&ExprBuf));
|
Eprint("%s: `%s'", GetErr(E_BAD_TIME), DBufValue(&ExprBuf));
|
||||||
return E_BAD_TIME;
|
return E_BAD_TIME;
|
||||||
}
|
}
|
||||||
h = val;
|
h = val;
|
||||||
@@ -1963,12 +1963,12 @@ static int set_constant_value(expr_node *atom)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*s || h>23 || m>59) {
|
if (*s || h>23 || m>59) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_BAD_TIME], DBufValue(&ExprBuf));
|
Eprint("%s: `%s'", GetErr(E_BAD_TIME), DBufValue(&ExprBuf));
|
||||||
return E_BAD_TIME;
|
return E_BAD_TIME;
|
||||||
}
|
}
|
||||||
if (ampm) {
|
if (ampm) {
|
||||||
if (h < 1 || h > 12) {
|
if (h < 1 || h > 12) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_BAD_TIME], DBufValue(&ExprBuf));
|
Eprint("%s: `%s'", GetErr(E_BAD_TIME), DBufValue(&ExprBuf));
|
||||||
return E_BAD_TIME;
|
return E_BAD_TIME;
|
||||||
}
|
}
|
||||||
if (ampm == 'a') {
|
if (ampm == 'a') {
|
||||||
@@ -1987,7 +1987,7 @@ static int set_constant_value(expr_node *atom)
|
|||||||
}
|
}
|
||||||
/* Not a time - must be a number */
|
/* Not a time - must be a number */
|
||||||
if (*s) {
|
if (*s) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_BAD_NUMBER], DBufValue(&ExprBuf));
|
Eprint("%s: `%s'", GetErr(E_BAD_NUMBER), DBufValue(&ExprBuf));
|
||||||
return E_BAD_NUMBER;
|
return E_BAD_NUMBER;
|
||||||
}
|
}
|
||||||
atom->u.value.type = INT_TYPE;
|
atom->u.value.type = INT_TYPE;
|
||||||
@@ -1995,7 +1995,7 @@ static int set_constant_value(expr_node *atom)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
atom->u.value.type = ERR_TYPE;
|
atom->u.value.type = ERR_TYPE;
|
||||||
Eprint("`%s': %s", DBufValue(&ExprBuf), ErrMsg[E_ILLEGAL_CHAR]);
|
Eprint("`%s': %s", DBufValue(&ExprBuf), GetErr(E_ILLEGAL_CHAR));
|
||||||
return E_ILLEGAL_CHAR;
|
return E_ILLEGAL_CHAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2037,7 +2037,7 @@ static int make_atom(expr_node *atom, Var *locals)
|
|||||||
/* System Variable */
|
/* System Variable */
|
||||||
if (*(s) == '$' && isalpha(*(s+1))) {
|
if (*(s) == '$' && isalpha(*(s+1))) {
|
||||||
if (!FindSysVar(s+1)) {
|
if (!FindSysVar(s+1)) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_NOSUCH_VAR], s);
|
Eprint("%s: `%s'", GetErr(E_NOSUCH_VAR), s);
|
||||||
return E_NOSUCH_VAR;
|
return E_NOSUCH_VAR;
|
||||||
}
|
}
|
||||||
if (strlen(s+1) < SHORT_NAME_BUF) {
|
if (strlen(s+1) < SHORT_NAME_BUF) {
|
||||||
@@ -2117,7 +2117,7 @@ static expr_node *parse_atom(char const **e, int *r, Var *locals, int level)
|
|||||||
/* Check that it's a valid ID or constant */
|
/* Check that it's a valid ID or constant */
|
||||||
s = DBufValue(&ExprBuf);
|
s = DBufValue(&ExprBuf);
|
||||||
if (!*s) {
|
if (!*s) {
|
||||||
Eprint("%s", ErrMsg[E_EOLN]);
|
Eprint("%s", GetErr(E_EOLN));
|
||||||
*r = E_EOLN;
|
*r = E_EOLN;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2126,7 +2126,7 @@ static expr_node *parse_atom(char const **e, int *r, Var *locals, int level)
|
|||||||
*s != '$' &&
|
*s != '$' &&
|
||||||
*s != '"' &&
|
*s != '"' &&
|
||||||
*s != '\'') {
|
*s != '\'') {
|
||||||
Eprint("%s `%c'", ErrMsg[E_ILLEGAL_CHAR], *s);
|
Eprint("%s `%c'", GetErr(E_ILLEGAL_CHAR), *s);
|
||||||
*r = E_ILLEGAL_CHAR;
|
*r = E_ILLEGAL_CHAR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2512,7 +2512,7 @@ expr_node *parse_expression(char const **e, int *r, Var *locals)
|
|||||||
}
|
}
|
||||||
putc('\n', ErrFp);
|
putc('\n', ErrFp);
|
||||||
if (*r != OK) {
|
if (*r != OK) {
|
||||||
fprintf(ErrFp, " => Error: %s\n", ErrMsg[*r]);
|
fprintf(ErrFp, " => Error: %s\n", GetErr(*r));
|
||||||
} else {
|
} else {
|
||||||
fprintf(ErrFp, " => ");
|
fprintf(ErrFp, " => ");
|
||||||
print_expr_tree(node, ErrFp);
|
print_expr_tree(node, ErrFp);
|
||||||
|
|||||||
+25
-16
@@ -519,7 +519,7 @@ static int NextChainedFile(IncludeStruct *i)
|
|||||||
if (OpenFile(cur->filename) == OK) {
|
if (OpenFile(cur->filename) == OK) {
|
||||||
return OK;
|
return OK;
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], cur->filename);
|
Eprint("%s: %s", GetErr(E_CANT_OPEN), cur->filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return E_EOF;
|
return E_EOF;
|
||||||
@@ -537,7 +537,7 @@ static int PopFile(void)
|
|||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (!Hush && NumIfs) {
|
if (!Hush && NumIfs) {
|
||||||
Eprint("%s", ErrMsg[E_MISS_ENDIF]);
|
Eprint("%s", GetErr(E_MISS_ENDIF));
|
||||||
for (j=NumIfs-1; j >=0; j--) {
|
for (j=NumIfs-1; j >=0; j--) {
|
||||||
fprintf(ErrFp, "%s(%d): IF without ENDIF\n", FileName, IfLinenos[j]);
|
fprintf(ErrFp, "%s(%d): IF without ENDIF\n", FileName, IfLinenos[j]);
|
||||||
}
|
}
|
||||||
@@ -610,14 +610,23 @@ int DoInclude(ParsePtr p, enum TokTypes tok)
|
|||||||
DBufInit(&path);
|
DBufInit(&path);
|
||||||
if ( (r=ParseToken(p, &buf)) ) return r;
|
if ( (r=ParseToken(p, &buf)) ) return r;
|
||||||
e = VerifyEoln(p);
|
e = VerifyEoln(p);
|
||||||
if (e) Eprint("%s", ErrMsg[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 (DBufPuts(&path, FileName) != OK) {
|
if (tok == T_IncludeR) {
|
||||||
r = E_NO_MEM;
|
if (DBufPuts(&path, FileName) != OK) {
|
||||||
goto bailout;
|
r = E_NO_MEM;
|
||||||
|
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);
|
||||||
@@ -650,9 +659,6 @@ int DoInclude(ParsePtr p, enum TokTypes tok)
|
|||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
|
||||||
NumIfs = 0;
|
|
||||||
IfFlags = 0;
|
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
DBufFree(&path);
|
DBufFree(&path);
|
||||||
@@ -713,8 +719,6 @@ int DoIncludeCmd(ParsePtr p)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
NumIfs = 0;
|
|
||||||
IfFlags = 0;
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -905,6 +909,8 @@ static int IncludeCmd(char const *cmd)
|
|||||||
FCLOSE(fp);
|
FCLOSE(fp);
|
||||||
}
|
}
|
||||||
IStackPtr++;
|
IStackPtr++;
|
||||||
|
NumIfs = 0;
|
||||||
|
IfFlags = 0;
|
||||||
|
|
||||||
/* If the file is cached, use it */
|
/* If the file is cached, use it */
|
||||||
h = CachedFiles;
|
h = CachedFiles;
|
||||||
@@ -941,6 +947,7 @@ static int IncludeCmd(char const *cmd)
|
|||||||
fp2 = popen(cmd, "r");
|
fp2 = popen(cmd, "r");
|
||||||
}
|
}
|
||||||
if (!fp2) {
|
if (!fp2) {
|
||||||
|
PopFile();
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return E_CANT_OPEN;
|
return E_CANT_OPEN;
|
||||||
}
|
}
|
||||||
@@ -1014,6 +1021,8 @@ int IncludeFile(char const *fname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IStackPtr++;
|
IStackPtr++;
|
||||||
|
NumIfs = 0;
|
||||||
|
IfFlags = 0;
|
||||||
|
|
||||||
#ifdef HAVE_GLOB
|
#ifdef HAVE_GLOB
|
||||||
/* If it's a directory, set up the glob chain here. */
|
/* If it's a directory, set up the glob chain here. */
|
||||||
@@ -1028,7 +1037,7 @@ int IncludeFile(char const *fname)
|
|||||||
if (SetupGlobChain(fname, i) == OK) { /* Glob succeeded */
|
if (SetupGlobChain(fname, i) == OK) { /* Glob succeeded */
|
||||||
if (!i->chain) { /* Oops... no matching files */
|
if (!i->chain) { /* Oops... no matching files */
|
||||||
if (!Hush) {
|
if (!Hush) {
|
||||||
Eprint("%s: %s", fname, ErrMsg[E_NO_MATCHING_REMS]);
|
Eprint("%s: %s", fname, GetErr(E_NO_MATCHING_REMS));
|
||||||
}
|
}
|
||||||
PopFile();
|
PopFile();
|
||||||
return E_NO_MATCHING_REMS;
|
return E_NO_MATCHING_REMS;
|
||||||
@@ -1042,14 +1051,14 @@ int IncludeFile(char const *fname)
|
|||||||
if (!OpenFile(fc->filename)) {
|
if (!OpenFile(fc->filename)) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], fc->filename);
|
Eprint("%s: %s", GetErr(E_CANT_OPEN), fc->filename);
|
||||||
RunDisabled = oldRunDisabled;
|
RunDisabled = oldRunDisabled;
|
||||||
}
|
}
|
||||||
/* Couldn't open anything... bail */
|
/* Couldn't open anything... bail */
|
||||||
return PopFile();
|
return PopFile();
|
||||||
} else {
|
} else {
|
||||||
if (!Hush) {
|
if (!Hush) {
|
||||||
Eprint("%s: %s", fname, ErrMsg[E_NO_MATCHING_REMS]);
|
Eprint("%s: %s", fname, GetErr(E_NO_MATCHING_REMS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return E_NO_MATCHING_REMS;
|
return E_NO_MATCHING_REMS;
|
||||||
@@ -1063,7 +1072,7 @@ int IncludeFile(char const *fname)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
RunDisabled = oldRunDisabled;
|
RunDisabled = oldRunDisabled;
|
||||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], fname);
|
Eprint("%s: %s", GetErr(E_CANT_OPEN), fname);
|
||||||
/* Ugh! We failed! */
|
/* Ugh! We failed! */
|
||||||
PopFile();
|
PopFile();
|
||||||
return E_CANT_OPEN;
|
return E_CANT_OPEN;
|
||||||
|
|||||||
+16
-11
@@ -380,14 +380,19 @@ static int RetStrVal(char const *s, func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int F_(func_info *info)
|
static int F_(func_info *info)
|
||||||
{
|
{
|
||||||
char const *translated;
|
DynamicBuffer translated;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
DBufInit(&translated);
|
||||||
ASSERT_TYPE(0, STR_TYPE);
|
ASSERT_TYPE(0, STR_TYPE);
|
||||||
translated = GetTranslatedString(ARGSTR(0));
|
r = GetTranslatedStringTryingVariants(ARGSTR(0), &translated);
|
||||||
if (!translated) {
|
if (!r) {
|
||||||
DCOPYVAL(RetVal, ARG(0));
|
DCOPYVAL(RetVal, ARG(0));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
return RetStrVal(translated, info);
|
r = RetStrVal(DBufValue(&translated), info);
|
||||||
|
DBufFree(&translated);
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -1299,10 +1304,10 @@ static int FChoose(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
cur = cur->sibling;
|
cur = cur->sibling;
|
||||||
}
|
}
|
||||||
PUT(") => ");
|
PUT(") => ");
|
||||||
PUT(ErrMsg[E_BAD_TYPE]);
|
PUT(GetErr(E_BAD_TYPE));
|
||||||
OUT();
|
OUT();
|
||||||
}
|
}
|
||||||
Eprint("choose(): %s", ErrMsg[E_BAD_TYPE]);
|
Eprint("choose(): %s", GetErr(E_BAD_TYPE));
|
||||||
return E_BAD_TYPE;
|
return E_BAD_TYPE;
|
||||||
}
|
}
|
||||||
n = v.v.val;
|
n = v.v.val;
|
||||||
@@ -1820,10 +1825,10 @@ static int FTrigger(func_info *info)
|
|||||||
|
|
||||||
FromDSE(date, &y, &m, &d);
|
FromDSE(date, &y, &m, &d);
|
||||||
if (tim != NO_TIME) {
|
if (tim != NO_TIME) {
|
||||||
sprintf(buf, "%d %s %d AT %02d:%02d", d, EnglishMonthName[m], y,
|
sprintf(buf, "%d %s %d AT %02d:%02d", d, MonthName[m], y,
|
||||||
tim/60, tim%60);
|
tim/60, tim%60);
|
||||||
} else {
|
} else {
|
||||||
sprintf(buf, "%d %s %d", d, EnglishMonthName[m], y);
|
sprintf(buf, "%d %s %d", d, MonthName[m], y);
|
||||||
}
|
}
|
||||||
return RetStrVal(buf, info);
|
return RetStrVal(buf, info);
|
||||||
}
|
}
|
||||||
@@ -2013,7 +2018,7 @@ static int FIif(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
|||||||
cur = cur->sibling;
|
cur = cur->sibling;
|
||||||
}
|
}
|
||||||
PUT(") => ");
|
PUT(") => ");
|
||||||
PUT(ErrMsg[E_IIF_ODD]);
|
PUT(GetErr(E_IIF_ODD));
|
||||||
OUT();
|
OUT();
|
||||||
}
|
}
|
||||||
return E_IIF_ODD;
|
return E_IIF_ODD;
|
||||||
@@ -2171,7 +2176,7 @@ static int FTypeof(func_info *info)
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static int FLanguage(func_info *info)
|
static int FLanguage(func_info *info)
|
||||||
{
|
{
|
||||||
return RetStrVal(L_LANGNAME, info);
|
return RetStrVal("English", info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -2752,7 +2757,7 @@ static int SunStuff(int rise, double cosz, int dse)
|
|||||||
/* Get offset from UTC */
|
/* Get offset from UTC */
|
||||||
if (CalculateUTC) {
|
if (CalculateUTC) {
|
||||||
if (CalcMinsFromUTC(dse, 12*60, &mins, NULL)) {
|
if (CalcMinsFromUTC(dse, 12*60, &mins, NULL)) {
|
||||||
Eprint(ErrMsg[E_MKTIME_PROBLEM]);
|
Eprint(GetErr(E_MKTIME_PROBLEM));
|
||||||
return NO_TIME;
|
return NO_TIME;
|
||||||
}
|
}
|
||||||
} else mins = MinsFromUTC;
|
} else mins = MinsFromUTC;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
#include <stdio.h> /* For definition of FILE - sigh! */
|
#include <stdio.h> /* For definition of FILE - sigh! */
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "custom.h"
|
#include "custom.h"
|
||||||
#include "lang.h"
|
|
||||||
#define MK_GLOBALS 1
|
#define MK_GLOBALS 1
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "err.h"
|
#include "err.h"
|
||||||
|
|||||||
+3
-118
@@ -30,7 +30,6 @@
|
|||||||
EXTERN FILE *ErrFp;
|
EXTERN FILE *ErrFp;
|
||||||
|
|
||||||
#include "dynbuf.h"
|
#include "dynbuf.h"
|
||||||
#include "lang.h"
|
|
||||||
|
|
||||||
#define MAX_TRUSTED_USERS 20
|
#define MAX_TRUSTED_USERS 20
|
||||||
|
|
||||||
@@ -179,62 +178,17 @@ EXTERN INIT( int SuppressImplicitRemWarnings, 0);
|
|||||||
extern int NumFullOmits, NumPartialOmits;
|
extern int NumFullOmits, NumPartialOmits;
|
||||||
|
|
||||||
/* List of months */
|
/* List of months */
|
||||||
EXTERN char *EnglishMonthName[]
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= {"January", "February", "March", "April", "May", "June",
|
|
||||||
"July", "August", "September", "October", "November", "December"}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
|
|
||||||
#if LANG == ENGLISH
|
|
||||||
#define MonthName EnglishMonthName
|
|
||||||
#else
|
|
||||||
EXTERN char *MonthName[]
|
EXTERN char *MonthName[]
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
= {L_JAN, L_FEB, L_MAR, L_APR, L_MAY, L_JUN,
|
|
||||||
L_JUL, L_AUG, L_SEP, L_OCT, L_NOV, L_DEC}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EXTERN char *DynamicMonthName[]
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#if LANG == ENGLISH
|
|
||||||
= {"January", "February", "March", "April", "May", "June",
|
= {"January", "February", "March", "April", "May", "June",
|
||||||
"July", "August", "September", "October", "November", "December"}
|
"July", "August", "September", "October", "November", "December"}
|
||||||
#else
|
|
||||||
= {L_JAN, L_FEB, L_MAR, L_APR, L_MAY, L_JUN,
|
|
||||||
L_JUL, L_AUG, L_SEP, L_OCT, L_NOV, L_DEC}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *EnglishDayName[]
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
|
||||||
"Saturday", "Sunday"}
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
#if LANG == ENGLISH
|
|
||||||
#define DayName EnglishDayName
|
|
||||||
#else
|
|
||||||
EXTERN char *DayName[]
|
EXTERN char *DayName[]
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
= {L_MONDAY, L_TUESDAY, L_WEDNESDAY, L_THURSDAY, L_FRIDAY,
|
|
||||||
L_SATURDAY, L_SUNDAY}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EXTERN char *DynamicDayName []
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#if LANG == ENGLISH
|
|
||||||
= {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
= {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
|
||||||
"Saturday", "Sunday"}
|
"Saturday", "Sunday"}
|
||||||
#else
|
|
||||||
= {L_MONDAY, L_TUESDAY, L_WEDNESDAY, L_THURSDAY, L_FRIDAY,
|
|
||||||
L_SATURDAY, L_SUNDAY}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -256,84 +210,15 @@ EXTERN int MonthIndex[2][12]
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
EXTERN char *DynamicAgo
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_AGO
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicAm
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_AM
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicAnd
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_AND
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicAt
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_AT
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicFromnow
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_FROMNOW
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicHour
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_HOUR
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicHplu
|
EXTERN char *DynamicHplu
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
= L_HPLU
|
= "s"
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicIs
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_IS
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicMinute
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_MINUTE
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
EXTERN char *DynamicMplu
|
EXTERN char *DynamicMplu
|
||||||
#ifdef MK_GLOBALS
|
#ifdef MK_GLOBALS
|
||||||
= L_MPLU
|
= "s"
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicNow
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_NOW
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicOn
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_ON
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicPm
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_PM
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicToday
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_TODAY
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicTomorrow
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_TOMORROW
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
EXTERN char *DynamicWas
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
= L_WAS
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -222,9 +222,6 @@ hash_table_resize(hash_table *t, int dir)
|
|||||||
|
|
||||||
/* Move everything from the old buckets into the new */
|
/* Move everything from the old buckets into the new */
|
||||||
for (size_t i=0; i<num_old_buckets; i++) {
|
for (size_t i=0; i<num_old_buckets; i++) {
|
||||||
if (!t->buckets[i]) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
void *p = t->buckets[i];
|
void *p = t->buckets[i];
|
||||||
while(p) {
|
while(p) {
|
||||||
struct hash_link *l = LINK(t, p);
|
struct hash_link *l = LINK(t, p);
|
||||||
|
|||||||
+1
-1
@@ -474,7 +474,7 @@ int ComputeJahr(int y, int m, int d, int *ans)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (d > monlen[m]) {
|
if (d > monlen[m]) {
|
||||||
Eprint("%d %s %d: %s", d, HebMonthNames[m], y, ErrMsg[E_BAD_HEBDATE]);
|
Eprint("%d %s %d: %s", d, HebMonthNames[m], y, GetErr(E_BAD_HEBDATE));
|
||||||
return E_BAD_HEBDATE;
|
return E_BAD_HEBDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+36
-26
@@ -196,7 +196,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
DBufInit(&LineBuffer);
|
DBufInit(&LineBuffer);
|
||||||
DBufInit(&ExprBuf);
|
DBufInit(&ExprBuf);
|
||||||
|
|
||||||
DBufPuts(&Banner, L_BANNER);
|
DBufPuts(&Banner, "Reminders for %w, %d%s %m, %y%o:");
|
||||||
|
|
||||||
PurgeFP = NULL;
|
PurgeFP = NULL;
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
|
|
||||||
RealToday = SystemDate(&CurYear, &CurMon, &CurDay);
|
RealToday = SystemDate(&CurYear, &CurMon, &CurDay);
|
||||||
if (RealToday < 0) {
|
if (RealToday < 0) {
|
||||||
fprintf(ErrFp, ErrMsg[M_BAD_SYS_DATE], BASE);
|
fprintf(ErrFp, GetErr(M_BAD_SYS_DATE), BASE);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DSEToday = RealToday;
|
DSEToday = RealToday;
|
||||||
@@ -625,7 +625,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
case 'l': case 'L': DebugFlag |= DB_PRTLINE; break;
|
case 'l': case 'L': DebugFlag |= DB_PRTLINE; break;
|
||||||
case 'f': case 'F': DebugFlag |= DB_TRACE_FILES; break;
|
case 'f': case 'F': DebugFlag |= DB_TRACE_FILES; break;
|
||||||
default:
|
default:
|
||||||
fprintf(ErrFp, ErrMsg[M_BAD_DB_FLAG], *(arg-1));
|
fprintf(ErrFp, GetErr(M_BAD_DB_FLAG), *(arg-1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -660,7 +660,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(ErrFp, ErrMsg[M_BAD_OPTION], *(arg-1));
|
fprintf(ErrFp, GetErr(M_BAD_OPTION), *(arg-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -728,7 +728,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (tok.type == T_Illegal && tok.val < 0) {
|
if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
fprintf(stderr, "%s: `%s'\n", ErrMsg[-tok.val], arg);
|
fprintf(stderr, "%s: `%s'\n", GetErr(-tok.val), arg);
|
||||||
Usage();
|
Usage();
|
||||||
}
|
}
|
||||||
Usage();
|
Usage();
|
||||||
@@ -790,7 +790,7 @@ void InitRemind(int argc, char const *argv[])
|
|||||||
#ifndef L_USAGE_OVERRIDE
|
#ifndef L_USAGE_OVERRIDE
|
||||||
void Usage(void)
|
void Usage(void)
|
||||||
{
|
{
|
||||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-2024 Dianne Skoll\n", VERSION, L_LANGNAME);
|
fprintf(ErrFp, "\nREMIND %s Copyright 1992-2024 Dianne Skoll\n", VERSION);
|
||||||
#ifdef BETA
|
#ifdef BETA
|
||||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -852,7 +852,7 @@ static void ChgUser(char const *user)
|
|||||||
pwent = getpwnam(user);
|
pwent = getpwnam(user);
|
||||||
|
|
||||||
if (!pwent) {
|
if (!pwent) {
|
||||||
fprintf(ErrFp, ErrMsg[M_BAD_USER], user);
|
fprintf(ErrFp, GetErr(M_BAD_USER), user);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -860,24 +860,24 @@ static void ChgUser(char const *user)
|
|||||||
/* Started as root, so drop privileges */
|
/* Started as root, so drop privileges */
|
||||||
#ifdef HAVE_INITGROUPS
|
#ifdef HAVE_INITGROUPS
|
||||||
if (initgroups(pwent->pw_name, pwent->pw_gid) < 0) {
|
if (initgroups(pwent->pw_name, pwent->pw_gid) < 0) {
|
||||||
fprintf(ErrFp, ErrMsg[M_NO_CHG_GID], pwent->pw_gid);
|
fprintf(ErrFp, GetErr(M_NO_CHG_GID), pwent->pw_gid);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
if (setgid(pwent->pw_gid) < 0) {
|
if (setgid(pwent->pw_gid) < 0) {
|
||||||
fprintf(ErrFp, ErrMsg[M_NO_CHG_GID], pwent->pw_gid);
|
fprintf(ErrFp, GetErr(M_NO_CHG_GID), pwent->pw_gid);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setuid(pwent->pw_uid) < 0) {
|
if (setuid(pwent->pw_uid) < 0) {
|
||||||
fprintf(ErrFp, ErrMsg[M_NO_CHG_UID], pwent->pw_uid);
|
fprintf(ErrFp, GetErr(M_NO_CHG_UID), pwent->pw_uid);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
home = malloc(strlen(pwent->pw_dir) + 6);
|
home = malloc(strlen(pwent->pw_dir) + 6);
|
||||||
if (!home) {
|
if (!home) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[M_NOMEM_ENV]);
|
fprintf(ErrFp, "%s", GetErr(M_NOMEM_ENV));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
sprintf(home, "HOME=%s", pwent->pw_dir);
|
sprintf(home, "HOME=%s", pwent->pw_dir);
|
||||||
@@ -885,7 +885,7 @@ static void ChgUser(char const *user)
|
|||||||
|
|
||||||
shell = malloc(strlen(pwent->pw_shell) + 7);
|
shell = malloc(strlen(pwent->pw_shell) + 7);
|
||||||
if (!shell) {
|
if (!shell) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[M_NOMEM_ENV]);
|
fprintf(ErrFp, "%s", GetErr(M_NOMEM_ENV));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
sprintf(shell, "SHELL=%s", pwent->pw_shell);
|
sprintf(shell, "SHELL=%s", pwent->pw_shell);
|
||||||
@@ -894,14 +894,14 @@ static void ChgUser(char const *user)
|
|||||||
if (pwent->pw_uid) {
|
if (pwent->pw_uid) {
|
||||||
username = malloc(strlen(pwent->pw_name) + 6);
|
username = malloc(strlen(pwent->pw_name) + 6);
|
||||||
if (!username) {
|
if (!username) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[M_NOMEM_ENV]);
|
fprintf(ErrFp, "%s", GetErr(M_NOMEM_ENV));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
sprintf(username, "USER=%s", pwent->pw_name);
|
sprintf(username, "USER=%s", pwent->pw_name);
|
||||||
putenv(username);
|
putenv(username);
|
||||||
logname= malloc(strlen(pwent->pw_name) + 9);
|
logname= malloc(strlen(pwent->pw_name) + 9);
|
||||||
if (!logname) {
|
if (!logname) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[M_NOMEM_ENV]);
|
fprintf(ErrFp, "%s", GetErr(M_NOMEM_ENV));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
sprintf(logname, "LOGNAME=%s", pwent->pw_name);
|
sprintf(logname, "LOGNAME=%s", pwent->pw_name);
|
||||||
@@ -919,7 +919,7 @@ DefineFunction(char const *str)
|
|||||||
r = DoFset(&p);
|
r = DoFset(&p);
|
||||||
DestroyParser(&p);
|
DestroyParser(&p);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
fprintf(ErrFp, "-i option: %s: %s\n", str, ErrMsg[r]);
|
fprintf(ErrFp, "-i option: %s: %s\n", str, GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
@@ -946,7 +946,7 @@ static void InitializeVar(char const *str)
|
|||||||
if (isalpha(*str) || *str == '_' || (r > 0 && *str == '(') || (r == 0 && *str == '$') || (r > 0 && isdigit(*str))) {
|
if (isalpha(*str) || *str == '_' || (r > 0 && *str == '(') || (r == 0 && *str == '$') || (r > 0 && isdigit(*str))) {
|
||||||
varname[r++] = *str;
|
varname[r++] = *str;
|
||||||
} else {
|
} else {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_ILLEGAL_CHAR]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(E_ILLEGAL_CHAR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -959,13 +959,13 @@ static void InitializeVar(char const *str)
|
|||||||
}
|
}
|
||||||
varname[r] = 0;
|
varname[r] = 0;
|
||||||
if (!*varname) {
|
if (!*varname) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_VAR]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(E_MISS_VAR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!*str) {
|
if (!*str) {
|
||||||
/* Setting a system var does require =expr on the commandline */
|
/* Setting a system var does require =expr on the commandline */
|
||||||
if (*varname == '$') {
|
if (*varname == '$') {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_EQ]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(E_MISS_EQ));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
val.type = INT_TYPE;
|
val.type = INT_TYPE;
|
||||||
@@ -975,41 +975,41 @@ static void InitializeVar(char const *str)
|
|||||||
r = PreserveVar(varname);
|
r = PreserveVar(varname);
|
||||||
}
|
}
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(r));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!*varname) {
|
if (!*varname) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_VAR]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(E_MISS_VAR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
expr = str+1;
|
expr = str+1;
|
||||||
if (!*expr) {
|
if (!*expr) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_EXPR]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(E_MISS_EXPR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r=EvalExpr(&expr, &val, NULL);
|
r=EvalExpr(&expr, &val, NULL);
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(r));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*varname == '$') {
|
if (*varname == '$') {
|
||||||
r=SetSysVar(varname+1, &val);
|
r=SetSysVar(varname+1, &val);
|
||||||
DestroyValue(val);
|
DestroyValue(val);
|
||||||
if (r) fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
if (r) fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(r));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r=SetVar(varname, &val);
|
r=SetVar(varname, &val);
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(r));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
r=PreserveVar(varname);
|
r=PreserveVar(varname);
|
||||||
if (r) fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
if (r) fprintf(ErrFp, GetErr(M_I_OPTION), GetErr(r));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1025,7 +1025,7 @@ AddTrustedUser(char const *username)
|
|||||||
|
|
||||||
pwent = getpwnam(username);
|
pwent = getpwnam(username);
|
||||||
if (!pwent) {
|
if (!pwent) {
|
||||||
fprintf(ErrFp, ErrMsg[M_BAD_USER], username);
|
fprintf(ErrFp, GetErr(M_BAD_USER), username);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
TrustedUsers[NumTrustedUsers] = pwent->pw_uid;
|
TrustedUsers[NumTrustedUsers] = pwent->pw_uid;
|
||||||
@@ -1085,6 +1085,16 @@ ProcessLongOption(char const *arg)
|
|||||||
printf("%s\n", CONFIG_CMD);
|
printf("%s\n", CONFIG_CMD);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
if (!strcmp(arg, "print-errs")) {
|
||||||
|
for (t=0; t<NumErrs; t++) {
|
||||||
|
if (*ErrMsg[t]) {
|
||||||
|
print_escaped_string(stdout, ErrMsg[t]);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp(arg, "print-tokens")) {
|
if (!strcmp(arg, "print-tokens")) {
|
||||||
print_remind_tokens();
|
print_remind_tokens();
|
||||||
print_builtinfunc_tokens();
|
print_builtinfunc_tokens();
|
||||||
|
|||||||
-78
@@ -1,78 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* LANG.H */
|
|
||||||
/* */
|
|
||||||
/* Header file for language support for various languages. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* I'm chauvinistic and name each language with its English name... */
|
|
||||||
|
|
||||||
#define ENGLISH 0 /* original by Dianne Skoll */
|
|
||||||
#define GERMAN 1 /* translated by Wolfgang Thronicke */
|
|
||||||
#define DUTCH 2 /* translated by Willem Kasdorp and Erik-Jan Vens */
|
|
||||||
#define FINNISH 3 /* translated by Mikko Silvonen */
|
|
||||||
#define FRENCH 4 /* translated by Laurent Duperval */
|
|
||||||
#define NORWEGIAN 5 /* translated by Trygve Randen */
|
|
||||||
#define DANISH 6 /* translated by Mogens Lynnerup */
|
|
||||||
#define POLISH 7 /* translated by Jerzy Sobczyk */
|
|
||||||
#define BRAZPORT 8 /* Brazilian Portuguese by Marco Paganini */
|
|
||||||
#define ITALIAN 9 /* translated by Valerio Aimale */
|
|
||||||
#define ROMANIAN 10 /* translated by Liviu Daia */
|
|
||||||
#define SPANISH 11 /* translated by Rafa Couto */
|
|
||||||
#define ICELANDIC 12 /* translated by Björn Davíðsson */
|
|
||||||
|
|
||||||
/* Add more languages here - but please e-mail dianne@skoll.ca
|
|
||||||
to have your favorite language assigned a number. If you add a
|
|
||||||
language, please send me the header file, and permission to include
|
|
||||||
it in future releases of Remind. Note that you'll get no remuneration
|
|
||||||
for this service - just everlasting fame. :-)
|
|
||||||
|
|
||||||
Use the file tstlang.rem to test your new language file. */
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* *
|
|
||||||
* Define the language you want to use here *
|
|
||||||
* *
|
|
||||||
************************************************************************/
|
|
||||||
#ifndef LANG /* Allow for definition on compiler command line */
|
|
||||||
#define LANG ENGLISH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Pick up the appropriate header file */
|
|
||||||
#if LANG == ENGLISH
|
|
||||||
#include "langs/english.h"
|
|
||||||
#elif LANG == GERMAN
|
|
||||||
#include "langs/german.h"
|
|
||||||
#elif LANG == DUTCH
|
|
||||||
#include "langs/dutch.h"
|
|
||||||
#elif LANG == FINNISH
|
|
||||||
#include "langs/finnish.h"
|
|
||||||
#elif LANG == FRENCH
|
|
||||||
#include "langs/french.h"
|
|
||||||
#elif LANG == NORWEGIAN
|
|
||||||
#include "langs/norwgian.h"
|
|
||||||
#elif LANG == DANISH
|
|
||||||
#include "langs/danish.h"
|
|
||||||
#elif LANG == POLISH
|
|
||||||
#include "langs/polish.h"
|
|
||||||
#elif LANG == BRAZPORT
|
|
||||||
#include "langs/portbr.h"
|
|
||||||
#elif LANG == ITALIAN
|
|
||||||
#include "langs/italian.h"
|
|
||||||
#elif LANG == ROMANIAN
|
|
||||||
#include "langs/romanian.h"
|
|
||||||
#elif LANG == SPANISH
|
|
||||||
#include "langs/spanish.h"
|
|
||||||
#elif LANG == ICELANDIC
|
|
||||||
#include "langs/icelandic.h"
|
|
||||||
|
|
||||||
/* If no sensible language, choose English. I intended to use
|
|
||||||
the #error directive here, but some C compilers barf. */
|
|
||||||
#else
|
|
||||||
#include "langs/english.h"
|
|
||||||
#endif
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* DANISH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Danish language. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* */
|
|
||||||
/* REMIND is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* This file is Copyright (C) 1993 by Mogens Lynnerup. */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Danish"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "Søndag"
|
|
||||||
#define L_MONDAY "Mandag"
|
|
||||||
#define L_TUESDAY "Tirsdag"
|
|
||||||
#define L_WEDNESDAY "Onsdag"
|
|
||||||
#define L_THURSDAY "Torsdag"
|
|
||||||
#define L_FRIDAY "Fredag"
|
|
||||||
#define L_SATURDAY "Lørdag"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "Januar"
|
|
||||||
#define L_FEB "Februar"
|
|
||||||
#define L_MAR "Marts"
|
|
||||||
#define L_APR "April"
|
|
||||||
#define L_MAY "Maj"
|
|
||||||
#define L_JUN "Juni"
|
|
||||||
#define L_JUL "Juli"
|
|
||||||
#define L_AUG "August"
|
|
||||||
#define L_SEP "September"
|
|
||||||
#define L_OCT "Oktober"
|
|
||||||
#define L_NOV "November"
|
|
||||||
#define L_DEC "December"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "i dag"
|
|
||||||
#define L_TOMORROW "i morgen"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Påmindelse for %w, %d. %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "siden"
|
|
||||||
#define L_FROMNOW "fra nu"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "om %d dage"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "på"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "e"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "nu"
|
|
||||||
#define L_AT "kl."
|
|
||||||
#define L_MINUTE "minut"
|
|
||||||
#define L_HOUR "time"
|
|
||||||
#define L_IS "er"
|
|
||||||
#define L_WAS "var"
|
|
||||||
#define L_AND "og"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "r"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "ter"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
#define L_AMPM_OVERRIDE(ampm, hour) ampm = (hour < 12) ? (hour<5) ? " om natten" : " om formiddagen" : (hour > 17) ? " om aftenen" : " om eftermiddagen";
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = ".";
|
|
||||||
#define L_A_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s %d", DayName[dse%7], d, MonthName[m], y); } else { sprintf(s, "%s %s, den %d. %s %d", L_ON, DayName[dse%7], d, MonthName[m], y); }
|
|
||||||
#define L_E_OVER sprintf(s, "den %02d%c%02d%c%04d", d, DateSep, m+1, DateSep, y);
|
|
||||||
#define L_F_OVER sprintf(s, "den %02d%c%02d%c%04d", m+1, DateSep, d, DateSep, y);
|
|
||||||
#define L_G_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s", DayName[dse%7], d, MonthName[m]); } else { sprintf(s, "%s %s, den %d. %s", L_ON, DayName[dse%7], d, MonthName[m]); }
|
|
||||||
#define L_H_OVER sprintf(s, "den %02d%c%02d", d, DateSep, m+1);
|
|
||||||
#define L_I_OVER sprintf(s, "den %02d%c%02d", m+1, DateSep, d);
|
|
||||||
#define L_U_OVER L_A_OVER
|
|
||||||
#define L_V_OVER L_G_OVER
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* DUTCH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the DUTCH language. */
|
|
||||||
/* */
|
|
||||||
/* Author: Willem Kasdorp */
|
|
||||||
/* */
|
|
||||||
/* Modified slightly by Dianne Skoll */
|
|
||||||
/* */
|
|
||||||
/* Further corrections by Erik-Jan Vens */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Dutch"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "zondag"
|
|
||||||
#define L_MONDAY "maandag"
|
|
||||||
#define L_TUESDAY "dinsdag"
|
|
||||||
#define L_WEDNESDAY "woensdag"
|
|
||||||
#define L_THURSDAY "donderdag"
|
|
||||||
#define L_FRIDAY "vrijdag"
|
|
||||||
#define L_SATURDAY "zaterdag"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "januari"
|
|
||||||
#define L_FEB "februari"
|
|
||||||
#define L_MAR "maart"
|
|
||||||
#define L_APR "april"
|
|
||||||
#define L_MAY "mei"
|
|
||||||
#define L_JUN "juni"
|
|
||||||
#define L_JUL "juli"
|
|
||||||
#define L_AUG "augustus"
|
|
||||||
#define L_SEP "september"
|
|
||||||
#define L_OCT "oktober"
|
|
||||||
#define L_NOV "november"
|
|
||||||
#define L_DEC "december"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "vandaag"
|
|
||||||
#define L_TOMORROW "morgen"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Herinneringen voor %w, %d%s %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "geleden"
|
|
||||||
#define L_FROMNOW "vanaf nu"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "over %d dagen"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "op"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix. (Indeed..., wkasdo) */
|
|
||||||
#define L_PLURAL "s"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "nu"
|
|
||||||
#define L_AT "op"
|
|
||||||
#define L_MINUTE "minuut"
|
|
||||||
#define L_HOUR "uur"
|
|
||||||
#define L_IS "is"
|
|
||||||
#define L_WAS "was"
|
|
||||||
#define L_AND "en"
|
|
||||||
/* What to add to make "hour" plural (should result in uren, not uuren (wkasdo) */
|
|
||||||
#define L_HPLU "en"
|
|
||||||
/* What to add to make "minute" plural (should be minuten, not minuuten) */
|
|
||||||
#define L_MPLU "en"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
/* Willem - I fixed the uren/uuren problem here */
|
|
||||||
#define L_1_OVER \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, L_NOW); \
|
|
||||||
else if (hdiff == 0) \
|
|
||||||
sprintf(s, "%d %s %s", mdiff, \
|
|
||||||
((mdiff == 1) ? "minuut" : "minuten"), when); \
|
|
||||||
else if (mdiff == 0) \
|
|
||||||
sprintf(s, "%d %s %s", hdiff, \
|
|
||||||
((hdiff == 1) ? "uur" : "uren"), when); \
|
|
||||||
else sprintf(s, "%d %s %s %d %s %s", hdiff, \
|
|
||||||
(hdiff == 1 ? "uur" : "uren"), \
|
|
||||||
L_AND, mdiff, \
|
|
||||||
(mdiff == 1 ? "minuut" : "minuten"), \
|
|
||||||
when);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* ENGLISH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the English language. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "English"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "Sunday"
|
|
||||||
#define L_MONDAY "Monday"
|
|
||||||
#define L_TUESDAY "Tuesday"
|
|
||||||
#define L_WEDNESDAY "Wednesday"
|
|
||||||
#define L_THURSDAY "Thursday"
|
|
||||||
#define L_FRIDAY "Friday"
|
|
||||||
#define L_SATURDAY "Saturday"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "January"
|
|
||||||
#define L_FEB "February"
|
|
||||||
#define L_MAR "March"
|
|
||||||
#define L_APR "April"
|
|
||||||
#define L_MAY "May"
|
|
||||||
#define L_JUN "June"
|
|
||||||
#define L_JUL "July"
|
|
||||||
#define L_AUG "August"
|
|
||||||
#define L_SEP "September"
|
|
||||||
#define L_OCT "October"
|
|
||||||
#define L_NOV "November"
|
|
||||||
#define L_DEC "December"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "today"
|
|
||||||
#define L_TOMORROW "tomorrow"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Reminders for %w, %d%s %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "ago"
|
|
||||||
#define L_FROMNOW "from now"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "in %d days' time"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "on"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "s"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "now"
|
|
||||||
#define L_AT "at"
|
|
||||||
#define L_MINUTE "minute"
|
|
||||||
#define L_HOUR "hour"
|
|
||||||
#define L_IS "is"
|
|
||||||
#define L_WAS "was"
|
|
||||||
#define L_AND "and"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "s"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "s"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
@@ -1,292 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* FINNISH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Finnish language. */
|
|
||||||
/* */
|
|
||||||
/* Author: Mikko Silvonen <silvonen@iki.fi> */
|
|
||||||
/* */
|
|
||||||
/* See http://www.iki.fi/silvonen/remind/ for a list of */
|
|
||||||
/* Finnish holidays. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* This file is Copyright (C) 1993-1998 by Mikko Silvonen. */
|
|
||||||
/* REMIND is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Finnish"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "sunnuntai"
|
|
||||||
#define L_MONDAY "maanantai"
|
|
||||||
#define L_TUESDAY "tiistai"
|
|
||||||
#define L_WEDNESDAY "keskiviikko"
|
|
||||||
#define L_THURSDAY "torstai"
|
|
||||||
#define L_FRIDAY "perjantai"
|
|
||||||
#define L_SATURDAY "lauantai"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "tammikuu"
|
|
||||||
#define L_FEB "helmikuu"
|
|
||||||
#define L_MAR "maaliskuu"
|
|
||||||
#define L_APR "huhtikuu"
|
|
||||||
#define L_MAY "toukokuu"
|
|
||||||
#define L_JUN "kesäkuu"
|
|
||||||
#define L_JUL "heinäkuu"
|
|
||||||
#define L_AUG "elokuu"
|
|
||||||
#define L_SEP "syyskuu"
|
|
||||||
#define L_OCT "lokakuu"
|
|
||||||
#define L_NOV "marraskuu"
|
|
||||||
#define L_DEC "joulukuu"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "tänään"
|
|
||||||
#define L_TOMORROW "huomenna"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Viestit %wna %d. %mta %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM " ap."
|
|
||||||
#define L_PM " ip."
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "sitten"
|
|
||||||
#define L_FROMNOW "kuluttua"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "%d päivän kuluttua"
|
|
||||||
|
|
||||||
/* "on" as in "on date...", but in Finnish it is a case ending;
|
|
||||||
L_PARTIT is the partitive ending appended to -kuu and -tai */
|
|
||||||
#define L_ON "na"
|
|
||||||
#define L_PARTIT "ta"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
/* The partitive ending of "day" */
|
|
||||||
#define L_PLURAL "ä"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "nyt"
|
|
||||||
#define L_AT "klo"
|
|
||||||
#define L_MINUTE "minuutti"
|
|
||||||
#define L_HOUR "tunti"
|
|
||||||
#define L_IS "on"
|
|
||||||
#define L_WAS "oli"
|
|
||||||
#define L_AND "ja"
|
|
||||||
|
|
||||||
/* What to add to make "hour" plural (or actually partitive) */
|
|
||||||
#define L_HPLU "a"
|
|
||||||
/* What to add to make "minute" plural (or actually partitive) */
|
|
||||||
#define L_MPLU "a"
|
|
||||||
|
|
||||||
/* Genitive form of "hour" */
|
|
||||||
#define L_HGEN "tunnin"
|
|
||||||
/* Genitive form of "minute" */
|
|
||||||
#define L_MGEN "minuutin"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
#define L_ORDINAL_OVERRIDE switch(d) { \
|
|
||||||
case 1: plu = ":senä"; break; \
|
|
||||||
case 2: plu = ":sena"; break; \
|
|
||||||
default: \
|
|
||||||
switch(d%10) { \
|
|
||||||
case 2: \
|
|
||||||
case 3: \
|
|
||||||
case 6: \
|
|
||||||
case 8: plu = ":ntena"; break; \
|
|
||||||
default: plu = ":ntenä"; break; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
#define L_A_OVER if (altmode == '*') { sprintf(s, "%s %d. %s %d", DayName[dse%7], d, MonthName[m], y); } else { sprintf(s, "%s%s %d. %s%s %d", DayName[dse%7], L_ON, d, MonthName[m], L_PARTIT, y); }
|
|
||||||
#define L_C_OVER if (altmode == '*') { sprintf(s, "%s", DayName[dse%7]); } else { sprintf(s, "%s%s", DayName[dse%7], L_ON); }
|
|
||||||
#define L_E_OVER sprintf(s, "%02d%c%02d%c%04d", d, DateSep, m+1, DateSep, y);
|
|
||||||
#define L_F_OVER sprintf(s, "%02d%c%02d%c%04d", m+1, DateSep, d, DateSep, y);
|
|
||||||
#define L_G_OVER if (altmode == '*') { sprintf(s, "%s %d. %s", DayName[dse%7], d, MonthName[m]); } else { sprintf(s, "%s%s %d. %s%s", DayName[dse%7], L_ON, d, MonthName[m], L_PARTIT); }
|
|
||||||
#define L_H_OVER sprintf(s, "%02d%c%02d", d, DateSep, m+1);
|
|
||||||
#define L_I_OVER sprintf(s, "%02d%c%02d", m+1, DateSep, d);
|
|
||||||
#define L_J_OVER if (altmode == '*') { sprintf(s, "%s %sn %d%s %d", DayName[dse%7], MonthName[m], d, plu, y); } else { sprintf(s, "%s%s %sn %d%s %d", DayName[dse%7], L_ON, MonthName[m], d, plu, y); }
|
|
||||||
#define L_K_OVER if (altmode == '*') { sprintf(s, "%s %sn %d%s", DayName[dse%7], MonthName[m], d, plu); } else { sprintf(s, "%s%s %sn %d%s", DayName[dse%7], L_ON, MonthName[m], d, plu); }
|
|
||||||
#define L_L_OVER sprintf(s, "%04d%c%02d%c%02d", y, DateSep, m+1, DateSep, d);
|
|
||||||
#define L_Q_OVER sprintf(s, "n");
|
|
||||||
#define L_U_OVER if (altmode == '*') { sprintf(s, "%s %d%s %s %d", DayName[dse%7], d, plu, MonthName[m], y); } else { sprintf(s, "%s%s %d%s %s%s %d", DayName[dse%7], L_ON, d, plu, MonthName[m], L_PARTIT, y); }
|
|
||||||
#define L_V_OVER if (altmode == '*') { sprintf(s, "%s %d%s %s", DayName[dse%7], d, plu, MonthName[m]); } else { sprintf(s, "%s%s %d%s %s%s", DayName[dse%7], L_ON, d, plu, MonthName[m], L_PARTIT); }
|
|
||||||
#define L_1_OVER \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, "%s", L_NOW); \
|
|
||||||
else { \
|
|
||||||
s[0] = '\0'; \
|
|
||||||
if (hdiff != 0) { \
|
|
||||||
if (tdiff < 0) \
|
|
||||||
sprintf(s, "%d %s%s ", hdiff, L_HOUR, hplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%d %s ", hdiff, L_HGEN); \
|
|
||||||
} \
|
|
||||||
if (mdiff != 0) { \
|
|
||||||
if (tdiff < 0) \
|
|
||||||
sprintf(s + strlen(s), "%d %s%s ", mdiff, L_MINUTE, mplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s + strlen(s), "%d %s ", mdiff, L_MGEN); \
|
|
||||||
} \
|
|
||||||
sprintf(s + strlen(s), when); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The next ones are used only when MK_GLOBALS is set */
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#define L_ERR_OVERRIDE 1
|
|
||||||
EXTERN char *ErrMsg[] =
|
|
||||||
{
|
|
||||||
"Ok",
|
|
||||||
"Puuttuva ']'",
|
|
||||||
"Puuttuva lainausmerkki",
|
|
||||||
"Liian monimutkainen lauseke",
|
|
||||||
"Liian monimutkainen lauseke - liikaa operandeja",
|
|
||||||
"Puuttuva ')'",
|
|
||||||
"Määrittelemätön funktio",
|
|
||||||
"Virheellinen merkki",
|
|
||||||
"Kaksipaikkainen operaattori puuttuu",
|
|
||||||
"Muisti loppui",
|
|
||||||
"Virheellinen luku",
|
|
||||||
"Operaattoripino tyhjä - sisäinen virhe",
|
|
||||||
"Muuttujapino tyhjä - sisäinen virhe",
|
|
||||||
"Tyyppimuunnos ei onnistu",
|
|
||||||
"Virheellinen tyyppi",
|
|
||||||
"Liian suuri päiväys",
|
|
||||||
"Pinovirhe - sisäinen virhe",
|
|
||||||
"Jako nollalla",
|
|
||||||
"Määrittelemätön funktio",
|
|
||||||
"Odottamaton rivin loppu",
|
|
||||||
"Odottamaton tiedoston loppu",
|
|
||||||
"Syöttö- tai tulostusvirhe",
|
|
||||||
"Liian pitkä rivi",
|
|
||||||
"Sisäinen virhe",
|
|
||||||
"Virheellinen päiväys",
|
|
||||||
"Liian vähän argumentteja",
|
|
||||||
"Liian paljon argumentteja",
|
|
||||||
"Virheellinen aika",
|
|
||||||
"Liian suuri luku",
|
|
||||||
"Liian pieni luku",
|
|
||||||
"Tiedoston avaus ei onnistu",
|
|
||||||
"Liian monta sisäkkäistä INCLUDEa",
|
|
||||||
"Jäsennysvirhe",
|
|
||||||
"Laukaisuhetken laskenta ei onnistu",
|
|
||||||
"Liian monta sisäkkäistä IF-lausetta",
|
|
||||||
"ELSE ilman IF-lausetta",
|
|
||||||
"ENDIF ilman IF-lausetta",
|
|
||||||
"Kaikkia viikonpäiviä ei voi jättää pois",
|
|
||||||
"Ylimääräisiä merkkejä rivillä",
|
|
||||||
"POP-OMIT-CONTEXT ilman PUSH-OMIT-CONTEXTia",
|
|
||||||
"RUN-lauseen käyttö estetty",
|
|
||||||
"Arvoaluevirhe",
|
|
||||||
"Virheellinen tunniste",
|
|
||||||
"Rekursiivinen funktiokutsu havaittu",
|
|
||||||
"",
|
|
||||||
"Järjestelmämuuttujan muuttaminen ei onnistu",
|
|
||||||
"C-kirjastofunktio ei pysty esittämään päiväystä tai aikaa",
|
|
||||||
"Sisäisen funktion määritelmää yritettiin muuttaa",
|
|
||||||
"Lausekkeessa ei voi olla sisäkkäisiä funktiomääritelmiä",
|
|
||||||
"Päiväyksen täytyy olla täydellinen toistokertoimessa",
|
|
||||||
"Vuosi annettu kahdesti",
|
|
||||||
"Kuukausi annettu kahdesti",
|
|
||||||
"Päivä annettu kahdesti",
|
|
||||||
"Tuntematon sana tai merkki",
|
|
||||||
"OMIT-komennossa on annettava kuukausi",
|
|
||||||
"Liian monta osittaista OMIT-komentoa",
|
|
||||||
"Liian monta täydellistä OMIT-komentoa",
|
|
||||||
"Varoitus: PUSH-OMIT-CONTEXT ilman POP-OMIT-CONTEXTia",
|
|
||||||
"Virhe tiedoston luvussa",
|
|
||||||
"Pilkku puuttuu",
|
|
||||||
"Virheellinen juutalainen päiväys",
|
|
||||||
"IIF vaatii parittoman määrän argumentteja",
|
|
||||||
"Varoitus: puuttuva ENDIF",
|
|
||||||
"Pilkku puuttuu",
|
|
||||||
"Viikonpäivä annettu kahdesti",
|
|
||||||
"Käytä vain yhtä komennoista BEFORE, AFTER ja SKIP",
|
|
||||||
"Sisäkkäisiä MSG-, MSF- ja RUN-lauseita ei voi käyttää lausekkeessa",
|
|
||||||
"Toistokerroin annettu kahdesti",
|
|
||||||
"Delta-arvo annettu kahdesti",
|
|
||||||
"Peruutusarvo annettu kahdesti",
|
|
||||||
"ONCE-avainsanaa käytetty kahdesti. (Hah.)",
|
|
||||||
"AT-sanan perästä puuttuu aika",
|
|
||||||
"THROUGH/UNTIL-sanaa käytetty kahdesti",
|
|
||||||
"Epätäydellinen päiväys",
|
|
||||||
"FROM/SCANFROM-sanaa käytetty kahdesti",
|
|
||||||
"Muuttuja",
|
|
||||||
"Arvo",
|
|
||||||
"*MÄÄRITTELEMÄTÖN*",
|
|
||||||
"Siirrytään funktioon",
|
|
||||||
"Poistutaan funktiosta",
|
|
||||||
"Vanhentunut",
|
|
||||||
"fork() epäonnistui - jonomuistutukset eivät toimi",
|
|
||||||
"Tiedoston avaus ei onnistu",
|
|
||||||
"Virheellinen järjestelmäpäiväys: vuosi on vähemmän kuin %d\n",
|
|
||||||
"Tuntematon virheenetsintätarkenne '%c'\n",
|
|
||||||
"Tuntematon tarkenne '%c'\n",
|
|
||||||
"Tuntematon käyttäjä '%s'\n",
|
|
||||||
"Ryhmänumeron vaihto %d:ksi ei onnistunut\n",
|
|
||||||
"Käyttäjänumeron vaihto %d:ksi ei onnistunut\n",
|
|
||||||
"Muisti ei riitä ympäristölle\n",
|
|
||||||
"Puuttuva '='-merkki",
|
|
||||||
"Puuttuva muuttujanimi",
|
|
||||||
"Puuttuva lauseke",
|
|
||||||
"Päivän asetus %s:ksi ei onnitus\n",
|
|
||||||
"Remind: tarkenne '-i': %s\n",
|
|
||||||
"Ei viestejä.",
|
|
||||||
"%d viesti(ä) tämän päivän jonossa.\n",
|
|
||||||
"Numero puuttuu",
|
|
||||||
"Virheellinen funktio WARN-lausekkeessa",
|
|
||||||
"Can't convert between time zones",
|
|
||||||
"No files matching *.rem",
|
|
||||||
"String too long",
|
|
||||||
"Time specified twice",
|
|
||||||
"Cannot specify DURATION without specifying AT",
|
|
||||||
"Odotettu viikonpäivän nimi",
|
|
||||||
"Päällekkäinen argumentin nimi",
|
|
||||||
"Lausekkeiden arviointi on poistettu käytöstä",
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif /* MK_GLOBALS */
|
|
||||||
|
|
||||||
/* The following is only used in init.c */
|
|
||||||
#ifdef L_IN_INIT
|
|
||||||
#define L_USAGE_OVERRIDE 1
|
|
||||||
void Usage(void)
|
|
||||||
{
|
|
||||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-2024 Dianne Skoll\n", VERSION, L_LANGNAME);
|
|
||||||
#ifdef BETA
|
|
||||||
fprintf(ErrFp, ">>>> BETAVERSIO <<<<\n");
|
|
||||||
#endif
|
|
||||||
fprintf(ErrFp, "Käyttö: remind [tarkenteet] tiedosto [päiväys] [aika] [*toisto]\n");
|
|
||||||
fprintf(ErrFp, "Tarkenteet:\n");
|
|
||||||
fprintf(ErrFp, " -n Tulosta viestien seuraavat esiintymiskerrat yksink. muodossa\n");
|
|
||||||
fprintf(ErrFp, " -r Estä RUN-lauseiden käyttö\n");
|
|
||||||
fprintf(ErrFp, " -c[n] Tulosta n:n kuukauden kalenteri (oletus 1)\n");
|
|
||||||
fprintf(ErrFp, " -c+[n] Tulosta n:n viikon kalenteri (oletus 1)\n");
|
|
||||||
fprintf(ErrFp, " -w[n[,p[,s]]] Aseta kalenterin leveys, tasaus ja välit\n");
|
|
||||||
fprintf(ErrFp, " -s[+][n] Tulosta n:n kuukauden (viikon) 'yksink. kalenteri' (oletus 1)\n");
|
|
||||||
fprintf(ErrFp, " -p[n] Kuten -s, mutta tulosta rem2ps:lle sopivassa muodossa\n");
|
|
||||||
fprintf(ErrFp, " -v Laveat tulostukset\n");
|
|
||||||
fprintf(ErrFp, " -o Älä noudata ONCE-lauseita\n");
|
|
||||||
fprintf(ErrFp, " -t Laukaise kaikki viestit deltan arvosta välittämättä\n");
|
|
||||||
fprintf(ErrFp, " -h Suppeat tulostukset\n");
|
|
||||||
fprintf(ErrFp, " -a Älä laukaise viestejä heti - lisää ne jonoon\n");
|
|
||||||
fprintf(ErrFp, " -q Älä lisää viestejä jonoon\n");
|
|
||||||
fprintf(ErrFp, " -f Laukaise viestit, pysy etualalla\n");
|
|
||||||
fprintf(ErrFp, " -z[n] Käynnisty demonina, herätys n:n (5:n) minuutin välein\n");
|
|
||||||
fprintf(ErrFp, " -d... Virheenetsintä: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
|
||||||
fprintf(ErrFp, " -e Ohjaa virhetulostus stdout-vuohon\n");
|
|
||||||
fprintf(ErrFp, " -b[n] Ajan ilmaisu: 0=ap/ip, 1=24 tuntia, 2=ei aikoja\n");
|
|
||||||
fprintf(ErrFp, " -x[n] SATISFY-lauseen toistoraja (oletus 1000)\n");
|
|
||||||
fprintf(ErrFp, " -kcmd Suorita 'cmd' MSG-tyyppisille viesteille\n");
|
|
||||||
fprintf(ErrFp, " -g[ddd] Lajittele viestit päiväyksen, ajan ja tärkeyden mukaan\n");
|
|
||||||
fprintf(ErrFp, " -ivar=val Alusta muuttuja var arvolla val ja säilytä var\n");
|
|
||||||
fprintf(ErrFp, " -m Aloita kalenteri maanantaista eikä sunnuntaista\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif /* L_IN_INIT */
|
|
||||||
@@ -1,266 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* FRENCH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the French language. */
|
|
||||||
/* */
|
|
||||||
/* Contributed by Laurent Duperval. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* */
|
|
||||||
/* REMIND is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* This file is Copyright (C) 1993 by Laurent Duperval and */
|
|
||||||
/* Dianne Skoll. */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "French"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "dimanche"
|
|
||||||
#define L_MONDAY "lundi"
|
|
||||||
#define L_TUESDAY "mardi"
|
|
||||||
#define L_WEDNESDAY "mercredi"
|
|
||||||
#define L_THURSDAY "jeudi"
|
|
||||||
#define L_FRIDAY "vendredi"
|
|
||||||
#define L_SATURDAY "samedi"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "janvier"
|
|
||||||
#define L_FEB "février"
|
|
||||||
#define L_MAR "mars"
|
|
||||||
#define L_APR "avril"
|
|
||||||
#define L_MAY "mai"
|
|
||||||
#define L_JUN "juin"
|
|
||||||
#define L_JUL "juillet"
|
|
||||||
#define L_AUG "août"
|
|
||||||
#define L_SEP "septembre"
|
|
||||||
#define L_OCT "octobre"
|
|
||||||
#define L_NOV "novembre"
|
|
||||||
#define L_DEC "décembre"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "aujourd'hui"
|
|
||||||
#define L_TOMORROW "demain"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Rappels pour %w, %d%s %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "il y a"
|
|
||||||
#define L_FROMNOW "dans"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "dans %d jours"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "le"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "s"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "maintenant"
|
|
||||||
#define L_AT "à"
|
|
||||||
#define L_MINUTE "minute"
|
|
||||||
#define L_HOUR "heure"
|
|
||||||
#define L_IS "est"
|
|
||||||
#define L_WAS "était"
|
|
||||||
#define L_AND "et"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "s"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "s"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
#define L_ORDINAL_OVERRIDE \
|
|
||||||
switch(d) { \
|
|
||||||
case 1: plu = "er"; break; \
|
|
||||||
default: plu = ""; break; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define L_1_OVER \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, L_NOW); \
|
|
||||||
else if (tdiff < 0) { \
|
|
||||||
if (mdiff == 0) \
|
|
||||||
sprintf(s, "il y a %d heure%s", hdiff, hplu); \
|
|
||||||
else if (hdiff == 0) \
|
|
||||||
sprintf(s, "il y a %d minute%s", mdiff, mplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "il y a %d heure%s et %d minute%s", hdiff, hplu, mdiff, mplu); \
|
|
||||||
} else { \
|
|
||||||
if (mdiff == 0) \
|
|
||||||
sprintf(s, "dans %d heure%s", hdiff, hplu); \
|
|
||||||
else if (hdiff == 0) \
|
|
||||||
sprintf(s, "dans %d minute%s", mdiff, mplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "dans %d heure%s et %d minute%s", hdiff, hplu, mdiff, mplu); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define L_J_OVER if (altmode == '*') { sprintf(s, "%s, %d%s %s, %d", DayName[dse%7], d, plu, MonthName[m], y); } else { sprintf(s, "%s %s, %d%s %s, %d", L_ON, DayName[dse%7], d, plu, MonthName[m], y); }
|
|
||||||
|
|
||||||
#define L_K_OVER if (altmode == '*') { sprintf(s, "%s, %d%s %s", DayName[dse%7], d, plu, MonthName[m]); } else { sprintf(s, "%s %s, %d%s %s", L_ON, DayName[dse%7], d, plu, MonthName[m]); }
|
|
||||||
|
|
||||||
/* The next ones are used only when MK_GLOBALS is set */
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#define L_ERR_OVERRIDE 1
|
|
||||||
EXTERN char *ErrMsg[] =
|
|
||||||
{
|
|
||||||
"Ok",
|
|
||||||
"']' manquant",
|
|
||||||
"Apostrophe manquant",
|
|
||||||
"Expression trop complexe",
|
|
||||||
"Expression trop complexe - trop d'opérandes",
|
|
||||||
"')' manquante",
|
|
||||||
"Fonction non-définie",
|
|
||||||
"Caractère illégal",
|
|
||||||
"Opérateur binaire attendu",
|
|
||||||
"Manque de mémoire",
|
|
||||||
"Nombre mal formé",
|
|
||||||
"Erreur interne - 'underflow' de la pile d'opérateurs",
|
|
||||||
"Erreur interne - 'underflow' de la pile de variables",
|
|
||||||
"Impossible de convertir",
|
|
||||||
"Types non-équivalents",
|
|
||||||
"Débordement de date",
|
|
||||||
"Erreur interne - erreur de pile",
|
|
||||||
"Division par zéro",
|
|
||||||
"Variable non définie",
|
|
||||||
"Fin de ligne non attendue",
|
|
||||||
"Fin de fichier non attendue",
|
|
||||||
"Erreur I/O",
|
|
||||||
"Ligne trop longue",
|
|
||||||
"Erreur interne",
|
|
||||||
"Mauvaise date spécifiée",
|
|
||||||
"Pas assez d'arguments",
|
|
||||||
"Trop d'arguments",
|
|
||||||
"Heure mal formée",
|
|
||||||
"Nombre trop élevé",
|
|
||||||
"Nombre trop bas",
|
|
||||||
"Impossible d'ouvrir le fichier",
|
|
||||||
"Trop d'INCLUDE imbriqués",
|
|
||||||
"Erreur d'analyse",
|
|
||||||
"Impossible de calculer le déclenchement",
|
|
||||||
"Trop de IF imbriqués",
|
|
||||||
"ELSE sans IF correspondant",
|
|
||||||
"ENDIF sans IF correspondant",
|
|
||||||
"Impossible d'omettre (OMIT) tous les jours",
|
|
||||||
"Elément(s) étranger(s) sur la ligne",
|
|
||||||
"POP-OMIT-CONTEXT sans PUSH-OMIT-CONTEXT correspondant",
|
|
||||||
"RUN déactivé",
|
|
||||||
"Erreur de domaine",
|
|
||||||
"Identificateur invalide",
|
|
||||||
"Appel récursif détecté",
|
|
||||||
"",
|
|
||||||
"Impossible de modifier une variable système",
|
|
||||||
"Fonction de la librairie C ne peut représenter la date/l'heure",
|
|
||||||
"Tentative de redéfinition d'une fonction intrinsèque",
|
|
||||||
"Impossible d'imbriquer une définition de fonction dans une expression",
|
|
||||||
"Pour utiliser le facteur de répétition la date doit être spécifiée au complet",
|
|
||||||
"Année spécifiée deux fois",
|
|
||||||
"Mois spécifié deux fois",
|
|
||||||
"Jour spécifié deux fois",
|
|
||||||
"Elément inconnu",
|
|
||||||
"Mois et jour doivent être spécifiés dans commande OMIT",
|
|
||||||
"Trop de OMITs partiels",
|
|
||||||
"Trop de OMITs complets",
|
|
||||||
"Attention: PUSH-OMIT-CONTEXT sans POP-OMIT-CONTEXT correspondant",
|
|
||||||
"Erreur à la lecture du fichier",
|
|
||||||
"Fin de ligne attendue",
|
|
||||||
"Date hébreuse invalide",
|
|
||||||
"IIF demande nombre d'arguments impair",
|
|
||||||
"Attention: ENDIF manquant",
|
|
||||||
"Virgule attendue",
|
|
||||||
"Jour de la semaine spécifié deux fois",
|
|
||||||
"Utiliser un seul parmi BEFORE, AFTER ou SKIP",
|
|
||||||
"Impossible d'imbriquer MSG, MSF, RUN, etc. dans une expression",
|
|
||||||
"Valeur de répétition spécifiée deux fois",
|
|
||||||
"Valeur delta spécifiée deux fois",
|
|
||||||
"Valeur de retour spécifiée deux fois",
|
|
||||||
"Mot-clé ONCE utilisé deux fois. (Hah.)",
|
|
||||||
"Heure attendue après AT",
|
|
||||||
"Mot-clé THROUGH/UNTIL utilisé deux fois",
|
|
||||||
"Spécification de date incomplète",
|
|
||||||
"Mot-clé FROM/SCANFROM utilisé deux fois",
|
|
||||||
"Variable",
|
|
||||||
"Valeur",
|
|
||||||
"*NON-DEFINI*",
|
|
||||||
"Entrée dans UserFN",
|
|
||||||
"Sortie de UserFN",
|
|
||||||
"Expiré",
|
|
||||||
"fork() échoué - impossible de faire les appels en queue",
|
|
||||||
"Impossible d'accéder au fichier",
|
|
||||||
"Date système illégale: Année est inférieure à %d\n",
|
|
||||||
"Option de déverminage inconnue '%c'\n",
|
|
||||||
"Option inconnue '%c'\n",
|
|
||||||
"Usager inconnu '%s'\n",
|
|
||||||
"Impossible de changer gid pour %d\n",
|
|
||||||
"Impossible de changer uid pour %d\n",
|
|
||||||
"Manque de mémoire pour environnement\n",
|
|
||||||
"Signe '=' manquant",
|
|
||||||
"Nom de variable absent",
|
|
||||||
"Expression absente",
|
|
||||||
"Impossible de changer la date d'accès de %s\n",
|
|
||||||
"Remind: '-i' option: %s\n",
|
|
||||||
"Pas de rappels.",
|
|
||||||
"%d rappel(s) en file pour aujourd'hui.\n",
|
|
||||||
"Nombre attendu",
|
|
||||||
"Fonction illégale après WARN",
|
|
||||||
"Can't convert between time zones",
|
|
||||||
"No files matching *.rem",
|
|
||||||
"String too long",
|
|
||||||
"Time specified twice",
|
|
||||||
"Cannot specify DURATION without specifying AT",
|
|
||||||
"Nom du jour de la semaine attendu",
|
|
||||||
"Nom de l'argument en double",
|
|
||||||
"L'évaluation de l'expression est désactivée",
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif /* MK_GLOBALS */
|
|
||||||
|
|
||||||
/* The following is only used in init.c */
|
|
||||||
#ifdef L_IN_INIT
|
|
||||||
#define L_USAGE_OVERRIDE 1
|
|
||||||
void Usage(void)
|
|
||||||
{
|
|
||||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-2024 Dianne Skoll\n", VERSION, L_LANGNAME);
|
|
||||||
#ifdef BETA
|
|
||||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
|
||||||
#endif
|
|
||||||
fprintf(ErrFp, "\nUtilisation: remind [options] fichier [date] [heure] [*répétition]\n");
|
|
||||||
fprintf(ErrFp, "Options:\n");
|
|
||||||
fprintf(ErrFp, " -n Afficher la prochaine occurence des rappels en format simple\n");
|
|
||||||
fprintf(ErrFp, " -r Désactiver les instructions RUN\n");
|
|
||||||
fprintf(ErrFp, " -c[n] Produire un calendrier pour n (défaut 1) mois\n");
|
|
||||||
fprintf(ErrFp, " -c+[n] Produire un calendrier pour n (défaut 1) semaines\n");
|
|
||||||
fprintf(ErrFp, " -w[n[,p[,s]]] Spécifier largeur, remplissage et espacement du calendrier\n");
|
|
||||||
fprintf(ErrFp, " -s[+][n] Produire un 'calendrier simple' pour n (1) mois (semaines)\n");
|
|
||||||
fprintf(ErrFp, " -p[n] Comme -s, mais avec entrée compatible avec rem2ps\n");
|
|
||||||
fprintf(ErrFp, " -v Mode verbeux\n");
|
|
||||||
fprintf(ErrFp, " -o Ignorer instructions ONCE\n");
|
|
||||||
fprintf(ErrFp, " -t Déclencher tous les rappels peu importe le delta\n");
|
|
||||||
fprintf(ErrFp, " -h Mode silencieux\n");
|
|
||||||
fprintf(ErrFp, " -a Ne pas déclencher les rappels minutés immédiatement - les mettre en file\n");
|
|
||||||
fprintf(ErrFp, " -q Ne pas mettre les rappels minutés en file\n");
|
|
||||||
fprintf(ErrFp, " -f Déclencher les rappels minutés immédiatement en restant en avant-plan\n");
|
|
||||||
fprintf(ErrFp, " -z[n] Entrer en mode 'daemon', réveil chaque n (5) minutes\n");
|
|
||||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
|
||||||
fprintf(ErrFp, " -e Envoyer les messages de stderr à stdout\n");
|
|
||||||
fprintf(ErrFp, " -b[n] Formats de l'heure pour le calendrier: 0=am/pm, 1=24hr, 2=aucun\n");
|
|
||||||
fprintf(ErrFp, " -x[n] Limite d'itérations pour la clause SATISFY (def=1000)\n");
|
|
||||||
fprintf(ErrFp, " -kcmd Exécuter 'cmd' pour les rappels de type MSG\n");
|
|
||||||
fprintf(ErrFp, " -g[ddd] Trier les rappels par date, heure et priorité avant d'émettre\n");
|
|
||||||
fprintf(ErrFp, " -ivar=val Initialiser var à val et conserver var\n");
|
|
||||||
fprintf(ErrFp, " -m Commencer le calendrier avec lundi plutôt que dimanche\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif /* L_IN_INIT */
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* GERMAN.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the German language. */
|
|
||||||
/* */
|
|
||||||
/* This file was derived from a patch submitted by Wolfgang */
|
|
||||||
/* Thronicke. I don't guarantee that there are no mistakes - */
|
|
||||||
/* I don't speak German. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "German"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "Sonntag"
|
|
||||||
#define L_MONDAY "Montag"
|
|
||||||
#define L_TUESDAY "Dienstag"
|
|
||||||
#define L_WEDNESDAY "Mittwoch"
|
|
||||||
#define L_THURSDAY "Donnerstag"
|
|
||||||
#define L_FRIDAY "Freitag"
|
|
||||||
#define L_SATURDAY "Samstag"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "Januar"
|
|
||||||
#define L_FEB "Februar"
|
|
||||||
#define L_MAR "März"
|
|
||||||
#define L_APR "April"
|
|
||||||
#define L_MAY "Mai"
|
|
||||||
#define L_JUN "Juni"
|
|
||||||
#define L_JUL "Juli"
|
|
||||||
#define L_AUG "August"
|
|
||||||
#define L_SEP "September"
|
|
||||||
#define L_OCT "Oktober"
|
|
||||||
#define L_NOV "November"
|
|
||||||
#define L_DEC "Dezember"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "heute"
|
|
||||||
#define L_TOMORROW "morgen"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Termine für %w, den %d. %m %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "vorher"
|
|
||||||
#define L_FROMNOW "von heute"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "in %d Tagen"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "am"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "en"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "jetzt"
|
|
||||||
#define L_AT "um"
|
|
||||||
#define L_MINUTE "Minute"
|
|
||||||
#define L_HOUR "Stunde"
|
|
||||||
#define L_IS "ist"
|
|
||||||
#define L_WAS "war"
|
|
||||||
#define L_AND "und"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "n"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "n"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
#define L_AMPM_OVERRIDE(ampm, hour) ampm = (hour < 12) ? (hour<5) ? " nachts" : " vormittags" : (hour > 17) ? " abends" : " nachmittags";
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = ".";
|
|
||||||
#define L_A_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s %d", DayName[dse%7], d, MonthName[m], y); } else { sprintf(s, "%s %s, den %d. %s %d", L_ON, DayName[dse%7], d, MonthName[m], y); }
|
|
||||||
#define L_G_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s", DayName[dse%7], d, MonthName[m]); } else { sprintf(s, "%s %s, den %d. %s", L_ON, DayName[dse%7], d, MonthName[m]); }
|
|
||||||
#define L_U_OVER L_A_OVER
|
|
||||||
#define L_V_OVER L_G_OVER
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* ICELANDIC.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Icelandic language. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* Translated by Björn Davíðsson (bjossi@snerpa.is) */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Icelandic"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "sunnudagur"
|
|
||||||
#define L_MONDAY "mánudagur"
|
|
||||||
#define L_TUESDAY "þriðjudagur"
|
|
||||||
#define L_WEDNESDAY "miðvikudagur"
|
|
||||||
#define L_THURSDAY "fimmtudagur"
|
|
||||||
#define L_FRIDAY "föstudagur"
|
|
||||||
#define L_SATURDAY "laugardagur"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "janúar"
|
|
||||||
#define L_FEB "febrúar"
|
|
||||||
#define L_MAR "mars"
|
|
||||||
#define L_APR "apríl"
|
|
||||||
#define L_MAY "maí"
|
|
||||||
#define L_JUN "júní"
|
|
||||||
#define L_JUL "júlí"
|
|
||||||
#define L_AUG "ágúst"
|
|
||||||
#define L_SEP "september"
|
|
||||||
#define L_OCT "október"
|
|
||||||
#define L_NOV "nóvember"
|
|
||||||
#define L_DEC "desember"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "í dag"
|
|
||||||
#define L_TOMORROW "á morgun"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Minnisatriði: %w, %d%s %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "fh"
|
|
||||||
#define L_PM "eh"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "síðan"
|
|
||||||
#define L_FROMNOW "frá því nú"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "eftir %d daga"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "þann"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "a"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "núna"
|
|
||||||
#define L_AT "kl."
|
|
||||||
#define L_MINUTE "mínútu"
|
|
||||||
#define L_HOUR "klukkustund"
|
|
||||||
#define L_IS "er"
|
|
||||||
#define L_WAS "var"
|
|
||||||
#define L_AND "og"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "ir"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "r"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* ITALIAN.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Italian language. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* It is Copyright (C) 1996 by Valerio Aimale */
|
|
||||||
/* */
|
|
||||||
/* Remind is copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Italian"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "Domenica"
|
|
||||||
#define L_MONDAY "Lunedì"
|
|
||||||
#define L_TUESDAY "Martedì"
|
|
||||||
#define L_WEDNESDAY "Mercoledì"
|
|
||||||
#define L_THURSDAY "Giovedì"
|
|
||||||
#define L_FRIDAY "Venerdì"
|
|
||||||
#define L_SATURDAY "Sabato"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "Gennaio"
|
|
||||||
#define L_FEB "Febbraio"
|
|
||||||
#define L_MAR "Marzo"
|
|
||||||
#define L_APR "Aprile"
|
|
||||||
#define L_MAY "Maggio"
|
|
||||||
#define L_JUN "Giugno"
|
|
||||||
#define L_JUL "Luglio"
|
|
||||||
#define L_AUG "Agosto"
|
|
||||||
#define L_SEP "Settembre"
|
|
||||||
#define L_OCT "Ottobre"
|
|
||||||
#define L_NOV "Novembre"
|
|
||||||
#define L_DEC "Dicembre"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "oggi"
|
|
||||||
|
|
||||||
#define L_TOMORROW "domani"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Promemoria per %w, %d %m %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "fa"
|
|
||||||
#define L_FROMNOW "da oggi"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "fra %d giorni"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON ""
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "ora"
|
|
||||||
#define L_AT "alle"
|
|
||||||
#define L_MINUTE "minut"
|
|
||||||
#define L_HOUR "or"
|
|
||||||
#define L_IS "è"
|
|
||||||
#define L_WAS "era"
|
|
||||||
#define L_AND "e"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "s"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "s"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
#define L_P_OVER sprintf(s, (diff == 1 ? "o" : "i"));
|
|
||||||
#define L_Q_OVER sprintf(s, (diff == 1 ? "a" : "e"));
|
|
||||||
|
|
||||||
#define L_HPLU_OVER hplu = (hdiff == 1 ? "a" : "e");
|
|
||||||
#define L_MPLU_OVER mplu = (mdiff == 1 ? "o" : "i");
|
|
||||||
|
|
||||||
#define L_A_OVER sprintf(s, "%s, %d %s %d", DayName[dse%7], d,\
|
|
||||||
MonthName[m], y);
|
|
||||||
#define L_C_OVER sprintf(s, "%s", DayName[dse%7]);
|
|
||||||
|
|
||||||
#define L_E_OVER sprintf(s, "%02d%c%02d%c%04d", d, DateSep,\
|
|
||||||
m+1, DateSep, y);
|
|
||||||
|
|
||||||
#define L_F_OVER sprintf(s, "%02d%c%02d%c%04d", m+1, DateSep, d, DateSep, y);
|
|
||||||
|
|
||||||
#define L_G_OVER sprintf(s, "%s, %d %s", DayName[dse%7], d, MonthName[m]);
|
|
||||||
|
|
||||||
#define L_H_OVER sprintf(s, "%02d%c%02d", d, DateSep, m+1);
|
|
||||||
|
|
||||||
#define L_I_OVER sprintf(s, "%02d%c%02d", m+1, DateSep, d);
|
|
||||||
|
|
||||||
#define L_J_OVER sprintf(s, "%s, %d %s %d", DayName[dse%7], d, \
|
|
||||||
MonthName[m], y);
|
|
||||||
|
|
||||||
#define L_K_OVER sprintf(s, "%s, %d %s", DayName[dse%7], d, \
|
|
||||||
MonthName[m]);
|
|
||||||
#define L_L_OVER sprintf(s, "%04d%c%02d%c%02d", y, DateSep, m+1, DateSep, d);
|
|
||||||
|
|
||||||
#define L_U_OVER sprintf(s, "%s, %d %s %d", DayName[dse%7], d, \
|
|
||||||
MonthName[m], y);
|
|
||||||
|
|
||||||
#define L_V_OVER sprintf(s, "%s, %d %s", DayName[dse%7], d, \
|
|
||||||
MonthName[m]);
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* NORWGIAN.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Norwegian language. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* This file is Copyright (C) 1993 by Trygve Randen. */
|
|
||||||
/* Remind is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Norwegian"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "Søndag"
|
|
||||||
#define L_MONDAY "Mandag"
|
|
||||||
#define L_TUESDAY "Tirsdag"
|
|
||||||
#define L_WEDNESDAY "Onsdag"
|
|
||||||
#define L_THURSDAY "Torsdag"
|
|
||||||
#define L_FRIDAY "Fredag"
|
|
||||||
#define L_SATURDAY "Lørdag"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "Januar"
|
|
||||||
#define L_FEB "Februar"
|
|
||||||
#define L_MAR "Mars"
|
|
||||||
#define L_APR "April"
|
|
||||||
#define L_MAY "Mai"
|
|
||||||
#define L_JUN "Juni"
|
|
||||||
#define L_JUL "Juli"
|
|
||||||
#define L_AUG "August"
|
|
||||||
#define L_SEP "September"
|
|
||||||
#define L_OCT "Oktober"
|
|
||||||
#define L_NOV "November"
|
|
||||||
#define L_DEC "Desember"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "i dag"
|
|
||||||
#define L_TOMORROW "i morgen"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Påminnelse for %w, %d. %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "siden"
|
|
||||||
#define L_FROMNOW "fra nå"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "om %d dager"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "den"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "er"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "nå"
|
|
||||||
#define L_AT "kl."
|
|
||||||
#define L_MINUTE "minutt"
|
|
||||||
#define L_HOUR "time"
|
|
||||||
#define L_IS "er"
|
|
||||||
#define L_WAS "var"
|
|
||||||
#define L_AND "og"
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "r"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "er"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = ".";
|
|
||||||
#define L_A_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s %d", DayName[dse%7], d, MonthName[m], y); } else { sprintf(s, "%s %s, den %d. %s %d", L_ON, DayName[dse%7], d, MonthName[m], y); }
|
|
||||||
#define L_G_OVER if (altmode == '*') { sprintf(s, "%s, den %d. %s", DayName[dse%7], d, MonthName[m]); } else { sprintf(s, "%s %s, den %d. %s", L_ON, DayName[dse%7], d, MonthName[m]); }
|
|
||||||
#define L_U_OVER L_A_OVER
|
|
||||||
#define L_V_OVER L_G_OVER
|
|
||||||
@@ -1,281 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* POLISH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Polish language. */
|
|
||||||
/* */
|
|
||||||
/* This file was submitted by Jerzy Sobczyk. I don't */
|
|
||||||
/* guarantee that there are no mistakes - I don't speak */
|
|
||||||
/* Polish. */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Polish"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
# define L_SUNDAY "Niedziela"
|
|
||||||
# define L_MONDAY "Poniedziałek"
|
|
||||||
# define L_TUESDAY "Wtorek"
|
|
||||||
# define L_WEDNESDAY "Środa"
|
|
||||||
# define L_THURSDAY "Czwartek"
|
|
||||||
# define L_FRIDAY "Piątek"
|
|
||||||
# define L_SATURDAY "Sobota"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
# define L_JAN "Styczeń"
|
|
||||||
# define L_FEB "Luty"
|
|
||||||
# define L_MAR "Marzec"
|
|
||||||
# define L_APR "Kwiecień"
|
|
||||||
# define L_MAY "Maj"
|
|
||||||
# define L_JUN "Czerwiec"
|
|
||||||
# define L_JUL "Lipiec"
|
|
||||||
# define L_AUG "Sierpień"
|
|
||||||
# define L_SEP "Wrzesień"
|
|
||||||
# define L_OCT "Październik"
|
|
||||||
# define L_NOV "Listopad"
|
|
||||||
# define L_DEC "Grudzień"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "dzisiaj"
|
|
||||||
#define L_TOMORROW "jutro"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Terminarz na %w, %d. %m %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "temu"
|
|
||||||
#define L_FROMNOW "od teraz"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "za %d dni"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "-"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL ""
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "teraz"
|
|
||||||
#define L_AT "o"
|
|
||||||
#define L_MINUTE "minut"
|
|
||||||
#define L_HOUR "godzin"
|
|
||||||
# define L_IS "będzie"
|
|
||||||
# define L_WAS "było"
|
|
||||||
#define L_AND "i"
|
|
||||||
|
|
||||||
#define L_HPLU ""
|
|
||||||
#define L_MPLU ""
|
|
||||||
|
|
||||||
/* What to add to make "hour" or "minute" plural */
|
|
||||||
#define L_NPLU( N ) ((N == 1) ? "ę" : ((N==12) || (N==13) || (N==14)) ? "" : \
|
|
||||||
((N%10==2) || (N%10==3) || (N%10==4)) ? "y" : "" )
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU_OVER hplu = L_NPLU( hdiff );
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU_OVER mplu = L_NPLU( mdiff );
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
#define L_AMPM_OVERRIDE(ampm, hour) \
|
|
||||||
ampm = (hour<12) ? \
|
|
||||||
(hour<5) ? " w nocy" \
|
|
||||||
: (hour<10) ? " rano" \
|
|
||||||
: " przed południem" \
|
|
||||||
: (hour<18) ? " po południu" \
|
|
||||||
: (hour<22) ? " wieczorem" \
|
|
||||||
: " w nocy";
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = "";
|
|
||||||
#define L_A_OVER if (altmode == '*') { sprintf(s, "%s, %d. %s %d", DayName[dse%7], d, MonthName[m], y); } else { sprintf(s, "%s %s, %d. %s %d", L_ON, DayName[dse%7], d, MonthName[m], y); }
|
|
||||||
#define L_G_OVER if (altmode == '*') { sprintf(s, "%s, %d. %s", DayName[dse%7], d, MonthName[m]); } else { sprintf(s, "%s %s, %d. %s", L_ON, DayName[dse%7], d, MonthName[m]); }
|
|
||||||
#define L_U_OVER L_A_OVER
|
|
||||||
#define L_V_OVER L_G_OVER
|
|
||||||
|
|
||||||
#define L_0_OVER sprintf(s, L_NPLU(hdiff));
|
|
||||||
#define L_9_OVER sprintf(s, L_NPLU(mdiff));
|
|
||||||
#define L_1_OVER \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, L_NOW); \
|
|
||||||
else if (tdiff > 0) \
|
|
||||||
{ \
|
|
||||||
if (hdiff == 0) \
|
|
||||||
sprintf(s, "za %d %s%s", mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
|
||||||
else if (mdiff == 0) \
|
|
||||||
sprintf(s, "za %d %s%s", hdiff, L_HOUR, L_NPLU(hdiff)); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "za %d %s%s %s %d %s%s", hdiff, L_HOUR, L_NPLU(hdiff), \
|
|
||||||
L_AND, mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
if (hdiff == 0) \
|
|
||||||
sprintf(s, "%d %s%s temu", mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
|
||||||
else if (mdiff == 0) \
|
|
||||||
sprintf(s, "%d %s%s temu", hdiff, L_HOUR, L_NPLU(hdiff)); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%d %s%s %s %d %s%s temu", hdiff, L_HOUR, L_NPLU(hdiff), \
|
|
||||||
L_AND, mdiff, L_MINUTE, L_NPLU(mdiff)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The next ones are used only when MK_GLOBALS is set */
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#define L_ERR_OVERRIDE 1
|
|
||||||
EXTERN char *ErrMsg[] =
|
|
||||||
{
|
|
||||||
"OK",
|
|
||||||
"Brakujący ']'",
|
|
||||||
"Brakujący nawias",
|
|
||||||
"Zbyt skomplikowane wyrażenie",
|
|
||||||
"Zbyt skomplikowane wyrażenie - za dużo argumentów",
|
|
||||||
"Brakujący ')'",
|
|
||||||
"Nie zdefiniowana funkcja",
|
|
||||||
"Nielegalny znak",
|
|
||||||
"Spodziewany operator binarny",
|
|
||||||
"Brak pamięci",
|
|
||||||
"Niepoprawny numer",
|
|
||||||
"Pusty stos operatorów - błąd wewnętrzny",
|
|
||||||
"Pusty stos zmiennych - błąd wewnętrzny",
|
|
||||||
"Niemożliwa konwersja",
|
|
||||||
"Błąd typu",
|
|
||||||
"Nadmiar daty",
|
|
||||||
"Błąd stosu - błąd wewnętrzny",
|
|
||||||
"Dzielenie przez zero",
|
|
||||||
"Niezdefiniowana zmienna",
|
|
||||||
"Niespodziewany koniec linii",
|
|
||||||
"Niespodziewany koniec pliku",
|
|
||||||
"Błąd wejscia/wyjscia",
|
|
||||||
"Za długa linia",
|
|
||||||
"Błąd wewnętrzny",
|
|
||||||
"Zła specyfikacja daty",
|
|
||||||
"Za mało argumentów",
|
|
||||||
"Za dużo argumentów",
|
|
||||||
"Nieprawidłowy czas",
|
|
||||||
"Liczba za duża",
|
|
||||||
"Liczba za mała",
|
|
||||||
"Nie mogę otworzyć pliku",
|
|
||||||
"Zbyt zagnieżdżone INCLUDE",
|
|
||||||
"Błąd składniowy",
|
|
||||||
"Nie mogę obliczyć przypomnienia",
|
|
||||||
"Zbyt zagnieżdżone IF",
|
|
||||||
"ELSE bez IF do pary",
|
|
||||||
"ENDIF bez IF do pary",
|
|
||||||
"Nie mogę ominąć (OMIT) wszystkich dni",
|
|
||||||
"Niespodziewany wyraz w lini",
|
|
||||||
"POP-OMIT-CONTEXT bez PUSH-OMIT-CONTEXT",
|
|
||||||
"Komenda RUN zablokowana",
|
|
||||||
"Błąd dziedziny",
|
|
||||||
"Niepoprawny identyfikator",
|
|
||||||
"Wykryto rekursywne wywołanie funkcji",
|
|
||||||
"",
|
|
||||||
"Nie mogę zmienić zmiennej systemowej",
|
|
||||||
"Funkcja biblioteki C nie może reprezentowac daty/czasu",
|
|
||||||
"Próba redefinicji funkcji wbudowanej",
|
|
||||||
"Nie wolno zagnieżdżać definicji funkcji w wyrażeniu",
|
|
||||||
"Aby użyc powtórzenia trzeba w pełni wyspecyfikować datę",
|
|
||||||
"Rok podany dwókrotnie",
|
|
||||||
"Miesiąc podany dwókrotnie",
|
|
||||||
"Dzień podany dwókrotnie",
|
|
||||||
"Nieznane słowo",
|
|
||||||
"W komendzie OMIT trzeba podać miesiąc",
|
|
||||||
"Za dużo częściowych komend OMIT",
|
|
||||||
"Za dużo pełnych komend OMIT",
|
|
||||||
"Ostrzeżenie: PUSH-OMIT-CONTEXT bez POP-OMIT-CONTEXT",
|
|
||||||
"Błąd odczytu pliku",
|
|
||||||
"Oczekiwany koniec linii",
|
|
||||||
"Błędna data hebrajska",
|
|
||||||
"IIF wymaga nieparzystej liczby argumentów",
|
|
||||||
"Ostrzeżenie: Brakujacy ENDIF",
|
|
||||||
"Oczekiwany przecinek",
|
|
||||||
"Dzień tygodnia podany dwókrotnie",
|
|
||||||
"Dozwolone tylko jedno z: BEFORE, AFTER i SKIP",
|
|
||||||
"Nie można zagnieżdżać MSG, MSF, RUN, itp. w wyrażeniu",
|
|
||||||
"Wartość powtorzenia podana dwókrotnie",
|
|
||||||
"Wartość różnicy podana dwókrotnie",
|
|
||||||
"Wartość cofnięcia podana dwókrotnie",
|
|
||||||
"Słowo ONCE użyte dwókrotnie.",
|
|
||||||
"Po AT oczekiwany jest czas",
|
|
||||||
"Słowo THROUGH/UNTIL użyte dwókrotnie",
|
|
||||||
"Niekompletna specyfikacja daty",
|
|
||||||
"Słowo FROM/SCANFROM użyte dwókrotnie",
|
|
||||||
"Zmienna",
|
|
||||||
"Wartość",
|
|
||||||
"*NIE ZDEFINIOWANE*",
|
|
||||||
"Początek UserFN",
|
|
||||||
"Koniec UserFN",
|
|
||||||
"Przemineło",
|
|
||||||
"Niepowodzenie w funkcji fork() - nie mogę kolejkować przypomnień",
|
|
||||||
"Nie ma dostępu do pliku",
|
|
||||||
"Błędna data systemowa: Rok mniejszy niż %d\n",
|
|
||||||
"Nieznana flaga odpluskwiania '%c'\n",
|
|
||||||
"Nieznana opcja '%c'\n",
|
|
||||||
"Nieznany użytkownik '%s'\n",
|
|
||||||
"Nie mogę zmienić gid na %d\n",
|
|
||||||
"Nie mogę zmienić uid na %d\n",
|
|
||||||
"Brak pamięci na zmienne środowiska\n",
|
|
||||||
"Brak znaku '='",
|
|
||||||
"Brak nazwy zmiennej",
|
|
||||||
"Brak wyrażenia",
|
|
||||||
"Nie mogę zmienić daty dostępu pliku %s\n",
|
|
||||||
"Remind: '-i' option: %s\n",
|
|
||||||
"Brak przypomnień.",
|
|
||||||
"%d Przypomnienia zakolejkowane na później.\n",
|
|
||||||
"Spodziewana liczba",
|
|
||||||
"Illegal function in WARN clause (NEEDS TRANSLATION TO POLISH)",
|
|
||||||
"Can't convert between time zones",
|
|
||||||
"No files matching *.rem",
|
|
||||||
"String too long",
|
|
||||||
"Time specified twice",
|
|
||||||
"Cannot specify DURATION without specifying AT",
|
|
||||||
"Oczekiwana nazwa dnia tygodnia",
|
|
||||||
"Zduplikowana nazwa argumentu",
|
|
||||||
"Ocena wyrażeń jest wyłączona",
|
|
||||||
};
|
|
||||||
#endif /* MK_GLOBALS */
|
|
||||||
|
|
||||||
/* The following is only used in init.c */
|
|
||||||
#ifdef L_IN_INIT
|
|
||||||
#define L_USAGE_OVERRIDE 1
|
|
||||||
void Usage(void)
|
|
||||||
{
|
|
||||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-2024 Dianne Skoll\n", VERSION, L_LANGNAME);
|
|
||||||
#ifdef BETA
|
|
||||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
|
||||||
#endif
|
|
||||||
fprintf(ErrFp, "\nSposób użycia: remind [opcje] plik [data] [czas] [*powtórzenie]\n");
|
|
||||||
fprintf(ErrFp, "Opcje:\n");
|
|
||||||
fprintf(ErrFp, " -n Wypisz następne przypomnienia w prostym formacie\n");
|
|
||||||
fprintf(ErrFp, " -r Zablokuj dyrektywy RUN\n");
|
|
||||||
fprintf(ErrFp, " -c[n] Wypisz kalendarz na n (domyślnie 1) miesięcy\n");
|
|
||||||
fprintf(ErrFp, " -c+[n] Wypisz kalendarz na n (domyślnie 1) tygodni\n");
|
|
||||||
fprintf(ErrFp, " -w[n[,p[,s]]] Ustaw szerokość, wypełnienie i odstępy w kalendarzu\n");
|
|
||||||
fprintf(ErrFp, " -s[+][n] Wypisz uproszczony kalendarz na n (1) miesięcy (tygodni)\n");
|
|
||||||
fprintf(ErrFp, " -p[n] To samo co -s, ale kompatybilne z rem2ps\n");
|
|
||||||
fprintf(ErrFp, " -v Obszerniejsze komentarze\n");
|
|
||||||
fprintf(ErrFp, " -o Ignoruj instrukcje ONCE\n");
|
|
||||||
fprintf(ErrFp, " -t Odpal wszystkie przyszłe przypomnienia niezależnie od delty\n");
|
|
||||||
fprintf(ErrFp, " -h Praca bezszmerowa\n");
|
|
||||||
fprintf(ErrFp, " -a Nie odpalaj przyponień czasowych - kolejkuj je\n");
|
|
||||||
fprintf(ErrFp, " -q Nie kolejkuj przyponień czasowych\n");
|
|
||||||
fprintf(ErrFp, " -f Nie przechodź do pracy w tle\n");
|
|
||||||
fprintf(ErrFp, " -z[n] Pracuj jako demon, budząc się co n (5) minut\n");
|
|
||||||
fprintf(ErrFp, " -d... Odpluskwianie: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
|
||||||
fprintf(ErrFp, " -e Komunikaty o błędach skieruj na stdout\n");
|
|
||||||
fprintf(ErrFp, " -b[n] Format czasu: 0=am/pm, 1=24godz., 2=żaden\n");
|
|
||||||
fprintf(ErrFp, " -x[n] Limit powtórzeń klauzuli SATISFY (domyślnie=1000)\n");
|
|
||||||
fprintf(ErrFp, " -kcmd Wywołaj 'cmd' dla przypomnień typu MSG\n");
|
|
||||||
fprintf(ErrFp, " -g[ddd] Sortuj przypomnienia według daty, czasu i priorytetu\n");
|
|
||||||
fprintf(ErrFp, " -ivar=val Zainicjuj zmienną var wartościa val i zachowaj ja\n");
|
|
||||||
fprintf(ErrFp, " -m Rozpocznij kalendarz od poniedziałku zamiast od niedzieli\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif /* L_IN_INIT */
|
|
||||||
@@ -1,290 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* PORTBR.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Brazilian Portuguese Language. */
|
|
||||||
/* */
|
|
||||||
/* Contributed by Marco Paganini (paganini@ism.com.br). */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* */
|
|
||||||
/* REMIND is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* This file is Copyright (C) 1996 by Marco Paganini and */
|
|
||||||
/* Dianne Skoll. */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Brazilian Portuguese"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
#define L_SUNDAY "domingo"
|
|
||||||
#define L_MONDAY "segunda"
|
|
||||||
#define L_TUESDAY "terca"
|
|
||||||
#define L_WEDNESDAY "quarta"
|
|
||||||
#define L_THURSDAY "quinta"
|
|
||||||
#define L_FRIDAY "sexta"
|
|
||||||
#define L_SATURDAY "sabado"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "janeiro"
|
|
||||||
#define L_FEB "fevereiro"
|
|
||||||
#define L_MAR "marco"
|
|
||||||
#define L_APR "abril"
|
|
||||||
#define L_MAY "maio"
|
|
||||||
#define L_JUN "junho"
|
|
||||||
#define L_JUL "julho"
|
|
||||||
#define L_AUG "agosto"
|
|
||||||
#define L_SEP "setembro"
|
|
||||||
#define L_OCT "outubro"
|
|
||||||
#define L_NOV "novembro"
|
|
||||||
#define L_DEC "dezembro"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
#define L_TODAY "hoje"
|
|
||||||
#define L_TOMORROW "amanha"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Avisos para %w, %d de %m de %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "atras"
|
|
||||||
#define L_FROMNOW "adiante"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "em %d dias"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "em"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "s"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "agora"
|
|
||||||
#define L_AT "as"
|
|
||||||
#define L_MINUTE "minuto"
|
|
||||||
#define L_HOUR "hora"
|
|
||||||
#define L_IS "sao"
|
|
||||||
#define L_WAS "eram"
|
|
||||||
#define L_AND "e"
|
|
||||||
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU "s"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "s"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = "";
|
|
||||||
|
|
||||||
/* Portuguese weekdays must be treated separately */
|
|
||||||
#define _ON_WEEKDAY(x) ((x % 7) < 2) ? "no" : "na"
|
|
||||||
|
|
||||||
#define L_A_OVER \
|
|
||||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m], y);
|
|
||||||
|
|
||||||
#define L_C_OVER \
|
|
||||||
sprintf(s, "%s %s", _ON_WEEKDAY(dse), DayName[dse%7]);
|
|
||||||
|
|
||||||
#define L_G_OVER \
|
|
||||||
sprintf(s, "%s %s, %d %s", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m]);
|
|
||||||
|
|
||||||
#define L_J_OVER \
|
|
||||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m], y);
|
|
||||||
|
|
||||||
#define L_K_OVER \
|
|
||||||
sprintf(s, "%s %s, %d de %s", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m]);
|
|
||||||
|
|
||||||
/* Portuguese does not use some suffixes, some some %u and %j are the same */
|
|
||||||
#define L_U_OVER \
|
|
||||||
sprintf(s, "%s %s, %d de %s de %d", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m], y);
|
|
||||||
|
|
||||||
#define L_V_OVER \
|
|
||||||
sprintf(s, "%s %s, %d de %s", _ON_WEEKDAY(dse), DayName[dse%7], d, MonthName[m]);
|
|
||||||
|
|
||||||
#define L_1_OVER \
|
|
||||||
{ \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, L_NOW); \
|
|
||||||
else \
|
|
||||||
if (hdiff == 0) \
|
|
||||||
{ \
|
|
||||||
if (mdiff > 0) \
|
|
||||||
sprintf(s, "em %d %s%s", mdiff, L_MINUTE, mplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%d %s%s atras", mdiff, L_MINUTE, mplu); \
|
|
||||||
} \
|
|
||||||
else if (mdiff == 0) \
|
|
||||||
{ \
|
|
||||||
if (hdiff > 0) \
|
|
||||||
sprintf(s, "em %d %s%s", hdiff, L_HOUR, hplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%d %s%s atras", hdiff, L_HOUR, hplu); \
|
|
||||||
} else { \
|
|
||||||
if (tdiff > 0) \
|
|
||||||
sprintf(s, "em %d %s%s %s %d %s%s", hdiff, L_HOUR, hplu, L_AND, mdiff, L_MINUTE, mplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%d %s%s %s %d %s%s atras", hdiff, L_HOUR, hplu, L_AND, mdiff, L_MINUTE, mplu); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The next ones are used only when MK_GLOBALS is set */
|
|
||||||
#ifdef MK_GLOBALS
|
|
||||||
#define L_ERR_OVERRIDE 1
|
|
||||||
EXTERN char *ErrMsg[] =
|
|
||||||
{
|
|
||||||
"Ok",
|
|
||||||
"Falta um ']'",
|
|
||||||
"Falta uma aspa",
|
|
||||||
"Expressao muito complexa",
|
|
||||||
"Expressao muito complexa - muitos operandos",
|
|
||||||
"Falta um ')'",
|
|
||||||
"Funcao nao definida",
|
|
||||||
"Caracter ilegal",
|
|
||||||
"Esperando operador binario",
|
|
||||||
"Sem memoria",
|
|
||||||
"Numero mal-formado",
|
|
||||||
"Op stack underflow - erro interno",
|
|
||||||
"Va stack underflow - erro interno",
|
|
||||||
"Nao consigo fazer 'coerce'",
|
|
||||||
"Type mismatch",
|
|
||||||
"Overflow na data",
|
|
||||||
"Erro de stack - erro interno",
|
|
||||||
"Divisao por zero",
|
|
||||||
"Variavel nao definida",
|
|
||||||
"Fim da linha nao esperado",
|
|
||||||
"Fim de arquivo nao esperado",
|
|
||||||
"Erro de I/O",
|
|
||||||
"Linha muito longa",
|
|
||||||
"Erro interno",
|
|
||||||
"Especificacao de data invalida",
|
|
||||||
"Argumentos insuficientes",
|
|
||||||
"Argumentos em excesso",
|
|
||||||
"Hora mal-formada",
|
|
||||||
"Numero muito grande",
|
|
||||||
"Numero muito pequeno",
|
|
||||||
"Nao consigo abrir o arquivo",
|
|
||||||
"Ninho de INCLUDEs muito profundo",
|
|
||||||
"Erro de parsing",
|
|
||||||
"Nao consigo computar o 'trigger'",
|
|
||||||
"Muitos IFs aninhados",
|
|
||||||
"ELSE sem o IF correspondente",
|
|
||||||
"ENDIF sem o IF correspondente",
|
|
||||||
"Nao se pode usar OMIT para todos os dias da semana",
|
|
||||||
"Token nao reconhecido na linha",
|
|
||||||
"POP-OMIT-CONTEXT sem PUSH-OMIT-CONTEXT correspondente",
|
|
||||||
"RUN desabilitado",
|
|
||||||
"Erro de dominio",
|
|
||||||
"Identificados invalido",
|
|
||||||
"Chamada de funcao recursiva detectada",
|
|
||||||
"",
|
|
||||||
"Nao posso modificar variavel de sistema",
|
|
||||||
"Funcao da biblioteca C nao pode representar data/hora",
|
|
||||||
"Tentativa de redefinir funcao interna",
|
|
||||||
"Nao e' possivel aninhar definicao de funcao em expressao",
|
|
||||||
"Data deve ser completamente especificada para usar o fator de REPEAT",
|
|
||||||
"Ano especificado duas vezes",
|
|
||||||
"Mes especificado duas vezes",
|
|
||||||
"Dia especificado duas vezes",
|
|
||||||
"Token desconhecido",
|
|
||||||
"O mes deve ser especificados no comando OMIT",
|
|
||||||
"Muitos OMITs parciais",
|
|
||||||
"Muitos OMITs full",
|
|
||||||
"Aviso: PUSH-OMIT-CONTEXT sem POP-OMIT-CONTEXT correspondente",
|
|
||||||
"Erro na leitura do arquivo",
|
|
||||||
"Aguardando fim do arquivo",
|
|
||||||
"Data hebraica invalida",
|
|
||||||
"IIF necessita de numero impar de argumentos",
|
|
||||||
"Warning: ENDIF faltando",
|
|
||||||
"Esperando virgula",
|
|
||||||
"Dia da semana especificado duas vezes",
|
|
||||||
"Use apenas um de BEFORE, AFTER ou SKIP",
|
|
||||||
"Nao e possivel aninhar MSG, MSF, RUN, etc. em expressoes",
|
|
||||||
"Valor de Repeat especificado duas vezes",
|
|
||||||
"Valor de Delta especificado duas vezes",
|
|
||||||
"Valor de Back especificado duas vezes",
|
|
||||||
"ONCE usado duas vezes (Eheheh)",
|
|
||||||
"Esperando hora apos AT",
|
|
||||||
"Keyword THROUGH/UNTIL usada duas vezes",
|
|
||||||
"Especificacao de data incompleta",
|
|
||||||
"Keyword FROM/SCANFROM usada duas vezes",
|
|
||||||
"Variavel",
|
|
||||||
"Valor",
|
|
||||||
"*INDEFINIDO*",
|
|
||||||
"Entrando UserFN",
|
|
||||||
"Saindo UserFN",
|
|
||||||
"Expirou",
|
|
||||||
"fork() falhou - Nao posso processar compromissos na fila",
|
|
||||||
"Nao consigo acessar o arquivo",
|
|
||||||
"Data do sistema ilegal: Ano e menor que %d\n",
|
|
||||||
"Flag de debug desconhecido '%c'\n",
|
|
||||||
"Opcao desconhecida '%c'\n",
|
|
||||||
"Usuario desconhecido '%s'\n",
|
|
||||||
"Nao consigo mudar gid para %d\n",
|
|
||||||
"Nao consigo mudar uid para %d\n",
|
|
||||||
"Sem memoria para o environment\n",
|
|
||||||
"Falta o sinal de '='",
|
|
||||||
"Falta o nome da variavel",
|
|
||||||
"Falta a expressao",
|
|
||||||
"Nao consigo resetar a data de acesso de %s\n",
|
|
||||||
"Remind: '-i' opcao: %s\n",
|
|
||||||
"Sem compromissos.",
|
|
||||||
"%d compromisso(s) colocados na fila para mais tarde.\n",
|
|
||||||
"Esperando numero",
|
|
||||||
"Funcao ilegal na clausula WARN",
|
|
||||||
"Can't convert between time zones",
|
|
||||||
"No files matching *.rem",
|
|
||||||
"String too long",
|
|
||||||
"Time specified twice",
|
|
||||||
"Cannot specify DURATION without specifying AT",
|
|
||||||
"Esperando nome do dia da semana",
|
|
||||||
"Nome de argumento duplicado",
|
|
||||||
"A avaliação da expressão está desabilitada",
|
|
||||||
};
|
|
||||||
#endif /* MK_GLOBALS */
|
|
||||||
|
|
||||||
/* The following is only used in init.c */
|
|
||||||
#ifdef L_IN_INIT
|
|
||||||
#define L_USAGE_OVERRIDE 1
|
|
||||||
void Usage(void)
|
|
||||||
{
|
|
||||||
fprintf(ErrFp, "\nREMIND %s (versao %s) (C) 1992-2024 Dianne Skoll\n", VERSION, L_LANGNAME);
|
|
||||||
#ifdef BETA
|
|
||||||
fprintf(ErrFp, ">>>> VERSAO BETA <<<<\n");
|
|
||||||
#endif
|
|
||||||
fprintf(ErrFp, "Uso: remind [opcoes] arquivo [data] [hora] [*rep]\n");
|
|
||||||
fprintf(ErrFp, "Opcoes:\n");
|
|
||||||
fprintf(ErrFp, " -n Imprime a proxima ocorrencia em formato simples\n");
|
|
||||||
fprintf(ErrFp, " -r Desabilita a diretiva RUN\n");
|
|
||||||
fprintf(ErrFp, " -c[n] Produz calendario para n (default 1) meses\n");
|
|
||||||
fprintf(ErrFp, " -c+[n] Produz calendario para n (default 1) semanas\n");
|
|
||||||
fprintf(ErrFp, " -w[n[,p[,s]]] Especifica largura, preenchimento e espacejamento do calendario\n");
|
|
||||||
fprintf(ErrFp, " -s[+][n] Produz um `calendario simples' para n (1) meses (semanas)\n");
|
|
||||||
fprintf(ErrFp, " -p[n] Identico a -s, porem com saida compativel com rem2ps\n");
|
|
||||||
fprintf(ErrFp, " -v Modo verbose\n");
|
|
||||||
fprintf(ErrFp, " -o Ignora diretivas ONCE\n");
|
|
||||||
fprintf(ErrFp, " -t Aciona todos os compromissos futuros, sem considerar o delta\n");
|
|
||||||
fprintf(ErrFp, " -h Modo `Hush' - quieto\n");
|
|
||||||
fprintf(ErrFp, " -a Nao aciona compromissos com hora imediatamente - apenas coloca na fila\n");
|
|
||||||
fprintf(ErrFp, " -q Nao coloca compromissos com hora na fila\n");
|
|
||||||
fprintf(ErrFp, " -f Aciona compromissos com hora em modo foreground\n");
|
|
||||||
fprintf(ErrFp, " -z[n] Modo `daemon', acordando a cada n (5) minutos.\n");
|
|
||||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trigger v=dumpvars l=showline\n");
|
|
||||||
fprintf(ErrFp, " -e Desvia mensagens normalmente enviadas a stderr para stdout\n");
|
|
||||||
fprintf(ErrFp, " -b[n] Formato da hora para o cal: 0=am/pm, 1=24hr, 2=nenhum\n");
|
|
||||||
fprintf(ErrFp, " -x[n] Limite de iteracoes para a clausula SATISFY (default=1000)\n");
|
|
||||||
fprintf(ErrFp, " -kcmd Executa `cmd' para os compromissos com MSG\n");
|
|
||||||
fprintf(ErrFp, " -g[ddd] Classifica compromissos por data, hora e prioridade antes de exibir\n");
|
|
||||||
fprintf(ErrFp, " -ivar=val Inicializa (e preserva) variavel var com val\n");
|
|
||||||
fprintf(ErrFp, " -m Inicia o calendario na segunda, ao inves de domingo\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
#endif /* L_IN_INIT */
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* ROMANIAN.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Romanian language. */
|
|
||||||
/* */
|
|
||||||
/* Contributed by Liviu Daia <daia@stoilow.imar.ro> */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* */
|
|
||||||
/* REMIND is Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* This file is Copyright (C) 1996-1998 by Liviu Daia */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
/* The very first define in a language support file must be L_LANGNAME: */
|
|
||||||
#define L_LANGNAME "Romanian"
|
|
||||||
|
|
||||||
/* Day names */
|
|
||||||
# define L_SUNDAY "Duminică"
|
|
||||||
# define L_MONDAY "Luni"
|
|
||||||
# define L_TUESDAY "Marți"
|
|
||||||
# define L_WEDNESDAY "Miercuri"
|
|
||||||
# define L_THURSDAY "Joi"
|
|
||||||
# define L_FRIDAY "Vineri"
|
|
||||||
# define L_SATURDAY "Sâmbătă"
|
|
||||||
|
|
||||||
/* Month names */
|
|
||||||
#define L_JAN "Ianuarie"
|
|
||||||
#define L_FEB "Februarie"
|
|
||||||
#define L_MAR "Martie"
|
|
||||||
#define L_APR "Aprilie"
|
|
||||||
#define L_MAY "Mai"
|
|
||||||
#define L_JUN "Iunie"
|
|
||||||
#define L_JUL "Iulie"
|
|
||||||
#define L_AUG "August"
|
|
||||||
#define L_SEP "Septembrie"
|
|
||||||
#define L_OCT "Octombrie"
|
|
||||||
#define L_NOV "Noiembrie"
|
|
||||||
#define L_DEC "Decembrie"
|
|
||||||
|
|
||||||
/* Today and tomorrow */
|
|
||||||
# define L_TODAY "astăzi"
|
|
||||||
# define L_TOMORROW "mâine"
|
|
||||||
|
|
||||||
/* The default banner */
|
|
||||||
#define L_BANNER "Reamintiri pentru %w, %d %m %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Ago and from now */
|
|
||||||
#define L_AGO "acum"
|
|
||||||
#define L_FROMNOW "peste"
|
|
||||||
|
|
||||||
/* "in %d days' time" */
|
|
||||||
#define L_INXDAYS "peste %d zile"
|
|
||||||
|
|
||||||
/* "on" as in "on date..." */
|
|
||||||
#define L_ON "pe"
|
|
||||||
|
|
||||||
/* Pluralizing - this is a problem for many languages and may require
|
|
||||||
a more drastic fix */
|
|
||||||
#define L_PLURAL "le"
|
|
||||||
|
|
||||||
/* Minutes, hours, at, etc */
|
|
||||||
#define L_NOW "acum"
|
|
||||||
#define L_AT "la ora"
|
|
||||||
#define L_MINUTE "minut"
|
|
||||||
#define L_HOUR "or"
|
|
||||||
#define L_IS "este"
|
|
||||||
#define L_WAS "a fost"
|
|
||||||
/* What to add to make "minute" plural */
|
|
||||||
#define L_MPLU "e"
|
|
||||||
#define L_HPLU "e"
|
|
||||||
|
|
||||||
/* What to add to make "hour" plural */
|
|
||||||
#define L_HPLU_OVER hplu = (hdiff == 1 ? "ă" : "e");
|
|
||||||
#define L_AND "şi"
|
|
||||||
|
|
||||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
|
||||||
See the file dosubst.c for more info. */
|
|
||||||
#define L_AMPM_OVERRIDE(ampm, hour) ampm = (hour < 12) ? (hour<4) ? " noaptea" : " dimineaţa" : (hour > 17) ? " seara" : " după-amiaza";
|
|
||||||
#define L_ORDINAL_OVERRIDE plu = "";
|
|
||||||
|
|
||||||
#define L_A_OVER sprintf(s, "%s, %d %s %d", DayName[dse%7], d, MonthName[m], y);
|
|
||||||
#define L_C_OVER sprintf(s, "%s", DayName[dse%7]);
|
|
||||||
#define L_G_OVER sprintf(s, "%s, %d %s", DayName[dse%7], d, MonthName[m]);
|
|
||||||
#define L_J_OVER sprintf(s, "%s, %s %d, %d", DayName[dse%7], MonthName[m], d, y);
|
|
||||||
#define L_K_OVER sprintf(s, "%s, %s %d", DayName[dse%7], MonthName[m], d);
|
|
||||||
#define L_S_OVER
|
|
||||||
#define L_U_OVER sprintf(s, "%s, %d %s %d", DayName[dse%7], d, MonthName[m], y);
|
|
||||||
#define L_V_OVER sprintf(s, "%s, %d %s", DayName[dse%7], d, MonthName[m]);
|
|
||||||
#define L_1_OVER \
|
|
||||||
if (tdiff == 0) \
|
|
||||||
sprintf(s, L_NOW); \
|
|
||||||
else if (hdiff == 0) \
|
|
||||||
sprintf(s, "%s %d %s%s", when, mdiff, L_MINUTE, mplu); \
|
|
||||||
else if (mdiff == 0) \
|
|
||||||
sprintf(s, "%s %d %s%s", when, hdiff, L_HOUR, hplu); \
|
|
||||||
else \
|
|
||||||
sprintf(s, "%s %d %s%s %s %d %s%s", when, hdiff, \
|
|
||||||
L_HOUR, hplu, L_AND, mdiff, L_MINUTE, mplu);
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
/***************************************************************/
|
|
||||||
/* */
|
|
||||||
/* SPANISH.H */
|
|
||||||
/* */
|
|
||||||
/* Support for the Spanish language. */
|
|
||||||
/* */
|
|
||||||
/* Author: Rafa Couto <rafacouto@biogate.com> */
|
|
||||||
/* */
|
|
||||||
/* This file is part of REMIND. */
|
|
||||||
/* Copyright (C) 1992-2024 by Dianne Skoll */
|
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
/* */
|
|
||||||
/***************************************************************/
|
|
||||||
|
|
||||||
#define L_LANGNAME "Spanish"
|
|
||||||
|
|
||||||
/* Nombres de los di'as de la semana */
|
|
||||||
#define L_SUNDAY "Domingo"
|
|
||||||
#define L_MONDAY "Lunes"
|
|
||||||
#define L_TUESDAY "Martes"
|
|
||||||
#define L_WEDNESDAY "Miércoles"
|
|
||||||
#define L_THURSDAY "Jueves"
|
|
||||||
#define L_FRIDAY "Viernes"
|
|
||||||
#define L_SATURDAY "Sábado"
|
|
||||||
|
|
||||||
/* Nombres de los meses */
|
|
||||||
#define L_JAN "Enero"
|
|
||||||
#define L_FEB "Febrero"
|
|
||||||
#define L_MAR "Marzo"
|
|
||||||
#define L_APR "Abril"
|
|
||||||
#define L_MAY "Mayo"
|
|
||||||
#define L_JUN "Junio"
|
|
||||||
#define L_JUL "Julio"
|
|
||||||
#define L_AUG "Agosto"
|
|
||||||
#define L_SEP "Septiembre"
|
|
||||||
#define L_OCT "Octubre"
|
|
||||||
#define L_NOV "Noviembre"
|
|
||||||
#define L_DEC "Diciembre"
|
|
||||||
|
|
||||||
/* Hoy y man~ana */
|
|
||||||
#define L_TODAY "hoy"
|
|
||||||
#define L_TOMORROW "mañana"
|
|
||||||
|
|
||||||
/* El titular habitual */
|
|
||||||
#define L_BANNER "Agenda para el %w, %d%s %m, %y%o:"
|
|
||||||
|
|
||||||
/* "am" and "pm" */
|
|
||||||
#define L_AM "am"
|
|
||||||
#define L_PM "pm"
|
|
||||||
|
|
||||||
/* Hace y desde hoy */
|
|
||||||
#define L_AGO "hace"
|
|
||||||
#define L_FROMNOW "desde hoy"
|
|
||||||
|
|
||||||
/* "dentro de %d di'as" */
|
|
||||||
#define L_INXDAYS "dentro de %d días"
|
|
||||||
#define L_ON "el día"
|
|
||||||
|
|
||||||
/* "el di'a..." */
|
|
||||||
|
|
||||||
/* plurales */
|
|
||||||
#define L_PLURAL "s"
|
|
||||||
|
|
||||||
/* Minutos, horas, a las, etc */
|
|
||||||
#define L_NOW "ahora"
|
|
||||||
#define L_AT "a las"
|
|
||||||
#define L_MINUTE "minuto"
|
|
||||||
#define L_HOUR "hora"
|
|
||||||
#define L_IS "es"
|
|
||||||
#define L_WAS "fue"
|
|
||||||
#define L_AND "y"
|
|
||||||
#define L_HPLU "s"
|
|
||||||
#define L_MPLU "s"
|
|
||||||
|
|
||||||
+71
-18
@@ -172,11 +172,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!Hush) {
|
if (!Hush) {
|
||||||
if (DestroyOmitContexts(1))
|
if (DestroyOmitContexts(1))
|
||||||
Eprint("%s", ErrMsg[E_PUSH_NOPOP]);
|
Eprint("%s", GetErr(E_PUSH_NOPOP));
|
||||||
if (!Daemon && !NextMode && !NumTriggered && !NumQueued) {
|
if (!Daemon && !NextMode && !NumTriggered && !NumQueued) {
|
||||||
printf("%s\n", ErrMsg[E_NOREMINDERS]);
|
printf("%s\n", GetErr(E_NOREMINDERS));
|
||||||
} else if (!Daemon && !NextMode && !NumTriggered) {
|
} else if (!Daemon && !NextMode && !NumTriggered) {
|
||||||
printf(ErrMsg[M_QUEUED], NumQueued);
|
printf(GetErr(M_QUEUED), NumQueued);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
fprintf(ErrFp, "%s", ErrMsg[E_CANTFORK]);
|
fprintf(ErrFp, "%s", GetErr(E_CANTFORK));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -258,14 +258,14 @@ static void DoReminders(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (FileAccessDate < 0) {
|
if (FileAccessDate < 0) {
|
||||||
fprintf(ErrFp, "%s: `%s': %s.\n", ErrMsg[E_CANTACCESS], InitialFile, strerror(errno));
|
fprintf(ErrFp, "%s: `%s': %s.\n", GetErr(E_CANTACCESS), InitialFile, strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
r=IncludeFile(InitialFile);
|
r=IncludeFile(InitialFile);
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(ErrFp, "%s %s: %s\n", ErrMsg[E_ERR_READING],
|
fprintf(ErrFp, "%s %s: %s\n", GetErr(E_ERR_READING),
|
||||||
InitialFile, ErrMsg[r]);
|
InitialFile, GetErr(r));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ static void DoReminders(void)
|
|||||||
r = ReadLine();
|
r = ReadLine();
|
||||||
if (r == E_EOF) return;
|
if (r == E_EOF) return;
|
||||||
if (r) {
|
if (r) {
|
||||||
Eprint("%s: %s", ErrMsg[E_ERR_READING], ErrMsg[r]);
|
Eprint("%s: %s", GetErr(E_ERR_READING), GetErr(r));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
s = FindInitialToken(&tok, CurLine);
|
s = FindInitialToken(&tok, CurLine);
|
||||||
@@ -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) {
|
||||||
@@ -381,14 +382,14 @@ static void DoReminders(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (r && (!Hush || r != E_RUN_DISABLED)) {
|
if (r && (!Hush || r != E_RUN_DISABLED)) {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
if (PurgeMode) {
|
if (PurgeMode) {
|
||||||
if (!purge_handled) {
|
if (!purge_handled) {
|
||||||
PurgeEchoLine("%s\n", CurLine);
|
PurgeEchoLine("%s\n", CurLine);
|
||||||
} else {
|
} else {
|
||||||
if (r) {
|
if (r) {
|
||||||
PurgeEchoLine("#!P! Could not parse next line: %s\n", ErrMsg[r]);
|
PurgeEchoLine("#!P! Could not parse next line: %s\n", GetErr(r));
|
||||||
PurgeEchoLine("%s\n", CurLine);
|
PurgeEchoLine("%s\n", CurLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -623,7 +624,7 @@ int ParseQuotedString(ParsePtr p, DynamicBuffer *dbuf)
|
|||||||
DBufFree(dbuf);
|
DBufFree(dbuf);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
while (c != '"') {
|
while (c != 0 && c != '"') {
|
||||||
if (c == '\\') {
|
if (c == '\\') {
|
||||||
c = ParseChar(p, &err, 0);
|
c = ParseChar(p, &err, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -668,6 +669,10 @@ int ParseQuotedString(ParsePtr p, DynamicBuffer *dbuf)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (c != '"') {
|
||||||
|
DBufFree(dbuf);
|
||||||
|
return E_MISS_QUOTE;
|
||||||
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,7 +1050,7 @@ int DoIf(ParsePtr p)
|
|||||||
else {
|
else {
|
||||||
if ( (r = EvaluateExpr(p, &v)) ) {
|
if ( (r = EvaluateExpr(p, &v)) ) {
|
||||||
syndrome = IF_TRUE | BEFORE_ELSE;
|
syndrome = IF_TRUE | BEFORE_ELSE;
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
} else
|
} else
|
||||||
if ( (v.type != STR_TYPE && v.v.val) ||
|
if ( (v.type != STR_TYPE && v.v.val) ||
|
||||||
(v.type == STR_TYPE && strcmp(v.v.str, "")) ) {
|
(v.type == STR_TYPE && strcmp(v.v.str, "")) ) {
|
||||||
@@ -1130,7 +1135,7 @@ int DoIfTrig(ParsePtr p)
|
|||||||
if (r) {
|
if (r) {
|
||||||
if (r != E_CANT_TRIG || !trig.maybe_uncomputable) {
|
if (r != E_CANT_TRIG || !trig.maybe_uncomputable) {
|
||||||
if (!Hush || r != E_RUN_DISABLED) {
|
if (!Hush || r != E_RUN_DISABLED) {
|
||||||
Eprint("%s", ErrMsg[r]);
|
Eprint("%s", GetErr(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
syndrome = IF_FALSE | BEFORE_ELSE;
|
syndrome = IF_FALSE | BEFORE_ELSE;
|
||||||
@@ -1194,7 +1199,7 @@ int VerifyEoln(ParsePtr p)
|
|||||||
if (*DBufValue(&buf) &&
|
if (*DBufValue(&buf) &&
|
||||||
(*DBufValue(&buf) != '#') &&
|
(*DBufValue(&buf) != '#') &&
|
||||||
(*DBufValue(&buf) != ';')) {
|
(*DBufValue(&buf) != ';')) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_EXPECTING_EOL], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(E_EXPECTING_EOL), DBufValue(&buf));
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
return E_EXTRANEOUS_TOKEN;
|
return E_EXTRANEOUS_TOKEN;
|
||||||
}
|
}
|
||||||
@@ -1975,8 +1980,7 @@ get_day_name(int wkday)
|
|||||||
if (wkday < 0 || wkday > 6) {
|
if (wkday < 0 || wkday > 6) {
|
||||||
return "INVALID_WKDAY";
|
return "INVALID_WKDAY";
|
||||||
}
|
}
|
||||||
if (DynamicDayName[wkday]) return DynamicDayName[wkday];
|
return t(DayName[wkday]);
|
||||||
return DayName[wkday];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char const *
|
char const *
|
||||||
@@ -1985,8 +1989,7 @@ get_month_name(int mon)
|
|||||||
if (mon < 0 || mon > 11) {
|
if (mon < 0 || mon > 11) {
|
||||||
return "INVALID_MON";
|
return "INVALID_MON";
|
||||||
}
|
}
|
||||||
if (DynamicMonthName[mon]) return DynamicMonthName[mon];
|
return t(MonthName[mon]);
|
||||||
return MonthName[mon];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetOnceDateFromFile(void)
|
static int GetOnceDateFromFile(void)
|
||||||
@@ -2025,3 +2028,53 @@ int GetOnceDate(void)
|
|||||||
}
|
}
|
||||||
return OnceDate;
|
return OnceDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
get_printf_escapes(char const *str, DynamicBuffer *out)
|
||||||
|
{
|
||||||
|
char const *s = str;
|
||||||
|
while(*s) {
|
||||||
|
if (*s == '%' && *(s+1) != 0) {
|
||||||
|
s++;
|
||||||
|
DBufPutc(out, *s);
|
||||||
|
}
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char const *GetErr(int r)
|
||||||
|
{
|
||||||
|
char const *msg;
|
||||||
|
DynamicBuffer origEscapes;
|
||||||
|
DynamicBuffer translatedEscapes;
|
||||||
|
int dangerous;
|
||||||
|
|
||||||
|
if (r < 0 || r >= NumErrs) {
|
||||||
|
r = E_SWERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg = GetTranslatedString(ErrMsg[r]);
|
||||||
|
if (!msg) {
|
||||||
|
return ErrMsg[r];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We need to make sure both the original and translated version
|
||||||
|
have the *SAME* printf-style escapes to avoid a malicious
|
||||||
|
translation file doing a format-string attack */
|
||||||
|
DBufInit(&origEscapes);
|
||||||
|
DBufInit(&translatedEscapes);
|
||||||
|
|
||||||
|
get_printf_escapes(ErrMsg[r], &origEscapes);
|
||||||
|
get_printf_escapes(msg, &translatedEscapes);
|
||||||
|
|
||||||
|
dangerous = strcmp(DBufValue(&origEscapes), DBufValue(&translatedEscapes));
|
||||||
|
|
||||||
|
DBufFree(&origEscapes);
|
||||||
|
DBufFree(&translatedEscapes);
|
||||||
|
|
||||||
|
if (dangerous) {
|
||||||
|
return ErrMsg[r];
|
||||||
|
} else {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+3
-3
@@ -394,9 +394,9 @@ int DoOmit(ParsePtr p)
|
|||||||
if (tok.type == T_Until) {
|
if (tok.type == T_Until) {
|
||||||
Eprint("OMIT: UNTIL not allowed; did you mean THROUGH?");
|
Eprint("OMIT: UNTIL not allowed; did you mean THROUGH?");
|
||||||
} else if (tok.type == T_Illegal && tok.val < 0) {
|
} else if (tok.type == T_Illegal && tok.val < 0) {
|
||||||
Eprint("%s: `%s'", ErrMsg[-tok.val], DBufValue(&buf));
|
Eprint("%s: `%s'", GetErr(-tok.val), DBufValue(&buf));
|
||||||
} else {
|
} else {
|
||||||
Eprint("%s: `%s' (OMIT)", ErrMsg[E_UNKNOWN_TOKEN],
|
Eprint("%s: `%s' (OMIT)", GetErr(E_UNKNOWN_TOKEN),
|
||||||
DBufValue(&buf));
|
DBufValue(&buf));
|
||||||
}
|
}
|
||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
@@ -544,7 +544,7 @@ DumpOmits(void)
|
|||||||
} else {
|
} else {
|
||||||
for (i=0; i<7; i++) {
|
for (i=0; i<7; i++) {
|
||||||
if (WeekdayOmits & (1<<i)) {
|
if (WeekdayOmits & (1<<i)) {
|
||||||
printf("\t%s\n", EnglishDayName[i]);
|
printf("\t%s\n", DayName[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ int DoRun (ParsePtr p);
|
|||||||
int DoExpr (ParsePtr p);
|
int DoExpr (ParsePtr p);
|
||||||
int DoTranslate (ParsePtr p);
|
int DoTranslate (ParsePtr p);
|
||||||
int InsertTranslation(char const *orig, char const *translated);
|
int InsertTranslation(char const *orig, char const *translated);
|
||||||
|
void DumpTranslationTable(FILE *fp, int json);
|
||||||
int DoErrMsg (ParsePtr p);
|
int DoErrMsg (ParsePtr p);
|
||||||
int ClearGlobalOmits (void);
|
int ClearGlobalOmits (void);
|
||||||
int DoClear (ParsePtr p);
|
int DoClear (ParsePtr p);
|
||||||
@@ -268,3 +269,8 @@ void InitVars(void);
|
|||||||
void InitUserFunctions(void);
|
void InitUserFunctions(void);
|
||||||
void InitTranslationTable(void);
|
void InitTranslationTable(void);
|
||||||
char const *GetTranslatedString(char const *orig);
|
char const *GetTranslatedString(char const *orig);
|
||||||
|
int GetTranslatedStringTryingVariants(char const *orig, DynamicBuffer *out);
|
||||||
|
char const *GetErr(int r);
|
||||||
|
char const *t(char const *s);
|
||||||
|
char const *tr(char const *s);
|
||||||
|
void print_escaped_string(FILE *fp, char const *s);
|
||||||
|
|||||||
+67
-3
@@ -815,6 +815,11 @@ static void ServerWait(struct timeval *sleep_tv)
|
|||||||
int y, m, d;
|
int y, m, d;
|
||||||
int max = 1;
|
int max = 1;
|
||||||
char cmdLine[256];
|
char cmdLine[256];
|
||||||
|
char *s;
|
||||||
|
int r;
|
||||||
|
DynamicBuffer tx;
|
||||||
|
|
||||||
|
DBufInit(&tx);
|
||||||
|
|
||||||
FD_ZERO(&readSet);
|
FD_ZERO(&readSet);
|
||||||
FD_SET(0, &readSet);
|
FD_SET(0, &readSet);
|
||||||
@@ -868,9 +873,32 @@ static void ServerWait(struct timeval *sleep_tv)
|
|||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a line from stdin and interpret it */
|
/* Read a line using read() one char at a time to avoid resetting
|
||||||
if (!fgets(cmdLine, sizeof(cmdLine), stdin)) {
|
* readability if we get two commands quickly */
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
|
s = cmdLine;
|
||||||
|
*s = 0;
|
||||||
|
while (1) {
|
||||||
|
r = read(fileno(stdin), s, 1);
|
||||||
|
if (r == 0) {
|
||||||
|
/* EOF */
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
if (r != 1) {
|
||||||
|
/* Error? */
|
||||||
|
if (errno == EINTR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
*(s+1) = 0;
|
||||||
|
if (*s == '\n') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ((size_t) (s - cmdLine) >= sizeof(cmdLine)-1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(cmdLine, "EXIT\n")) {
|
if (!strcmp(cmdLine, "EXIT\n")) {
|
||||||
@@ -917,6 +945,42 @@ static void ServerWait(struct timeval *sleep_tv)
|
|||||||
printf("NOTE ENDJSONQUEUE\n");
|
printf("NOTE ENDJSONQUEUE\n");
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
} else if (DaemonJSON && !strncmp(cmdLine, "TRANSLATE ", 10)) {
|
||||||
|
/* Cut off the trailing "\n" */
|
||||||
|
if (*(cmdLine + strlen(cmdLine)-1) == '\n') {
|
||||||
|
*(cmdLine + strlen(cmdLine)-1) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = GetTranslatedStringTryingVariants(cmdLine+10, &tx);
|
||||||
|
|
||||||
|
/* Output NOTHING if there's no translation */
|
||||||
|
if (r) {
|
||||||
|
printf("{");
|
||||||
|
PrintJSONKeyPairString("response", "translate");
|
||||||
|
printf("\"translation\":{\"");
|
||||||
|
PrintJSONString(cmdLine+10);
|
||||||
|
printf("\":\"");
|
||||||
|
PrintJSONString(DBufValue(&tx));
|
||||||
|
DBufFree(&tx);
|
||||||
|
printf("\"},");
|
||||||
|
printf("\"command\":\"TRANSLATE\"}\n");
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
} else if (!strcmp(cmdLine, "TRANSLATE_DUMP\n")) {
|
||||||
|
if (!DaemonJSON) {
|
||||||
|
printf("NOTE TRANSLATE_DUMP\n");
|
||||||
|
} else {
|
||||||
|
printf("{");
|
||||||
|
PrintJSONKeyPairString("response", "translate_dump");
|
||||||
|
printf("\"table\":");
|
||||||
|
}
|
||||||
|
DumpTranslationTable(stdout, 1);
|
||||||
|
if (!DaemonJSON) {
|
||||||
|
printf("\nNOTE ENDTRANSLATE_DUMP\n");
|
||||||
|
} else {
|
||||||
|
printf(",\"command\":\"TRANSLATE_DUMP\"}\n");
|
||||||
|
}
|
||||||
|
fflush(stdout);
|
||||||
} else if (!strcmp(cmdLine, "REREAD\n")) {
|
} else if (!strcmp(cmdLine, "REREAD\n")) {
|
||||||
if (DaemonJSON) {
|
if (DaemonJSON) {
|
||||||
printf("{\"response\":\"reread\",\"command\":\"REREAD\"}\n");
|
printf("{\"response\":\"reread\",\"command\":\"REREAD\"}\n");
|
||||||
|
|||||||
@@ -357,6 +357,7 @@ int main(int argc, char *argv[])
|
|||||||
validfile++;
|
validfile++;
|
||||||
DoPsCal();
|
DoPsCal();
|
||||||
}
|
}
|
||||||
|
DBufFree(&buf);
|
||||||
}
|
}
|
||||||
if (!validfile) {
|
if (!validfile) {
|
||||||
fprintf(stderr, "Rem2PS: Couldn't find any calendar data - are you\n");
|
fprintf(stderr, "Rem2PS: Couldn't find any calendar data - are you\n");
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ int InsertIntoSortBuffer(int dse, int tim, char const *body, int typ, int prio)
|
|||||||
int ShouldGoAfter;
|
int ShouldGoAfter;
|
||||||
|
|
||||||
if (!new) {
|
if (!new) {
|
||||||
Eprint("%s", ErrMsg[E_NO_MEM]);
|
Eprint("%s", GetErr(E_NO_MEM));
|
||||||
IssueSortedReminders();
|
IssueSortedReminders();
|
||||||
SortByDate = 0;
|
SortByDate = 0;
|
||||||
SortByTime = 0;
|
SortByTime = 0;
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Make sure Remind compiles with all supported languages; show
|
|
||||||
# tstlang.rem output for each language.
|
|
||||||
|
|
||||||
ALL=`grep ^#define lang.h | grep -v '#define LANG' | awk '{print $2}'`
|
|
||||||
|
|
||||||
OUTPUT_COMPILED=lang-compiled.out
|
|
||||||
OUTPUT_RUNTIME=lang-runtime.out
|
|
||||||
cat /dev/null > $OUTPUT_COMPILED
|
|
||||||
cat /dev/null > $OUTPUT_RUNTIME
|
|
||||||
for i in $ALL ; do
|
|
||||||
make clean
|
|
||||||
make -j`nproc` all LANGDEF=-DLANG=$i || exit 1
|
|
||||||
./remind -q -r ../tests/tstlang.rem >> $OUTPUT_COMPILED 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
# Rebuild English version
|
|
||||||
make clean
|
|
||||||
make -j`nproc` all || exit 1
|
|
||||||
|
|
||||||
ALL=`ls ../include/lang/*.rem`
|
|
||||||
for i in $ALL; do
|
|
||||||
./remind -q -r "-ii=\"$i\"" ../tests/tstlang.rem >> $OUTPUT_RUNTIME 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -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 },
|
||||||
|
|||||||
+145
-16
@@ -47,6 +47,7 @@ AllocateXlateItem(char const *orig, char const *translated)
|
|||||||
size_t s3 = strlen(translated)+1;
|
size_t s3 = strlen(translated)+1;
|
||||||
XlateItem *item;
|
XlateItem *item;
|
||||||
|
|
||||||
|
/* Allocate the string space in ONE go! */
|
||||||
char *blob = malloc(s1+s2+s3);
|
char *blob = malloc(s1+s2+s3);
|
||||||
if (!blob) {
|
if (!blob) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -54,7 +55,6 @@ AllocateXlateItem(char const *orig, char const *translated)
|
|||||||
|
|
||||||
item = (XlateItem *) blob;
|
item = (XlateItem *) blob;
|
||||||
|
|
||||||
/* Allocate the string space in ONE go! */
|
|
||||||
item->orig = blob + s1;
|
item->orig = blob + s1;
|
||||||
item->translated = item->orig + s2;
|
item->translated = item->orig + s2;
|
||||||
strcpy(item->orig, orig);
|
strcpy(item->orig, orig);
|
||||||
@@ -77,6 +77,13 @@ FreeXlateItem(XlateItem *item)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
RemoveTranslation(XlateItem *item)
|
RemoveTranslation(XlateItem *item)
|
||||||
|
{
|
||||||
|
hash_table_delete(&TranslationTable, item);
|
||||||
|
FreeXlateItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
RemoveTranslationNoResize(XlateItem *item)
|
||||||
{
|
{
|
||||||
hash_table_delete_no_resize(&TranslationTable, item);
|
hash_table_delete_no_resize(&TranslationTable, item);
|
||||||
FreeXlateItem(item);
|
FreeXlateItem(item);
|
||||||
@@ -96,14 +103,14 @@ ClearTranslationTable(void)
|
|||||||
item = hash_table_next(&TranslationTable, NULL);
|
item = hash_table_next(&TranslationTable, NULL);
|
||||||
while(item) {
|
while(item) {
|
||||||
next = hash_table_next(&TranslationTable, item);
|
next = hash_table_next(&TranslationTable, item);
|
||||||
RemoveTranslation(item);
|
RemoveTranslationNoResize(item);
|
||||||
item = next;
|
item = next;
|
||||||
}
|
}
|
||||||
hash_table_free(&TranslationTable);
|
hash_table_free(&TranslationTable);
|
||||||
InitTranslationTable();
|
InitTranslationTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
print_escaped_string(FILE *fp, char const *s)
|
print_escaped_string(FILE *fp, char const *s)
|
||||||
{
|
{
|
||||||
putc('"', fp);
|
putc('"', fp);
|
||||||
@@ -119,11 +126,7 @@ print_escaped_string(FILE *fp, char const *s)
|
|||||||
case '"': putc('\\', fp); putc('"', fp); break;
|
case '"': putc('\\', fp); putc('"', fp); break;
|
||||||
case '\\': putc('\\', fp); putc('\\', fp); break;
|
case '\\': putc('\\', fp); putc('\\', fp); break;
|
||||||
default:
|
default:
|
||||||
if (*s < 32) {
|
putc(*s, fp); break;
|
||||||
fprintf(fp, "\\x%02x", (unsigned int) *s);
|
|
||||||
} else {
|
|
||||||
putc(*s, fp); break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
@@ -135,19 +138,48 @@ print_escaped_string(FILE *fp, char const *s)
|
|||||||
/* DumpTranslationTable - Dump the table to a file descriptor */
|
/* DumpTranslationTable - Dump the table to a file descriptor */
|
||||||
/* */
|
/* */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
static void
|
void
|
||||||
DumpTranslationTable(FILE *fp)
|
DumpTranslationTable(FILE *fp, int json)
|
||||||
{
|
{
|
||||||
XlateItem *item;
|
XlateItem *item;
|
||||||
|
int done = 0;
|
||||||
|
char const *t;
|
||||||
|
if (!json) {
|
||||||
|
fprintf(fp, "# Translation table\n");
|
||||||
|
/* Always to LANGID first */
|
||||||
|
t = GetTranslatedString("LANGID");
|
||||||
|
if (t) {
|
||||||
|
fprintf(fp, "TRANSLATE \"LANGID\" ");
|
||||||
|
print_escaped_string(fp, t);
|
||||||
|
fprintf(fp, "\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fprintf(fp, "{");
|
||||||
|
}
|
||||||
item = hash_table_next(&TranslationTable, NULL);
|
item = hash_table_next(&TranslationTable, NULL);
|
||||||
while(item) {
|
while(item) {
|
||||||
print_escaped_string(fp, item->orig);
|
if (!json) {
|
||||||
fprintf(fp, " ");
|
if (strcmp(item->orig, "LANGID")) {
|
||||||
print_escaped_string(fp, item->translated);
|
fprintf(fp, "TRANSLATE ");
|
||||||
fprintf(fp, "\n");
|
print_escaped_string(fp, item->orig);
|
||||||
|
fprintf(fp, " ");
|
||||||
|
print_escaped_string(fp, item->translated);
|
||||||
|
fprintf(fp, "\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (done) {
|
||||||
|
fprintf(fp, ",");
|
||||||
|
}
|
||||||
|
done=1;
|
||||||
|
print_escaped_string(fp, item->orig);
|
||||||
|
fprintf(fp, ":");
|
||||||
|
print_escaped_string(fp, item->translated);
|
||||||
|
}
|
||||||
item = hash_table_next(&TranslationTable, item);
|
item = hash_table_next(&TranslationTable, item);
|
||||||
}
|
}
|
||||||
|
if (json) {
|
||||||
|
fprintf(fp, "}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -173,6 +205,7 @@ InitTranslationTable(void)
|
|||||||
fprintf(stderr, "Unable to initialize translation hash table: Out of memory. Exiting.\n");
|
fprintf(stderr, "Unable to initialize translation hash table: Out of memory. Exiting.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
InsertTranslation("LANGID", "en");
|
||||||
}
|
}
|
||||||
|
|
||||||
static XlateItem *
|
static XlateItem *
|
||||||
@@ -196,6 +229,11 @@ InsertTranslation(char const *orig, char const *translated)
|
|||||||
}
|
}
|
||||||
RemoveTranslation(item);
|
RemoveTranslation(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TRANSLATE "foo" "foo" means to remove the translation */
|
||||||
|
if (strcmp(orig, "LANGID") && (!strcmp(orig, translated))) {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
item = AllocateXlateItem(orig, translated);
|
item = AllocateXlateItem(orig, translated);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return E_NO_MEM;
|
return E_NO_MEM;
|
||||||
@@ -212,6 +250,84 @@ GetTranslatedString(char const *orig)
|
|||||||
return item->translated;
|
return item->translated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
GetTranslatedStringTryingVariants(char const *orig, DynamicBuffer *out)
|
||||||
|
{
|
||||||
|
DynamicBuffer in;
|
||||||
|
char const *s;
|
||||||
|
int first_lower = 0;
|
||||||
|
int has_upper = 0;
|
||||||
|
|
||||||
|
DBufInit(&in);
|
||||||
|
|
||||||
|
/* Try exact match first */
|
||||||
|
s = GetTranslatedString(orig);
|
||||||
|
if (s) {
|
||||||
|
DBufPuts(out, s);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Classify orig */
|
||||||
|
s = orig;
|
||||||
|
while (*s) {
|
||||||
|
if (isupper(*s)) {
|
||||||
|
has_upper = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (islower(*orig)) {
|
||||||
|
first_lower = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (has_upper) {
|
||||||
|
/* Try all lower-case version */
|
||||||
|
DBufPuts(&in, orig);
|
||||||
|
strtolower(DBufValue(&in));
|
||||||
|
s = GetTranslatedString(DBufValue(&in));
|
||||||
|
if (s) {
|
||||||
|
DBufPuts(out, s);
|
||||||
|
strtolower(DBufValue(out));
|
||||||
|
*(DBufValue(out)) = toupper(*DBufValue(out));
|
||||||
|
DBufFree(&in);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (first_lower) {
|
||||||
|
/* Try ucfirst version */
|
||||||
|
DBufFree(&in);
|
||||||
|
DBufPuts(&in, orig);
|
||||||
|
strtolower(DBufValue(&in));
|
||||||
|
*(DBufValue(&in)) = toupper(*(DBufValue(&in)));
|
||||||
|
s = GetTranslatedString(DBufValue(&in));
|
||||||
|
if (s) {
|
||||||
|
DBufPuts(out, s);
|
||||||
|
strtolower(DBufValue(out));
|
||||||
|
DBufFree(&in);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DBufFree(&in);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char const *t(char const *orig)
|
||||||
|
{
|
||||||
|
char const *n = GetTranslatedString(orig);
|
||||||
|
if (n) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
return orig;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If another "t" is in scope... */
|
||||||
|
char const *tr(char const *orig)
|
||||||
|
{
|
||||||
|
return t(orig);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
DoTranslate(ParsePtr p)
|
DoTranslate(ParsePtr p)
|
||||||
{
|
{
|
||||||
@@ -223,14 +339,23 @@ DoTranslate(ParsePtr p)
|
|||||||
|
|
||||||
c = ParseNonSpaceChar(p, &r, 1);
|
c = ParseNonSpaceChar(p, &r, 1);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
|
if (c == 0) {
|
||||||
|
return E_EOLN;
|
||||||
|
}
|
||||||
|
|
||||||
if (c != '"') {
|
if (c != '"') {
|
||||||
r = ParseToken(p, &orig);
|
r = ParseToken(p, &orig);
|
||||||
if (r) return r;
|
if (r) return r;
|
||||||
|
r = VerifyEoln(p);
|
||||||
if (!StrCmpi(DBufValue(&orig), "dump")) {
|
if (!StrCmpi(DBufValue(&orig), "dump")) {
|
||||||
DumpTranslationTable(stdout);
|
DBufFree(&orig);
|
||||||
|
if (r) return r;
|
||||||
|
DumpTranslationTable(stdout, 0);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
if (!StrCmpi(DBufValue(&orig), "clear")) {
|
if (!StrCmpi(DBufValue(&orig), "clear")) {
|
||||||
|
DBufFree(&orig);
|
||||||
|
if (r) return r;
|
||||||
ClearTranslationTable();
|
ClearTranslationTable();
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -246,6 +371,9 @@ DoTranslate(ParsePtr p)
|
|||||||
if (item) {
|
if (item) {
|
||||||
RemoveTranslation(item);
|
RemoveTranslation(item);
|
||||||
}
|
}
|
||||||
|
if (!strcmp(DBufValue(&orig), "LANGID")) {
|
||||||
|
InsertTranslation("LANGID", "en");
|
||||||
|
}
|
||||||
r = OK;
|
r = OK;
|
||||||
}
|
}
|
||||||
DBufFree(&orig);
|
DBufFree(&orig);
|
||||||
@@ -272,3 +400,4 @@ get_translation_hash_stats(int *total, int *maxlen, double *avglen)
|
|||||||
*maxlen = s.max_len;
|
*maxlen = s.max_len;
|
||||||
*avglen = s.avg_len;
|
*avglen = s.avg_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -265,7 +265,7 @@ static int NextSimpleTrig(int startdate, Trigger *trig, int *err)
|
|||||||
return j;
|
return j;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Eprint("NextSimpleTrig %s %d", ErrMsg[E_SWERR], typ);
|
Eprint("NextSimpleTrig %s %d", GetErr(E_SWERR), typ);
|
||||||
*err = E_SWERR;
|
*err = E_SWERR;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -560,7 +560,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
|||||||
(trig->d == NO_DAY ||
|
(trig->d == NO_DAY ||
|
||||||
trig->m == NO_MON ||
|
trig->m == NO_MON ||
|
||||||
trig->y == NO_YR)) {
|
trig->y == NO_YR)) {
|
||||||
Eprint("%s", ErrMsg[E_REP_FULSPEC]);
|
Eprint("%s", GetErr(E_REP_FULSPEC));
|
||||||
*err = E_REP_FULSPEC;
|
*err = E_REP_FULSPEC;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -580,7 +580,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
|||||||
trig->expired = 1;
|
trig->expired = 1;
|
||||||
if (DebugFlag & DB_PRTTRIG) {
|
if (DebugFlag & DB_PRTTRIG) {
|
||||||
fprintf(ErrFp, "%s(%d): %s\n",
|
fprintf(ErrFp, "%s(%d): %s\n",
|
||||||
FileName, LineNo, ErrMsg[E_EXPIRED]);
|
FileName, LineNo, GetErr(E_EXPIRED));
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -630,7 +630,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
|||||||
trig->expired = 1;
|
trig->expired = 1;
|
||||||
if (DebugFlag & DB_PRTTRIG) {
|
if (DebugFlag & DB_PRTTRIG) {
|
||||||
fprintf(ErrFp, "%s(%d): %s\n",
|
fprintf(ErrFp, "%s(%d): %s\n",
|
||||||
FileName, LineNo, ErrMsg[E_EXPIRED]);
|
FileName, LineNo, GetErr(E_EXPIRED));
|
||||||
}
|
}
|
||||||
if (save_in_globals) {
|
if (save_in_globals) {
|
||||||
LastTriggerDate = result;
|
LastTriggerDate = result;
|
||||||
@@ -655,7 +655,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig *tim,
|
|||||||
trig->expired = 1;
|
trig->expired = 1;
|
||||||
if (DebugFlag & DB_PRTTRIG) {
|
if (DebugFlag & DB_PRTTRIG) {
|
||||||
fprintf(ErrFp, "%s(%d): %s\n",
|
fprintf(ErrFp, "%s(%d): %s\n",
|
||||||
FileName, LineNo, ErrMsg[E_EXPIRED]);
|
FileName, LineNo, GetErr(E_EXPIRED));
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -28,6 +28,7 @@ typedef struct udf_struct UserFunc;
|
|||||||
#define STR_TYPE 0x8
|
#define STR_TYPE 0x8
|
||||||
#define SPECIAL_TYPE 0x10 /* Only for system variables */
|
#define SPECIAL_TYPE 0x10 /* Only for system variables */
|
||||||
#define CONST_INT_TYPE 0x20 /* Only for system variables */
|
#define CONST_INT_TYPE 0x20 /* Only for system variables */
|
||||||
|
#define TRANS_TYPE 0x40 /* Only for system variables */
|
||||||
|
|
||||||
#define BEG_OF_EXPR '['
|
#define BEG_OF_EXPR '['
|
||||||
#define END_OF_EXPR ']'
|
#define END_OF_EXPR ']'
|
||||||
@@ -214,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,
|
||||||
@@ -285,7 +286,7 @@ typedef struct {
|
|||||||
char const *name;
|
char const *name;
|
||||||
char modifiable;
|
char modifiable;
|
||||||
int type;
|
int type;
|
||||||
void *value;
|
void const *value;
|
||||||
int min; /* Or const-value */
|
int min; /* Or const-value */
|
||||||
int max;
|
int max;
|
||||||
} SysVar;
|
} SysVar;
|
||||||
|
|||||||
+4
-4
@@ -117,13 +117,13 @@ int DoFrename(ParsePtr p)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
if (FindBuiltinFunc(DBufValue(&newbuf))) {
|
if (FindBuiltinFunc(DBufValue(&newbuf))) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_REDEF_FUNC], DBufValue(&newbuf));
|
Eprint("%s: `%s'", GetErr(E_REDEF_FUNC), DBufValue(&newbuf));
|
||||||
DBufFree(&oldbuf);
|
DBufFree(&oldbuf);
|
||||||
DBufFree(&newbuf);
|
DBufFree(&newbuf);
|
||||||
return E_REDEF_FUNC;
|
return E_REDEF_FUNC;
|
||||||
}
|
}
|
||||||
if (FindBuiltinFunc(DBufValue(&oldbuf))) {
|
if (FindBuiltinFunc(DBufValue(&oldbuf))) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_REDEF_FUNC], DBufValue(&oldbuf));
|
Eprint("%s: `%s'", GetErr(E_REDEF_FUNC), DBufValue(&oldbuf));
|
||||||
DBufFree(&oldbuf);
|
DBufFree(&oldbuf);
|
||||||
DBufFree(&newbuf);
|
DBufFree(&newbuf);
|
||||||
return E_REDEF_FUNC;
|
return E_REDEF_FUNC;
|
||||||
@@ -243,7 +243,7 @@ int DoFset(ParsePtr p)
|
|||||||
DBufFree(&buf);
|
DBufFree(&buf);
|
||||||
if (!Hush) {
|
if (!Hush) {
|
||||||
if (FindBuiltinFunc(func->name)) {
|
if (FindBuiltinFunc(func->name)) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_REDEF_FUNC], func->name);
|
Eprint("%s: `%s'", GetErr(E_REDEF_FUNC), func->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func->node = NULL;
|
func->node = NULL;
|
||||||
@@ -308,7 +308,7 @@ int DoFset(ParsePtr p)
|
|||||||
(void) ParseNonSpaceChar(p, &r, 0);
|
(void) ParseNonSpaceChar(p, &r, 0);
|
||||||
}
|
}
|
||||||
if (p->isnested) {
|
if (p->isnested) {
|
||||||
Eprint("%s", ErrMsg[E_CANTNEST_FDEF]);
|
Eprint("%s", GetErr(E_CANTNEST_FDEF));
|
||||||
DestroyUserFunc(func);
|
DestroyUserFunc(func);
|
||||||
return E_PARSE_ERR;
|
return E_PARSE_ERR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,14 +28,15 @@
|
|||||||
#include "err.h"
|
#include "err.h"
|
||||||
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
||||||
|
|
||||||
#define VARIABLE ErrMsg[E_VAR]
|
#define VARIABLE GetErr(E_VAR)
|
||||||
#define VALUE ErrMsg[E_VAL]
|
#define VALUE GetErr(E_VAL)
|
||||||
#define UNDEF ErrMsg[E_UNDEF]
|
#define UNDEF GetErr(E_UNDEF)
|
||||||
|
|
||||||
static int IntMin = INT_MIN;
|
static int IntMin = INT_MIN;
|
||||||
static int IntMax = INT_MAX;
|
static int IntMax = INT_MAX;
|
||||||
|
|
||||||
static hash_table VHashTbl;
|
static hash_table VHashTbl;
|
||||||
|
static int SetSysVarHelper(SysVar *v, Value *value);
|
||||||
|
|
||||||
static unsigned int VarHashFunc(void *x)
|
static unsigned int VarHashFunc(void *x)
|
||||||
{
|
{
|
||||||
@@ -574,7 +575,7 @@ int GetVarValue(char const *str, Value *val)
|
|||||||
v=FindVar(str, 0);
|
v=FindVar(str, 0);
|
||||||
|
|
||||||
if (!v) {
|
if (!v) {
|
||||||
Eprint("%s: `%s'", ErrMsg[E_NOSUCH_VAR], str);
|
Eprint("%s: `%s'", GetErr(E_NOSUCH_VAR), str);
|
||||||
return E_NOSUCH_VAR;
|
return E_NOSUCH_VAR;
|
||||||
}
|
}
|
||||||
return CopyValue(val, &v->v);
|
return CopyValue(val, &v->v);
|
||||||
@@ -844,47 +845,47 @@ int DoPreserve (Parser *p)
|
|||||||
static SysVar SysVarArr[] = {
|
static SysVar SysVarArr[] = {
|
||||||
/* name mod type value min/mal max */
|
/* name mod type value min/mal max */
|
||||||
{"AddBlankLines", 1, INT_TYPE, &AddBlankLines, 0, 1 },
|
{"AddBlankLines", 1, INT_TYPE, &AddBlankLines, 0, 1 },
|
||||||
{"Ago", 1, STR_TYPE, &DynamicAgo, 0, 0 },
|
{"Ago", 1, TRANS_TYPE, "ago", 0, 0 },
|
||||||
{"Am", 1, STR_TYPE, &DynamicAm, 0, 0 },
|
{"Am", 1, TRANS_TYPE, "am", 0, 0 },
|
||||||
{"And", 1, STR_TYPE, &DynamicAnd, 0, 0 },
|
{"And", 1, TRANS_TYPE, "and", 0, 0 },
|
||||||
{"April", 1, STR_TYPE, &DynamicMonthName[3], 0, 0 },
|
{"April", 1, TRANS_TYPE, "April", 0, 0 },
|
||||||
{"At", 1, STR_TYPE, &DynamicAt, 0, 0 },
|
{"At", 1, TRANS_TYPE, "at", 0, 0 },
|
||||||
{"August", 1, STR_TYPE, &DynamicMonthName[7], 0, 0 },
|
{"August", 1, TRANS_TYPE, "August", 0, 0 },
|
||||||
{"CalcUTC", 1, INT_TYPE, &CalculateUTC, 0, 1 },
|
{"CalcUTC", 1, INT_TYPE, &CalculateUTC, 0, 1 },
|
||||||
{"CalMode", 0, INT_TYPE, &DoCalendar, 0, 0 },
|
{"CalMode", 0, INT_TYPE, &DoCalendar, 0, 0 },
|
||||||
{"Daemon", 0, INT_TYPE, &Daemon, 0, 0 },
|
{"Daemon", 0, INT_TYPE, &Daemon, 0, 0 },
|
||||||
{"DateSep", 1, SPECIAL_TYPE, date_sep_func, 0, 0 },
|
{"DateSep", 1, SPECIAL_TYPE, date_sep_func, 0, 0 },
|
||||||
{"DateTimeSep", 1, SPECIAL_TYPE, datetime_sep_func, 0, 0 },
|
{"DateTimeSep", 1, SPECIAL_TYPE, datetime_sep_func, 0, 0 },
|
||||||
{"December", 1, STR_TYPE, &DynamicMonthName[11],0, 0 },
|
{"December", 1, TRANS_TYPE, "December", 0, 0 },
|
||||||
{"DedupeReminders",1, INT_TYPE, &DedupeReminders, 0, 1 },
|
{"DedupeReminders",1, INT_TYPE, &DedupeReminders, 0, 1 },
|
||||||
{"DefaultColor", 1, SPECIAL_TYPE, default_color_func, 0, 0 },
|
{"DefaultColor", 1, SPECIAL_TYPE, default_color_func, 0, 0 },
|
||||||
{"DefaultDelta", 1, INT_TYPE, &DefaultDelta, 0, 10000 },
|
{"DefaultDelta", 1, INT_TYPE, &DefaultDelta, 0, 10000 },
|
||||||
{"DefaultPrio", 1, INT_TYPE, &DefaultPrio, 0, 9999 },
|
{"DefaultPrio", 1, INT_TYPE, &DefaultPrio, 0, 9999 },
|
||||||
{"DefaultTDelta", 1, INT_TYPE, &DefaultTDelta, 0, 1440 },
|
{"DefaultTDelta", 1, INT_TYPE, &DefaultTDelta, 0, 1440 },
|
||||||
{"DeltaOverride", 0, INT_TYPE, &DeltaOverride, 0, 0 },
|
{"DeltaOverride", 0, INT_TYPE, &DeltaOverride, 0, 0 },
|
||||||
{"DontFork", 0, INT_TYPE, &DontFork, 0, 0 },
|
{"DontFork", 0, INT_TYPE, &DontFork, 0, 0 },
|
||||||
{"DontQueue", 0, INT_TYPE, &DontQueue, 0, 0 },
|
{"DontQueue", 0, INT_TYPE, &DontQueue, 0, 0 },
|
||||||
{"DontTrigAts", 0, INT_TYPE, &DontIssueAts, 0, 0 },
|
{"DontTrigAts", 0, INT_TYPE, &DontIssueAts, 0, 0 },
|
||||||
{"EndSent", 1, STR_TYPE, &EndSent, 0, 0 },
|
{"EndSent", 1, STR_TYPE, &EndSent, 0, 0 },
|
||||||
{"EndSentIg", 1, STR_TYPE, &EndSentIg, 0, 0 },
|
{"EndSentIg", 1, STR_TYPE, &EndSentIg, 0, 0 },
|
||||||
{"ExpressionTimeLimit", 1, SPECIAL_TYPE, expr_time_limit_func, 0, 0 },
|
{"ExpressionTimeLimit", 1, SPECIAL_TYPE, expr_time_limit_func, 0, 0 },
|
||||||
{"February", 1, STR_TYPE, &DynamicMonthName[1], 0, 0 },
|
{"February", 1, TRANS_TYPE, "February", 0, 0 },
|
||||||
{"FirstIndent", 1, INT_TYPE, &FirstIndent, 0, 132 },
|
{"FirstIndent", 1, INT_TYPE, &FirstIndent, 0, 132 },
|
||||||
{"FoldYear", 1, INT_TYPE, &FoldYear, 0, 1 },
|
{"FoldYear", 1, INT_TYPE, &FoldYear, 0, 1 },
|
||||||
{"FormWidth", 1, INT_TYPE, &FormWidth, 20, 500 },
|
{"FormWidth", 1, INT_TYPE, &FormWidth, 20, 500 },
|
||||||
{"Friday", 1, STR_TYPE, &DynamicDayName[4], 0, 0 },
|
{"Friday", 1, TRANS_TYPE, "Friday", 0, 0 },
|
||||||
{"Fromnow", 1, STR_TYPE, &DynamicFromnow, 0, 0 },
|
{"Fromnow", 1, TRANS_TYPE, "from now", 0, 0 },
|
||||||
{"Hour", 1, STR_TYPE, &DynamicHour, 0, 0 },
|
{"Hour", 1, TRANS_TYPE, "hour", 0, 0 },
|
||||||
{"Hplu", 1, STR_TYPE, &DynamicHplu, 0, 0 },
|
{"Hplu", 1, STR_TYPE, &DynamicHplu, 0, 0 },
|
||||||
{"HushMode", 0, INT_TYPE, &Hush, 0, 0 },
|
{"HushMode", 0, INT_TYPE, &Hush, 0, 0 },
|
||||||
{"IgnoreOnce", 0, INT_TYPE, &IgnoreOnce, 0, 0 },
|
{"IgnoreOnce", 0, INT_TYPE, &IgnoreOnce, 0, 0 },
|
||||||
{"InfDelta", 0, INT_TYPE, &InfiniteDelta, 0, 0 },
|
{"InfDelta", 0, INT_TYPE, &InfiniteDelta, 0, 0 },
|
||||||
{"IntMax", 0, INT_TYPE, &IntMax, 0, 0 },
|
{"IntMax", 0, INT_TYPE, &IntMax, 0, 0 },
|
||||||
{"IntMin", 0, INT_TYPE, &IntMin, 0, 0 },
|
{"IntMin", 0, INT_TYPE, &IntMin, 0, 0 },
|
||||||
{"Is", 1, STR_TYPE, &DynamicIs, 0, 0 },
|
{"Is", 1, TRANS_TYPE, "is", 0, 0 },
|
||||||
{"January", 1, STR_TYPE, &DynamicMonthName[0], 0, 0 },
|
{"January", 1, TRANS_TYPE, "January", 0, 0 },
|
||||||
{"July", 1, STR_TYPE, &DynamicMonthName[6], 0, 0 },
|
{"July", 1, TRANS_TYPE, "July", 0, 0 },
|
||||||
{"June", 1, STR_TYPE, &DynamicMonthName[5], 0, 0 },
|
{"June", 1, TRANS_TYPE, "June", 0, 0 },
|
||||||
{"LatDeg", 1, SPECIAL_TYPE, latdeg_func, 0, 0 },
|
{"LatDeg", 1, SPECIAL_TYPE, latdeg_func, 0, 0 },
|
||||||
{"Latitude", 1, SPECIAL_TYPE, latitude_func, 0, 0 },
|
{"Latitude", 1, SPECIAL_TYPE, latitude_func, 0, 0 },
|
||||||
{"LatMin", 1, SPECIAL_TYPE, latmin_func, 0, 0 },
|
{"LatMin", 1, SPECIAL_TYPE, latmin_func, 0, 0 },
|
||||||
@@ -894,53 +895,53 @@ static SysVar SysVarArr[] = {
|
|||||||
{"Longitude", 1, SPECIAL_TYPE, longitude_func, 0, 0 },
|
{"Longitude", 1, SPECIAL_TYPE, longitude_func, 0, 0 },
|
||||||
{"LongMin", 1, SPECIAL_TYPE, longmin_func, 0, 0 },
|
{"LongMin", 1, SPECIAL_TYPE, longmin_func, 0, 0 },
|
||||||
{"LongSec", 1, SPECIAL_TYPE, longsec_func, 0, 0 },
|
{"LongSec", 1, SPECIAL_TYPE, longsec_func, 0, 0 },
|
||||||
{"March", 1, STR_TYPE, &DynamicMonthName[2], 0, 0 },
|
{"March", 1, TRANS_TYPE, "March", 0, 0 },
|
||||||
{"MaxFullOmits", 0, CONST_INT_TYPE, NULL, MAX_FULL_OMITS, 0},
|
{"MaxFullOmits", 0, CONST_INT_TYPE, NULL, MAX_FULL_OMITS, 0},
|
||||||
{"MaxLateMinutes", 1, INT_TYPE, &MaxLateMinutes, 0, 1440 },
|
{"MaxLateMinutes", 1, INT_TYPE, &MaxLateMinutes, 0, 1440 },
|
||||||
{"MaxPartialOmits",0, CONST_INT_TYPE, NULL, MAX_PARTIAL_OMITS, 0},
|
{"MaxPartialOmits",0, CONST_INT_TYPE, NULL, MAX_PARTIAL_OMITS, 0},
|
||||||
{"MaxSatIter", 1, INT_TYPE, &MaxSatIter, 10, ANY },
|
{"MaxSatIter", 1, INT_TYPE, &MaxSatIter, 10, ANY },
|
||||||
{"MaxStringLen", 1, INT_TYPE, &MaxStringLen, -1, ANY },
|
{"MaxStringLen", 1, INT_TYPE, &MaxStringLen, -1, ANY },
|
||||||
{"May", 1, STR_TYPE, &DynamicMonthName[4], 0, 0 },
|
{"May", 1, TRANS_TYPE, "May", 0, 0 },
|
||||||
{"MinsFromUTC", 1, INT_TYPE, &MinsFromUTC, -780, 780 },
|
{"MinsFromUTC", 1, INT_TYPE, &MinsFromUTC, -780, 780 },
|
||||||
{"Minute", 1, STR_TYPE, &DynamicMinute, 0, 0 },
|
{"Minute", 1, TRANS_TYPE, "minute", 0, 0 },
|
||||||
{"Monday", 1, STR_TYPE, &DynamicDayName[0], 0, 0 },
|
{"Monday", 1, TRANS_TYPE, "Monday", 0, 0 },
|
||||||
{"Mplu", 1, STR_TYPE, &DynamicMplu, 0, 0 },
|
{"Mplu", 1, STR_TYPE, &DynamicMplu, 0, 0 },
|
||||||
{"NextMode", 0, INT_TYPE, &NextMode, 0, 0 },
|
{"NextMode", 0, INT_TYPE, &NextMode, 0, 0 },
|
||||||
{"November", 1, STR_TYPE, &DynamicMonthName[10],0, 0 },
|
{"November", 1, TRANS_TYPE, "November", 0, 0 },
|
||||||
{"Now", 1, STR_TYPE, &DynamicNow, 0, 0 },
|
{"Now", 1, TRANS_TYPE, "now", 0, 0 },
|
||||||
{"NumFullOmits", 0, INT_TYPE, &NumFullOmits, 0, 0 },
|
{"NumFullOmits", 0, INT_TYPE, &NumFullOmits, 0, 0 },
|
||||||
{"NumPartialOmits",0, INT_TYPE, &NumPartialOmits, 0, 0 },
|
{"NumPartialOmits",0, INT_TYPE, &NumPartialOmits, 0, 0 },
|
||||||
{"NumQueued", 0, INT_TYPE, &NumQueued, 0, 0 },
|
{"NumQueued", 0, INT_TYPE, &NumQueued, 0, 0 },
|
||||||
{"NumTrig", 0, INT_TYPE, &NumTriggered, 0, 0 },
|
{"NumTrig", 0, INT_TYPE, &NumTriggered, 0, 0 },
|
||||||
{"October", 1, STR_TYPE, &DynamicMonthName[9], 0, 0 },
|
{"October", 1, TRANS_TYPE, "October", 0, 0 },
|
||||||
{"On", 1, STR_TYPE, &DynamicOn, 0, 0 },
|
{"On", 1, TRANS_TYPE, "on", 0, 0 },
|
||||||
{"OnceFile", 1, SPECIAL_TYPE, oncefile_func, 0, 0 },
|
{"OnceFile", 1, SPECIAL_TYPE, oncefile_func, 0, 0 },
|
||||||
{"ParseUntriggered", 1, INT_TYPE, &ParseUntriggered, 0, 1 },
|
{"ParseUntriggered", 1, INT_TYPE, &ParseUntriggered, 0, 1 },
|
||||||
{"Pm", 1, STR_TYPE, &DynamicPm, 0, 0 },
|
{"Pm", 1, TRANS_TYPE, "pm", 0, 0 },
|
||||||
{"PrefixLineNo", 0, INT_TYPE, &DoPrefixLineNo, 0, 0 },
|
{"PrefixLineNo", 0, INT_TYPE, &DoPrefixLineNo, 0, 0 },
|
||||||
{"PSCal", 0, INT_TYPE, &PsCal, 0, 0 },
|
{"PSCal", 0, INT_TYPE, &PsCal, 0, 0 },
|
||||||
{"RunOff", 0, INT_TYPE, &RunDisabled, 0, 0 },
|
{"RunOff", 0, INT_TYPE, &RunDisabled, 0, 0 },
|
||||||
{"Saturday", 1, STR_TYPE, &DynamicDayName[5], 0, 0 },
|
{"Saturday", 1, TRANS_TYPE, "Saturday", 0, 0 },
|
||||||
{"September", 1, STR_TYPE, &DynamicMonthName[8], 0, 0 },
|
{"September", 1, TRANS_TYPE, "September", 0, 0 },
|
||||||
{"SimpleCal", 0, INT_TYPE, &DoSimpleCalendar, 0, 0 },
|
{"SimpleCal", 0, INT_TYPE, &DoSimpleCalendar, 0, 0 },
|
||||||
{"SortByDate", 0, INT_TYPE, &SortByDate, 0, 0 },
|
{"SortByDate", 0, INT_TYPE, &SortByDate, 0, 0 },
|
||||||
{"SortByPrio", 0, INT_TYPE, &SortByPrio, 0, 0 },
|
{"SortByPrio", 0, INT_TYPE, &SortByPrio, 0, 0 },
|
||||||
{"SortByTime", 0, INT_TYPE, &SortByTime, 0, 0 },
|
{"SortByTime", 0, INT_TYPE, &SortByTime, 0, 0 },
|
||||||
{"SubsIndent", 1, INT_TYPE, &SubsIndent, 0, 132 },
|
{"SubsIndent", 1, INT_TYPE, &SubsIndent, 0, 132 },
|
||||||
{"Sunday", 1, STR_TYPE, &DynamicDayName[6], 0, 0 },
|
{"Sunday", 1, TRANS_TYPE, "Sunday", 0, 0 },
|
||||||
{"SuppressImplicitWarnings", 1, INT_TYPE, &SuppressImplicitRemWarnings, 0, 1},
|
{"SuppressImplicitWarnings", 1, INT_TYPE, &SuppressImplicitRemWarnings, 0, 1},
|
||||||
{"SuppressLRM", 1, INT_TYPE, &SuppressLRM, 0, 1 },
|
{"SuppressLRM", 1, INT_TYPE, &SuppressLRM, 0, 1 },
|
||||||
{"SysInclude", 0, STR_TYPE, &SysDir, 0, 0 },
|
{"SysInclude", 0, STR_TYPE, &SysDir, 0, 0 },
|
||||||
{"T", 0, SPECIAL_TYPE, trig_date_func, 0, 0 },
|
{"T", 0, SPECIAL_TYPE, trig_date_func, 0, 0 },
|
||||||
{"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0 },
|
{"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0 },
|
||||||
{"TerminalBackground", 0, SPECIAL_TYPE, terminal_bg_func, 0, 0 },
|
{"TerminalBackground", 0, SPECIAL_TYPE, terminal_bg_func, 0, 0 },
|
||||||
{"Thursday", 1, STR_TYPE, &DynamicDayName[3], 0, 0 },
|
{"Thursday", 1, TRANS_TYPE, "Thursday", 0, 0 },
|
||||||
{"TimeSep", 1, SPECIAL_TYPE, time_sep_func, 0, 0 },
|
{"TimeSep", 1, SPECIAL_TYPE, time_sep_func, 0, 0 },
|
||||||
{"Tm", 0, SPECIAL_TYPE, trig_mon_func, 0, 0 },
|
{"Tm", 0, SPECIAL_TYPE, trig_mon_func, 0, 0 },
|
||||||
{"Today", 1, STR_TYPE, &DynamicToday, 0, 0 },
|
{"Today", 1, TRANS_TYPE, "today", 0, 0 },
|
||||||
{"Tomorrow", 1, STR_TYPE, &DynamicTomorrow, 0, 0 },
|
{"Tomorrow", 1, TRANS_TYPE, "tomorrow", 0, 0 },
|
||||||
{"Tt", 0, SPECIAL_TYPE, trig_time_func, 0, 0 },
|
{"Tt", 0, SPECIAL_TYPE, trig_time_func, 0, 0 },
|
||||||
{"Tuesday", 1, STR_TYPE, &DynamicDayName[1], 0, 0 },
|
{"Tuesday", 1, TRANS_TYPE, "Tuesday", 0, 0 },
|
||||||
{"Tw", 0, SPECIAL_TYPE, trig_wday_func, 0, 0 },
|
{"Tw", 0, SPECIAL_TYPE, trig_wday_func, 0, 0 },
|
||||||
{"Ty", 0, SPECIAL_TYPE, trig_year_func, 0, 0 },
|
{"Ty", 0, SPECIAL_TYPE, trig_year_func, 0, 0 },
|
||||||
{"U", 0, SPECIAL_TYPE, today_date_func, 0, 0 },
|
{"U", 0, SPECIAL_TYPE, today_date_func, 0, 0 },
|
||||||
@@ -948,72 +949,51 @@ static SysVar SysVarArr[] = {
|
|||||||
{"Um", 0, SPECIAL_TYPE, today_mon_func, 0, 0 },
|
{"Um", 0, SPECIAL_TYPE, today_mon_func, 0, 0 },
|
||||||
{"UntimedFirst", 0, INT_TYPE, &UntimedBeforeTimed, 0, 0 },
|
{"UntimedFirst", 0, INT_TYPE, &UntimedBeforeTimed, 0, 0 },
|
||||||
{"Use256Colors", 0, INT_TYPE, &Use256Colors, 0, 0 },
|
{"Use256Colors", 0, INT_TYPE, &Use256Colors, 0, 0 },
|
||||||
{"UseBGVTColors", 0, INT_TYPE, &UseBGVTColors, 0, 0 },
|
{"UseBGVTColors", 0, INT_TYPE, &UseBGVTColors, 0, 0 },
|
||||||
{"UseTrueColors", 0, INT_TYPE, &UseTrueColors, 0, 0 },
|
{"UseTrueColors", 0, INT_TYPE, &UseTrueColors, 0, 0 },
|
||||||
{"UseVTColors", 0, INT_TYPE, &UseVTColors, 0, 0 },
|
{"UseVTColors", 0, INT_TYPE, &UseVTColors, 0, 0 },
|
||||||
{"Uw", 0, SPECIAL_TYPE, today_wday_func, 0, 0 },
|
{"Uw", 0, SPECIAL_TYPE, today_wday_func, 0, 0 },
|
||||||
{"Uy", 0, SPECIAL_TYPE, today_year_func, 0, 0 },
|
{"Uy", 0, SPECIAL_TYPE, today_year_func, 0, 0 },
|
||||||
{"Was", 1, STR_TYPE, &DynamicWas, 0, 0 },
|
{"Was", 1, TRANS_TYPE, "was", 0, 0 },
|
||||||
{"Wednesday", 1, STR_TYPE, &DynamicDayName[2], 0, 0 }
|
{"Wednesday", 1, TRANS_TYPE, "Wednesday", 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUMSYSVARS ( sizeof(SysVarArr) / sizeof(SysVar) )
|
#define NUMSYSVARS ( sizeof(SysVarArr) / sizeof(SysVar) )
|
||||||
static void DumpSysVar (char const *name, const SysVar *v);
|
static void DumpSysVar (char const *name, const SysVar *v);
|
||||||
|
|
||||||
static void HandleTranslatableVariable(char **var)
|
static int SetTranslatableVariable(SysVar *v, Value *value)
|
||||||
{
|
{
|
||||||
if (var == (char **) &DynamicAgo) InsertTranslation("ago", *var);
|
return InsertTranslation((char const *) v->value, value->v.str);
|
||||||
else if (var == (char **) &DynamicAm) InsertTranslation("am", *var);
|
|
||||||
else if (var == (char **) &DynamicAnd) InsertTranslation("and", *var);
|
|
||||||
else if (var == (char **) &DynamicAt) InsertTranslation("at", *var);
|
|
||||||
else if (var == (char **) &DynamicFromnow) InsertTranslation("from now", *var);
|
|
||||||
else if (var == (char **) &DynamicHour) InsertTranslation("hour", *var);
|
|
||||||
else if (var == (char **) &DynamicIs) InsertTranslation("is", *var);
|
|
||||||
else if (var == (char **) &DynamicMinute) InsertTranslation("minute", *var);
|
|
||||||
else if (var == (char **) &DynamicNow) InsertTranslation("now", *var);
|
|
||||||
else if (var == (char **) &DynamicOn) InsertTranslation("on", *var);
|
|
||||||
else if (var == (char **) &DynamicPm) InsertTranslation("pm", *var);
|
|
||||||
else if (var == (char **) &DynamicToday) InsertTranslation("today", *var);
|
|
||||||
else if (var == (char **) &DynamicTomorrow) InsertTranslation("tomorrow", *var);
|
|
||||||
else if (var == (char **) &DynamicWas) InsertTranslation("was", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[0]) InsertTranslation("January", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[1]) InsertTranslation("February", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[2]) InsertTranslation("March", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[3]) InsertTranslation("April", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[4]) InsertTranslation("May", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[5]) InsertTranslation("June", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[6]) InsertTranslation("July", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[7]) InsertTranslation("August", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[8]) InsertTranslation("September", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[9]) InsertTranslation("October", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[10]) InsertTranslation("November", *var);
|
|
||||||
else if (var == (char **) &DynamicMonthName[11]) InsertTranslation("December", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[0]) InsertTranslation("Monday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[1]) InsertTranslation("Tuesday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[2]) InsertTranslation("Wednesday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[3]) InsertTranslation("Thursday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[4]) InsertTranslation("Friday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[5]) InsertTranslation("Saturday", *var);
|
|
||||||
else if (var == (char **) &DynamicDayName[6]) InsertTranslation("Sunday", *var);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/***************************************************************/
|
|
||||||
/* */
|
static int GetTranslatableVariable(SysVar *v, Value *value)
|
||||||
/* SetSysVar */
|
{
|
||||||
/* */
|
char const *translated = t((char const *) v->value);
|
||||||
/* Set a system variable to the indicated value. */
|
if (translated) {
|
||||||
/* */
|
value->v.str = StrDup(translated);
|
||||||
/***************************************************************/
|
} else {
|
||||||
int SetSysVar(char const *name, Value *value)
|
value->v.str = StrDup("");
|
||||||
|
}
|
||||||
|
if (!value->v.str) return E_NO_MEM;
|
||||||
|
value->type = STR_TYPE;
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int SetSysVarHelper(SysVar *v, Value *value)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
SysVar *v = FindSysVar(name);
|
|
||||||
if (!v) return E_NOSUCH_VAR;
|
|
||||||
if (!v->modifiable) {
|
if (!v->modifiable) {
|
||||||
Eprint("%s: `$%s'", ErrMsg[E_CANT_MODIFY], name);
|
Eprint("%s: `$%s'", GetErr(E_CANT_MODIFY), v->name);
|
||||||
return E_CANT_MODIFY;
|
return E_CANT_MODIFY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (v->type == TRANS_TYPE) {
|
||||||
|
if (value->type != STR_TYPE) return E_BAD_TYPE;
|
||||||
|
r = SetTranslatableVariable(v, value);
|
||||||
|
DestroyValue(*value);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
if (v->type != SPECIAL_TYPE &&
|
if (v->type != SPECIAL_TYPE &&
|
||||||
v->type != value->type) return E_BAD_TYPE;
|
v->type != value->type) return E_BAD_TYPE;
|
||||||
if (v->type == SPECIAL_TYPE) {
|
if (v->type == SPECIAL_TYPE) {
|
||||||
@@ -1035,7 +1015,6 @@ int SetSysVar(char const *name, Value *value)
|
|||||||
v->been_malloced = 1;
|
v->been_malloced = 1;
|
||||||
*((char **) v->value) = value->v.str;
|
*((char **) v->value) = value->v.str;
|
||||||
value->type = ERR_TYPE; /* So that it's not accidentally freed */
|
value->type = ERR_TYPE; /* So that it's not accidentally freed */
|
||||||
HandleTranslatableVariable((char **) v->value);
|
|
||||||
} else {
|
} else {
|
||||||
if (v->max != ANY && value->v.val > v->max) return E_2HIGH;
|
if (v->max != ANY && value->v.val > v->max) return E_2HIGH;
|
||||||
if (v->min != ANY && value->v.val < v->min) return E_2LOW;
|
if (v->min != ANY && value->v.val < v->min) return E_2LOW;
|
||||||
@@ -1044,6 +1023,20 @@ int SetSysVar(char const *name, Value *value)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************************/
|
||||||
|
/* */
|
||||||
|
/* SetSysVar */
|
||||||
|
/* */
|
||||||
|
/* Set a system variable to the indicated value. */
|
||||||
|
/* */
|
||||||
|
/***************************************************************/
|
||||||
|
int SetSysVar(char const *name, Value *value)
|
||||||
|
{
|
||||||
|
SysVar *v = FindSysVar(name);
|
||||||
|
if (!v) return E_NOSUCH_VAR;
|
||||||
|
return SetSysVarHelper(v, value);
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* GetSysVar */
|
/* GetSysVar */
|
||||||
@@ -1057,6 +1050,10 @@ int GetSysVar(char const *name, Value *val)
|
|||||||
|
|
||||||
val->type = ERR_TYPE;
|
val->type = ERR_TYPE;
|
||||||
if (!v) return E_NOSUCH_VAR;
|
if (!v) return E_NOSUCH_VAR;
|
||||||
|
if (v->type == TRANS_TYPE) {
|
||||||
|
return GetTranslatableVariable(v, val);
|
||||||
|
}
|
||||||
|
|
||||||
if (v->type == CONST_INT_TYPE) {
|
if (v->type == CONST_INT_TYPE) {
|
||||||
val->v.val = v->constval;
|
val->v.val = v->constval;
|
||||||
val->type = INT_TYPE;
|
val->type = INT_TYPE;
|
||||||
@@ -1163,6 +1160,15 @@ static void DumpSysVar(char const *name, const SysVar *v)
|
|||||||
PrintValue(&vtmp, ErrFp);
|
PrintValue(&vtmp, ErrFp);
|
||||||
putc('\n', ErrFp);
|
putc('\n', ErrFp);
|
||||||
DestroyValue(vtmp);
|
DestroyValue(vtmp);
|
||||||
|
} else if (v->type == TRANS_TYPE) {
|
||||||
|
int r = GetSysVar(v->name, &vtmp);
|
||||||
|
if (r == OK) {
|
||||||
|
PrintValue(&vtmp, ErrFp);
|
||||||
|
putc('\n', ErrFp);
|
||||||
|
DestroyValue(vtmp);
|
||||||
|
} else {
|
||||||
|
fprintf(ErrFp, "Error: %s\n", GetErr(r));
|
||||||
|
}
|
||||||
} else if (v->type == STR_TYPE) {
|
} else if (v->type == STR_TYPE) {
|
||||||
vtmp.type = STR_TYPE;
|
vtmp.type = STR_TYPE;
|
||||||
vtmp.v.str = * ((char **)v->value);
|
vtmp.v.str = * ((char **)v->value);
|
||||||
|
|||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for i in ../include/lang/??.rem ; do
|
||||||
|
echo "Testing lang file: $i"
|
||||||
|
../src/remind -r -q "-ii=\"$i\"" ../tests/tstlang.rem
|
||||||
|
done
|
||||||
@@ -619,6 +619,14 @@ fi
|
|||||||
# Test --print-tokens long option
|
# Test --print-tokens long option
|
||||||
../src/remind --print-tokens < /dev/null >> ../tests/test.out 2>&1
|
../src/remind --print-tokens < /dev/null >> ../tests/test.out 2>&1
|
||||||
|
|
||||||
|
# Torture test #2
|
||||||
|
../src/remind ../tests/torture2.rem >> ../tests/test.out 2>&1
|
||||||
|
|
||||||
|
# Languages
|
||||||
|
for i in ../include/lang/??.rem ; do
|
||||||
|
../src/remind -r -q "-ii=\"$i\"" ../tests/tstlang.rem 1 Feb 2024 13:34 >> ../tests/test.out 2>&1
|
||||||
|
done
|
||||||
|
|
||||||
# Make sure all the include files are ok
|
# Make sure all the include files are ok
|
||||||
find ../include -type f -name '*.rem' | while read x; do ../src/remind -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
|
find ../include -type f -name '*.rem' | while read x; do ../src/remind -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
|
||||||
cmp -s ../tests/test.out ../tests/test.cmp
|
cmp -s ../tests/test.out ../tests/test.cmp
|
||||||
|
|||||||
+13753
-39
File diff suppressed because it is too large
Load Diff
+191
@@ -1205,6 +1205,15 @@ TRANSLATE "Quux" "OOOGHY"
|
|||||||
# Delete Bar translation
|
# Delete Bar translation
|
||||||
TRANSLATE "Bar"
|
TRANSLATE "Bar"
|
||||||
|
|
||||||
|
# LANGID is a special case
|
||||||
|
set a _("LANGID")
|
||||||
|
|
||||||
|
TRANSLATE "LANGID" "nl"
|
||||||
|
set a _("LANGID")
|
||||||
|
|
||||||
|
TRANSLATE "LANGID"
|
||||||
|
set a _("LANGID")
|
||||||
|
|
||||||
set a _("Wookie")
|
set a _("Wookie")
|
||||||
set a _("Bar")
|
set a _("Bar")
|
||||||
set a _("Quux")
|
set a _("Quux")
|
||||||
@@ -1244,8 +1253,190 @@ SET $Saturday "TxSaturday"
|
|||||||
SET $Sunday "TxSunday"
|
SET $Sunday "TxSunday"
|
||||||
TRANSLATE DUMP
|
TRANSLATE DUMP
|
||||||
|
|
||||||
|
TRANSLATE "missing quote" "missing a quote
|
||||||
|
TRANSLATE "missing quote
|
||||||
|
|
||||||
DO torture-test.rem
|
DO torture-test.rem
|
||||||
|
|
||||||
|
TRANSLATE "Division by zero" "Ya tried to divide by zero, ya FOOOL!!!!!"
|
||||||
|
set a 1/0
|
||||||
|
TRANSLATE "Division by zero"
|
||||||
|
set a 1/0
|
||||||
|
|
||||||
|
TRANSLATE "Moo" "Bark"
|
||||||
|
TRANSLATE "meow" "chirp"
|
||||||
|
|
||||||
|
DEBUG +x
|
||||||
|
set a _("moo")
|
||||||
|
set a _("Moo")
|
||||||
|
set a _("MOO")
|
||||||
|
set a _("meow")
|
||||||
|
set a _("Meow")
|
||||||
|
set a _("MEOW")
|
||||||
|
|
||||||
|
# Check bidirectional connection between system variables and translation
|
||||||
|
# tables
|
||||||
|
DEBUG -x
|
||||||
|
TRANSLATE CLEAR
|
||||||
|
|
||||||
|
SET $Ago "translated-Ago"
|
||||||
|
SET $Am "translated-Am"
|
||||||
|
SET $And "translated-And"
|
||||||
|
SET $At "translated-At"
|
||||||
|
SET $Fromnow "translated-Fromnow"
|
||||||
|
SET $Hour "translated-Hour"
|
||||||
|
SET $Is "translated-Is"
|
||||||
|
SET $Minute "translated-Minute"
|
||||||
|
SET $Now "translated-Now"
|
||||||
|
SET $On "translated-On"
|
||||||
|
SET $Pm "translated-Pm"
|
||||||
|
SET $Today "translated-Today"
|
||||||
|
SET $Tomorrow "translated-Tomorrow"
|
||||||
|
SET $Was "translated-Was"
|
||||||
|
SET $January "translated-January"
|
||||||
|
SET $February "translated-February"
|
||||||
|
SET $March "translated-March"
|
||||||
|
SET $April "translated-April"
|
||||||
|
SET $May "translated-May"
|
||||||
|
SET $June "translated-June"
|
||||||
|
SET $July "translated-July"
|
||||||
|
SET $August "translated-August"
|
||||||
|
SET $September "translated-September"
|
||||||
|
SET $October "translated-October"
|
||||||
|
SET $November "translated-November"
|
||||||
|
SET $December "translated-December"
|
||||||
|
SET $Monday "translated-Monday"
|
||||||
|
SET $Tuesday "translated-Tuesday"
|
||||||
|
SET $Wednesday "translated-Wednesday"
|
||||||
|
SET $Thursday "translated-Thursday"
|
||||||
|
SET $Friday "translated-Friday"
|
||||||
|
SET $Saturday "translated-Saturday"
|
||||||
|
SET $Sunday "translated-Sunday"
|
||||||
|
|
||||||
|
TRANSLATE DUMP
|
||||||
|
|
||||||
|
TRANSLATE CLEAR
|
||||||
|
TRANSLATE "ago" "otherway-Ago"
|
||||||
|
TRANSLATE "am" "otherway-Am"
|
||||||
|
TRANSLATE "and" "otherway-And"
|
||||||
|
TRANSLATE "at" "otherway-At"
|
||||||
|
TRANSLATE "from now" "otherway-Fromnow"
|
||||||
|
TRANSLATE "hour" "otherway-Hour"
|
||||||
|
TRANSLATE "is" "otherway-Is"
|
||||||
|
TRANSLATE "minute" "otherway-Minute"
|
||||||
|
TRANSLATE "now" "otherway-Now"
|
||||||
|
TRANSLATE "on" "otherway-On"
|
||||||
|
TRANSLATE "pm" "otherway-Pm"
|
||||||
|
TRANSLATE "today" "otherway-Today"
|
||||||
|
TRANSLATE "tomorrow" "otherway-Tomorrow"
|
||||||
|
TRANSLATE "was" "otherway-Was"
|
||||||
|
TRANSLATE "January" "otherway-January"
|
||||||
|
TRANSLATE "February" "otherway-February"
|
||||||
|
TRANSLATE "March" "otherway-March"
|
||||||
|
TRANSLATE "April" "otherway-April"
|
||||||
|
TRANSLATE "May" "otherway-May"
|
||||||
|
TRANSLATE "June" "otherway-June"
|
||||||
|
TRANSLATE "July" "otherway-July"
|
||||||
|
TRANSLATE "August" "otherway-August"
|
||||||
|
TRANSLATE "September" "otherway-September"
|
||||||
|
TRANSLATE "October" "otherway-October"
|
||||||
|
TRANSLATE "November" "otherway-November"
|
||||||
|
TRANSLATE "December" "otherway-December"
|
||||||
|
TRANSLATE "Monday" "otherway-Monday"
|
||||||
|
TRANSLATE "Tuesday" "otherway-Tuesday"
|
||||||
|
TRANSLATE "Wednesday" "otherway-Wednesday"
|
||||||
|
TRANSLATE "Thursday" "otherway-Thursday"
|
||||||
|
TRANSLATE "Friday" "otherway-Friday"
|
||||||
|
TRANSLATE "Saturday" "otherway-Saturday"
|
||||||
|
TRANSLATE "Sunday" "otherway-Sunday"
|
||||||
|
|
||||||
|
MSG $Ago is [$Ago]%
|
||||||
|
MSG $Am is [$Am]%
|
||||||
|
MSG $And is [$And]%
|
||||||
|
MSG $At is [$At]%
|
||||||
|
MSG $Fromnow is [$Fromnow]%
|
||||||
|
MSG $Hour is [$Hour]%
|
||||||
|
MSG $Is is [$Is]%
|
||||||
|
MSG $Minute is [$Minute]%
|
||||||
|
MSG $Now is [$Now]%
|
||||||
|
MSG $On is [$On]%
|
||||||
|
MSG $Pm is [$Pm]%
|
||||||
|
MSG $Today is [$Today]%
|
||||||
|
MSG $Tomorrow is [$Tomorrow]%
|
||||||
|
MSG $Was is [$Was]%
|
||||||
|
MSG $January is [$January]%
|
||||||
|
MSG $February is [$February]%
|
||||||
|
MSG $March is [$March]%
|
||||||
|
MSG $April is [$April]%
|
||||||
|
MSG $May is [$May]%
|
||||||
|
MSG $June is [$June]%
|
||||||
|
MSG $July is [$July]%
|
||||||
|
MSG $August is [$August]%
|
||||||
|
MSG $September is [$September]%
|
||||||
|
MSG $October is [$October]%
|
||||||
|
MSG $November is [$November]%
|
||||||
|
MSG $December is [$December]%
|
||||||
|
MSG $Monday is [$Monday]%
|
||||||
|
MSG $Tuesday is [$Tuesday]%
|
||||||
|
MSG $Wednesday is [$Wednesday]%
|
||||||
|
MSG $Thursday is [$Thursday]%
|
||||||
|
MSG $Friday is [$Friday]%
|
||||||
|
MSG $Saturday is [$Saturday]%
|
||||||
|
MSG $Sunday is [$Sunday]%
|
||||||
|
|
||||||
|
TRANSLATE CLEAR
|
||||||
|
TRANSLATE DUMP
|
||||||
|
MSG $Ago is [$Ago]%
|
||||||
|
MSG $Am is [$Am]%
|
||||||
|
MSG $And is [$And]%
|
||||||
|
MSG $At is [$At]%
|
||||||
|
MSG $Fromnow is [$Fromnow]%
|
||||||
|
MSG $Hour is [$Hour]%
|
||||||
|
MSG $Is is [$Is]%
|
||||||
|
MSG $Minute is [$Minute]%
|
||||||
|
MSG $Now is [$Now]%
|
||||||
|
MSG $On is [$On]%
|
||||||
|
MSG $Pm is [$Pm]%
|
||||||
|
MSG $Today is [$Today]%
|
||||||
|
MSG $Tomorrow is [$Tomorrow]%
|
||||||
|
MSG $Was is [$Was]%
|
||||||
|
MSG $January is [$January]%
|
||||||
|
MSG $February is [$February]%
|
||||||
|
MSG $March is [$March]%
|
||||||
|
MSG $April is [$April]%
|
||||||
|
MSG $May is [$May]%
|
||||||
|
MSG $June is [$June]%
|
||||||
|
MSG $July is [$July]%
|
||||||
|
MSG $August is [$August]%
|
||||||
|
MSG $September is [$September]%
|
||||||
|
MSG $October is [$October]%
|
||||||
|
MSG $November is [$November]%
|
||||||
|
MSG $December is [$December]%
|
||||||
|
MSG $Monday is [$Monday]%
|
||||||
|
MSG $Tuesday is [$Tuesday]%
|
||||||
|
MSG $Wednesday is [$Wednesday]%
|
||||||
|
MSG $Thursday is [$Thursday]%
|
||||||
|
MSG $Friday is [$Friday]%
|
||||||
|
MSG $Saturday is [$Saturday]%
|
||||||
|
MSG $Sunday is [$Sunday]%
|
||||||
|
|
||||||
|
DEBUG +e
|
||||||
|
set $Is "foo"
|
||||||
|
set $Was "bar"
|
||||||
|
TRANSLATE DUMP
|
||||||
|
TRANSLATE "is" "is"
|
||||||
|
TRANSLATE "was"
|
||||||
|
TRANSLATE DUMP
|
||||||
|
MSG $Is is [$Is]%
|
||||||
|
MSG $Was is [$Was]%
|
||||||
|
|
||||||
|
# Catch an error fixed in commit 356b562d75852dafb2ffc6b1122500a98fa7d9d0
|
||||||
|
IF 1
|
||||||
|
INCLUDE /non/existent/file/should/not/work/wookie
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
DEBUG -e
|
||||||
|
|
||||||
# Output expression-node stats
|
# Output expression-node stats
|
||||||
DEBUG +s
|
DEBUG +s
|
||||||
|
|
||||||
|
|||||||
@@ -310009,3 +310009,4 @@ REM MSG Dedup-9996
|
|||||||
REM MSG Dedup-9997
|
REM MSG Dedup-9997
|
||||||
REM MSG Dedup-9998
|
REM MSG Dedup-9998
|
||||||
REM MSG Dedup-9999
|
REM MSG Dedup-9999
|
||||||
|
set $DedupeReminders 0
|
||||||
|
|||||||
+600004
File diff suppressed because it is too large
Load Diff
+35
-1
@@ -33,9 +33,9 @@ endif
|
|||||||
|
|
||||||
if defined("i")
|
if defined("i")
|
||||||
do [i]
|
do [i]
|
||||||
# msg INCLUDING [i]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
REM MSG Language: %(LANGID)
|
||||||
# Set up a few useful definitions
|
# Set up a few useful definitions
|
||||||
fset show(x) "%%" + x + " yields: " + char(34) + "%" + x + char(34) + "% and %%*" + x + " yields: " + char(34) + "%*" + x + char(34) + "%"
|
fset show(x) "%%" + x + " yields: " + char(34) + "%" + x + char(34) + "% and %%*" + x + " yields: " + char(34) + "%*" + x + char(34) + "%"
|
||||||
set a trigger(today()+2) + " ++2"
|
set a trigger(today()+2) + " ++2"
|
||||||
@@ -856,3 +856,37 @@ msg [showmon(9)]
|
|||||||
msg [showmon(10)]
|
msg [showmon(10)]
|
||||||
msg [showmon(11)]
|
msg [showmon(11)]
|
||||||
msg [showmon(12)]
|
msg [showmon(12)]
|
||||||
|
|
||||||
|
MSG $Ago is [$Ago]%
|
||||||
|
MSG $Am is [$Am]%
|
||||||
|
MSG $And is [$And]%
|
||||||
|
MSG $At is [$At]%
|
||||||
|
MSG $Fromnow is [$Fromnow]%
|
||||||
|
MSG $Hour is [$Hour]%
|
||||||
|
MSG $Is is [$Is]%
|
||||||
|
MSG $Minute is [$Minute]%
|
||||||
|
MSG $Now is [$Now]%
|
||||||
|
MSG $On is [$On]%
|
||||||
|
MSG $Pm is [$Pm]%
|
||||||
|
MSG $Today is [$Today]%
|
||||||
|
MSG $Tomorrow is [$Tomorrow]%
|
||||||
|
MSG $Was is [$Was]%
|
||||||
|
MSG $January is [$January]%
|
||||||
|
MSG $February is [$February]%
|
||||||
|
MSG $March is [$March]%
|
||||||
|
MSG $April is [$April]%
|
||||||
|
MSG $May is [$May]%
|
||||||
|
MSG $June is [$June]%
|
||||||
|
MSG $July is [$July]%
|
||||||
|
MSG $August is [$August]%
|
||||||
|
MSG $September is [$September]%
|
||||||
|
MSG $October is [$October]%
|
||||||
|
MSG $November is [$November]%
|
||||||
|
MSG $December is [$December]%
|
||||||
|
MSG $Monday is [$Monday]%
|
||||||
|
MSG $Tuesday is [$Tuesday]%
|
||||||
|
MSG $Wednesday is [$Wednesday]%
|
||||||
|
MSG $Thursday is [$Thursday]%
|
||||||
|
MSG $Friday is [$Friday]%
|
||||||
|
MSG $Saturday is [$Saturday]%
|
||||||
|
MSG $Sunday is [$Sunday]%
|
||||||
|
|||||||
Reference in New Issue
Block a user