summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0744
blob: e488e4bec0ab43e7e24d838f9ca529480bb6b903 (plain)
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0744
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0744 (after 8.1.0743)
Problem:    Compiler warnings for signed/unsigned strings.
Solution:   A few more type cast fixes.
Files:	    src/option.c, src/if_perl.xs, src/if_py_both.h, src/integration.c


*** ../vim-8.1.0743/src/option.c	2019-01-13 23:38:33.403773217 +0100
--- src/option.c	2019-01-13 23:43:01.405729009 +0100
***************
*** 6965,6973 ****
      else if (varp == &p_guifontset)
      {
  	if (STRCMP(p_guifontset, "*") == 0)
! 	    errmsg = (char_u *)N_("E597: can't select fontset");
  	else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
! 	    errmsg = (char_u *)N_("E598: Invalid fontset");
  	redraw_gui_only = TRUE;
      }
  # endif
--- 6965,6973 ----
      else if (varp == &p_guifontset)
      {
  	if (STRCMP(p_guifontset, "*") == 0)
! 	    errmsg = N_("E597: can't select fontset");
  	else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
! 	    errmsg = N_("E598: Invalid fontset");
  	redraw_gui_only = TRUE;
      }
  # endif
***************
*** 7687,7693 ****
  	    p = (char_u *)MOUSE_ALL;
  #else
  	    if (*p_mouse != NUL)
! 		errmsg = (char_u *)N_("E538: No mouse support");
  #endif
  	}
  #if defined(FEAT_GUI)
--- 7687,7693 ----
  	    p = (char_u *)MOUSE_ALL;
  #else
  	    if (*p_mouse != NUL)
! 		errmsg = N_("E538: No mouse support");
  #endif
  	}
  #if defined(FEAT_GUI)
*** ../vim-8.1.0743/src/if_perl.xs	2019-01-13 23:38:33.395773275 +0100
--- src/if_perl.xs	2019-01-13 23:44:00.353278430 +0100
***************
*** 1562,1572 ****
  SV*
  Blob(SV* sv)
      PREINIT:
!     STRLEN  len;
!     char    *s;
!     int	    i;
!     char    buf[3];
!     SV*	    newsv;
  
      CODE:
      s = SvPVbyte(sv, len);
--- 1562,1572 ----
  SV*
  Blob(SV* sv)
      PREINIT:
!     STRLEN	len;
!     char	*s;
!     unsigned	i;
!     char	buf[3];
!     SV*		newsv;
  
      CODE:
      s = SvPVbyte(sv, len);
*** ../vim-8.1.0743/src/if_py_both.h	2019-01-13 23:38:33.395773275 +0100
--- src/if_py_both.h	2019-01-13 23:46:14.648261783 +0100
***************
*** 410,415 ****
--- 410,421 ----
  }
  
      static int
+ msg_wrapper(char *text)
+ {
+     return msg((char_u *)text);
+ }
+ 
+     static int
  write_output(OutputObject *self, PyObject *string)
  {
      Py_ssize_t	len = 0;
***************
*** 421,427 ****
  
      Py_BEGIN_ALLOW_THREADS
      Python_Lock_Vim();
!     writer((writefn)(error ? emsg : msg), (char_u *)str, len);
      Python_Release_Vim();
      Py_END_ALLOW_THREADS
      PyMem_Free(str);
--- 427,433 ----
  
      Py_BEGIN_ALLOW_THREADS
      Python_Lock_Vim();
!     writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len);
      Python_Release_Vim();
      Py_END_ALLOW_THREADS
      PyMem_Free(str);
***************
*** 634,640 ****
      else if (msg_list != NULL && *msg_list != NULL)
      {
  	int	should_free;
! 	char_u	*msg;
  
  	msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
  
--- 640,646 ----
      else if (msg_list != NULL && *msg_list != NULL)
      {
  	int	should_free;
! 	char	*msg;
  
  	msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
  
***************
*** 644,650 ****
  	    return -1;
  	}
  
! 	PyErr_SetVim((char *) msg);
  
  	free_global_msglist();
  
--- 650,656 ----
  	    return -1;
  	}
  
! 	PyErr_SetVim(msg);
  
  	free_global_msglist();
  
***************
*** 3483,3495 ****
      static int
  set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
  {
!     char_u	*errmsg;
  
      if ((errmsg = set_option_value(key, numval, stringval, opt_flags)))
      {
  	if (VimTryEnd())
  	    return FAIL;
! 	PyErr_SetVim((char *)errmsg);
  	return FAIL;
      }
      return OK;
--- 3489,3501 ----
      static int
  set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
  {
!     char	*errmsg;
  
      if ((errmsg = set_option_value(key, numval, stringval, opt_flags)))
      {
  	if (VimTryEnd())
  	    return FAIL;
! 	PyErr_SetVim(errmsg);
  	return FAIL;
      }
      return OK;
*** ../vim-8.1.0743/src/integration.c	2018-09-30 21:43:17.195693290 +0200
--- src/integration.c	2019-01-13 23:47:24.371738521 +0100
***************
*** 303,309 ****
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("currentFile %d %s"),
! 				f ? strlen(f) : 0, f ? f : "");
  			workshop_send_message(buffer);
  		} else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
  			int row = workshop_test_getcursorrow();
--- 303,309 ----
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("currentFile %d %s"),
! 				f ? (int)strlen(f) : 0, f ? f : "");
  			workshop_send_message(buffer);
  		} else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
  			int row = workshop_test_getcursorrow();
***************
*** 322,335 ****
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("cursorRowText %d %s"),
! 				t ? strlen(t) : 0, t ? t : "");
  			workshop_send_message(buffer);
  		} else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
  			char *t = workshop_test_getselectedtext();
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("selectedText %d %s"),
! 				t ? strlen(t) : 0, t ? t : "");
  			workshop_send_message(buffer);
  #endif
  		}
--- 322,335 ----
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("cursorRowText %d %s"),
! 				t ? (int)strlen(t) : 0, t ? t : "");
  			workshop_send_message(buffer);
  		} else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
  			char *t = workshop_test_getselectedtext();
  			char buffer[2*MAXPATHLEN];
  			vim_snprintf(buffer, sizeof(buffer),
  					NOCATGETS("selectedText %d %s"),
! 				t ? (int)strlen(t) : 0, t ? t : "");
  			workshop_send_message(buffer);
  #endif
  		}
*** ../vim-8.1.0743/src/version.c	2019-01-13 23:50:42.810262435 +0100
--- src/version.c	2019-01-13 23:49:19.134882757 +0100
***************
*** 797,798 ****
--- 797,800 ----
  {   /* Add new patch number below this line */
+ /**/
+     744,
  /**/

-- 
Press any key to continue, press any other key to quit.

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