From: Gerhard Sittig Date: Fri, 31 Jul 2020 08:15:44 +0000 (+0200) Subject: output/ascii: style nits in name alignment and trigger flush X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=31907b76de541441a4b5cff68fecf002f876cd92;hp=31907b76de541441a4b5cff68fecf002f876cd92;p=libsigrok.git output/ascii: style nits in name alignment and trigger flush Unobfuscate the implementation of the recent channel name alignment and trigger position flush, address other style nits of earlier versions: Don't need a GString for runtime constant channel names (which also suffered from a mismatch of declaration and allocation). Don't need to "construct space" when printf(3) can align the value. Pre-allocate text buffers with more appropriate length when known in advance. Drop another unused variable. Eliminate data type redundancy in malloc(3) calls. Make sure to get zeroed memory, disabled channels can result in assignment gaps. Use consistent brace style and separate variable declaration from use (no RAII here). Excess text line length remains, there has been a lot of it in the previous implementation. It is left for another commit. Tested with: $ sigrok-cli -d demo:analog_channels=0:logic_channels=4 --samples 40 -O ascii -t D3=r -w ---