Hello community,

here is the log from the commit of package sigrok-cli for openSUSE:Factory 
checked in at 2017-08-12 20:24:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sigrok-cli (Old)
 and      /work/SRC/openSUSE:Factory/.sigrok-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sigrok-cli"

Sat Aug 12 20:24:20 2017 rev:4 rq:503726 version:0.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/sigrok-cli/sigrok-cli.changes    2016-02-17 
12:24:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sigrok-cli.new/sigrok-cli.changes       
2017-08-12 20:24:21.687916204 +0200
@@ -1,0 +2,16 @@
+Tue Jun 13 20:46:02 UTC 2017 - stefan.bru...@rwth-aachen.de
+
+- update to version 0.7.0
+  * Update sigrok-cli to new APIs libsigrok/libsigrokdecode APIs
+  * -P <decoder> --show:
+    - List the binary output classes of the decoder.
+    - List the possible input and output IDs of the decoder.
+  * --help:
+    - Clarify that --show also lists input/output format options,
+      as well as protocol decoder options (bug #851).
+    - Show a few typical invocations of e.g. --samples/--time/--continuous.
+  * Add an -L|--list-supported option; this used to be part of -V (bug #604).
+  * Drop the superfluous -S|--protocol-decoder-stack option.
+  * Allow multiple -P options to decode multiple stacks (bug #868).
+
+-------------------------------------------------------------------

Old:
----
  sigrok-cli-0.6.0.tar.gz

New:
----
  sigrok-cli-0.7.0.tar.gz

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

Other differences:
------------------
++++++ sigrok-cli.spec ++++++
--- /var/tmp/diff_new_pack.zBBEOc/_old  2017-08-12 20:24:22.503801873 +0200
+++ /var/tmp/diff_new_pack.zBBEOc/_new  2017-08-12 20:24:22.511800752 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package sigrok-cli
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -21,14 +21,14 @@
 Group:          Productivity/Scientific/Electronics
 
 Name:           sigrok-cli
-Version:        0.6.0
+Version:        0.7.0
 Release:        0
 Url:            http://sigrok.org
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  glib2-devel
-BuildRequires:  libsigrok-devel >= 0.3.0
-BuildRequires:  libsigrokdecode-devel >= 0.3.0
+BuildRequires:  libsigrok-devel >= 0.4.0
+BuildRequires:  libsigrokdecode-devel >= 0.4.0
 BuildRequires:  libtool
 Source0:        
http://sigrok.org/download/source/sigrok-cli/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ sigrok-cli-0.6.0.tar.gz -> sigrok-cli-0.7.0.tar.gz ++++++
++++ 1903 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/sigrok-cli-0.6.0/ChangeLog new/sigrok-cli-0.7.0/ChangeLog
--- old/sigrok-cli-0.6.0/ChangeLog      2016-01-29 23:58:04.000000000 +0100
+++ new/sigrok-cli-0.7.0/ChangeLog      2017-06-12 03:48:41.000000000 +0200
@@ -1,3 +1,315 @@
+commit f21b76181d6a2549ce1ddfb30bffa95ec436b054
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Thu Jun 8 20:28:02 2017 +0200
+
+    NEWS: Update for upcoming 0.7.0 release.
+
+commit 81f781288ab8ce19c46d2f090a16428d28fe0435
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Thu Jun 8 23:16:18 2017 +0200
+
+    Fix various clang warnings.
+    
+    ../show.c:668:30: warning: variable 'q' is uninitialized when used here 
[-Wuninitialized]
+                                            s = sr_period_string(p, q);
+                                                                    ^
+    ../show.c:324:30: note: initialize the variable 'q' to silence this warning
+            const uint64_t *uint64, p, q, low, high;
+                                        ^
+                                         = 0
+    ../show.c:668:27: warning: variable 'p' is uninitialized when used here 
[-Wuninitialized]
+                                            s = sr_period_string(p, q);
+                                                                 ^
+    ../show.c:324:27: note: initialize the variable 'p' to silence this warning
+            const uint64_t *uint64, p, q, low, high;
+                                     ^
+                                      = 0
+    ../show.c:458:58: warning: variable 'high' is uninitialized when used here 
[-Wuninitialized]
+                                    printf("    Maximum number of samples: 
%"PRIu64"\n", high);
+                                                                               
          ^~~~
+    ../show.c:324:41:   CC       input.o
+    note: initialize the variable 'high' to silence this warning
+            const uint64_t *uint64, p, q, low, high;
+                                                   ^
+                                                    = 0
+    ../show.c:589:33: warning: variable 'low' is uninitialized when used here 
[-Wuninitialized]
+                                    printf("%"PRIu64"-%"PRIu64, low, high);
+                                                                ^~~
+    ../show.c:324:35: note: initialize the variable 'low' to silence this 
warning
+            const uint64_t *uint64, p, q, low, high;
+                                             ^
+                                              = 0
+
+commit 198182cc092b56a005e8990057bffb99794ec797
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Tue Jun 6 14:45:37 2017 +0200
+
+    HACKING: Update URL to Linux kernel coding style.
+
+commit 7930408d655ee55d4aee839eb8feee707d9e5843
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Tue Jun 6 14:05:12 2017 +0200
+
+    README: Drop trailing whitespace.
+
+commit 3f85a61849759896e0e9b009be14a696108d4309
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Tue Jun 6 11:15:45 2017 +0200
+
+    Fix build when using --without-libsigrokdecode.
+
+commit 443ccd3c3adf2db300afa0a8e23b1c6a89aa0727
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Mon Jun 5 17:43:32 2017 +0200
+
+    Installer: Whitespace consistency fixes.
+
+commit d8f647c4c1181fbab1e8bb35834b1b3b20af482a
+Author: Soeren Apel <soe...@apelpie.net>
+Date:   Mon Jun 5 17:16:30 2017 +0200
+
+    Installer: Add "sigrok-cli" to uninstaller/Zadig links.
+    
+    Windows 10 merges all links of the same vendor ("sigrok" here) into one
+    section in the Start menu. If PulseView and sigrok-cli are installed,
+    there will be two "Uninstall" links and the user will not know which one
+    uninstalls which program.
+
+commit a663411b8f15f3933caa0629414cf5b994f299c4
+Author: Soeren Apel <soe...@apelpie.net>
+Date:   Mon Jun 5 17:13:21 2017 +0200
+
+    Installer: Place set of example .sr files in separate section
+
+commit b5e7f00b51b0cf5dfda10717202f6fa12611d0d9
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Sat Jun 3 17:17:04 2017 +0200
+
+    --list-supported: Show detailed library/feature info.
+
+commit 6293db8aea090170eced25d6f92c348b013ea475
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Sat Jun 3 17:03:44 2017 +0200
+
+    List supported devices, modules, decoders via --list-supported.
+    
+    Move this data from -V to -L|--list-supported for usability reasons.
+    
+    This fixes bug #604.
+
+commit 247d467ad9b9a68f9c5cdd39b272b7879b3a3f0f
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Wed May 31 23:09:57 2017 +0200
+
+    Bump requirements to libsigrok/libsigrokdecode 0.5.0.
+    
+    We use various new API calls from the upcoming 0.5.0 releases and are
+    not compatible with the respective 0.4.x anymore.
+
+commit 2b5d1ae678011075ca0413d36395313f7f001f26
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Wed May 31 23:00:39 2017 +0200
+
+    show: Also print the possible decoder input/output IDs.
+
+commit 65c1ecf9045a87cfd87e0c7d87bf3ca2d7e60021
+Author: Gerhard Sittig <gerhard.sit...@gmx.net>
+Date:   Tue May 23 19:41:41 2017 +0200
+
+    options: expand builtin help, discuss samples/time/continuous constraint
+    
+    It might be surprising when the sigrok-cli(1) program does nothing (yet
+    spends user noticable time) before quitting while it spews the --help
+    text to the screen. Expand the builtin help text, explicitly mention
+    that either of --samples or --frames or --time or --continuous are
+    essentially required for data acquisition.
+
+commit 87cb3b61d72f430479bb5fdfd3c0c909f3ac899e
+Author: Soeren Apel <soe...@apelpie.net>
+Date:   Sat Feb 25 22:56:36 2017 +0100
+
+    Update sr_period_string usage
+
+commit 9d94914ce9de358085ffaef85cd152d0dbd95155
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Sun Mar 5 17:08:54 2017 +0100
+
+    configure summary: Show linker flags.
+
+commit 10d4fc25bfd67dbd7b457851d6c8a1dc8b031b39
+Author: Karl Palsson <ka...@etactica.com>
+Date:   Tue Nov 29 16:21:30 2016 +0000
+
+    Show annotations based on decoder ID
+    
+    Originally, decoder ID was equal to decoder instance ID, so it didn't
+    matter what you were comparing with. However, with distinct decoder
+    instances, this assumption fails. Because instance IDs can't be known
+    in advance, and because it would make the CLI arguments even more
+    complex, we simply let the -A option continue to be per decoder, not per
+    instance. This maintains compatibility with prior behaviour, but
+    doesn't allow the full flexibility possible with the library.
+    
+    Behaviour preserved:
+    Single PD, no -A flag => all annotations from PD
+    Single PD, -A pdid => all annotations from PD
+    Single PD, -A pdid=annX => annX from PD
+    
+    Behaviour now added:
+    Duplicate PDs, no -A flag => all annotations from all PDs
+    Duplicate PDs, -A pdid => all annotations from all PDs of type pdid
+    Duplicate PDs, -A pdid=annX => all annX from all PDs of type pdid
+    
+    This fixes parts of bug #868.
+    
+    Signed-off-by: Karl Palsson <ka...@etactica.com>
+
+commit c5e0e72ee3bcc799d1510c9fb91b3a0073766b2a
+Author: Karl Palsson <ka...@etactica.com>
+Date:   Tue Nov 29 14:32:29 2016 +0000
+
+    valgrind: Clear more unfreed memory issues
+    
+    Command line used for checking:
+    
+      $ valgrind -v --leak-check=full ./sigrok-cli \
+        -i rockband_wireless_keyboard_wii/midi_key4.sr \
+        -P uart:baudrate=31250,midi -P uart:baudrate=31250,midi
+    
+    Signed-off-by: Karl Palsson <ka...@etactica.com>
+
+commit e9e4dc4d7ecc678cffaa9a93034319f7e02f33b9
+Author: Karl Palsson <ka...@etactica.com>
+Date:   Tue Nov 29 13:19:46 2016 +0000
+
+    Include decoder instance ID in normal outputs
+    
+    Without this, it's nigh impossible to determine what lines of output are
+    from what decoder. While -l 4 and above will include this information,
+    this feels like something that is essential even at the basic level.
+    
+    Old:
+    System Realtime: active sensing
+    System Realtime: active sensing
+    System Realtime: active sensing
+    UNHANDLED DATA: 0x00
+    Channel 1: note on (note = 51 'D#3', velocity = 70)
+    System Realtime: active sensing
+    System Realtime: active sensing
+    System Realtime: active sensing
+    System Realtime: active sensing
+    UNHANDLED DATA: 0x00
+    Channel 1: note on (note = 51 'D#3', velocity = 70)
+    System Realtime: active sensing
+    
+    New:
+    
+    midi1: System Realtime: active sensing
+    midi1: System Realtime: active sensing
+    midi1: System Realtime: active sensing
+    midi1: UNHANDLED DATA: 0x00
+    midi1: Channel 1: note on (note = 51 'D#3', velocity = 70)
+    midi1: System Realtime: active sensing
+    midi2: System Realtime: active sensing
+    midi2: System Realtime: active sensing
+    midi2: System Realtime: active sensing
+    midi2: UNHANDLED DATA: 0x00
+    midi2: Channel 1: note on (note = 51 'D#3', velocity = 70)
+    midi2: System Realtime: active sensing
+    
+    This fixes parts of bug #868.
+    
+    Signed-off-by: Karl Palsson <ka...@etactica.com>
+
+commit 551f570c7b6b572d83b93f961b13580d4839fff6
+Author: Karl Palsson <ka...@etactica.com>
+Date:   Fri Nov 25 16:28:17 2016 +0000
+
+    Support multiple protocol decoder stacks
+    
+    Requires libsigrokdecode changes to actually work.
+    This allows multiple -P options to be specified, each of which is
+    registered as a full stack with libsigrokdecode.
+    
+    At this point, there's no way to specify annotations per instance, the
+    annotations are simply global per decoder (as before) rather than per
+    instance.
+    
+    This fixes parts of bug #868.
+    
+    Signed-off-by: Karl Palsson <ka...@etactica.com>
+
+commit c83f755098b3c5d10b3ad022c0f4e934edc94148
+Author: Karl Palsson <ka...@etactica.com>
+Date:   Thu Nov 24 12:29:09 2016 +0000
+
+    Drop -S stack option
+    
+    The -P option already stacks. The -S option was only used for changing the
+    stacking order. Simply require the correct order with -P. This reduces
+    the confusion in stacking.
+    
+    Signed-off-by: Karl Palsson <ka...@etactica.com>
+
+commit f4c490a7a2e53564ef90956aea8c09d09685f51e
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Fri Feb 17 09:24:18 2017 +0100
+
+    sigrok-cli_cross.nsi.in: Use Python 3.4 (Windows XP support).
+    
+    The last Python version to officially support Windows XP was 3.4.x.
+    
+    We'll keep the Windows installers at that version for the time being,
+    until Windows XP support is no longer feasible (e.g. because important
+    sigrok requirements such as Qt, glib, or libusb drop XP suppport).
+
+commit 6c3373fb7b0badb958fb653b1382af42d5a4a6dc
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Thu Feb 2 22:26:52 2017 +0100
+
+    sigrok-cli_cross.nsi.in: Bump Python version to 3.6.
+
+commit 04044d1b73a53aa24c22d5a722e5ce2570fcdd74
+Author: Gerhard Sittig <gerhard.sit...@gmx.net>
+Date:   Thu Oct 20 09:49:00 2016 +0200
+
+    license: remove FSF postal address from boiler plate license text
+    
+    Remove the FSF postal address as it might change (it did in the past).
+    Reference the gnu.org website instead which is more stable.
+
+commit 96d0921142060606933323f6bc37b02ee1225c3d
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Thu Oct 20 23:09:24 2016 +0200
+
+    --help output: More specific --show help text.
+    
+    Mention that --show also works for showing input/output format options,
+    as well as protocol decoder options.
+    
+    This fixes bug #851.
+
+commit 20917615ac052d1e811066b648438daed00afb67
+Author: Gerhard Sittig <gerhard.sit...@gmx.net>
+Date:   Sun Oct 16 18:25:30 2016 +0200
+
+    show: print binary classes as well in protocol decoder details
+    
+    The output of `sigrok -P <decoder> --show` omitted the binary classes,
+    users could not learn which specs are available for the -B option.  Add
+    a "Binary classes:" section after the list of annotations.
+    
+    Signed-off-by: Gerhard Sittig <gerhard.sit...@gmx.net>
+
+commit d473271c6e4fb6e618697bcd5acfe5af0b5afeb2
+Author: Uwe Hermann <u...@hermann-uwe.de>
+Date:   Mon Aug 15 14:52:18 2016 +0200
+
+    configure.ac: Bump package version to 0.7.0.
+    
+    0.7.0 will be the next major release. Bump now, so that
+    there is no confusion of tarball 0.6.0 and 0.7.0-git snapshots.
+
 commit 7bdc46d6fcdcfa00dd29ac102f3128aeb44a479c
 Author: Uwe Hermann <u...@hermann-uwe.de>
 Date:   Fri Jan 29 21:51:13 2016 +0100
@@ -1241,7 +1553,7 @@
     
     g_free_byte_array accepts as the second argument a gboolean which 
determines if
     the actual byte data should also be freed:
-       
https://developer.gnome.org/glib/2.28/glib-Byte-Arrays.html#g-byte-array-free
+            
https://developer.gnome.org/glib/2.28/glib-Byte-Arrays.html#g-byte-array-free
     
     If we pass a FALSE here the data should be freed with g_free(), instead 
just
     pass TRUE and the data will be automatically freed.
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/sigrok-cli-0.6.0/NEWS new/sigrok-cli-0.7.0/NEWS
--- old/sigrok-cli-0.6.0/NEWS   2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/NEWS   2017-06-12 03:37:07.000000000 +0200
@@ -1,3 +1,40 @@
+0.7.0 (2017-06-12)
+------------------
+
+ * Update sigrok-cli to the new APIs from both libsigrok 0.5.0 and also
+   libsigrokdecode 0.5.0.
+ * -P <decoder> --show:
+   - List the binary output classes of the decoder.
+   - List the possible input and output IDs of the decoder.
+ * --help:
+   - Clarify that --show also lists input/output format options,
+     as well as protocol decoder options (bug #851).
+   - Show a few typical invocations of e.g. --samples/--time/--continuous.
+ * Add an -L|--list-supported option; this used to be part of -V (bug #604).
+ * Drop the superfluous -S|--protocol-decoder-stack option. Stacking can
+   be done by simply using -P and providing the decoders in the correct order.
+ * Allow multiple -P options to decode multiple stacks (bug #868).
+ * Show decoder instance IDs so the user can tell instances apart (bug #868).
+ * Show annotations based on decoder ID (not instance ID).
+   - Behaviour preserved:
+     Single PD, no -A flag => all annotations from PD
+     Single PD, -A pdid => all annotations from PD
+     Single PD, -A pdid=annX => annX from PD
+   - Behaviour now added:
+     Duplicate PDs, no -A flag => all annotations from all PDs
+     Duplicate PDs, -A pdid => all annotations from all PDs of type pdid
+     Duplicate PDs, -A pdid=annX => all annX from all PDs of type pdid
+ * Fix various memory leaks.
+ * ./configure summary: Show linker flags used.
+ * NSIS:
+   - Update to Python 3.4.x. We can't use any higher version for the time
+     being, since 3.4.x is the last version to support Windows XP.
+   - Place the example .sr files in a separate installer section.
+   - Limit example .sr files to a small set to shrink the installer size.
+   - Clarify Start menu links (e.g. "Uninstall") to avoid confusion.
+ * HACKING: Update URL to Linux kernel coding style.
+ * Fix some compiler warnings (clang).
+
 0.6.0 (2016-01-29)
 ------------------
 
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/sigrok-cli-0.6.0/README new/sigrok-cli-0.7.0/README
--- old/sigrok-cli-0.6.0/README 2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/README 2017-06-12 03:37:07.000000000 +0200
@@ -20,16 +20,16 @@
 Requirements
 ------------
 
- - git (only needed when building from git) 
+ - git (only needed when building from git)
  - gcc or clang
  - make
- - autoconf >= 2.63 (only needed when building from git) 
- - automake >= 1.11 (only needed when building from git) 
- - libtool (only needed when building from git) 
+ - autoconf >= 2.63 (only needed when building from git)
+ - automake >= 1.11 (only needed when building from git)
+ - libtool (only needed when building from git)
  - pkg-config >= 0.22
  - libglib >= 2.32.0
- - libsigrok >= 0.4.0
- - libsigrokdecode >= 0.4.0
+ - libsigrok >= 0.5.0
+ - libsigrokdecode >= 0.5.0
 
 
 Building and installing
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/sigrok-cli-0.6.0/configure.ac new/sigrok-cli-0.7.0/configure.ac
--- old/sigrok-cli-0.6.0/configure.ac   2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/configure.ac   2017-06-12 03:37:07.000000000 +0200
@@ -20,7 +20,7 @@
 # We require at least autoconf 2.63 (AC_INIT format changed there).
 AC_PREREQ([2.63])
 
-AC_INIT([sigrok-cli], [0.6.0], [sigrok-de...@lists.sourceforge.net],
+AC_INIT([sigrok-cli], [0.7.0], [sigrok-de...@lists.sourceforge.net],
        [sigrok-cli], [http://www.sigrok.org])
 AC_CONFIG_SRCDIR([sigrok-cli.h])
 AC_CONFIG_MACRO_DIR([m4])
@@ -64,7 +64,7 @@
 SR_VAR_OPT_PKG([SC_PKGLIBS])
 
 SR_ARG_OPT_PKG([libsigrokdecode], [SRD],,
-       [libsigrokdecode >= 0.4.0])
+       [libsigrokdecode >= 0.5.0])
 
 ######################
 ##  Feature checks  ##
@@ -89,7 +89,7 @@
 # Retrieve the compile and link flags for all modules combined.
 # Also, bail out at this point if any module dependency is not met.
 PKG_CHECK_MODULES([SIGROK_CLI],
-       [glib-2.0 >= 2.32.0 libsigrok >= 0.4.0 $SC_PKGLIBS])
+       [glib-2.0 >= 2.32.0 libsigrok >= 0.5.0 $SC_PKGLIBS])
 
 sc_glib_version=`$PKG_CONFIG --modversion glib-2.0 2>&AS_MESSAGE_LOG_FD`
 sc_libsigrok_version=`$PKG_CONFIG --modversion libsigrok 2>&AS_MESSAGE_LOG_FD`
@@ -112,10 +112,11 @@
  - C compiler flags................ $CFLAGS
  - Additional C compiler flags..... $SC_EXTRA_CFLAGS
  - C compiler warnings............. $SC_WFLAGS
+ - Linker flags.................... $LDFLAGS
 
 Detected libraries (required):
  - glib-2.0 >= 2.32.0.............. $sc_glib_version
- - libsigrok >= 0.4.0.............. $sc_libsigrok_version
+ - libsigrok >= 0.5.0.............. $sc_libsigrok_version
 
 Detected libraries (optional):
 $sc_pkglibs_summary
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/sigrok-cli-0.6.0/contrib/sigrok-cli_cross.nsi.in 
new/sigrok-cli-0.7.0/contrib/sigrok-cli_cross.nsi.in
--- old/sigrok-cli-0.6.0/contrib/sigrok-cli_cross.nsi.in        2016-01-29 
23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/contrib/sigrok-cli_cross.nsi.in        2017-06-12 
03:37:07.000000000 +0200
@@ -14,8 +14,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, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 #
@@ -111,7 +110,6 @@
 # --- Default section ---------------------------------------------------------
 
 Section "@PACKAGE_NAME@ (required)" Section1
-
        # This section is gray (can't be disabled) in the component list.
        SectionIn RO
 
@@ -129,8 +127,8 @@
        File "${CROSS}/zadig_xp.exe"
 
        # Python
-       File "${CROSS}/python32.dll"
-       File "${CROSS}/python32.zip"
+       File "${CROSS}/python34.dll"
+       File "${CROSS}/python34.zip"
 
        SetOutPath "$INSTDIR\share"
 
@@ -140,10 +138,6 @@
        # Firmware files.
        File /r "${CROSS}/share/sigrok-firmware"
 
-       # Example *.sr files.
-       SetOutPath "$INSTDIR\examples"
-       File /r "${CROSS}/share/sigrok-dumps/*"
-
        # Generate the uninstaller executable.
        WriteUninstaller "$INSTDIR\Uninstall.exe"
 
@@ -162,17 +156,17 @@
                SW_SHOWNORMAL "" "Run @PACKAGE_NAME@"
 
        # Create a shortcut for the uninstaller.
-       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall.lnk" \
+       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall 
@PACKAGE_NAME@.lnk" \
                "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 \
                SW_SHOWNORMAL "" "Uninstall @PACKAGE_NAME@"
 
        # Create a shortcut for the Zadig executable.
-       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig.lnk" \
+       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig 
(@PACKAGE_NAME@).lnk" \
                "$INSTDIR\zadig.exe" "" "$INSTDIR\zadig.exe" 0 \
                SW_SHOWNORMAL "" "Zadig"
 
        # Create a shortcut for the Zadig executable (for Win XP).
-       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig (Win XP).lnk" \
+       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig 
(@PACKAGE_NAME@, Win XP).lnk" \
                "$INSTDIR\zadig_xp.exe" "" "$INSTDIR\zadig_xp.exe" 0 \
                SW_SHOWNORMAL "" "Zadig (Win XP)"
 
@@ -200,14 +194,38 @@
        WriteRegDWORD HKLM "${REGSTR}" "NoRepair" 1
 
        # TODO: Add sigrok-cli directory to the PATH env. variable.
+SectionEnd
 
+Section /o "Example data" Section2
+       # Example *.sr files.
+       SetOutPath "$INSTDIR\examples"
+
+       File "${CROSS}/share/sigrok-dumps/arm_trace/stm32f105/trace_example.sr"
+       File "${CROSS}/share/sigrok-dumps/am230x/am2301/am2301_1mhz.sr"
+       File 
"${CROSS}/share/sigrok-dumps/avr_isp/atmega88/isp_atmega88_erase_chip.sr"
+       File 
"${CROSS}/share/sigrok-dumps/can/microchip_mcp2515dm-bm/mcp2515dm-bm-125kbits_msg_222_5bytes.sr"
+       File 
"${CROSS}/share/sigrok-dumps/dcf77/pollin_dcf1_module/dcf77_120s.sr"
+       File 
"${CROSS}/share/sigrok-dumps/i2c/eeprom_24xx/microchip_24lc02b/hantek_6022be_powerup.sr"
+       File 
"${CROSS}/share/sigrok-dumps/i2c/eeprom_24xx/microchip_24lc64/sainsmart_dds120_powerup_scl_sda_analog.sr"
+       File 
"${CROSS}/share/sigrok-dumps/i2c/potentiometer/analog_devices_ad5258/ad5258_read_once_write_continuously_triangle.sr"
+       File 
"${CROSS}/share/sigrok-dumps/mdio/lan8720a/lan8720a_read_write_read.sr"
+       File "${CROSS}/share/sigrok-dumps/onewire/owfs/ds28ea00.sr"
+       File "${CROSS}/share/sigrok-dumps/sdcard/sd_mode/rcar-h2/cmd23_cmd18.sr"
+       File "${CROSS}/share/sigrok-dumps/spi/mx25l1605d/mx25l1605d_read.sr"
+       File "${CROSS}/share/sigrok-dumps/uart/gps/mtk3339/mtk3339_8n1_9600.sr"
+       File 
"${CROSS}/share/sigrok-dumps/usb/hid/mouse/olimex_stm32-h103_usb_hid/olimex_stm32-h103_usb_hid.sr"
+       File "${CROSS}/share/sigrok-dumps/z80/kc85/kc85-20mhz.sr"
+
+       # Create a shortcut for the example data folder.
+       CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Examples 
(@PACKAGE_NAME@).lnk" \
+               "$INSTDIR\examples" "" "$INSTDIR\examples" 0 \
+               SW_SHOWNORMAL "" ""
 SectionEnd
 
 
 # --- Uninstaller section -----------------------------------------------------
 
 Section "Uninstall"
-
        # Always delete the uninstaller first (yes, this really works).
        Delete "$INSTDIR\Uninstall.exe"
 
@@ -216,8 +234,8 @@
        Delete "$INSTDIR\@PACKAGE_NAME@.exe"
        Delete "$INSTDIR\zadig.exe"
        Delete "$INSTDIR\zadig_xp.exe"
-       Delete "$INSTDIR\python32.dll"
-       Delete "$INSTDIR\python32.zip"
+       Delete "$INSTDIR\python34.dll"
+       Delete "$INSTDIR\python34.zip"
 
        # Delete all decoders and everything else in libsigrokdecode/.
        # There could be *.pyc files or __pycache__ subdirs and so on.
@@ -236,9 +254,10 @@
 
        # Delete the links from the start menu.
        Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\sigrok command-line tool.lnk"
-       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall.lnk"
-       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig.lnk"
-       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig (Win XP).lnk"
+       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall @PACKAGE_NAME@.lnk"
+       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig (@PACKAGE_NAME@).lnk"
+       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Zadig (@PACKAGE_NAME@, Win 
XP).lnk"
+       Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Examples (@PACKAGE_NAME@).lnk"
 
        # Delete the sub-directory in the start menu.
        RMDir "$SMPROGRAMS\sigrok\@PACKAGE_NAME@"
@@ -246,15 +265,16 @@
 
        # Delete the registry key(s).
        DeleteRegKey HKLM "${REGSTR}"
-
 SectionEnd
 
 
 # --- Component selection section descriptions --------------------------------
 
-LangString DESC_Section1 ${LANG_ENGLISH} "This installs the sigrok 
command-line tool, some firmware files, the protocol decoders, some example 
files, and all required libraries."
+LangString DESC_Section1 ${LANG_ENGLISH} "This installs the sigrok 
command-line tool, some firmware files, the protocol decoders, and all required 
libraries."
+LangString DESC_Section2 ${LANG_ENGLISH} "This installs some example files 
that you can use to try out the features sigrok has to offer."
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+       !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+       !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
 !insertmacro MUI_FUNCTION_DESCRIPTION_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/sigrok-cli-0.6.0/decode.c new/sigrok-cli-0.7.0/decode.c
--- old/sigrok-cli-0.6.0/decode.c       2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/decode.c       2017-06-12 03:37:07.000000000 +0200
@@ -109,26 +109,20 @@
        return channel_map;
 }
 
-/*
- * Register the given PDs for this session.
- * Accepts a string of the form: "spi:sck=3:sdata=4,spi:sck=3:sdata=5"
- * That will instantiate two SPI decoders on the clock but different data
- * lines.
- */
-int register_pds(const char *opt_pds, char *opt_pd_annotations)
+static int register_pd(char *opt_pds, char *opt_pd_annotations)
 {
+       int ret;
        struct srd_decoder *dec;
+       struct srd_decoder_inst *di, *di_prior;
+       char **pdtokens, **pdtok, *pd_name;
        GHashTable *pd_opthash, *options, *channels;
        GList *leftover, *l;
-       struct srd_decoder_inst *di;
-       int ret;
-       char **pdtokens, **pdtok, *pd_name;
 
-       pd_ann_visible = g_hash_table_new_full(g_str_hash, g_str_equal,
-                                              g_free, NULL);
        ret = 0;
        pd_name = NULL;
-       pd_opthash = options = channels = pd_channel_maps = NULL;
+       di_prior = NULL;
+       pd_opthash = options = channels = NULL;
+
        pdtokens = g_strsplit(opt_pds, ",", 0);
        for (pdtok = pdtokens; *pdtok; pdtok++) {
                if (!(pd_opthash = parse_generic_arg(*pdtok, TRUE))) {
@@ -175,8 +169,6 @@
                         * Save the channel setup for later, but only on the
                         * first decoder (stacked decoders don't get channels).
                         */
-                       pd_channel_maps = g_hash_table_new_full(g_str_hash,
-                                       g_str_equal, g_free, 
(GDestroyNotify)g_hash_table_destroy);
                        g_hash_table_insert(pd_channel_maps, 
g_strdup(di->inst_id), channels);
                        channels = NULL;
                }
@@ -186,19 +178,57 @@
                 * This will be pared down later to leave only the last PD
                 * in the stack.
                 */
-               if (!opt_pd_annotations)
-                       g_hash_table_insert(pd_ann_visible, 
g_strdup(di->inst_id),
+               if (!opt_pd_annotations) {
+                       g_hash_table_insert(pd_ann_visible, 
g_strdup(di->decoder->id),
                                        g_slist_append(NULL, 
GINT_TO_POINTER(-1)));
+               }
+               if (di_prior) {
+                       if (srd_inst_stack(srd_sess, di_prior, di) != SRD_OK) {
+                               g_critical("Failed to stack %s -> %s.",
+                                       di_prior->inst_id, di->inst_id);
+                               ret = 1;
+                               break;
+                       }
+                       /* Remove annotations from prior levels. */
+                       if (!opt_pd_annotations)
+                               g_hash_table_remove(pd_ann_visible, 
di_prior->inst_id);
+               }
+               di_prior = di;
+               g_free(pd_name);
+               g_hash_table_destroy(pd_opthash);
+               g_hash_table_destroy(options);
+               pd_opthash = options = NULL;
        }
 
-       g_strfreev(pdtokens);
        if (pd_opthash)
                g_hash_table_destroy(pd_opthash);
        if (options)
                g_hash_table_destroy(options);
        if (channels)
                g_hash_table_destroy(channels);
-       g_free(pd_name);
+
+       g_strfreev(pdtokens);
+
+       return ret;
+}
+
+/*
+ * Register all the PDs from all stacks.
+ *
+ * Each PD string is a single stack such as "uart:baudrate=19200,modbus".
+ */
+int register_pds(gchar **all_pds, char *opt_pd_annotations)
+{
+       int ret;
+
+       ret = 0;
+       pd_ann_visible = g_hash_table_new_full(g_str_hash, g_str_equal,
+                                              g_free, NULL);
+       pd_channel_maps = g_hash_table_new_full(g_str_hash,
+               g_str_equal, g_free, (GDestroyNotify)g_hash_table_destroy);
+
+       for (int i = 0; all_pds[i]; i++)
+               ret += register_pd(all_pds[i], opt_pd_annotations);
 
        return ret;
 }
@@ -245,6 +275,7 @@
        }
 
        srd_inst_channel_set_all(di, channel_indices);
+       g_hash_table_destroy(channel_indices);
 }
 
 void map_pd_channels(struct sr_dev_inst *sdi)
@@ -261,65 +292,6 @@
        }
 }
 
-int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char *opt_pd_annotations)
-{
-       struct srd_decoder_inst *di_from, *di_to;
-       int ret, i;
-       char **pds, **ids;
-
-       /* Set up the protocol decoder stack. */
-       pds = g_strsplit(opt_pds, ",", 0);
-       if (g_strv_length(pds) > 1) {
-               if (opt_pd_stack) {
-                       /* A stack setup was specified, use that. */
-                       g_strfreev(pds);
-                       pds = g_strsplit(opt_pd_stack, ",", 0);
-                       if (g_strv_length(pds) < 2) {
-                               g_strfreev(pds);
-                               g_critical("Specify at least two protocol 
decoders to stack.");
-                               return 1;
-                       }
-               }
-
-               /* First PD goes at the bottom of the stack. */
-               ids = g_strsplit(pds[0], ":", 0);
-               if (!(di_from = srd_inst_find_by_id(srd_sess, ids[0]))) {
-                       g_strfreev(ids);
-                       g_critical("Cannot stack protocol decoder '%s': "
-                                       "instance not found.", pds[0]);
-                       return 1;
-               }
-               g_strfreev(ids);
-
-               /* Every subsequent PD goes on top. */
-               for (i = 1; pds[i]; i++) {
-                       ids = g_strsplit(pds[i], ":", 0);
-                       if (!(di_to = srd_inst_find_by_id(srd_sess, ids[0]))) {
-                               g_strfreev(ids);
-                               g_critical("Cannot stack protocol decoder '%s': 
"
-                                               "instance not found.", pds[i]);
-                               return 1;
-                       }
-                       g_strfreev(ids);
-                       if ((ret = srd_inst_stack(srd_sess, di_from, di_to)) != 
SRD_OK)
-                               return 1;
-
-                       /*
-                        * Don't show annotation from this PD. Only the last PD 
in
-                        * the stack will be left on the annotation list (unless
-                        * the annotation list was specifically provided).
-                        */
-                       if (!opt_pd_annotations)
-                               g_hash_table_remove(pd_ann_visible, 
di_from->inst_id);
-
-                       di_from = di_to;
-               }
-       }
-       g_strfreev(pds);
-
-       return 0;
-}
-
 int setup_pd_annotations(char *opt_pd_annotations)
 {
        GSList *l, *l_ann;
@@ -458,10 +430,11 @@
        if (!pd_ann_visible)
                return;
 
-       if (!g_hash_table_lookup_extended(pd_ann_visible, 
pdata->pdo->di->inst_id,
-                       NULL, (void **)&ann_list))
+       if (!g_hash_table_lookup_extended(pd_ann_visible, 
pdata->pdo->di->decoder->id,
+                       NULL, (void **)&ann_list)) {
                /* Not in the list of PDs whose annotations we're showing. */
                return;
+       }
 
        dec = pdata->pdo->di->decoder;
        pda = pdata->data;
@@ -478,12 +451,12 @@
 
        if (opt_loglevel <= SR_LOG_WARN) {
                /* Show only the longest annotation. */
-               printf("%s", pda->ann_text[0]);
+               printf("%s: %s", pdata->pdo->proto_id, pda->ann_text[0]);
        } else if (opt_loglevel >= SR_LOG_INFO) {
                /* Sample numbers and quotes around the longest annotation. */
                printf("%"PRIu64"-%"PRIu64"", pdata->start_sample, 
pdata->end_sample);
                if (opt_loglevel == SR_LOG_INFO) {
-                       printf(" \"%s\"", pda->ann_text[0]);
+                       printf(" %s \"%s\"", pdata->pdo->proto_id, 
pda->ann_text[0]);
                } else {
                        /* Protocol decoder id, annotation class,
                         * all annotation strings. */
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/sigrok-cli-0.6.0/doc/sigrok-cli.1 new/sigrok-cli-0.7.0/doc/sigrok-cli.1
--- old/sigrok-cli-0.6.0/doc/sigrok-cli.1       2016-01-29 23:55:28.000000000 
+0100
+++ new/sigrok-cli-0.7.0/doc/sigrok-cli.1       2017-06-12 03:37:07.000000000 
+0200
@@ -22,7 +22,10 @@
 .B "\-V, \-\-version"
 Show
 .B sigrok-cli
-version, and information about supported hardware drivers, input file
+version and the versions of libraries used.
+.TP
+.B "\-L, \-\-list-supported"
+Show information about supported hardware drivers, input file
 formats, output file formats, and protocol decoders.
 .TP
 \fB\-d, \-\-driver\fP <drivername>
@@ -238,48 +241,6 @@
 protocol using channel 1 as MISO signal for SPI, channel 5 as MOSI, channel 3
 as CLK, and channel 0 as CS# signal.
 .TP
-.BR "\-S, \-\-protocol\-decoder\-stack " <stack>
-This option allows the user to specify a protocol decoder stack, i.e.
-the way in which one protocol decoder's output gets piped into another
-protocol decoder. If not specified, the stack will be set up in the same
-order in which the protocol decoders were given with the
-.B \-\-protocol-decoders
-option.
-.sp
-The decoders are specified by their ID, as shown in the
-.B \-\-version
-output. In addition to the
-.B \-S
-option, all protocol decoders that are used in a stack, must also be specified
-(together with their options, if any) using the
-.B \-P
-parameter.
-.sp
-Example:
-.sp
- $
-.B "sigrok\-cli \-i <file.sr> \-P i2c:sda=4:scl=7,rtc8564"
-.br
-.B "              \-S i2c,rtc8564"
-.sp
-In this example, the
-.B \-S
-option specifies that the output of the
-.BR i2c " decoder"
-is piped into the
-.BR rtc8564 " decoder,"
-i.e., the
-.BR rtc8564 " decoder"
-is stacked on top of the
-.BR i2c " decoder."
-.sp
-The respective protocol decoder options and channel name/number assignments
-must be given using the
-.B \-P
-option (you cannot specify them in the
-.B \-S
-option).
-.TP
 .BR "\-A, \-\-protocol\-decoder\-annotations " <annotations>
 By default, only the stack's topmost protocol decoder's annotation output is
 shown. With this option another decoder's annotation can be selected for
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/sigrok-cli-0.6.0/main.c new/sigrok-cli-0.7.0/main.c
--- old/sigrok-cli-0.6.0/main.c 2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/main.c 2017-06-12 03:37:07.000000000 +0200
@@ -214,8 +214,6 @@
                }
                if (register_pds(opt_pds, opt_pd_annotations) != 0)
                        goto done;
-               if (setup_pd_stack(opt_pds, opt_pd_stack, opt_pd_annotations) 
!= 0)
-                       goto done;
 
                /* Only one output type is ever shown. */
                if (opt_pd_binary) {
@@ -243,6 +241,8 @@
 
        if (opt_version)
                show_version();
+       else if (opt_list_supported)
+               show_supported();
        else if (opt_input_format && opt_show)
                show_input();
        else if (opt_output_format && opt_show)
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/sigrok-cli-0.6.0/options.c new/sigrok-cli-0.7.0/options.c
--- old/sigrok-cli-0.6.0/options.c      2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/options.c      2017-06-12 03:37:07.000000000 +0200
@@ -22,6 +22,7 @@
 #include "sigrok-cli.h"
 
 gboolean opt_version = FALSE;
+gboolean opt_list_supported = FALSE;
 gint opt_loglevel = SR_LOG_WARN; /* Show errors+warnings by default. */
 gboolean opt_scan_devs = FALSE;
 gboolean opt_wait_trigger = FALSE;
@@ -32,9 +33,8 @@
 gchar *opt_channels = NULL;
 gchar *opt_channel_group = NULL;
 gchar *opt_triggers = NULL;
-gchar *opt_pds = NULL;
+gchar **opt_pds = NULL;
 #ifdef HAVE_SRD
-gchar *opt_pd_stack = NULL;
 gchar *opt_pd_annotations = NULL;
 gchar *opt_pd_meta = NULL;
 gchar *opt_pd_binary = NULL;
@@ -82,8 +82,6 @@
 CHECK_ONCE(opt_channel_group)
 CHECK_ONCE(opt_triggers)
 #ifdef HAVE_SRD
-CHECK_ONCE(opt_pds)
-CHECK_ONCE(opt_pd_stack)
 CHECK_ONCE(opt_pd_annotations)
 CHECK_ONCE(opt_pd_meta)
 CHECK_ONCE(opt_pd_binary)
@@ -100,7 +98,9 @@
 
 static const GOptionEntry optargs[] = {
        {"version", 'V', 0, G_OPTION_ARG_NONE, &opt_version,
-                       "Show version and support list", NULL},
+                       "Show version", NULL},
+       {"list-supported", 'L', 0, G_OPTION_ARG_NONE, &opt_list_supported,
+                       "List supported devices/modules/decoders", NULL},
        {"loglevel", 'l', 0, G_OPTION_ARG_INT, &opt_loglevel,
                        "Set loglevel (5 is most verbose)", NULL},
        {"driver", 'd', 0, G_OPTION_ARG_CALLBACK, &check_opt_drv,
@@ -126,10 +126,8 @@
        {"wait-trigger", 'w', 0, G_OPTION_ARG_NONE, &opt_wait_trigger,
                        "Wait for trigger", NULL},
 #ifdef HAVE_SRD
-       {"protocol-decoders", 'P', 0, G_OPTION_ARG_CALLBACK, &check_opt_pds,
+       {"protocol-decoders", 'P', 0, G_OPTION_ARG_STRING_ARRAY, &opt_pds,
                        "Protocol decoders to run", NULL},
-       {"protocol-decoder-stack", 'S', 0, G_OPTION_ARG_CALLBACK, 
&check_opt_pd_stack,
-                       "Protocol decoder stack", NULL},
        {"protocol-decoder-annotations", 'A', 0, G_OPTION_ARG_CALLBACK, 
&check_opt_pd_annotations,
                        "Protocol decoder annotation(s) to show", NULL},
        {"protocol-decoder-meta", 'M', 0, G_OPTION_ARG_CALLBACK, 
&check_opt_pd_meta,
@@ -140,7 +138,7 @@
        {"scan", 0, 0, G_OPTION_ARG_NONE, &opt_scan_devs,
                        "Scan for devices", NULL},
        {"show", 0, 0, G_OPTION_ARG_NONE, &opt_show,
-                       "Show device detail", NULL},
+                       "Show device/format/decoder details", NULL},
        {"time", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_time,
                        "How long to sample (ms)", NULL},
        {"samples", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_samples,
@@ -220,4 +218,16 @@
        g_free(help);
 
        g_option_context_free(context);
+
+#ifdef HAVE_SRD
+#define SHOW_DECODER_TEXT "| -P <decoder> "
+#else
+#define SHOW_DECODER_TEXT ""
+#endif
+       printf("Example use, typical options:\n");
+       printf("  -d <driver> --scan\n");
+       printf("  -d <driver> { --samples N | --frames N | --time T | 
--continuous }\n");
+       printf("  { -d <driver> | -I <format> | -O <format> %s} --show\n", 
SHOW_DECODER_TEXT);
+       printf("  See the manpage or the wiki for more details.\n");
+       printf("  Note: --samples/--frames/--time/--continuous is required for 
acquisition.\n");
 }
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/sigrok-cli-0.6.0/session.c new/sigrok-cli-0.7.0/session.c
--- old/sigrok-cli-0.6.0/session.c      2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/session.c      2017-06-12 03:37:07.000000000 +0200
@@ -175,6 +175,10 @@
        uint64_t input_len;
        struct sr_dev_driver *driver;
 
+       /* Avoid warnings when building without decoder support. */
+       (void)session;
+       (void)input_len;
+
        driver = sr_dev_inst_driver_get(sdi);
 
        /* If the first packet to come in isn't a header, don't even try. */
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/sigrok-cli-0.6.0/show.c new/sigrok-cli-0.7.0/show.c
--- old/sigrok-cli-0.6.0/show.c 2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/show.c 2017-06-12 03:37:07.000000000 +0200
@@ -58,6 +58,70 @@
 
 void show_version(void)
 {
+       GString *s;
+       GSList *l, *l_orig, *m;
+       char *str;
+       const char *lib, *version;
+
+       printf("sigrok-cli %s\n\n", SC_PACKAGE_VERSION_STRING);
+
+       printf("Libraries and features:\n");
+
+       printf("- libsigrok %s/%s (rt: %s/%s).\n",
+               SR_PACKAGE_VERSION_STRING, SR_LIB_VERSION_STRING,
+               sr_package_version_string_get(), sr_lib_version_string_get());
+
+       s = g_string_sized_new(200);
+       g_string_append(s, " - Libs:\n");
+       l_orig = sr_buildinfo_libs_get();
+       for (l = l_orig; l; l = l->next) {
+               m = l->data;
+               lib = m->data;
+               version = m->next->data;
+               g_string_append_printf(s, "  - %s %s\n", lib, version);
+               g_slist_free_full(m, g_free);
+       }
+       g_slist_free(l_orig);
+       s->str[s->len - 1] = '\0';
+       printf("%s\n", s->str);
+       g_string_free(s, TRUE);
+
+       str = sr_buildinfo_host_get();
+       printf("  - Host: %s.\n", str);
+       g_free(str);
+
+       str = sr_buildinfo_scpi_backends_get();
+       printf("  - SCPI backends: %s.\n", str);
+       g_free(str);
+
+#ifdef HAVE_SRD
+       printf("- libsigrokdecode %s/%s (rt: %s/%s).\n",
+               SRD_PACKAGE_VERSION_STRING, SRD_LIB_VERSION_STRING,
+               srd_package_version_string_get(), srd_lib_version_string_get());
+
+       s = g_string_sized_new(200);
+       g_string_append(s, " - Libs:\n");
+       l_orig = srd_buildinfo_libs_get();
+       for (l = l_orig; l; l = l->next) {
+               m = l->data;
+               lib = m->data;
+               version = m->next->data;
+               g_string_append_printf(s, "  - %s %s\n", lib, version);
+               g_slist_free_full(m, g_free);
+       }
+       g_slist_free(l_orig);
+       s->str[s->len - 1] = '\0';
+       printf("%s\n", s->str);
+       g_string_free(s, TRUE);
+
+       str = srd_buildinfo_host_get();
+       printf("  - Host: %s.\n", str);
+       g_free(str);
+#endif
+}
+
+void show_supported(void)
+{
        struct sr_dev_driver **drivers, *driver;
        const struct sr_input_module **inputs, *input;
        const struct sr_output_module **outputs, *output;
@@ -69,15 +133,6 @@
        struct srd_decoder *dec;
 #endif
 
-       printf("sigrok-cli %s\n\n", SC_PACKAGE_VERSION_STRING);
-
-       printf("Using libsigrok %s (lib version %s).\n",
-              sr_package_version_string_get(), sr_lib_version_string_get());
-#ifdef HAVE_SRD
-       printf("Using libsigrokdecode %s (lib version %s).\n\n",
-              srd_package_version_string_get(), srd_lib_version_string_get());
-#endif
-
        printf("Supported hardware drivers:\n");
        drivers = sr_driver_list(sr_ctx);
        for (sl = NULL, i = 0; drivers[i]; i++)
@@ -266,7 +321,7 @@
        GVariant *gvar_dict, *gvar_list, *gvar;
        gsize num_elements;
        double dlow, dhigh, dcur_low, dcur_high;
-       const uint64_t *uint64, p, q, low, high;
+       const uint64_t *uint64, p = 0, q = 0, low = 0, high = 0;
        uint64_t tmp_uint64, mask, cur_low, cur_high, cur_p, cur_q;
        GArray *opts;
        const int32_t *int32;
@@ -610,7 +665,7 @@
                                gvar = g_variant_get_child_value(gvar_list, i);
                                g_variant_get(gvar, "(tt)", &p, &q);
                                if (srci->datatype == SR_T_RATIONAL_PERIOD)
-                                       s = sr_period_string(p * q);
+                                       s = sr_period_string(p, q);
                                else
                                        s = sr_voltage_string(p, q);
                                printf("      %s", s);
@@ -674,7 +729,7 @@
 }
 
 #ifdef HAVE_SRD
-void show_pd_detail(void)
+static void show_pd_detail_single(const char *pd)
 {
        struct srd_decoder *dec;
        struct srd_decoder_option *o;
@@ -682,9 +737,9 @@
        struct srd_decoder_annotation_row *r;
        GSList *l, *ll, *ol;
        int idx;
-       char **pdtokens, **pdtok, *optsep, **ann, *val, *doc;
+       char **pdtokens, **pdtok, *optsep, **ann, **bin, *val, *doc, *str;
 
-       pdtokens = g_strsplit(opt_pds, ",", -1);
+       pdtokens = g_strsplit(pd, ",", -1);
        for (pdtok = pdtokens; *pdtok; pdtok++) {
                /* Strip options. */
                if ((optsep = strchr(*pdtok, ':')))
@@ -696,6 +751,24 @@
                printf("ID: %s\nName: %s\nLong name: %s\nDescription: %s\n",
                                dec->id, dec->name, dec->longname, dec->desc);
                printf("License: %s\n", dec->license);
+               printf("Possible decoder input IDs:\n");
+               if (dec->inputs) {
+                       for (l = dec->inputs; l; l = l->next) {
+                               str = l->data;
+                               printf("- %s\n", str);
+                       }
+               } else {
+                       printf("None.\n");
+               }
+               printf("Possible decoder output IDs:\n");
+               if (dec->outputs) {
+                       for (l = dec->outputs; l; l = l->next) {
+                               str = l->data;
+                               printf("- %s\n", str);
+                       }
+               } else {
+                       printf("None.\n");
+               }
                printf("Annotation classes:\n");
                if (dec->annotations) {
                        for (l = dec->annotations; l; l = l->next) {
@@ -722,6 +795,15 @@
                } else {
                        printf("None.\n");
                }
+               printf("Binary classes:\n");
+               if (dec->binary) {
+                       for (l = dec->binary; l; l = l->next) {
+                               bin = l->data;
+                               printf("- %s: %s\n", bin[0], bin[1]);
+                       }
+               } else {
+                       printf("None.\n");
+               }
                printf("Required channels:\n");
                if (dec->channels) {
                        for (l = dec->channels; l; l = l->next) {
@@ -768,6 +850,12 @@
 
        g_strfreev(pdtokens);
 }
+
+void show_pd_detail(void)
+{
+       for (int i = 0; opt_pds[i]; i++)
+               show_pd_detail_single(opt_pds[i]);
+}
 #endif
 
 void show_input(void)
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/sigrok-cli-0.6.0/sigrok-cli.h new/sigrok-cli-0.7.0/sigrok-cli.h
--- old/sigrok-cli-0.6.0/sigrok-cli.h   2016-01-29 23:55:28.000000000 +0100
+++ new/sigrok-cli-0.7.0/sigrok-cli.h   2017-06-12 03:37:07.000000000 +0200
@@ -48,6 +48,7 @@
 
 /* show.c */
 void show_version(void);
+void show_supported(void);
 void show_dev_list(void);
 void show_dev_detail(void);
 void show_pd_detail(void);
@@ -73,8 +74,7 @@
 
 /* decode.c */
 #ifdef HAVE_SRD
-int register_pds(const char *opt_pds, char *opt_pd_annotations);
-int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char 
*opt_pd_annotations);
+int register_pds(gchar **all_pds, char *opt_pd_annotations);
 int setup_pd_annotations(char *opt_pd_annotations);
 int setup_pd_meta(char *opt_pd_meta);
 int setup_pd_binary(char *opt_pd_binary);
@@ -100,6 +100,7 @@
 
 /* options.c */
 extern gboolean opt_version;
+extern gboolean opt_list_supported;
 extern gint opt_loglevel;
 extern gboolean opt_scan_devs;
 extern gboolean opt_wait_trigger;
@@ -110,9 +111,8 @@
 extern gchar *opt_channels;
 extern gchar *opt_channel_group;
 extern gchar *opt_triggers;
-extern gchar *opt_pds;
+extern gchar **opt_pds;
 #ifdef HAVE_SRD
-extern gchar *opt_pd_stack;
 extern gchar *opt_pd_annotations;
 extern gchar *opt_pd_meta;
 extern gchar *opt_pd_binary;


Reply via email to