diff options
Diffstat (limited to 'src/libs/3rdparty/winpty/misc/Win32Echo2.cc')
-rw-r--r-- | src/libs/3rdparty/winpty/misc/Win32Echo2.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libs/3rdparty/winpty/misc/Win32Echo2.cc b/src/libs/3rdparty/winpty/misc/Win32Echo2.cc new file mode 100644 index 0000000000..b2ea2ad1c5 --- /dev/null +++ b/src/libs/3rdparty/winpty/misc/Win32Echo2.cc @@ -0,0 +1,19 @@ +/* + * A Win32 program that reads raw console input with getch and echos + * it to stdout. + */ + +#include <stdio.h> +#include <conio.h> + +int main() +{ + int count = 0; + while (true) { + int ch = getch(); + printf("%02x ", ch); + if (++count == 50) + break; + } + return 0; +} |