mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: chatclient sample compilation
This commit is contained in:
parent
e77e93f779
commit
ce933b4c41
1 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ int kbhit()
|
||||||
int nread;
|
int nread;
|
||||||
|
|
||||||
if (peek_character != -1) return 1;
|
if (peek_character != -1) return 1;
|
||||||
|
|
||||||
new_settings.c_cc[VMIN]=0;
|
new_settings.c_cc[VMIN]=0;
|
||||||
tcsetattr(STDIN_FILENO, TCSANOW, &new_settings);
|
tcsetattr(STDIN_FILENO, TCSANOW, &new_settings);
|
||||||
nread = read(STDIN_FILENO,&ch,1);
|
nread = read(STDIN_FILENO,&ch,1);
|
||||||
|
@ -71,8 +71,8 @@ int getch()
|
||||||
peek_character = -1;
|
peek_character = -1;
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
if (read(STDIN_FILENO,&ch,1) != 1)
|
if (read(STDIN_FILENO,&ch,1) != 1) return ' ';
|
||||||
nlwarning("Can't read keyboard");
|
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue