aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-09-01 16:09:18 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-05 12:25:48 +0200
commit711d5dea20679298192b25a5bbfe4fd70d9012d6 (patch)
tree5658afd871b31d0fbc3a61d2395cde782ba96a99 /src/io.c
parent8d71923d4f498c8d2fcb22a72346e3e77a7c4a5b (diff)
downloadcalcurse-711d5dea20679298192b25a5bbfe4fd70d9012d6.tar.gz
calcurse-711d5dea20679298192b25a5bbfe4fd70d9012d6.zip
Add configuration option to run the GC on exit
If "auto_gc" is enabled, the garbage collector for note files will be run on every exit. As this is an experimental feature and may cause data loss, this is disabled by default. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index c71934a..c3a6a61 100644
--- a/src/io.c
+++ b/src/io.c
@@ -867,6 +867,11 @@ io_save_conf (struct conf *conf)
(void)fprintf (fp, "auto_save=");
(void)fprintf (fp, "%s\n", (conf->auto_save) ? "yes" : "no");
+ (void)fprintf (fp, "\n# If this option is set to yes, "
+ "the GC is run automatically when quitting\n");
+ (void)fprintf (fp, "auto_gc=");
+ (void)fprintf (fp, "%s\n", (conf->auto_gc) ? "yes" : "no");
+
(void)fprintf (fp, "\n# If not null, perform automatic saves every "
"'periodic_save' minutes\n");
(void)fprintf (fp, "periodic_save=");