diff --git a/configure b/configure index 3f5113aa..f9b1797a 100755 --- a/configure +++ b/configure @@ -4006,7 +4006,7 @@ _ACEOF fi done -VERSION=04.00.00 +VERSION=04.00.01 diff --git a/configure.in b/configure.in index 7273dc74..9d2bbae9 100644 --- a/configure.in +++ b/configure.in @@ -65,7 +65,7 @@ else fi AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups) -VERSION=04.00.00 +VERSION=04.00.01 AC_SUBST(VERSION) AC_SUBST(PERL) AC_SUBST(PERLARTIFACTS) diff --git a/man/remind.1 b/man/remind.1 index a894783d..b089440b 100644 --- a/man/remind.1 +++ b/man/remind.1 @@ -2459,6 +2459,20 @@ order, or 2 if sorting by time in descending order. The number of spaces by which all lines (except the first) of an \fBMSF\fR-type reminder should be indented. The default is 0. .TP +.B $SuppressLRM +Normally, when Remind is run with the \fB\-c\fR option in a UTF-8 locale, +it emits a left-to-right mark sequence after printing day names or +reminders. Some terminals render this incorrectly, so you can use: +.RS +.PP +.nf + SET $SuppressLRM 1 +.fi +.PP +at the top of your reminder file to suppress the LRM sequences, or you +can invoke Remind with the option \fB'\-i$SuppressLRM=1'\fR. +.RE +.TP .B $SysInclude (read-only, STRING type) A directory path containing standard reminder scripts. Currently, Remind ships with some standard holiday files and language packs. diff --git a/src/calendar.c b/src/calendar.c index 05839b02..8ec28943 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -259,6 +259,10 @@ static void WriteCalDays (void); static void send_lrm(void) { + /* Don't send LRM if SuppressLRM is set */ + if (SuppressLRM) { + return; + } /* Send a lrm control sequence if UseUTF8Chars is enabled or char encoding is UTF-8 */ diff --git a/src/globals.h b/src/globals.h index ce2d0f6e..7bc79b56 100644 --- a/src/globals.h +++ b/src/globals.h @@ -313,6 +313,12 @@ EXTERN char *DynamicWas EXTERN char *SysDir #ifdef MK_GLOBALS -= STRSYSDIR(SYSDIR); += STRSYSDIR(SYSDIR) +#endif +; + +EXTERN int SuppressLRM +#ifdef MK_GLOBALS += 0 #endif ; diff --git a/src/var.c b/src/var.c index fe4d7ff1..78bec6e4 100644 --- a/src/var.c +++ b/src/var.c @@ -849,6 +849,7 @@ static SysVar SysVarArr[] = { {"SortByTime", 0, INT_TYPE, &SortByTime, 0, 0, NULL }, {"SubsIndent", 1, INT_TYPE, &SubsIndent, 0, 132, NULL }, {"Sunday", 1, STR_TYPE, &DynamicDayName[6], 0, 0, NULL }, + {"SuppressLRM", 1, INT_TYPE, &SuppressLRM, 0, 1, NULL }, {"SysInclude", 0, STR_TYPE, &SysDir, 0, 0, NULL }, {"T", 0, SPECIAL_TYPE, trig_date_func, 0, 0, NULL }, {"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0, NULL }, diff --git a/tests/test.cmp b/tests/test.cmp index ad237438..e5aae36b 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -1024,7 +1024,7 @@ set a057 value("a05"+"6") "a05" + "6" => "a056" value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH" set a058 version() -version() => "04.00.00" +version() => "04.00.01" set a059 wkday(today()) today() => 1991-02-16 wkday(1991-02-16) => "Saturday" @@ -2594,7 +2594,7 @@ a086 4 a109 2012-01-01 a128 2018-02-03@16:45 a039 "February" -a058 "04.00.00" +a058 "04.00.01" a077 "1992 92 " a096 -4 @@ -2765,6 +2765,7 @@ Variable Value $SortByTime 0 $SubsIndent 0 [0, 132] $Sunday "Sunday" + $SuppressLRM 0 [0, 1] $T 1990-01-01 $Td -1 $Thursday "Thursday"