This commit fixes the order between timestamp deltas and value packets.
Before the timestamp is updated after a value packet,
which falsifies the timing.
The TUI is overhauled to display a live view of all received signals.
All values are rendered in hexadecimal, while events show their latest timestamp
and strings are stripped of trailing newlines.
In TUI mode, bar displays are now hidden by default until its
diagnostic metric was received to declutter the UI.
This means that for instance the compression metrics are hidden
when this feature is not utilized in the traced program,
or all metrics are hidden if it does not call `st_diagtrace`.
The bars are now styled to not give an impression of being
a progress bar. The completed portion is colored gold while
a completed bar is indicated by red, as this usually
indicates a new maximum value.
A failing rich import in TUI mode now exits after
its error message.
st_record now features the "--tui" flag,
which when set uses the rich package to display live
diagnostic values via its progress bar renderable.
These are displayed regardless of the "--diagnostic" flag,
as this one only regards the recorded dump.
The example program (which is untested by the way) is corrected
to generate the desired sawtooth, and a more realistic
baudrate is chosen.
Blurb extended by supported signal types.
This commit fixes two bugs, the first when recording
on Windows where the user is unable to stop the capture cleanly
and one regarding the VCD output being malformed due to null characters in strings.
Reading from the stdin buffer is generally better behaved on both platforms,
while not as performant. The user can now cancel the capture by terminating the source
program or issuing a keyboard interrupt.
The issue with string capture having trailing null characters is fixed,
which in the best case confuses GTKwave, or in the worst case segfaults it.