Browse Source

refactoring: add further documentation to input.c

main
fdai7184 2 years ago
parent
commit
2619884fee
  1. 8
      src/input.c

8
src/input.c

@ -91,6 +91,10 @@ void Pausieren(){
//khbit und getch aus dem Internet //khbit und getch aus dem Internet
/**checks if there was a console input
*returns int, no parameter
*/
int kbhit(void){ int kbhit(void){
struct termios oldt, newt; struct termios oldt, newt;
int ch; int ch;
@ -117,6 +121,10 @@ int kbhit(void){
return 0; return 0;
} }
/**returns the char from console
*returns char, no parameter
*/
char getch(void){ char getch(void){
char c; char c;
system("stty raw"); system("stty raw");

Loading…
Cancel
Save