Mercurial > geeqie.yaz
view src/rcfile.h @ 276:4f526d436873
Implement secure rc file saving.
First data is written to a temporary file, then if nothing
was wrong, this file is renamed to the final name.
This way the risk of corrupted rc file is greatly reduced.
The code is borrowed from ELinks (http://elinks.cz).
author | zas_ |
---|---|
date | Tue, 08 Apr 2008 21:55:58 +0000 |
parents | 5bdab7ed4bcd |
children | 667e49f52168 |
line wrap: on
line source
/* * Geeqie * (C) 2004 John Ellis * * Author: John Ellis * * This software is released under the GNU General Public License (GNU GPL). * Please read the included file COPYING for more information. * This software comes with no warranty of any kind, use at your own risk! */ #ifndef RCFILE_H #define RCFILE_H extern SecureSaveErrno secsave_errno; /**< internal secsave error number */ SecureSaveInfo *secure_open(gchar *); gint secure_close(SecureSaveInfo *); gint secure_fputs(SecureSaveInfo *, const gchar *); gint secure_fputc(SecureSaveInfo *, gint); gint secure_fprintf(SecureSaveInfo *, const gchar *, ...); gchar *secsave_strerror(SecureSaveErrno); gchar *quoted_value(const gchar *text, const gchar **tail); gchar *escquote_value(const gchar *text); void save_options(void); void load_options(void); #endif