cmdline: support Windows
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Mon, 28 Sep 2020 21:50:51 +0000 (00:50 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Oct 2020 22:39:10 +0000 (00:39 +0200)
commit841dfdd06d37cb00a49a56a180c287efc021a842
tree0ddd81a6dd12cbea53cf3985516c564b93831b8a
parentf40a74cfcf029a81569b7e8e99301c91cce832d6
cmdline: support Windows

Implement terminal handling, input polling, and vdprintf() for Windows.

Because Windows I/O model differs fundamentally from Unix and there is
no concept of character device, polling is simulated depending on the
underlying input device. Supporting non-terminal input is useful for
automated testing.

Windows emulation of VT100 uses "ESC [ E" for newline instead of
standard "ESC E", so add a workaround.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
config/meson.build
lib/librte_cmdline/cmdline.c
lib/librte_cmdline/cmdline_os_windows.c [new file with mode: 0644]
lib/librte_cmdline/cmdline_parse.c
lib/librte_cmdline/cmdline_private.h
lib/librte_cmdline/cmdline_socket.c
lib/librte_cmdline/cmdline_vt100.h
lib/librte_cmdline/meson.build
lib/meson.build