summaryrefslogtreecommitdiff
path: root/src/memfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-14 21:23:38 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-14 21:23:38 +0000
commitc32840f2674d4c6b06cfac8ec32791b5451bf31c (patch)
treea94f91721c326e599a2a5199762ebed4dbfe2a6e /src/memfile.c
parent04dbce064ed4282854348bd4fb5a806a6136bd04 (diff)
downloadvim-git-c32840f2674d4c6b06cfac8ec32791b5451bf31c.tar.gz
updated for version 7.0181v7.0181
Diffstat (limited to 'src/memfile.c')
-rw-r--r--src/memfile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/memfile.c b/src/memfile.c
index e1a6b603b..bac84fed9 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -701,6 +701,23 @@ mf_sync(mfp, flags)
}
/*
+ * For all blocks in memory file *mfp that have a positive block number set
+ * the dirty flag. These are blocks that need to be written to a newly
+ * created swapfile.
+ */
+ void
+mf_set_dirty(mfp)
+ memfile_T *mfp;
+{
+ bhdr_T *hp;
+
+ for (hp = mfp->mf_used_last; hp != NULL; hp = hp->bh_prev)
+ if (hp->bh_bnum > 0)
+ hp->bh_flags |= BH_DIRTY;
+ mfp->mf_dirty = TRUE;
+}
+
+/*
* insert block *hp in front of hashlist of memfile *mfp
*/
static void