Hello community,

here is the log from the commit of package diffstat for openSUSE:Factory 
checked in at 2019-01-03 18:05:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/diffstat (Old)
 and      /work/SRC/openSUSE:Factory/.diffstat.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "diffstat"

Thu Jan  3 18:05:20 2019 rev:28 rq:662193 version:1.62

Changes:
--------
--- /work/SRC/openSUSE:Factory/diffstat/diffstat.changes        2016-02-09 
16:49:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.diffstat.new.28833/diffstat.changes     
2019-01-03 18:05:21.760207846 +0100
@@ -1,0 +2,10 @@
+Mon Dec 31 09:20:21 UTC 2018 - Petr Gajdos <[email protected]>
+
+- Update to 1.62
+  + improve checks for unmodified files when -S and -D options are
+    given.
+  + improve test-packages, to check warning-options.
+  + minor fixes for manpage (Debian #895963)
+  + minor fixes for prefix-stripping with -S option.
+
+-------------------------------------------------------------------

Old:
----
  diffstat-1.61.tgz
  diffstat-1.61.tgz.asc

New:
----
  diffstat-1.62.tgz
  diffstat-1.62.tgz.asc

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

Other differences:
------------------
++++++ diffstat.spec ++++++
--- /var/tmp/diff_new_pack.6DLZ7l/_old  2019-01-03 18:05:22.172207480 +0100
+++ /var/tmp/diff_new_pack.6DLZ7l/_new  2019-01-03 18:05:22.172207480 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package diffstat
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,19 +12,19 @@
 # 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:           diffstat
-Version:        1.61
+Version:        1.62
 Release:        0
 Summary:        Utility That Provides Statistics Based on the Output of diff
 License:        MIT
 Group:          Productivity/Text/Utilities
 Url:            http://dickey.his.com/diffstat/diffstat.html
-Source0:        ftp://invisible-island.net/diffstat/diffstat-%{version}.tgz
-Source1:        ftp://invisible-island.net/diffstat/diffstat-%{version}.tgz.asc
+Source0:        
https://invisible-mirror.net/archives/diffstat/diffstat-%{version}.tgz
+Source1:        
https://invisible-mirror.net/archives/diffstat/diffstat-%{version}.tgz.asc
 Source2:        %{name}.keyring
 Patch0:         %{name}.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ diffstat-1.61.tgz -> diffstat-1.62.tgz ++++++
++++ 9727 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/CHANGES new/diffstat-1.62/CHANGES
--- old/diffstat-1.61/CHANGES   2016-01-14 02:11:58.000000000 +0100
+++ new/diffstat-1.62/CHANGES   2018-08-15 02:36:08.000000000 +0200
@@ -1,4 +1,18 @@
--- $Id: CHANGES,v 1.94 2016/01/14 01:11:58 tom Exp $
+-- $Id: CHANGES,v 1.98 2018/08/15 00:36:08 tom Exp $
+
+2018/08/15 (diffstat 1.62)
+       + improve checks for unmodified files when -S and -D options are
+         given.
+
+       + improve test-packages, to check warning-options.
+
+       + minor fixes for manpage (Debian #895963)
+
+       + update configure macros
+
+       + update config.guess, config.sub
+
+       + minor fixes for prefix-stripping with -S option.
 
 2016/01/14 (diffstat 1.61)
        + add -T option to show amount of changes next to histogram.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/COPYING new/diffstat-1.62/COPYING
--- old/diffstat-1.61/COPYING   2016-01-03 18:45:14.000000000 +0100
+++ new/diffstat-1.62/COPYING   2018-08-15 01:02:14.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright 1994-2015,2016 by Thomas E. Dickey
+Copyright 1994-2016,2018 by Thomas E. Dickey
 All Rights Reserved.
 
 Permission to use, copy, modify, and distribute this software and its
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/COPYING.asc new/diffstat-1.62/COPYING.asc
--- old/diffstat-1.61/COPYING.asc       2016-01-03 18:45:34.000000000 +0100
+++ new/diffstat-1.62/COPYING.asc       2018-08-15 01:02:33.000000000 +0200
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.12 (GNU/Linux)
-Comment: See http://invisible-island.net/public/public.html for info
+Version: GnuPG v1
+Comment: See https://invisible-island.net/public/public.html for info
 
-iEYEABECAAYFAlaJXjoACgkQcCNT4PfkjtvpogCgycNy4AEp4dGgS9XM9jpgHThS
-3lQAoJHdOM/4hpgPiGbItbq3ewrdFSEY
-=UW+O
+iEYEABECAAYFAltzX4UACgkQcCNT4PfkjtvJuwCgnlebYQ1+3nQsUbwf0x+V/lO8
++JUAoNC1Li12OE3RmMMmjSBjknaGx2zL
+=WmrG
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/diffstat.1 new/diffstat-1.62/diffstat.1
--- old/diffstat-1.61/diffstat.1        2016-01-14 10:39:26.000000000 +0100
+++ new/diffstat-1.62/diffstat.1        2018-08-15 02:29:55.000000000 +0200
@@ -1,5 +1,5 @@
 
.\"*****************************************************************************
-.\" Copyright 1994-2014,2016 by Thomas E. Dickey                               
*
+.\" Copyright 1994-2016,2018 by Thomas E. Dickey                               
*
 .\" All Rights Reserved.                                                       
*
 .\"                                                                            
*
 .\" Permission to use, copy, modify, and distribute this software and its      
*
@@ -18,7 +18,11 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 
*
 .\" IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.                
*
 
.\"*****************************************************************************
-.\" $Id: diffstat.1,v 1.35 2016/01/14 09:39:26 tom Exp $
+.\" $Id: diffstat.1,v 1.39 2018/08/15 00:29:55 tom Exp $
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
 .TH DIFFSTAT 1
 .SH NAME
 \fBdiffstat\fP \- make histogram from diff-output
@@ -27,11 +31,18 @@
 .SH DESCRIPTION
 This program reads the output of \fBdiff\fP and displays a histogram
 of the insertions, deletions, and modifications per-file.
-\fBDiffstat\fP is a program that is useful for reviewing large, complex patch 
files.
+\fBDiffstat\fP is a program that is useful for reviewing large,
+complex patch files.
 It reads from one or more input files which contain output from \fBdiff\fP,
 producing a histogram of the total lines changed for each file referenced.
 .PP
-If the input filename ends with .bz2, .gz, .lzma, .z or .Z,
+If the input filename ends with
+\*(``.bz2\*('',
+\*(``.gz\*('',
+\*(``.lzma\*('',
+\*(``.xz\*('',
+\*(``.z\*('' or
+\*(``.Z\*('',
 \fBdiffstat\fP will read the
 uncompressed data via a pipe from the corresponding program.
 It also can infer the compression type from files piped via the standard input.
@@ -79,14 +90,14 @@
 The remainder, after subtracting modified and deleted lines,
 is shown as "unchanged lines".
 .TP
-.BI \-d
+.B \-d
 The debug prints a lot of information.
 It is normally compiled-in, but can be suppressed.
 .TP
 .BI \-e " file"
 redirect standard error to \fIfile\fR.
 .TP
-.BI \-E
+.B \-E
 strip out ANSI escape sequences on each line before parsing the differences.
 This allows \fBdiffstat\fP to be used with \fBcolordiff\fP.
 .TP
@@ -182,7 +193,7 @@
 .B \-R
 Assume patch was created with old and new files swapped.
 .TP
-.BI \-s
+.B \-s
 show only the summary line, e.g., number of insertions and deletions.
 .TP
 .BI \-S " source"
@@ -192,7 +203,8 @@
 .B \-t
 overrides the histogram,
 generates output of comma separated values for the number of
-changed lines found in the differences for each file: inserted, deleted and 
modified.
+changed lines found in the differences for each file:
+inserted, deleted and modified.
 .IP
 If \fB\-S\fP or \fB\-D\fP options are given, the number of unchanged
 lines precedes the number of changes.
@@ -201,7 +213,8 @@
 prints the numbers that the \fB\-t\fP option would show,
 between the pathname and histogram.
 .IP
-The width of the number of changes is determined by the largest value (but at 
least 3).
+The width of the number of changes is determined
+by the largest value (but at least 3).
 The width given in the \fB\-w\fP option is separate from the width of these
 numbers.
 .TP
@@ -248,7 +261,8 @@
 \fBDiffstat\fP is a single binary module, which uses no auxiliary files.
 .SH BUGS
 .PP
-\fBDiffstat\fP makes a lot of assumptions about the format of \fBdiff\fP's 
output.
+\fBDiffstat\fP makes a lot of assumptions
+about the format of \fBdiff\fP's output.
 .PP
 There is no way to obtain a filename from the standard \fBdiff\fP between
 two files with no options.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/diffstat.c new/diffstat-1.62/diffstat.c
--- old/diffstat-1.61/diffstat.c        2016-01-14 01:52:29.000000000 +0100
+++ new/diffstat-1.62/diffstat.c        2018-08-15 03:26:54.000000000 +0200
@@ -1,5 +1,5 @@
 /******************************************************************************
- * Copyright 1994-2015,2016 by Thomas E. Dickey                               *
+ * Copyright 1994-2016,2018 by Thomas E. Dickey                               *
  * All Rights Reserved.                                                       *
  *                                                                            *
  * Permission to use, copy, modify, and distribute this software and its      *
@@ -20,7 +20,7 @@
  
******************************************************************************/
 
 #ifndef        NO_IDENT
-static const char *Id = "$Id: diffstat.c,v 1.61 2016/01/14 00:52:29 tom Exp $";
+static const char *Id = "$Id: diffstat.c,v 1.62 2018/08/15 01:26:54 tom Exp $";
 #endif
 
 /*
@@ -28,6 +28,8 @@
  * Author:     T.E.Dickey
  * Created:    02 Feb 1992
  * Modified:
+ *             14 Aug 2018, revise -S/-D option to improve count of unmodified
+ *                          files.
  *             14 Jan 2016, extend -S option to count unmodified files.
  *                          add -T option to show values with histogram
  *             06 Jul 2015, handle double-quotes, e.g., from diffutils 3.3
@@ -391,6 +393,8 @@
 {2, 1, 6, 4};
 
 static DATA *all_data;
+static char *S_option = 0;
+static char *D_option = 0;
 static const char *comment_opt = "";
 static char *path_opt = 0;
 static int count_files;                /* true if we count added/deleted files 
*/
@@ -451,16 +455,27 @@
     return p;
 }
 
-static mode_t
-get_stat(const char *name)
+static int
+do_stat(const char *name, struct stat *sb)
 {
-    struct stat sb;
     int rc;
+    if (name != 0) {
 #ifdef HAVE_LSTAT
-    rc = lstat(name, &sb);
+       rc = lstat(name, sb);
 #else
-    rc = stat(name, &sb);
+       rc = stat(name, sb);
 #endif
+    } else {
+       rc = -1;
+    }
+    return rc;
+}
+
+static mode_t
+get_stat(const char *name)
+{
+    struct stat sb;
+    int rc = do_stat(name, &sb);
     return ((rc == 0) ? (sb.st_mode & S_IFMT) : 0);
 }
 
@@ -476,10 +491,50 @@
     return get_stat(name) == S_IFREG;
 }
 
+static int
+same_file(const char *source, const char *target)
+{
+    int rc = 0;
+    struct stat ssb;
+    struct stat dsb;
+
+    if (do_stat(source, &ssb) == 0 && S_ISREG(ssb.st_mode)
+       && do_stat(target, &dsb) == 0 && S_ISREG(dsb.st_mode)
+       && ssb.st_size == dsb.st_size) {
+       FILE *ip = fopen(source, "r");
+       if (ip != 0) {
+           FILE *op = fopen(target, "r");
+           if (op != 0) {
+               int a = EOF;
+               int b = EOF;
+               rc = 1;
+               while (1) {
+                   a = fgetc(ip);
+                   b = fgetc(op);
+                   if (a != b) {
+                       rc = 0;
+                       break;
+                   }
+                   if (a == EOF) {
+                       break;
+                   }
+               }
+               if (a != b) {
+                   rc = 0;
+               }
+               fclose(op);
+           }
+           fclose(ip);
+       }
+    }
+    return rc;
+}
+
 static void
 blip(int c)
 {
     if (show_progress) {
+       (void) fflush(stdout);
        (void) fputc(c, stderr);
        (void) fflush(stderr);
     }
@@ -576,7 +631,7 @@
 static DATA *
 find_data(const char *name)
 {
-    DATA *p, *q, *r;
+    DATA *p, *r;
     DATA find;
     int base = 0;
 
@@ -601,6 +656,8 @@
     } else
 #endif
     {
+       DATA *q;
+
        init_data(&find, name, 1, base);
        for (p = all_data, q = 0; p != 0; q = p, p = p->link) {
            int cmp = compare_data(p, &find);
@@ -879,7 +936,6 @@
                   && can_be_merged(source)) {
            size_t len1 = strlen(target);
            size_t len2 = strlen(source);
-           int matched = 0;
            int local = 0;
 
            /*
@@ -915,6 +971,7 @@
             * stripping prefixes from both source/target strings.
             */
            if (prefix_opt < 0) {
+               int matched = 0;
                /*
                 * Now (whether or not we trimmed a suffix), scan back from the
                 * end of source/target strings to find if they happen to share
@@ -1055,10 +1112,11 @@
 dequote(char *s)
 {
     size_t len = strlen(s);
-    int n;
     int delim = (*s == SQUOTE) ? SQUOTE : DQUOTE;
 
     if (*s == delim && len > 2 && s[len - 1] == delim) {
+       int n;
+
        for (n = 0; (s[n] = s[n + 1]) != EOS; ++n) {
            ;
        }
@@ -1107,7 +1165,7 @@
     return (used != 0);
 }
 
-static char *
+static const char *
 data_filename(const DATA * p)
 {
     return p ? (p->name + (prefix_opt >= 0 ? p->base : prefix_len)) : "";
@@ -1117,19 +1175,22 @@
 count_lines2(const char *filename)
 {
     int result = 0;
-    int ch;
     FILE *fp;
 
-    TRACE(("count_lines %s\n", filename));
+    TRACE(("count_lines \"%s\"\n", filename));
+
     if ((fp = fopen(filename, "r")) != 0) {
+       int ch;
+
        result = 0;
        while ((ch = MY_GETC(fp)) != EOF) {
            if (ch == '\n')
                ++result;
        }
-       fclose(fp);
+       (void) fclose(fp);
        TRACE(("->%d lines\n", result));
     } else {
+       (void) fflush(stdout);
        fprintf(stderr, "Cannot open \"%s\"\n", filename);
     }
     return result;
@@ -1143,7 +1204,7 @@
 {
     int result = -1;
     char *filename = 0;
-    char *filetail = data_filename(p);
+    const char *filetail = data_filename(p);
     size_t want = strlen(path_opt) + 2 + strlen(filetail) + strlen(p->name);
 
     if ((filename = malloc(want)) != 0) {
@@ -1151,11 +1212,10 @@
 
        if (path_dest) {
            size_t path_len = strlen(path_opt);
-           size_t tail_len;
            char *tail_sep = strchr(filetail, PATHSEP);
 
            if (tail_sep != 0) {
-               tail_len = (size_t) (tail_sep - filetail);
+               size_t tail_len = (size_t) (tail_sep - filetail);
                if (tail_len != 0 && tail_len <= path_len) {
                    if (tail_len < path_len
                        && path_opt[path_len - tail_len - 1] != PATHSEP) {
@@ -1178,7 +1238,7 @@
            }
        }
        if (!merge) {
-           if (path_opt) {
+           if (!path_opt) {
                strcpy(filename, p->name);
            } else {
                sprintf(filename, "%s%c%s", path_opt, PATHSEP, filetail);
@@ -1207,9 +1267,9 @@
 static void
 finish_chunk(DATA * p)
 {
-    int i;
-
     if (p->pending) {
+       int i;
+
        p->pending = 0;
        p->chunks += 1;
        if (merge_opt) {
@@ -1387,7 +1447,7 @@
                char test_at;
 
                old_unify = new_unify = 0;
-               if (sscanf(buffer, "@@ -%[0-9,] +%[0-9,] @%c",
+               if (sscanf(buffer, "@@ -%80[0-9,] +%80[0-9,] @%c",
                           b_temp1,
                           b_temp2,
                           &test_at) == 3
@@ -1493,7 +1553,7 @@
         */
        if (marker > 0) {
            TRACE(("** have marker=%d, override %s\n", marker, buffer));
-           (void) strncpy(buffer, "***", (size_t) 3);
+           (void) memcpy(buffer, "***", (size_t) 3);
        }
 
        /*
@@ -1819,14 +1879,13 @@
 static long
 plot_num(long num_value, int c, int color, long *extra)
 {
-    long product;
     long result = 0;
 
     /* the value to plot */
     /* character to display in the bar */
     /* accumulated error in the bar */
     if (num_value) {
-       product = (plot_width * num_value);
+       long product = (plot_width * num_value);
        result = ((product + *extra) / plot_scale);
        *extra = product - (result * plot_scale) - *extra;
        plot_bar(result, c, color);
@@ -1843,7 +1902,10 @@
     long want = 0;
     long have = 0;
     long half = (plot_scale / 2);
-    int i, j;
+    int i;
+
+    memset(scaled, 0, sizeof(scaled));
+    memset(remain, 0, sizeof(remain));
 
     for_each_mark(i) {
        long product = (plot_width * num[i]);
@@ -1853,7 +1915,7 @@
        have += product - remain[i];
     }
     while (want > have) {
-       j = -1;
+       int j = -1;
        for_each_mark(i) {
            if (remain[i] != 0
                && (remain[i] > (j >= 0 ? remain[j] : half))) {
@@ -1951,7 +2013,6 @@
 plot_numbers(const DATA * p)
 {
     long temp = 0;
-    long used = 0;
     int i;
 
     printf("%5ld ", TotalOf(p));
@@ -1969,6 +2030,8 @@
            printf("\t%ld %c", p->count[i], marks[i]);
        }
     } else {
+       long used = 0;
+
        switch (round_opt) {
        default:
            for_each_mark(i) {
@@ -2000,7 +2063,7 @@
 static void
 show_data(const DATA * p)
 {
-    char *name = data_filename(p);
+    const char *name = data_filename(p);
     int width;
 
     if (summary_only) {
@@ -2144,12 +2207,13 @@
     DATA *p;
     char *name;
 
-    TRACE(("count_unmodified_files %s\n", pathname));
+    TRACE(("count_unmodified_files \"%s\"\n", pathname));
     if (is_dir(pathname)) {
        DIR *dp = opendir(pathname);
-       struct dirent *de;
 
        if (dp != 0) {
+           struct dirent *de;
+
            while ((de = readdir(dp)) != 0) {
                if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
                    continue;
@@ -2164,51 +2228,68 @@
        }
     } else if (is_file(pathname)) {
        /*
-        * Given the pathname from the (-S) source directory, derive a
-        * corresponding path for the destination directory.  Then check if
+        * Given the pathname from the (-D) source directory, derive a
+        * corresponding path for the source directory.  Then check if
         * that path appears in the list of modified files.
         */
-       int found = 0;
-       const char *ref_name = (all_data ? all_data->name : pathname);
+       const char *ref_name = ((all_data && !unchanged) ? all_data->name : 
pathname);
+       char *source = 0;
 
        if (prefix_opt >= 0) {
            int level_s = count_prefix(path_opt);
            int base_s = 0;
            int base_d = 0;
+
            (void) skip_prefix(pathname, level_s + 1, &base_s);
            (void) skip_prefix(ref_name, level_s + 1, &base_d);
            name = malloc(2 + strlen(pathname) + strlen(ref_name));
            sprintf(name, "%.*s%s", base_d, ref_name, base_s + pathname);
+           source = malloc(strlen(ref_name) + 2 + strlen(pathname) + 
strlen(S_option));
+           sprintf(source, "%s%c%s",
+                   S_option,
+                   PATHSEP,
+                   base_s + pathname);
        } else {
            const char *mark = unchanged ? ref_name : data_filename(all_data);
            int skip = 1 + (int) strlen(path_opt);
+
            name = malloc(strlen(ref_name) + 2 + strlen(pathname));
            sprintf(name, "%.*s%s",
                    (int) (mark - ref_name),
                    ref_name,
                    pathname + skip);
+           source = malloc(strlen(ref_name) + 2 + strlen(pathname) + 
strlen(S_option));
+           sprintf(source, "%s%c%.*s%s",
+                   S_option,
+                   PATHSEP,
+                   (int) (mark - ref_name),
+                   ref_name,
+                   pathname + skip);
        }
-       if (is_file(name)) {
+
+       if (same_file(source, pathname)) {
+           int found = 0;
+
            for (p = all_data; p != 0 && !found; p = p->link) {
                if (!strcmp(name, p->name)) {
                    found = 1;
                }
            }
            if (!found) {
-               int len;
                p = find_data(name);
                *files += 1;
                EqlOf(p) = count_lines(p);
                *lines += EqlOf(p);
 
                if (unchanged) {
-                   len = (int) strlen(p->name);
+                   int len = (int) strlen(p->name);
                    if (min_name_wide < (len - p->base))
                        min_name_wide = (len - p->base);
                }
            }
        }
        free(name);
+       free(source);
     }
 }
 #endif
@@ -2220,7 +2301,7 @@
        if (prefix_len < 0)
            prefix_len = 0;
        if ((longest_name - prefix_len) > min_name_wide)
-           min_name_wide = (longest_name - prefix_len);
+           min_name_wide = (int) (longest_name - prefix_len);
     }
 
     if (min_name_wide < 1)
@@ -2354,9 +2435,9 @@
     update_min_name_wide(longest_name);
 
 #ifdef HAVE_OPENDIR
-    if (path_opt != 0) {
+    if (S_option != 0 && D_option != 0) {
        unchanged = (all_data == 0);
-       count_unmodified_files(path_opt, &files_equal, &total_eql);
+       count_unmodified_files(D_option, &files_equal, &total_eql);
        if (unchanged) {
            for (p = all_data; p; p = p->link) {
                int len = (int) strlen(p->name);
@@ -2557,24 +2638,26 @@
 {
     const char *tmp = getenv("TMPDIR");
     char *result = 0;
-    int ch;
-    FILE *fp;
-
     if (tmp == 0)
        tmp = "/tmp/";
     *dirpath = xmalloc(strlen(tmp) + 12);
 
     strcpy(*dirpath, tmp);
     strcat(*dirpath, "/diffXXXXXX");
+
     if (MY_MKDTEMP(*dirpath) != 0) {
+       FILE *fp;
+
        result = xmalloc(strlen(*dirpath) + 10);
        sprintf(result, "%s/stdin", *dirpath);
 
        if ((fp = fopen(result, "w")) != 0) {
+           int ch;
+
            while ((ch = MY_GETC(stdin)) != EOF) {
                fputc(ch, fp);
            }
-           fclose(fp);
+           (void) fclose(fp);
        } else {
            free(result);
            result = 0;
@@ -2599,6 +2682,7 @@
        if (is_dir(path_opt)) {
            num_marks = 4;
        } else {
+           (void) fflush(stdout);
            fprintf(stderr, "Not a directory:%s\n", path_opt);
            exit(EXIT_FAILURE);
        }
@@ -2679,6 +2763,7 @@
     char *next = 0;
     long value = strtol(optarg, &next, 0);
     if (next == 0 || *next != '\0') {
+       (void) fflush(stdout);
        fprintf(stderr, "expected a number, have '%s'\n", optarg);
        exit(EXIT_FAILURE);
     }
@@ -2712,7 +2797,7 @@
            break;
 #endif
        case 'D':
-           set_path_opt(optarg, 1);
+           D_option = optarg;
            break;
        case 'e':
            if (freopen(optarg, "w", stderr) == 0)
@@ -2762,7 +2847,7 @@
            summary_only = 1;
            break;
        case 'S':
-           set_path_opt(optarg, 0);
+           S_option = optarg;
            break;
        case 't':
            table_opt = 1;
@@ -2799,6 +2884,10 @@
      * The numbers from -S/-D options will only be useful if the merge option
      * is added.
      */
+    if (S_option)
+       set_path_opt(S_option, 0);
+    if (D_option)
+       set_path_opt(D_option, 1);
     if (path_opt)
        merge_opt = 1;
 
@@ -2818,6 +2907,7 @@
            if (command != 0) {
                if ((fp = popen(command, "r")) != 0) {
                    if (show_progress) {
+                       (void) fflush(stdout);
                        (void) fprintf(stderr, "%s\n", name);
                        (void) fflush(stderr);
                    }
@@ -2829,6 +2919,7 @@
 #endif
            if ((fp = fopen(name, "rb")) != 0) {
                if (show_progress) {
+                   (void) fflush(stdout);
                    (void) fprintf(stderr, "%s\n", name);
                    (void) fflush(stderr);
                }
@@ -2840,14 +2931,12 @@
        }
     } else {
 #ifdef HAVE_POPEN
-       FILE *fp;
        Decompress which = dcEmpty;
        char *stdin_dir = 0;
        char *myfile;
        char sniff[8];
        int ch;
        unsigned got = 0;
-       char *command;
 
        if ((ch = MY_GETC(stdin)) != EOF) {
            which = dcNone;
@@ -2916,6 +3005,8 @@
        if (which != dcNone
            && which != dcEmpty
            && (myfile = copy_stdin(&stdin_dir)) != 0) {
+           FILE *fp;
+           char *command;
 
            /* open pipe to decompress temporary file */
            command = decompressor(which, myfile);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/makefile.in new/diffstat-1.62/makefile.in
--- old/diffstat-1.61/makefile.in       2015-07-07 01:23:30.000000000 +0200
+++ new/diffstat-1.62/makefile.in       2018-08-15 02:55:15.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: makefile.in,v 1.34 2015/07/06 23:23:30 tom Exp $
+# $Id: makefile.in,v 1.35 2018/08/15 00:55:15 tom Exp $
 # Makefile-template for 'diffstat'
 
 THIS           = diffstat
@@ -23,6 +23,7 @@
 INSTALL_DATA   = @INSTALL_DATA@
 
 LINT           = @LINT@
+LINTOPTS       = @LINT_OPTS@
 CTAGS          = @CTAGS@
 ETAGS          = @ETAGS@
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/package/debian/changelog 
new/diffstat-1.62/package/debian/changelog
--- old/diffstat-1.61/package/debian/changelog  2016-01-06 01:51:23.000000000 
+0100
+++ new/diffstat-1.62/package/debian/changelog  2018-08-15 02:41:39.000000000 
+0200
@@ -1,3 +1,9 @@
+diffstat (1.62) unstable; urgency=low
+
+  * maintenance updates
+
+ -- Thomas E. Dickey <[email protected]>  Tue, 14 Aug 2018 20:24:27 
-0400
+
 diffstat (1.61) unstable; urgency=low
 
   * maintenance updates
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/package/debian/control 
new/diffstat-1.62/package/debian/control
--- old/diffstat-1.61/package/debian/control    2012-01-09 02:38:51.000000000 
+0100
+++ new/diffstat-1.62/package/debian/control    2018-08-15 20:53:24.000000000 
+0200
@@ -1,7 +1,7 @@
 Source: diffstat
 Maintainer: Thomas E. Dickey <[email protected]>
 Section: devel
-Priority: extra
+Priority: optional
 Standards-Version: 3.8.4
 Build-Depends: debhelper (>= 5)
 Homepage: http://invisible-island.net/diffstat/
@@ -10,6 +10,6 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: produces graph of changes introduced by a diff between files.
- Diffstat is is useful for reviewing large, complex patch files.  It reads from
+ Diffstat is useful for reviewing large, complex patch files.  It reads from
  one or more input files which contain output from diff, producing a histogram
  of the total lines changed for each file referenced.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/package/debian/copyright 
new/diffstat-1.62/package/debian/copyright
--- old/diffstat-1.61/package/debian/copyright  2016-01-06 01:51:23.000000000 
+0100
+++ new/diffstat-1.62/package/debian/copyright  2018-08-15 02:37:15.000000000 
+0200
@@ -1,7 +1,7 @@
 Upstream source http://invisible-island.net/diffstat/diffstat.html
 
 /******************************************************************************
- * Copyright 1994-2015,2016 by Thomas E. Dickey                               *
+ * Copyright 1994-2016,2018 by Thomas E. Dickey                               *
  * All Rights Reserved.                                                       *
  *                                                                            *
  * Permission to use, copy, modify, and distribute this software and its      *
@@ -25,7 +25,7 @@
 
 Files: aclocal.m4
 Licence: other-BSD
-Copyright:  2003-2015,2016 by Thomas E. Dickey
+Copyright:  2003-2016,2018 by Thomas E. Dickey
     Permission is hereby granted, free of charge, to any person obtaining a
     copy of this software and associated documentation files (the
     "Software"), to deal in the Software without restriction, including
@@ -86,7 +86,7 @@
     shared with many OS's install programs.
 
 Files: debian/*
-Copyright:  2010-2015,2016 Thomas E. Dickey
+Copyright:  2010-2016,2018 Thomas E. Dickey
 Licence: other-BSD
     Permission to use, copy, modify, and distribute this software and its
     documentation for any purpose and without fee is hereby granted,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/package/debian/rules new/diffstat-1.62/package/debian/rules
--- old/diffstat-1.61/package/debian/rules      2010-07-16 01:44:46.000000000 
+0200
+++ new/diffstat-1.62/package/debian/rules      2018-08-15 01:04:47.000000000 
+0200
@@ -1,5 +1,5 @@
 #!/usr/bin/make -f
-# MAde with the aid of dh_make, by Craig Small
+# Made with the aid of dh_make, by Craig Small
 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
 # Some lines taken from debmake, by Cristoph Lameter.
 
@@ -11,7 +11,9 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS =
+CPPFLAGS       := $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS         := $(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS                := $(shell dpkg-buildflags --get LDFLAGS)
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         CFLAGS += -O0
@@ -27,7 +29,10 @@
 configure-stamp:
        dh_testdir
 
-       CFLAGS="$(CFLAGS)" ./configure \
+       CPPFLAGS="$(CPPFLAGS)" \
+       CFLAGS="$(CFLAGS)" \
+       LDFLAGS="$(LDFLAGS)" \
+       ./configure \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/usr \
@@ -76,6 +81,7 @@
 binary-arch: build install
        dh_testdir
        dh_testroot
+       dh_lintian
        dh_installdocs
        dh_installexamples
        dh_installchangelogs CHANGES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/diffstat-1.61/package/diffstat.spec new/diffstat-1.62/package/diffstat.spec
--- old/diffstat-1.61/package/diffstat.spec     2016-01-06 01:51:23.000000000 
+0100
+++ new/diffstat-1.62/package/diffstat.spec     2018-08-15 02:35:51.000000000 
+0200
@@ -1,7 +1,7 @@
 Summary:  diffstat - make histogram from diff-output
 %define AppProgram diffstat
-%define AppVersion 1.61
-# $XTermId: diffstat.spec,v 1.10 2016/01/06 00:51:23 tom Exp $
+%define AppVersion 1.62
+# $XTermId: diffstat.spec,v 1.13 2018/08/15 00:35:51 tom Exp $
 Name: %{AppProgram}
 Version: %{AppVersion}
 Release: 1
@@ -25,12 +25,12 @@
 %build
 
 INSTALL_PROGRAM='${INSTALL}' \
-       ./configure \
-               --target %{_target_platform} \
-               --prefix=%{_prefix} \
-               --bindir=%{_bindir} \
-               --libdir=%{_libdir} \
-               --mandir=%{_mandir}
+%configure \
+  --target %{_target_platform} \
+  --prefix=%{_prefix} \
+  --bindir=%{_bindir} \
+  --libdir=%{_libdir} \
+  --mandir=%{_mandir}
 
 make
 
@@ -52,5 +52,8 @@
 %changelog
 # each patch should add its ChangeLog entries here
 
+* Wed Aug 15 2018 Thomas Dickey
+- use recommended compiler-flags
+
 * Thu Jul 15 2010 Thomas Dickey
 - initial version



Reply via email to