Debian Codegraph @

deps/winpty/misc/Win32Echo2.cc

raw
1 /*
2 * A Win32 program that reads raw console input with getch and echos
3 * it to stdout.
4 */
5
6 #include <stdio.h>
7 #include <conio.h>
8
9 int main()
10 {
11 int count = 0;
12 while (true) {
13 int ch = getch();
14 printf("%02x ", ch);
15 if (++count == 50)
16 break;
17 }
18 return 0;
19 }