summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.076
blob: 9ec7db428b2a897f39b914f02ad02de8bd814482 (plain) (blame)
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
192
193
194
195
196
197
198
199
200
201
202
203
To: vim_dev@googlegroups.com
Subject: Patch 7.3.076
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.076
Problem:    Clang warnings for dead code.
Solution:   Remove it. (Carlo Teubner)
Files:	    src/gui_gtk.c, src/if_ruby.c, src/misc2.c, src/netbeans.c,
	    src/spell.c


*** ../vim-7.3.075/src/gui_gtk.c	2010-11-24 18:48:08.000000000 +0100
--- src/gui_gtk.c	2010-12-08 12:25:17.000000000 +0100
***************
*** 1798,1804 ****
      char_u		*repl_text;
      gboolean		direction_down;
      SharedFindReplace	*sfr;
-     int			rc;
  
      flags = (int)(long)data;	    /* avoid a lint warning here */
  
--- 1798,1803 ----
***************
*** 1824,1830 ****
  
      repl_text = CONVERT_FROM_UTF8(repl_text);
      find_text = CONVERT_FROM_UTF8(find_text);
!     rc = gui_do_findrepl(flags, find_text, repl_text, direction_down);
      CONVERT_FROM_UTF8_FREE(repl_text);
      CONVERT_FROM_UTF8_FREE(find_text);
  }
--- 1823,1829 ----
  
      repl_text = CONVERT_FROM_UTF8(repl_text);
      find_text = CONVERT_FROM_UTF8(find_text);
!     gui_do_findrepl(flags, find_text, repl_text, direction_down);
      CONVERT_FROM_UTF8_FREE(repl_text);
      CONVERT_FROM_UTF8_FREE(find_text);
  }
*** ../vim-7.3.075/src/if_ruby.c	2010-11-24 17:03:34.000000000 +0100
--- src/if_ruby.c	2010-12-08 12:30:38.000000000 +0100
***************
*** 586,594 ****
  	if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
  	    return;
  	for (i = eap->line1; i <= eap->line2; i++) {
! 	    VALUE line, oldline;
  
! 	    line = oldline = vim_str2rb_enc_str((char *)ml_get(i));
  	    rb_lastline_set(line);
  	    eval_enc_string_protect((char *) eap->arg, &state);
  	    if (state) {
--- 586,594 ----
  	if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
  	    return;
  	for (i = eap->line1; i <= eap->line2; i++) {
! 	    VALUE line;
  
! 	    line = vim_str2rb_enc_str((char *)ml_get(i));
  	    rb_lastline_set(line);
  	    eval_enc_string_protect((char *) eap->arg, &state);
  	    if (state) {
*** ../vim-7.3.075/src/misc2.c	2010-08-15 21:57:32.000000000 +0200
--- src/misc2.c	2010-12-08 12:42:44.000000000 +0100
***************
*** 200,206 ****
  	}
  #endif
  
- 	idx = -1;
  	ptr = line;
  	while (col <= wcol && *ptr != NUL)
  	{
--- 200,205 ----
***************
*** 1223,1229 ****
  #endif
  
  /*
!  * copy a string into newly allocated memory
   */
      char_u *
  vim_strsave(string)
--- 1222,1228 ----
  #endif
  
  /*
!  * Copy "string" into newly allocated memory.
   */
      char_u *
  vim_strsave(string)
***************
*** 1239,1244 ****
--- 1238,1249 ----
      return p;
  }
  
+ /*
+  * Copy up to "len" bytes of "string" into newly allocated memory and
+  * terminate with a NUL.
+  * The allocated memory always has size "len + 1", also when "string" is
+  * shorter.
+  */
      char_u *
  vim_strnsave(string, len)
      char_u	*string;
*** ../vim-7.3.075/src/netbeans.c	2010-12-02 17:09:48.000000000 +0100
--- src/netbeans.c	2010-12-08 12:43:57.000000000 +0100
***************
*** 960,966 ****
      keyQ_T *key_node = keyHead.next;
      queue_T *cmd_node = head.next;
      nbbuf_T buf;
-     buf_T *bufp;
      int i;
  
      /* free the netbeans buffer list */
--- 960,965 ----
***************
*** 969,975 ****
  	buf = buf_list[i];
  	vim_free(buf.displayname);
  	vim_free(buf.signmap);
! 	if ((bufp=buf.bufp) != NULL)
  	{
  	    buf.bufp->b_netbeans_file = FALSE;
  	    buf.bufp->b_was_netbeans_file = FALSE;
--- 968,974 ----
  	buf = buf_list[i];
  	vim_free(buf.displayname);
  	vim_free(buf.signmap);
! 	if (buf.bufp != NULL)
  	{
  	    buf.bufp->b_netbeans_file = FALSE;
  	    buf.bufp->b_was_netbeans_file = FALSE;
*** ../vim-7.3.075/src/spell.c	2010-09-29 18:32:47.000000000 +0200
--- src/spell.c	2010-12-08 12:47:13.000000000 +0100
***************
*** 9839,9848 ****
  	{
  	    /* be quick for ASCII */
  	    if (wp->w_s->b_spell_ismw[*p])
- 	    {
  		s = p + 1;		/* skip a mid-word character */
- 		l = MB_BYTE2LEN(*s);
- 	    }
  	}
  	else
  	{
--- 9839,9845 ----
***************
*** 9850,9859 ****
  	    if (c < 256 ? wp->w_s->b_spell_ismw[c]
  		    : (wp->w_s->b_spell_ismw_mb != NULL
  			   && vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL))
- 	    {
  		s = p + l;
- 		l = MB_BYTE2LEN(*s);
- 	    }
  	}
  
  	c = mb_ptr2char(s);
--- 9847,9853 ----
***************
*** 13813,13823 ****
  		    su->su_sfmaxscore = cleanup_suggestions(gap,
  				      su->su_sfmaxscore, SUG_CLEAN_COUNT(su));
  		else
- 		{
- 		    i = su->su_maxscore;
  		    su->su_maxscore = cleanup_suggestions(gap,
  					su->su_maxscore, SUG_CLEAN_COUNT(su));
- 		}
  	    }
  	}
      }
--- 13807,13814 ----
*** ../vim-7.3.075/src/version.c	2010-12-02 21:44:35.000000000 +0100
--- src/version.c	2010-12-08 13:10:00.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     76,
  /**/

-- 
Never enter the boss's office unless it's absolutely necessary.  Every boss
saves one corner of the desk for useless assignments that are doled out like
Halloween candy to each visitor.
				(Scott Adams - The Dilbert principle)

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