aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-23 20:07:48 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-23 20:07:48 +0000
commit8f8e96f015efa9541f6584ff5d15fe3f01a32b28 (patch)
treefdd1d4b84befeace40ef83653ef5b2110b28651d /termkey.c
parentdda9be9110732f824cfc191a3bc587886e787bb5 (diff)
downloadtermo-8f8e96f015efa9541f6584ff5d15fe3f01a32b28.tar.gz
termo-8f8e96f015efa9541f6584ff5d15fe3f01a32b28.tar.xz
termo-8f8e96f015efa9541f6584ff5d15fe3f01a32b28.zip
Implemented termkey_free()
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/termkey.c b/termkey.c
index 411d958..2830f01 100644
--- a/termkey.c
+++ b/termkey.c
@@ -189,6 +189,15 @@ termkey_t *termkey_new(int fd, int flags)
return termkey_new_full(fd, flags, 256, 50);
}
+void termkey_free(termkey_t *tk)
+{
+ free(tk->buffer); tk->buffer = NULL;
+ free(tk->keynames); tk->keynames = NULL;
+ free(tk->csifuncs); tk->csifuncs = NULL;
+
+ free(tk);
+}
+
void termkey_setwaittime(termkey_t *tk, int msec)
{
tk->waittime = msec;