Mercurial > vim
comparison src/memfile.c @ 6817:cd47def2214a v7.4.730
patch 7.4.730
Problem: When setting the crypt key and using a swap file, text may be
encrypted twice or unencrypted text remains in the swap file.
(Issue 369)
Solution: Call ml_preserve() before re-encrypting. Set correct index for
next pointer block.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Jun 2015 18:35:25 +0200 |
parents | a12d422ed16c |
children | 8977b399cf55 |
comparison
equal
deleted
inserted
replaced
6816:ca3db36a6ed8 | 6817:cd47def2214a |
---|---|
809 * Release the least recently used block from the used list if the number | 809 * Release the least recently used block from the used list if the number |
810 * of used memory blocks gets to big. | 810 * of used memory blocks gets to big. |
811 * | 811 * |
812 * Return the block header to the caller, including the memory block, so | 812 * Return the block header to the caller, including the memory block, so |
813 * it can be re-used. Make sure the page_count is right. | 813 * it can be re-used. Make sure the page_count is right. |
814 * | |
815 * Returns NULL if no block is released. | |
814 */ | 816 */ |
815 static bhdr_T * | 817 static bhdr_T * |
816 mf_release(mfp, page_count) | 818 mf_release(mfp, page_count) |
817 memfile_T *mfp; | 819 memfile_T *mfp; |
818 int page_count; | 820 int page_count; |
1217 | 1219 |
1218 return OK; | 1220 return OK; |
1219 } | 1221 } |
1220 | 1222 |
1221 /* | 1223 /* |
1222 * Lookup a translation from the trans lists and delete the entry | 1224 * Lookup a translation from the trans lists and delete the entry. |
1223 * | 1225 * |
1224 * Return the positive new number when found, the old number when not found | 1226 * Return the positive new number when found, the old number when not found |
1225 */ | 1227 */ |
1226 blocknr_T | 1228 blocknr_T |
1227 mf_trans_del(mfp, old_nr) | 1229 mf_trans_del(mfp, old_nr) |