Hello community,

here is the log from the commit of package xprop for openSUSE:Factory checked 
in at 2020-11-23 16:39:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xprop (Old)
 and      /work/SRC/openSUSE:Factory/.xprop.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xprop"

Mon Nov 23 16:39:10 2020 rev:9 rq:849638 version:1.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/xprop/xprop.changes      2019-03-12 
09:49:56.327579634 +0100
+++ /work/SRC/openSUSE:Factory/.xprop.new.5913/xprop.changes    2020-11-23 
19:08:22.858434349 +0100
@@ -1,0 +2,15 @@
+Fri Nov 20 10:57:17 UTC 2020 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 1.2.5
+  * Add missing `-help` function
+  * Make output with unknown width terminal the same as old code
+  * Free string list returned from XmbTextPropertyToTextList
+  * Correct icon buffer width computation for truecolor terminals
+  * Check return value from ioctl(TIOCGWINSZ)
+  * Don't display icons if they would line-wrap.
+  * Break down memory allocation logic and fix overallocating for UTF8.
+  * Fix aspect ratio for icon display by using two characters per icon pixel.
+  * Support true color output for icons if the terminal advertises it.
+  * Fix formatting of back-to-back not shown icons.
+
+-------------------------------------------------------------------

Old:
----
  xprop-1.2.4.tar.bz2

New:
----
  xprop-1.2.5.tar.bz2

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

Other differences:
------------------
++++++ xprop.spec ++++++
--- /var/tmp/diff_new_pack.kIqUR3/_old  2020-11-23 19:08:23.398434890 +0100
+++ /var/tmp/diff_new_pack.kIqUR3/_new  2020-11-23 19:08:23.402434895 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package xprop
 #
-# Copyright (c) 2019 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,17 +12,17 @@
 # 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:           xprop
-Version:        1.2.4
+Version:        1.2.5
 Release:        0
 Summary:        Property displayer for X
 License:        MIT
 Group:          System/X11/Utilities
-Url:            http://xorg.freedesktop.org/
+URL:            http://xorg.freedesktop.org/
 Source0:        
http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(x11)

++++++ xprop-1.2.4.tar.bz2 -> xprop-1.2.5.tar.bz2 ++++++
++++ 4125 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/xprop-1.2.4/ChangeLog new/xprop-1.2.5/ChangeLog
--- old/xprop-1.2.4/ChangeLog   2019-03-10 05:45:03.000000000 +0100
+++ new/xprop-1.2.5/ChangeLog   2020-11-20 02:01:28.000000000 +0100
@@ -1,3 +1,116 @@
+commit ec5aeaddddec4b4bdb532451f5a2bc8e3b7148a9
+Author: Keith Packard <kei...@keithp.com>
+Date:   Thu Nov 19 16:24:50 2020 -0800
+
+    xprop 1.2.5
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit 09f145bcf13a08a05daf85f75444741ffb78a2bb
+Author: Keith Packard <kei...@keithp.com>
+Date:   Tue Nov 17 15:22:49 2020 -0800
+
+    Check return value from ioctl(TIOCGWINSZ)
+    
+    Make sure the function succeeded before looking at the return value.
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit 95025ea167d87998ef0bd3ed25dfaa2c179cf712
+Author: Keith Packard <kei...@keithp.com>
+Date:   Tue Nov 17 15:19:46 2020 -0800
+
+    Correct icon buffer width computation for truecolor terminals
+    
+    Fix the test when computing size necessary for true color output to
+    use 'is_truecolor_term' instead of 'is_utf8_locale'. A non-utf8 locale
+    with a true color terminal would have under-allocated the
+    buffer. Also, check for truecolor first to match the output code.
+    
+    This doesn't fix the fact that this code over-allocates by a factor of
+    two in this case, but that at least won't cause memory corruption.
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit 706ed45e0b58219bc623b8c5f963777a120d2844
+Author: Keith Packard <kei...@keithp.com>
+Date:   Tue Nov 17 15:18:46 2020 -0800
+
+    Free string list returned from XmbTextPropertyToTextList
+    
+    Make sure we clean up after this call by using the XFreeStringList
+    function.
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit a30ed360fe56a556072e1fc551ffbe6797642227
+Author: Keith Packard <kei...@keithp.com>
+Date:   Tue Nov 17 15:16:00 2020 -0800
+
+    Make output with unknown width terminal the same as old code
+    
+    Auto-detecting the terminal width and eliding icons that are too wide
+    is a nice new feature, but we shouldn't change the behaviour when that
+    width is not detectable (e.g., when output to a file). Change the
+    default terminal width from 80 to 144 + 8 to get back to the previous
+    output format.
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit 2c753b5c1622afa662a4f4334dd947667f37a803
+Author: Pierre-Loup A. Griffais <g...@plagman.net>
+Date:   Sat Jun 6 15:31:34 2020 -0700
+
+    Fix formatting of back-to-back not shown icons.
+    
+    Otherwise looks like this:
+    
+    Icon (48 x 48):
+    (not shown)     Icon (64 x 64):
+    (not shown)     Icon (128 x 128):
+    (not shown)
+
+commit d41b28bfa8f5bf5155082167fb004e3c709b52ae
+Author: Pierre-Loup A. Griffais <g...@plagman.net>
+Date:   Sat Jun 6 15:19:10 2020 -0700
+
+    Support true color output for icons if the terminal advertises it.
+
+commit e25ae1d9b03a84c3ca825745156af2a7045f04e5
+Author: Pierre-Loup A. Griffais <g...@plagman.net>
+Date:   Sat Jun 6 15:12:07 2020 -0700
+
+    Fix aspect ratio for icon display by using two characters per icon pixel.
+
+commit 33042c835583b77c31f38f33e5560e596a416662
+Author: Pierre-Loup A. Griffais <g...@plagman.net>
+Date:   Sat Jun 6 15:03:08 2020 -0700
+
+    Break down memory allocation logic and fix overallocating for UTF8.
+    
+    We need up to 3 bytes per character in UTF8 mode, not 4.
+
+commit 540c5674722c1f569e9089db14ef07554ef48c16
+Author: Pierre-Loup A. Griffais <g...@plagman.net>
+Date:   Sat Jun 6 14:45:25 2020 -0700
+
+    Don't display icons if they would line-wrap.
+    
+    Assuming we can query the terminal width.
+
+commit 632461227686bb31004fd9cf823bcf1645e7a563
+Author: Jason Nader <jason.na...@protonmail.com>
+Date:   Sat Apr 11 22:29:47 2020 +0900
+
+    Add missing `-help` function
+    
+    `-help` is mentioned in the manpages, but actually running `xprop -help`
+    results in xprop exiting with status 1 as it doesn't recognise the option.
+    This has been the source of major confusion here:
+    https://github.com/franciscolourenco/done/issues/77#issuecomment-612404448
+    
+    Signed-off-by: Jason Nader <jason.na...@protonmail.com>
+
 commit e81642bacc58388c223bc157f37c2311a7dbe070
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Sat Mar 9 20:31:09 2019 -0800
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/xprop-1.2.4/README.md new/xprop-1.2.5/README.md
--- old/xprop-1.2.4/README.md   2019-03-10 05:44:53.000000000 +0100
+++ new/xprop-1.2.5/README.md   2020-11-20 02:01:24.000000000 +0100
@@ -1,18 +1,29 @@
+= xprop
+
 xprop is a command line tool to display and/or set window and font
 properties of an X server.
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
 
-  https://lists.x.org/mailman/listinfo/xorg
+ * https://lists.x.org/mailman/listinfo/xorg
 
 The master development code repository can be found at:
 
-  https://gitlab.freedesktop.org/xorg/app/xprop
+ * https://gitlab.freedesktop.org/xorg/app/xprop
 
 Please submit bug reports and requests to merge patches there.
 
 For patch submission instructions, see:
 
-  https://www.x.org/wiki/Development/Documentation/SubmittingPatches
+ * https://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+== Release 1.2.5
+
+Xprop version 1.2.5 contains two changes:
+
+ 1. Handle -help command line argument. Thanks to Jason Nader for
+    this.
 
+ 2. Improvements to icon image display. Thanks to Pierre-Loup
+    A. Griffais for these.
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/xprop-1.2.4/compile new/xprop-1.2.5/compile
--- old/xprop-1.2.4/compile     2019-03-10 05:44:57.000000000 +0100
+++ new/xprop-1.2.5/compile     2020-11-20 02:01:25.000000000 +0100
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -67,7 +67,7 @@
        mingw/*)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin/*)
+       cygwin/* | msys/*)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine/*)
@@ -255,7 +255,8 @@
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -339,9 +340,9 @@
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
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/xprop-1.2.4/configure.ac new/xprop-1.2.5/configure.ac
--- old/xprop-1.2.4/configure.ac        2019-03-10 05:44:53.000000000 +0100
+++ new/xprop-1.2.5/configure.ac        2020-11-20 02:01:24.000000000 +0100
@@ -22,7 +22,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([xprop], [1.2.4],
+AC_INIT([xprop], [1.2.5],
         [https://gitlab.freedesktop.org/xorg/app/xprop/issues], [xprop])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
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/xprop-1.2.4/missing new/xprop-1.2.5/missing
--- old/xprop-1.2.4/missing     2019-03-10 05:44:57.000000000 +0100
+++ new/xprop-1.2.5/missing     2020-11-20 02:01:25.000000000 +0100
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,9 +207,9 @@
 exit $st
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
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/xprop-1.2.4/xprop.c new/xprop-1.2.5/xprop.c
--- old/xprop-1.2.4/xprop.c     2019-03-10 05:44:53.000000000 +0100
+++ new/xprop-1.2.5/xprop.c     2020-11-20 02:01:24.000000000 +0100
@@ -33,6 +33,7 @@
 #include <X11/Xos.h>
 #include <X11/Xfuncs.h>
 #include <X11/Xutil.h>
+#include <sys/ioctl.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
@@ -65,6 +66,8 @@
 /* isprint() in "C" locale */
 #define c_isprint(c) ((c) >= 0x20 && (c) < 0x7f)
 
+static int term_width = 144 + 8;
+
 /*
  *
  * The Thunk Manager - routines to create, add to, and free thunk lists
@@ -748,6 +751,17 @@
 #endif
 }
 
+static int
+is_truecolor_term (void)
+{
+    char *colorterm = getenv( "COLORTERM" );
+
+    if (colorterm && !strcmp(colorterm,"truecolor"))
+       return 1;
+
+    return 0;
+}
+
 static const char *
 Format_Icons (const unsigned long *icon, int len)
 {
@@ -763,17 +777,29 @@
 
     while (icon < end)
     {
-       unsigned long width, height;
+       unsigned long width, height, display_width;
+       unsigned int icon_pixel_bytes;
+       unsigned int icon_line_bytes;
        int w, h;
        int offset;
        
        width = *icon++;
        height = *icon++;
+       display_width = width * 2; /* Two characters per icon pixel. */
+
+       icon_pixel_bytes = 1;
+       if (is_truecolor_term())
+           icon_pixel_bytes = 25; /* 16 control characters, and up to 9 chars 
of RGB. */
+       else if (is_utf8_locale())
+           icon_pixel_bytes = 3; /* Up to 3 bytes per character in that mode. 
*/
+
+       /* Initial tab, pixels, and newline. */
+       icon_line_bytes = 8 + display_width * icon_pixel_bytes + 1;
 
        offset = (tail - result);
        
-       alloced += 80;                          /* For the header */
-       alloced += (width*4 + 8) * height;      /* For the rows (plus padding) 
*/
+       alloced += 80;                          /* For the header, final 
newline, color reset */
+       alloced += icon_line_bytes * height;    /* For the rows */
        
        result = realloc (result, alloced);
        if (!result)
@@ -785,9 +811,9 @@
 
        tail += sprintf (tail, "\tIcon (%lu x %lu):\n", width, height);
 
-       if (width > 144 || height > 144)
+       if ((display_width + 8) > term_width || height > 144)
        {
-           tail += sprintf (tail, "\t(not shown)");
+           tail += sprintf (tail, "\t(not shown)\n");
            icon += width * height;
            continue;
        }
@@ -812,7 +838,17 @@
                                           (587 * (g / 255.0)) +
                                           (114 * (b / 255.0))));
 
-               if (is_utf8_locale())
+               if (is_truecolor_term())
+               {
+                   float opacity = a / 255.0;
+
+                   r = r * opacity;
+                   g = g * opacity;
+                   b = b * opacity;
+
+                   tail += sprintf (tail, 
"\033[38;2;%d;%d;%dm\342\226\210\342\226\210", r, g, b );
+               }
+               else if (is_utf8_locale())
                {
                    static const char palette[][4] =
                    {
@@ -826,7 +862,7 @@
 
                    idx = (brightness * ((sizeof (palette)/sizeof(palette[0])) 
- 1)) / 1000;
 
-                   tail += sprintf (tail, "%s", palette[idx]);
+                   tail += sprintf (tail, "%s%s", palette[idx], palette[idx]);
                }
                else
                {
@@ -837,12 +873,17 @@
                    idx = (brightness * (sizeof(palette) - 2)) / 1000;
                    
                    *tail++ = palette[idx];
+                   *tail++ = palette[idx];
                }
            }
 
            tail += sprintf (tail, "\n");
        }
 
+       /* Reset colors. */
+       if (is_truecolor_term())
+           tail += sprintf (tail, "\033[0m");
+
        tail += sprintf (tail, "\n");
     }
 
@@ -853,7 +894,7 @@
 Format_Len_Text (const char *string, int len, Atom encoding)
 {
     XTextProperty textprop;
-    char **list;
+    char **list, **start_list;
     int count;
 
     /* Try to convert to local encoding. */
@@ -861,7 +902,8 @@
     textprop.format = 8;
     textprop.value = (unsigned char *) string;
     textprop.nitems = len;
-    if (XmbTextPropertyToTextList(dpy, &textprop, &list, &count) == Success) {
+    if (XmbTextPropertyToTextList(dpy, &textprop, &start_list, &count) == 
Success) {
+       list = start_list;
        _buf_ptr = _formatting_buffer;
        _buf_len = MAXSTR;
        *_buf_ptr++ = '"';
@@ -895,6 +937,7 @@
                _buf_len -= 4;
            }
        }
+       XFreeStringList(start_list);
        *_buf_ptr++ = '"';
        *_buf_ptr++ = '\0';
        return _formatting_buffer;
@@ -1772,10 +1815,11 @@
  */
 
 void
-usage (const char *errmsg)
+print_help (void)
 {
     static const char *help_message =
 "where options include:\n"
+"    -help                          print out a summary of command line 
options\n"
 "    -grammar                       print out full grammar for command line\n"
 "    -display host:dpy              the X server to contact\n"
 "    -id id                         resource id of window to examine\n"
@@ -1795,13 +1839,24 @@
 
     fflush (stdout);
 
-    if (errmsg != NULL)
-       fprintf (stderr, "%s: %s\n\n", program_name, errmsg);
-
     fprintf (stderr,
             "usage:  %s [-options ...] [[format [dformat]] atom] ...\n\n", 
             program_name);
     fprintf (stderr, "%s\n", help_message);
+}
+
+void help (void) {
+       print_help();
+       exit(0);
+}
+
+void
+usage (const char *errmsg)
+{
+    if (errmsg != NULL)
+       fprintf (stderr, "%s: %s\n\n", program_name, errmsg);
+
+    print_help();
     exit (1);
 }
 
@@ -1888,6 +1943,13 @@
     int n;
     char **nargv;
 
+#ifdef TIOCGWINSZ
+    struct winsize ws;
+    ws.ws_col = 0;
+    if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0)
+       term_width = ws.ws_col;
+#endif
+
     INIT_NAME;
 
     /* Set locale for XmbTextProptertyToTextList and iswprint(). */
@@ -1918,6 +1980,10 @@
     while (argv++, --argc>0 && **argv == '-') {
        if (!strcmp(argv[0], "-"))
            continue;
+       if (!strcmp(argv[0], "-help")) {
+           help ();
+           /* NOTREACHED */
+       }
        if (!strcmp(argv[0], "-grammar")) {
            grammar ();
            /* NOTREACHED */
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to