Patch 7.3.401
Problem:    A couple more shadowed variables.
Solution:   Rename the variables.
Files:      src/netbeans.c


*** ../vim-7.3.400/src/netbeans.c       2012-01-10 22:26:12.000000000 +0100
--- src/netbeans.c      2012-01-10 22:30:17.000000000 +0100
***************
*** 443,449 ****
      FILE *fp;
      char_u buf[BUFSIZ];
      char_u *lp;
!     char_u *nl;
  #ifdef UNIX
      struct stat       st;
  
--- 443,449 ----
      FILE *fp;
      char_u buf[BUFSIZ];
      char_u *lp;
!     char_u *nlp;
  #ifdef UNIX
      struct stat       st;
  
***************
*** 472,479 ****
      /* Read the file. There should be one of each parameter */
      while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
      {
!       if ((nl = vim_strchr(lp, '\n')) != NULL)
!           *nl = 0;        /* strip off the trailing newline */
  
        if (STRNCMP(lp, "host=", 5) == 0)
        {
--- 472,479 ----
      /* Read the file. There should be one of each parameter */
      while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
      {
!       if ((nlp = vim_strchr(lp, '\n')) != NULL)
!           *nlp = 0;       /* strip off the trailing newline */
  
        if (STRNCMP(lp, "host=", 5) == 0)
        {
***************
*** 1740,1746 ****
                int     added = 0;
                int     oldFire = netbeansFireChanges;
                int     old_b_changed;
!               char_u  *nl;
                linenr_T lnum;
                linenr_T lnum_start;
                pos_T   *pos;
--- 1740,1746 ----
                int     added = 0;
                int     oldFire = netbeansFireChanges;
                int     old_b_changed;
!               char_u  *nlp;
                linenr_T lnum;
                linenr_T lnum_start;
                pos_T   *pos;
***************
*** 1780,1787 ****
                do_update = 1;
                while (*args != NUL)
                {
!                   nl = vim_strchr(args, '\n');
!                   if (nl == NULL)
                    {
                        /* Incomplete line, probably truncated.  Next "insert"
                         * command should append to this one. */
--- 1780,1787 ----
                do_update = 1;
                while (*args != NUL)
                {
!                   nlp = vim_strchr(args, '\n');
!                   if (nlp == NULL)
                    {
                        /* Incomplete line, probably truncated.  Next "insert"
                         * command should append to this one. */
***************
*** 1789,1801 ****
                    }
                    else
                    {
!                       len = nl - args;
  
                        /*
                         * We need to detect EOL style, because the commands
                         * use a character offset.
                         */
!                       if (nl > args && nl[-1] == '\r')
                        {
                            ff_detected = EOL_DOS;
                            --len;
--- 1789,1801 ----
                    }
                    else
                    {
!                       len = nlp - args;
  
                        /*
                         * We need to detect EOL style, because the commands
                         * use a character offset.
                         */
!                       if (nlp > args && nlp[-1] == '\r')
                        {
                            ff_detected = EOL_DOS;
                            --len;
***************
*** 1814,1820 ****
  
                        /* Insert halfway a line.  For simplicity we assume we
                         * need to append to the line. */
!                       newline = alloc_check((unsigned)(STRLEN(oldline) + len 
+ 1));
                        if (newline != NULL)
                        {
                            STRCPY(newline, oldline);
--- 1814,1821 ----
  
                        /* Insert halfway a line.  For simplicity we assume we
                         * need to append to the line. */
!                       newline = alloc_check(
!                                      (unsigned)(STRLEN(oldline) + len + 1));
                        if (newline != NULL)
                        {
                            STRCPY(newline, oldline);
***************
*** 1826,1839 ****
                    {
                        /* Append a new line.  Not that we always do this,
                         * also when the text doesn't end in a "\n". */
!                       ml_append((linenr_T)(lnum - 1), args, (colnr_T)(len + 
1), FALSE);
                        ++added;
                    }
  
!                   if (nl == NULL)
                        break;
                    ++lnum;
!                   args = nl + 1;
                }
  
                /* Adjust the marks below the inserted lines. */
--- 1827,1841 ----
                    {
                        /* Append a new line.  Not that we always do this,
                         * also when the text doesn't end in a "\n". */
!                       ml_append((linenr_T)(lnum - 1), args,
!                                                  (colnr_T)(len + 1), FALSE);
                        ++added;
                    }
  
!                   if (nlp == NULL)
                        break;
                    ++lnum;
!                   args = nlp + 1;
                }
  
                /* Adjust the marks below the inserted lines. */
*** ../vim-7.3.400/src/version.c        2012-01-10 22:26:12.000000000 +0100
--- src/version.c       2012-01-10 22:30:47.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     401,
  /**/

-- 
So when I saw the post to comp.editors, I rushed over to the FTP site to
grab it.  So I yank apart the tarball, light x candles, where x= the
vim version multiplied by the md5sum of the source divided by the MAC of
my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
wave a dead chicken over the hard drive, and summon the power of GNU GCC
with the magic words "make config ; make!".
                [Jason Spence, compiling Vim 5.0]

 /// 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