diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-17 11:37:34 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-17 11:37:34 -0800 |
commit | a617b3e5ac9e47d7a374a02ab091f050dc0bd556 (patch) | |
tree | 698cddbc73c08260c0cdc1b810b263244a0ada2e | |
parent | 166c8e0ca01b049ee56ddc10740d3447d53b0a8b (diff) | |
download | teliva-a617b3e5ac9e47d7a374a02ab091f050dc0bd556.tar.gz |
.
-rw-r--r-- | src/lua.c | 3 |
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 */ |