~coco/imscript

5ea636681ab6766879100551427a681abb0d561f — Enric Meinhardt-Llopis 2 months ago d7dffc2
add dummy client for the terminal emulator
1 files changed, 20 insertions(+), 0 deletions(-)

A src/ftr/dummy.c
A src/ftr/dummy.c => src/ftr/dummy.c +20 -0
@@ 0,0 1,20 @@
#include <stdio.h>
#include <termios.h>

int main()
{
	struct termios m;
	tcgetattr(0, &m);
	m.c_lflag &= !(ECHO | ICANON);
	tcsetattr(0, TCSANOW, &m);

	while (1)
	{
		int c = getchar();
		printf("got c = %d\n", c);
		if (c == 27)
			break;
	}

	return 0;
}