aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/file.c
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-07 16:49:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-07 16:49:41 +0800
commit47e3cd0fdbfd59165761cab3e96612240e1e03bd (patch)
tree596a10c17d950bba77d61fbed60140f48a8d3f48 /libibex/file.c
parente7150f51635e89d8c4f6826e3683a447741ddfcb (diff)
downloadgsoc2013-evolution-47e3cd0fdbfd59165761cab3e96612240e1e03bd.tar.gz
gsoc2013-evolution-47e3cd0fdbfd59165761cab3e96612240e1e03bd.tar.zst
gsoc2013-evolution-47e3cd0fdbfd59165761cab3e96612240e1e03bd.zip
New function, only write out the ibex if it has changed.
2000-05-07 NotZed <NotZed@HelixCode.com> * file.c (ibex_save): New function, only write out the ibex if it has changed. svn path=/trunk/; revision=2868
Diffstat (limited to 'libibex/file.c')
-rw-r--r--libibex/file.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libibex/file.c b/libibex/file.c
index 462fbec3d4..c419360e26 100644
--- a/libibex/file.c
+++ b/libibex/file.c
@@ -347,6 +347,22 @@ lose:
}
/**
+ * ibex_save:
+ * @ib:
+ *
+ * Only write out an ibex if it is dirty.
+ *
+ * Return value: Same as ibex_write.
+ **/
+int
+ibex_save (ibex *ib)
+{
+ if (ib->dirty)
+ return ibex_write(ib);
+ return 0;
+}
+
+/**
* ibex_close: Write out the ibex file (if it has changed) and free
* the data associated with it.
* @ib: the ibex