]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.401
- up to 7.3.600
[packages/vim.git] / 7.3.401
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.401
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.401
11 Problem:    A couple more shadowed variables.
12 Solution:   Rename the variables.
13 Files:      src/netbeans.c
14
15
16 *** ../vim-7.3.400/src/netbeans.c       2012-01-10 22:26:12.000000000 +0100
17 --- src/netbeans.c      2012-01-10 22:30:17.000000000 +0100
18 ***************
19 *** 443,449 ****
20       FILE *fp;
21       char_u buf[BUFSIZ];
22       char_u *lp;
23 !     char_u *nl;
24   #ifdef UNIX
25       struct stat       st;
26   
27 --- 443,449 ----
28       FILE *fp;
29       char_u buf[BUFSIZ];
30       char_u *lp;
31 !     char_u *nlp;
32   #ifdef UNIX
33       struct stat       st;
34   
35 ***************
36 *** 472,479 ****
37       /* Read the file. There should be one of each parameter */
38       while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
39       {
40 !       if ((nl = vim_strchr(lp, '\n')) != NULL)
41 !           *nl = 0;        /* strip off the trailing newline */
42   
43         if (STRNCMP(lp, "host=", 5) == 0)
44         {
45 --- 472,479 ----
46       /* Read the file. There should be one of each parameter */
47       while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL)
48       {
49 !       if ((nlp = vim_strchr(lp, '\n')) != NULL)
50 !           *nlp = 0;       /* strip off the trailing newline */
51   
52         if (STRNCMP(lp, "host=", 5) == 0)
53         {
54 ***************
55 *** 1740,1746 ****
56                 int     added = 0;
57                 int     oldFire = netbeansFireChanges;
58                 int     old_b_changed;
59 !               char_u  *nl;
60                 linenr_T lnum;
61                 linenr_T lnum_start;
62                 pos_T   *pos;
63 --- 1740,1746 ----
64                 int     added = 0;
65                 int     oldFire = netbeansFireChanges;
66                 int     old_b_changed;
67 !               char_u  *nlp;
68                 linenr_T lnum;
69                 linenr_T lnum_start;
70                 pos_T   *pos;
71 ***************
72 *** 1780,1787 ****
73                 do_update = 1;
74                 while (*args != NUL)
75                 {
76 !                   nl = vim_strchr(args, '\n');
77 !                   if (nl == NULL)
78                     {
79                         /* Incomplete line, probably truncated.  Next "insert"
80                          * command should append to this one. */
81 --- 1780,1787 ----
82                 do_update = 1;
83                 while (*args != NUL)
84                 {
85 !                   nlp = vim_strchr(args, '\n');
86 !                   if (nlp == NULL)
87                     {
88                         /* Incomplete line, probably truncated.  Next "insert"
89                          * command should append to this one. */
90 ***************
91 *** 1789,1801 ****
92                     }
93                     else
94                     {
95 !                       len = nl - args;
96   
97                         /*
98                          * We need to detect EOL style, because the commands
99                          * use a character offset.
100                          */
101 !                       if (nl > args && nl[-1] == '\r')
102                         {
103                             ff_detected = EOL_DOS;
104                             --len;
105 --- 1789,1801 ----
106                     }
107                     else
108                     {
109 !                       len = nlp - args;
110   
111                         /*
112                          * We need to detect EOL style, because the commands
113                          * use a character offset.
114                          */
115 !                       if (nlp > args && nlp[-1] == '\r')
116                         {
117                             ff_detected = EOL_DOS;
118                             --len;
119 ***************
120 *** 1814,1820 ****
121   
122                         /* Insert halfway a line.  For simplicity we assume we
123                          * need to append to the line. */
124 !                       newline = alloc_check((unsigned)(STRLEN(oldline) + len + 1));
125                         if (newline != NULL)
126                         {
127                             STRCPY(newline, oldline);
128 --- 1814,1821 ----
129   
130                         /* Insert halfway a line.  For simplicity we assume we
131                          * need to append to the line. */
132 !                       newline = alloc_check(
133 !                                      (unsigned)(STRLEN(oldline) + len + 1));
134                         if (newline != NULL)
135                         {
136                             STRCPY(newline, oldline);
137 ***************
138 *** 1826,1839 ****
139                     {
140                         /* Append a new line.  Not that we always do this,
141                          * also when the text doesn't end in a "\n". */
142 !                       ml_append((linenr_T)(lnum - 1), args, (colnr_T)(len + 1), FALSE);
143                         ++added;
144                     }
145   
146 !                   if (nl == NULL)
147                         break;
148                     ++lnum;
149 !                   args = nl + 1;
150                 }
151   
152                 /* Adjust the marks below the inserted lines. */
153 --- 1827,1841 ----
154                     {
155                         /* Append a new line.  Not that we always do this,
156                          * also when the text doesn't end in a "\n". */
157 !                       ml_append((linenr_T)(lnum - 1), args,
158 !                                                  (colnr_T)(len + 1), FALSE);
159                         ++added;
160                     }
161   
162 !                   if (nlp == NULL)
163                         break;
164                     ++lnum;
165 !                   args = nlp + 1;
166                 }
167   
168                 /* Adjust the marks below the inserted lines. */
169 *** ../vim-7.3.400/src/version.c        2012-01-10 22:26:12.000000000 +0100
170 --- src/version.c       2012-01-10 22:30:47.000000000 +0100
171 ***************
172 *** 716,717 ****
173 --- 716,719 ----
174   {   /* Add new patch number below this line */
175 + /**/
176 +     401,
177   /**/
178
179 -- 
180 So when I saw the post to comp.editors, I rushed over to the FTP site to
181 grab it.  So I yank apart the tarball, light x candles, where x= the
182 vim version multiplied by the md5sum of the source divided by the MAC of
183 my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
184 wave a dead chicken over the hard drive, and summon the power of GNU GCC
185 with the magic words "make config ; make!".
186                 [Jason Spence, compiling Vim 5.0]
187
188  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
189 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
190 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
191  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.038229 seconds and 3 git commands to generate.