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>
This commit is contained in:
Lukas Fleischer
2011-09-01 16:09:18 +02:00
parent 8d71923d4f
commit 711d5dea20
6 changed files with 43 additions and 15 deletions

View File

@@ -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=");