Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ttyplot for openSUSE:Factory checked 
in at 2026-06-25 10:56:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ttyplot (Old)
 and      /work/SRC/openSUSE:Factory/.ttyplot.new.2088 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ttyplot"

Thu Jun 25 10:56:06 2026 rev:4 rq:1361541 version:1.7.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/ttyplot/ttyplot.changes  2025-09-15 
19:56:56.429265403 +0200
+++ /work/SRC/openSUSE:Factory/.ttyplot.new.2088/ttyplot.changes        
2026-06-25 10:58:37.652318506 +0200
@@ -1,0 +2,8 @@
+Mon Jun 22 06:23:12 UTC 2026 - Martin Hauke <[email protected]>
+
+- Update to version 1.7.5
+  * Fix CI failure on maybe-uninitialized compiler warning.
+  * Avoid division by zero on small windows.
+  * Work on smaller windows with no clock display.
+
+-------------------------------------------------------------------

Old:
----
  ttyplot-1.7.4.tar.gz

New:
----
  ttyplot-1.7.5.tar.gz

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

Other differences:
------------------
++++++ ttyplot.spec ++++++
--- /var/tmp/diff_new_pack.3cDG3X/_old  2026-06-25 10:58:38.324341699 +0200
+++ /var/tmp/diff_new_pack.3cDG3X/_new  2026-06-25 10:58:38.328341837 +0200
@@ -1,8 +1,8 @@
 #
 # spec file for package ttyplot
 #
-# Copyright (c) 2025 SUSE LLC and contributors
-# Copyright (c) 2023-2025, Martin Hauke <[email protected]>
+# Copyright (c) 2026 SUSE LLC and contributors
+# Copyright (c) 2023-2026, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 
 Name:           ttyplot
-Version:        1.7.4
+Version:        1.7.5
 Release:        0
 Summary:        Realtime plotting utility for terminals
 License:        Apache-2.0

++++++ ttyplot-1.7.4.tar.gz -> ttyplot-1.7.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttyplot-1.7.4/.github/workflows/codespell.yml 
new/ttyplot-1.7.5/.github/workflows/codespell.yml
--- old/ttyplot-1.7.4/.github/workflows/codespell.yml   2025-08-18 
04:21:27.000000000 +0200
+++ new/ttyplot-1.7.5/.github/workflows/codespell.yml   2026-06-22 
04:17:25.000000000 +0200
@@ -21,7 +21,7 @@
     steps:
       - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  # 
v5.0.0
 
-      - uses: 
codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630  # 
v2.1
+      - uses: 
codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579  # 
v2.2
         with:
           # "nd" (with lowercase "n") is from ".Nd" (with uppercase "n") in 
ttyplot.1
           # 
https://github.com/codespell-project/codespell/issues/3233#issuecomment-1828026522
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttyplot-1.7.4/.github/workflows/linux_and_macos.yml 
new/ttyplot-1.7.5/.github/workflows/linux_and_macos.yml
--- old/ttyplot-1.7.4/.github/workflows/linux_and_macos.yml     2025-08-18 
04:21:27.000000000 +0200
+++ new/ttyplot-1.7.5/.github/workflows/linux_and_macos.yml     2026-06-22 
04:17:25.000000000 +0200
@@ -41,17 +41,17 @@
             clang_major_version: null
             clang_repo_suffix: null
             make: make
-            runs-on: macos-13
-          - cc: gcc-14
+            runs-on: macos-14
+          - cc: gcc-15
             clang_major_version: null
             clang_repo_suffix: null
             make: bmake
-            runs-on: macos-14
-          - cc: clang-18
-            clang_major_version: 18
+            runs-on: macos-15-intel
+          - cc: clang-20
+            clang_major_version: 20
             clang_repo_suffix: null
             make: bsdmake
-            runs-on: macos-15
+            runs-on: macos-26
     steps:
       - name: Add Clang/LLVM repositories
         if: "${{ runner.os == 'Linux' && contains(matrix.cc, 'clang') }}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttyplot-1.7.4/Makefile new/ttyplot-1.7.5/Makefile
--- old/ttyplot-1.7.4/Makefile  2025-08-18 04:21:27.000000000 +0200
+++ new/ttyplot-1.7.5/Makefile  2026-06-22 04:17:25.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION    = 1.7.3
+VERSION    = 1.7.5
 DESTDIR   ?=
 PREFIX    ?= /usr/local
 MANPREFIX ?= $(PREFIX)/man
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttyplot-1.7.4/ttyplot.c new/ttyplot-1.7.5/ttyplot.c
--- old/ttyplot-1.7.4/ttyplot.c 2025-08-18 04:21:27.000000000 +0200
+++ new/ttyplot-1.7.5/ttyplot.c 2026-06-22 04:17:25.000000000 +0200
@@ -53,6 +53,14 @@
 #define T_LLCR ACS_LLCORNER
 #endif
 
+// Window size
+#define WIDTH_CLOCK 24  // strlen("Thu Jan  1 00:00:00 1970")
+#define WIDTH_MIN 44
+#define WIDTH_CLOCK_MIN (WIDTH_MIN + WIDTH_CLOCK)
+#define WIDTH_MARGIN 4
+#define HEIGHT_MIN 5
+#define HEIGHT_MARGIN 4
+
 // Define standard curses color constants for better readability
 #define C_BLACK 0
 #define C_RED 1
@@ -91,7 +99,7 @@
 static char title[256] = ".: ttyplot :.", unit[64] = {0}, ls[256] = {0};
 static double values1[1024] = {0}, values2[1024] = {0};
 static int width = 0, height = 0, n = -1, v = 0, c = 0, rate = 0, two = 0,
-           plotwidth = 0, plotheight = 0;
+           plotwidth = WIDTH_MIN - WIDTH_MARGIN, plotheight = 0;
 static bool fake_clock = false;
 static char *errstr = NULL;
 static bool redraw_needed = false;
@@ -322,46 +330,66 @@
 
     // Handle drawing based on whether values are positive or negative
     if (zero_pos > 0) {  // We have negative values
-        int y1_start, y1_end, y2_start, y2_end;
+        int y1_start, y1_end;
+        int y2_start, y2_end;
+        int zero_line = ph + 1 - zero_pos;
 
-        // For value 1
-        if (v1 >= 0) {
-            // Positive value: draw from zero line upward
+        // Calculate ranges for value 1
+        if (v1 > 0) {
             y1_start = ph + 1 - l1;
-            y1_end = ph + 1 - zero_pos;
-        } else {
-            // Negative value: draw from zero line downward
-            y1_start = ph + 1 - zero_pos;
+            y1_end = zero_line;
+        } else if (v1 < 0) {
+            y1_start = zero_line;
             y1_end = ph + 1 - l1;
+        } else {
+            y1_start = zero_line;
+            y1_end = zero_line;
         }
 
-        // For value 2
+        // Calculate ranges for value 2
         if (has_v2) {
             if (v2 > 0) {
                 y2_start = ph + 1 - l2;
-                y2_end = ph + 1 - zero_pos;
+                y2_end = zero_line;
             } else if (v2 < 0) {
-                y2_start = ph + 1 - zero_pos;
+                y2_start = zero_line;
                 y2_end = ph + 1 - l2;
-            } else {  // v2 == 0
-                y2_start = ph + 1 - zero_pos;
-                y2_end = ph + 1 - zero_pos;
+            } else {
+                y2_start = zero_line;
+                y2_end = zero_line;
             }
+        } else {
+            y2_start = y2_end = -1;
         }
 
-        // Draw the lines
-        if (y1_start < y1_end) {
-            mvvline_set(y1_start, x, c1, y1_end - y1_start);
-        } else if (y1_start > y1_end && l1 > 0) {
-            mvvline_set(y1_end, x, c1, y1_start - y1_end);
-        }
-        if (has_v2) {
-            if (y2_start < y2_end) {
-                mvvline_set(y2_start, x, &c2r, y2_end - y2_start);
-            } else if (y2_start > y2_end) {
-                mvvline_set(y2_end, x, &c2r, y2_start - y2_end);
-            } else {  // y2_start == y2_end
-                mvvline_set(y2_start, x, &c2r, 1);
+        if (has_v2 && y2_start != -1) {
+            int overlap_start = (y1_start > y2_start) ? y1_start : y2_start;
+            int overlap_end = (y1_end < y2_end) ? y1_end : y2_end;
+
+            if (y1_start < y2_start) {
+                mvvline_set(y1_start, x, c1, y2_start - y1_start);
+            } else if (y2_start < y1_start) {
+                mvvline_set(y2_start, x, (c2 == hce || c2 == lce) ? &c2r : 
&space,
+                            y1_start - y2_start);
+            }
+
+            if (overlap_start <= overlap_end) {
+                mvvline_set(overlap_start, x, &c2r, overlap_end - 
overlap_start + 1);
+            }
+
+            if (y1_end > y2_end) {
+                mvvline_set(y2_end + 1, x, c1, y1_end - y2_end);
+            } else if (y2_end > y1_end) {
+                mvvline_set(y1_end + 1, x, (c2 == hce || c2 == lce) ? &c2r : 
&space,
+                            y2_end - y1_end);
+            }
+        } else {
+            if (y1_start < y1_end) {
+                mvvline_set(y1_start, x, c1, y1_end - y1_start + 1);
+            } else if (y1_start > y1_end) {
+                mvvline_set(y1_end, x, c1, y1_start - y1_end + 1);
+            } else {
+                mvvline_set(y1_start, x, c1, 1);
             }
         }
     } else {
@@ -441,8 +469,8 @@
                   (v2 && v2[i] > hardmax)   ? hce
                   : (v2 && v2[i] < hardmin) ? lce
                                             : pc,
-                  hce, lce, zero_pos, v1[i], (v2 && !isnan(v2[i])) ? v2[i] : 0,
-                  (v2 && !isnan(v2[i])));
+                  hce, lce, zero_pos, v1[i], (v2 && ! isnan(v2[i])) ? v2[i] : 
0,
+                  (v2 && ! isnan(v2[i])));
     }
 
     if (colors[LINE_COLOR] != -1)
@@ -465,7 +493,7 @@
 }
 
 static int window_big_enough_to_draw(void) {
-    return (width >= 68) && (height >= 5);
+    return (width >= WIDTH_MIN) && (height >= HEIGHT_MIN);
 }
 
 static void show_window_size_error(void) {
@@ -480,8 +508,8 @@
     erase();
     getmaxyx(stdscr, height, width);
 
-    plotheight = height - 4;
-    plotwidth = width - 4;
+    plotheight = height - HEIGHT_MARGIN;
+    plotwidth = width - WIDTH_MARGIN;
     if (plotwidth >= (int)((sizeof(values1) / sizeof(double)) - 1))
         exit(0);
 
@@ -506,15 +534,18 @@
 
     mvaddstr(height - 1, width - strlen(verstring) - 1, verstring);
 
-    const char *clock_display;
-    if (fake_clock) {
-        clock_display = "Thu Jan  1 00:00:00 1970 ";
-    } else {
-        lt = localtime(&now.tv_sec);
-        asctime_r(lt, ls);
-        clock_display = ls;
+    if (width >= WIDTH_CLOCK_MIN) {
+        const char *clock_display;
+        if (fake_clock) {
+            clock_display = "Thu Jan  1 00:00:00 1970";
+        } else {
+            lt = localtime(&now.tv_sec);
+            asctime_r(lt, ls);
+            ls[strlen(ls) - 1] = '\0';  // drop trailing newline, see 
asctime_r(3)
+            clock_display = ls;
+        }
+        mvaddstr(height - 2, width - strlen(clock_display) - 1, clock_display);
     }
-    mvaddstr(height - 2, width - strlen(clock_display), clock_display);
 
     if (colors[TEXT_COLOR] != -1)
         attroff(COLOR_PAIR(TEXT_COLOR + 1));
@@ -800,7 +831,7 @@
     }
 
     // To make UI testing more robust, we display a clock that is frozen at
-    // "Thu Jan  1 00:00:03 1970" when variable FAKETIME is set
+    // "Thu Jan  1 00:00:00 1970" when variable FAKETIME is set
     fake_clock = (getenv("FAKETIME") != NULL);
 
     setlocale(LC_ALL, "");

Reply via email to