summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0601
blob: 12f8c5864a64f3896de60cfc3fec14b127b95bf7 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0601
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.0601
Problem:    A few compiler warnings.
Solution:   Add type casts. (Mike Williams)
Files:	    src/GvimExt/gvimext.cpp, src/memline.c, src/textprop.c


*** ../vim-8.1.0600/src/GvimExt/gvimext.cpp	2018-12-14 19:54:35.711994528 +0100
--- src/GvimExt/gvimext.cpp	2018-12-16 14:31:38.691477523 +0100
***************
*** 1084,1090 ****
  	CloseHandle(pi.hProcess);
  	CloseHandle(pi.hThread);
      }
- theend:
      free(cmdStrW);
  
      return NOERROR;
--- 1084,1089 ----
*** ../vim-8.1.0600/src/memline.c	2018-12-13 23:16:32.808280772 +0100
--- src/memline.c	2018-12-16 14:31:38.691477523 +0100
***************
*** 3146,3152 ****
      colnr_T len = -1;
  
      if (line != NULL)
! 	len = STRLEN(line);
      return ml_replace_len(lnum, line, len, copy);
  }
  
--- 3146,3152 ----
      colnr_T len = -1;
  
      if (line != NULL)
! 	len = (colnr_T)STRLEN(line);
      return ml_replace_len(lnum, line, len, copy);
  }
  
***************
*** 3196,3209 ****
  	    size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
  
  	    // Need to copy over text properties, stored after the text.
! 	    newline = alloc(len + 1 + textproplen);
  	    if (newline != NULL)
  	    {
  		mch_memmove(newline, line, len + 1);
  		mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
  		vim_free(line);
  		line = newline;
! 		len += textproplen;
  	    }
  	}
      }
--- 3196,3209 ----
  	    size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen;
  
  	    // Need to copy over text properties, stored after the text.
! 	    newline = alloc(len + 1 + (int)textproplen);
  	    if (newline != NULL)
  	    {
  		mch_memmove(newline, line, len + 1);
  		mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen);
  		vim_free(line);
  		line = newline;
! 		len += (colnr_T)textproplen;
  	    }
  	}
      }
*** ../vim-8.1.0600/src/textprop.c	2018-12-14 15:38:28.331597637 +0100
--- src/textprop.c	2018-12-16 14:31:38.691477523 +0100
***************
*** 301,307 ****
      }
      if (proplen > 0)
  	*props = text + textlen;
!     return proplen / sizeof(textprop_T);
  }
  
      static proptype_T *
--- 301,307 ----
      }
      if (proplen > 0)
  	*props = text + textlen;
!     return (int)(proplen / sizeof(textprop_T));
  }
  
      static proptype_T *
***************
*** 393,399 ****
  		buf->b_ml.ml_line_ptr = newtext;
  		buf->b_ml.ml_flags |= ML_LINE_DIRTY;
  	    }
! 	    buf->b_ml.ml_line_len = len;
  	}
      }
      redraw_buf_later(buf, NOT_VALID);
--- 393,399 ----
  		buf->b_ml.ml_line_ptr = newtext;
  		buf->b_ml.ml_flags |= ML_LINE_DIRTY;
  	    }
! 	    buf->b_ml.ml_line_len = (int)len;
  	}
      }
      redraw_buf_later(buf, NOT_VALID);
***************
*** 423,430 ****
      {
  	char_u	    *text = ml_get_buf(buf, lnum, FALSE);
  	size_t	    textlen = STRLEN(text) + 1;
! 	int	    count = (buf->b_ml.ml_line_len - textlen)
! 							  / sizeof(textprop_T);
  	int	    i;
  	textprop_T  prop;
  	proptype_T  *pt;
--- 423,430 ----
      {
  	char_u	    *text = ml_get_buf(buf, lnum, FALSE);
  	size_t	    textlen = STRLEN(text) + 1;
! 	int	    count = (int)((buf->b_ml.ml_line_len - textlen)
! 							 / sizeof(textprop_T));
  	int	    i;
  	textprop_T  prop;
  	proptype_T  *pt;
***************
*** 607,613 ****
  	    EMSG2(_("E969: Property type %s already defined"), name);
  	    return;
  	}
! 	prop = (proptype_T *)alloc_clear(sizeof(proptype_T) + STRLEN(name));
  	if (prop == NULL)
  	    return;
  	STRCPY(prop->pt_name, name);
--- 607,613 ----
  	    EMSG2(_("E969: Property type %s already defined"), name);
  	    return;
  	}
! 	prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
  	if (prop == NULL)
  	    return;
  	STRCPY(prop->pt_name, name);
*** ../vim-8.1.0600/src/version.c	2018-12-15 17:46:18.913870718 +0100
--- src/version.c	2018-12-16 14:32:28.159174538 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     601,
  /**/

-- 
Computers are useless. They can only give you answers.
                -- Pablo Picasso

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