diff src/memfile.c @ 630:52c87a746f4a v7.0181

updated for version 7.0181
author vimboss
date Sat, 14 Jan 2006 21:23:38 +0000
parents 862863033fdd
children 0f9f4761ad9c
line wrap: on
line diff
--- 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