summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2021-01-12 17:03:49 -0700
committermo khan <mo.khan@gmail.com>2021-01-12 17:03:49 -0700
commit1f0e845f2012df40b089a1ae9aa84b27fc09e23e (patch)
treee84e87ff5dddcd7a8a1111c043200880469e29c2
parentd46fdbe3512cc2e09e72a93de5ca23ad21f1cbb7 (diff)
add sections
-rw-r--r--kilo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kilo.c b/kilo.c
index 96822c8..49e6064 100644
--- a/kilo.c
+++ b/kilo.c
@@ -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();