250891f
To: vim_dev@googlegroups.com
250891f
Subject: Patch 7.3.133
250891f
Fcc: outbox
250891f
From: Bram Moolenaar <Bram@moolenaar.net>
250891f
Mime-Version: 1.0
250891f
Content-Type: text/plain; charset=UTF-8
250891f
Content-Transfer-Encoding: 8bit
250891f
------------
250891f
250891f
Patch 7.3.133
250891f
Problem:    When using encryption it's not clear what method was used.
250891f
Solution:   In the file message show "blowfish" when using blowfish.
250891f
Files:	    src/fileio.c
250891f
250891f
250891f
*** ../vim-7.3.132/src/fileio.c	2011-02-15 17:39:14.000000000 +0100
250891f
--- src/fileio.c	2011-02-25 16:30:19.000000000 +0100
250891f
***************
250891f
*** 250,255 ****
250891f
--- 250,256 ----
250891f
  #ifdef FEAT_CRYPT
250891f
      char_u	*cryptkey = NULL;
250891f
      int		did_ask_for_key = FALSE;
250891f
+     int		crypt_method_used;
250891f
  #endif
250891f
  #ifdef FEAT_PERSISTENT_UNDO
250891f
      context_sha256_T sha_ctx;
250891f
***************
250891f
*** 2289,2294 ****
250891f
--- 2290,2296 ----
250891f
  	save_file_ff(curbuf);		/* remember the current file format */
250891f
  
250891f
  #ifdef FEAT_CRYPT
250891f
+     crypt_method_used = use_crypt_method;
250891f
      if (cryptkey != NULL)
250891f
      {
250891f
  	crypt_pop_state();
250891f
***************
250891f
*** 2483,2489 ****
250891f
  #ifdef FEAT_CRYPT
250891f
  	    if (cryptkey != NULL)
250891f
  	    {
250891f
! 		STRCAT(IObuff, _("[crypted]"));
250891f
  		c = TRUE;
250891f
  	    }
250891f
  #endif
250891f
--- 2485,2494 ----
250891f
  #ifdef FEAT_CRYPT
250891f
  	    if (cryptkey != NULL)
250891f
  	    {
250891f
! 		if (crypt_method_used == 1)
250891f
! 		    STRCAT(IObuff, _("[blowfish]"));
250891f
! 		else
250891f
! 		    STRCAT(IObuff, _("[crypted]"));
250891f
  		c = TRUE;
250891f
  	    }
250891f
  #endif
250891f
***************
250891f
*** 3199,3204 ****
250891f
--- 3204,3212 ----
250891f
      int		    write_undo_file = FALSE;
250891f
      context_sha256_T sha_ctx;
250891f
  #endif
250891f
+ #ifdef FEAT_CRYPT
250891f
+     int		    crypt_method_used;
250891f
+ #endif
250891f
  
250891f
      if (fname == NULL || *fname == NUL)	/* safety check */
250891f
  	return FAIL;
250891f
***************
250891f
*** 4728,4733 ****
250891f
--- 4736,4742 ----
250891f
  	mch_set_acl(wfname, acl);
250891f
  #endif
250891f
  #ifdef FEAT_CRYPT
250891f
+     crypt_method_used = use_crypt_method;
250891f
      if (wb_flags & FIO_ENCRYPTED)
250891f
  	crypt_pop_state();
250891f
  #endif
250891f
***************
250891f
*** 4882,4888 ****
250891f
  #ifdef FEAT_CRYPT
250891f
  	if (wb_flags & FIO_ENCRYPTED)
250891f
  	{
250891f
! 	    STRCAT(IObuff, _("[crypted]"));
250891f
  	    c = TRUE;
250891f
  	}
250891f
  #endif
250891f
--- 4891,4900 ----
250891f
  #ifdef FEAT_CRYPT
250891f
  	if (wb_flags & FIO_ENCRYPTED)
250891f
  	{
250891f
! 	    if (crypt_method_used == 1)
250891f
! 		STRCAT(IObuff, _("[blowfish]"));
250891f
! 	    else
250891f
! 		STRCAT(IObuff, _("[crypted]"));
250891f
  	    c = TRUE;
250891f
  	}
250891f
  #endif
250891f
*** ../vim-7.3.132/src/version.c	2011-02-25 15:18:46.000000000 +0100
250891f
--- src/version.c	2011-02-25 16:42:58.000000000 +0100
250891f
***************
250891f
*** 716,717 ****
250891f
--- 716,719 ----
250891f
  {   /* Add new patch number below this line */
250891f
+ /**/
250891f
+     133,
250891f
  /**/
250891f
250891f
-- 
250891f
    [clop clop]
250891f
GUARD #1:  Halt!  Who goes there?
250891f
ARTHUR:    It is I, Arthur, son of Uther Pendragon, from the castle of
250891f
           Camelot.  King of the Britons, defeator of the Saxons, sovereign of
250891f
           all England!
250891f
GUARD #1:  Pull the other one!
250891f
                                  The Quest for the Holy Grail (Monty Python)
250891f
250891f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
250891f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
250891f
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
250891f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///