From f5d8d7bee20742a7a101665ebca630ff8e05d77b Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 24 May 2015 01:51:03 +0200 Subject: impronving io --- userspace/snake.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'userspace') diff --git a/userspace/snake.c b/userspace/snake.c index afc6bf8..aedf191 100644 --- a/userspace/snake.c +++ b/userspace/snake.c @@ -3,9 +3,11 @@ int main() { printf("Hello I am FoolSnake 0.1\n"); + printf("setvbuf returned %i",setvbuf(stdin,NULL,_IONBF,0)); while(1) { - printf("%c",getc(stdin)); + printf("%c",fgetc(stdin)); + } } -- cgit v1.2.3