]> sigrok.org Git - sigrok-cli.git/commit
decode: rephrase logic which looks up -A specs
authorGerhard Sittig <redacted>
Fri, 19 Apr 2019 14:38:11 +0000 (16:38 +0200)
committerUwe Hermann <redacted>
Thu, 9 May 2019 12:57:50 +0000 (14:57 +0200)
commit4171a0a082c4c41263d9a08944e1c668bdd489e1
tree8659f5b572e15abf42aa1be971f019238c7d98de
parent11e554c26dc1e8e43b6def4a85ffe22658e06bbf
decode: rephrase logic which looks up -A specs

The previous logic scanned for specific annotation classes listed in -A,
broke the loop when nothing was found, otherwise registered the matching
annotation for display later on.

Rephrase the logic such that classes get registered when found, and then
advance to the next spec. Only mismatch will "fall through" to the error
path and terminate the setup routine with a fatal error.

This prepares for an optional lookup of annotation rows when class
lookup fails, before a fatal error is returned.
decode.c