From a617b3e5ac9e47d7a374a02ab091f050dc0bd556 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 17 Dec 2021 11:37:34 -0800 Subject: [PATCH] . --- src/lua.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lua.c b/src/lua.c index db6a0bd..02f660b 100644 --- a/src/lua.c +++ b/src/lua.c @@ -389,6 +389,9 @@ void save_to_current_definition_and_editor_buffer (lua_State *L, const char *def } +/* I don't understand the best way to read all of a text file. + * I'm currently using fread, but its error handling is really designed for + * binary data containing fixed-size records. */ static void read_editor_buffer (char *out, int capacity) { FILE *in = fopen("teliva_editor_buffer", "r"); fread(out, capacity, 1, in); /* TODO: handle overly large file */