Created
April 6, 2017 03:18
-
-
Save paigeruten/19f1a6df2fed25b0c4bb54dc29ce2572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <termios.h> | |
int main() { | |
int i; | |
struct termios t; | |
tcgetattr(STDIN_FILENO, &t); | |
printf("t.c_iflag = 0x%lx;\n", t.c_iflag); | |
printf("t.c_oflag = 0x%lx;\n", t.c_oflag); | |
printf("t.c_cflag = 0x%lx;\n", t.c_cflag); | |
printf("t.c_lflag = 0x%lx;\n", t.c_lflag); | |
for (i = 0; i < NCCS; i++) { | |
printf("t.c_cc[%d] = %u;\n", i, t.c_cc[i]); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment