about summary refs log tree commit diff stats
path: root/src/lua.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-12-17 11:37:34 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-12-17 11:37:34 -0800
commita617b3e5ac9e47d7a374a02ab091f050dc0bd556 (patch)
tree698cddbc73c08260c0cdc1b810b263244a0ada2e /src/lua.c
parent166c8e0ca01b049ee56ddc10740d3447d53b0a8b (diff)
downloadteliva-a617b3e5ac9e47d7a374a02ab091f050dc0bd556.tar.gz
.
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c3
1 files changed, 3 insertions, 0 deletions
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 */