Patch 7.3.133
Problem:    When using encryption it's not clear what method was used.
Solution:   In the file message show "blowfish" when using blowfish.
Files:      src/fileio.c


*** ../vim-7.3.132/src/fileio.c 2011-02-15 17:39:14.000000000 +0100
--- src/fileio.c        2011-02-25 16:30:19.000000000 +0100
***************
*** 250,255 ****
--- 250,256 ----
  #ifdef FEAT_CRYPT
      char_u    *cryptkey = NULL;
      int               did_ask_for_key = FALSE;
+     int               crypt_method_used;
  #endif
  #ifdef FEAT_PERSISTENT_UNDO
      context_sha256_T sha_ctx;
***************
*** 2289,2294 ****
--- 2290,2296 ----
        save_file_ff(curbuf);           /* remember the current file format */
  
  #ifdef FEAT_CRYPT
+     crypt_method_used = use_crypt_method;
      if (cryptkey != NULL)
      {
        crypt_pop_state();
***************
*** 2483,2489 ****
  #ifdef FEAT_CRYPT
            if (cryptkey != NULL)
            {
!               STRCAT(IObuff, _("[crypted]"));
                c = TRUE;
            }
  #endif
--- 2485,2494 ----
  #ifdef FEAT_CRYPT
            if (cryptkey != NULL)
            {
!               if (crypt_method_used == 1)
!                   STRCAT(IObuff, _("[blowfish]"));
!               else
!                   STRCAT(IObuff, _("[crypted]"));
                c = TRUE;
            }
  #endif
***************
*** 3199,3204 ****
--- 3204,3212 ----
      int                   write_undo_file = FALSE;
      context_sha256_T sha_ctx;
  #endif
+ #ifdef FEAT_CRYPT
+     int                   crypt_method_used;
+ #endif
  
      if (fname == NULL || *fname == NUL)       /* safety check */
        return FAIL;
***************
*** 4728,4733 ****
--- 4736,4742 ----
        mch_set_acl(wfname, acl);
  #endif
  #ifdef FEAT_CRYPT
+     crypt_method_used = use_crypt_method;
      if (wb_flags & FIO_ENCRYPTED)
        crypt_pop_state();
  #endif
***************
*** 4882,4888 ****
  #ifdef FEAT_CRYPT
        if (wb_flags & FIO_ENCRYPTED)
        {
!           STRCAT(IObuff, _("[crypted]"));
            c = TRUE;
        }
  #endif
--- 4891,4900 ----
  #ifdef FEAT_CRYPT
        if (wb_flags & FIO_ENCRYPTED)
        {
!           if (crypt_method_used == 1)
!               STRCAT(IObuff, _("[blowfish]"));
!           else
!               STRCAT(IObuff, _("[crypted]"));
            c = TRUE;
        }
  #endif
*** ../vim-7.3.132/src/version.c        2011-02-25 15:18:46.000000000 +0100
--- src/version.c       2011-02-25 16:42:58.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     133,
  /**/

-- 
    [clop clop]
GUARD #1:  Halt!  Who goes there?
ARTHUR:    It is I, Arthur, son of Uther Pendragon, from the castle of
           Camelot.  King of the Britons, defeator of the Saxons, sovereign of
           all England!
GUARD #1:  Pull the other one!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui