summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0684
blob: a7a3a6b845cbd9d9383f63406a5525297b3e571f (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0684
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.0684
Problem:    Warnings from 64-bit compiler.
Solution:   Add type casts. (Mike Williams)
Files:	    src/memline.c, src/textprop.c


*** ../vim-8.1.0683/src/memline.c	2018-12-28 23:22:36.270750732 +0100
--- src/memline.c	2019-01-03 21:53:17.378822555 +0100
***************
*** 562,568 ****
  			    /* Skip data block with negative block number.
  			     * Should not happen, because of the ml_preserve()
  			     * above. Get same block again for next index. */
! 			    ++idx; 
  			    continue;
  			}
  
--- 562,568 ----
  			    /* Skip data block with negative block number.
  			     * Should not happen, because of the ml_preserve()
  			     * above. Get same block again for next index. */
! 			    ++idx;
  			    continue;
  			}
  
***************
*** 3350,3356 ****
  			internal_error("no text property below deleted line");
  		    return;
  		}
! 		this_props_len = line_size - textlen;
  	    }
  
  	    found = FALSE;
--- 3350,3356 ----
  			internal_error("no text property below deleted line");
  		    return;
  		}
! 		this_props_len = line_size - (int)textlen;
  	    }
  
  	    found = FALSE;
***************
*** 3489,3495 ****
  
  	if ((long)textlen < line_size)
  	{
! 	    textprop_save_len = line_size - textlen;
  	    textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
  							  textprop_save_len);
  	}
--- 3489,3495 ----
  
  	if ((long)textlen < line_size)
  	{
! 	    textprop_save_len = line_size - (int)textlen;
  	    textprop_save = vim_memsave((char_u *)dp + line_start + textlen,
  							  textprop_save_len);
  	}
***************
*** 5379,5385 ****
  		    // the text prop info would also be counted.  Go over the
  		    // lines.
  		    for (i = end_idx; i < idx; ++i)
! 			size += STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
  		}
  		else
  #endif
--- 5379,5385 ----
  		    // the text prop info would also be counted.  Go over the
  		    // lines.
  		    for (i = end_idx; i < idx; ++i)
! 			size += (int)STRLEN((char_u *)dp + (dp->db_index[i] & DB_INDEX_MASK)) + 1;
  		}
  		else
  #endif
***************
*** 5588,5594 ****
  	    // lengths.
  	    len = 0;
  	    for (i = start_idx; i <= idx; ++i)
! 		len += STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
  	}
  	else
  #endif
--- 5588,5594 ----
  	    // lengths.
  	    len = 0;
  	    for (i = start_idx; i <= idx; ++i)
! 		len += (int)STRLEN((char_u *)dp + ((dp->db_index[i]) & DB_INDEX_MASK)) + 1;
  	}
  	else
  #endif
*** ../vim-8.1.0683/src/textprop.c	2019-01-02 23:47:14.360433274 +0100
--- src/textprop.c	2019-01-03 21:53:17.378822555 +0100
***************
*** 262,270 ****
  	if (lnum == end_lnum)
  	    length = end_col - col;
  	else
! 	    length = textlen - col + 1;
  	if (length > (long)textlen)
! 	    length = textlen;	// can include the end-of-line
  	if (length < 0)
  	    length = 0;		// zero-width property
  
--- 262,270 ----
  	if (lnum == end_lnum)
  	    length = end_col - col;
  	else
! 	    length = (int)textlen - col + 1;
  	if (length > (long)textlen)
! 	    length = (int)textlen;	// can include the end-of-line
  	if (length < 0)
  	    length = 0;		// zero-width property
  
***************
*** 972,978 ****
      if (dirty)
      {
  	curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
! 	curbuf->b_ml.ml_line_len = textlen + wi * sizeof(textprop_T);
      }
  }
  
--- 972,978 ----
      if (dirty)
      {
  	curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
! 	curbuf->b_ml.ml_line_len = (int)textlen + wi * sizeof(textprop_T);
      }
  }
  
*** ../vim-8.1.0683/src/version.c	2019-01-03 21:44:30.267072385 +0100
--- src/version.c	2019-01-03 21:54:19.434321091 +0100
***************
*** 801,802 ****
--- 801,804 ----
  {   /* Add new patch number below this line */
+ /**/
+     684,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
94. Now admit it... How many of you have made "modem noises" into
    the phone just to see if it was possible? :-)

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