diff options
| author | mo khan <mo.khan@gmail.com> | 2021-01-12 17:03:49 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2021-01-12 17:03:49 -0700 |
| commit | 1f0e845f2012df40b089a1ae9aa84b27fc09e23e (patch) | |
| tree | e84e87ff5dddcd7a8a1111c043200880469e29c2 | |
| parent | d46fdbe3512cc2e09e72a93de5ca23ad21f1cbb7 (diff) | |
add sections
| -rw-r--r-- | kilo.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,5 @@ +/*** includes ***/ + #include <ctype.h> #include <errno.h> #include <stdio.h> @@ -5,8 +7,12 @@ #include <termios.h> #include <unistd.h> +/*** data ***/ + struct termios orig_termios; +/*** terminal ***/ + void die(const char *s) { perror(s); exit(1); @@ -32,6 +38,8 @@ void enable_raw_mode() { if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw) == -1) die("tcsetattr"); } +/*** init ***/ + int main() { enable_raw_mode(); |
