Hello community,

here is the log from the commit of package progress for openSUSE:Factory 
checked in at 2020-12-04 21:29:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/progress (Old)
 and      /work/SRC/openSUSE:Factory/.progress.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "progress"

Fri Dec  4 21:29:05 2020 rev:4 rq:852967 version:0.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/progress/progress.changes        2018-07-04 
23:56:12.167821188 +0200
+++ /work/SRC/openSUSE:Factory/.progress.new.5913/progress.changes      
2020-12-04 21:29:10.694184261 +0100
@@ -1,0 +2,7 @@
+Thu Dec  3 21:27:44 UTC 2020 - Avindra Goolcharan <[email protected]>
+
+- Update to version 0.15
+  * fix non-ASCII (Unicode) chars in ncurses
+  * fix sprintf build warnings
+
+-------------------------------------------------------------------

Old:
----
  progress-0.14.tar.gz

New:
----
  progress-0.15.tar.gz

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

Other differences:
------------------
++++++ progress.spec ++++++
--- /var/tmp/diff_new_pack.y61et0/_old  2020-12-04 21:29:11.302185133 +0100
+++ /var/tmp/diff_new_pack.y61et0/_new  2020-12-04 21:29:11.306185138 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package progress
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           progress
-Version:        0.14
+Version:        0.15
 Release:        0
 Summary:        Coreutils Viewer
 License:        GPL-3.0-or-later

++++++ progress-0.14.tar.gz -> progress-0.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.14/README.md new/progress-0.15/README.md
--- old/progress-0.14/README.md 2018-06-27 18:00:00.000000000 +0200
+++ new/progress-0.15/README.md 2020-06-08 10:45:33.000000000 +0200
@@ -16,8 +16,28 @@
 
 Formerly known as cv (Coreutils Viewer).
 
-How do you build it?
---------------------
+How do you install it?
+----------------------
+
+On deb-based systems (Debian, Ubuntu, Mint, etc.) run:
+
+    apt install progress
+    
+On rpm-based systems (Red Hat, CentOS, SUSE, etc.), run:
+
+    yum install progress
+
+On macOS, with homebrew, run:
+
+    brew install progress
+    
+On macOS, with MacPorts, run:
+
+    port install progress
+
+
+How do you build it from source?
+--------------------------------
 
     make && make install
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.14/hlist.c new/progress-0.15/hlist.c
--- old/progress-0.14/hlist.c   2018-06-27 18:00:00.000000000 +0200
+++ new/progress-0.15/hlist.c   2020-06-08 10:45:33.000000000 +0200
@@ -24,64 +24,62 @@
 static int max_hlist_size = 2;
 
 void set_hlist_size(double throughput_wait_secs) {
-int new_size;
-
-new_size = ceil(10.0 / throughput_wait_secs);
-if (new_size > 1)
-    max_hlist_size = new_size;
+   int new_size;
+   new_size = ceil(10.0 / throughput_wait_secs);
+   max_hlist_size = (new_size > 1) ? new_size : max_hlist_size;
 }
 
 int add_to_hlist(hlist **begin, hlist **end, int size, int value) {
-int ret;
+   int ret;
 
-if (*begin == NULL) {
-    if ((*begin = malloc(sizeof(hlist))) == NULL)
-        return 0;
-    *end = *begin;
-    (*begin)->next = NULL;
-    (*begin)->prev = NULL;
-    ret = 1;
-}
-else if (size == max_hlist_size) {
-    hlist *tmp = (*end)->prev;
-    tmp->next = NULL;
-    (*end)->next = *begin;
-    (*end)->prev = NULL;
-    *begin = *end;
-    *end = tmp;
-    (*begin)->next->prev = *begin;
-    ret = 0;
-}
-else {
-    hlist *new = malloc(sizeof(hlist));
-    if (!new)
-        return 0;
-    new->next = *begin;
-    new->prev = NULL;
-    *begin = new;
-    (*begin)->next->prev = *begin;
-    ret = 1;
-}
-(*begin)->value = value;
-return ret;
+   if (*begin == NULL) {
+       if ((*begin = malloc(sizeof(hlist))) == NULL)
+           return 0;
+       *end = *begin;
+       (*begin)->next = NULL;
+       (*begin)->prev = NULL;
+       ret = 1;
+   }
+   else if (size == max_hlist_size) {
+       hlist *tmp = (*end)->prev;
+       tmp->next = NULL;
+       (*end)->next = *begin;
+       (*end)->prev = NULL;
+       *begin = *end;
+       *end = tmp;
+       (*begin)->next->prev = *begin;
+       ret = 0;
+   }
+   else {
+       hlist *new = malloc(sizeof(hlist));
+       if (!new)
+           return 0;
+       new->next = *begin;
+       new->prev = NULL;
+       *begin = new;
+       (*begin)->next->prev = *begin;
+       ret = 1;
+   }
+   (*begin)->value = value;
+   return ret;
 }
 
 void free_hlist(hlist *begin) {
-hlist *tmp = begin;
+   hlist *tmp = begin;
 
-while (begin) {
-    tmp = begin->next;
-    free(begin);
-    begin = tmp;
-}
+   while (begin) {
+      tmp = begin->next;
+      free(begin);
+      begin = tmp;
+   }
 }
 
 int get_hlist_average(hlist *begin, int size) {
-unsigned long long avg = 0;
+   unsigned long long avg = 0;
 
-while (begin) {
-    avg += begin->value;
-    begin = begin->next;
-}
-return avg / size;
+   while (begin) {
+      avg += begin->value;
+      begin = begin->next;
+   }
+   return avg / size;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.14/progress.c new/progress-0.15/progress.c
--- old/progress-0.14/progress.c        2018-06-27 18:00:00.000000000 +0200
+++ new/progress-0.15/progress.c        2020-06-08 10:45:33.000000000 +0200
@@ -31,6 +31,7 @@
 #include <stdarg.h>
 #include <assert.h>
 #include <curses.h>
+#include <locale.h>
 
 #include <wordexp.h>
 #include <getopt.h>
@@ -208,6 +209,7 @@
 char exe[MAXPATHLEN + 1];
 ssize_t len;
 int pid_count=0;
+int res;
 
 proc=opendir(PROC_PATH);
 if (!proc) {
@@ -226,7 +228,11 @@
     }
 
     if ((S_ISDIR(stat_buf.st_mode) && is_numeric(direntp->d_name))) {
-        snprintf(fullpath_exe, MAXPATHLEN, "%s/exe", fullpath_dir);
+        res = snprintf(fullpath_exe, MAXPATHLEN, "%s/exe", fullpath_dir);
+        if (res < 0) {
+            fprintf(stderr, "path is too long: %s\n", fullpath_dir);
+            exit(EXIT_FAILURE);
+        }
         len=readlink(fullpath_exe, exe, MAXPATHLEN);
         if (len != -1)
             exe[len] = 0;
@@ -304,6 +310,7 @@
 struct stat stat_buf;
 int count = 0;
 ssize_t len;
+int res;
 
 snprintf(path_dir, MAXPATHLEN, "%s/%d/fd", PROC_PATH, pid);
 
@@ -315,7 +322,11 @@
 }
 
 while ((direntp = readdir(proc)) != NULL) {
-    snprintf(fullpath, MAXPATHLEN, "%s/%s", path_dir, direntp->d_name);
+    res = snprintf(fullpath, MAXPATHLEN, "%s/%s", path_dir, direntp->d_name);
+    if (res < 0) {
+        fprintf(stderr, "path is too long: %s/%s\n", path_dir, 
direntp->d_name);
+        exit(EXIT_FAILURE);
+    }
     if (stat(fullpath, &stat_buf) == -1) {
         if (flag_debug)
             nperror("stat (find_fd_for_pid)");
@@ -701,7 +712,6 @@
 static signed char first_pass = 1;
 
 pid_count = 0;
-
 if (!flag_monitor && !flag_monitor_continuous)
     first_pass = 0;
 
@@ -943,6 +953,7 @@
 // ws.ws_row, ws.ws_col
 ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
 if (flag_monitor || flag_monitor_continuous) {
+    setlocale(LC_CTYPE, "");
     if ((mainwin = initscr()) == NULL ) {
         fprintf(stderr, "Error initialising ncurses.\n");
         exit(EXIT_FAILURE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.14/progress.h new/progress-0.15/progress.h
--- old/progress-0.14/progress.h        2018-06-27 18:00:00.000000000 +0200
+++ new/progress-0.15/progress.h        2020-06-08 10:45:33.000000000 +0200
@@ -25,7 +25,7 @@
 
 #include "hlist.h"
 
-#define PROGRESS_VERSION         "0.14"
+#define PROGRESS_VERSION         "0.15"
 
 #define PROC_PATH       "/proc"
 #define MAX_PIDS        32
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to