From 1abad8b71f94135d69b7449b26acead0d42f77fd Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Fri, 5 Oct 2018 11:50:02 +0200 Subject: [PATCH] Save the file --- kilo.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/kilo.c b/kilo.c index 20cb239..857ec08 100644 --- a/kilo.c +++ b/kilo.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -63,6 +64,10 @@ struct editorConfig { struct editorConfig E; +/*** prototypes ***/ + +void editorSetStatusMessage(const char *fmt, ...); + /*** terminal ***/ void die(const char *s) { @@ -255,6 +260,26 @@ void editorInsertChar(int c) { /*** file i/o ***/ +char *editorRowsToString(int *buflen) { + int totlen = 0; + int j; + for (j=0; j