Backport recent changes from mainline.
authorUwe Hermann <uwe@hermann-uwe.de>
Thu, 25 Oct 2018 20:00:44 +0000 (22:00 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 25 Oct 2018 20:11:21 +0000 (22:11 +0200)
This includes all changes from

  f5735c5ee3e8fb0f1888f0ce22bfb46a99c099df
  doc: minor update to -O and -g options in the manpage

up to

  f0de24ffe36fb3e983e347e607c522f32a963e25
  Force backup analog traces only if needed

HACKING
Makefile.am
contrib/org.sigrok.sigrok-cli.desktop [new file with mode: 0644]
contrib/sigrok-cli.svg [new file with mode: 0644]
decode.c
doc/sigrok-cli.1
input.c
main.c
options.c
session.c
sigrok-cli.h

diff --git a/HACKING b/HACKING
index 94064f8765a037073b7a309eebda21f4f5aa9a66..c9b876b1df7dc57a1df85cfe0aaaec6c815337e3 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -15,15 +15,16 @@ Please use the same style for any code contributions, thanks!
 Contributions
 -------------
 
- - Patches should be sent to the development mailinglist at
+ - In order to contribute you should ideally clone the git repository and
+   let us know (preferably via IRC, or via the mailing list) from where to
+   pull/review your changes. You can use github.com, or any other public git
+   hosting site.
+
+ - Alternatively, patches can be sent to the development mailinglist at
    sigrok-devel@lists.sourceforge.net (please subscribe to the list first).
 
    https://lists.sourceforge.net/lists/listinfo/sigrok-devel
 
- - Alternatively, you can also clone the git repository and let us know
-   from where to pull/review your changes. You can use gitorious.org,
-   github.com, or any other public git hosting site.
-
 
 Random notes
 ------------
index c6d6c8a7cff1a5b7d940e0c040ad1d4f5337f646..84f94b49afbad809ecb58de3b60dacd7766b7d47 100644 (file)
@@ -40,7 +40,16 @@ sigrok_cli_LDADD = $(SIGROK_CLI_LIBS)
 
 dist_man_MANS = doc/sigrok-cli.1
 
-EXTRA_DIST = contrib/sigrok-logo-notext.ico
+desktopdir = @datadir@/applications
+desktop_DATA = contrib/org.sigrok.sigrok-cli.desktop
+
+hicolor_icondir = @datadir@/icons/hicolor/scalable/apps
+hicolor_icon_DATA = contrib/sigrok-cli.svg
+
+EXTRA_DIST = \
+       contrib/sigrok-logo-notext.ico \
+       contrib/org.sigrok.sigrok-cli.desktop \
+       contrib/sigrok-cli.svg
 
 MAINTAINERCLEANFILES = ChangeLog
 
diff --git a/contrib/org.sigrok.sigrok-cli.desktop b/contrib/org.sigrok.sigrok-cli.desktop
new file mode 100644 (file)
index 0000000..333a933
--- /dev/null
@@ -0,0 +1,12 @@
+[Desktop Entry]
+# Creative Commons CC0 1.0 Universal (CC0-1.0, Public Domain Dedication).
+Name=sigrok-cli
+GenericName=Logic analyzer, oscilloscope and MSO command-line tool
+Categories=Development;Electronics;
+Comment=Control your logic analyzer, oscilloscope, or MSO
+Exec=sigrok-cli
+Icon=sigrok-cli
+Terminal=true
+NoDisplay=true
+Type=Application
+MimeType=application/vnd.sigrok.session;
diff --git a/contrib/sigrok-cli.svg b/contrib/sigrok-cli.svg
new file mode 100644 (file)
index 0000000..620028d
--- /dev/null
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <defs id="defs4">
+  <filter id="filter5288" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5290" stdDeviation="1.2304688"/>
+  </filter>
+  <filter id="filter5288-0" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5290-1" stdDeviation="1.2304688"/>
+  </filter>
+  <filter id="filter5354" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5356" stdDeviation="1.2575"/>
+  </filter>
+  <filter id="filter5354-5" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5356-2" stdDeviation="1.2575"/>
+  </filter>
+  <filter id="filter5412" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5414" stdDeviation="1.311875"/>
+  </filter>
+  <filter id="filter5412-5" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur5414-6" stdDeviation="1.311875"/>
+  </filter>
+  <filter id="filter5470" height="1.0266" width="1.2422" color-interpolation-filters="sRGB" y="-.013320" x="-.12110">
+   <feGaussianBlur id="feGaussianBlur5472" stdDeviation="1.30875"/>
+  </filter>
+  <filter id="filter5470-6" height="1.0266" width="1.2422" color-interpolation-filters="sRGB" y="-.013320" x="-.12110">
+   <feGaussianBlur id="feGaussianBlur5472-1" stdDeviation="1.30875"/>
+  </filter>
+  <filter id="filter5536" height="1.0246" width="1.9962" color-interpolation-filters="sRGB" y="-.012296" x="-.49812">
+   <feGaussianBlur id="feGaussianBlur5538" stdDeviation="1.2453125"/>
+  </filter>
+  <filter id="filter5703" height="1" width="1" color-interpolation-filters="sRGB" y="0" x="0">
+   <feGaussianBlur id="feGaussianBlur5705" stdDeviation="1.709984544049459" result="result8"/>
+   <feTurbulence id="feTurbulence5707" baseFrequency="0.0080370942812983005 0.027820710973724884" seed="56" result="result7" numOctaves="2" type="turbulence"/>
+   <feComposite id="feComposite5709" operator="in" result="result6" in2="result8" in="SourceGraphic"/>
+   <feComposite id="feComposite5711" in="result6" in2="result7" k3="1" k2="0" k1="0" result="result2" k4="0" operator="arithmetic"/>
+   <feComposite id="feComposite5713" operator="in" result="fbSourceGraphic" in2="result6" in="result2"/>
+   <feComposite id="feComposite5715" in="fbSourceGraphic" in2="fbSourceGraphic" k3="0" k2="2.5" k1="0" result="fbSourceGraphic" k4="0" operator="arithmetic"/>
+   <feColorMatrix id="feColorMatrix5805" result="fbSourceGraphicAlpha" values="0" type="saturate" in="fbSourceGraphic"/>
+   <feColorMatrix id="feColorMatrix5807" values="1" type="saturate" result="result2" in="fbSourceGraphic"/>
+   <feFlood id="feFlood5809" flood-color="rgb(113,79,56)" result="result1"/>
+   <feBlend id="feBlend5811" result="result3" mode="multiply" in2="result2" in="result1"/>
+   <feComposite id="feComposite5813" operator="in" result="result4" in2="fbSourceGraphic"/>
+  </filter>
+  <filter id="filter4766-3" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur4768-8" stdDeviation="0.25453125"/>
+  </filter>
+  <filter id="filter4654-6" height="1.0252" width="1.5121" color-interpolation-filters="sRGB" y="-.012590" x="-.25603">
+   <feGaussianBlur id="feGaussianBlur4656-4" stdDeviation="0.4267185"/>
+  </filter>
+  <filter id="filter4596-6" height="1.2771" width="1.0125" color-interpolation-filters="sRGB" y="-.13854" x="-.0062716">
+   <feGaussianBlur id="feGaussianBlur4598-4" stdDeviation="0.48343725"/>
+  </filter>
+  <filter id="filter4536-1" height="1.0263" width="1.2736" color-interpolation-filters="sRGB" y="-.013154" x="-.13680">
+   <feGaussianBlur id="feGaussianBlur4538-3" stdDeviation="0.45059085"/>
+  </filter>
+  <linearGradient id="linearGradient4358-7">
+   <stop id="stop4360-7" stop-color="#aca592" offset="0"/>
+   <stop id="stop4362-1" stop-color="#aca592" stop-opacity="0" offset="1"/>
+  </linearGradient>
+  <filter id="filter6293" height="1.4486" width="1.1034" color-interpolation-filters="sRGB" y="-.22428" x="-.051678">
+   <feGaussianBlur id="feGaussianBlur6295" stdDeviation="4.5525501"/>
+  </filter>
+  <filter id="filter6293-3" height="1.4486" width="1.1034" color-interpolation-filters="sRGB" y="-.22428" x="-.051678">
+   <feGaussianBlur id="feGaussianBlur6295-5" stdDeviation="4.5525501"/>
+  </filter>
+  <filter id="filter7222" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur7224" stdDeviation="0.93122891"/>
+  </filter>
+  <filter id="filter7410" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur7412" stdDeviation="0.28402344"/>
+  </filter>
+  <filter id="filter7414" color-interpolation-filters="sRGB">
+   <feGaussianBlur id="feGaussianBlur7416" stdDeviation="0.28402344"/>
+  </filter>
+  <linearGradient id="linearGradient4024" y2="837.09" gradientUnits="userSpaceOnUse" x2="112.48" gradientTransform="translate(279.37)" y1="900.59" x1="-60.266">
+   <stop id="stop4324-0" stop-color="#6c6753" stop-opacity=".50862" offset="0"/>
+   <stop id="stop4332-7" stop-color="#a39e88" stop-opacity="0" offset=".45474"/>
+   <stop id="stop4330-01" stop-color="#a39e88" stop-opacity="0" offset=".77666"/>
+   <stop id="stop4326-8" stop-color="#6c6753" stop-opacity=".70690" offset="1"/>
+  </linearGradient>
+  <linearGradient id="linearGradient4026" y2="805.75" xlink:href="#linearGradient4358-7" gradientUnits="userSpaceOnUse" x2="1.7663" gradientTransform="translate(279.37)" y1="787.42" x1="1.1134"/>
+  <linearGradient id="linearGradient4028" y2="716.49" gradientUnits="userSpaceOnUse" x2="-133.64" gradientTransform="translate(279.37)" y1="715.43" x1="-134">
+   <stop id="stop4408-14" offset="0"/>
+   <stop id="stop4410-2" stop-opacity="0" offset="1"/>
+  </linearGradient>
+  <linearGradient id="linearGradient4030" y2="806.65" gradientUnits="userSpaceOnUse" x2="-69.701" gradientTransform="translate(279.37)" y1="839.88" x1="-69.701">
+   <stop id="stop4542-9" stop-color="#989078" offset="0"/>
+   <stop id="stop4544-5" stop-color="#aca592" stop-opacity="0" offset="1"/>
+  </linearGradient>
+  <linearGradient id="linearGradient4032" y2="820.96" xlink:href="#linearGradient4358-7" gradientUnits="userSpaceOnUse" x2="-8.9303" gradientTransform="translate(279.37)" y1="829.56" x1="-8.9303"/>
+  <linearGradient id="linearGradient4034" y2="801.74" gradientUnits="userSpaceOnUse" x2="25.605" gradientTransform="translate(279.37)" y1="911.18" x1="25.605">
+   <stop id="stop4704-1" stop-color="#6c6753" stop-opacity=".50862" offset="0"/>
+   <stop id="stop4706-4" stop-color="#a39e88" stop-opacity="0" offset=".60980"/>
+   <stop id="stop4708-5" stop-color="#a39e88" stop-opacity="0" offset=".77666"/>
+   <stop id="stop4710-4" stop-color="#6c6753" stop-opacity=".70690" offset="1"/>
+  </linearGradient>
+  <radialGradient id="radialGradient4036" gradientUnits="userSpaceOnUse" cy="356.19" cx="300" gradientTransform="matrix(1.3455 -.0000010547 2.0946e-7 .10026 -103.64 317.01)" r="55.264">
+   <stop id="stop6329" offset="0"/>
+   <stop id="stop6333" stop-color="#464646" offset=".60223"/>
+   <stop id="stop6331" stop-color="#aca592" stop-opacity="0" offset="1"/>
+  </radialGradient>
+  <radialGradient id="radialGradient4038" gradientUnits="userSpaceOnUse" cy="38.204" cx="301.23" gradientTransform="matrix(1 0 0 13.333 0 -471.18)" r="2.1213">
+   <stop id="stop4661" stop-color="#fff" stop-opacity=".33621" offset="0"/>
+   <stop id="stop4663" stop-color="#fff" stop-opacity="0" offset="1"/>
+  </radialGradient>
+  <radialGradient id="radialGradient4040" gradientUnits="userSpaceOnUse" cy="67.522" cx="302.84" gradientTransform="matrix(.74160 0 0 3.0648 78.253 -107.79)" r="7.0144">
+   <stop id="stop4691" stop-color="#fff" stop-opacity=".23276" offset="0"/>
+   <stop id="stop4693" stop-color="#fff" stop-opacity="0" offset="1"/>
+  </radialGradient>
+  <linearGradient id="linearGradient4074" y2="333.77" gradientUnits="userSpaceOnUse" x2="291.22" gradientTransform="matrix(1.0518 0 0 1.0574 -15.542 -15.976)" y1="330.77" x1="291.22">
+   <stop id="stop5572" stop-color="#fff" stop-opacity=".36207" offset="0"/>
+   <stop id="stop5574" stop-opacity="0" offset="1"/>
+  </linearGradient>
+  <linearGradient id="linearGradient4076" y2="339.48" gradientUnits="userSpaceOnUse" x2="337.09" gradientTransform="matrix(1.0417 0 0 1.2372 -12.207 -75.58)" y1="339.48" x1="343.43">
+   <stop id="stop5572-3" stop-color="#fff" stop-opacity=".36207" offset="0"/>
+   <stop id="stop5574-2" stop-opacity="0" offset="1"/>
+  </linearGradient>
+  <linearGradient id="linearGradient4078" y2="304.68" gradientUnits="userSpaceOnUse" x2="300.31" gradientTransform="translate(0,4)" y1="331.2" x1="300.31">
+   <stop id="stop5656" stop-opacity=".30172" offset="0"/>
+   <stop id="stop5658" stop-opacity="0" offset="1"/>
+  </linearGradient>
+ </defs>
+ <metadata id="metadata7">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title/>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <g id="layer1" transform="translate(-93.213 -870.88)">
+  <path id="path1648" d="m1319.8 222.81c105.62-29.815 164.49-18.697 304.84-6.9484 82.527 6.9082 180.31-11.422 237.14-8.5433 95.114 4.8165 189.98 28.25 321.13 20.545" display="none" stroke="#fff" stroke-width="1px" fill="none"/>
+ </g>
+ <g id="layer2" transform="translate(-93.213 -418.52)">
+  <g id="g3938" transform="matrix(.10491 0 0 .10491 85.726 417.58)">
+   <path id="rect10305-9-6-8-1-4-6" style="color:#000000" d="m403.34 894.39 1.1978 14.787-3.5969 6.1085-5.8543 2.6695-6.7717 1.1769-12.988-1.6568-14.183 0.0522-9.733 0.82833-9.6449 1.6044-9.7661-1.2906-9.033-0.36618-15.992 0.46239-12.627 1.1944-11.95-3.3136-8.446 0.80213-11.891 1.6831-16.155-1.6219-12.442 1.6743-9.5288 0.11012-7.6552-3.0431-11.662-3.9917-4.2875-7.8841-4.7091-13.569-2.5128-14.622 5.9409-4.9408 199.41 1.7589 4.5302 6.1849 0.35355 15.203z" fill-opacity=".27273" transform="matrix(.96999 0 0 .77327 8.9667 -253.3)" filter="url(#filter6293)"/>
+   <path id="rect10305-9-6-8-1-4-6-9" style="color:#000000" d="m403.34 894.39 1.1978 14.787-3.5969 6.1085-5.8543 2.6695-6.7717 1.1769-12.988-1.6568-14.183 0.0522-9.733 0.82833-9.6449 1.6044-9.7661-1.2906-9.033-0.36618-15.992 0.46239-12.627 1.1944-11.95-3.3136-8.446 0.80213-11.891 1.6831-16.155-1.6219-12.442 1.6743-9.5288 0.11012-7.6552-3.0431-11.662-3.9917-4.2875-7.8841-4.7091-13.569-2.5128-14.622 5.9409-4.9408 199.41 1.7589 4.5302 6.1849 0.35355 15.203z" fill-opacity=".60766" transform="matrix(.92725 0 0 .73948 21.739 -223.04)" filter="url(#filter6293-3)"/>
+   <path id="rect10305-9-6-8-1-4" style="color:#000000" d="m399.81 876.33 0.13139 28.312-3.4465 5.2698-5.6095 2.303-6.4886 1.0153-12.445-1.4293-13.59 0.045-9.3261 0.7146-9.2417 1.3841-9.3578-1.1134-8.6554-0.3159-15.323 0.3989-12.099 1.0304-11.451-2.8586-8.0929 0.692-11.394 1.452-15.48-1.3992-11.922 1.4444-9.1305 0.095-7.3352-2.6253-11.175-3.4437-4.1083-6.8016-4.5122-11.706-2.4078-12.614 202.46 0.15063z" fill-opacity=".41627" transform="matrix(.97921 0 0 .79971 6.2101 -277.03)" filter="url(#filter7222)" fill="#635f4f"/>
+   <g id="g6187" transform="translate(0 -456.36)">
+    <path id="rect10307-2-2" style="color:#000000" d="m302 787.43-10.188 1.625-7.4375-0.6875-4.1875 1.875-10.969-0.65625-15.906-0.4375-12.375-0.71875-8.7188 3.375-9.125 0.3125-3.1562 2.7812-5.5312-0.46875-5.125 3.625-0.0312 0.0312v0.0312l-5.1562 6.4062-2.875 14.812-2.4375 16.688 0.0312 14.625-0.65625 24.844 2.9062 11.156 2.4688 4.75 1.5625 4.125 2.5312 3.3438v0.0312l1.625 2.7812 3.7812 2.8125v-0.0625l7.4375 4.5938 10.156-0.125 9.0312 0.0937 11.812 1.4375 15.312-1.375 11.281 1.4375 8 0.6875 11.344-2.8438 11.969 1.0314 15.188 0.375 8.5625-0.3125 9.25-1.0938 9.1562 1.375 9.25 0.71875 13.438 0.0312 12.312-1.4062 6.4375 1 4.0625-2.1875 2.4062-7.75 1.1875-16.219 1.2188-24.219-1.8438-14.25 0.3125-10.5h0.0625l-0.4375-18.438-5.8125-6.6562-1.625-6.7812-2.0938-1.625-5.0938-8.0312-5.4062-3.1562h-5.5625l-4.9688-0.0937-3.8438-2.25-4.5 0.6875-6.8438-0.9375-5.9688 1.9375-8.9062-0.4375-11-0.40625-10.219 0.6875-16.094-2z" fill="#c8c4b7"/>
+    <path id="rect10307-2-93" style="color:#000000" d="m302 787.42-10.188 1.625-7.4375-0.6875-4.1875 1.875-10.969-0.65625-15.906-0.4375-12.375-0.71875-8.7188 3.375-9.125 0.3125-3.1562 2.7812-5.5312-0.46875-5.125 3.625-0.0312 0.0312v0.0312l-5.1562 6.4062-2.875 14.812-2.4375 16.688 0.0312 14.625-0.65625 24.844 2.9062 11.156 2.4688 4.75 1.5625 4.125 2.5312 3.3438v0.031l1.625 2.7812 3.7812 2.8125v-0.062l7.4375 4.5938 10.156-0.125 9.0312 0.094 11.812 1.4375 15.312-1.375 11.281 1.4375 8 0.6875 11.344-2.8438 11.969 1.0315 15.188 0.375 8.5625-0.3125 9.25-1.0938 9.1562 1.375 9.25 0.7188 13.438 0.031 12.312-1.4063 6.4375 1 4.0625-2.1875 2.4062-7.75 1.1875-16.219 1.2188-24.219-1.8438-14.25 0.3125-10.5h0.0625l-0.4375-18.438-5.8125-6.6562-1.625-6.7812-2.0938-1.625-5.0938-8.0312-5.4062-3.1562h-5.5625l-4.9688-0.0937-3.8438-2.25-4.5 0.6875-6.8438-0.9375-5.9688 1.9375-8.9062-0.4375-11-0.40625-10.219 0.6875-16.094-2z" filter="url(#filter5703)" fill="#c8c4b7"/>
+    <path id="rect10307-2-40" opacity=".85446" style="color:#000000" d="m240.93 788.44-8.722 3.3744-9.1332 0.29289-3.159 2.7813-5.513-0.4688-5.6193 4.9375-1.552 5.9778-0.28856 7.9063 5.6345 0.1875 2.8704 4.625 3.4762-0.65782 5.4177 1.2203 3.1183 0.18775 2.5158-1.0469 5.7268 1.7656 4.223-1.0781 4.6232 0.43755 6.4071 4.1406 6.4091-0.3437 2.0368-0.39063 13.819-0.45317 11.132-0.5937 5.4025-0.66994 5.913 1.2891 9.9355 0.18187 5.9864-2.5133 14.125 1.1596 19.16-1.0722 5.2521 1.7751 5.1057-0.33764 14.012-0.0926 7.2048 2.9051 0.94166 0.2187 16.721-5.1562 4.131-0.1875 1.6858-2.25-5.7987-6.6648-1.6251-6.7813-2.111-1.625-5.096-8.0312-5.4137-3.1563h-5.5434l-4.9814-0.0937-3.8424-2.25-4.4803 0.6875-6.8647-0.9375-5.9721 1.9375-8.8882-0.4375-10.994-0.4063-10.234 0.70711-16.08-2.0196-10.206 1.625-7.4418-0.6875-4.1765 1.875-10.981-0.63843-15.894-0.4467-12.374-0.70791z" fill="#c8c4b7"/>
+    <path id="path4520-4-5" opacity=".85446" style="color:#000000" d="m295.67 821.86-5.9301-1.3438-5.388 0.7188-11.132 0.5937-13.732 0.46483 20.46 0.78517 5.103 3.0313 4.5562 0.4062 5.7864-1 5.8775 1.5h6.485l3.3108-2.9375 7.943-0.5 22.887-1.0312 4.8725-0.67192 4.3831 1.1485 4.1244 2.1796 2.3844-0.1875 9.5528-1.9375 2.8859 0.8125 2.9916-0.7812 3.3564 0.75-7.1606-2.9493-14.056 0.1368-5.0615 0.33764-5.2963-1.7751-19.513 0.7187-13.74-0.875-5.9984 2.5625-9.9516-0.1562zm-55.761-3.4688-4.1917 1.0625-5.7268-1.75-2.5001 1.0625-3.1379-0.16719-5.4701-1.2169-3.4533 0.66146 2.6241 4.8352 7.0306-2.6385 15.878 4.8384 3.7688-0.7812 5.6474 1.8125 6.0446-2.0313 2.9981-1.7994-2.0564 0.39317-6.4091 0.3437-6.4383-4.1562-4.6076-0.4688zm158.33 0.3438-4.131 0.1875-16.721 5.1562 6.6976 1.5 10.525-2.5 5.6953 11.844h0.0607l-0.43965-18.449-1.6866 2.2612h0.00005z" fill="#e3e2db"/>
+    <path id="rect10305-9-5" opacity=".85446" style="color:#000000" d="m215.44 818 2.6312 4.8729 7.0328-2.6372 15.87 4.8498 3.7519-0.7846 5.6678 1.7952 6.0397-2.0213 2.9938-1.7933 20.527 0.7826 5.1115 3.032 4.548 0.42551 5.7911-1.0106 5.878 1.516h6.487l3.3018-2.9522 7.9493-0.5053 22.891-1.0107 4.872-0.68284 4.3742 1.143 4.1299 2.1786 2.3796-0.1734 9.55-1.9601 2.893 0.82619 2.9862-0.77539 10.993 2.4759 10.526-2.5267 5.7016 11.871-0.31026 10.481 1.8466 14.246-1.231 24.242-1.1703 16.219-2.412 7.7302-4.0684 2.197-6.4236-1.0154-12.32 1.4293-13.454-0.0453-9.2326-0.7146-9.1491-1.384-9.264 1.1134-8.5687 0.31589-15.17-0.39891-11.978-1.0304-11.336 2.8586-8.0118-0.69202-11.279-1.452-15.325 1.3991-11.802-1.4444-9.039-0.0952-10.147 0.12536-7.6278-4.7279-2.5171-5.6126-2.217-9.5113 4.6262-58.082 2.7037-13.085v0.00004 0.00003z" fill="#aca793"/>
+    <path id="rect10309-8-0" opacity=".85446" style="color:#000000" d="m208.41 896.27-0.005-52.06-1.4772-19.14-1.524-9.5383-1.5111-3.6499 0.26834-4.6763 5.1214-9.1629-5.202 6.4739-2.8718 14.825-2.4333 16.683 0.0321 14.616-0.6476 24.862 2.9029 11.135 2.4543 4.7714 1.5812 4.11 2.5721 3.4418 0.73955-2.6911h0.00002z" fill="#aca793"/>
+    <path id="path4517-1-0" opacity=".85446" style="color:#000000" d="m214.44 794.41-5.2056 3.6638-5.066 9.134-0.27706 4.7026 1.5072 3.61 1.5339 9.5625 1.4732 19.125v41.156l4.3284-54.281 2.6578-12.812 0.0607-0.2185-2.8704-4.625-5.6345-0.1875 0.28856-7.9063 1.5868-5.9587 5.6169-4.9643z" fill="#e3e2db"/>
+    <path id="path4522-1-19" opacity=".85446" d="m208.31 885.27-0.18225 3.4688 0.27338-3.375-0.0911-0.094zm-0.19743 3.9375-0.50119 9.6875 1.6402 2.7813 3.7665 2.8125v-0.062l-0.18225-0.125-2.5211-5.625-2.2022-9.4688z" fill-rule="evenodd" fill="#797463"/>
+    <path id="rect10305-9-6-1" style="color:#000000" d="m215.44 818 2.6312 4.8729 7.0328-2.6372 15.87 4.8498 3.7519-0.7846 5.6678 1.7952 6.0397-2.0213 2.9938-1.7933 20.527 0.7826 5.1115 3.032 4.548 0.42551 5.7911-1.0106 5.878 1.516h6.487l3.3018-2.9522 7.9493-0.5053 22.891-1.0107 4.872-0.68284 4.3742 1.143 4.1299 2.1786 2.3796-0.1734 9.55-1.9601 2.893 0.82619 2.9862-0.77539 10.993 2.4759 10.526-2.5267 5.7016 11.871-0.31026 10.481 1.8466 14.246-1.231 24.242-1.1703 16.219-2.412 7.7302-4.0684 2.197-6.4236-1.0153-12.32 1.4293-13.454-0.045-9.2326-0.7146-9.1491-1.3841-9.264 1.1134-8.5687 0.3159-15.17-0.3989-11.978-1.0304-11.336 2.8586-8.0118-0.692-11.279-1.452-15.325 1.3992-11.802-1.4444-9.039-0.095-10.147 0.1253-7.6278-4.7279-2.5171-5.6126-2.217-9.5113 4.6262-58.082 2.7037-13.085v0.00004 0.00003z" fill="url(#linearGradient4024)"/>
+    <path id="rect10307-2-9-5" style="color:#000000" d="m240.93 788.44-8.722 3.3744-9.1332 0.29289-3.159 2.7813-5.513-0.4688-5.6193 4.9375-1.552 5.9778-0.28856 7.9063 5.6345 0.1875 2.8704 4.625 3.4762-0.65782 5.4177 1.2203 3.1496 0.12525 2.4689-0.96875 5.7893 1.6875 4.1605-1.0938 4.5763 0.4688 6.4696 4.1874 6.4091-0.3437 2.0368-0.39063 13.819-0.45317 11.132-0.5937 5.388-0.75005 5.8364 1.3438 10.077 0.12495 5.9672-2.4688 14.094 1.1973 19.16-1.0722 5.2575 1.7343 5.1003-0.29682 14.045-0.15625 7.1714 2.9688 0.94166 0.2187 16.721-5.1562 4.131-0.1875 1.6858-2.25-5.7987-6.6648-1.6251-6.7813-2.111-1.625-5.096-8.0312-5.4137-3.1563h-5.5434l-4.9814-0.0937-3.8424-2.25-4.4803 0.6875-6.8647-0.9375-5.9721 1.9375-8.8882-0.4375-10.994-0.4063-10.234 0.70711-16.08-2.0196-10.206 1.625-7.4418-0.6875-4.1765 1.875-10.981-0.63843-15.894-0.4467-12.374-0.70791z" fill="url(#linearGradient4026)"/>
+    <path id="rect10309-8-4-6" style="color:#000000" d="m208.41 896.27-0.005-52.06-1.4772-19.14-1.524-9.5383-1.5111-3.6499 0.26834-4.6763 5.1214-9.1629-5.202 6.4739-2.8718 14.825-2.4333 16.683 0.0321 14.616-0.6476 24.862 2.9029 11.135 2.4543 4.7714 1.5812 4.11 2.5721 3.4418 0.73955-2.6911h0.00002z" fill="url(#linearGradient4028)"/>
+    <path id="path4517-1-6-7" style="color:#000000" d="m214.44 794.41-5.2056 3.6638-5.066 9.134-0.27706 4.7026 1.5072 3.61 1.5339 9.5625 1.4732 19.125v41.156l4.3284-54.281 2.6578-12.812 0.0607-0.2185-2.8704-4.625-5.6345-0.1875 0.28856-7.9063 1.5868-5.9587 5.6169-4.9643z" fill="url(#linearGradient4030)"/>
+    <path id="path4520-4-2-3" style="color:#000000" d="m295.7 821.86-5.9926-1.3438-5.3568 0.7188-11.132 0.5937-13.732 0.46483 20.46 0.78517 5.103 3.0313 4.5562 0.4062 5.7864-1 5.8775 1.5h6.485l3.3108-2.9375 7.943-0.5 22.887-1.0312 4.8725-0.67192 4.3831 1.1485 4.1244 2.1796 2.3844-0.1875 9.5528-1.9375 2.8859 0.8125 2.9916-0.7812 3.3564 0.75-7.1245-2.9375-14.092 0.125-5.0066 0.31245-5.3512-1.75-19.513 0.7187-13.803-0.875-5.8734 2.5312-9.9829-0.12495zm-55.824-3.4688-4.1605 1-5.7268-1.75-2.5314 1.0625-3.1066-0.10469-5.4701-1.2169-3.4533 0.66146 2.6241 4.8352 7.0306-2.6385 15.878 4.8384 3.7688-0.7812 5.6474 1.8125 6.0446-2.0313 2.9981-1.7994-2.0564 0.39317-6.4091 0.3437-6.5008-4.1562-4.5763-0.4688zm158.36 0.3438-4.131 0.1875-16.721 5.1562 6.6976 1.5 10.525-2.5 5.6953 11.844h0.0607l-0.43965-18.449-1.6866 2.2612h0.00005z" fill="url(#linearGradient4032)"/>
+    <path id="rect10305-9-6-2-0" style="color:#000000" d="m213.3 828.62-2.5971 22.13-3.1409 39.489 3.8661 12.473-2.0177-12.023 1.0763-18.998 1.913-21.72 0.90036-21.35z" filter="url(#filter4536-1)" fill="#7f7a66"/>
+    <path id="path4520-4-2-2-6" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m397.96 818.25-3.875 0.1875h-0.0625-0.0625l-16.719 5.1562 0.28125 0.96875 16.625-5.125h0.0312l4.0625-0.1875h0.0312v-0.5l0.375 0.28125 0.75-1.9375-1.4374 1.1562zm-179.06-1.375-0.125 0.0312-3.4375 0.65625 0.1875 0.96875 3.3438-0.625 5.375 1.1875h0.0312 0.0625l3.0938 0.125h0.125l0.0937-0.0625 2.3438-0.96875 5.5938 1.6875 0.125 0.0312 0.125-0.0312 4-0.96875h0.0312l4.4375 0.46875 6.375 4.0625 0.15625 0.0937h0.15625l6.4062-0.34375h0.0312l0.0312-0.0312 2.0312-0.375h0.0312l13.719-0.43745 11.125-0.59375h0.0312l0.0312-0.0312 5.2188-0.6875 5.9375 1.3125 0.0625 0.0312h0.0312l10 0.125h0.0937l0.0937-0.0625 5.7188-2.4688 13.75 0.875h0.0312l19.438-0.71875 5.25 1.7188 0.0937 0.0312h0.0937l5-0.3125h0.0312l14-0.125 6.9688 2.875 0.40625-0.90625-7.125-2.9375-0.0937-0.0312h-0.125l-14.094 0.125-4.8438 0.3125h-0.0312l-5.3125-1.75-0.0937-0.0312-0.0625 0.0312-19.469 0.71875h-0.0625l-13.75-0.875-0.125-0.0312-0.0936 0.0625-5.8125 2.5-9.75-0.125-6-1.3438-0.0625-0.0312-0.0937 0.0312-5.3125 0.71875h-0.0625l-11.062 0.59375h-0.0312l-13.719 0.4375 0.0312 0.8125-0.15625-0.8125-2 0.40625h-0.0625l-6.1875 0.34375-6.375-4.0938-0.0937-0.0625h-0.125l-4.5625-0.46875-0.0937-0.0312-0.0625 0.0312-4.0312 0.96875-5.5938-1.7188-0.1875-0.0312-0.15625 0.0625-2.4375 1.0312-3-0.125-5.375-1.1875-0.0937-0.0312v-0.00005z" filter="url(#filter4596-6)" fill="#afaa98"/>
+    <path id="rect10309-8-4-2-0" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m203.83 811.86 1.0771 3.7672 1.5312 9.4688v0.0625l1.4688 19.062v0.0312l-0.35355 51.943 0.32322 2.2981 0.32322-2.9168 0.70711-51.355v-0.0312-0.0312l-1.4688-19.125v-0.0312l-1.5312-9.5625-2.0771-3.5798z" filter="url(#filter4654-6)" fill="#888470"/>
+    <path id="rect10305-9-6-8-1" style="color:#000000" d="m215.44 818 2.6312 4.8729 7.0328-2.6372 15.87 4.8498 3.7519-0.7846 5.6678 1.7952 6.0397-2.0213 2.9938-1.7933 20.527 0.7826 5.1115 3.032 4.548 0.42551 5.7911-1.0106 5.878 1.516h6.487l3.3018-2.9522 7.9493-0.5053 22.891-1.0107 4.872-0.68284 4.3742 1.143 4.1299 2.1786 2.3796-0.1734 9.55-1.9601 2.893 0.82619 2.9862-0.77539 10.993 2.4759 10.526-2.5267 5.7016 11.871-0.31026 10.481 1.8466 14.246-1.231 24.242-1.1703 16.219-2.412 7.7302-4.0684 2.197-6.4236-1.0153-12.32 1.4293-13.454-0.045-9.2326-0.7146-9.1491-1.3841-9.264 1.1134-8.5687 0.3159-15.17-0.3989-11.978-1.0304-11.336 2.8586-8.0118-0.692-11.279-1.452-15.325 1.3992-11.802-1.4444-9.039-0.095-10.147 0.1253-7.6278-4.7279-2.5171-5.6126-2.217-9.5113 4.6262-58.082 2.7037-13.085v0.00004 0.00003z" fill="url(#linearGradient4034)"/>
+    <path id="path4517-1-6-8-9" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m209.01 798.41-0.125 0.0937-0.0312 0.15625-1.8589 6.0259v0.0625 0.0625l-0.3125 7.9062v0.5l0.5 0.0312 5.2424 0.36428 2.7263 4.0107 0.52275 0.49686-2.429-5.4656-0.125-0.21875h-0.28125l-5.125-0.15625 0.28125-7.4375 1.5312-5.6875 4.7487-4.3005-5.2648 3.5559z" filter="url(#filter4766-3)" fill="#e3e2db"/>
+   </g>
+   <path id="path7353" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m240.5 829.86v61h-22.719v5h27.719v-61h59v61h30v-61h16v61h28.5v-5h-23.5v-61h-26v61h-20v-61h-69z" fill-opacity=".40670" transform="translate(0 -452.36)" fill="#f2f1ef"/>
+   <path id="path7353-5" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m240.5 377.5v61h-22.719v5h1v-3h22.719v-61h68v-2h-69zm89 0v61h-19v2h20v-61h25v-2h-26zm-25 7v59h1v-59h-1zm46 0v59h1v-59h-1zm6 54v2h22.5v-2h-22.5z" filter="url(#filter7410)" fill="#4b473c"/>
+   <path id="path7353-8" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m308.5 829.86v60h1v-60h-1zm46 0v60h1v-60h-1zm-110 4v61h-26.719v1h27.719v-61h58v-1h-59zm89 0v61h-29v1h30v-61h15v-1h-16zm44.5 57v4h-27.5v1h28.5v-5h-1z" transform="translate(0 -452.36)" filter="url(#filter7414)" fill="#e2e0da"/>
+   <path id="path4332" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m295 109.34v151.53 91.531h10v-91.531-151.53h-10z" fill="#d4aa00"/>
+   <path id="path4332-4" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m297 109.34v243.06h6v-243.06h-6z" fill-opacity=".54440" filter="url(#filter5536)" fill="#fcff4c"/>
+   <path id="path4332-3" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m274.94 116.59-9.875 1.5c7.92 51.61 19.94 109.69 19.94 162.79v71.531h10v-71.531c0-54.598-12.202-113.07-20.062-164.28z" fill="#d45500"/>
+   <path id="path4332-3-9" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m272.94 116.59-5.875 1.5c7.92 51.61 19.94 109.69 19.94 162.79v71.531h6v-71.531c0-54.598-12.202-113.07-20.062-164.28z" fill-opacity=".40927" filter="url(#filter5470)" fill="#fca"/>
+   <path id="path4332-3-5" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m244.75 133.78-9.5 3.125c19.28 58.02 39.75 96.67 39.75 183.98v31.531h10v-31.531c0-88.882-21.224-129.84-40.25-187.09z" fill="#a00"/>
+   <path id="path4332-3-5-8" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m242.75 133.78-3.5 3.125c19.277 58.01 38.25 96.664 38.25 183.97v31.531h5.5v-31.531c0-88.882-21.224-129.84-40.25-187.09z" fill-opacity=".47490" filter="url(#filter5412)" fill="#faa"/>
+   <path id="path4332-3-5-7" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m214.19 156.62-8.375 5.4688c28.45 43.57 59.18 77.47 59.18 158.79v31.531h10v-31.531c0-83.882-32.86-121.45-60.812-164.25z" fill="#784421"/>
+   <path id="path4332-3-5-7-0" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m215.19 162.62-4.375-0.53125c28.45 43.57 57.68 77.47 57.68 158.79v31.531h4v-31.531c0-83.882-29.36-115.45-57.312-158.25z" fill-opacity=".37838" filter="url(#filter5354)" fill="#deaa87"/>
+   <path id="path4332-3-5-7-3" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m183.16 185.47-6.3125 7.75c28.98 23.48 78.15 58.28 78.15 127.66v31.531h10v-31.531c0-74.139-53.403-112.37-81.844-135.41z" fill="#1a1a1a"/>
+   <path id="path4332-3-5-7-3-15" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m183.16 189.47-4.3125 1.75c28.98 23.48 79.65 53.27 79.65 129.66v31.531h4v-31.531c0-71.639-50.903-108.37-79.344-131.41z" fill-opacity=".31274" filter="url(#filter5288)" fill="#fff"/>
+   <path id="path4332-3-0" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m325.06 116.59c-7.86 51.21-20.06 109.69-20.06 164.29v71.531h10v-71.531c0-53.099 12.017-111.18 19.938-162.78l-9.875-1.5z" fill="#008000"/>
+   <path id="path4332-3-9-6" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m272.94 112.59-5.875 1.5c7.92 51.61 19.94 109.69 19.94 162.79v71.531h6v-71.531c0-54.598-12.202-113.07-20.062-164.28z" fill-opacity=".40927" transform="matrix(-1 0 0 1 600.06 4)" filter="url(#filter5470-6)" fill="#cfa"/>
+   <path id="path4332-3-5-91" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m355.25 133.78c-19.03 57.26-40.25 98.21-40.25 187.1v31.531h10v-31.531c0-87.304 20.473-125.96 39.75-183.97l-9.5-3.125z" fill="#04a"/>
+   <path id="path4332-3-5-8-6" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m242.75 129.78-3.5 3.125c19.277 58.01 38.25 96.664 38.25 183.97v31.531h5.5v-31.531c0-88.882-21.224-129.84-40.25-187.09z" fill-opacity=".47490" transform="matrix(-1,0,0,1,600.25,4)" filter="url(#filter5412-5)" fill="#acf"/>
+   <path id="path4332-3-5-7-1" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m385.81 156.62c-27.95 42.81-60.81 80.37-60.81 164.26v31.531h10v-31.531c0-81.315 30.735-115.21 59.188-158.78l-8.375-5.4688z" fill="#aa00d4"/>
+   <path id="path4332-3-5-7-0-9" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m275.19 158.62-4.375-0.53125c28.45 43.57 57.68 77.47 57.68 158.79v31.531h4v-31.531c0-83.882-29.36-115.45-57.312-158.25z" fill-opacity=".48263" transform="matrix(-1 0 0 1 660.81 4)" filter="url(#filter5354-5)" fill="#eaf"/>
+   <path id="path4332-3-5-7-3-0" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m416.84 185.47c-28.44 23.03-81.84 61.27-81.84 135.41v31.531h10v-31.531c0-69.374 49.168-104.18 78.156-127.66l-6.3125-7.75z" fill="#6f6f91"/>
+   <path id="path4332-3-5-7-3-15-1" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m183.16 185.47-4.3125 1.75c28.98 23.48 78.15 55.27 78.15 129.65v31.531h5v-31.531c0-69.13-50.4-108.37-78.84-131.4z" fill-opacity=".42857" transform="matrix(-1 0 0 1 598.84 4)" filter="url(#filter5288-0)" fill="#dbdbe3"/>
+   <path id="rect4622-0" style="color:#000000" d="m225.64 343.5h148.71v16.777c-38.37 1.6959-81.343 2.6948-148.71 0v-16.777z" fill="url(#radialGradient4036)"/>
+   <path id="rect4622" style="color:#000000" d="m253.93 333h92.143v20.357c-23.774 2.0577-50.401 3.2698-92.143 0v-20.357z" fill="#1a1a1a"/>
+   <g id="g4720" transform="translate(0,8)">
+    <path id="rect4625" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-2" transform="matrix(.98787 -.15526 .15526 .98787 -42.271 63.417)">
+    <path id="rect4625-0" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-9" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-0" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-6" transform="matrix(.94451 -.32848 .32848 .94451 -79.478 131.23)">
+    <path id="rect4625-93" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-5" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-6" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-0" transform="matrix(.84411 -.53617 .53617 .84411 -103.8 224.17)">
+    <path id="rect4625-6" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-2" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-1" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-4" transform="matrix(.63008 -.77653 .77653 .63008 -96.161 351.53)">
+    <path id="rect4625-05" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-0" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-2" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-2-1" transform="matrix(-.98787 -.15526 -.15526 .98787 642.52 63.417)">
+    <path id="rect4625-0-8" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-9-4" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-0-8" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-6-1" transform="matrix(-.94451 -.32848 -.32848 .94451 679.72 131.23)">
+    <path id="rect4625-93-8" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-5-1" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-6-7" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-0-8" transform="matrix(-.84411 -.53617 -.53617 .84411 704.05 224.17)">
+    <path id="rect4625-6-8" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-2-3" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-1-5" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <g id="g4720-4-5" transform="matrix(-.63008 -.77653 -.77653 .63008 696.41 351.53)">
+    <path id="rect4625-05-6" style="color:#000000" d="m300.03 0.9989c-1.1099 0.0045-2.2085 0.96259-2.3617 2.8125-3.4868 42.092-1.1379 61.943-1.3171 72.469-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126h12.532v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.17845-1.8678-1.2972-2.817-2.4071-2.8125l-0.00015-0.0001z" fill="#1a1a1a"/>
+    <path id="path4657-0-4" style="color:#000000" d="m303.35 38.204a2.1213 28.284 0 1 1 -4.2426 0 2.1213 28.284 0 1 1 4.2426 0z" transform="translate(-2.1213 8.4853)" fill="url(#radialGradient4038)"/>
+    <path id="rect4625-9-2-6" style="color:#000000" d="m298.41 7.3114c-3.4868 42.092 0.11212 56.693-0.0671 67.219-0.1512 8.8808-4.6309 14.242-4.3146 14.969 1.5637 3.5938 1.7792 8.6526 1.7792 11.905v17.126l10.532 1.75v-17.225c0-3.4204 0.19044-8.2459 1.6756-11.806 0.41457-0.9939-4.3147-6.0874-4.3147-14.969 0-10.271 2.7656-30.213-1.2717-72.469-0.67872-3.8375-3.0216 0.39801-4.019 3.4999z" fill="url(#radialGradient4040)"/>
+   </g>
+   <path id="rect4622-8" style="color:#000000" d="m254.32 333.77h91.362v2.5144c-23.573 1.6946-49.974 2.6928-91.362 0v-2.5144z" fill="url(#linearGradient4074)"/>
+   <path id="rect4622-8-0" style="color:#000000" d="m338.82 333.63h6.7367v19.615c-3.3472-0.0173-4.745 0.15065-6.7367 0v-19.615z" fill="url(#linearGradient4076)"/>
+   <path id="rect4622-8-0-4" style="color:#000000" d="m255.07 308.68h90.487v24.565c-23.347 1.9827-49.495 3.1506-90.487 0v-24.565z" fill="url(#linearGradient4078)"/>
+  </g>
+ </g>
+</svg>
index 2bcc0ae13f53306a2743abc7e692695523a5eff9..2b95f2346fb2d22d3fd8b5bf4199aa980ba0bd88 100644 (file)
--- a/decode.c
+++ b/decode.c
@@ -423,7 +423,8 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data)
        GSList *ann_list, *l;
        int i;
        char **ann_descr;
-       gboolean show;
+       gboolean show_ann, show_snum, show_class, show_quotes, show_abbrev;
+       const char *quote;
 
        (void)cb_data;
 
@@ -438,33 +439,59 @@ void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data)
 
        dec = pdata->pdo->di->decoder;
        pda = pdata->data;
-       show = FALSE;
+       show_ann = FALSE;
        for (l = ann_list; l; l = l->next) {
                if (GPOINTER_TO_INT(l->data) == -1
                                || GPOINTER_TO_INT(l->data) == pda->ann_class) {
-                       show = TRUE;
+                       show_ann = TRUE;
                        break;
                }
        }
-       if (!show)
+       if (!show_ann)
                return;
 
-       if (opt_loglevel <= SR_LOG_WARN) {
-               /* Show only the longest annotation. */
-               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 \"%s\"", pdata->pdo->proto_id, pda->ann_text[0]);
-               } else {
-                       /* Protocol decoder id, annotation class,
-                        * all annotation strings. */
-                       ann_descr = g_slist_nth_data(dec->annotations, pda->ann_class);
-                       printf(" %s: %s:", pdata->pdo->proto_id, ann_descr[0]);
-                       for (i = 0; pda->ann_text[i]; i++)
-                               printf(" \"%s\"", pda->ann_text[i]);
-               }
+       /*
+        * Determine which fields of the annotation to display. Inspect
+        * user specified options as well as the verbosity of the log level:
+        * - Optionally show the sample numbers for the annotation's span.
+        * - Always show the protocol decoder ID.
+        * - Optionally show the annotation's class description.
+        * - Always show the longest annotation text.
+        * - Optionally show alternative annotation text (abbreviations
+        *   for different zoom levels).
+        * - Optionally put quote marks around annotation text, when
+        *   recipients might have to deal with a set of text variants.
+        */
+       show_snum = show_class = show_quotes = show_abbrev = FALSE;
+       if (opt_pd_samplenum || opt_loglevel > SR_LOG_WARN) {
+               show_snum = TRUE;
+       }
+       if (opt_loglevel > SR_LOG_WARN) {
+               show_quotes = TRUE;
+       }
+       if (opt_loglevel > SR_LOG_INFO) {
+               show_class = TRUE;
+               show_abbrev = TRUE;
+       }
+
+       /*
+        * Display the annotation's fields after the layout was
+        * determined above.
+        */
+       if (show_snum) {
+               printf("%" PRIu64 "-%" PRIu64 " ",
+                       pdata->start_sample, pdata->end_sample);
+       }
+       printf("%s: ", pdata->pdo->proto_id);
+       if (show_class) {
+               ann_descr = g_slist_nth_data(dec->annotations, pda->ann_class);
+               printf("%s: ", ann_descr[0]);
+       }
+       quote = show_quotes ? "\"" : "";
+       printf("%s%s%s", quote, pda->ann_text[0], quote);
+       if (show_abbrev) {
+               for (i = 1; pda->ann_text[i]; i++)
+                       printf(" %s%s%s", quote, pda->ann_text[i], quote);
        }
        printf("\n");
        fflush(stdout);
@@ -479,7 +506,7 @@ void show_pd_meta(struct srd_proto_data *pdata, void *cb_data)
                /* Not in the list of PDs whose meta output we're showing. */
                return;
 
-       if (opt_loglevel > SR_LOG_WARN)
+       if (opt_pd_samplenum || opt_loglevel > SR_LOG_WARN)
                printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample);
        printf("%s: ", pdata->pdo->proto_id);
        printf("%s: %s", pdata->pdo->meta_name, g_variant_print(pdata->data, FALSE));
@@ -491,7 +518,7 @@ void show_pd_binary(struct srd_proto_data *pdata, void *cb_data)
 {
        struct srd_proto_data_binary *pdb;
        gpointer classp;
-       int class;
+       int classi;
 
        (void)cb_data;
 
@@ -500,9 +527,9 @@ void show_pd_binary(struct srd_proto_data *pdata, void *cb_data)
                /* Not in the list of PDs whose meta output we're showing. */
                return;
 
-       class = GPOINTER_TO_INT(classp);
+       classi = GPOINTER_TO_INT(classp);
        pdb = pdata->data;
-       if (class != -1 && class != pdb->bin_class)
+       if (classi != -1 && classi != pdb->bin_class)
                /* Not showing this binary class. */
                return;
 
index 1666f895b6eff284d6df8a322f9d4c01f9677b5f..c87d383e8be74b5fb74b5886eed5dcf11662c6f6 100644 (file)
@@ -1,4 +1,4 @@
-.TH SIGROK\-CLI 1 "May 04, 2014"
+.TH SIGROK\-CLI 1 "October 22, 2018"
 .SH "NAME"
 sigrok\-cli \- Command-line client for the sigrok software
 .SH "SYNOPSIS"
@@ -21,16 +21,17 @@ Show a help text and exit.
 .TP
 .B "\-V, \-\-version"
 Show
-.B sigrok-cli
+.B sigrok\-cli
 version and the versions of libraries used.
 .TP
-.B "\-L, \-\-list-supported"
+.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>
 A driver must always be selected (unless doing a global scan). Use the
-\fB-V\fP option to get a list of available drivers.
+.BR "\-L " ( "\-\-list-supported" ")"
+option to get a list of available drivers.
 .sp
 Drivers can take options, in the form \fBkey=value\fP
 separated by colons.
@@ -39,49 +40,74 @@ Drivers communicating with hardware via a serial port always need the port
 specified as the \fBconn\fP option. For example, to use the
 Openbench Logic Sniffer:
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver=ols:conn=/dev/ttyACM0"
+.RB "  $ " "sigrok\-cli \-\-driver=ols:conn=/dev/ttyACM0" " [...]"
 .sp
 Some USB devices don't use a unique VendorID/ProductID combination, and thus
 need that specified as well. This also uses the \fBconn\fP option, using
 either \fBVendorID.ProductID\fP or \fBbus.address\fP:
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver=uni-t-ut61e:conn=1a86.e008"
+USB \fBVendorID.ProductID\fP example:
+.sp
+.RB "  $ " "sigrok\-cli \-\-driver=uni\-t\-ut61e:conn=1a86.e008" " [...]"
+.sp
+USB \fBbus.address\fP example:
+.sp
+.RB "  $ " "sigrok\-cli \-\-driver=uni\-t\-ut61e:conn=4.6" " [...]"
 .TP
-.BR "\-c, \-\-config " <device>
+.BR "\-c, \-\-config " <deviceoption>
 A colon-separated list of device options, where each option takes the form
 .BR key=value .
 For example, to set the samplerate to 1MHz on a device supported by the
 fx2lafw driver, you might specify
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver=fx2lafw \-\-config samplerate=1m"
+.RB "  $ " "sigrok\-cli \-d fx2lafw \-\-config samplerate=1m" " [...]"
 .sp
 Samplerate is an option common to most logic analyzers. The argument specifies
 the samplerate in Hz. You can also specify the samplerate in kHz, MHz or GHz.
 The following are all equivalent:
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver fx2lafw \-\-config samplerate=1000000"
+.RB "  $ " "sigrok\-cli \-d fx2lafw \-\-config samplerate=1000000" " [...]"
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver fx2lafw \-\-config samplerate=1m"
+.RB "  $ " "sigrok\-cli \-d fx2lafw \-\-config samplerate=1m" " [...]"
 .sp
-.RB "  $ " "sigrok\-cli \-\-driver fx2lafw \-\-config \(dqsamplerate=1 MHz\(dq"
+.RB "  $ " "sigrok\-cli \-d fx2lafw \-\-config \(dqsamplerate=1 MHz\(dq" " [...]"
 .TP
 .BR "\-i, \-\-input\-file " <filename>
-Load input from a file instead of a hardware device. If the
+Load input from a file instead of a hardware device. You can specify
+"-" to use stdin as input. If the
 .B \-\-input\-format
-option is not supplied, sigrok-cli attempts to autodetect the file format of
+option is not supplied, sigrok\-cli attempts to autodetect the file format of
 the input file.
+.sp
+Example for loading a sigrok session file:
+.sp
+.RB "  $ " "sigrok\-cli \-i example.sr" " [...]"
+.sp
+Example for loading a WAV file (autodetection of input format):
+.sp
+.RB "  $ " "sigrok\-cli \-i example.wav" " [...]
+.sp
+Example for loading a VCD file from stdin (autodetection of input format):
+.sp
+.RB "  $ " "cat example.vcd | sigrok\-cli \-i \-" " [...]
 .TP
 .BR "\-I, \-\-input\-format " <format>
 When loading an input file, assume it's in the specified format. If this
 option is not supplied (in addition to
 .BR \-\-input\-file ),
 sigrok-cli attempts to autodetect the file format of the input file. Use the
-.B \-V
+.BR "\-L " ( "\-\-list\-supported" ")"
 option to see a list of available input formats.
 .sp
 The format name may optionally be followed by a colon-separated list of
 options, where each option takes the form
 .BR "key=value" .
+.sp
+Example for loading a binary file with options:
+.sp
+.RB "  $ " "sigrok\-cli \-i example.bin"
+.br
+.BR "               \-I binary:numchannels=4:samplerate=1mhz" " [...]"
 .TP
 .BR "\-o, \-\-output\-file " <filename>
 Save output to a file instead of writing it to stdout. The default format
@@ -89,34 +115,26 @@ used when saving is the sigrok session file format. This can be changed with
 the
 .B \-\-output\-format
 option.
+.sp
+Example for saving data in the sigrok session format:
+.sp
+.RB "  $ " "sigrok\-cli " "[...] " "\-o example.sr"
 .TP
-.BR "\-O, \-\-output\-format " <formatname>
+.BR "\-O, \-\-output\-format " <format>
 Set the output format to use. Use the
-.B \-V
+.BR "\-L " ( "\-\-list\-supported" ")"
 option to see a list of available output formats.
 .sp
 The format name may optionally be followed by a colon-separated list of
 options, where each option takes the form
 .BR "key=value" .
 .sp
-Supported formats currently include
-.BR bits ,
-.BR hex ,
-.BR ascii ,
-.BR binary ,
-.BR vcd ,
-.BR ols ,
-.BR gnuplot ,
-.BR chronovu-la8 ,
-.BR csv ", and"
-.BR analog .
-.sp
-The
+For example, the
 .B bits
 or
 .B hex
 formats, for an ASCII bit or ASCII hexadecimal display, can take a "width" option, specifying the number of samples (in bits) to display per line. Thus
-.B hex:width=128
+.B "\-O hex:width=128"
 will display 128 bits per line, in hexadecimal:
 .sp
  0:ffff ffff ffff ffff ffff ffff ffff ffff
@@ -128,12 +146,18 @@ like this:
 .sp
  0:11111111 11111111 11111111 11111111 [...]
  1:11111111 00000000 11111111 00000000 [...]
+.sp
+Example for saving data in the CSV format with options:
+.sp
+.RB "  $ " "sigrok\-cli " "[...] " "\-o example.csv \-O csv:dedup:header=false"
+.sp
+Notice that boolean options are \fBtrue\fP when no value gets specified.
 .TP
 .BR "\-C, \-\-channels " <channellist>
 A comma-separated list of channels to be used in the session.
 .sp
 Note that sigrok always names the channels according to how they're shown on
-the enclosure of the hardware. If your logic analyzer numbers the channels 0-15,
+the enclosure of the hardware. If your logic analyzer numbers the channels 0\-15,
 that's how you must specify them with this option. An oscilloscope's channels
 would generally be referred to as "CH1", "CH2", and so on.
 Use the \fB\-\-show\fP option to see a list of channel names for your device.
@@ -163,11 +187,15 @@ will set the name of channel 1 to
 .BR "MISO" .
 .TP
 .BR "\-g, \-\-channel\-group "<channel\ group>
-Specify the channel group to operate on.
-
-Some devices organize channels into groups, the settings of which can
-only be changed as a group. The list of channel groups, if any, is displayed
-with the \fB\-\-show\fP command.
+Specify the channel group to operate on. Some devices organize channels into
+groups, the settings of which can only be changed as a group. The list of
+channel groups, if any, is displayed with the \fB\-\-show\fP command.
+.sp
+Examples:
+.sp
+.RB "  $ " "sigrok\-cli \-g CH1" " [...]"
+.sp
+.RB "  $ " "sigrok\-cli \-d demo \-g Logic \-c pattern=graycode" " [...]"
 .TP
 .BR "\-t, \-\-triggers " <triggerlist>
 A comma-separated list of triggers to use, of the form
@@ -190,7 +218,7 @@ Any kind of change on a pin (either a rising or a falling edge).
 Not every device supports all of these trigger types. Use the \fB\-\-show\fP
 command to see which triggers your device supports.
 .TP
-.BR "\-w, \-\-wait-trigger"
+.BR "\-w, \-\-wait\-trigger"
 Don't output any sample data (even if it's actually received from the
 hardware) before the trigger condition is met. In other words, do not output
 any pre-trigger data. This option is useful if you don't care about the data
@@ -201,7 +229,7 @@ nonetheless).
 This option allows the user to specify a comma-separated list of protocol
 decoders to be used in this session. The decoders are specified by their
 ID, as shown in the
-.B \-\-version
+.BR "\-L " ( "\-\-list\-supported" ")"
 output.
 .sp
 Example:
@@ -240,6 +268,36 @@ is an option supported by the
 protocol decoder. Additionally, the user tells sigrok to decode the SPI
 protocol using channel 1 as MISO signal for SPI, channel 5 as MOSI, channel 3
 as CLK, and channel 0 as CS# signal.
+.sp
+Notice that the
+.B sigrok\-cli
+application does not support "name matching". Instead it's assumed that the
+traces in the input stream match the order of the decoder's input signals,
+or that users explicitly specify the input channel to decoder signal mapping.
+.br
+.sp
+When multiple decoders are specified in the same
+.BR -P
+option, they will be stacked on top of each other in the specified order.
+.sp
+Example:
+.sp
+ $
+.B "sigrok\-cli \-i <file.sr> \-P i2c,eeprom24xx"
+.br
+ $
+.B "sigrok\-cli \-i <file.sr> \-P uart:baudrate=31250,midi"
+.sp
+When multiple
+.BR -P
+options are specified, each of them creates one decoder stack, which
+executes in parallel to other decoder stacks.
+.sp
+Example:
+.sp
+ $
+.B "sigrok\-cli \-i <file.sr> \-P uart:tx=D0:rx=D1 \-P timing:data=D2"
+.sp
 .TP
 .BR "\-A, \-\-protocol\-decoder\-annotations " <annotations>
 By default, only the stack's topmost protocol decoder's annotation output is
@@ -247,7 +305,7 @@ shown. With this option another decoder's annotation can be selected for
 display, by specifying its ID:
 .sp
  $
-.B "sigrok\-cli \-i <file.sr> \-P i2c,i2cfilter,edid -A i2c"
+.B "sigrok\-cli \-i <file.sr> \-P i2c,i2cfilter,edid \-A i2c"
 .sp
 If a protocol decoder has multiple annotations, you can also specify
 which one of them to show by specifying its short description like this:
@@ -255,14 +313,14 @@ which one of them to show by specifying its short description like this:
  $
 .B "sigrok\-cli \-i <file.sr> \-P i2c,i2cfilter,edid"
 .br
-.B "              \-A i2c=data-read"
+.B "              \-A i2c=data\-read"
 .sp
 Select multiple annotations by separating them with a colon:
 .sp
  $
 .B "sigrok\-cli \-i <file.sr> \-P i2c,i2cfilter,edid"
 .br
-.B "              \-A i2c=data-read:data-write"
+.B "              \-A i2c=data\-read:data\-write"
 .sp
 You can also select multiple protocol decoders, with an optional selected
 annotation each, by separating them with commas:
@@ -270,7 +328,7 @@ annotation each, by separating them with commas:
  $
 .B "sigrok\-cli \-i <file.sr> \-P i2c,i2cfilter,edid"
 .br
-.B "              \-A i2c=data-read:data-write,edid"
+.B "              \-A i2c=data\-read:data\-write,edid"
 .TP
 .BR "\-M, \-\-protocol\-decoder\-meta " <pdname>
 When given, show protocol decoder meta output instead of annotations.
@@ -309,8 +367,12 @@ binary class you're interested in)
 .sp
 Not every decoder generates binary output.
 .TP
+.BR "\-\-protocol\-decoder\-samplenum
+When given, decoder annotations will include sample numbers, too.
+This allows consumers to receive machine readable timing information.
+.TP
 .BR "\-l, \-\-loglevel " <level>
-Set the libsigrok and libsigrokdecode loglevel. At the moment \fBsigrok-cli\fP
+Set the libsigrok and libsigrokdecode loglevel. At the moment \fBsigrok\-cli\fP
 doesn't support setting the two loglevels independently. The higher the
 number, the more debug output will be printed. Valid loglevels are:
 .sp
@@ -359,15 +421,15 @@ Example:
 .br
  The following devices were found:
 .br
- demo - Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
+ demo \- Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
 .br
- fx2lafw:conn=3.26 - CWAV USBee SX with 8 channels: 0 1 2 3 4 5 6 7
+ fx2lafw:conn=3.26 \- CWAV USBee SX with 8 channels: 0 1 2 3 4 5 6 7
 .sp
 However, not all devices are auto-detectable (e.g. serial port based ones).
 For those you'll have to provide a \fBconn\fP option, see above.
 .sp
  $
-.B "sigrok\-cli \-\-driver digitek-dt4000zc:conn=/dev/ttyUSB0 \-\-scan
+.B "sigrok\-cli \-\-driver digitek\-dt4000zc:conn=/dev/ttyUSB0 \-\-scan
 .br
  The following devices were found:
 .br
diff --git a/input.c b/input.c
index 21c28cd70a74467e665eab3440324b728e6402c9..8eeb94c869b57679eb75ca4494248740c52633a3 100644 (file)
--- a/input.c
+++ b/input.c
@@ -28,7 +28,7 @@
 #include <glib.h>
 #include "sigrok-cli.h"
 
-#define BUFSIZE (16 * 1024)
+#define CHUNK_SIZE (4 * 1024 * 1024)
 
 static void load_input_file_module(void)
 {
@@ -43,6 +43,7 @@ static void load_input_file_module(void)
        int fd;
        ssize_t len;
        char *mod_id;
+       gboolean is_stdin;
 
        if (!sr_input_list())
                g_critical("No supported input formats available.");
@@ -54,8 +55,9 @@ static void load_input_file_module(void)
                mod_id = g_hash_table_lookup(mod_args, "sigrok_key");
        }
 
+       is_stdin = strcmp(opt_input_file, "-") == 0;
        fd = 0;
-       buf = g_string_sized_new(BUFSIZE);
+       buf = g_string_sized_new(CHUNK_SIZE);
        if (mod_id) {
                /* User specified an input module to use. */
                if (!(imod = sr_input_find(mod_id)))
@@ -72,11 +74,11 @@ static void load_input_file_module(void)
                        g_hash_table_destroy(mod_opts);
                if (mod_args)
                        g_hash_table_destroy(mod_args);
-               if ((fd = open(opt_input_file, O_RDONLY)) == -1)
+               if (!is_stdin && (fd = open(opt_input_file, O_RDONLY)) < 0)
                        g_critical("Failed to load %s: %s.", opt_input_file,
                                        g_strerror(errno));
        } else {
-               if (strcmp(opt_input_file, "-")) {
+               if (!is_stdin) {
                        /*
                         * An actual filename: let the input modules try to
                         * identify the file.
@@ -90,15 +92,16 @@ static void load_input_file_module(void)
                         * Taking input from a pipe: let the input modules try
                         * to identify the stream content.
                         */
-                       if (!strcmp(opt_input_file, "-")) {
+                       if (is_stdin) {
                                /* stdin */
                                fd = 0;
                        } else {
-                               if ((fd = open(opt_input_file, O_RDONLY)) == -1)
+                               fd = open(opt_input_file, O_RDONLY);
+                               if (fd == -1)
                                        g_critical("Failed to load %s: %s.", opt_input_file,
                                                        g_strerror(errno));
                        }
-                       if ((len = read(fd, buf->str, BUFSIZE)) < 1)
+                       if ((len = read(fd, buf->str, CHUNK_SIZE)) < 1)
                                g_critical("Failed to read %s: %s.", opt_input_file,
                                                g_strerror(errno));
                        buf->len = len;
@@ -108,12 +111,12 @@ static void load_input_file_module(void)
                        g_critical("Error: no input module found for this file.");
        }
        sr_session_new(sr_ctx, &session);
-       sr_session_datafeed_callback_add(session, &datafeed_in, NULL);
+       sr_session_datafeed_callback_add(session, &datafeed_in, session);
 
        got_sdi = FALSE;
        while (TRUE) {
                g_string_truncate(buf, 0);
-               len = read(fd, buf->str, BUFSIZE);
+               len = read(fd, buf->str, CHUNK_SIZE);
                if (len < 0)
                        g_critical("Read failed: %s", g_strerror(errno));
                if (len == 0)
@@ -174,7 +177,7 @@ void load_input_file(void)
                        }
                        main_loop = g_main_loop_new(NULL, FALSE);
 
-                       sr_session_datafeed_callback_add(session, datafeed_in, NULL);
+                       sr_session_datafeed_callback_add(session, datafeed_in, session);
                        sr_session_stopped_callback_set(session,
                                (sr_session_stopped_callback)g_main_loop_quit,
                                main_loop);
diff --git a/main.c b/main.c
index e4d321b51b0d8faa1a818ffae36586db2f9675c3..689c2d57496ba5b4506698165318a88459ea7e2e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -138,7 +138,8 @@ static void get_option(void)
 
        if ((devargs = parse_generic_arg(opt_config, FALSE)))
                set_dev_options(sdi, devargs);
-       else devargs = NULL;
+       else
+               devargs = NULL;
 
        if ((ret = maybe_config_get(driver, sdi, cg, ci->key, &gvar)) != SR_OK)
                g_critical("Failed to get '%s': %s", opt_get, sr_strerror(ret));
index ca16e4c18a386f88981379b8853474d2aad93361..b9e149433a0862426a23179558ccbb3eb6300461 100644 (file)
--- a/options.c
+++ b/options.c
@@ -38,6 +38,7 @@ gchar **opt_pds = NULL;
 gchar *opt_pd_annotations = NULL;
 gchar *opt_pd_meta = NULL;
 gchar *opt_pd_binary = NULL;
+gboolean opt_pd_samplenum = FALSE;
 #endif
 gchar *opt_input_format = NULL;
 gchar *opt_output_format = NULL;
@@ -134,6 +135,8 @@ static const GOptionEntry optargs[] = {
                        "Protocol decoder meta output to show", NULL},
        {"protocol-decoder-binary", 'B', 0, G_OPTION_ARG_CALLBACK, &check_opt_pd_binary,
                        "Protocol decoder binary output to show", NULL},
+       {"protocol-decoder-samplenum", 0, 0, G_OPTION_ARG_NONE, &opt_pd_samplenum,
+                       "Show sample numbers in decoder output", NULL},
 #endif
        {"scan", 0, 0, G_OPTION_ARG_NONE, &opt_scan_devs,
                        "Scan for devices", NULL},
@@ -147,7 +150,7 @@ static const GOptionEntry optargs[] = {
                        "Number of frames to acquire", NULL},
        {"continuous", 0, 0, G_OPTION_ARG_NONE, &opt_continuous,
                        "Sample continuously", NULL},
-       {"get", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_get, "Get device option only", NULL},
+       {"get", 0, 0, G_OPTION_ARG_CALLBACK, &check_opt_get, "Get device options only", NULL},
        {"set", 0, 0, G_OPTION_ARG_NONE, &opt_set, "Set device options only", NULL},
        {NULL, 0, 0, 0, NULL, NULL, NULL}
 };
index 4b55544c610eac954c7427a37938d4b2db12504b..152f9790b818bcffc94a1e81b1796852abbe8ce4 100644 (file)
--- a/session.c
+++ b/session.c
@@ -130,9 +130,6 @@ const struct sr_transform *setup_transform_module(const struct sr_dev_inst *sdi)
        GHashTable *fmtargs, *fmtopts;
        char *fmtspec;
 
-       if (!opt_transform_module)
-               opt_transform_module = "nop";
-
        fmtargs = parse_generic_arg(opt_transform_module, TRUE);
        fmtspec = g_hash_table_lookup(fmtargs, "sigrok_key");
        if (!fmtspec)
@@ -193,7 +190,9 @@ void datafeed_in(const struct sr_dev_inst *sdi,
                        g_critical("Failed to initialize output module.");
 
                /* Set up backup analog output module. */
-               oa = sr_output_new(sr_output_find("analog"), NULL, sdi, NULL);
+               if (outfile)
+                       oa = sr_output_new(sr_output_find("analog"), NULL,
+                                       sdi, NULL);
 
                rcvd_samples_logic = rcvd_samples_analog = 0;
 
@@ -311,9 +310,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
 
        if (o && !opt_pds) {
                if (sr_output_send(o, packet, &out) == SR_OK) {
-                       if (!out || (out->len == 0
-                                       && !opt_output_format
-                                       && packet->type == SR_DF_ANALOG)) {
+                       if (oa && !out) {
                                /*
                                 * The user didn't specify an output module,
                                 * but needs to see this analog data.
@@ -340,7 +337,8 @@ void datafeed_in(const struct sr_dev_inst *sdi,
                        sr_output_free(o);
                o = NULL;
 
-               sr_output_free(oa);
+               if (oa)
+                       sr_output_free(oa);
                oa = NULL;
 
                if (outfile && outfile != stdout)
@@ -531,7 +529,7 @@ void run_session(void)
        struct sr_trigger *trigger;
        struct sr_dev_inst *sdi;
        uint64_t min_samples, max_samples;
-       GArray *dev_opts;
+       GArray *drv_opts;
        guint i;
        int is_demo_dev;
        struct sr_dev_driver *driver;
@@ -550,18 +548,18 @@ void run_session(void)
 
                driver = sr_dev_inst_driver_get(sdi);
 
-               if (!(dev_opts = sr_dev_options(driver, sdi, NULL))) {
-                       g_critical("Failed to query list device options.");
+               if (!(drv_opts = sr_dev_options(driver, NULL, NULL))) {
+                       g_critical("Failed to query list of driver options.");
                        return;
                }
 
                is_demo_dev = 0;
-               for (i = 0; i < dev_opts->len; i++) {
-                       if (g_array_index(dev_opts, uint32_t, i) == SR_CONF_DEMO_DEV)
+               for (i = 0; i < drv_opts->len; i++) {
+                       if (g_array_index(drv_opts, uint32_t, i) == SR_CONF_DEMO_DEV)
                                is_demo_dev = 1;
                }
 
-               g_array_free(dev_opts, TRUE);
+               g_array_free(drv_opts, TRUE);
 
                if (!is_demo_dev)
                        real_devices = g_slist_append(real_devices, sdi);
@@ -579,12 +577,18 @@ void run_session(void)
                }
        }
 
+       /* This is unlikely to happen but it makes static analyzers stop complaining. */
+       if (!devices) {
+               g_critical("No real devices found.");
+               return;
+       }
+
        sdi = devices->data;
        g_slist_free(devices);
        g_slist_free(real_devices);
 
        sr_session_new(sr_ctx, &session);
-       sr_session_datafeed_callback_add(session, datafeed_in, NULL);
+       sr_session_datafeed_callback_add(session, datafeed_in, session);
 
        if (sr_dev_open(sdi) != SR_OK) {
                g_critical("Failed to open device.");
@@ -671,7 +675,7 @@ void run_session(void)
 
        if (opt_frames) {
                if ((sr_parse_sizestring(opt_frames, &limit_frames) != SR_OK)) {
-                       g_critical("Invalid sample limit '%s'.", opt_samples);
+                       g_critical("Invalid frame limit '%s'.", opt_frames);
                        sr_session_destroy(session);
                        return;
                }
@@ -683,8 +687,10 @@ void run_session(void)
                }
        }
 
-       if (!(t = setup_transform_module(sdi)))
-               g_critical("Failed to initialize transform module.");
+       if (opt_transform_module) {
+               if (!(t = setup_transform_module(sdi)))
+                       g_critical("Failed to initialize transform module.");
+       }
 
        main_loop = g_main_loop_new(NULL, FALSE);
 
index 96d8128ea93493d1a048d8aed1ccaef38c74eb70..f564448f13da785563f1d1851a360983d5800034 100644 (file)
 
 #define DEFAULT_OUTPUT_FORMAT_FILE "srzip"
 #define DEFAULT_OUTPUT_FORMAT_NOFILE "bits:width=64"
-#define SAVE_CHUNK_SIZE (512 * 1024)
 
 /* main.c */
 extern struct sr_context *sr_ctx;
 int select_channels(struct sr_dev_inst *sdi);
-gboolean config_key_has_cap(struct sr_dev_driver *driver,
-               const struct sr_dev_inst *sdi, struct sr_channel_group *cg,
-               uint32_t key, uint32_t capability);
 int maybe_config_get(struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi, struct sr_channel_group *cg,
                uint32_t key, GVariant **gvar);
@@ -66,8 +62,6 @@ void datafeed_in(const struct sr_dev_inst *sdi,
 int opt_to_gvar(char *key, char *value, struct sr_config *src);
 int set_dev_options(struct sr_dev_inst *sdi, GHashTable *args);
 void run_session(void);
-void save_chunk_logic(struct sr_session *session, uint8_t *data,
-               uint64_t data_len, int unitsize);
 
 /* input.c */
 void load_input_file(void);
@@ -116,6 +110,7 @@ extern gchar **opt_pds;
 extern gchar *opt_pd_annotations;
 extern gchar *opt_pd_meta;
 extern gchar *opt_pd_binary;
+extern gboolean opt_pd_samplenum;
 #endif
 extern gchar *opt_input_format;
 extern gchar *opt_output_format;