Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package remind for openSUSE:Factory checked 
in at 2022-08-27 11:49:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/remind (Old)
 and      /work/SRC/openSUSE:Factory/.remind.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "remind"

Sat Aug 27 11:49:50 2022 rev:28 rq:999366 version:4.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/remind/remind.changes    2022-08-10 
17:15:43.414087542 +0200
+++ /work/SRC/openSUSE:Factory/.remind.new.2083/remind.changes  2022-08-27 
11:49:52.305814933 +0200
@@ -1,0 +2,13 @@
+Fri Aug 19 07:52:25 UTC 2022 - Detlef Steuer <detlef.ste...@gmx.de>
+
+- VERSION 4.0 Patch 3 - 2022-08-16
+
+- IMPROVEMENT: remind: add plain_body and calendar_body JSON keys in -pp...
+  output.
+
+- BUG FIX: tkremind: Don't create empty files called '&1' when creating
+  a new reminder.
+
+- BUG FIX: remind: Don't call signal-unsafe functions from signal handler
+
+-------------------------------------------------------------------

Old:
----
  remind-04.00.02.tar.gz

New:
----
  remind-04.00.03.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ remind.spec ++++++
--- /var/tmp/diff_new_pack.CRq1oq/_old  2022-08-27 11:49:52.869816144 +0200
+++ /var/tmp/diff_new_pack.CRq1oq/_new  2022-08-27 11:49:52.873816153 +0200
@@ -17,9 +17,9 @@
 
 
 Name:           remind
-Version:        4.0.2
+Version:        4.0.3
 Release:        0
-%define tar_version 04.00.02
+%define tar_version 04.00.03
 Summary:        A sophisticated calendar and alarm program
 License:        GPL-2.0-only
 Group:          Productivity/Office/Organizers

++++++ remind-04.00.02.tar.gz -> remind-04.00.03.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/configure 
new/remind-04.00.03/configure
--- old/remind-04.00.02/configure       2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/configure       2022-08-16 15:24:51.000000000 +0200
@@ -4006,7 +4006,7 @@
 fi
 done
 
-VERSION=04.00.02
+VERSION=04.00.03
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/configure.in 
new/remind-04.00.03/configure.in
--- old/remind-04.00.02/configure.in    2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/configure.in    2022-08-16 15:24:51.000000000 +0200
@@ -65,7 +65,7 @@
 fi
 
 AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups)
-VERSION=04.00.02
+VERSION=04.00.03
 AC_SUBST(VERSION)
 AC_SUBST(PERL)
 AC_SUBST(PERLARTIFACTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/docs/WHATSNEW 
new/remind-04.00.03/docs/WHATSNEW
--- old/remind-04.00.02/docs/WHATSNEW   2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/docs/WHATSNEW   2022-08-16 15:24:51.000000000 +0200
@@ -1,5 +1,15 @@
 CHANGES TO REMIND
 
+* VERSION 4.0 Patch 3 - 2022-08-16
+
+- IMPROVEMENT: remind: add plain_body and calendar_body JSON keys in -pp...
+  output.
+
+- BUG FIX: tkremind: Don't create empty files called '&1' when creating
+  a new reminder.
+
+- BUG FIX: remind: Don't call signal-unsafe functions from signal handler
+
 * VERSION 4.0 Patch 2 - 2022-08-02
 
 - IMPROVEMENT: remind: Allow more forms of OMIT as per Ian D. Allen!'s request:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/man/rem2ps.1 
new/remind-04.00.03/man/rem2ps.1
--- old/remind-04.00.02/man/rem2ps.1    2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/man/rem2ps.1    2022-08-16 15:24:51.000000000 +0200
@@ -586,6 +586,18 @@
 .B body \fIbody\fR
 The body of the reminder to issue.  Always present.
 .TP
+.B calendar_body \fIbody\fR
+The text appropriate to include in a calendar.  Only present if the
+original body contains %"...%" sequences and the "q" modifier was used
+with Remind's "-pp..." flag.
+.TP
+.B plain_body \fIbody\fR
+The "plain" body of the reminder with any %"...%" sequences removed.
+If your back-end is designed to draw a calendar, then it should
+use the \fBcalendar_body\fR if present.  If not, then it
+should use the \fBplain_body\fR if present, and if not, then it
+should fall back on the \fBbody\fR.
+.TP
 .B rawbody \fIraw\fR
 The "raw" body of the reminder, before any expression-pasting or
 substitution-sequence processing.  If the raw body would be the same
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/man/remind.1 
new/remind-04.00.03/man/remind.1
--- old/remind-04.00.02/man/remind.1    2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/man/remind.1    2022-08-16 15:24:51.000000000 +0200
@@ -4844,7 +4844,7 @@
 after tomorrow" for an event two days from now.  You could do this:
 .PP
 .nf
-    FSET subst_bx(a,d,t) iif(d==today()+2, "the day after tomorrow", \
+    FSET subst_bx(a,d,t) iif(d==today()+2, "the day after tomorrow", \\
                              "in " + (d-today()) + " days' time")
     REM [today()+3] ++3 MSG Event 1 is %b%
     REM [today()+2] ++3 MSG Event 2 is %b%
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/rem2pdf/lib/Remind/PDF/Entry.pm 
new/remind-04.00.03/rem2pdf/lib/Remind/PDF/Entry.pm
--- old/remind-04.00.02/rem2pdf/lib/Remind/PDF/Entry.pm 2022-08-02 
20:58:15.000000000 +0200
+++ new/remind-04.00.03/rem2pdf/lib/Remind/PDF/Entry.pm 2022-08-16 
15:24:51.000000000 +0200
@@ -76,7 +76,15 @@
 
         $layout->set_width(1024 * ($x2 - $x1 - 2 * $settings->{border_size}));
         $layout->set_wrap('word-char');
-        $layout->set_text(Encode::decode('UTF-8', $self->{body}));
+        my $body;
+        if (exists($self->{calendar_body})) {
+                $body = $self->{calendar_body};
+        } elsif (exists($self->{plain_body})) {
+                $body = $self->{plain_body};
+        } else {
+                $body = $self->{body};
+        }
+        $layout->set_text(Encode::decode('UTF-8', $body));
         my $desc = Pango::FontDescription->from_string($settings->{entry_font} 
. ' ' . $settings->{entry_size} . 'px');
         $layout->set_font_description($desc);
         my ($wid, $h) = $layout->get_pixel_size();
@@ -233,11 +241,9 @@
 package Remind::PDF::Entry::color;
 use base 'Remind::PDF::Entry';
 
-# Strip the RGB prefix from body
+# Nothing to do for COLOR-type reminder
 sub _adjust
 {
-        my ($self) = @_;
-        $self->{body} =~ s/^\d+\s+\d+\s+\d+\s+//;
 }
 
 package Remind::PDF::Entry::postscript;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/rem2pdf/lib/Remind/PDF.pm 
new/remind-04.00.03/rem2pdf/lib/Remind/PDF.pm
--- old/remind-04.00.02/rem2pdf/lib/Remind/PDF.pm       2022-08-02 
20:58:15.000000000 +0200
+++ new/remind-04.00.03/rem2pdf/lib/Remind/PDF.pm       2022-08-16 
15:24:51.000000000 +0200
@@ -227,14 +227,16 @@
 
         if ($hash->{passthru}) {
                 if ($hash->{passthru} =~ /^(shade|color|colour)$/i) {
-                        if ($hash->{body} =~ /^\s*(\d+)\s+(\d+)\s+(\d+)/) {
+                        if ($hash->{body} =~ 
/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)/) {
                                 $hash->{r} = $1;
                                 $hash->{g} = $2;
                                 $hash->{b} = $3;
-                        } elsif ($hash->{body} =~ /^\s*(\d+)/) {
+                                $hash->{body} = $4;
+                        } elsif ($hash->{body} =~ /^\s*(\d+)\s*(.*)/) {
                                 $hash->{r} = $1;
                                 $hash->{g} = $1;
                                 $hash->{b} = $1;
+                                $hash->{body} = $2;
                         }
                 }
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/scripts/tkremind 
new/remind-04.00.03/scripts/tkremind
--- old/remind-04.00.02/scripts/tkremind        2022-08-02 20:58:15.000000000 
+0200
+++ new/remind-04.00.03/scripts/tkremind        2022-08-16 15:24:51.000000000 
+0200
@@ -1091,8 +1091,13 @@
        } else {
            set tag "*"
        }
-       set stuff [dict get $obj body]
-
+        if {[dict exists $obj calendar_body]} {
+            set stuff [dict get $obj calendar_body]
+        } elseif  {[dict exists $obj plain_body]} {
+            set stuff [dict get $obj plain_body]
+        } else {
+            set stuff [dict get $obj body]
+        }
        set day [string trimleft $day 0]
        set n [expr $day+$offset]
        set month [string trimleft $month 0]
@@ -1116,30 +1121,31 @@
            }
            "COLOUR" -
            "COLOR" {
-               if {[regexp {^ *([0-9]+) +([0-9]+) +([0-9]+) +(.*)$} $stuff all 
r g b rest]} {
-                   if {$r > 255} {
-                       set r 255
-                   } elseif {$r < 0} {
-                       set r 0
-                   }
-                   if {$g > 255} {
-                       set g 255
-                   } elseif {$g < 0} {
-                       set g 0
-                   }
-                   if {$b > 255} {
-                       set b 255
-                   } elseif {$b < 0} {
-                       set b 0
-                   }
-                   set color [format "%02X%02X%02X" $r $g $b]
-                   set extratags "clr$color"
-                   .cal.t$n configure -state normal
-                   .cal.t$n tag configure $extratags -foreground "#$color"
-                   .cal.t$n configure -state disabled -takefocus 0
-                   set stuff $rest
-                   set type "COLOR"
-               }
+                set r [dict get $obj r]
+                set g [dict get $obj g]
+                set b [dict get $obj b]
+                if {$r > 255} {
+                    set r 255
+                } elseif {$r < 0} {
+                    set r 0
+                }
+                if {$g > 255} {
+                    set g 255
+                } elseif {$g < 0} {
+                    set g 0
+                }
+                if {$b > 255} {
+                    set b 255
+                } elseif {$b < 0} {
+                    set b 0
+                }
+                set color [format "%02X%02X%02X" $r $g $b]
+                set extratags "clr$color"
+                .cal.t$n configure -state normal
+                .cal.t$n tag configure $extratags -foreground "#$color"
+                .cal.t$n configure -state disabled -takefocus 0
+                set stuff $stuff
+                set type "COLOR"
            }
        }
        if { $type != "*" && $type != "COLOR" && $type != "COLOUR"} {
@@ -2106,7 +2112,7 @@
 
     # Check it out!
     global Remind
-    set f [open "|$Remind -arq -e - 2>&1" r+]
+    set f [open "|$Remind -arq -e - 2>@1" r+]
     puts $f "BANNER %"
     puts $f "$rem MSG %"
     puts $f "MSG %_%_%_%_"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/src/calendar.c 
new/remind-04.00.03/src/calendar.c
--- old/remind-04.00.02/src/calendar.c  2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/src/calendar.c  2022-08-16 15:24:51.000000000 +0200
@@ -293,6 +293,19 @@
     return buf;
 }
 
+void PrintJSONChar(char c) {
+    switch(c) {
+    case '\b': printf("\\b"); break;
+    case '\f': printf("\\f"); break;
+    case '\n': printf("\\n"); break;
+    case '\r': printf("\\r"); break;
+    case '\t': printf("\\t"); break;
+    case '"':  printf("\\\""); break;
+    case '\\': printf("\\\\"); break;
+    default: printf("%c", c);
+    }
+}
+
 void PrintJSONString(char const *s)
 {
     while (*s) {
@@ -1912,6 +1925,7 @@
 static void WriteSimpleEntryProtocol2(CalEntry *e, int today)
 {
     int done = 0;
+    char const *s;
     if (DoPrefixLineNo) {
        PrintJSONKeyPairString("filename", e->filename);
        PrintJSONKeyPairInt("lineno", e->lineno);
@@ -2038,6 +2052,45 @@
     if (strcmp(e->raw_text, e->text)) {
        PrintJSONKeyPairString("rawbody", e->raw_text);
     }
+
+    /* Figure out calendar_body and plain_body */
+    if (DontSuppressQuoteMarkers) {
+        s = strstr(e->text, "%\"");
+        if (s) {
+            s += 2;
+            printf("\"calendar_body\":\"");
+            while (*s) {
+                if (*s == '%' && *(s+1) == '"') {
+                    break;
+                }
+                PrintJSONChar(*s);
+                s++;
+            }
+            printf("\",");
+        }
+    }
+    s = strstr(e->text, "%\"");
+    if (s || e->is_color) {
+        printf("\"plain_body\":\"");
+        s = e->text;
+        if (e->is_color) {
+            while(*s && !isspace(*s)) s++;
+            while(*s && isspace(*s)) s++;
+            while(*s && !isspace(*s)) s++;
+            while(*s && isspace(*s)) s++;
+            while(*s && !isspace(*s)) s++;
+            while(*s && isspace(*s)) s++;
+        }
+        while(*s) {
+            if (*s == '%' && *(s+1) == '"') {
+                s += 2;
+                continue;
+            }
+            PrintJSONChar(*s);
+            s++;
+        }
+        printf("\",");
+    }
     printf("\"body\":\"");
     PrintJSONString(e->text);
     printf("\"");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/src/main.c 
new/remind-04.00.03/src/main.c
--- old/remind-04.00.02/src/main.c      2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/src/main.c      2022-08-16 15:24:51.000000000 +0200
@@ -1357,13 +1357,23 @@
 /* command-line flag is supplied.                             */
 /*                                                            */
 /***************************************************************/
+static sig_atomic_t got_sigint = 0;
 
-void SigIntHandler(int d)
+void
+SigIntHandler(int d)
 {
     UNUSED(d);
-    signal(SIGINT, SigIntHandler);
-    GotSigInt();
-    exit(0);
+    got_sigint = 1;
+}
+
+int
+GotSigInt(void)
+{
+    if (got_sigint) {
+        got_sigint = 0;
+        return 1;
+    }
+    return 0;
 }
 
 void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/src/protos.h 
new/remind-04.00.03/src/protos.h
--- old/remind-04.00.02/src/protos.h    2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/src/protos.h    2022-08-16 15:24:51.000000000 +0200
@@ -22,6 +22,7 @@
 #define isempty(c) (isspace(c) || ((c) == '\\'))
 
 #include "dynbuf.h"
+#include <ctype.h>
 
 int CallUserFunc (char const *name, int nargs, ParsePtr p);
 int DoFset (ParsePtr p);
@@ -143,7 +144,7 @@
 void HuntPhase (int startdate, int starttim, int phas, int *date, int *time);
 int CompareRems (int dat1, int tim1, int prio1, int dat2, int tim2, int prio2, 
int bydate, int bytime, int byprio, int untimed_first);
 void SigIntHandler (int d);
-void GotSigInt (void);
+int GotSigInt (void);
 void PurgeEchoLine(char const *fmt, ...);
 void FreeTrig(Trigger *t);
 void AppendTag(DynamicBuffer *buf, char const *s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/src/queue.c 
new/remind-04.00.03/src/queue.c
--- old/remind-04.00.02/src/queue.c     2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/src/queue.c     2022-08-16 15:24:51.000000000 +0200
@@ -59,6 +59,7 @@
 static int CalculateNextTimeUsingSched (QueuedRem *q);
 static void DaemonWait (struct timeval *sleep_tv);
 static void reread (void);
+static void PrintQueue(void);
 
 /***************************************************************/
 /*                                                             */
@@ -123,6 +124,7 @@
     Trigger trig;
     struct timeval tv;
     struct timeval sleep_tv;
+    struct sigaction sa;
 
     /* Suppress the BANNER from being issued */
     NumTriggered = 1;
@@ -161,7 +163,11 @@
        q = q->next;
     }
 
-    if (!DontFork || Daemon) signal(SIGINT, SigIntHandler);
+    if (!DontFork || Daemon) {
+        sa.sa_handler = SigIntHandler;
+        sa.sa_flags = 0;
+        (void) sigaction(SIGINT, &sa, NULL);
+    }
 
     /* Sit in a loop, issuing reminders when necessary */
     while(1) {
@@ -205,6 +211,10 @@
                sleep(SleepTime);
             }
 
+            if (GotSigInt()) {
+                PrintQueue();
+            }
+
            /* If not in daemon mode and day has rolled around,
               exit -- not much we can do. */
            if (!Daemon) {
@@ -337,13 +347,13 @@
 
 /***************************************************************/
 /*                                                             */
-/* GotSigInt                                                  */
+/* PrintQueue                                                 */
 /*                                                             */
-/* Split out what's done on a SIGINT from the SIGINT Handler.  */
-/* This will be necessary for OS/2 multithreaded.             */
+/* For debugging: Print queue contents to STDOUT               */
 /*                                                             */
 /***************************************************************/
-void GotSigInt(void)
+static
+void PrintQueue(void)
 {
     QueuedRem *q = QueueHead;
 
@@ -368,6 +378,7 @@
        q = q->next;
     }
     printf(NL);
+    printf("To terminate program, send SIGQUIT (probably Ctrl-\\ on the 
keyboard.)%s", NL);
 }
 
 /***************************************************************/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/tests/test-rem 
new/remind-04.00.03/tests/test-rem
--- old/remind-04.00.02/tests/test-rem  2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/tests/test-rem  2022-08-16 15:24:51.000000000 +0200
@@ -123,10 +123,10 @@
 EOF
 
 # Test default color
-../src/remind -ppp - 1 Jan 2012 9:00 <<'EOF' >> ../tests/test.out 2>&1
+../src/remind -pppq - 1 Jan 2012 9:00 <<'EOF' >> ../tests/test.out 2>&1
 REM 2 MSG Normal
 SET $DefaultColor "255 0 0"
-REM 3 MSG Red
+REM 3 MSG %"Red%" on the calendar!
 SET $DefaultColor "-1 -1 -1"
 REM 4 MSG Normal
 # Should give an error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/remind-04.00.02/tests/test.cmp 
new/remind-04.00.03/tests/test.cmp
--- old/remind-04.00.02/tests/test.cmp  2022-08-02 20:58:15.000000000 +0200
+++ new/remind-04.00.03/tests/test.cmp  2022-08-16 15:24:51.000000000 +0200
@@ -1024,7 +1024,7 @@
 "a05" + "6" => "a056"
 value("a056") => "SDFJHSDF KSJDFH KJSDFH KSJDFH"
 set a058 version()
-version() => "04.00.02"
+version() => "04.00.03"
 set a059 wkday(today())
 today() => 1991-02-16
 wkday(1991-02-16) => "Saturday"
@@ -2594,7 +2594,7 @@
 a109  2012-01-01
 a128  2018-02-03@16:45
 a039  "February"
-a058  "04.00.02"
+a058  "04.00.03"
 a077  "1992 92
 "
 a096  -4
@@ -7810,7 +7810,7 @@
 {
 
"monthname":"January","year":2012,"daysinmonth":31,"firstwkday":0,"mondayfirst":0,"daynames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"prevmonthname":"December","daysinprevmonth":31,"prevmonthyear":2011,"nextmonthname":"February","daysinnextmonth":29,"nextmonthyear":2012,"entries":[
 
{"date":"2012-01-02","filename":"-","lineno":1,"d":2,"priority":5000,"body":"Normal"},
-{"date":"2012-01-03","filename":"-","lineno":3,"passthru":"COLOR","d":3,"priority":5000,"r":255,"g":0,"b":0,"rawbody":"Red","body":"255
 0 0 Red"},
+{"date":"2012-01-03","filename":"-","lineno":3,"passthru":"COLOR","d":3,"priority":5000,"r":255,"g":0,"b":0,"rawbody":"%\"Red%\"
 on the calendar!","calendar_body":"Red","plain_body":"Red on the 
calendar!","body":"255 0 0 %\"Red%\" on the calendar!"},
 
{"date":"2012-01-04","filename":"-","lineno":5,"d":4,"priority":5000,"body":"Normal"}
 ]
 }

Reply via email to