diff src/structs.h @ 16823:b1b7c7a31679 v8.1.1413

patch 8.1.1413: error when the drive of the swap file was disconnected commit https://github.com/vim/vim/commit/b58a4b938c4bc7e0499700859bd7abba9acc5b11 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 27 23:36:21 2019 +0200 patch 8.1.1413: error when the drive of the swap file was disconnected Problem: Error when the drive of the swap file was disconnected. Solution: Try closing and re-opening the swap file. (closes https://github.com/vim/vim/issues/4378)
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 May 2019 23:45:04 +0200
parents 069ee8dc8c8d
children 032d5335987e
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -604,28 +604,30 @@ typedef struct
 
 struct memfile
 {
-    char_u	*mf_fname;		/* name of the file */
-    char_u	*mf_ffname;		/* idem, full path */
-    int		mf_fd;			/* file descriptor */
-    bhdr_T	*mf_free_first;		/* first block_hdr in free list */
-    bhdr_T	*mf_used_first;		/* mru block_hdr in used list */
-    bhdr_T	*mf_used_last;		/* lru block_hdr in used list */
-    unsigned	mf_used_count;		/* number of pages in used list */
-    unsigned	mf_used_count_max;	/* maximum number of pages in memory */
-    mf_hashtab_T mf_hash;		/* hash lists */
-    mf_hashtab_T mf_trans;		/* trans lists */
-    blocknr_T	mf_blocknr_max;		/* highest positive block number + 1*/
-    blocknr_T	mf_blocknr_min;		/* lowest negative block number - 1 */
-    blocknr_T	mf_neg_count;		/* number of negative blocks numbers */
-    blocknr_T	mf_infile_count;	/* number of pages in the file */
-    unsigned	mf_page_size;		/* number of bytes in a page */
-    int		mf_dirty;		/* TRUE if there are dirty blocks */
+    char_u	*mf_fname;		// name of the file
+    char_u	*mf_ffname;		// idem, full path
+    int		mf_fd;			// file descriptor
+    int		mf_flags;		// flags used when opening this memfile
+    int		mf_reopen;		// mf_fd was closed, retry opening
+    bhdr_T	*mf_free_first;		// first block_hdr in free list
+    bhdr_T	*mf_used_first;		// mru block_hdr in used list
+    bhdr_T	*mf_used_last;		// lru block_hdr in used list
+    unsigned	mf_used_count;		// number of pages in used list
+    unsigned	mf_used_count_max;	// maximum number of pages in memory
+    mf_hashtab_T mf_hash;		// hash lists
+    mf_hashtab_T mf_trans;		// trans lists
+    blocknr_T	mf_blocknr_max;		// highest positive block number + 1
+    blocknr_T	mf_blocknr_min;		// lowest negative block number - 1
+    blocknr_T	mf_neg_count;		// number of negative blocks numbers
+    blocknr_T	mf_infile_count;	// number of pages in the file
+    unsigned	mf_page_size;		// number of bytes in a page
+    int		mf_dirty;		// TRUE if there are dirty blocks
 #ifdef FEAT_CRYPT
-    buf_T	*mf_buffer;		/* buffer this memfile is for */
-    char_u	mf_seed[MF_SEED_LEN];	/* seed for encryption */
-
-    /* Values for key, method and seed used for reading data blocks when
-     * updating for a newly set key or method. Only when mf_old_key != NULL. */
+    buf_T	*mf_buffer;		// buffer this memfile is for
+    char_u	mf_seed[MF_SEED_LEN];	// seed for encryption
+
+    // Values for key, method and seed used for reading data blocks when
+    // updating for a newly set key or method. Only when mf_old_key != NULL.
     char_u	*mf_old_key;
     int		mf_old_cm;
     char_u	mf_old_seed[MF_SEED_LEN];