diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-25 13:05:37 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-25 13:33:37 -0800 |
commit | bb6e79aa0debb17d2e3ebc3af91092ef21e7a911 (patch) | |
tree | e6bc92c957b4bf464492b018c6847f0b33852336 /src/tlv.c | |
parent | 1fdfa8909b27a1e217a7ba3956c16355fe78d2f8 (diff) | |
download | teliva-bb6e79aa0debb17d2e3ebc3af91092ef21e7a911.tar.gz |
reorg: pull Teliva-specific stuff out of lua.c
It should now be easier to diff against the Lua 5.1 sources upstream.
Diffstat (limited to 'src/tlv.c')
-rw-r--r-- | src/tlv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tlv.c b/src/tlv.c index cca8f6e..815f713 100644 --- a/src/tlv.c +++ b/src/tlv.c @@ -184,3 +184,18 @@ void save_tlv(lua_State* L, char* filename) { rename(outfilename, filename); lua_pop(L, 1); } + +static const char* special_history_keys[] = { + "__teliva_timestamp", + "__teliva_undo", + "__teliva_note", + NULL, +}; + +int is_special_history_key(const char* key) { + for (const char** curr = special_history_keys; *curr != NULL; ++curr) { + if (strcmp(*curr, key) == 0) + return 1; + } + return 0; +} |