1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
To: vim_dev@googlegroups.com
Subject: Patch 7.3.401
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
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 -- Bram@Moolenaar.net -- 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 ///
|