refers to CID 464439
Actually not much important - the m_started variable is not shared across
threads but should be used only from within the main thread (start()
stop() member functions).
moved compat functions from config_*h, namely:
- localtime_s/gmtime_s
- strerror_s
- mkdir Windows compat
- removed str[n]cmp from compat/misc (already in compat/strings,h,
which is the better location)
Do not use config*.h in export.c (motivation for the above changes).
getchar() must not be used to read a character when there are more than
one at once because otherwise won't next select() return and the key
will remain in the stdio buffer.
Fixed:
``
(sleep 2; printf '\x18M'; sleep 50 ) | ./build/bin/uv -s testcard -r alsa --param disable-keyboard-control=no
```
when the 'M' key was not processed immediately but just at the end of
the process.
the check is perhaps unneeded - restoring twice won't hurt
More importantly, it didn't restore the TIO when sequence restore_tio()
-> set_tio() is called repeatedly. Concretely, entering interactive cmds:
1. Ctrl-X - unlock control
2. 'c' - one-time command mode
3. 'help<cr>' -
4. 'c' - one-time command mode
5. 'help<cr>' -
the second "help" was not echoed, because restore_tio() was called before
3, but second run of the function was not run. Moreover, after 5, the saved TIO
will be perhaps replaced by the curend one by set_tio().
fixes warnings with Xcode 14.3 as in previous commit
+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
of bytes without terminating '\0'. std::string storage isn't guaranteed
to be NULL-terminated (std::string("").at(0) throws an exception). The
buffer is somewhere preallocated 256 which prevents problem but it's
better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
warning but looked a bit suspicious so it was not clear how to fix
Fixed some of (easy) newly detected Coverity bugs. Those are mostly
innocent ones (performance) and not new (detected because of new release
of Coverity).
Removed indirect dependency on rang.hpp through color_out.h. Now only
remaining dependencies on rang.hpp are direct.
+ fixed escape sequence for foreground magenta
- show actual playback volume as 0 (-inf) if muted receiver
- display explicitly receiver mute status
- "Received audio volume" -> "Playback volume" - this has more clear
semantics and is consistent with message written when '*'/'/'/'m' is
pressed.
- support for alt
- is_utf8: fixed infinite loop when for negative number
- do not use tolower() in K_CTRL - is not constexpr
- get_keycode_name - safety check
This allows easier formatting - name is now at most 7 characters long.
+ assert to check if parameters to keycontrol_register_key() do not
contain '#'-symbols.