summaryrefslogtreecommitdiff
path: root/src/keys.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-11-25 20:48:58 +0000
committerFrederic Culot <calcurse@culot.org>2008-11-25 20:48:58 +0000
commit910901a4f0abe565e5c1d12a480784e90a4bcd6c (patch)
treeba68a9d83d7cd48434a8af23bf98ad24f5c66811 /src/keys.c
parenteb88eaecb3055fc5ab3cd3e05f0bc77e68f3942a (diff)
downloadcalcurse-910901a4f0abe565e5c1d12a480784e90a4bcd6c.zip
User-defined keys are now saved to file.
Diffstat (limited to 'src/keys.c')
-rwxr-xr-xsrc/keys.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/keys.c b/src/keys.c
index bef1e9d..1c475b3 100755
--- a/src/keys.c
+++ b/src/keys.c
@@ -1,4 +1,4 @@
-/* $calcurse: keys.c,v 1.4 2008/11/23 20:38:56 culot Exp $ */
+/* $calcurse: keys.c,v 1.5 2008/11/25 20:48:58 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -512,3 +512,16 @@ keys_popup_info (keys_e key)
#undef WINROW
#undef WINCOL
}
+
+void
+keys_save_bindings (FILE *fd)
+{
+ int i;
+
+ EXIT_IF (fd == NULL, _("FATAL ERROR in keys_save_bindings: "
+ "null file pointer."));
+ dump_intro (fd);
+ for (i = 0; i < NBKEYS; i++)
+ fprintf (fd, "%s %s\n", keydef[i].label, keys_action_allkeys (i));
+ fclose (fd);
+}