summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0366
blob: be8e15e4a9844d433ff721034939d75e48ffd1ae (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0366
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.0366
Problem:    Pieces of the xdiff code are not used.
Solution:   Add "#if 0" to omit unused code.
Files:	    src/xdiff/xemit.c


*** ../vim-8.1.0365/src/xdiff/xemit.c	2018-09-10 21:22:11.540724228 +0200
--- src/xdiff/xemit.c	2018-09-10 22:17:54.906146558 +0200
***************
*** 95,100 ****
--- 95,101 ----
  }
  
  
+ #if 0
  static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED)
  {
  	if (len > 0 &&
***************
*** 110,116 ****
--- 111,119 ----
  	}
  	return -1;
  }
+ #endif
  
+ #if 0
  static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri,
  			   char *buf, long sz)
  {
***************
*** 120,137 ****
--- 123,144 ----
  		return def_ff(rec, len, buf, sz, xecfg->find_func_priv);
  	return xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv);
  }
+ #endif
  
+ #if 0
  static int is_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri)
  {
  	char dummy[1];
  	return match_func_rec(xdf, xecfg, ri, dummy, sizeof(dummy)) >= 0;
  }
+ #endif
  
  struct func_line {
  	long len;
  	char buf[80];
  };
  
+ #if 0
  static long get_func_line(xdfenv_t *xe, xdemitconf_t const *xecfg,
  			  struct func_line *func_line, long start, long limit)
  {
***************
*** 151,157 ****
--- 158,166 ----
  	}
  	return -1;
  }
+ #endif
  
+ #if 0
  static int is_empty_rec(xdfile_t *xdf, long ri)
  {
  	const char *rec;
***************
*** 163,174 ****
--- 172,186 ----
  	}
  	return !len;
  }
+ #endif
  
  int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
  		  xdemitconf_t const *xecfg) {
  	long s1, s2, e1, e2, lctx;
  	xdchange_t *xch, *xche;
+ #if 0
  	long funclineprev = -1;
+ #endif
  	struct func_line func_line;
  
  	func_line.len = 0;
***************
*** 181,186 ****
--- 193,199 ----
  		s1 = XDL_MAX(xch->i1 - xecfg->ctxlen, 0);
  		s2 = XDL_MAX(xch->i2 - xecfg->ctxlen, 0);
  
+ #if 0
  		if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
  			long fs1, i1 = xch->i1;
  
***************
*** 218,223 ****
--- 231,237 ----
  		}
  
   post_context_calculation:
+ #endif
  		lctx = xecfg->ctxlen;
  		lctx = XDL_MIN(lctx, xe->xdf1.nrec - (xche->i1 + xche->chg1));
  		lctx = XDL_MIN(lctx, xe->xdf2.nrec - (xche->i2 + xche->chg2));
***************
*** 225,230 ****
--- 239,245 ----
  		e1 = xche->i1 + xche->chg1 + lctx;
  		e2 = xche->i2 + xche->chg2 + lctx;
  
+ #if 0
  		if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) {
  			long fe1 = get_func_line(xe, xecfg, NULL,
  						 xche->i1 + xche->chg1,
***************
*** 253,268 ****
--- 268,286 ----
  				}
  			}
  		}
+ #endif
  
  		/*
  		 * Emit current hunk header.
  		 */
  
+ #if 0
  		if (xecfg->flags & XDL_EMIT_FUNCNAMES) {
  			get_func_line(xe, xecfg, &func_line,
  				      s1 - 1, funclineprev);
  			funclineprev = s1 - 1;
  		}
+ #endif
  		if (xdl_emit_hunk_hdr(s1 + 1, e1 - s1, s2 + 1, e2 - s2,
  				      func_line.buf, func_line.len, ecb) < 0)
  			return -1;
*** ../vim-8.1.0365/src/version.c	2018-09-10 22:03:36.490401066 +0200
--- src/version.c	2018-09-10 22:18:11.225981264 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     366,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
33. You name your children Eudora, Mozilla and Dotcom.

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